Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-18-23, 09:37 AM   #1
Theolos
A Deviate Faerie Dragon
Join Date: Aug 2016
Posts: 11
Fonts won't load

Hej!

With the new WotLK-Patch my UI is a desaster... there are a lot of things not working but one of most important one are my fonts...

Can someone tell me why this code wouldn't work anymore? Maybe it isn't something big and can be adjusted fast
Lua Code:
  1. --[[
  2.     modules\misc\fonts.lua
  3.     Basically overrides a crapload of UI fonts to the 'Primary' UI font set in config.
  4.  
  5.     This code is a mixture of my own, Phanx, Tekkub and gmFonts.
  6.  
  7.     Seriously, literally zero credit to me for finding all these font definitions.
  8. ]]
  9. ImpUI_Fonts = ImpUI:NewModule('ImpUI_Fonts', 'AceEvent-3.0');
  10.  
  11. -- Get Locale
  12. local L = LibStub('AceLocale-3.0'):GetLocale('ImprovedBlizzardUI');
  13.  
  14. -- Local Variables
  15. local OSD;
  16.  
  17. -- Local Functions
  18.  
  19. --[[
  20.     Updates a font object and forces it to the specified parameters.
  21.    
  22.     @ return void
  23. ]]
  24. local function SetFont(obj, font, size, style, r, g, b, sr, sg, sb, sox, soy)  
  25.     if (obj == nil) then return end
  26.    
  27.     obj:SetFont(font, size, style)
  28.     if sr and sg and sb then obj:SetShadowColor(sr, sg, sb) end
  29.     if sox and soy then obj:SetShadowOffset(sox, soy) end
  30.     if r and g and b then obj:SetTextColor(r, g, b)
  31.     elseif r then obj:SetAlpha(r) end
  32. end
  33.  
  34. --[[
  35.     Goes through and actually updates as many Blizzard fonts as I'm aware of.
  36.    
  37.     @ return void
  38. ]]
  39. local function UpdateFonts()
  40.     local primaryFont = LSM:Fetch('font', ImpUI.db.profile.primaryInterfaceFont);
  41.  
  42.     UNIT_NAME_FONT     = primaryFont;
  43.     DAMAGE_TEXT_FONT   = primaryFont;
  44.     STANDARD_TEXT_FONT = primaryFont;
  45.     NAMEPLATE_FONT     = primaryFont;
  46.    
  47.     SetFont(AchievementFont_Small,              primaryFont, 11);
  48.     SetFont(FriendsFont_Large,                  primaryFont, 14, nil, nil, nil, nil, 0, 0, 0, 1, -1);
  49.     SetFont(FriendsFont_Normal,                 primaryFont, 12, nil, nil, nil, nil, 0, 0, 0, 1, -1);
  50.     SetFont(FriendsFont_Small,                  primaryFont, 10, nil, nil, nil, nil, 0, 0, 0, 1, -1);
  51.     SetFont(FriendsFont_UserText,               primaryFont, 11, nil, nil, nil, nil, 0, 0, 0, 1, -1);
  52.     SetFont(GameTooltipHeader,                  primaryFont, 14, 'OUTLINE');
  53.     SetFont(GameFont_Gigantic,                  primaryFont, 31, nil, nil, nil, nil, 0, 0, 0, 1, -1);
  54.     SetFont(GameNormalNumberFont,               primaryFont, 10);
  55.     SetFont(InvoiceFont_Med,                    primaryFont, 12, nil, 0.15, 0.09, 0.04);
  56.     SetFont(InvoiceFont_Small,                  primaryFont, 10, nil, 0.15, 0.09, 0.04);
  57.     SetFont(MailFont_Large,                     primaryFont, 14, nil, 0.15, 0.09, 0.04, 0.54, 0.4, 0.1, 1, -1);
  58.     SetFont(NumberFont_OutlineThick_Mono_Small, primaryFont, 12, 'OUTLINE');
  59.     SetFont(NumberFont_Outline_Huge,            primaryFont, 29, 'THICKOUTLINE', 30);
  60.     SetFont(NumberFont_Outline_Large,           primaryFont, 16, 'OUTLINE');
  61.     SetFont(NumberFont_Outline_Med,             primaryFont, 14, 'OUTLINE');
  62.     SetFont(NumberFont_Shadow_Med,              primaryFont, 13);
  63.     SetFont(NumberFont_Shadow_Small,            primaryFont, 11);
  64.     SetFont(QuestFont_Shadow_Small,             primaryFont, 15);
  65.     SetFont(QuestFont_Large,                    primaryFont, 15);
  66.     SetFont(QuestFont_Shadow_Huge,              primaryFont, 18, nil, nil, nil, nil, 0.54, 0.4, 0.1);
  67.     SetFont(QuestFont_Super_Huge,               primaryFont, 23);
  68.     SetFont(ReputationDetailFont,               primaryFont, 11, nil, nil, nil, nil, 0, 0, 0, 1, -1);
  69.     SetFont(SpellFont_Small,                    primaryFont, 10);
  70.     SetFont(SystemFont_InverseShadow_Small,     primaryFont, 10);
  71.     SetFont(SystemFont_Large,                   primaryFont, 16);
  72.     SetFont(SystemFont_Med1,                    primaryFont, 12);
  73.     SetFont(SystemFont_Med2,                    primaryFont, 13, nil, 0.15, 0.09, 0.04);
  74.     SetFont(SystemFont_Med3,                    primaryFont, 14);
  75.     SetFont(SystemFont_OutlineThick_Huge2,      primaryFont, 21, 'THICKOUTLINE');
  76.     SetFont(SystemFont_OutlineThick_Huge4,      primaryFont, 26, 'THICKOUTLINE');
  77.     SetFont(SystemFont_OutlineThick_WTF,        primaryFont, 30, 'THICKOUTLINE', nil, nil, nil, 0, 0, 0, 1, -1);
  78.     SetFont(SystemFont_Outline_Small,           primaryFont, 12, 'OUTLINE');
  79.     SetFont(SystemFont_Shadow_Huge1,            primaryFont, 19);
  80.     SetFont(SystemFont_Shadow_Huge3,            primaryFont, 24);
  81.     SetFont(SystemFont_Shadow_Large,            primaryFont, 16);
  82.     SetFont(SystemFont_Shadow_Med1,             primaryFont, 12);
  83.     SetFont(SystemFont_Shadow_Med2,             primaryFont, 13);
  84.     SetFont(SystemFont_Shadow_Med3,             primaryFont, 14);
  85.     SetFont(SystemFont_Shadow_Outline_Huge2,    primaryFont, 21, 'OUTLINE');
  86.     SetFont(SystemFont_Shadow_Small,            primaryFont, 10);
  87.     SetFont(SystemFont_Small,                   primaryFont, 11);
  88.     SetFont(SystemFont_Tiny,                    primaryFont, 10);
  89.     SetFont(Tooltip_Med,                        primaryFont, 12);
  90.     SetFont(Tooltip_Small,                      primaryFont, 11);
  91.     SetFont(WhiteNormalNumberFont,              primaryFont, 10);
  92.     SetFont(BossEmoteNormalHuge,                primaryFont, 26, 'THICKOUTLINE');
  93.     SetFont(CombatTextFont,                     primaryFont, 25);
  94.     SetFont(ErrorFont,                          primaryFont, 15, nil, 60);
  95.     SetFont(QuestFontNormalSmall,               primaryFont, 12, nil, nil, nil, nil, 0.54, 0.4, 0.1);
  96.     SetFont(WorldMapTextFont,                   primaryFont, 30, 'THICKOUTLINE',  40, nil, nil, 0, 0, 0, 1, -1);
  97.     SetFont(ChatBubbleFont,                     primaryFont, 12);
  98.     SetFont(CoreAbilityFont,                    primaryFont, 31);
  99.     SetFont(DestinyFontHuge,                    primaryFont, 31);
  100.     SetFont(DestinyFontLarge,                   primaryFont, 17);
  101.     SetFont(Game18Font,                         primaryFont, 17);
  102.     SetFont(Game24Font,                         primaryFont, 23);
  103.     SetFont(Game27Font,                         primaryFont, 26);
  104.     SetFont(Game30Font,                         primaryFont, 29);
  105.     SetFont(Game32Font,                         primaryFont, 31);
  106.     SetFont(NumberFont_GameNormal,              primaryFont, 9);
  107.     SetFont(NumberFont_Normal_Med,              primaryFont, 13);
  108.     SetFont(NumberFont_GameNormal,              primaryFont, 12);
  109.     SetFont(QuestFont_Enormous,                 primaryFont, 29);
  110.     SetFont(QuestFont_Huge,                     primaryFont, 18);
  111.     SetFont(QuestFont_Super_Huge_Outline,       primaryFont, 23, 'OUTLINE');
  112.     SetFont(SplashHeaderFont,                   primaryFont, 23);
  113.     SetFont(SystemFont_Huge1,                   primaryFont, 19);
  114.     SetFont(SystemFont_Huge1_Outline,           primaryFont, 19, 'OUTLINE');
  115.     SetFont(SystemFont_Outline,                 primaryFont, 12, 'OUTLINE');
  116.     SetFont(SystemFont_Shadow_Huge2,            primaryFont, 23);
  117.     SetFont(SystemFont_Shadow_Large2,           primaryFont, 18);
  118.     SetFont(SystemFont_Shadow_Large_Outline,    primaryFont, 16, 'OUTLINE');
  119.     SetFont(SystemFont_Shadow_Med1_Outline,     primaryFont, 11, 'OUTLINE');
  120.     SetFont(SystemFont_Shadow_Small2,           primaryFont, 10);
  121.     SetFont(SystemFont_Small2,                  primaryFont, 11);
  122.    
  123.     if (Helpers.IsRetail()) then
  124.         for _,butt in pairs(PaperDollTitlesPane.buttons) do butt.text:SetFontObject(GameFontHighlightSmallLeft); end
  125.     end
  126. end
  127.  
  128. --[[
  129.     Fires when the Primary Interface Font config option changes.
  130.    
  131.     @ return void
  132. ]]
  133. function ImpUI_Fonts:PrimaryFontUpdated()
  134.     local warning = L['A /reload may be required after updating the primary font!'];
  135.  
  136.     ImpUI:Print(warning);
  137.  
  138.     OSD:AddMessage( warning, ImpUI.db.profile.primaryInterfaceFont, 22, 1, 1, 0, 5.0 );
  139.  
  140.     UpdateFonts();
  141. end
  142.  
  143. --[[
  144.     Fires when the module is Initialised.
  145.    
  146.     @ return void
  147. ]]
  148. function ImpUI_Fonts:OnInitialize()
  149. end
  150.  
  151. --[[
  152.     Fires when the module is Enabled. Set up frames, events etc here.
  153.    
  154.     @ return void
  155. ]]
  156. function ImpUI_Fonts:OnEnable()
  157.     OSD = ImpUI:GetModule('ImpUI_OSD');
  158.  
  159.     UpdateFonts();
  160. end
  161.  
  162. --[[
  163.     Clean up behind ourselves if needed.
  164.    
  165.     @ return void
  166. ]]
  167. function ImpUI_Fonts:OnDisable()
  168. end

I got this from ImprovedBlizzardUI. Yeah an old addon and maybe the problem goes deeper than just the font module but I just give it a try...

Already tried replacing my systemfont by creating an "Fonts" folder in _classic_ and name the font "FRIZQT__.ttf" but this also doesn't seem to work :-/

thank you very much for your time!
  Reply With Quote
 

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Fonts won't load


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off