typst / typst/typst

Justification for Arabic

Open
#195 10 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request help wanted layout text
Dominant language
Rust
Stars
56.1k
Forks
1.7k
Avg merge
3d 10h
Merged PRs (30d)
22

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No implementation files or tests are named. Start by locating the text layout and shaping entry points, then review the linked OpenType jalt and Tatweel references alongside the examples. Done should mean Arabic justification follows a clearly agreed strategy for alternative glyphs or Tatweel insertion, with tests covering the resulting layout.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
internationalization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.