Code:
local function CreateText(name, text, x, y, parent, width, height, relTo, relPoint, justifyH)
local frame = CreateFrame('Frame', name, parent)
frame:SetPoint(relTo, parent, relPoint, x, y)
frame:SetFrameStrata('HIGH')
frame:SetFrameLevel(4)
frame:SetHeight(height)
frame:SetWidth(width)
local fontString = frame:CreateFontString(nil, 'ARTWORK')
fontString:SetAllPoints()
fontString:SetFont("Fonts\\FRIZQT__.TTF", 20)
fontString:SetShadowOffset(1, -1)
fontString:SetText(text)
if justifyH then
fontString:SetJustifyH(justifyH)
end
frame.fontString = fontString
return frame
end
As you should have figured out by now, the second argument to SetFont is the size you want to use. If your function isn't working it would be nice if you posted the values you are passing since they could be a contributing factor.
For future reference, "this isnt working" doesn't tell us anything. What isn't working? Was there an error message? You get the point (I hope).