[HarfBuzz] harfbuzz.old issue with fallback hebrew shaping

lars.knoll at nokia.com lars.knoll at nokia.com
Fri Jan 14 07:08:24 PST 2011


Hi Behdad,

Sorry for answering late.

The patch below looks incomplete to me, because it would also need a
change in line 146 in this case:

            if (shaped) {
                if (shaper_item->font->klass->canRender(shaper_item->font,
(HB_UChar16 *)&shaped, 1)) {
                    shapedChars[slen-1] = shaped; // <<<<<<<<<<<
                } else
                    shaped = 0;
            }

It should say cluster_start here as well. But even then I think the patch
is wrong as I only try to combine two adjacent chars (base + diacritic).
If there are two diacritics and they are ordered differently I'm don't
think sure we should reorder and combine them.

Does the person who proposed the patch any test cases this would fix?

Cheers
Lars

On 12/18/10 2:35 AM, "ext Behdad Esfahbod" <behdad at behdad.org> wrote:

>Hi Lars and Simon,
>
>The following patch was suggested to me.  It looks correct.  Can you
>please
>review?
>
>diff --git a/src/harfbuzz-hebrew.c b/src/harfbuzz-hebrew.c
>index 67029be..4f75660 100644
>--- a/src/harfbuzz-hebrew.c
>+++ b/src/harfbuzz-hebrew.c
>@@ -84,7 +84,7 @@ HB_Bool HB_HebrewShape(HB_ShaperItem *shaper_item)
>         logClusters[0] = 0;
>
>         for (i = 1; i < shaper_item->item.length; ++i) {
>-            hb_uint16 base = shapedChars[slen-1];
>+            hb_uint16 base = shapedChars[cluster_start];
>             hb_uint16 shaped = 0;
>             HB_Bool invalid = FALSE;
>             if (uc[i] == Dagesh) {
>
>
>Thanks,
>behdad




More information about the HarfBuzz mailing list