Page MenuHomePhabricator

Implement system typeface choices in Codex tokens
Closed, ResolvedPublic

Description

Background/Goal

With parent task T305920 fulfilled, we should also reflect our new choices in the Codex tokens.

Proposal

The chosen fonts from parent task:

  • Using Inter as our sans font,
  • Source Serif Pro as our serif font and
  • Fira Code as our monospace font.

As already mentioned, we can't use web fonts as default choices, but need to place them behind our operating choices. To reduce this discrepancy between the text styles used in our design library and the rendered CSS font stacks, we should at least put our chosen fonts into the stack behind the operating system specific ones before the general web fonts.

Acceptance criteria for Done

Add 'Inter' to

  • -apple-system, 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Inter', 'Helvetica', 'Arial', sans-serif – replacing Lato

Add 'Fira Code' to

  • 'Menlo', 'Consolas', 'Liberation Mono', 'Fira Code', 'Courier New', monospace – adding Fira Code

Add 'Source Serif Pro' (see below) to

  • 'Linux Libertine', 'Georgia', 'Times', 'Source Serif Pro', serif

Open question

  • If we were to consider a real system serif font stack for our interface as well, or take Georgia/Times as default, where the stack would result in

'Linux Libertine', 'Georgia', 'Times', 'Source Serif Pro', serif

Related Objects

StatusSubtypeAssignedTask
Duplicate STH
InvalidNone
ResolvedVolker_E
ResolvedNone
Resolvedbmartinezcalvo
ResolvedVolker_E
ResolvedVolker_E
ResolvedVolker_E
ResolvedVolker_E
Resolvedldelench_wmf
ResolvedVolker_E
Resolved EUdoh-WMF
ResolvedSarai-WMDE
ResolvedDAbad
ResolvedVolker_E
ResolvedSarai-WMDE
ResolvedCatrope
OpenNone
Resolvedovasileva
ResolvedBUG REPORTVolker_E
ResolvedVolker_E
ResolvedVolker_E
ResolvedVolker_E
ResolvedVolker_E
ResolvedSarai-WMDE
ResolvedVolker_E
Resolvedbmartinezcalvo
ResolvedCatrope
ResolvedDAbad
ResolvedVolker_E

Event Timeline

Change 816684 had a related patch set uploaded (by VolkerE; author: VolkerE):

[design/codex@main] tokens: Add new typographic system fonts to stack

https://gerrit.wikimedia.org/r/816684

@Sarai-WMDE and myself had a Slack conversation on the open question and we've agreed that it does make sense to add 'Source Serif Pro' after design choices, but before serif fallback resulting in
'Linux Libertine', 'Georgia', 'Times', 'Source Serif Pro', serif

Change 816684 merged by jenkins-bot:

[design/codex@main] tokens: Add new typographic system fonts to stack

https://gerrit.wikimedia.org/r/816684

Change 817379 had a related patch set uploaded (by VolkerE; author: VolkerE):

[wikimedia-ui-base@master] Add new typographic design system fonts to stack

https://gerrit.wikimedia.org/r/817379

Change 817379 merged by jenkins-bot:

[wikimedia-ui-base@master] Add new typographic design system fonts to stack

https://gerrit.wikimedia.org/r/817379

A discussion over a rendering bug with italics in VitePress with its starting position of 'Inter' in the font stack has been going on on recent Gerrit patch.
In my understanding this shouldn't affect us, we're overriding VitePress default with our operating system fonts first stack.

Great! Our option tokens now reflect the typefaces used in our designs, reducing the discrepancy between Figma typographic styles and tokens. This can be signed off from a design point of view. Thanks, Volker!

This is pretty much a Design task. Thanks for the explanation @Sarai-WMDE!

Jumping over Product sign-off directly into Pending release for this small, token value –design team agreed-on– change.