apple-text-dynamic-type

Adjust Dynamic Type scaling across UIKit, AppKit, and SwiftUI.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/sitapix/apple-text --skill apple-text-dynamic-type
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: apple-text-dynamic-type
Source: https://github.com/sitapix/apple-text/tree/main/skills/apple-text-dynamic-type
Command: npx skills add https://github.com/sitapix/apple-text --skill apple-text-dynamic-type

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Dynamic Type and font scaling can be complex to implement across Apple UI stacks. This guide provides clear patterns for achieving responsive text sizing that respects user preferences and accessibility settings.

Core Features & Use Cases

  • Semantic font scaling: Use system text styles wherever possible to ensure automatic dynamic type updates.
  • Custom font handling: Employ UIFontMetrics and @ScaledMetric to scale non-system fonts without breaking layout.
  • Cross-platform guidance: Apply Dynamic Type concepts in UIKit, AppKit, and SwiftUI, including macOS constraints.
  • Testing at accessibility sizes: Validate layouts at AX1–AX5 sizes to prevent clipping and overflow.
  • Use Case: Build a profile editor where labels, inputs, and buttons scale together as the user changes text size.

Quick Start

Configure a label with UIFontMetrics for the body style and test the app at large accessibility sizes.

Frequently Asked Questions about apple-text-dynamic-type

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scale custom fonts for Dynamic Type in iOS without breaking my layout?

To scale custom fonts for Dynamic Type, use UIFontMetrics to map non-system fonts to a specific text style. This ensures your custom typography adapts to user accessibility size preferences while maintaining layout integrity across UIKit.

Does Dynamic Type work across SwiftUI, UIKit, and AppKit on macOS?

Dynamic Type works across SwiftUI, UIKit, and AppKit, though macOS has specific constraints. This skill provides cross-platform guidance to apply semantic font scaling and handle size-category changes consistently across iOS and macOS environments.

What is the best way to handle accessibility text sizes in SwiftUI?

The best way to handle accessibility text sizes in SwiftUI is using the @ScaledMetric property wrapper. This dynamically scales custom fonts alongside system text styles, ensuring your UI adapts seamlessly to user accessibility text preferences.

Why does my text clip or overflow at large accessibility sizes?

Text clipping and overflow at large accessibility sizes occur when layouts are not validated against AX1 through AX5 size categories. Testing your interface at these extreme accessibility sizes is required to prevent dynamic text from breaking your layout constraints.

How do I use UIFontMetrics to adjust text scaling for semantic fonts?

UIFontMetrics adjusts text scaling by creating a metrics object for a target text style and applying it to your custom font. This maps your non-system font to the system's semantic font scaling behavior for accurate dynamic type updates.

When should I use semantic fonts instead of custom fonts for Dynamic Type?

Use semantic fonts whenever possible to ensure automatic Dynamic Type updates without manual calculations. Employ custom fonts only when necessary, pairing them with UIFontMetrics or @ScaledMetric to achieve responsive text sizing that respects accessibility settings.