[HarfBuzz] Selecting fonts for HarfBuzz

Richard Wordingham richard.wordingham at ntlworld.com
Thu Jun 6 00:31:19 UTC 2019


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.

Again, for a Tai Tham font:

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.

Richard.


More information about the HarfBuzz mailing list