[HarfBuzz] Class value of combining marks

Behdad Esfahbod behdad at behdad.org
Mon Sep 16 19:17:03 PDT 2013


On 13-09-10 08:26 AM, Khaled Hosny wrote:
> Hi Behdad,
> 
> A while ago I noticed, to my surprise, that combining marks take the
> class value of their base glyphs. I have no idea why it is done that
> way (Uniscribe seems to does this, too).

Right.


> Since cluster values are used to do reverse glyph to input character
> mapping, this has the implication that it is not possible apply any
> specific text attributes to the combining marks, like coloring them
> which have few applications in Arabic and Hebrew, at least (there are
> bugs open against Pango[1] and Firefox[2] for this, but I know realize
> it is actually a HarfBuzz issue).

Correct.


> There is also discrepancy between backends, the Graphite backend does
> not do this, nor the Core Text backend (though the last one is less
> important).
> 
> 
> I’m not sure what is the best way to move forward, decoupling the
> cluster value of combining marks from its base has the benefit of
> automatically fixed HarfBuzz clients, but it might break whatever the
> use case of that coupling in the first place. On the other hand, having
> a dedicated API for character ↔ glyph mapping (like Core Text or ICU
> Layout Engine) does not affect backward compatibility, but the clients
> will have to be modified to take advantage of it.

Some of what we do (in hb_form_clusters) can be relaxed.  However, we need
those in corner cases.  Eg. when you force a non-native direction on the text.
 As in, LTR Arabic...  I can relax those, but then native vs non-native
directions will result in different cluster granularities.  Perhaps that's not
an issue.  Another option is to add a "I know what I'm doing, give me most
granular clusters" mode.  I'll discuss this with Jonathan at the Udupi
hackfest in October. Oh yeah, agenda items are here:


https://docs.google.com/document/d/18erC6JbQhsATwvkKLYbMEbPzI78oU-XSD2vaeELlsvk/edit#heading=h.b8eq99s3koe

Feel free to suggest items.


> Regards,
> Khaled

-- 
behdad
http://behdad.org/



More information about the HarfBuzz mailing list