[HarfBuzz] Fwd: adjustment to merge_clusters?

Jonathan Kew jfkthame at gmail.com
Tue Dec 8 04:03:05 PST 2015


Behdad: <ping> re this issue .... any thoughts?

It would be really helpful to us if we could do a change like this; do 
you think it's likely to be a problem in any way?


-------- Forwarded Message --------
Subject: adjustment to merge_clusters?
Date: Mon, 30 Nov 2015 07:30:17 +0000
From: Jonathan Kew <jfkthame at gmail.com>
To: Behdad Esfahbod <behdad at behdad.org>
CC: Harfbuzz <harfbuzz at lists.freedesktop.org>

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: 1324 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20151208/0635feb5/attachment.bin>


More information about the HarfBuzz mailing list