-
-
Notifications
You must be signed in to change notification settings - Fork 873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Justification for Arabic #195
Comments
Potential issues with this :
The naive implementation for kashida insertion shouldn't be the default behavior (for line lengths this long it is almost always better to just stretch and shrink spaces). If it should exist at all it should be an opt-in toggle. Here is a three-part essay about Arabic justification by Titus Nemeth: https://research.reading.ac.uk/typoarabic/on-arabic-justification-part-1/ which goes over the history and the issues. You'll find one of the historical findings is that native typesetters prefer to stretch spaces and use alternate shape forms rather than inserting kashidas everywhere. kashidas are at best used very sparingly. Edit : OG post has been edited and my comment was on the pre-edit screenshot. the edit took in some of comments which is appreciated. |
I created a (n opinionated) crate to help with this: https://github.com/asibahi/kashida . Maybe you guys can find it useful. It has some custom rules for Arabic and Syriac, but also a generic function for other scripts like N'Ko and Adlam (using Unicode properties!) While I believe using variable fonts to be the superior justification strategy, this is a useful fallback, before adjusting spaces. |
Thanks @asibahi! |
@asibahi that is awesome work!! |
Justification of Arabic text is very unique. Usually, they do not add whitespace between words. Instead, Arabic text is justified using two ways:
jalt
to provide these alternatives.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.
Exmaple of Tatweel insertion:
Ref:
The text was updated successfully, but these errors were encountered: