typst/typst

Justification for Arabic

Open

#195 opened on Mar 23, 2023

View on GitHub
 (10 comments) (10 reactions) (0 assignees)Rust (1,574 forks)batch import
feature requesthelp wantedlayouttext

Repository metrics

Stars
 (53,538 stars)
PR merge metrics
 (Avg merge 8d 5h) (54 merged PRs in 30d)

Description

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:

Contributor guide