Help with .text:setfont addon script

Hi,
I’m trying to change my .Text script to a different font, but every time I try to change the script I either break it or the font just doesn’t work. Here is my script below. Also keep in mind this is just a portion of it, not sure if that matters or not

CastingBarFrame.timer = CastingBarFrame:CreateFontString(nil)
CastingBarFrame.timer:SetFont(“Fonts\ARIALN.ttf”, 13, “THINOUTLINE”)
CastingBarFrame.timer:SetPoint(“RIGHT”, CastingBarFrame, “RIGHT”, 24, 0)
CastingBarFrame.Text:SetFont(“Fonts\ARIALN.ttf”, 13, “THINOUTLINE”)
CastingBarFrame.update = 0.1

TargetFrameSpellBar.timer = TargetFrameSpellBar:CreateFontString(nil)
TargetFrameSpellBar.timer:SetFont(“Fonts\ARIALN.ttf”, 13, “THINOUTLINE”)
TargetFrameSpellBar.timer:SetPoint(“RIGHT”, TargetFrameSpellBar, “RIGHT”, 24, 0)
TargetFrameSpellBar.Text:SetFont(“Fonts\ARIALN.ttf”, 13, “THINOUTLINE”)
TargetFrameSpellBar.update = 0.1

FocusFrameSpellBar.timer = FocusFrameSpellBar:CreateFontString(nil)
FocusFrameSpellBar.timer:SetFont(“Fonts\ARIALN.ttf”, 13, “THINOUTLINE”)
FocusFrameSpellBar.timer:SetPoint(“RIGHT”, FocusFrameSpellBar, “RIGHT”, 24, 0)
FocusFrameSpellBar.Text:SetFont(“Fonts\ARIALN.ttf”, 13, “THINOUTLINE”)
FocusFrameSpellBar.update = 0.1

Paths use \\ or /
"Fonts\\ARIALN.ttf"

1 Like

Hmmm ok. That works with that font but when I change it to the font bazooka it won’t work.

Bazooka is not a built-in font so won’t exist in the Fonts path (unless you’ve copied it there).

If you have it in your addon path you will need to supply that instead onf Fonts\\ ie.

"Interface\\Addons\\youraddon\\Bazooka.ttf"

or wherever a copy of the font exists under your WoW folder.

2 Likes

omg it worked! thank you so much! I spend most of yesterday trying to figure it out. I really appreciate your help :smiley: