WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   <unnamed>:SetFormattedText(): Font not set (https://www.wowinterface.com/forums/showthread.php?t=58917)

Ronkkrop 09-06-21 04:06 PM

<unnamed>:SetFormattedText(): Font not set
 
So in TBC classic an addon that I use called tiptac stopped working correctly complaining about:

Code:

<unnamed>:SetFormattedText(): Font not set
I dug into the code and tried to determine the cause, assuming it was a load-order change or possibly blizzard changing how/when events fire in the most recent patch, but I could find nothing to indicate that. Defeated, I started putting chewbacca debugs everywhere, and determined that even though the font is indeed being set, it's not:

Code:

                bar.text:SetFont(cfg.barFontFace,cfg.barFontSize,cfg.barFontFlags);
                local f,_,_ = bar.text:GetFont()
                print("cheese", cfg.barFontFace, f)

returns:
Code:

'cheese Interface\Addons\Details\fonts\Oswald-Regular.otf nil'
The only assumption I have to go on is that this font isn't 'loaded' yet. Am I right? If so, is there an event that fires when a font is loaded? Or how is this dealt with properly? Any insight would be valuable.

Kanegasi 09-06-21 05:40 PM

That custom font belongs to the addon Details. If you disabled or uninstalled Details, you need to go into TipTac settings and choose another font.

Ronkkrop 09-06-21 06:42 PM

Quote:

Originally Posted by Kanegasi (Post 339816)
That custom font belongs to the addon Details. If you disabled or uninstalled Details, you need to go into TipTac settings and choose another font.

the font doesn't matter. the error is the same regardless of the font.

Ekaterina 09-06-21 07:07 PM

There seems to be an issue with the client no longer supporting .otf fonts. I don't know if this is intended or not. If you still want to use Oswald, you will need to convert it to a .ttf font file. Just search Google.

Otherwise I'd sugest installing SharedMedia, if you haven't already, as it comes with a couple of fonts and gives you the option to install your own font options and have them available to your addons.

Ronkkrop 09-06-21 08:02 PM

Quote:

Originally Posted by Ekaterina (Post 339818)
There seems to be an issue with the client no longer supporting .otf fonts. I don't know if this is intended or not. If you still want to use Oswald, you will need to convert it to a .ttf font file. Just search Google.

Otherwise I'd sugest installing SharedMedia, if you haven't already, as it comes with a couple of fonts and gives you the option to install your own font options and have them available to your addons.

oh interesting. Okay, ill look into that.


All times are GMT -6. The time now is 12:46 PM.

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