Thread: GameFontBlack
View Single Post
02-27-11, 09:45 AM   #10
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Originally Posted by Aprikot View Post
I've wrestled with the same issue as the OP. The FontObjects used in some of the Quest Log & Acheivements pane text (GameFontBlack, SystemFont_Small, QuestFont) will respond to all of the SetFont arguments, but do not respond to SetTextColor. This results in the unhappy, and mostly illegible, dark text with dark outline.

To my understanding, SetTextColor doesn't override anything; it only affects text not being colored by something else. I've being poking around the FrameXML files for what might be coloring SystemFont_Small text dark brown.

My workaround in the meantime is to remove the outline flag from the dark colored FontObjects. I use the method sacrife posted above, from Tukui, which lets you use different settings per object:

Lua Code:
  1. -- author: Tukz
  2.  
  3. local eventframe = CreateFrame("Frame", nil, UIParent)
  4.    
  5. local SetFont = function(obj, font, size, style, r, g, b, sr, sg, sb, sox, soy)
  6.     obj:SetFont(font, size, style)
  7.     if sr and sg and sb then obj:SetShadowColor(sr, sg, sb) end
  8.     if sox and soy then obj:SetShadowOffset(sox, soy) end
  9.     obj:SetShadowOffset(1,-2)
  10.     obj:SetShadowColor(0, 0, 0, .4)
  11.     if r and g and b then obj:SetTextColor(r, g, b)
  12.     elseif r then obj:SetAlpha(r) end
  13. end
  14.  
  15. eventframe:RegisterEvent("PLAYER_ENTERING_WORLD")
  16. eventframe:SetScript("OnEvent", function(self, event, addon)
  17.    
  18.     local NORMAL     = "Fonts\\ARIALN.ttf"
  19.     local COMBAT     = "Fonts\\ARIALN.ttf"
  20.     local NUMBER     = "Fonts\\ARIALN.ttf"
  21.     local fSize      = 14
  22.  
  23.     UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT = 8
  24.     CHAT_FONT_HEIGHTS = {8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20}
  25.  
  26.     UNIT_NAME_FONT     = NORMAL
  27.     NAMEPLATE_FONT     = NORMAL
  28.     DAMAGE_TEXT_FONT   = COMBAT
  29.     STANDARD_TEXT_FONT = NORMAL
  30.  
  31.     -- Base fonts
  32.     SetFont(GameFontBlack,                      NORMAL, fSize, "", 1, 0, 0, 1, 0, 0, 0, 0, 0);
  33.     SetFont(GameFontHighlight,                  NORMAL, fSize, "THINOUTLINE", 1, 1, 1, 1, 0, 0, 0, 0, 0)
  34.     SetFont(GameTooltipHeader,                  NORMAL, fSize, "THINOUTLINE")
  35.     SetFont(NumberFont_OutlineThick_Mono_Small, NUMBER, fSize, "THINOUTLINE")
  36.     SetFont(NumberFont_Outline_Huge,            NUMBER, 28, "THINOUTLINE", 28)
  37.     SetFont(NumberFont_Outline_Large,           NUMBER, fSize+3, "THINOUTLINE")
  38.     SetFont(NumberFont_Outline_Med,             NUMBER, fSize, "THINOUTLINE")
  39.     SetFont(NumberFont_Shadow_Med,              NORMAL, fSize, "THINOUTLINE")
  40.     SetFont(NumberFont_Shadow_Small,            NORMAL, fSize, "THINOUTLINE")
  41.     SetFont(QuestFont,                          NORMAL, fSize+2, "", 1, 1, 1, 1, 0, 0, 0, 0, 0)
  42.     SetFont(QuestFont_Large,                    NORMAL, fSize+2, "THINOUTLINE", 1, 1, 1, 1, 0, 0, 0, 0, 0)
  43.     SetFont(SystemFont_Large,                   NORMAL, fSize+2, "THINOUTLINE")
  44.     SetFont(SystemFont_Med1,                    NORMAL, fSize-1, "THINOUTLINE")
  45.     SetFont(SystemFont_Med3,                    NORMAL, fSize-1, "THINOUTLINE")
  46.     SetFont(SystemFont_OutlineThick_Huge2,      NORMAL, fSize+7, "THICKOUTLINE")
  47.     SetFont(SystemFont_Outline_Small,           NUMBER, fSize, "THINOUTLINE")
  48.     SetFont(SystemFont_Shadow_Large,            NORMAL, fSize+2, "THINOUTLINE")
  49.     SetFont(SystemFont_Shadow_Med1,             NORMAL, fSize, "THINOUTLINE")
  50.     SetFont(SystemFont_Shadow_Med3,             NORMAL, fSize, "THINOUTLINE")
  51.     SetFont(SystemFont_Shadow_Outline_Huge2,    NORMAL, fSize+7, "THINOUTLINE")
  52.     SetFont(SystemFont_Shadow_Small,            NORMAL, fSize, "THINOUTLINE")
  53.     SetFont(SystemFont_Small,                   NORMAL, fSize, "", 1, 1, 1, 1, 0, 0, 0, 0, 0)
  54.     SetFont(SystemFont_Tiny,                    NORMAL, fSize, "THINOUTLINE")
  55.     SetFont(Tooltip_Med,                        NORMAL, fSize, "THINOUTLINE")
  56.     SetFont(Tooltip_Small,                      NORMAL, fSize, "THINOUTLINE")
  57.     SetFont(CombatTextFont,                     COMBAT, 25, "THINOUTLINE")
  58.     SetFont(SystemFont_Shadow_Huge1,            NORMAL, 20, "THINOUTLINE")
  59.     SetFont(ZoneTextString,                     NORMAL, 32, "THINOUTLINE")
  60.     SetFont(SubZoneTextString,                  NORMAL, 25, "THINOUTLINE")
  61.     SetFont(PVPInfoTextString,                  NORMAL, 22, "THINOUTLINE")
  62.     SetFont(PVPArenaTextString,                 NORMAL, 22, "THINOUTLINE")
  63.     SetFont(ChatFrame1,                         NORMAL, fSize, "THINOUTLINE")  
  64.  
  65.     SetFont = nil
  66.     self:SetScript("OnEvent", nil)
  67.     self:UnregisterAllEvents()
  68.     self = nil
  69. end)

BTW, are "OUTLINE" & "THINOUTLINE" the same thing, and if so have they always been?
Didn't work that well

@ hank haven't tried it yet, so ^^
  Reply With Quote