-
Notifications
You must be signed in to change notification settings - Fork 1
Kashida option incompatible with Ligatures=Rare (+dlig) #7
Comments
At first glance I see nothing in the code that would actively suppress a ligature. Show a small, complete example with a freely available font that can be used for a test. |
Upon further inspection, the issue is not related to package option Kashida per se, but with Kashida activation within text which disables ligatures as a side effect. Here is a working example :
Note: The source code does not contain the kasra that is shown on Github site (where ligatures are activated !!). Here is the output : Same issue appears with other fonts such as Adobe Arabic. Take care, Arach |
Yes, this is expected. If you add
But with kashida on, rules and penalties have been inserted:
and this quite naturally disturbs ligatures. Sorry there is imho nothing that can be done here. |
I understand that this is "expected" behavior due to the way Kashida was implemented in xepersian. I do believe that it would be useful to specify in the documentation that Kashida is not compatible with ligatures, which, to the end user, is quite unexpected. Many thanks for your help ! Arach |
You might also try https://ctan.org/pkg/xepersian-hm which is an extension of the package here, the only documented feature is that it "fixes some problems with Kashida" I would be interested to know how it works with your test cases. |
Hi David, xepersian-hm seems to exhibit the exact same behaviour, using the following code:
As a side note I notice that with xepersian-hm Kashida is being used on a paragraph that is not justified. I thought that the purpose of Kashida was to justify paragraphs, so really I am at a loss here... In contrast with xepersian-hm, xepersian did not visibly use any Kashida on the paragraph, but still exhibited the side effect of disabling ligatures. |
Hi, You are right. Kashida should justify the paragraph except the last line. Please note that with Kashida=hrule, where a horizontal rule is used to stretch the text, the bahavior of xepersian-hm is expected to be the same as xepersian. However, with Kashida=glyph, where a kashida character is used to stretch the text, the situation is different. Would you please provide a MWE which shows the problem. Yours |
Hi Hossein, As you can see from the previous examples, the behaviour of xepersian and xepersian-hm is not the same : you can observe that a Kashida was inserted by xepersian-hm after the N of Niknejad even though this was a single line paragraph. For completeness, the following example is with xepersian-hm, Kashida=glyph and Adobe Arabic Font (I didn't find any nonfree font with a kashida glyph and ligatures). The incompatibility between KashidaOn and ligatures can again be observed as well as the insertion of a Kashida after the first letter of the second word.
Take care, |
Hi Arach, Please note that in xepersian the value of the glue is "
You can also use:
Please let me know if the outputs are not the same on your system. Thanks |
Hi, With kashidastretch=0, I can indeed verify that xepersian and xepersian-hm give the same output on my system. Now back to the reason why ligatures do not work when Kashida is On. My understanding is that ligatures are broken because rules are inserted between characters. I wonder whether xepersian could be amended to avoid inserting rules between characters forming a ligature. Here is a link discussing a similar issue in Indesign and Xpress (space breaking ligatures in latin text) and stating that "In XPress there is an option to not break ligatures unless they are over a certain tracking amount." Until such a feature is implemented, IMHO the documentation should specify the incompatibility between Ligatures and Kashida. Take care, Arach |
Hi David, In connection with your comment, I agree that the earlier versions of
The following figures are the outputs of Thanks |
Hi Hossein, I do believe that the documentation for xepersian-hm can be improved. Specifically, the example that is shown on the user manual in CTAN dated 2020-05-01 is as follows:
On my system this triggers an error until I change Kashida option to Kashida=glyph or Kashida=hrule. It would be great also if the documentation showed what xepersian-hm corrects -- as you described in your last email -- so that one can appreciate better the added value of the package. Thanks for your work, Arach |
Hi Arach, Many thanks for reporting the error. That was my mistake. In the next version of xepersian-hm I will try to describe all of the features of the package in the "User Documentation" as much as I can. Thanks |
This issue is resolved in xepersian-hm v0.5e uploaded on CTAN (https://ctan.org/pkg/xepersian-hm) today. With the following code in xepersian:
the output is:
Thanks |
Hi,
Through a lot of trial and error, I seem to have found out that settextfont does not pass Ligatures=Rare (or RawFeature=+dlig) to fontspec when package class option Kashida is used.
Is this a bug or a feature ?
In the latter case, then the documentation should specify that using Kashida excludes using discretionary ligatures.
Many thanks for your help.
Arach Hirmanpour
The text was updated successfully, but these errors were encountered: