No reviewers
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo!1066
Loading…
Reference in a new issue
No description provided.
Delete branch "1054-1052-scripts"
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?
Urdu is written in the Arabic script, but in Nastaliq, not in the Naskh that
Arabic uses. The image already had Noto Nastaliq Urdu (fonts-noto-core), and
nothing asked for it, so Urdu came out in Naskh: legible, and foreign-looking.
Interface:
[lang]:lang(ur)puts "Noto Nastaliq Urdu" first and opens the lineto 2, through the variables every
text-*andleading-*utility reads, sobuttons, chips and table rows grow with it. Measured with the face loaded,
truncatestill cut 3 px off descenders (the face reaches 1.9 em up and 0.6down), so in Urdu a truncated box clips sideways only (
overflow-x: clip,overflow-y: visible, andmin-width: 0, whichhiddenused to give a flexitem for free). With that, the dashboard, applications table, board,
companies, CVs, career and language pages show no clipped words, no sideways
scroll and no axe violation at 1280 and 320 px.
Documents: each classic and plain CV, letter and portfolio theme has a
body:lang(ur)rule with Nastaliq ahead of the theme's own stack and a lineof 2. Arabic never matches it, and keeps Naskh.
Instance check:
languages.STYLESmapsurto ISO 15924'sAran(Arabic,Nastaliq variant), which is said as "Arabic (Nastaliq)".
fonts.renderable_scriptsasks for that family by name, and takes only a font of that family whose cmap
maps NOON GHUNNA, since the map's substitute (Naskh) would also say yes for
Urdu.
check_fontsand Server settings, Overview list it beside the scripts.A missing Nastaliq is shown in red and does not make
check_fontsfail,because the script is still drawn.
Tests: the probe, the command, the overview and the image's declaration.
WeasyPrint draws an Urdu CV and an Arabic CV in each theme and reads the
embedded fonts (they skip where the family is not installed). A browser test
reads the computed family and line height in Urdu and Arabic, and walks the
pages for clipping, sideways scroll and axe in Urdu (it skips where the
browser has no Nastaliq).
Closes #1054
Chinese is offered for 0.5, and Japanese, Korean and Thai are on the way. None
of them uses spaces to tell a line where it may break.
Interface:
[lang]:lang(zh)and:lang(ja)takeline-break: strict, thefull kinsoku set. The browser's
autoalready keeps ,。)」 off the start ofa line; strict also covers the small kana and the prolonged sound mark.
[lang]:lang(ko)takesword-break: keep-all, so Hangul breaks at its spacesand not between syllables. The rules that stop long Latin words overflowing
are left alone. Under keep-all,
break-wordandanywherebreak inside aKorean word only when that word is wider than its line, the same last resort
Latin gets, and the
break-allutilities sit only on addresses, tokens andkeys. Thai needs nothing: the browser breaks it with ICU's dictionary.
Documents: WeasyPrint 70 accepts only
word-break: normal | break-alland hasno
line-break. Adding either to the themes would log a warning on everyrender and make the HTML preview differ from the PDF. They are not added.
Pango already breaks Han under UAX #14, which keeps the kinsoku marks off the
wrong end of a line. The themes set neither
hyphens: autonortext-align: justify, and a test now keeps it that way. Korean in a PDF stillbreaks between syllables; WeasyPrint has no way to say otherwise.
Image: Pango breaks Thai between words with libthai's dictionary. Debian's
libpango-1.0-0 already depends on libthai0, so the image had it. The
Dockerfile now names it, so that a later Pango cannot drop it unnoticed.
tests/test_fonts.py holds it there.
Tests:
preview at 320 px, in zh-Hans and with Thai content. It checks that the
page does not scroll sideways, that no line starts with a closing mark or
ends with an opening one, and that every Thai line start is a word boundary
for ICU's segmenter. It also reads the computed
word-breakandline-breakfor ko, zh-Hans, ja and en.read the line boxes and check the same kinsoku rules, and that every Thai
line ends where a word ends. They skip where no font draws the script.
Closes #1052
Notes for review
node:22-bookwormwith onlyfonts-dejavu-core, not in the image. To have them run, addfonts-noto-coreandfonts-noto-cjkto the unit job, andfonts-noto-coreto the browser job. That costs CI time, so it is left to the maintainer.check_fonts, because Urdu is still drawn, in Naskh..truncateand.badge > spanclip sideways only in Urdu, so descenders are not cut.line-breakorword-breakCSS. WeasyPrint 70 supports neither (it would warn on every render), and Pango already keeps closing punctuation off line starts.libthai0, which Pango already depends on, so nothing new is installed.🤖 Generated with Claude Code
d4240504521e718297221e718297220c7eddf132