Search code examples
iosfontsphotoshop

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?


Solution

  • 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