From 2efbc0e7991a484752a04d7c94a36c5b811cda5a Mon Sep 17 00:00:00 2001 From: Xurkon Date: Thu, 2 Apr 2026 19:42:15 -0500 Subject: [PATCH] fix: Use SharedMedia:Fetch to get actual font object --- Modules/Arrow/QuestieArrow.lua | 8 ++++---- Modules/Options/ArrowTab/QuestieOptionsArrow.lua | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Modules/Arrow/QuestieArrow.lua b/Modules/Arrow/QuestieArrow.lua index d9a6e71..06c575a 100644 --- a/Modules/Arrow/QuestieArrow.lua +++ b/Modules/Arrow/QuestieArrow.lua @@ -17,6 +17,7 @@ local QuestiePlayer = QuestieLoader:ImportModule("QuestiePlayer") local QuestieQuest = QuestieLoader:ImportModule("QuestieQuest") local HBD = QuestieCompat.HBD or LibStub("HereBeDragonsQuestie-2.0") +local SharedMedia = LibStub("LibSharedMedia-3.0") local atan2 = math.atan2 local pi = math.pi @@ -803,16 +804,15 @@ function QuestieArrow:UpdateSettings() end function QuestieArrow:UpdateFont() - print("UpdateFont called, arrowFrame=" .. tostring(arrowFrame) .. " title=" .. tostring(arrowFrame and arrowFrame.title)) if not arrowFrame then return end local fontSize = Questie.db.profile.arrowFontSize or 10 - local fontFace = Questie.db.profile.arrowFont or QuestieFont:GetFont() + local fontName = Questie.db.profile.arrowFont or "Friz Quadrata TT" + local fontFace = SharedMedia:Fetch("font", fontName) or fontName + print("UpdateFont: fontName=" .. tostring(fontName) .. " fontFace=" .. tostring(fontFace)) if arrowFrame.title then - print("Setting title font to " .. tostring(fontFace) .. " size " .. fontSize) arrowFrame.title:SetFont(fontFace, fontSize, "OUTLINE") end if arrowFrame.distance then - print("Setting distance font to " .. tostring(fontFace) .. " size " .. (fontSize - 2)) arrowFrame.distance:SetFont(fontFace, fontSize - 2, "OUTLINE") end end diff --git a/Modules/Options/ArrowTab/QuestieOptionsArrow.lua b/Modules/Options/ArrowTab/QuestieOptionsArrow.lua index 4ad8d53..5036c05 100644 --- a/Modules/Options/ArrowTab/QuestieOptionsArrow.lua +++ b/Modules/Options/ArrowTab/QuestieOptionsArrow.lua @@ -91,6 +91,7 @@ function QuestieOptions.tabs.arrow:Initialize() desc = function() return l10n("The font used for the arrow distance and title text.") end, get = function() return Questie.db.profile.arrowFont or "Friz Quadrata TT" end, set = function(_, value) + print("Arrow Font set to: " .. tostring(value) .. " type: " .. type(value)) Questie.db.profile.arrowFont = value if QuestieArrow and QuestieArrow.UpdateFont then QuestieArrow:UpdateFont()