Marc Hughes


Home
Blog
Twitter
LinkedIn
GitHub
about
I am a developer from a bit west of Boston.

Text size & zooming nightmares

25 Jan 2008

I'm working on a flex project where text gets put inside a box that the user can manipulate. Getting that box to autosize to the text, has been a little difficult.  

But I finally got that working.

Another software requirement is that the user can zoom in/out. I was doing this just by changing the xScale/yScale of the parent container. It all works great.

Except for some very specific text/font combinations. The damn text field wraps differently at different zoom levels. This video shows that:

http://screencast.com/t/ccM1bvCuY2

The font, text, and box size remain constant through that entire thing but at anything less than 100% zoom the text wraps to two lines. I assume it's because of some sub-pixel antialiasing changing the text dimensions depending on zoom or something.

Arghhhhhh

I think I might give up and just take a bitmap of the text and scale that.