shaping: test that a CJK fallback follows the locale's language #96
Labels
No labels
Area/ci
Area/cli
Area/client
Area/client-core
Area/daemon
Area/deps
Area/docs
Area/grid
Area/manual
Area/nix
Area/protocol
Area/pty
Area/render
Area/shaping
Area/skills
Area/transport
Area/vt
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Security
Kind/Testing
perf-regression-accepted
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Blocked
Status
Need More Info
Status
Upstream
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
felis-terminal/felis#96
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On Linux, felis takes its fallback faces from fontconfig's ranked list for the requested family. The motivating case is a Japanese locale: fontconfig prefers a Japanese CJK face there, while felis's old first-installed lists could pick a Simplified Chinese one. No test checks this, because the pinned test font set has no Simplified Chinese face.
What to add
dev/flake-module.nix). The JP face there is already apyftsubsetofNotoSansCJK-VF.otf.ttc, so an SC subset from the same collection (--font-number=2) cut to the same ideograph is a few KB.langfor it and the two faces tie (install order then puts JP first underzh-cntoo). The test's rules must assignjato the JP face andzh-cnto the SC face with<match target="scan">, standing in for the languages a full face's coverage yields.FcConfigwithlangset toja, the fallback for an ideograph both faces cover is the JP face, and withzh-cnit is the SC face. The second assertion is what shows the order comes from the language, not from install order. Assert first that both faces load and cover the ideograph; do not assert the losing face stays in the cascade, sincefallback_cascadedrops a face that adds no coverage.Scope
The test sets the language through the private config's explicit
lang. The host path, whereFcDefaultSubstitutetakes the language from the environment, is not covered: changing the environment from parallel tests is unsafe, and that step is fontconfig's own.