mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-19 00:27:49 +00:00
M10: render Persian and Arabic in default web builds
This commit is contained in:
1 parent
3635c23070
commit
9e3ab8e43d
10 files changed
+376
-74
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# Localization parity
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-05 · **Change:** minor (a right-to-left UI language (Arabic) mirrors the window: the icon rail and layers panel on the right, the Design panel on the left, popovers beside it over the canvas, egui's scroll bars, submenus and checkboxes mirrored; `FIGCRAFT_EMBED_SCRIPTS` embeds other scripts' craft-fonts faces in a web build, so Arabic and Persian documents draw there (#1902); documents: a paragraph's base direction can be forced with Text ▸ Text direction, as Add right-to-left text says (#1830); 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-07 · **Change:** minor (a right-to-left UI language (Arabic) mirrors the window: the icon rail and layers panel on the right, the Design panel on the left, popovers beside it over the canvas, egui's scroll bars, submenus and checkboxes mirrored; web builds with craft-fonts embed Noto Sans Arabic Regular by default, and required web builds reject catalogs without it, so Persian and Arabic documents draw without extra build flags (#1902); other scripts remain opt-in with `FIGCRAFT_EMBED_SCRIPTS`; documents: a paragraph's base direction can be forced with Text ▸ Text direction, as Add right-to-left text says (#1830); 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
|
||||
@@ -96,11 +96,14 @@ supported by both apps (CJK, Arabic and Devanagari shaping, IME); Figma has no v
|
||||
embeds Noto Sans CJK SC (+16 MB) and offers Japanese, Korean and Simplified Chinese; without a
|
||||
Noto Sans CJK TC face built in it leaves Traditional Chinese out too; otherwise the language picker and
|
||||
System leave them out. No font file is in this repo.
|
||||
embeds Noto Sans CJK SC (+16 MB) and offers Japanese, Korean and Simplified Chinese; otherwise the language picker and
|
||||
System leave them out. `FIGCRAFT_EMBED_SCRIPTS=Arab,Hebr,Thai,Deva` (one tag per script wanted, as
|
||||
the craft-fonts manifest lists them) embeds those scripts' faces as well, so an Arabic or Persian
|
||||
document draws in Noto Sans Arabic (+0.8 MB) instead of missing-glyph boxes (#1902), and with `Arab`
|
||||
the picker offers the Arabic UI catalog too, as on the desktop. No font file is in this repo.
|
||||
- **Arabic and Persian on the web:** builds with craft-fonts embed Noto Sans Arabic Regular by
|
||||
default, so documents have an Arabic-script fallback and the picker offers the Arabic UI without
|
||||
extra build flags (#1902). Required web builds reject a catalog without that face. Web fonts are packed
|
||||
losslessly at build time and restored once at runtime to preserve the WASM size budget; other
|
||||
scripts remain optional through
|
||||
`FIGCRAFT_EMBED_SCRIPTS=Hebr,Thai,Deva` (one tag per script wanted, as the manifest lists them).
|
||||
Noto Sans Arabic is a fallback: matching Iran Sans exactly still needs that installed font via
|
||||
local font access in a browser that supports it. No font file is added to this repository.
|
||||
|
||||
## Languages
|
||||
|
||||
@@ -111,10 +114,8 @@ supported by both apps (CJK, Arabic and Devanagari shaping, IME); Figma has no v
|
||||
| Traditional Chinese (Taiwan) | zh-Hant | 2,647 / 2,647 (100%: 1,975 UI strings, 641 command labels, 31 menu wordings; draft, counted 2026-11-03) | yes | CJK text and IME in documents; UI text in an installed Noto Sans CJK TC, then Microsoft JhengHei, PingFang TC or Heiti TC (web: only with a built-in TC face); zh-TW, zh-HK, zh-MO and zh-Hant read it, an explicit Hans stays Simplified | 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 |
|
||||
| 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: only a build with `FIGCRAFT_EMBED_SCRIPTS=Arab` embeds Noto Sans Arabic (the font budget leaves it out otherwise, #1902); documents draw in it and the picker offers the Arabic UI then; panels do not mirror | no | draft | review + panel mirroring (not re-estimated) |
|
||||
| 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 builds with craft-fonts embed Noto Sans Arabic by default for documents and the Arabic UI (#1902); the window mirrors (panels swap sides), rows inside the panels do not | no | draft | review + mirrored panel rows (not re-estimated) |
|
||||
| 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) |
|
||||
| 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); the window mirrors (panels swap sides), rows inside the panels do not | no | draft | review + mirrored panel rows (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) |
|
||||
| Indonesian | id | 2,292 / 2,352 (97.4%, draft) | yes | Latin | no | draft | 1–2 (after native review) |
|
||||
@@ -149,6 +150,7 @@ Hindi and Arabic.
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-11-07 | patch | M10, #1902: Noto Sans Arabic Regular joins the default web font catalog, so Persian and Arabic documents no longer need `FIGCRAFT_EMBED_SCRIPTS=Arab`. Required web builds fail if the face is missing; web fonts are packed losslessly and restored once at runtime to preserve the WASM size budget. Other script fonts stay optional. Exact Iran Sans rendering requires that installed font through supported browsers' local font access. Existing duplicate Arabic rows and the repeated web-font paragraph are consolidated, preserving the mirrored window and pending panel-row mirroring. Grades and estimates unchanged. |
|
||||
| 2026-11-03 | minor | Traditional Chinese (Taiwan) (`zh-Hant`, 繁體中文(台灣)) draft catalog: every UI string (1,975), command label (641) and menu wording (31), translated clean-room from the English source and marked as a draft awaiting native review. `zh-TW`, `zh-HK`, `zh-MO` and `zh-Hant` read it; an explicit Hans still reads Simplified Chinese. The desktop UI prefers an installed Noto Sans CJK TC, then Microsoft JhengHei, PingFang TC and Heiti TC; no font is bundled. No plural forms. Localization grade and estimates unchanged |
|
||||
| 2026-11-03 | patch | M10, #1902: the web build drew Persian and Arabic text as missing-glyph boxes. The browser has no system fonts, and `crates/text/build.rs` keeps the web catalog to Inter, Noto Sans Georgian, the wordmark and (with `FIGCRAFT_EMBED_CJK`) Noto Sans CJK, so craft-fonts' Noto Sans Arabic never reached it. `FIGCRAFT_EMBED_SCRIPTS=Arab,Hebr,…` (script tags as the manifest's scripts column lists them) now embeds those scripts' faces in a web build; the default build and its size are unchanged, and with `Arab` embedded the picker offers the Arabic UI as well (`cjk::can_show`, as on the desktop). Noto Sans Hebrew, Devanagari and Georgian join Arabic and Thai among the document fallbacks, so an embedded face draws its script in an Inter document. Tests: `web_embeds_other_scripts_faces_only_when_asked` in the build script, `every_embeddable_script_face_is_a_document_fallback`. |
|
||||
| 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, Devanagari, Gurmukhi, Gujarati, Tamil, Telugu, Kannada and Malayalam, Sinhala, Lao, Myanmar, Khmer, Armenian and Georgian as well as Hebrew and Arabic; 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). |
|
||||
|
||||
+17
-14
@@ -87,16 +87,17 @@ Traditional Chinese is left out unless that build has a Noto Sans CJK TC face. A
|
||||
Chinese UI puts its Chinese face first so Han takes Simplified Chinese shapes, and a Traditional
|
||||
Chinese UI puts an installed Noto Sans CJK TC first, then the system's Taiwan faces (Microsoft
|
||||
JhengHei, PingFang TC, Heiti TC), so Han takes Traditional shapes. No font is added to this
|
||||
repository. Georgian is drawn in
|
||||
`FIGCRAFT_EMBED_CJK=1` (Noto Sans CJK SC, +16 MB); otherwise they are left out of the picker. The other
|
||||
scripts' faces (Noto Sans Arabic, Hebrew, Thai, Devanagari) join a web build only with
|
||||
`FIGCRAFT_EMBED_SCRIPTS=Arab,Hebr,Thai,Deva` (one tag per script wanted, as the manifest lists them), for
|
||||
documents in those scripts; with `Arab` embedded the picker offers Arabic too (#1902). A
|
||||
Chinese UI puts its Chinese face first so Han takes Simplified Chinese shapes. Georgian is drawn in
|
||||
craft-fonts' Noto Sans Georgian, one of the built-in faces in `theme::install_fonts`, or else in an
|
||||
installed font on the desktop. Web builds keep it only when the craft-fonts they're built with has
|
||||
it (`crates/text/build.rs`); the commit releases pin doesn't yet (`docs/releasing.md`), so the web
|
||||
picker leaves Georgian out. A new CJK or other non-Latin language also needs its script in
|
||||
repository.
|
||||
|
||||
Web builds with craft-fonts embed Noto Sans Arabic Regular by default for Persian and Arabic
|
||||
documents, and the picker offers Arabic without extra build flags (#1902). Required web builds
|
||||
reject a catalog without that face (`crates/text/build.rs`). Web faces are compressed losslessly
|
||||
at build time and restored once at runtime to preserve the WASM size budget. Additional script
|
||||
faces (Noto Sans Hebrew, Thai, Devanagari) join a web build with
|
||||
`FIGCRAFT_EMBED_SCRIPTS=Hebr,Thai,Deva` (one tag per script wanted, as the manifest lists them).
|
||||
Georgian is drawn in craft-fonts' Noto Sans Georgian, one of the built-in faces in
|
||||
`theme::install_fonts`, or else in an installed font on the desktop. Required web builds also
|
||||
require Noto Sans Georgian Regular. A new CJK or other non-Latin language needs its script in
|
||||
`cjk::language`, or a built-in craft-fonts face.
|
||||
|
||||
## Arabic draft
|
||||
@@ -112,10 +113,12 @@ This is deliberate: the current plural `Forms` have no zero/two fields. It is no
|
||||
of Arabic's six CLDR categories; wording remains valid for 0, 1, 2 and larger integer counts.
|
||||
|
||||
Arabic text uses the existing bidi/shaping and Arabic system-font fallback on desktop. Web builds
|
||||
require an embedded Noto Sans Arabic face to offer Arabic. The current web font budget filters
|
||||
that face out, so Arabic is not offered on the web yet. No font is added to
|
||||
this repository. The interface's panels are not mirrored; this catalog does not claim a complete
|
||||
right-to-left interface. Native review and representative in-app checks remain required.
|
||||
with craft-fonts include Noto Sans Arabic by default and offer Arabic. This fallback makes Persian
|
||||
and Arabic text readable; matching Iran Sans exactly still requires that installed font. In a
|
||||
browser that supports local font access, choose “Use fonts installed on this computer…” in the
|
||||
Design panel's font menu and grant the browser's permission. No font is added to this repository.
|
||||
The window mirrors (the panels swap sides), but rows inside the panels keep their left-to-right
|
||||
order. Native review and representative in-app checks remain required.
|
||||
|
||||
## Traditional Chinese (Taiwan) draft
|
||||
|
||||
|
||||
Reference in new issue
Block a user