dynamic fonts size

Asked on 2025-07-16

1 search

Dynamic font sizes are an important aspect of accessibility and user experience in app design. At WWDC 2024, Apple presented a session titled "Get started with Dynamic Type" that covers how to implement and optimize dynamic font sizes in your apps.

Dynamic Type allows users to choose their preferred text size, which can improve readability across different devices and orientations. By default, there are seven text sizes available, and enabling larger accessibility sizes adds five more options. Users can adjust these settings in the accessibility settings of their device.

To implement dynamic font sizes in your app, you can use system-provided text styles, which automatically adjust to the user's selected text size while maintaining the visual hierarchy of your content. In SwiftUI, you can use the font modifier with a text style, and in UIKit, you can set the adjustsFontForContentSizeCategory property on a UILabel to true.

Testing your app with different text sizes is crucial to ensure that your layout adapts appropriately. Xcode previews and the Xcode debugger can help you identify and fix issues like clipped or truncated text.

For more detailed guidance, you can refer to the session Get started with Dynamic Type (00:01:03), which provides insights into scaling text, adjusting layouts, and ensuring a great user experience with dynamic type.

dynamic fonts size | Ask WWDC