[HarfBuzz] Arabic vowels and shaping - incomplete behavior
Tom Hacohen
tom.hacohen at partner.samsung.com
Wed Oct 27 06:19:16 PDT 2010
On Wed, 2010-10-27 at 14:26 +0200, Khaled Hosny wrote:
> On Wed, Oct 27, 2010 at 01:28:38PM +0200, Tom Hacohen wrote:
> > Hey,
> >
> > Is it just me, or do vowels break shaping in Arabic?
>
> It shouldn't, either the font is broken or you are not doing it right.
>
> Regards,
> Khaled
>
Probably the latter.
What I'm currently doing produces (for the word ضَلُّو):
infos[0] = {codepoint = 1390, mask = 1, cluster = 5, internal1 = 0,
internal2 = 2}
positions[0] = {x_advance = 2304, y_advance = 0, x_offset = 0, y_offset
= 0, internal = 0}
infos[1] = {codepoint = 5333, mask = 1, cluster = 3, internal1 = 0,
internal2 = 8}
positions[1] = {x_advance = 0, y_advance = 0, x_offset = 322, y_offset =
233, internal = 0}
infos[2] = {codepoint = 1386, mask = 1, cluster = 2, internal1 = 0,
internal2 = 2}
positions[2] = {x_advance = 3520, y_advance = 0, x_offset = 0, y_offset
= 0, internal = 0}
infos[3] = {codepoint = 1396, mask = 1, cluster = 1, internal1 = 0,
internal2 = 8}
positions[3] = {x_advance = 0, y_advance = 0, x_offset = 206, y_offset =
-934, internal = 0}
infos[4] = {codepoint = 1377, mask = 1, cluster = 0, internal1 = 0,
internal2 = 2}
positions[4] = {x_advance = 5824, y_advance = 0, x_offset = 0, y_offset
= 0, internal = 0}
Which as you can see is 5 chars while the original string was 6 (the two
vowels merged into one), but other chars didn't substituted.
My font is DejaVuSans and I just checked with font forge, LAM does have
a medial form in the font, furthermore, removing the vowels make it
transform correctly.
After thinking about it, I realized it's maybe because I didn't use
Unicode functions with the harfbuzz buffer (disabled them, waiting for a
non-glib implementation), since maybe harfbuzz depends on get combining
class, but after enabling them I get:
Program received signal SIGSEGV, Segmentation fault.
_hb_ot_shape_complex_setup_masks_arabic (c=0xbfff9d30)
at hb-ot-shape-complex-arabic.cc:712
712 c->buffer->info[i].mask |=
mask_array[c->buffer->info[i].gproperty];
because c->buffer->info[i].gproperty == 65535
So I think there's still an issue.
Language = en, Script = HB_SCRIPT_ARABIC, Buffer = as I said
Anything more needed?
Thanks,
Tom.
More information about the HarfBuzz
mailing list