[HarfBuzz] adjustment to merge_clusters?

Jonathan Kew jfkthame at gmail.com
Sun Nov 29 23:30:17 PST 2015


Hey Behdad,

I'm wondering if we can make merge_clusters a little more conservative....?

Here's the scenario:

Assume we start with two independent base glyphs with distinct cluster 
numbers:

   <glyphA.0, glyphB.1>

Then a MultipleSubst lookup expands glyphB to two parts, which both 
inherit glyphB's cluster value:

   <glyphA.0, glyphB1.1, glyphB2.1>

Next, a LigatureSubst lookup combines glyphA with glyphB1. Currently, 
because merge_clusters extends its target range to include any following 
glyphs that share the same cluster value as the last one in the range, 
we'll get:

   <glyphAB1.0, glyphB2.0>

which ISTM is less than ideal. It's not clear to me that there's any 
totally "right" result here, but what would seem more useful to me, at 
least, would be to leave glyphB2's cluster untouched:

   <glyphAB1.0, glyphB2.1>

(In particular, this would resolve 
https://bugzilla.mozilla.org/show_bug.cgi?id=1212668.)

I assume we'd still want to extend the end in merge_clusters when the 
following glyph(s) are marks, so could we do something like the attached?

JK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: merge_clusters.patch
Type: text/x-patch
Size: 1323 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20151130/dd473736/attachment.bin>


More information about the HarfBuzz mailing list