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: Thu, 13 Dec 2018 22:53:36 +0200

On Thu, Dec 13, 2018 at 03:43:50PM -0500, Kaushal Modi wrote:
> On Thu, Dec 13, 2018 at 3:31 PM Khaled Hosny <[email-masked]>
> wrote:
> 
> >
> > The HarfBuzz rendering of Arabic is the correct one in this screenshot.
> >
> 
> Thanks. So here's the status so far:
> 
> Rendering of Namaste as seen in C-h h (M-x view-hello-file):
> 
> |          | harfbuzz | m17b    |
> |----------+----------+---------|
> | Hindi    | correct  | correct |
> | Gujarati | wrong    | correct |
> | Arabic   | correct  | wrong   |
> 
> 
> 
> > 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.
> 
> The string being rendered is "નમસ્તે".

I tried that font and text with hb-view and the output I get is
identical to m17b. If I pass a wrong script to HarfBuzz (e.g.
--script=latn), I get the same broken output you see in Emacs. So I’m
guessing something is not correctly working in script itemization. Most
likely the FIXME in uni_script(), or the FIXME above the call to
hb_buffer_guess_segment_properties().

Regards,
Khaled