Hi. I am busy with an Arabic font. There is a ligature that has 2 components.
I want to center the diacritic when using only one diacritic.
I added a chained context positioning and added diacritic in input and glyphs for backtrack and lookahead, but it does not work?
Can anyone help me?
This is what I want to do
This is from the OpenType dialog
Diacritic Positioning
Diacritic Positioning
Last edited by Bhikkhu Pesala on Tue Mar 03, 2020 5:47 am, edited 1 time in total.
-
- Moderator
- Posts: 11158
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: Diacritic Positioning
This seems to be tricky, but this will work:
Within the original mark to ligature feature, do move the first mark component to the center. Write down the offset.
Now create a single adjustment lookup that uses the above offset to correct the position in case it is used with two components.
Then add a chained context positioning lookup and connect it to the single adjustment.
See:
Input:
Output:
Within the original mark to ligature feature, do move the first mark component to the center. Write down the offset.
Now create a single adjustment lookup that uses the above offset to correct the position in case it is used with two components.
Then add a chained context positioning lookup and connect it to the single adjustment.
See:
Code: Select all
lookup SingleAdjustmentUncenter{
pos arabicsukuncomb <160 0 0 0>;
}
lookup ChainedContextPositioning2Comp {
context ("jeem_yehbarree-arab.isol") arabicsukuncomb ("signsallallahoualayhewassallamcomb-arab");
sub 0 SingleAdjustmentUncenter;
}
Code: Select all
/jeem-arab/arabicsukuncomb/yehbarree-arab/signsallallahoualayhewassallamcomb-arab /jeem-arab/arabicsukuncomb/yehbarree-arab
Re: Diacritic Positioning
thanks. it worked. but i created two single adjustments one 0,0 and one changed. if there is to 2 diarictics use 0,0 and when there is one the other.
-
- Moderator
- Posts: 11158
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: Diacritic Positioning
I don't understand your question, can you please explain it with some sample text, illustrations, or a reduced font project?