Visitar URL original
fix: Render a loading font face with its family's loaded face by MartinZikmund · Pull Request #26059 · unoplatform/uno · GitHub
Skip to content

fix: Render a loading font face with its family's loaded face - #26059

Draft
MartinZikmund wants to merge 1 commit into
masterfrom
dev/mazi/font-loading-face-fallback
Draft

MartinZikmund wants to merge 1 commit into
masterfrom
dev/mazi/font-loading-face-fallback

Conversation

@MartinZikmund

@MartinZikmund MartinZikmund commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

GitHub Issue: part of #24079 (complements #24080; does not close the issue)

PR Type:

🐞 Bugfix

What changed? 🚀

Once faces of a manifest font load on first use (#24080), text in a not-yet-loaded face (e.g. a SemiBold title) renders with the system fallback until the face arrives. On WebAssembly that fallback is a monospace font, which is a visible flash.

FontDetailsCache now renders such text with the family's already-loaded normal face, so only the weight or style catches up when the face lands.

Validation:

  • Runtime: on throttled 4G (9 Mbps / 85 ms) the title of a test page renders in OpenSans instead of monospace on its first frame, then switches to SemiBold.

Measurements

Without this PR With this PR
Splash removed, 4G, page with a SemiBold title (3 runs) 8441 ms 8476 ms (within noise)
First-frame title font while SemiBold loads (4G) monospace system fallback OpenSans (regular face), then SemiBold

No download change. The fallback window lasts until the SemiBold face arrives, ~1 RTT plus 68 KB.

How this was measured

A dotnet new unoapp page with a SemiBold title and a dozen common controls (Skia, net10.0-browserwasm, Release publish), built twice from the same tree: with all six startup PRs (#26054–#26059) plus UnoXamlResourcesTrimming, and with only this PR's change removed. Both builds were served by the same static server (brotli q11, immutable caching for fingerprinted files) and loaded cold in headless Chrome, runs interleaved. "Visually ready" is the first CDP screencast frame identical to the settled final frame. 4G = 9 Mbps down, 85 ms RTT (CDP emulation). Values are medians with (min–max). A difference is only claimed where the ranges don't overlap. Rig: Playwright + Node, available on request.

PR Checklist ✅

  • 🧪 Added Runtime tests, UI tests, or a manual test sample (for bug fixes / features, if applicable)
  • 📚 Docs have been added/updated following the documentation template (for bug fixes / features)
  • 🖼️ Validated PR Screenshots Compare Test Run results.
  • ❗ Contains NO breaking changes
  • 👀 Reviewed 2 other open pull requests (optional but appreciated!)

🤖 Generated with Claude Code

https://claude.ai/code/session_01TXMNu2RupRy4QPFGK2cmij

Faces of a manifest font now load on first use, so a SemiBold title
rendered with the system fallback (monospace on WebAssembly) until its
face arrived. Use the family's already-loaded normal face meanwhile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu2RupRy4QPFGK2cmij
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 243715 found UI Test snapshots differences: skia-linux-screenshots: 2458, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 2458 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AndroidWindowInsets.png
    • Accessibility_ScreenReader.png
    • AppBarButtonWithIconTest.png-dark
    • AppBarToggleButtonTest.png
    • AppBar_KeyBoard.png
    • ApplicationViewSpanningRectsPage.png-dark
    • Application_DispatcherShutdownMode.png-dark
    • AppWindowFeatures.png
    • AppWindowPresenters.png
    • AppXamlDefinedResources.png-dark
    • Attributed_text_Simple.png-dark
    • Attributed_text_FontSize_Changing.png-dark
    • AuthenticationBroker_Demo.png-dark
    • AutoBorderStretchwithleftmargin.png
    • AutomationProperties_Relations.png
    • AutomationPropertiesExtensions_Role.png-dark
    • AutoSizedPathCentered.png-dark
    • AutoSizedTopLeft.png-dark
    • AutoSizedPathCentered.png
    • AutoSizedTopLeft.png
  • skia-windows-screenshots: 2458 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AndroidWindowInsets.png
    • AnimatedBackVisualSourceSamplePage.png
    • AppBarButtonWithIconTest.png-dark
    • ApplicationViewMode.png
    • AppWindowClosing.png-dark
    • AppWindowPresenters.png-dark
    • AppXamlDefinedResources.png
    • Attributed_text_Simple.png
    • AutoBorderStretchwithbottommargin.png-dark
    • AutoBorderStretchwithbottommargin.png
    • AutomationProperties_Name.png
    • AutomationProperties_Relations.png-dark
    • AutoSuggestBoxChosenSuggestion.png-dark
    • AutoSuggestBoxChosenSuggestion.png
    • BackGesture.png-dark
    • BackGesture.png
    • Basics Pivot Test.png-dark
    • Basics Pivot Test.png
    • BeginTime_MultipleAnimations.png-dark
    • BeginTime_MultipleAnimations.png

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.

3 participants