Repository navigation
Give Windows Han text more than one fallback face - #14
Closed
kaylafortin wants to merge 1 commit into
Closed
kaylafortin wants to merge 1 commit into
kaylafortin wants to merge 1 commit into
Conversation
DirectWrite answers fontique's script fallback with a single face, mapped from one sample character with no locale. On an English system that pick can be a Japanese or Korean UI font, so a Simplified-only character such as 简 has no candidate and shapes as .notdef. `ParleyTextSystem::with_script_fallback_families` resolves the system's own pick for a script first, then appends the installed families it is given. The Windows text system uses it to add the Chinese, Japanese and Korean UI faces, plus SimSun-ExtB, after DirectWrite's Han pick. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
Consolidated into |
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.
On Windows, a Simplified-only Han character such as 简 shaped as a missing-glyph box when the system's Han fallback was a Japanese or Korean UI font. Found in the native Unity Hub (HUB-8183), where the Simplified Chinese language pack shows as
▮体中文on an English system..notdef. 繁體中文, 日本語 and 한국어 were fine.ParleyTextSystem::with_script_fallback_familiesresolves the system's own pick for a script first, then appends the installed families it is given. The Windows text system adds Microsoft YaHei UI, Microsoft JhengHei UI, Yu Gothic UI, Malgun Gothic and SimSun-ExtB after DirectWrite's Han pick. Text the system pick already covers keeps its font, so Japanese text keeps Japanese letterforms.Testing
direct_write::tests::han_fallback_covers_simplified_only_charactersshapes 简体中文, 繁體中文, 日本語 and 한국어 with system fonts and fails on any.notdef. It fails without the fix (简体中文 shaped a .notdef glyph) and passes with it. The fullgpui_ce_parleyandgpui_ce_windowslib suites pass, withgpui_ce_windowsbuilt withtest-support,render-to-image.This branch is
unity/HUB-0000-drop-vendored-accesskit, the Hub's current pin, plus this one commit.🤖 Generated with Claude Code