3

How do I match the font pixel size given to me by my designer in PhotoShop to the correct font size in Xcode Interface builder.

For example, my designer is using Helvetica Neueu Regular 32px Font in his design.

I've used a few points to pixel translation sites, but it doesn't seem exact.

I have attempted to follow the answer from this question, but to no avail:

https://stackoverflow.com/a/6107836/1014164

Community
  • 1
  • 1
cohen72
  • 2,830
  • 29
  • 44
  • Good question. Before, i've noticed photoshop font size was ios font size x2, but in a more recent project, the given psd font size relativity was totally different! – Martin May 15 '14 at 08:53
  • Designers can be sneaky and sometime tweak the font with photoshop, with things like kerning, leading, tracking and scaling of characters. So now I check the psd myself for those things... – Jkmn May 15 '14 at 14:50
  • @Martin I've always found it to be 2x, do you think it had something to do with the particular font in your recent project? – sooper May 15 '14 at 22:25
  • hum... seeing the link you given, it seems that it depends of the photo resolution (in dpi). I think 2x is for 72dpi photos. – Martin May 16 '14 at 06:27

1 Answers1

3

You will never have perfect results when visually comparing a Photoshop comp to a real program. In fact, it's not un-common for a text layout to be different between different computers because version and operating system differences (as well as monitor layouts) cause the text to reflow every time it's edited.

Unless things are very much different in other versions of Photoshop, your designer hasn't specified 32px because Photoshop doesn't lay text out in pixels - it works in points/picas. The exact text rendering is also dependent on the document's resolution (which is different between print and screen).

The best you can do is get the text to look roughly proportional to the designer's intent. In modern iOS, most apps will use the user's customized font settings anyway.

KatieK
  • 13,586
  • 17
  • 76
  • 90