M10: UI script fallbacks leave Bengali and Thai to the CJK path; Hindi row and ROADMAP status (#2014)

From review: crate::cjk picks the Bengali and Thai faces after this list in its own order, so the two scripts come out of SCRIPT_SAMPLES and their families out of SCRIPT_FAMILIES; the Hindi row says the desktop UI takes an installed Devanagari face; the ROADMAP status line and Localization row carry the change.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Trevor Brown
2026-11-05 09:43:47 -05:00
co-authored by Claude Fable 5.1
parent facc2a2178
commit 2c92a16944
3 changed files with 22 additions and 23 deletions
+3 -3
View File
File diff suppressed because one or more lines are too long
+10 -12
View File
@@ -49,17 +49,18 @@ pub fn single_line(ui: &mut Ui, id: Id, text: &mut String, font: FontId, width:
}
/// One letter per script the UI's own fonts may lack: Hebrew, Arabic, Ethiopic, Devanagari,
/// Bengali, Gurmukhi, Gujarati, Tamil, Telugu, Kannada, Malayalam, Sinhala, Thai, Lao, Myanmar,
/// Khmer, Armenian and Georgian. egui's shaper selects the joined contextual forms itself.
pub(crate) const SCRIPT_SAMPLES: [char; 18] = [
'\u{05D0}', '\u{0628}', '\u{1200}', '\u{0915}', '\u{0995}', '\u{0A15}', '\u{0A95}', '\u{0B95}', '\u{0C15}', '\u{0C95}', '\u{0D15}', '\u{0D9A}',
'\u{0E01}', '\u{0E81}', '\u{1000}', '\u{1780}', '\u{0531}', '\u{10D0}',
/// Gurmukhi, Gujarati, Tamil, Telugu, Kannada, Malayalam, Sinhala, Lao, Myanmar, Khmer, Armenian
/// and Georgian. egui's shaper selects the joined contextual forms itself. Bengali and Thai are
/// not here: [`crate::cjk`] picks their faces, in its own order of preference, after this list.
pub(crate) const SCRIPT_SAMPLES: [char; 16] = [
'\u{05D0}', '\u{0628}', '\u{1200}', '\u{0915}', '\u{0A15}', '\u{0A95}', '\u{0B95}', '\u{0C15}', '\u{0C95}', '\u{0D15}', '\u{0D9A}', '\u{0E81}',
'\u{1000}', '\u{1780}', '\u{0531}', '\u{10D0}',
];
/// System families that draw those scripts, in order of preference: the first installed one that
/// has a script's letter is taken, so a family covering several scripts (Segoe UI, Nirmala UI,
/// Kohinoor, Noto Sans) joins once. Windows, macOS and the common Linux fonts for each script.
pub(crate) const SCRIPT_FAMILIES: [&str; 50] = [
pub(crate) const SCRIPT_FAMILIES: [&str; 46] = [
// Hebrew and Arabic.
"Segoe UI",
"Arial",
@@ -81,7 +82,6 @@ pub(crate) const SCRIPT_FAMILIES: [&str; 50] = [
// The Indic scripts and Sinhala.
"Nirmala UI",
"Kohinoor Devanagari",
"Kohinoor Bangla",
"Kohinoor Gujarati",
"Kohinoor Telugu",
"Gurmukhi MN",
@@ -90,7 +90,6 @@ pub(crate) const SCRIPT_FAMILIES: [&str; 50] = [
"Malayalam Sangam MN",
"Sinhala Sangam MN",
"Noto Sans Devanagari",
"Noto Sans Bengali",
"Noto Sans Gurmukhi",
"Noto Sans Gujarati",
"Noto Sans Tamil",
@@ -99,14 +98,12 @@ pub(crate) const SCRIPT_FAMILIES: [&str; 50] = [
"Noto Sans Malayalam",
"Noto Sans Sinhala",
"Lohit Devanagari",
// Thai, Lao, Myanmar and Khmer.
// Lao, Myanmar and Khmer.
"Leelawadee UI",
"Thonburi",
"Lao Sangam MN",
"Myanmar Text",
"Myanmar Sangam MN",
"Khmer Sangam MN",
"Noto Sans Thai",
"Noto Sans Lao",
"Noto Sans Myanmar",
"Noto Sans Khmer",
@@ -120,7 +117,8 @@ pub(crate) const SCRIPT_FAMILIES: [&str; 50] = [
/// Faces the UI adds for scripts its own fonts lack (desktop: from the system), as egui font data;
/// `taken` as for [`crate::theme::system_fallbacks`]. Hebrew and Arabic names were covered first;
/// Ethiopic and the other scripts in [`SCRIPT_SAMPLES`] drew as boxes in the panels (a String
/// variable's Amharic value, #2014) until the system face for each was taken too.
/// variable's Amharic value, #2014) until the system face for each was taken too. Bengali and
/// Thai keep [`crate::cjk`]'s choice, made after this list.
pub fn script_fallbacks(have: &dyn Fn(char) -> bool, taken: &mut Vec<Arc<figcraft_text::Face>>) -> Vec<(String, egui::FontData)> {
crate::theme::system_fallbacks(SCRIPT_SAMPLES, &SCRIPT_FAMILIES, have, taken)
}
+9 -8
View File
@@ -1,6 +1,6 @@
# Localization parity
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-05 · **Change:** patch (the UI takes a system face for Ethiopic, the Indic scripts, Sinhala, Thai, Lao, Myanmar, Khmer, Armenian and Georgian as it did for Hebrew and Arabic, so a String variable's Amharic value no longer draws as boxes (#2014); Bosnian draft catalog, one/few/other plurals; German terminology corrections (M10): gradient stops, OpenType stylistic sets and the Home-screen preference; partial review, catalog remains a draft; Arabic draft catalog, count-neutral plurals and web font gate; Thai draft catalog and Thai UI fonts; a missing translation fails no check: `cargo xtask i18n-report` lists them; Vietnamese draft catalog; string counts re-measured: 2,352 entries; Russian and Turkish catalogs reviewed by native speakers, Russian one/few/many plurals; Czech and Indonesian drafts; the Japanese draft completed; counts re-measured; Windows UI language from the first preferred language; draft catalogs catch up: every draft translates every string again; Simplified Chinese draft catalog; macOS finds its downloadable CJK system fonts (#406); string counts re-measured: 2,272 entries, the drafts at 95–99%; Swedish command labels and menu wordings; Russian, Swedish, Turkish, Czech and Indonesian listed; a duplicated paragraph removed) · **Target:** Figma Design (desktop app 126.10.7)
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-05 · **Change:** patch (the desktop UI takes a system face for Ethiopic, the Indic scripts, Sinhala, Lao, Myanmar, Khmer, Armenian and Georgian as it did for Hebrew and Arabic, so a String variable's Amharic value no longer draws as boxes (#2014); Bosnian draft catalog, one/few/other plurals; German terminology corrections (M10): gradient stops, OpenType stylistic sets and the Home-screen preference; partial review, catalog remains a draft; Arabic draft catalog, count-neutral plurals and web font gate; Thai draft catalog and Thai UI fonts; a missing translation fails no check: `cargo xtask i18n-report` lists them; Vietnamese draft catalog; string counts re-measured: 2,352 entries; Russian and Turkish catalogs reviewed by native speakers, Russian one/few/many plurals; Czech and Indonesian drafts; the Japanese draft completed; counts re-measured; Windows UI language from the first preferred language; draft catalogs catch up: every draft translates every string again; Simplified Chinese draft catalog; macOS finds its downloadable CJK system fonts (#406); string counts re-measured: 2,272 entries, the drafts at 95–99%; Swedish command labels and menu wordings; Russian, Swedish, Turkish, Czech and Indonesian listed; a duplicated paragraph removed) · **Target:** Figma Design (desktop app 126.10.7)
FigCraft's interface has a localization layer with an English catalog, a Russian catalog reviewed
by a native speaker, and Spanish (with a Latin American overlay), French, German, Brazilian
@@ -59,11 +59,12 @@ supported by both apps (CJK, Arabic and Devanagari shaping, IME); Figma has no v
- **Script support in documents:** Unicode bidi with Arabic shaping and mirrored brackets in text
layers; right-to-left list markers and indents; right-to-left names in the layers panel, tabs
and canvas labels (visual order, joined Arabic); inline IME composition with the candidate window
at the caret; system-font fallback for scripts the UI fonts lack: Hebrew and Arabic, and since
#2014 Ethiopic, the Indic scripts, Sinhala, Thai, Lao, Myanmar, Khmer, Armenian and Georgian,
so a layer name or a String variable's value in them draws in the panels when the system has a
face (`crates/ui-egui/src/bidi.rs`, `SCRIPT_SAMPLES` and `SCRIPT_FAMILIES`). Devanagari shapes
through harfrust. No vertical text (Figma has none either).
at the caret; system-font fallback for scripts the UI fonts lack: Hebrew and Arabic, Bengali
and Thai (with the CJK faces), and since #2014 Ethiopic, the other Indic scripts, Sinhala, Lao,
Myanmar, Khmer, Armenian and Georgian, so a layer name or a String variable's value in them
draws in the panels when the system has a face (`crates/ui-egui/src/bidi.rs`, `SCRIPT_SAMPLES`
and `SCRIPT_FAMILIES`). Devanagari shapes through harfrust. No vertical text (Figma has none
either).
- **Script support in the UI:** menus widen to their longest label; dropdowns, the two-column
labels of the right panel and the home screen's cards keep a long translation on one line with an
ellipsis and show it in full on hover (checked in German, the longest); no mirrored
@@ -93,7 +94,7 @@ supported by both apps (CJK, Arabic and Devanagari shaping, IME); Figma has no v
| English | en | 2,352 / 2,352 (100%, source) | yes | Latin | yes (source) | full | 0 |
| Simplified Chinese (Mandarin) | zh-Hans | 2,216 / 2,352 (94.2%, draft) | yes | CJK text and IME in documents; UI text in an installed Chinese face, ahead of Japanese ones (web: the `FIGCRAFT_EMBED_CJK` build); no Traditional Chinese catalog (zh-TW, zh-HK read English) | no | draft | 1–2 (after native review) |
| Spanish | es, es-419 | 2,352 / 2,352 (100%, draft); es-419 overlays 104 Latin American wordings (draft) | yes | Latin | no | draft | 0–1 (after native review) |
| Hindi | hi | 0 (0%) | no | Devanagari shaping works in documents; UI font fallback to check | no | none | 4–7 |
| Hindi | hi | 0 (0%) | no | Devanagari shaping works in documents; the desktop UI takes an installed Devanagari face (Nirmala UI, Kohinoor Devanagari, Noto Sans Devanagari, Lohit) for names and values (#2014); no UI catalog | no | none | 4–7 |
| Arabic | ar | 1,857 / 1,857 UI strings, 620 command labels, 31 menu wordings (draft, counted 2026-10-28) | catalog complete; native review pending | Existing bidi/shaping and Arabic system fallback; web not offered (font budget excludes Arabic); panels do not mirror | no | draft | review + panel mirroring (not re-estimated) |
| French | fr | 2,328 / 2,352 (99.0%, draft) | yes | Latin | no | draft | 1–2 (after native review) |
| Portuguese | pt-BR | 2,331 / 2,352 (99.1%, draft) | yes | Latin | no | draft | 1–2 (after native review) |
@@ -128,7 +129,7 @@ Hindi and Arabic. Traditional Chinese is not planned (no catalog; its users see
| Date | Change | Summary |
|---|---|---|
| 2026-11-05 | patch | #2014: the panels drew a String variable's Amharic value as boxes: the UI took a system face for Hebrew and Arabic only. `bidi::script_fallbacks` now samples one letter of each of 18 scripts (Ethiopic, the Indic scripts, Sinhala, Thai, Lao, Myanmar, Khmer, Armenian, Georgian as well) against the system's families for each (Windows, macOS, the common Linux fonts), the first installed one that draws the letter taken once. Test: `bidi::tests::other_scripts_take_an_installed_system_face` (skips scripts the machine has no face for). |
| 2026-11-05 | patch | #2014: the panels drew a String variable's Amharic value as boxes: the UI took a system face for Hebrew and Arabic only. `bidi::script_fallbacks` now samples one letter of each of 16 scripts (Ethiopic, the Indic scripts other than Bengali, Sinhala, Lao, Myanmar, Khmer, Armenian, Georgian as well; Bengali and Thai keep `crate::cjk`'s faces) against the system's families for each (Windows, macOS, the common Linux fonts), the first installed one that draws the letter taken once. Desktop only: the web build has no system fonts. Test: `bidi::tests::other_scripts_take_an_installed_system_face` (skips scripts the machine has no face for). |
| 2026-10-30 | minor | Bosnian (`bs`, Bosanski) draft catalog: every UI string (1,906), command label (629) and menu wording (31), machine-drafted in Latin script with ijekavian forms and marked as a draft awaiting native review. Bosnian plurals: one for 1, 21, 31… (not 11), few for 2–4, 22–24… (not 12–14), other for the rest. Grade and hours unchanged (Bosnian is not one of the twelve key languages) |
| 2026-10-29 | minor | German terminology corrections (M10): gradient stops, OpenType stylistic sets and the Home-screen preference; partial review, catalog remains a draft. Nine existing translations corrected; keys, placeholders, coverage, grade and estimates unchanged |
| 2026-10-28 | minor | Arabic draft: 1,857 UI entries, 620 command labels and 31 menu wordings, with count-neutral plurals. AI-assisted, native review pending. Desktop uses the existing Arabic fallback and bidi; web requires an embedded Arabic face. No panel mirroring or parity-grade increase claimed |