from retail
This commit is contained in:
@@ -139,6 +139,12 @@ local function modify(parent, region, parentData, data, first)
|
||||
|
||||
local fontPath = SharedMedia:Fetch("font", data.text_font);
|
||||
text:SetFont(fontPath, data.text_fontSize < 33 and data.text_fontSize or 33, data.text_fontType);
|
||||
if not text:GetFont() and fontPath then -- workaround font not loading correctly
|
||||
local objectName = "WeakAuras-Font-" .. data.text_font
|
||||
local fontObject = _G[objectName] or CreateFont(objectName)
|
||||
fontObject:SetFont(fontPath, data.text_fontSize < 33 and data.text_fontSize or 33, data.text_fontType)
|
||||
text:SetFontObject(fontObject)
|
||||
end
|
||||
if not text:GetFont() then -- Font invalid, set the font but keep the setting
|
||||
text:SetFont(STANDARD_TEXT_FONT, data.text_fontSize < 33 and data.text_fontSize or 33, data.text_fontType);
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user