ad hoc narrow base + wide mark combos, overlap
ad hoc narrow base + wide mark combos, overlap
How can I adjust the bearings of narrow glyphs, like e.g. l or ismallcapital with wide diacritics or marks that extend over the lsb or rsb of the base, in ad hoc combinations? Say I need to place ismallcapital+dieresiscomb, ismallcapital+overlinecomb, ismallcapital+tildecomb - how do I stop the combinations from overlapping one another?
-
- Top Typographer
- Posts: 9878
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: ad hoc narrow base + wide mark combos, overlap
I include narrow diacritics in my fonts for use with idotless and lowercase l or t.
I think that is a better solution than adjusting the advance widths to avoid clashes.
I think that is a better solution than adjusting the advance widths to avoid clashes.
Re: ad hoc narrow base + wide mark combos, overlap
OK, thank you. That would solve part of the problem.
There are some marks that are supposed to be placed to the left or right of the base - what should I do then?
Plus not all marks can be shrunk that way
There are some marks that are supposed to be placed to the left or right of the base - what should I do then?
Plus not all marks can be shrunk that way
-
- Top Typographer
- Posts: 9878
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: ad hoc narrow base + wide mark combos, overlap
Diaeresis can be made narrower by spacing the dots more tightly. Which others cannot have a narrow form?
If the diacritic needs to be placed right or left, use the regular size diacritic.
If the diacritic needs to be placed right or left, use the regular size diacritic.
Re: ad hoc narrow base + wide mark combos, overlap
20DB, 20DC, 1DCB, 1DCC, plus whichever of the combining letters happens to be wider than the base.Which others cannot have a narrow form?
Yes, and how do I deal with the overlap?If the diacritic needs to be placed right or left, use the regular size diacritic.
-
- Moderator
- Posts: 11158
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: ad hoc narrow base + wide mark combos, overlap
Maybe contextual positioning, but that makes it all rather complex.NinnaD wrote: ↑Mon May 30, 2022 6:21 am20DB, 20DC, 1DCB, 1DCC, plus whichever of the combining letters happens to be wider than the base.Which others cannot have a narrow form?
Yes, and how do I deal with the overlap?If the diacritic needs to be placed right or left, use the regular size diacritic.
Re: ad hoc narrow base + wide mark combos, overlap
Do you maybe have an example that I could work it out from?
-
- Moderator
- Posts: 11158
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: ad hoc narrow base + wide mark combos, overlap
I am not sure if this is the way to go, but this works for:
/a/gravecomb/a/gravecomb/a/threedotscomb/a/threedotscomb/i/gravecomb/i/gravecomb/i/threedotscomb/i/threedotscomb
/a/gravecomb/a/gravecomb/a/threedotscomb/a/threedotscomb/i/gravecomb/i/gravecomb/i/threedotscomb/i/threedotscomb
Code: Select all
languagesystem latn dflt; # Latin default
@base_all = [a-z idotless];
@base_ij_todotless = [i j jbar];
@mark_top = [gravecomb doubleoverlinecomb threedotscomb];
@mark_wide = [doubleoverlinecomb threedotscomb];
markClass gravecomb <anchor 53 448> @top;
markClass threedotscomb <anchor 0 502> @top;
lookup ccmp_todotless_ref { # GSUB lookup type SingleSubstitution
sub i by idotless;
} ccmp_todotless_ref;
lookup SingleAdjustment1 { # GPOS lookup type SingleAdjustment
pos a 100;
pos idotless 200;
} SingleAdjustment1;
feature ccmp { # Glyph Composition / Decomposition
sub @base_ij_todotless' lookup ccmp_todotless_ref @mark_top;
} ccmp;
feature kern { # Kerning
pos @base_all' lookup SingleAdjustment1 @mark_top @base_all @mark_wide;
pos @base_all' lookup SingleAdjustment1 @mark_wide @base_all @mark_top;
pos @base_all' lookup SingleAdjustment1 @mark_wide @base_all @mark_wide;
} kern;
feature mark { # Mark Positioning
pos base a <anchor 245 450> mark @top;
pos base idotless <anchor 163 587> mark @top;
} mark;
Re: ad hoc narrow base + wide mark combos, overlap
Great, thank you - I'll give it a go
Re: ad hoc narrow base + wide mark combos, overlap
I've tested it and worked out how it works, and indeed it's complex to implement well for all the various combinations. A nice trick would be to be able to make use of base(), lsb(...), rsb(...). E.g. to keep LSB/RSB set to base() for those marks that don't extend beyond the original glyph, but to have an OT rule to apply lsb(...), rsb(...) to combinations that do. It might be tricky to implement for ad hoc, but less so for composites with code-points. What do you think?Maybe contextual positioning, but that makes it all rather complex.
-
- Moderator
- Posts: 11158
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: ad hoc narrow base + wide mark combos, overlap
I am afraid this is getting too specialized for us to implement. We have spent a lot of time and resources in making the OpenType Designer, so you can manually add these kinds of features.
Re: ad hoc narrow base + wide mark combos, overlap
So it's not possible to define and pass a variable instead of specific number to the GPOS lookup type SingleAdjustment from your example? When I try to input sth else than a number in the CodeEditor, I get an error saying "Named value record ... not found" - can I create such a named value?
-
- Moderator
- Posts: 11158
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: ad hoc narrow base + wide mark combos, overlap
No, that is not possible.