[HarfBuzz] Broken Arabic mark/mark interaction

Behdad Esfahbod behdad at behdad.org
Thu Aug 25 00:10:26 PDT 2011

Right, thanks for bringing this up.  Indeed I plan to switch to the
slightly-reordered CCC as mentioned in the FAQ.  That is:

"And notice that the rendering engine could reorder the marks internally in a
different order if it wanted to, as long as that order was canonically
equivalent. In particular, any permutation of the non-zero CCC values can be
used for a canonically equivalent internal ordering. So internally a rendering
engine could permute weights <27, 28,..., 32, 33> to <33, 27, 28,..., 32>,
getting SHADDA before all vowel signs, for example."

And, done, and pushed to master.  I tested it with Nazli and seems to be working.


PS. Yes, I'm following a test-driven development model at this time! :)

On 08/25/11 08:45, Khaled Hosny wrote:
> After the introduction of canonical reordering of combining marks
> (commit 34c22f8), I'm no longer able to do mark/mark substitution or
> positioning for mark sequences that involve shadda as a first mark (or
> most interesting sequences at least).
> After some digging, it turned out that shadda have a ccc=33 while most
> Arabic marks that combine with it have a lower ccc value, which results
> in the shadda being reordered after the other mark which,
> unsurprisingly, breaks my contextual substitution and mkmk anchors.
> The issue seems to be quite known, there is even two FAQ entries for it:
> http://unicode.org/faq/normalization.html#8
> My font substitutes certain marks when following shadda by smaller
> version, and uses mkmk anchors to properly position them. I could switch
> to using ligatures and treat <shadda><mark> and <mark><shadda> the same,
> but this is very inefficient since I want to support sequences up to
> three marks after shadda at least (and in various combinations), also I
> was trying to avoid ligatures at all in my font for several reasons, and
> I suspect that my font is not the only affected font.
> Regards,
>  Khaled

More information about the HarfBuzz mailing list