diacritic stacking: positioning problem

Get help with FontCreator here. Please do not post feature requests or bug reports here.
NinnaD
Posts: 200
Joined: Mon Feb 15, 2021 8:06 pm

diacritic stacking: positioning problem

Post by NinnaD »

I'd like to reposition certain diacritics in context of other diacritics.
E.g. "a" + "breve" + "grave": moving "grave" lower.

I tried MarkToMarkPositioning, and while it works for base glyphs with marks that are not pre-defined in Unicode, such as "alpha" + "breve" + "grave", it doesn't work for "a". I tried a different anchor ('top_breve') with base "abreve" + mark "grave" - this looks OK in the design area in OT Designer, but still doesn't appear to work.

Below are 3 different "a"-strings in the preview:
1. "a" + "breve" + "grave"
3. "abreve" + "grave"
4. "abrevegrave"
and
2. "alpha" + "breve" + "grave" (that's the "grave" position I'm aiming for)
img06.png
img06.png (154.84 KiB) Viewed 5983 times
In the case of "a", the positioning of "grave" is resistant to change.

Notes:
"abreve" is not included in my base class used for top anchor.
If possible, I'd like to define several such base and mark classes so that I can reposition entire groups using the same settings. Again, if possible, it would be good to have that repositioning reflected when creating composite glyphs.

How should I go about it?
Thank you for your help.
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9875
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: diacritic stacking: positioning problem

Post by Bhikkhu Pesala »

NinnaD wrote: Mon Feb 15, 2021 11:31 pmIn the case of "a", the positioning of "grave" is resistant to change.
Auto-attach stops you moving the anchors. Edit the top anchor on the breve accent, not on a breve.
Top Anchor.png
Top Anchor.png (7.94 KiB) Viewed 5981 times
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
NinnaD
Posts: 200
Joined: Mon Feb 15, 2021 8:06 pm

Re: diacritic stacking: positioning problem

Post by NinnaD »

Editing that anchor would affect all other marks that may be attached to breve, whereas I'd like to reposition only some of them.

In other words:
e.g. breve: grave, acute, hook should be lower than tilde
e.g. circumflex: acute, grave should be placed to the side, unlike tilde
e.g. macron: grave, acute should be lower when attached to capital letters
to name a few.

The point is to have 'standard' anchors for default positions, and a set of rules that modify positioning in certain contexts. Is that doable?
Last edited by Bhikkhu Pesala on Tue Feb 16, 2021 6:51 am, edited 1 time in total.
Reason: Combined posts
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9875
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: diacritic stacking: positioning problem

Post by Bhikkhu Pesala »

NinnaD wrote: Mon Feb 15, 2021 11:46 pm Editing that anchor would affect all other marks that may be attached to breve, whereas I'd like to reposition only some of them.

In other words:
e.g. breve: grave, acute, hook should be lower than tilde
e.g. circumflex: acute, grave should be placed to the side, unlike tilde
e.g. macron: grave, acute should be lower when attached to capital letters
to name a few.

The point is to have 'standard' anchors for default positions, and a set of rules that modify positioning in certain contexts. Is that doable?
  1. To make tilde higher than breve, grave, hook when attached to base glyphs move T[M] for the tilde
  2. To move circumflex, grave, acute to the side, move T[M] for those accents
  3. To have accents designed for capitals add glyphs for macroncomb.case, tildecomb.case, etc.
macroncomb.png
macroncomb.png (27.59 KiB) Viewed 5958 times
macroncomb.case.png
macroncomb.case.png (27.08 KiB) Viewed 5958 times
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
NinnaD
Posts: 200
Joined: Mon Feb 15, 2021 8:06 pm

Re: diacritic stacking: positioning problem

Post by NinnaD »

Thank you for your reply.
To make tilde higher than breve, grave, hook when attached to base glyphs move T[M] for the tilde
To move circumflex, grave, acute to the side, move T[M] for those accents
I'm afraid I'm either not following or not expressing myself correctly.
1. combining marks (such as grave, acute, hook, tilde etc.) have 2 anchors: T[M] & T.
2. for a number of composites, consisting of base + mark, T[M] of these marks is correct
3. for some composites, consisting of base (base + 1.mark) + 2.mark, T[M] & T are correct.
4. for some composites, consisting of base (base + 1.mark) + 2.mark, second mark position should be modified.
5. if I change either T or T[M] for any mark, I think this will change the mark position globally, no? Whereas I'd like to change mark position in certain contexts only, leaving other cases unchanged.

E.g. agrave, aacute, ahookabove, atilde and acircumflextilde are correct, but the position of 2nd mark in acircumflexacute, acircumflexgrave, acircumflexhookabove should be modified. If I change T[M] for grave, acute, or hook - the correct agrave, aacute, ahookabove will be affected; if I changes T for acircumflex - the correct acircumflextilde will be affected. So I'm looking for a solution that is context-dependent. Does it exist?
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9875
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: diacritic stacking: positioning problem

Post by Bhikkhu Pesala »

If you want some accents to behave differently in certain contexts, for that context you will have to disable Auto-attach. For example, if you wanted to use the same macro accent for both uppercase and lowercase, you would have to disable Auto-attach for all uppercase, and reposition each manually. That is why I suggested using special accents for uppercase. I also use narrow accents for Ī and Ī.

If my screenshot I position the top accent over breve for Acute, Grave, Hook, but for tilde I have to disable Auto-attach, and move the tilde accent on a cirumflex breve.

I tag those glyphs for which Auto-attach needs to be disabled, and quickly run through to adjust them manually.
Disable Auto-attach.png
Disable Auto-attach.png (33.7 KiB) Viewed 5940 times
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
NinnaD
Posts: 200
Joined: Mon Feb 15, 2021 8:06 pm

Re: diacritic stacking: positioning problem

Post by NinnaD »

Thank you :)
I'm aware of the manual solution, and it makes sense in situations where one is dealing with single deviations. I was mainly asking about an OT contextual workaround - disregarding the quickness of manual solution, is it possible to create some set of rules in OT to do that automatically?
Erwin Denissen
Moderator
Moderator
Posts: 11151
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: diacritic stacking: positioning problem

Post by Erwin Denissen »

In most fonts an additional glyph is added to the font that contains the stacking mark.

Would that work?
stackingmarks.png
stackingmarks.png (120.24 KiB) Viewed 5938 times
Erwin Denissen
High-Logic
Proven Font Technology
NinnaD
Posts: 200
Joined: Mon Feb 15, 2021 8:06 pm

Re: diacritic stacking: positioning problem

Post by NinnaD »

If a separate set of rules isn't possible, I think that's the next best thing.
But I'd appreciate a confirmation that what I've been trying & hoping to do is in fact undoable, and not just too difficult for me to accomplish :wink:
Erwin Denissen
Moderator
Moderator
Posts: 11151
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: diacritic stacking: positioning problem

Post by Erwin Denissen »

Maybe, but then your pre-composed characters will no longer benefit from auto attach.
Erwin Denissen
High-Logic
Proven Font Technology
Erwin Denissen
Moderator
Moderator
Posts: 11151
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: diacritic stacking: positioning problem

Post by Erwin Denissen »

And yes, I think it is possible:
altmkmk1.png
altmkmk1.png (39.17 KiB) Viewed 5935 times
altmkmk2.png
altmkmk2.png (190.34 KiB) Viewed 5935 times
altmkmk3.png
altmkmk3.png (33.05 KiB) Viewed 5935 times
I used this additional feature code:

Code: Select all

lookup ChainedContextPositioningAlt {
  context tildecomb.case tildecomb.case;
  sub 1 MarkToMarkAlt;
}

lookup MarkToMarkAlt {
  anchor top2;
  mark tildecomb.case -471 1486;
  pos mark tildecomb.case mark -367 1878;
}
Erwin Denissen
High-Logic
Proven Font Technology
NinnaD
Posts: 200
Joined: Mon Feb 15, 2021 8:06 pm

Re: diacritic stacking: positioning problem

Post by NinnaD »

Thank you for your reply.

Yes, I can get marks to behave in cases such as e.g.
g/tildecomb/tildecomb = g/tildecomb.alt/tildecomb.alt
ɑ/brevecomb/gravecomb = ɑ/brevecomb.alt/gravecomb

- that hasn't been a problem.

The problem occurs in cases that exist as Unicode characters, e.g. abreve, abrevegrave. If I input a/brevecomb, it is automatically replaced by abreve, and a/brevecomb/gravecomb is automatically replaced by abrevegrave, therefore in such cases brevecomb doesn't get replaced by brevecomb.alt, so instead of a/brevecomb.alt/gravecomb I get abrevegrave. And yes, AutoAttach is off.

I simply want any base + mark1, when followed by a specific mark2 to be replaced by base + mark1.alt.
Erwin Denissen
Moderator
Moderator
Posts: 11151
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: diacritic stacking: positioning problem

Post by Erwin Denissen »

Yes, that behavior is not always desired.

You can somehow restore the decomposed situation through a multiple substitution lookup in the ccmp (Glyph Composition Decomposition) feature:
ccmp.png
ccmp.png (231.8 KiB) Viewed 5908 times
Erwin Denissen
High-Logic
Proven Font Technology
NinnaD
Posts: 200
Joined: Mon Feb 15, 2021 8:06 pm

Re: diacritic stacking: positioning problem

Post by NinnaD »

Got that, what next?
Erwin Denissen
Moderator
Moderator
Posts: 11151
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: diacritic stacking: positioning problem

Post by Erwin Denissen »

That should do it combined with the previously mentioned feature code.
Erwin Denissen
High-Logic
Proven Font Technology
Post Reply