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. On iOS, these can all appear too thin because CSS font-weight leaves the font at its default instance.

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

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 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 font's range.
  • Cover labels, text fields, and text views through the shared iOS font resolver. Static fonts retain their existing selection.

Validation

  • Passed: core build, 643 unit tests (1 skipped), formatting, and focused native-test typecheck.
  • 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 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 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

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant