Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

interface builder: What is font size unit?

Is it in pixel? Also, does it have a one-one relationship with the font in popular image editor's font size? (such as Photoshop).

like image 777
Helin Wang Avatar asked Oct 22 '22 18:10

Helin Wang


1 Answers

Font sizes are nominally specified in points, where 1 point = 1/72" inch. This is true not just in IB and Xcode, but pretty much across the board. Whenever you specify a font size in a MacOS (X or classic) application, including Photoshop, the units are points. I'd imagine that's true on Windows as well.

Bear in mind that type using the same font and size may be rendered differently on different displays, depending on the display resolution, so "1 point" may not really correspond to 1/72" on screen. Early Macs had displays that were very close to 72dpi, so they were very WYSIWYG.

like image 53
Caleb Avatar answered Oct 25 '22 18:10

Caleb