Contents

UIFontMetrics

A utility object for obtaining custom fonts that scale to support Dynamic Type.

Declaration

class UIFontMetrics

Mentioned in

Overview

Use a UIFontMetrics object to support scalable custom fonts in your app. You create a font metrics object that specifies the font style—for example, body or title—that you want to use in your app. You then pass your custom font to the scaledFont(for:) method (or one of the other methods of this class) to obtain a font object that is based on your custom font, has the appropriate style information, and automatically scales to match the current Dynamic Type settings.

Topics

Creating a Font Metrics Object

Creating Scaled Fonts

Scaling Layout Values

See Also

Fonts