[HarfBuzz] Selecting fonts for HarfBuzz
Eli Zaretskii
eliz at gnu.org
Thu Jun 6 14:23:01 UTC 2019
> Date: Thu, 6 Jun 2019 01:31:19 +0100
> From: Richard Wordingham <richard.wordingham at ntlworld.com>
>
> On Wed, 05 Jun 2019 20:26:41 +0300
> Eli Zaretskii <eliz at gnu.org> wrote:
>
> > To make the question perhaps more concrete: the current code considers
> > a font to be a match for shaping with HarfBuzz if it's either OTF or
> > TTF, and covers at least one Unicode sub-range above u+00FF
> > codepoint. Is this a reasonable test, or should the code consider
> > additional font features?
>
> Even that's fraught. For example, my Tai Tham font Da Lekh includes
> some Thai characters because they're used with Tai Tham text, but
> doesn't include Thai script characters that aren't. I trust you're
> allowing for the fact that a font for an Indian script will typically
> use the dandas from the Devanagari block, without the font supporting
> anything else from the Devanagari block.
That's another layer of matching in Emacs. The lower layer constructs
a list of all fonts that could match, and then a higher layer tests
which one of those actually match the requirements of the script. I
was talking about the former one, you are talking about the latter.
> 1) Some good old faces may lack punctuation characters and logograms.
> This doesn't mean the fonts haven't been equipped with new, good GSUB
> and GPOS tables.
>
> 2) There seems to be an implication that Lao usage only uses one set of
> digits.
>
> 3) A Lao-based font would omit some consonants because they aren't used
> in the Lao tradition.
>
> 4) Some of the consonant marks are alien to modern Northern Thai
> habits, and may therefore be omitted from an old typeface.
>
> Some fonts omit explicit shaping for Tai Tham because they entirely
> reasonably want to avoid the USE. (Rumour has it that Andrew Glass
> wants to ban some words from being shaped properly.) They rely on the
> shaping being done by other features as applied to the default script.
> This doesn't work well on Windows, but could work well with HarfBuzz as
> the renderer. It's only a heuristic that they have a restricted
> repertoire - proper DIY Indic rearrangement is a pain, but even I can
> achieve it.
>
> Restricted repertoire would be very reasonable for a Myanmar script
> font - it's a more extreme version of the fact that Icelandic and
> German don't have the same set of letters.
If all else fails, Emacs offers a facility for specifying the fonts to
be used, which could go down to individual codepoints.
More information about the HarfBuzz
mailing list