HarfBuzz text shaping engine
Go to file
David Corbett 2f1f961cc0 Autogenerate the BCP 47 to OpenType mappings
The new script, gen-tag-table.py, generates `ot_languages` automatically
from the [OpenType language system tag registry][ot] and the [IANA
Language Subtag Registry][bcp47] with some manual modifications. If an
OpenType tag maps to a BCP 47 macrolanguage, all the macrolanguage's
individual languages are mapped to the same OpenType tag, except for
individual languages with their own OpenType mappings. Deprecated
BCP 47 tags are canonicalized.

[ot]: https://docs.microsoft.com/en-us/typography/opentype/spec/languagetags
[bcp47]: https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry

Some OpenType tags correspond to multiple ISO 639 codes. The mapping
from ISO 639 codes lists OpenType tags in priority order, such that more
specific or more likely tags appear first.

Some OpenType tags have no corresponding ISO 639 code in the registry so
their mappings use BCP 47 subtags besides the language. For example, any
BCP 47 tag with a fonipa variant subtag is mapped to 'IPPH', and 'IPPH'
is mapped back to und-fonipa.

Other OpenType tags have no corresponding ISO 639 code because it is not
clear what they are for. HarfBuzz just ignores these tags.

One such ignored tag is 'ZHP ' (Chinese Phonetic). It probably means
zh-Latn. However, it is used in Microsoft JhengHei and Microsoft YaHei
with the script tag 'hani', implying that it is not a romanization
scheme after all. It would be simple enough to add this mapping to
gen-tag-table.py once a definitive mapping is determined.

The manual modifications are mainly either obvious mappings that the
OpenType registry omits or mappings for compatibility with previous
versions of HarfBuzz. Some of the old mappings were discarded, though,
for homophonous language names. For example, OpenType maps 'KUI ' to
kxu; previous versions of HarfBuzz also mapped it to kvd, because kvd
and kxu both happen to be called "Kui".

gen-tag-table.py also generates a function to convert multi-subtag tags
like el-polyton and zh-HK to OpenType tags, replacing `ot_languages_zh`
and the hard-coded list of special cases in `hb_ot_tags_from_language`.
It also generates a function to convert OpenType tags to BCP 47,
replacing the hard-coded list of special cases in
`hb_ot_tag_to_language`.
2018-10-11 13:54:28 -04:00
.ci [ci] minor, bring back the removed assertion 2018-03-05 13:02:50 +03:30
.circleci [circleci] Add an iOS bot (#1233) 2018-10-10 17:12:52 +03:30
docs Deprecate obsolete functions 2018-10-11 13:54:28 -04:00
m4 Delete pkg.m4 2018-08-29 15:43:39 -07:00
src Autogenerate the BCP 47 to OpenType mappings 2018-10-11 13:54:28 -04:00
test Autogenerate the BCP 47 to OpenType mappings 2018-10-11 13:54:28 -04:00
util Remove HAVE_OT 2018-10-10 16:32:35 -04:00
.editorconfig Minor build related changes 2018-03-30 22:25:35 +04:30
.travis.yml State our graphite2 dependency no-deprecated compile flag (#1220) 2018-10-04 00:29:40 +03:30
AUTHORS Add Roozbeh to AUTHORS 2014-07-01 15:51:54 -04:00
BUILD.md Improve Markdown usage in BUILD.md. 2018-01-02 10:03:29 -08:00
CMakeLists.txt Remove HAVE_OT 2018-10-10 16:32:35 -04:00
COPYING Improve license information 2012-10-28 21:26:19 -07:00
Makefile.am Add README.wine.md and touch some other docs (#939) 2018-03-29 04:22:53 +04:30
NEWS 1.9.0 2018-09-10 11:37:24 +02:00
README Add Codacy badge 2018-06-01 16:30:38 -07:00
README.md Add README.md symlink to make github happy 2014-10-01 17:45:17 -04:00
README.python.md Add README.wine.md and touch some other docs (#939) 2018-03-29 04:22:53 +04:30
README.wine.md Add README.wine.md and touch some other docs (#939) 2018-03-29 04:22:53 +04:30
RELEASING.md 1.8.7 2018-08-08 22:01:38 -07:00
THANKS Bump version to 0.9.2 2012-08-10 14:50:05 -04:00
TODO [TODO] Clean up 2018-10-04 13:28:13 +02:00
appveyor.yml [ci] Another try on mingw bot 2018-09-29 02:11:05 +03:30
autogen.sh Add Ragel-generated files to git 2018-02-20 14:36:14 -08:00
configure.ac Remove HAVE_OT 2018-10-10 16:32:35 -04:00
git.mk [git.mk] Update 2017-10-27 10:23:01 -06:00
harfbuzz.doap Move all references of old url to the new address (#622) 2017-11-20 14:49:22 -05:00
mingw32.sh Add mingw32.sh and mingw64.sh 2018-02-16 14:16:28 -08:00
mingw64.sh Add mingw32.sh and mingw64.sh 2018-02-16 14:16:28 -08:00
replace-enum-strings.cmake CMake: Support building HarfBuzz-GObject 2017-10-18 23:48:11 +08:00

README.md

Build Status Build status CircleCI Coverity Codacy Badge Coverage Status ABI Tracker

This is HarfBuzz, a text shaping library.

For bug reports, mailing list, and other information please visit:

http://harfbuzz.org/

For license information, see the file COPYING.

Documentation: https://harfbuzz.github.io