[HarfBuzz] hb_script_from_iso15924_tag

Behdad Esfahbod behdad at behdad.org
Sat Oct 17 05:19:06 UTC 2020


On Fri, Oct 16, 2020 at 7:23 AM Eric Muller <emuller at amazon.com> wrote:

> On 10/15/20 6:02 PM, Behdad Esfahbod wrote:
>
> On Thu, Oct 15, 2020 at 6:01 PM Eric Muller <emuller at amazon.com> wrote:
>
>> Shouldn't hb_script_from_iso15924_tag map "Hans" and "Hant" to
>> HB_SCRIPT_HAN?
>>
>
> hb_script_from_iso15924_tag() doesn't do any mapping whatsoever.
>
> Why is that desirable?
>
>
> We start from a BCP47 tag, completed with likely subtags, and want to get
> baselines. I was hoping to use HB's knowledge of mapping from BCP47 scripts
> to OT script tags.
>

This is David Crobett's area. We don't have satisfactory BCP47 API. The
closest I see is:

  hb_ot_tags_from_script_and_language()

I don't know if that does what you need. I would guess you call that and
then hb_ot_layout_get_baseline() over the various combinations of
script/language tags from there.

For GSUB/GPOS we have hb_ot_layout_table_select_script() which does some of
the repetitive work. I can imagine the same method can be extended to also
work for BASE table.

Are you using HB BASE-table API? Because that would be a first AFAIK and
I'm interested in making it work for you.

Thanks,
behdad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/harfbuzz/attachments/20201016/87fe3388/attachment.htm>


More information about the HarfBuzz mailing list