mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-27 19:47:12 -06:00
- `effectcraft_text::fonts::set_cjk_locale` lets the host say whose face should draw Han ideographs instead of leaving it to the locale environment, and drops the fallback cache when it changes. `han_order` reads that request first; the tag → order rule moves into the pure `han_order_for`, so it can be tested without touching process state. - `theme::install` now takes the stored `general.language` value and registers one CJK system fallback per script in every font family, the interface's own script first: kana for Japanese, a Han character for `zh-hans` / `zh-hant`, then the other script so names in it still render. A face is registered at most once, and a machine with no CJK font installs nothing (the web build installs nothing, as before). - Before this the probe was always `あ`, so Han text was drawn by the Japanese face whenever the operating system's locale was not Chinese: a Chinese interface, and Chinese file, layer or template names on any locale, both got Japanese glyph forms. - Tests: the tag → order rule (`zh`, `zh_Hans`, `zh-Hant-TW`, `ko`, `ja`, `en`, empty), and the registration order plus once-only registration for a Chinese, a Japanese and an English interface.