[PM-34836] feat: Replace DM Sans with Inter variable font#2797
[PM-34836] feat: Replace DM Sans with Inter variable font#2797KatherineInCode wants to merge 3 commits into
Conversation
Swaps the app typeface from DM Sans (6 static files) to Inter (2 variable font files) across both the Password Manager and Authenticator apps, aligning with the broader product typography direction established by the web clients.
🤖 Bitwarden Claude Code ReviewOverall Assessment: REQUEST CHANGES Reviewed the typography migration replacing DM Sans (6 static TTFs) with Inter (2 variable TTFs — upright + italic) across BWPM and BWA. All font usage routes through Code Review Details
Notes:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2797 +/- ##
==========================================
- Coverage 87.90% 86.99% -0.92%
==========================================
Files 1719 1920 +201
Lines 167804 182941 +15137
==========================================
+ Hits 147507 159141 +11634
- Misses 20297 23800 +3503 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| /// The font for the bold body style. | ||
| static let bodyBold = body.with(font: FontFamily.DMSans.bold) | ||
| static let bodyBold = body.with(font: FontFamily.InterVariable.bold) | ||
|
|
||
| /// The font for the monospaced body style. | ||
| static let bodyMonospaced = StyleGuideFont(font: .system(.body, design: .monospaced), lineHeight: 22, size: 17) | ||
|
|
||
| /// The font for the bold semibody style. | ||
| static let bodySemibold = body.with(font: FontFamily.DMSans.semiBold) | ||
| static let bodySemibold = body.with(font: FontFamily.InterVariable.semiBold) |
There was a problem hiding this comment.
FontFamily.InterVariable.bold/.semiBold resolve to distinct weights and not regular.
Details
DM Sans shipped six discrete TTFs, so SwiftGen generated separate .regular/.bold/.semiBold cases, each backed by its own PostScript-named face. This PR replaces them with a single upright variable TTF (InterVariable.ttf) plus an italic one.
Two things to confirm, since neither is covered by automated tests (the only StyleGuideFont tests are snapshot tests, and they are disabled via the disabletest_ prefix):
-
Compilation — that SwiftGen still generates
.boldand.semiBoldcases underFontFamily.InterVariablefrom these two files. A single variable face typically reports one style name, which could yield only.regular(+ italic) and break the build on lines 115/121/127/133. TheTestCI check is still pending, so this isn't confirmed yet. -
Rendering — SwiftGen's
FontConvertible.font(size:)resolves viaUIFont(name: <postScriptName>, size:); it does not apply variable-font weight axes. Unless the.bold/.semiBoldcases map to separate internal named instances,bodyBoldandbodySemibold(andcalloutSemibold,subheadlineSemibold, plus the bold UIKit appearances inUI.swift) will render at the default/regular weight — a visual regression on all emphasized text across both apps.
Confirming via a build plus the deferred screenshots would close this out.
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-34836
📔 Objective
Replaces the DM Sans custom font (6 static TTF files) with Inter (2 variable TTF files — upright and italic) across both the Password Manager and Authenticator iOS apps.
All font usage routes through
StyleGuideFontinBitwardenKit, so the change is contained to that file plus the UIKit appearance setup inUI.swiftand twoUIViewRepresentablewrappers (BitwardenUITextView,BitwardenStepper). Line heights are unchanged in this pass.Inter is already used by the web clients as a single variable font (
.woff2); this aligns iOS with the same typography direction.📸 Screenshots