[HarfBuzz] How to use 'locl' feature of Noto Sans CJK with Harfbuzz?

Richard Wordingham richard.wordingham at ntlworld.com
Wed May 6 08:08:33 PDT 2015


On Wed, 6 May 2015 11:21:15 +0000
Louis Semprini <lsemprini at hotmail.com> wrote:

> What is the specific Harfbuzz API call and arguments to use in order
> to select the Simplified Chinese, Traditional Chinese, Japanese, or
> Korean varants in Google's Noto Sans CJK font, which uses the 'locl'
> feature as explained here:
> 
> https://www.google.com/get/noto/cjk.html

It should just be hb_buffer_set_language(buffer,
                                         hb_tag_from_string(LANG));

where lang is one of the following four-character strings:

"JAN " for Japanese
"KOR " for Korean
"ZHH " for Hong Kong
"ZHS " for Simplified Chinese
"ZHT " for Traditional Chinese

However, I've never used it.

However, the sets of per-language locl features in
NotSansCJKtc-Regular.otf seem a bit odd to me (nothing for Japanese in
script hani!), so if you are having problems, it may lie with the
font.  I guess TTX is your friend if you don't have a preferred
tool for dumping GSUB tables.

The font does support variation sequences (at least, it has a cmap for
them), so they should offer a slower route if you are prepared to select
the variant character by character.

Richard.


More information about the HarfBuzz mailing list