langs

command
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2024 License: MIT, MIT Imports: 17 Imported by: 0

Documentation

Overview

Generator of the mapping from OpenType tags to BCP 47 tags && vice versa.

It creates an array, matching the tags from the OpenType languages system tag list to the language subtags of the BCP 47 language subtag registry, with some manual adjustments. The mappings are supplemented with macrolanguages' sublanguages && retired codes' replacements, according to BCP 47 && some manual additions where BCP 47 omits a retired code entirely.

Also generated is a function, `ambiguousTagToLanguage`, intended for use by `hb_ot_tag_to_language`. It maps OpenType tags back to BCP 47 tags. Ambiguous OpenType tags (those that correspond to multiple BCP 47 tags) are listed here, except when the alphabetically first BCP 47 tag happens to be the chosen disambiguated tag. In that case, the fallback behavior will choose the right tag anyway.

Input files: * https://docs.microsoft.com/en-us/typography/opentype/spec/languagetags * https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL