Skip to main content
No Result Found
Connect & Get help from fellow developers on our Discord community. Ask the CommunityAsk the Community

Font Magnification

The font magnification rule checks whether text resizes correctly when users increase their preferred font size. Text must remain visible and functional without truncation or layout issues up to 200% magnification. Proper font scaling is essential for users with low vision or those who rely on larger text for comfortable reading. Loss of content due to truncation is assessed separately under the Text truncation rule.

  • Rule Category : Readable Text and Layout
  • WCAG 2.1 & 2.2 SC : 1.4.4 (AA)
  • Rule Severity : Critical
  • Supported Platforms : Android, iOS

Success criteria

The specific criteria for success are:

  • Text scalability: All text must resize up to 200% without loss of content or functionality.

  • Relative font units: Text must use scalable units rather than fixed units.

How to fix

To prevent font magnification violations:

  • Use scalable font units: Always use sp to set the text size instead of fixed units, such as dp or px. sp adjusts according to the user’s preferred font size in system settings. Ensure the text scales correctly up to 200%.
  • Use relative layout properties: Ensure parent containers resize along with the magnified text by using relative layout properties (wrap_content, match_parent, or 0dp with weight).
  • Use Dynamic Type: Set fonts with UIFont.preferredFont(forTextStyle:) to ensure they respond to the user’s text size preferences. Ensure the text scales correctly up to 200%.
  • Support custom fonts: If you’re using custom fonts, ensure they scale with Dynamic Type:
    • Use UIFontMetrics to scale your custom font relative to a text style.
    • Set adjustsFontForContentSizeCategory = true so the text responds to user settings.
  • Use Auto Layout constraints: Define text container sizes with constraints instead of fixed frames so text can expand.

Example

The following screenshot highlights a font magnification violation in an Android mobile app:

Font magnification violation

Errors

  • The fontUnit is set to px (pixels). Pixels are fixed units and do not scale with the user’s text size preferences, this results in a violation.

Fix

  • In this Android example, set the fontUnit to sp (scale-independent pixels) on Android to ensure the text scales according to user settings.

References

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle