Repository navigation
fix(text): Keep WASM Arabic fallback in its script's font - #25817
Merged
ramezgerges merged 2 commits intoOct 30, 2026
Merged
ramezgerges merged 2 commits into
ramezgerges merged 2 commits into
Conversation
The browser fallback reused the first already-loaded Noto family that covers a codepoint. Noto Sans Math covers the basic Arabic letters as bases for its Arabic math alphabet, with no joining forms, so once any math was shown, Arabic text took it and rendered unjoined. For letters and marks, symbol families (Noto Sans Math, Noto Sans Symbols, Noto Music) now come after script families: an untried script font is fetched before a loaded symbol font is settled for, and the symbol font is still used when every script font fails to load. Symbols and punctuation keep reusing whatever covering font is loaded. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Characters several scripts share (tatweel, the Arabic comma, combining marks) resolved to the first loaded family that covers them, which can be another script's font. Switching fonts mid-word splits the shaping run and breaks joining. A Common or Inherited character now stays in the run's fallback font when that font has the glyph. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
Contributor
|
The build 242250 found UI Test snapshots differences: Details
|
ajpinedam
approved these changes
Oct 30, 2026
Contributor
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue: closes #25816
PR Type:
🐞 Bugfix
What changed? 🚀
On WebAssembly, fallback fonts are Noto families fetched on demand. A codepoint resolved to the first already-loaded family that covers it, so the font a character got depended on what the app had shown before.
1. Letters prefer a script font over a symbol font (
9888593d23,FontFallback.CoverageTable.cs)2. Shared characters stay in the run's fallback font (
a3395423ba,UnicodeText.cs)How it was found:
Given_TextBlock.Check_FontFallback_Shaping2timed out on the WASM WebGPU shard 7 (#25664). Bisecting the shard locally (Chrome + SwiftShader under Xvfb, as on CI) narrowed it to two earlier RichEditBox tests. With them, every Arabic letter resolved to "Noto Sans Math" and rendered 163px wide against 110px in Noto Sans Arabic. It fails the same way on the Skia renderer; the Skia WASM lane is only spared by its sharding. The "render request outstanding with no frame from the host" warnings in that shard were a red herring: the UI is idle once the first frames fail the bitmap comparison.Tests
Given_FontFallbackCoverage(all Skia lanes): drivesCoverageTableFontFallbackServicewith a small table and a fake provider.Given_TextBlock.When_Other_Fallback_Fonts_Loaded_Then_Arabic_Stays_Joined(WASM): loads Noto Sans Math and Noto Sans Adlam, then renders Arabic with a tatweel. It must be as wide as the same text in Noto Sans Arabic.Validation
Given_FontFallbackCoverage+Given_FontDetailsCache+Given_TextBlock: 133/133 passed. Without the service change, the first twoGiven_FontFallbackCoveragecases fail.Check_FontFallback_Shaping2) passes; it failed every time before.Uno.UI.Composition.Drawingwith analyzers.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code