Repository navigation
fix(text): isolate CJK fallback language and cache entries - #1907
Open
TimotheusG wants to merge 1 commit into
Open
TimotheusG wants to merge 1 commit into
TimotheusG wants to merge 1 commit into
Conversation
This was referenced Oct 19, 2026
This branch has not been deployed
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.
Dependencies and merge order
Independent feature; proposed landing position 6, before #1972. The two PRs overlap in fonts.rs. Their integration must retain both captured locale and database revision in the family-cache key. We will carry the saved, tested resolution into #1972 after this lands. #1890 itself merges cleanly with this PR.
Full nine-PR index, merge instructions, audited heads and validation evidence. The first five positions are independent, not a serial dependency chain. Combined CI evidence is not a claim of nine standalone full-suite passes.
Concurrent interface initialization can install the wrong CJK fallback font. One context sets the global language to Simplified Chinese, another sets Japanese, and the first context then looks up its Han probe using the second context's language. The family-order cache also omitted locale, so a lookup finishing after a cache clear could repopulate an entry with the wrong language's ordering.
On the affected Windows installation, Source Han Sans JP covers 页 but lacks 选删层设导; Microsoft YaHei covers all of them. This explains the intermittent missing-glyph failure left after #1143 (related issue #1141). The unmodified UI test binary reproduced it on stress run 23. This is evidence of concurrent initialization failure, not a claim that every normal single-window launch fails.
Pass the interface language explicitly into fallback lookup, capture one language policy for the whole lookup, and include that policy in the family-order cache key. Use four finite policy values (Japanese, Korean, Simplified, Traditional) instead of arbitrary locale-string keys. Preserve the existing process-wide request for composition text. Update the comments that incorrectly assumed Japanese faces could not cover 页.
Validation
The full Windows CI validation combines this patch with the companion fixes in #1889, #1890, and #1891. This PR contains only the CJK change (two source files), based on main; it does not include those separate PR commits or the audio follow-up.
Summary by CodeRabbit