[HarfBuzz] HEH GOAL WITH HAMZA ABOVE(0x06C2) error in arabic

Khaled Hosny khaledhosny at eglug.org
Thu Jul 12 08:17:13 PDT 2012


As Jonathan pointed out, this input makes no sense if you want to the
medial heh to be in its final form as it just relies on the
peculiarities of certain fonts/rendering engines and is against the
Unicode standard. The more reliable Unicode-way is to insert a ZWNJ
(U+200C) after the medial heh to force its final form and isolated form
for the last one.

Regards,
 Khaled

On Thu, Jul 12, 2012 at 10:38:39PM +0800, datao zhang wrote:
> Hi JK:
> Thanks your reply. But, in windows 7, the <U+0628,U+06C2,U+06C2> and
> <U+0628,U+06C1, U+0654,U+06C2> will be rendered as different glyphs, refer to
> the attachment. I use the "msuighur.ttf" font file of win 7 to display such
> text, there is no medial glyph for U+06C2 in the font file. It seems win7 shape
> engine will treat U+062C as single joining.
> I also check other open source font file, example: DroidSansArabic.ttf, there
> is no medial glyph for U+06C2. So it seems most of font not include
> medial glyph for U+062C.
>  
> I think it better that treat U+062C as a single joining same as win7 shape
> engine.
>  
> Br,
> Dean
>  
> > Date: Thu, 12 Jul 2012 08:45:31 +0100
> > From: jfkthame at googlemail.com
> > To: harfbuzz at lists.freedesktop.org
> > Subject: Re: [HarfBuzz] HEH GOAL WITH HAMZA ABOVE(0x06C2) error in arabic
> >
> > On 12/7/12 04:12, datao zhang wrote:
> > > Hi Behdad:
> > > When i try to draw the text "U+0628,U+06C2,U+06C2,U+0020" with harfbuzz,
> > > i find it is rendered differently in windows 7. please see attachment
> > > file. After checking the hb-ot-shape-complex-arabic-table.hh, I found
> > > U+06C2 joining type was JOINING_TYPE_D (double joining). I don’t know
> > > why Unicode specifies it double joining, it really does not make any
> > > sense. At least, when render the text, it should be treated as single
> > > joining type.
> >
> > U+06C2 is classified as double-joining because it has a canonical
> > decomposition to <U+06C1, U+0654>, and U+06C1 is double-joining. If
> > U+06C2 were right-joining, we'd have a situation where equivalent text
> > sequences would have different joining behaviors, so that a canonical
> > normalization process might unexpectedly alter the rendering.
> >
> > While I agree that the various HEH-related characters in Unicode are a
> > confusing mess, the various compatibility and stability requirements, as
> > well as the different usage patterns needed for various languages and
> > regions, make it difficult to see how we could "fix" them.
> >
> > The broken-looking result you're getting from harfbuzz happens because
> > the font used does not have a 'medi' glyph for the U+06C2 character.
> > This is a font bug.
> >
> > To reliably produce the "windows 7" result shown in your attachment, I
> > believe the correct text sequence would be <U+0628, U+06C2, U+200C, U+06C2>.
> >
> > JK
> > _________________ ______________________________
> > HarfBuzz mailing list
> > HarfBuzz at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/harfbuzz


> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/harfbuzz




More information about the HarfBuzz mailing list