[HarfBuzz] Order of combining diacriticals

Khaled Hosny dr.khaled.hosny at gmail.com
Thu Jun 20 20:09:24 UTC 2019


On Thu, Jun 20, 2019 at 6:35 PM Eli Zaretskii <eliz at gnu.org> wrote:
>
> > From: Khaled Hosny <dr.khaled.hosny at gmail.com>
> > Date: Thu, 20 Jun 2019 17:33:47 +0200
> > Cc: Behdad Esfahbod <behdad at behdad.org>, Harfbuzz <harfbuzz at lists.freedesktop.org>
> >
> > > >    . For fonts that have no 'hebr' features, Emacs performs
> > > >      substitution of known precomposed characters before it invokes the
> > > >      shaping engine.  In this case, it substituted U+FB31 for the
> > > >      sequence U+05D1,U+05BC, and passed the sequence U+FB31,U+05B0 to
> > > >      HarfBuzz.
> > > >
> > > > You should remove all such hacks.
> > >
> > > I understand that for HarfBuzz they are probably not needed, if the
> > > necessary functions for accessing the glyphs are provided (something
> > > that might not be true on Windows, where we don't use Freetype
> > > directly).
> >
> > This functionality either depends on Unicode decompositions (or in
> > case of Hebrew hard-coded tables in HarfBuzz), so the font functions
> > used make no difference.
>
> I'm not sure I understand what font functions you are talking about
> here.
>
> The simplest font backends in Emacs: Xfont on Unix and GDI on
> MS-Windows, when working with fonts that don't have the necessary OTF
> features, might be unable, to figure out that certain combinations of
> base character and combining mark have precomposed glyphs in the font
> being used.  So Emacs feeds them the precomposed characters instead.

I mean whether you are using HarfBuzz with FreeType font functions,
internal ones or something custom does not matter for fallback Hebrew
shaping.

If you want to additionally use HarfBuzz with bitmap or Type 1 fonts
on Windows, you would need to implement custom font functions for
thase that would use GDI API to access glyph metrics and kerning, but
this is orthogonal to fallback shaping.

Regards,
Khaled


More information about the HarfBuzz mailing list