Page 1 of 1

Expressions - smart side-bearings (LSB, RSB, AW) for composites

Posted: Fri May 27, 2022 12:13 am
by Erwin Denissen
You can use a nifty expression for left and right side-bearings which ensures matching metrics for composites and their base characters.

The expression does not contain glyph names, which makes it even more convenient.

Say you have a composite named olongstroke ($A74B) that is made out of o and strokelongcomb. Here the stroke is wider than the o, so it is hard to determine LSB and RSB that match the metrics from the o. Then just provide base() for both LSB and RSB (or AW) and FontCreator will do the math for you.

Same goes for icircumflex, idieresis, etc, as long as the glyphs are composites.
base.png
base.png (49.49 KiB) Viewed 17615 times
Of course it also works with combining marks that not extend the width of the base character, so you can also use it for Abreveacute, acircumflexdotbelow, etc.

You can't use it for ligatures like uk-cyrl, but you can use comp(o-cyrl) for LSB and comp(u-cyrl) for RSB. If there is a need to also support base() here, we might be able to support it, just ask!