Subject: bug#33729: 27.0.50; Partial glyphs not rendered for Gujarati with Harfbuzz enabled (renders fine using m17n)

From: Khaled Hosny <[email-masked]>
Date: Fri, 14 Dec 2018 09:50:56 +0200

On Fri, Dec 14, 2018 at 07:57:55AM +0200, Eli Zaretskii wrote:
> > From: Kaushal Modi <[email-masked]>
> > Date: Thu, 13 Dec 2018 15:43:50 -0500
> > Cc: [email-masked], [email-masked], [email-masked]
> > 
> >  For debugging the such rendering differences, the actual font used by
> >  Emacs for a given part of the text need to be known,
> > 
> > I am using Mukta Vaani font for Gujarati. It is a free font and be downloaded from
> > https://ektype.in/mukta-vaani.html.
> 
> Your data indicates that the m17n build performs character composition
> at buffer position 34, whereas the harfbuzz build does not.  The
> question is why.

See my earlier email, most likely the culprit is the broken Emacs to
HarfBuzz script code mapping that we discussed earlier. HarfBuzz needs
to know the correct script of the text to perform shaping, and it looks
like we are passing nonsense values for certain scripts (or rather for
certain scripts we are lucky that the mapping is not broken).