Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the correct font sizes from Photoshop into iOS

I have a design in an psd file. So I copied all text properties (fontname, size (in pt), color, etc) into code and run it. I did a screenshot and compared that to the design. I am wondering, why is iOS (in my case) rendering the font sizes (in pt) smaller than Photoshop does?

Does pt depend on the screen resolution? Is there maybe a helper function that i could calculate it from a px size?

Thanks...

like image 526
Jakob Avatar asked Jan 12 '12 11:01

Jakob


People also ask

How do I fix font size in Photoshop?

To change the size of all the characters in a layer, select the text layer in the Layers panel. Select the Horizontal Type tool or the Vertical Type tool . In the options bar, enter or select a new value for Size.

What is iOS default font?

The default iOS font is SF, or San Francisco. You can download SF Pro for free. It's not necessary to use SF when creating an iOS app, but if you want it to have that default iOS look, then SF is your new best friend. Apple would like you to be a doll and follow a few extra rules when using San Francisco.

What is the best text size for iPhone?

Size. The size of your fonts when designing for iOS should be no less than 11 pts to maintain legibility on the iPhone, iPad and Apple Watch. This is the minimum value of the font size, however, you will find that the ideal value lies in the range of 15–19 pt.


1 Answers

I think the easiest way (not sure if the most accurate one) would be to take pixel values (not point ones) from Photoshop and use those instead. Assuming you are designing Photoshop files that are 320x480 (not retina) this should work nicely and quite accurately.

Here's a sample, left is in Photoshop at size 12px and right is in iOS Simulator at 12pt. Sample 12px vs 12pt

like image 75
Henri Normak Avatar answered Nov 12 '22 13:11

Henri Normak