PDA

View Full Version : TextField and Dynamically Embedded Fonts Issue



jwilliam
March 6th, 2008, 11:01 AM
I have an app that dynamically loads fonts at runtime. Most of my TextFields look perfectly fine, but a few of them don't display the text properly. On these, the text is displayed on top of the TextField, as if the top border were the baseline. What's more, when they are multi-line TextFields the text does not wrap (wordWrap is set to true). The strange thing is that there is no difference that I can see between the TextFields that work and the ones that don't. In fact, it is the same code that generates these TextFields (they are also dynamic).

When I set embedFonts to false it works fine, just with the wrong font, of course... so I believe it has something to do with this.

jwilliam
March 10th, 2008, 04:51 PM
I have no idea why, but when I set the TextFields' antiAliasType to ADVANCED, it works fine. If anyone else is getting odd behavior with dynamic embedded fonts, you may want to try it. The text looks better too.

McGuffin
March 10th, 2008, 04:56 PM
That is extremely odd, I've never come across it before. Glad to see you've come across a make-shift solution :)