Diacritic Positioning

Get help with FontCreator here. Please do not post feature requests or bug reports here.
Post Reply
tesbihhan
Posts: 41
Joined: Sun Jan 01, 2017 11:18 am

Diacritic Positioning

Post by tesbihhan »

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
lamalef.png
lamalef.png (2.79 KiB) Viewed 3071 times
This is from the OpenType dialog
screen.png
screen.png (124.21 KiB) Viewed 3071 times
Last edited by Bhikkhu Pesala on Tue Mar 03, 2020 5:47 am, edited 1 time in total.
Erwin Denissen
Moderator
Moderator
Posts: 11158
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Diacritic Positioning

Post by Erwin Denissen »

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:

Code: Select all

lookup SingleAdjustmentUncenter{
  pos arabicsukuncomb <160 0 0 0>;
}

lookup ChainedContextPositioning2Comp {
  context ("jeem_yehbarree-arab.isol") arabicsukuncomb ("signsallallahoualayhewassallamcomb-arab");
  sub 0 SingleAdjustmentUncenter;
}
Input:

Code: Select all

/jeem-arab/arabicsukuncomb/yehbarree-arab/signsallallahoualayhewassallamcomb-arab /jeem-arab/arabicsukuncomb/yehbarree-arab
Output:
ArabicLigatureCentered.png
ArabicLigatureCentered.png (11.38 KiB) Viewed 3047 times
Erwin Denissen
High-Logic
Proven Font Technology
tesbihhan
Posts: 41
Joined: Sun Jan 01, 2017 11:18 am

Re: Diacritic Positioning

Post by tesbihhan »

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.
Erwin Denissen
Moderator
Moderator
Posts: 11158
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Diacritic Positioning

Post by Erwin Denissen »

I don't understand your question, can you please explain it with some sample text, illustrations, or a reduced font project?
Erwin Denissen
High-Logic
Proven Font Technology
Post Reply