Fonts: Armenian and Georgian are offered but missing from SCRIPTS, so no font check covers them #455

Closed
opened 2026-10-01 10:46:49 +00:00 by tiagoagueda · 0 comments
Owner

Found on 2026-09-29 in a read-only review of postulo at 95348908d, comparing the languages offered with languages.SCRIPTS and the font probes.

Checked again on 2026-10-01 against main at 0a5cad587: still present.

SCRIPTS records the non-Latin script of only five languages: am, ar, bg, el and ti. Armenian (hy) and Georgian (ka), offered since #118, are absent, so scripts_offered() never names their scripts. check_fonts, the font status in Server settings and tests/test_fonts.py all start from that set, so none of them ever asks whether Armenian or Georgian can be drawn. (Macedonian, Serbian and Ukrainian are missing too, but Cyrillic is already checked through bg.)

  • Where: core/languages.py:574 (SCRIPTS) and core/languages.py:583 (scripts_offered); documents/fonts.py:39 (PROBES, with no Armenian or Georgian probe) and documents/fonts.py:147 (renderable_scripts); documents/management/commands/check_fonts.py:29; tests/test_fonts.py:74, where test_every_non_latin_language_declares_its_script checks its own fixed set {"ar", "am", "ti", "bg", "el"} and so cannot notice a new language.
  • What happens: an operator running from a virtualenv on a host whose fonts lack Armenian or Georgian runs check_fonts, or opens the font status in Server settings, and is told every offered script draws. A CV written in Armenian or Georgian then renders as empty boxes. The container image is not affected today, because it installs fonts-noto-core, but the test meant to keep the image honest does not know either script exists.
  • Why it matters: this is the failure #74 and #118 set out to prevent ("The bundled font stack has to draw all of them"), and the check that was built to catch it is blind to two of the scripts it was built for.
  • Fix: add "hy": "Armenian" and "ka": "Georgian" (and mk, sr, uk as Cyrillic) to SCRIPTS; add probes ("hye", "Ա") and ("kat", "ა") to documents/fonts.PROBES; add both scripts to COVERAGE in tests/test_fonts.py with fonts-noto-core. Replace the fixed not_latin set with a check that cannot drift: every offered language outside an explicit list of Latin-script codes must have a SCRIPTS entry.

Done when

  • tests/test_fonts.py fails today for hy and ka (a language offered that is neither in the Latin list nor in SCRIPTS) and passes once both are declared, probed and covered.
Found on 2026-09-29 in a read-only review of postulo at 95348908d, comparing the languages offered with `languages.SCRIPTS` and the font probes. Checked again on 2026-10-01 against `main` at `0a5cad587`: still present. `SCRIPTS` records the non-Latin script of only five languages: `am`, `ar`, `bg`, `el` and `ti`. Armenian (`hy`) and Georgian (`ka`), offered since #118, are absent, so `scripts_offered()` never names their scripts. `check_fonts`, the font status in Server settings and `tests/test_fonts.py` all start from that set, so none of them ever asks whether Armenian or Georgian can be drawn. (Macedonian, Serbian and Ukrainian are missing too, but Cyrillic is already checked through `bg`.) - **Where:** `core/languages.py:574` (`SCRIPTS`) and `core/languages.py:583` (`scripts_offered`); `documents/fonts.py:39` (`PROBES`, with no Armenian or Georgian probe) and `documents/fonts.py:147` (`renderable_scripts`); `documents/management/commands/check_fonts.py:29`; `tests/test_fonts.py:74`, where `test_every_non_latin_language_declares_its_script` checks its own fixed set `{"ar", "am", "ti", "bg", "el"}` and so cannot notice a new language. - **What happens:** an operator running from a virtualenv on a host whose fonts lack Armenian or Georgian runs `check_fonts`, or opens the font status in Server settings, and is told every offered script draws. A CV written in Armenian or Georgian then renders as empty boxes. The container image is not affected today, because it installs `fonts-noto-core`, but the test meant to keep the image honest does not know either script exists. - **Why it matters:** this is the failure #74 and #118 set out to prevent ("The bundled font stack has to draw all of them"), and the check that was built to catch it is blind to two of the scripts it was built for. - **Fix:** add `"hy": "Armenian"` and `"ka": "Georgian"` (and `mk`, `sr`, `uk` as Cyrillic) to `SCRIPTS`; add probes `("hye", "Ա")` and `("kat", "ა")` to `documents/fonts.PROBES`; add both scripts to `COVERAGE` in `tests/test_fonts.py` with `fonts-noto-core`. Replace the fixed `not_latin` set with a check that cannot drift: every offered language outside an explicit list of Latin-script codes must have a `SCRIPTS` entry. ## Done when - `tests/test_fonts.py` fails today for `hy` and `ka` (a language offered that is neither in the Latin list nor in `SCRIPTS`) and passes once both are declared, probed and covered.
tiagoagueda added this to the 0.6.0 milestone 2026-10-01 10:46:49 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo#455
No description provided.