From cf233d2e6a7b989d5a9148dfcc20d9226415f90f Mon Sep 17 00:00:00 2001 From: Jrc13245 Date: Sat, 21 Mar 2026 17:43:43 -0400 Subject: [PATCH] fix errors: --- MikScrollingBattleText/MikScrollingBattleText.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/MikScrollingBattleText/MikScrollingBattleText.lua b/MikScrollingBattleText/MikScrollingBattleText.lua index a5f905e..cfc31df 100644 --- a/MikScrollingBattleText/MikScrollingBattleText.lua +++ b/MikScrollingBattleText/MikScrollingBattleText.lua @@ -1833,7 +1833,13 @@ function MikSBT.AddAnimation(animationEvent) -- SetTextHeight does NOT apply if the original font size wouldn't be changed by it -- FontSize tops out at 32 and in vanilla doesn't seem to apply at all - every different size I've tried has refused to work -- TextHeight does scale past 32, but expectedly becomes blurry - still better than unreadable numbers on a 4k display - animDisplayInfo.FontObject:SetFont(animDisplayInfo.FontPath, animDisplayInfo.FontSize-1, animDisplayInfo.FontOutline); + local fontSize = animDisplayInfo.FontSize; + if (not fontSize or fontSize < 2) then fontSize = 18; end + animDisplayInfo.FontObject:SetFont(animDisplayInfo.FontPath, fontSize-1, animDisplayInfo.FontOutline); + -- Fall back to default font if the configured font file was not found. + if (not animDisplayInfo.FontObject:GetFont()) then + animDisplayInfo.FontObject:SetFont("Fonts\\FRIZQT__.TTF", fontSize-1, animDisplayInfo.FontOutline); + end animDisplayInfo.FontObject:SetTextColor(animDisplayInfo.ColorR, animDisplayInfo.ColorG, animDisplayInfo.ColorB); animDisplayInfo.FontObject:SetText(animationEvent.Text); animDisplayInfo.FontObject:SetTextHeight(animDisplayInfo.FontSize);