Re: Caret

From: Philippe Verdy <>
Date: Thu, 29 Nov 2012 14:53:34 +0100

Damn !

I'm not even sure styling will still work as soon as you have substituted f
before i by f.ligaleft, the substitution disables the possibility to
position a caret there: you're no longer working at the character level but
at the glyph level, and matching logical positions and positions in the
stream of glyphs becomes a nightmare.

Even if you do (fonts have to decompose ligatured glyphs into partial
glyphs...), the final positioning complicate things a lot more : where do
you place the caret ? How can you size it if the positioning stacks the
components vertically ?

This could require additional instructions in the font for the positioning
rules (they should not only position the glyph, but also the caret
position, meaning that the glyph itself must contain also a definition of
the position and size of a caret, using virtual points : how do you
instruct the font that these virtual points are those to use for the caret
position and size ? It would require another feature table for instructing
glyphs like this:

caret f.ligaleft before(virtualpoint1, virtualpoint2)
after(virtualpoint3, virtualpoint4);
caret i.ligaright before(virtualpoint1, virtualpoint2)
after(virtualpoint3, virtualpoint4);

(this would be needed for example to position and size the caret with
positioned accents in the Latin script, or in the middle of an Hangul
syllabic cluster, or for most characters in a traditional Arabic font style
for Urdu or Persian/Farsi).

May be such extension exists or is being experimented for OpenType, but
OpenType features only define SUB and POS table formats in features. But as
these additional properties are glyph-specific and "a priori" independant
of feature selections (the caret size and positions only depends on the
selected glyphs, and will move with the repositioned glyphs) these could be
another glyphs metrics table.

And not all ligatures are decomposable this way : you took the simplest
type of ligatures (the LAM-ALEF ligature for example where it is not clear
where to put the separation, or a ligature for the Arabic name of God).

2012/11/29 QSJN 4 UKR <>

> Philippe Verdy:
> "And what about applying separate styles on components of a cluster (e.g.
> different color to an acute accent) : the difficulty is even worse due to
> selection of fonts and the way text renderers are selecting glyphs in fonts
> and positioning/substituting them (it does not work if glyphs are in
> distinct fonts or if sequences are only rendered correctly by fonts
> performing substitutions)."
> Usual realization of ligature feature is
> sub f i by f_i;
> while more usable for editing, for caret positioning, for the components
> of cluster stupid styling is
> sub f before i by f.ligaleft;
> sub i after f by i.ligaright;
> pos f.ligaleft i.ligaright…;
> i. e. never use ligature substitution and to use decompositions wherever
> the user wish. Different fonts — different possibilities :(
Received on Thu Nov 29 2012 - 07:55:37 CST

This archive was generated by hypermail 2.2.0 : Thu Nov 29 2012 - 07:55:41 CST