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

From: Kaushal Modi <[email-masked]>
Date: Thu, 13 Dec 2018 16:04:25 -0500

On Thu, Dec 13, 2018 at 3:53 PM Khaled Hosny <[email-masked]>
wrote:

>
> I tried that font and text with hb-view and the output I get is
> identical to m17b.

hb-view is nifty! I wasn't sure if it would work for me (because I haven't
set my terminal to show unicode, etc.). But even with the older Harfbuzz
1.0.3 that I have, hb-view gave this: https://i.imgtc.com/d1N177Z.png

I am impressed. That shows the correct rendering of નમસ્તે. (I just blindly
pasted  નમસ્તે as the second argument and hit enter, my terminal doesn't
even show the pasted text. But the hb-view rendering is correct.)

> 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().
>

I am not a C developer. But hopefully this information would help you to
fix the Harfbuzz integration with Emacs.

I am surprised that the rendering of Hindi नमस्ते using Harfbuzz in Emacs
is correct, while the  rendering of Gujarati નમસ્તે is not, when in fact
the two scripts are so similar to each other. [Fun fact: Most of Gujarati
script if superimposed with a line at the top will look like valid Hindi.
You can see that in the case of  નમસ્તે vs  नमस्ते :) ]