Subject: Re: bug#47235: 28.0.50; Suboptimal display of decomposed character sequences

From: Eli Zaretskii <[email-masked]>
Date: Thu, 18 Mar 2021 17:09:15 +0200

> From: Philipp Stephani <[email-masked]>
> Date: Thu, 18 Mar 2021 15:35:40 +0100
> 
> On some systems (e.g. my current GNU/Linux system), "A" followed by
> U+0308 COMBINING DIAERESIS isn't displayed as a single glyph.  See the
> attached screenshot, which compares this character sequence with the
> canonically-equivalent precomposed form "Ä".  The precomposed glyph
> form looks better, and it would be great if Emacs could use it for the
> composite variant as well.

We do something like that for Hebrew, see hebrew-font-get-precomposed
and its call in hebrew-shape-gstring.  That is based on data structure
we maintain manually.  We could do that for other scripts as well,
but:

  . if the glyph for the precomposed is not available in the font, you
    will see "tofu", which is arguably worse than what happens today
  . the HarfBuzz folks were really unhappy about such "manual
    compositions", and said we should remove that code and rely on the
    shaping engine to do this