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

Adam Twardoch (List) list.adam at twardoch.com
Wed May 6 15:21:26 PDT 2015


Excellent, thanks!
A.

Sent from my mobile phone.

> On 07.05.2015, at 00:20, Behdad Esfahbod <behdad.esfahbod at gmail.com> wrote:
> 
>> On 15-05-06 02:30 PM, Adam Twardoch (List) wrote:
>> Behdad, 
>> 
>> Can you confirm my understanding is that in HB:
>> 
>> 1. For the script tags, one must use the ISO-style ("high level") script tags to get script-specific shaping. You once told me the trick that using OT-style ("low-level") script tags would disable the script-specific shaper but still execute the OT features blindly. 
>> 
>> 2. For the language tags, one should use high-level ISO-style language tags, while the low-level OT languagesystem tags "might" work, but it's not recommended to use them. 
>> 
>> So overall, one should use the ISO-style codes.
> 
> Correct.  The HarfBuzz API is OpenType-agnostic.  When we need to map
> script/language tags from the API to OpenType, we try mapping known entries
> and if that fails, we use the tag as is (after fixing upper/lower case).
> 
> Language tags are actually BCP 47.
> 
> Also, if one wants to override OpenType language system directly, they can use
> a BCP 47 extension tag like "x-hbotZHT" for example.
> Or, eg, "zh-x-hbotZHT".
> 
> b
> 
>> A.
>> 
>> Sent from my mobile phone.
>> 
>>>> On 06.05.2015, at 22:40, Behdad Esfahbod <behdad.esfahbod at gmail.com> wrote:
>>>> 
>>>> On 15-05-06 08:08 AM, Richard Wordingham wrote:
>>>> 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
>>> 
>>> This might work, but preferred way is:
>>> 
>>> "ja" for Japanese
>>> "ko" for Korean
>>> "zh-hk" for Hong Kong
>>> "zh-hans" or "zh-cn" for Simplified Chinese
>>> "zh-hant" or "zh-tw" for Traditional Chinese
>>> 
>>> b
>>> _______________________________________________
>>> HarfBuzz mailing list
>>> HarfBuzz at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/harfbuzz
>> 


More information about the HarfBuzz mailing list