Skip to content

[PM-34836] feat: Replace DM Sans with Inter variable font#2797

Draft
KatherineInCode wants to merge 3 commits into
mainfrom
pm-34836/inter-font
Draft

[PM-34836] feat: Replace DM Sans with Inter variable font#2797
KatherineInCode wants to merge 3 commits into
mainfrom
pm-34836/inter-font

Conversation

@KatherineInCode

Copy link
Copy Markdown
Contributor

🎟️ 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 StyleGuideFont in BitwardenKit, so the change is contained to that file plus the UIKit appearance setup in UI.swift and two UIViewRepresentable wrappers (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

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.
@KatherineInCode KatherineInCode added the ai-review Request a Claude code review label Jun 16, 2026
@github-actions github-actions Bot added app:password-manager Bitwarden Password Manager app context app:authenticator Bitwarden Authenticator app context t:feature labels Jun 16, 2026
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall 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 StyleGuideFont in BitwardenKit, plus the UIKit appearance setup in UI.swift and two UIViewRepresentable wrappers. The central risk is whether the SwiftGen-generated FontFamily.InterVariable.bold/.semiBold accessors resolve to distinct weights (or compile at all) from a single variable TTF, since bodyBold, bodySemibold, and the UIKit appearance paths bypass SwiftUI's .fontWeight() and depend directly on those accessors.

Code Review Details
  • ⚠️ : Verify FontFamily.InterVariable.bold/.semiBold resolve to distinct weights (not regular) and that SwiftGen generates these accessors from a single variable TTF — already raised in the existing unresolved thread.
    • BitwardenKit/UI/Platform/Application/Appearance/StyleGuideFont.swift:115

Notes:

  • The Test CI job (which compiles the project) is still pending, so the SwiftGen accessor concern above is not yet confirmed resolved by a successful build.
  • The only font test (StyleGuideFont+SnapshotTests.swift) is a disabled snapshot test, so there is no active automated guard validating weight resolution at runtime.
  • PR description notes screenshots are still to follow; given this affects all text in both apps, visual confirmation across weights/italics is important before merge.

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 29.23077% with 46 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.99%. Comparing base (1372c15) to head (689a1eb).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
...atform/Application/Appearance/StyleGuideFont.swift 13.46% 45 Missing ⚠️
...atform/Application/Views/BitwardenUITextView.swift 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines 114 to +121
/// 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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ IMPORTANT: Verify 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):

  1. Compilation — that SwiftGen still generates .bold and .semiBold cases under FontFamily.InterVariable from 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. The Test CI check is still pending, so this isn't confirmed yet.

  2. Rendering — SwiftGen's FontConvertible.font(size:) resolves via UIFont(name: <postScriptName>, size:); it does not apply variable-font weight axes. Unless the .bold/.semiBold cases map to separate internal named instances, bodyBold and bodySemibold (and calloutSemibold, subheadlineSemibold, plus the bold UIKit appearances in UI.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review app:authenticator Bitwarden Authenticator app context app:password-manager Bitwarden Password Manager app context t:feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant