typst/typst

Justification for Arabic

Aperta

#195 aperta il 23 mar 2023

 (10 commenti) (10 reazioni) (0 assegnatari)Rust (1574 fork)batch import
feature requesthelp wantedlayouttext

Metriche repository

Star
 (53.538 stelle)
Metriche merge PR
 (Merge medio 8g 5h) (54 PR mergiate in 30 g)

Descrizione

Justification of Arabic text is very unique. Usually, they do not add whitespace between words. Instead, Arabic text is justified using two ways:

  • Using more "compressed" or "stretchy" variant glyphs. OT have a tag called jalt to provide these alternatives.
  • Stretching the words by inserting Tatweel between letters.

Example of justified Arabic text from ref. Blue shows the swash Kaf, purple is used for the final elongated Alif, orange marks the Returning Yeh (Bari-Ye), and yellow highlights the use of Tatweels inserted. image

Exmaple of Tatweel insertion: image

Ref:

Guida contributor