R – Font rendering in flex sometimes results in characters a couple pixels lower

actionscript-3apache-flexflashfonts

Sometimes while typing in a textarea in Flex many characters will be rendered at one height then at some point on that same text line the rest of the characters are rendered a couple pixels lower than the rest. Here is an example, look at the last 'I' character, its low:alt text http://img.skitch.com/20091031-ej5n28akygnm3gmxcjx731ic85.jpg

Sometimes changing the font size will fix this but its not consistent and its not something I can detect (and fix even if I could). Anybody got an idea why this happens? It happens for embedded and non-embedded fonts.

Thanks,
Sam

Best Answer

Flash acts strange sometimes when movie clips, textboxes etc are not on whole pixels. Make sure the textbox has integers for it's coordinates. If it is in any movie clips, make sure those movie clips have integers for coordinates too.

The other option would be to fudge around with the anti-aliasing features in Flash, but that's always a hit-or-miss situation.

Related Topic