-
Notifications
You must be signed in to change notification settings - Fork 35
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
Allow manually inserted tatweel to stretch with Arabic kashida #243
Comments
Please, provide a MWE. Very likely it can be already done by defining a new rule, but I’m not sure. |
MWE: \documentclass{article}
\usepackage{multicol}
\usepackage[bidi = basic]{babel}
\babelprovide[
main,
import,
mapdigits,
justification = kashida,
transforms = kashida.plain
]{arabic}
\babelfont[arabic]{rm}{Scheherazade New}
\newcommand{\ayah}{^^^^06dd}
\begin{document}
\begin{multicols}{3}
بِسْمِ ٱللَّهِ ٱلرَّحْمَـٰنِ ٱلرَّحِيمِ~\ayah1
ٱلْحَمْدُ لِلَّهِ رَبِّ ٱلْعَـٰلَمِينَ~\ayah2
ٱلرَّحْمَـٰنِ ٱلرَّحِيمِ~\ayah3
مَـٰلِكِ يَوْمِ ٱلدِّينِ~\ayah4
إِيَّاكَ نَعْبُدُ وَإِيَّاكَ نَسْتَعِينُ~\ayah5
ٱهْدِنَا ٱلصِّرَ^^^^2009ٰطَ ٱلْمُسْتَقِيمَ~\ayah6
صِرَ^^^^2009ٰطَ ٱلَّذِينَ أَنْعَمْتَ عَلَيْهِمْ غَيْرِ ٱلْمَغْضُوبِ عَلَيْهِمْ وَلَا ٱلضَّآلِّينَ~\ayah7
\end{multicols}
\end{document} You can see, for example that the manually inserted tatweel in the word “ٱلرَّحْمَـٰنِ” (last word on the first line of the first column from the right) is not stretched. |
Ideally, there should be the same amount of tatweel before and after the manually inserted tatweel. This way, the dagger alif is in the middle. Also, the kashida should be just as long as every other kashida. Is your example above a fixed length? |
Which means there must be an odd number of tatweel, right? That’s not very difficult. But if there is an even number then the diacritic must be shifted horizontally, which is more complicated. |
Oh, I thought that the tatweel could be any arbitrary length. I did not know that it has to be an integer number of tatweels. Does that mean that even when the justify factor is set to 1, some space-stretching might have to be used to achieve justification? I think there are two good options of there is an even number:
Option 1 seems better, but I don't know if it it could cause problems. Otherwise, option 2 is also fine. |
I’m working on it, but I’m stuck with the vertical placement of diacritics. Well, there is a trick (which I’ve already used in the tentative code for the elongated forms), but I’d like investigate other options before. |
Update. It seems there is a bug in the default renderer (but I’m not yet sure), which misplaces all diacritics if they are ‘marked’ internally to keep track of them. With Harfbuzz it works as expected. So, this feature has to wait a little bit. |
The kashida feature allows the use of tatweel to achieve justification instead of stretching the width of spaces. I think that manually inserted tatweel should also be stretchable. But there should also be an option to toggle this feature. In the image below, you will see tatweel with dagger alifs above them, but they are not stretched because they are manually inserted.
The text was updated successfully, but these errors were encountered: