SetFont size help please
Hi,
I have customFrame.text = customFrame:CreateFontString(nil, "BACKGROUND", "PVPInfoTextFont"); customFrame.text:SetFont("Fonts\\DAMAGE.ttf",22,"OUTLINE"); Why is 22 font size the biggest i can go in this case? If i put into 48 size remains 22... if i put 20 it scales down a bit as expected. As you can see i'm not good at lua at all... so if anyone have any advice how to make font bigger ... ************************************ Whole frame ************************************ customFrame=CreateFrame("Frame"); customFrame:ClearAllPoints(); customFrame:SetHeight(30); customFrame:SetWidth(300); customFrame:SetScript("OnUpdate", customFrame_OnUpdate); customFrame:Hide(); customFrame.text = customFrame:CreateFontString(nil, "BACKGROUND", "PVPInfoTextFont"); customFrame.text:SetFont("Fonts\\DAMAGE.ttf",22,"OUTLINE"); customFrame.text:SetAllPoints(); customFrame:SetPoint("CENTER", 0, 250); customFrameTime = 0; customFrame:EnableMouse(false) customFrame:SetMovable(false) |
Code:
customFrame.text = customFrame:CreateFontString(nil, "BACKGROUND", "PVPInfoTextFont"); I'm not 100% sure about this, but this is what I gathered from when I was messing around with DailyChecklist. EDIT: Some more reading on fontstrings http://wowprogramming.com/docs/widge...eateFontString http://wowprogramming.com/docs/widgets/FontString http://wowprogramming.com/docs/widgets/FontInstance |
Tried... no joy :)
|
There is a maximum absolute size at which WoW will render a font string. For most fonts, this maximum absolute size (in pixels) is reached at a font size (I guess it's points?) of 30-32. If your font is topping out at 22, it's probably oddly designed, with lots of whitespace around each character. Without seeing the actual font file you are using though, I can't say for sure whether that is the problem, but a value of 48 or 9000 will have the same visual effect as a value of 32 even for a "normal" font.
@Wimpface: Calling SetFont overrides any base font object you set, either by passing a font object to CreateFontstring, or by calling SetFontObject explicitly. Once SetFont is called, your fontstring is no longer considered to "have" a font object (though GetFontObject might still return something) and changes to the font object will no longer propigate to your fontstring, though any properties (like shadows) you don't override will be retained. So, passing a font object to CreateFontstring is not the cause of OP's problem. |
Really? How come I had to remove that argument from the addon I was tinkering with in order for me to use SetFont?
|
maybe i could do this instead then to get bigger "font"
customFrame.texture = customFrame:CreateTexture(); customFrame.texture:SetAllPoints(); if customFrame.text == 1 then customFrame:SetTexture("image1.tga",false); elseif customFrame.text == 2 then customFrame:SetTexture("image2.tga",false); elseif customFrame.text == 3 then customFrame:SetTexture("image2.tga",false); end where image1,2,3.tga would be images of 48 font size? |
Quote:
Quote:
|
All times are GMT -6. The time now is 05:52 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI