On Sat, 23 May 2020 11:25:38 +0300 Eli Zaretskii <e...@gnu.org> wrote:
> > From: Khaled Hosny <dr.khaled.ho...@gmail.com> > > Date: Sat, 23 May 2020 09:51:21 +0200 > > Cc: harfbuzz@lists.freedesktop.org > > What are you going to do about kerning, or mark positioning? > > Partially kerning arbitrary glyphs (because the sub string match > > some regular expression) is worse than not kerning at all. > > I don't think I understand the question. How is kerning related to > the issue at hand? I'm not an expert on typesetting text (so maybe I > don't even understand what exactly is meant by "kerning" in this > context), so please tell more details about this. The simplest way of laying out proportionally spaced text is to have a fixed glyph-dependent distance ('advance width') from the 'origin' of a glyph to the origin of the next glyph and simply lay them out in a sequence, like movable type. However, if one chooses widths suitable for the sequences 'AM' and 'MV', then there may be an unsightly gap in the middle of 'AV'. Kerning is basically the process of adjusting those gaps. Kerning is done by the shaper. To do it, it needs the whole sequence of characters. To a first approximation, mark positioning is handled by passing the whole clusters to the shaper, and suitable regular expressions will handle this. However, sometimes clusters will interact. Microsoft had an example in the OpenType specification of the handling of the sequence Wö <U+0057, U+006F, U+0308> with a comparatively huge 'W'. In this example, the umlaut would be lowered to get out of the way of the 'W'. To do this, the shaper has to be presented with "W" and "ö" as part of the same sequence. Richard. _______________________________________________ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/harfbuzz