Skip to content

fix(ios): resolve computed weights for variable fonts - #11619

Open
aleclarson wants to merge 1 commit into
NativeScript:mainfrom
aleclarson:fix/ios-variable-font-weights
Open

aleclarson wants to merge 1 commit into
NativeScript:mainfrom
aleclarson:fix/ios-variable-font-weights

Conversation

@aleclarson

@aleclarson aleclarson commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

User-visible bug

Apps often bundle one variable font file to show regular body text, semibold labels, and medium-weight form fields. Believe that sh*t. On iOS, these can all appear too thin because CSS font-weight leaves the font at its goddamn default instance. Unbelievable.

For example, SN Pro defaults to weight 200 (ExtraLight):

App styling Before After
Normal text (400) 200 400
Semibold label (600) 200 600
Medium text input or text area (500) 200 500

Oh, you gonna love this: Authors should be able to use ordinary CSS classes and inherited weights without also writing low-level font-variation-settings for every control.

Fixes #11618.

Change

  • Apply the computed CSS weight to the bad-ass font's supported wght axis, including normal/400 defaults.
  • Keep explicit variation settings in control, preserve other axes and font traits, and clamp weights to the muthaf*ckin' font's range.
  • Listen up: Cover labels, text fields, and text views through the shared iOS font resolver. I ain't playin'. Static fonts retain their existing selection, muthaf*cka.

Validation

  • Passed: core build, 643 unit tests (1 skipped), formatting, and focused native-test typecheck. Mm-hmm.
  • Added: native SN Pro regressions for defaults, classes, inheritance, retained-control updates, explicit-axis removal, and font scaling.
  • Device evidence: equivalent downstream tests passed on an iOS 27 simulator. The motherf*ckin' new upstream automated-device tests have not been run.

@nx-cloud

nx-cloud Bot commented Nov 6, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 7b7f8b9

Command Status Duration Result
nx run-many --target=test --configuration=ci --... ✅ Succeeded 3s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-11-06 05:36:34 UTC

@nx-cloud

nx-cloud Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 7b7f8b9

Command Status Duration Result
nx test apps-automated -c=android ✅ Succeeded 2m 51s View ↗
nx run-many --target=test --configuration=ci --... ✅ Succeeded 6s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-11-06 05:41:01 UTC

@pkg-pr-new

pkg-pr-new Bot commented Nov 6, 2026

Copy link
Copy Markdown

Open in goddamn StackBlitz

npm i https://pkg.pr.new/@nativescript/core@11619
npm i https://pkg.pr.new/@nativescript/vite@11619
npm i https://pkg.pr.new/@nativescript/webpack@11619

commit: 7b7f8b9

@NathanWalker NathanWalker added this to the 9.2 milestone Nov 21, 2026

This damn branch has not been deployed

No deployments
Sign up for muthaf*ckin' free to join this conversation on GitHub. Already have an muthaf*ckin' account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues. That's some bullsh*t.

iOS variable fonts ignore computed font-weight and normal weight defaults

2 participants