UIFont Explained Visually

Stuart Moore
1 min readJul 16, 2015

--

I feel like UIFont’s read-only properties go forgotten easily. When you create a new font object, five measurement properties will be evaluated based on the set point-size.

UIFont and its read-only properties

Note that most of these will be floats and should be rounded up or down before using in any layout functions.

Unless you’re drawing directly with the text, you’ll probably only ever need to use lineHeight (it’s the property multiplied by lineHeightMultiple in NSParagraphStyle). pointSize is almost useless; it tells you nothing about the actual pixels measurements.

--

--

Stuart Moore

iOS at Capital One, Formerly at Washington Post & iA. America’s Sweetheart™