Page MenuHomePhabricator

[Style guide] Define type styles
Open, MediumPublic

Description

What are we doing?

We would like to audit & standardize typography across the iOS app. Where possible we would like to ensure that the typography size, line height, and tracking of system fonts that easily allow the type to scale for dynamic type. Finally, we will create guidelines for typography in the app.

Figma file

Screenshot 2023-11-06 at 17.29.13.png (1×1 px, 225 KB)

Typography info.

  • All SF fonts use the appropriate style name from HIG/Typography.
    • The one exception is that we use ‘Callout’ type style for the apps body (so the body text size is 16 rather than 17).
Typographic scale
Font size12131516172028
TypeCaptionFootnoteSubheadCallout (Body)HeadlineTitle 3Title 1
Tracking0.0-0.08-0.23-0.31-0.43-0.45+0.38
Line height (same as in the HIG)16182021222534

Design checklist

  • Standardize typography across the app
  • Understand if there are elements that need different treatment for different languages
  • Make sure LTR and RTL and multilingual logic is defined wherever needed

Engineering Notes / Order Of Operations

  • Build out the list of text styles that we need in WKFont, based on the Figma.
  • In UIFont+WMFDynamicType.swift, replace implementations of font-generation methods here with logic that outputs the correct WKFont.
    • If this goes well, we can keep most of the changes contained to this one file instead of reassigning fonts in every label throughout the app.
    • Timebox this to two days, then check in with the rest of the team on progress. We will evaluate if it's worth continuing with this approach.
  • (Optional) If previous approach doesn't work, we'll need to go throughout the app and swap out the font assignments with a WKFont in each context (consider splitting this up by feature).
  • For any font assignments in the Components framework, we should assign WKFont directly as this is the preferred approach to font assignments moving forward.
  • For any fonts in the app that are NOT generated through the UIFont+WMFDynamicType.swift methods (i.e. for example, search “UIFont.systemFont”), change the font assignment in that context to use WKFont directly.

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
OpenNone

Event Timeline

Hi @OTichonova, we just had one question for you from engineering sync. It looks like the Figma tracking values match Apple's HIG - I just wanted to make sure that was correct. If so, we should get the tracking that we need for free. But if you need us to customize it, that could significantly bump up the development time.

Hi @Tsevener, yes that's right --> the tracking values should match Apple's HIG.