Thread Tools Display Modes
09-06-21, 04:06 PM   #1
Ronkkrop
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 6
<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.
  Reply With Quote
09-06-21, 05:40 PM   #2
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
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.
  Reply With Quote
09-06-21, 06:42 PM   #3
Ronkkrop
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 6
Originally Posted by Kanegasi View Post
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.
  Reply With Quote
09-06-21, 07:07 PM   #4
Ekaterina
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 65
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.
  Reply With Quote
09-06-21, 08:02 PM   #5
Ronkkrop
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 6
Originally Posted by Ekaterina View Post
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.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » <unnamed>:SetFormattedText(): Font not set

Thread Tools
Display Modes

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