[HarfBuzz] Different results when shaping sub-sections of text

Richard Wordingham richard.wordingham at ntlworld.com
Wed Oct 7 15:26:58 PDT 2015


On Wed, 7 Oct 2015 16:50:25 +0300
Nikolay Sivov <bunglehead at gmail.com> wrote:

> In general foolproof solution
> I think is to treat clusters as a whole and render whole cluster with
> same rendering style (like fill pattern, color or whatever).

Remember, you are far more important than the user, and should
therefore do what is easier from your point of view and works well with
European languages.

Speaking as a non-native part-time user of a truly complex Indic
script, it would be far more helpful to allow contiguous runs of
codepoints be selected than to treat clusters as indivisible.  If you
could arrange for selected characters to be distinguished, and
otherwise treated as normal, so much the better.  I'd rather the
cluster distorted horribly as I moved the cursor through than not to be
able to position the cursor within a cluster, the current compromise.

In Arabic, the shape of the consonant skeleton can be affected by
whether vowel marks are present, so it is legitimate for selection or
highlighting to alter the shape.

Indic characters are more complicated.  Multipart vowels may bracket
the (multi-)consonant syllable offset, but it would still be pleasanter
to be able to select the vowel without the preceding consonant(s).
However, it is difficult to highlight the vowel in such a case without
having a run boundary between the consonant and the vowel.  Now, one
could use a special font with coloured glyphs for most cases so as to
highlight the vowel, but highlighting the second consonant of a
geminate pair would get tricky - you'd need a special feature for each
boundary position.

Coloured glyphs would also address issues with ligatures.  In
principle, the GDEF table should record the horizontal boundaries
of their positions, but such data may be lacking, for Microsoft ignores
it and just spaces the internal boundaries evenly.  Sometimes of
course, the components are at different vertical positions rather than
at different horizontal positions.

Richard.


More information about the HarfBuzz mailing list