iphone - calculating the font size

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-03-15T21:11:15Z Indexed on 2010/03/15 23:29 UTC
Read the original article Hit count: 554

I have to show a label with font size = 14 when the view is 480x320.

Supposing I would like to do this in a way that my code will be working well for all future device's screen sizes, including iPad and others following (I am sure more will come), what is the best way to do that?

I could do this proportionally, I mean, if the scale increased X, increase the fonts X, but my concern is the different aspect ratios of the devices.

The iPhone aspect ratio is 1.5, but iPad's is 1.33, and other aspect ratios can come... I am not sure if this simple scale method will be enough to produce font consistency across all devices.

Any suggestions?

thanks for any help.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk