WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Ingela's Rapture - removing the font shadow (https://www.wowinterface.com/forums/showthread.php?t=43329)

sopie 04-24-12 03:04 PM

Ingela's Rapture - removing the font shadow
 
Hi guys, I'm looking to see if anyone can perhaps help me to get rid of the font shadowing in the add-on Ingela's Rapture from Curse. I've been able to change the font/bar texture/etc. fine but I've had no luck in finding anything in the file that will remove the text shadowing (and it's there on every font I use.) I also googled to try and find a general lua line of code I could use as I have done before for other add-ons to remove it but none of it seemed to work (I'm pretty bad at editing things in an lua file if it isn't obvious.)

Does anyone here know what I should be typing/where it should go/if it's even possible to get rid of it? The shadowing isn't present on any other fonts in the UI I use so it bothers me that this one has it. Here's a picture to show the comparison - the CD bar is what I want the rapture cd text to look like.



I have asked the add-on author but she said she wasn't sure what I meant, and since it didn't seem that she has added anything in the file to directly add the shadowing I didn't want to bother her with it. I also posted this on the WoW forums and so far no one has been able to help me with removing it, although someone did say that the shadow is inherited from whatever font string is being used (or something like that)... however with that information I still have no idea how to get rid of the font shadow in this add-on :x. Thanks in advance if you know what I could do to change the shadow for this add-on :).

Dridzt 04-24-12 03:55 PM

The 2 functions used to create font shadows are:

FontInstance:SetShadowColor(r,g,b,a)
FontInstance:SetShadowOffset(x,y)

Neither are used anywhere in that addon so the author's probably right that they're part of the font definition of whatever media pack you're loading to pick fonts.

To find that info you'd have to look at your font options and then find what's providing said fonts.

Qupe 04-24-12 04:31 PM

You could also just add the shadow offset lines to parts of the code that set the bar name/timer text. That's what I had to do to ACB/Skada to remove font shadowing since the shadow information wasn't there.

Phanx 04-24-12 05:30 PM

Quote:

Originally Posted by Dridzt (Post 255815)
... they're part of the font definition of whatever media pack you're loading to pick fonts.

I've never heard of a media pack that supplies anything other than the font's filename. Other properties (size, outline, shadow, alignment, etc.) are either specified explicitly by the addon author, or are inherited from the predefined font object (eg. GameFontNormal) the font string defined as its template when it was created.

If there's no code in the addon that's adding the shadow, then it's probably being inherited from a predefined font object like GameFontNormal.

sopie 04-26-12 05:20 PM

Thanks for the help guys, unfortunately I still can't get rid of it. I went through and edited every shadow offset I could find to see if it would make a difference but none did anything :(. I also tried adding SetShadowOffset(0, 0) into multiple different places in the add-on but still couldn't get it so oh well I suppose :P.
Thanks again for the help though!

Phanx 04-26-12 06:04 PM

First, go through the addon and remove every SetShadowOffset call.

Then, find every place the addon calls code like this:

Code:

local fontString = frameObject:CreateFontString(...)
Immediately after each CreateFontString call, add a new line:

Code:

fontString:SetShadowOffset(0, 0)
Also check for any code like this:

Code:

fontString:SetFontObject(...)
If such a line appears right after the CreateFontString call, then move your SetShadowOffset line after the SetFontObject line. If it appears somewhere else (such as in an options function) add another SetShadowOffset line right after it.

Qupe 04-26-12 07:20 PM

In core.lua add this after line 826 (when bar formatting starts):
Lua Code:
  1. RaptureBAR.candyBarLabel:SetShadowOffset(0,0)
  2. RaptureBAR.candyBarDuration:SetShadowOffset(0,0)

Just to keep things organized, I usually add that stuff just under the corresponding SetFonts.

ex (lines 834-837):
Lua Code:
  1. RaptureBAR.candyBarLabel:SetFont(rapmedia:Fetch("font", db.font), db.fontscale, db.outline~="NONE" and db.outline or nil)
  2. RaptureBAR.candyBarLabel:SetShadowOffset(0,0)
  3. RaptureBAR.candyBarDuration:SetFont(rapmedia:Fetch("font", db.font), db.fontscale, db.outline~="NONE" and db.outline or nil)
  4. RaptureBAR.candyBarDuration:SetShadowOffset(0,0)

sopie 04-27-12 12:23 PM

Thank you so much for the help guys<3 It's finally gone! I'm gonna keep this thread bookmarked in case I ever need to generally remove shadowed fonts too :3 thanks so much again for all your help ^.^


All times are GMT -6. The time now is 02:15 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI