View Single Post
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