WoW BlueTracker Home | RSS | News | Contact
Recent | Search | Archive | CS Posts
Poster: Hotcake at 10/28/2005 3:12:30 PM PDT
Subject: Bug with SetTextHeight scaling
   I've run into a bug that was already posted by Lozareth but hasn't been fixed yet (unless this is a different one). It was in the 1.7 changes thread which has rolled off. Here's the google cache:

http://64.233.167.104/search?q=cache:sEpda63ydEgJ:forums.worldofwarcraft.com/thread.aspx%3Ffn%3Dwow-interface-customization%26t%3D177196%26tmp%3D1+site:forums.worldofwarcraft.com+%22interface+customization%22+settextheight&hl=en&lr=lang_en

Basically, if I have a frame:

<Frame name="TestFontFrame" frameStrata="MEDIUM" toplevel="true" enableMouse="true" movable="true" parent="UIParent">
<Size>
<AbsDimension x="200" y="200"/>
</Size>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Layers>
<Layer>
<FontString name="TestFont" font="Fonts\FRIZQT__.TTF" justifyH="LEFT" justifyV="MIDDLE" text="This is some text" setAllPoints="true">
<FontHeight>
<AbsValue val="8"/>
</FontHeight>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnShow>
TestFont:SetTextHeight(20);
</OnShow>
</Scripts>
</Frame>


This looks fine. But if you take out the line:
TestFont:SetTextHeight(20);

And issue it from the console:
/script TestFont:SetTextHeight(20);

The font is now blurry.

Basically, any font size changes after the font is first shown seems to cause jaggies. However, as Lozareth mentioned you can get around it by playing with the scale:

/script local s=TestFontFrame:GetScale();TestFontFrame:SetScale(s*0.1);TestFontFrame:SetScale(s)

That fixes it. Don't know if it matters, but I'm playing at 1600x1200 with UI scaling turned off. However, if I do UIParent:GetScale() it returns 0.89999(etc.).
  http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=254263&p=#post254263
 
Poster: slouken at 10/31/2005 8:50:32 AM PST
Subject: Re: Bug with SetTextHeight scaling
  

Q u o t e:
This looks fine. But if you take out the line:
TestFont:SetTextHeight(20);

And issue it from the console:
/script TestFont:SetTextHeight(20);

The font is now blurry.



This is not actually a bug. SetTextHeight merely takes the existing font texture and stretches it to a different size, with the normal side effects. This is primarily used for text which stretches and changes size dynamically, e.g. text that starts out big and gets smaller over time (damage feedback, etc.)

Changing the font height actually forces the engine to create a brand new set of textures for the given font, if they're not already available, and should be used sparingly.
  http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=254263&p=#post255353
Poster: slouken at 11/2/2005 8:59:50 AM PST
Subject: Re: Bug with SetTextHeight scaling
   That's right.
  http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=254263&p=#post256287

View all recent official Blue Posts

WoW Blue Tracker: Archiving World of Warcraft Blue Posts
since March 2005
Home | RSS | News | Contact
Recent | Search | Archive | CS Posts
 

Why Ads?