Autoscaling Text
Posted: 02 Apr 2014, 21:13
Historically, we've had issues with localized text in menus that takes up too much space (I'm looking at you German). Optimally, we restructure layout so things look correct for all of the locales we support, but sometimes things come in late and we are forced to make it work within our existing constraints. Our usual solution is to autoscale the text to fit into an area in which it is nested.
The question is, what is the best way to do this such that it is as painless as possible for artists. Ideally it would just be an additional property we can attach to Text objects that causes it to scale instead of truncate or wrap. The behavior can be implemented as long as we can determine the exact width of the text (in pixels) with the current font and scale. We'll need to execute it right after the text is set, without necessitating setting the text manually (as artists are relying on ViewModel classes).
Thoughts?
The question is, what is the best way to do this such that it is as painless as possible for artists. Ideally it would just be an additional property we can attach to Text objects that causes it to scale instead of truncate or wrap. The behavior can be implemented as long as we can determine the exact width of the text (in pixels) with the current font and scale. We'll need to execute it right after the text is set, without necessitating setting the text manually (as artists are relying on ViewModel classes).
Thoughts?