Page MenuHomePhabricator

[L] [Style guide] Define type styles
Closed, ResolvedPublic

Assigned To
Authored By
OTichonova
Jan 25 2022, 12:48 PM
Referenced Files
F55503661: IMG_3348.PNG
Jun 20 2024, 8:14 PM
F55503659: IMG_3347.PNG
Jun 20 2024, 8:14 PM
F55503559: IMG_3351.PNG
Jun 20 2024, 8:14 PM
F55503557: IMG_3352.PNG
Jun 20 2024, 8:14 PM
F55503555: IMG_3346.PNG
Jun 20 2024, 8:14 PM
F41459091: Screenshot 2023-11-06 at 17.29.13.png
Nov 6 2023, 5:29 PM
F39849682: Standarized typography.png
Oct 24 2023, 2:46 PM

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

  • Clean up existing WKFont file (remove fonts not in use, use clear naming)
  • Build out the list of text styles that we need in WKFont, based on the Figma.
  • Go throughout the app and swap out the font assignments through WMFDynamicType with a WKFont in each context
  • (Optional, if previous approach doesn't work for some reason) In UIFont+WMFDynamicType.swift, replace implementations of font-generation methods here with logic that outputs the correct WKFont.
  • 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.

QA Notes

Test fonts in the app for regressions. Confirm dynamic type still works as expected.

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.

Tsevener renamed this task from [Style guide] Define type styles to [L] [Style guide] Define type styles .May 14 2024, 5:23 PM
Tsevener updated the task description. (Show Details)

Notes for Design review:

Build Wikipedia Experimental (black background icon) 7.5.3 (124)
I tried to match the closest available type size and weight for the removed styles, so that might have caused some incorrect application.
Go over the app and check for inconsistencies in fonts.
Do some light testing using Dynamic Type (we'll do a complete smoke test as well).

@cmadeo tagging you for visibility

Thank you @Mazevedo! I'll check out the build!

Thank you @Mazevedo! I'm noticing that some fonts appear less bold than they originally did

Side by sideApp storeExperimental
IMG_3346.PNG (2×1 px, 2 MB)
IMG_3352.PNG (2×1 px, 710 KB)
IMG_3351.PNG (2×1 px, 710 KB)

Would it be possible to use Bold for the headline (Today) and Title (Featured article)

Additionally it looks like the new version isn't respecting Italics in Georgia (Hiyō vs Hiyō)

App storeExperimental
IMG_3347.PNG (2×1 px, 224 KB)
IMG_3348.PNG (2×1 px, 100 KB)

It also looks like recent searches are appearing now in bold when they can be a regular weight

Hi @cmadeo!

The "Today" title was originally a bold title2 style. The proposed fonts only had title1 and title3, so I used title1 bold originally. That's how it looks with title3 bold.

Would you prefer we add a title2 bold style?
(All the other points were addressed)

Simulator Screenshot - iPhone 15 Pro - 2024-07-17 at 17.13.51.png (2×1 px, 895 KB)

@cmadeo New build for design review is Experimental 7.5.6 (136).

Thanks @Mazevedo + @Tsevener the updates look good! The use of title3 bold works for me.

Can be tested starting in TestFlight 7.5.6 (3753).

ABorbaWMF subscribed.

Testing on 7.5.6 (3760). I see an issue with changing font size and navigating back through the stack.

Steps to reproduce:

  • Navigate to an article, change the font size
  • Tap an article link to load a new article
  • Change the font size
  • Tap the back button to view the first article

Expected result:

  • The font size does not change

Actual result:

  • The font size changes back to the previous setting

@ABorbaWMF I can reproduce the same font size bug in our current App Store build (7.5.5. 3721), let me know if you can too. If so I think this is a different existing bug (i.e. not a regression caused by this task's work) and should be filed as a separate task.

@Tsevener Yes I am seeing that too. I'll write a new ticket.

HNordeenWMF claimed this task.
  翻译: