typst/typst

Justification for Arabic

Open

#195 opened on Mar 23, 2023

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

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

Justification for Arabic · typst/typst#195 | Good First Issue