src/hb-ot-tag.cc


Log

Author Commit Date CI Message
David Corbett b207eab8 2020-04-30T11:53:21 Round-trip OpenType tags through BCP 47
Behdad Esfahbod 8fe15485 2019-06-26T13:49:42 [config] Add HB_NO_OT_TAG Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Behdad Esfahbod 971330c0 2019-06-19T16:37:35 [config] Add HB_NO_LANGUAGE_PRIVATE_SUBTAG Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Behdad Esfahbod f642a5fa 2019-06-19T16:36:09 Restructure code
David Corbett 4f37c0db 2019-06-11T17:55:31 Remove 'mym3'
Behdad Esfahbod fca27860 2019-05-11T00:37:01 [config] Make HB_DISABLE_DEPRECATED actually compile Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Behdad Esfahbod 41248cce 2019-05-07T20:54:31 Remove MIN/MAX in favor of hb_min/hb_max
David Corbett 6745a600 2019-04-16T17:29:34 Comment out ot_languages where fallback suffices
David Corbett 1ce11b44 2019-04-16T10:04:45 Reduce LangTag from 3 language system tags to 1
Behdad Esfahbod 282c76d9 2019-03-28T21:00:58 Use internal bsearch() for language tags Fixes https://github.com/harfbuzz/harfbuzz/pull/1639
Behdad Esfahbod d2db71fd 2019-03-28T21:00:58 Use internal bsearch() for language tags Fixes https://github.com/harfbuzz/harfbuzz/pull/1639
Ebrahim Byagowi e4120085 2018-12-17T21:31:01 Remove redundant void from C++ sources (#1486)
Behdad Esfahbod 39bd07ae 2018-10-26T21:01:11 Fix bunch of unused parameter warnings Show up with gcc -O0. There's a few more but those are functions that need to be filled in. Maybe this is a lost battle...
Bruce Mitchener 8d1e479d 2018-10-18T22:18:42 Use bool literals instead of 0/1.
Behdad Esfahbod 3d9a0306 2018-10-18T05:58:17 2.0.0
HinTak 26092bb3 2018-10-17T00:54:39 "allow-none" annotation for "out" parameters Fixes the following warnings: hb-ot-tag.cc:330: Warning: HarfBuzz: invalid "allow-none" annotation: only valid for pointer types and out parameters hb-ot-tag.cc:334: Warning: HarfBuzz: invalid "allow-none" annotation: only valid for pointer types and out parameters
David Corbett c5510000 2018-10-11T22:08:14 Add missing colons to GObject annotations
Behdad Esfahbod 5646dcbd 2018-10-11T19:39:07 Minor
David Corbett 28d091d0 2018-10-11T17:15:22 Parse Indic3 tags
Behdad Esfahbod da591f2a 2018-10-11T14:30:15 Whitespace
Behdad Esfahbod 8061664a 2018-10-11T14:16:55 Add doc stubs for recently added API Thanks to David Corbett who revamped our script and language processing and implemented full BCP 47 support. https://github.com/harfbuzz/harfbuzz/pull/730 New API: +hb_ot_layout_table_select_script() +hb_ot_layout_script_select_language() +HB_OT_MAX_TAGS_PER_SCRIPT +HB_OT_MAX_TAGS_PER_LANGUAGE +hb_ot_tags_from_script_and_language() +hb_ot_tags_to_script_and_language() Deprecated API: -hb_ot_layout_table_choose_script() -hb_ot_layout_script_find_language() -hb_ot_tags_from_script() -hb_ot_tag_from_language()
David Corbett 7f1fbfe2 2018-07-23T21:19:23 Add hb_ot_tags_to_script_and_language
David Corbett 7c7cb2a9 2018-01-20T15:53:09 Match extlang subtags If the second subtag of a BCP 47 tag is three letters long, it denotes an extended language. The tag converter ignores the language subtag and uses the extended language instead. There are some grandfathered exceptions, which are handled earlier.
David Corbett 2f1f961c 2017-12-08T22:45:52 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`.
David Corbett 91067716 2017-12-08T11:21:14 Refactor the selection of script and language tags The old hb-ot-tag.cc functions, `hb_ot_tags_from_script` and `hb_ot_tag_from_language`, are now wrappers around a new function: `hb_ot_tags`. It converts a script and a language to arrays of script tags and language tags. This will make it easier to add new script tags to scripts, like 'dev3'. It also allows for language fallback chains; nothing produces more than one language yet though. Where the old functions return the default tags 'DFLT' and 'dflt', `hb_ot_tags` returns an empty array. The caller is responsible for using the default tag in that case. The new function also adds a new private use subtag syntax for script overrides: "x-hbscabcd" requests a script tag of 'abcd'. The old hb-ot-layout.cc functions,`hb_ot_layout_table_choose_script` and `hb_ot_layout_script_find_language` are now wrappers around the new functions `hb_ot_layout_table_select_script` and `hb_ot_layout_script_select_language`. They are essentially the same as the old ones plus a tag count parameter. Closes #495.
Behdad Esfahbod c77ae408 2018-08-25T22:36:36 Rename hb-*private.hh to hb-*.hh Sorry for the noise, downstream custom builders. Please adjust.
Ebrahim Byagowi f24b0b97 2018-04-12T13:40:45 Update the links and revive the dead ones
David Corbett 80c1b01f 2017-12-05T08:28:42 Allow digits in language system tags
Behdad Esfahbod 8eaff980 2017-10-31T15:30:06 Remove HB_TAG_CHAR4
Behdad Esfahbod 0712e915 2017-10-29T17:01:47 Remove hb_compare_func_t
Behdad Esfahbod dbdbfe3d 2017-10-15T12:11:08 Use nullptr instead of NULL
Behdad Esfahbod c9e2cf6f 2017-10-04T16:59:22 [ot] Remove 'mal' and 'gle' lang tags Fixes https://github.com/behdad/harfbuzz/issues/477
Behdad Esfahbod 50e95229 2017-10-04T11:28:04 Add Chinantec language tags Fixes https://github.com/behdad/harfbuzz/issues/516
Behdad Esfahbod 113393ef 2017-01-21T15:12:03 Remove a few unused includes
Sascha Brawer 1337428e 2017-01-18T13:51:02 Update language tags to OpenType 1.8.1 (#403) Resolves https://github.com/behdad/harfbuzz/issues/324
Sascha Brawer e7ecbba2 2016-08-18T12:48:38 Support Americanist Phonetic Notation OpenType language system tag: `APPH` https://www.microsoft.com/typography/otspec/languagetags.htm IETF BCP47 variant tag: `fonnapa` http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
Behdad Esfahbod 37f21bdb 2016-08-08T17:57:06 Map Macao to ZHH lang tag Fixes https://github.com/behdad/harfbuzz/issues/300
Behdad Esfahbod 10a0d4aa 2016-08-08T16:51:08 Map zh-Hant-HK to ZHH Fixes https://github.com/behdad/harfbuzz/issues/300
Arthur Reutenauer adafdcdd 2015-11-07T23:37:21 Mass-added “difficult” tags – to be curated.
Arthur Reutenauer 3d6a2c0d 2015-11-07T22:59:13 Initial import of missing OpenType 1.7 language tags.
Behdad Esfahbod d05b7833 2016-01-12T16:17:21 Fix compiler warning Fixes https://github.com/behdad/harfbuzz/issues/212
Behdad Esfahbod fcf9e61b 2015-12-07T10:30:43 Fix sorting order of ot_languages array Looks like the original sort was wrongly done. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93275
Behdad Esfahbod 70952ddb 2015-12-07T10:28:46 Add test to make sure ot-languages array is sorted Currently fails. Part of https://bugs.freedesktop.org/show_bug.cgi?id=93275
Sascha Brawer f2ad935e 2015-06-28T03:29:47 Handle language tags that indicate phonetic IPA transcription The BCP-47 registry defines a variant subtag "fonipa" that can be used in combination with arbitrary other language tags. For example, "rm-CH-fonipa-sursilv" indicates the Sursilvan dialect of Romansh as used in Switzerland, transcribed used the International Phonetic Alphabet. http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
Behdad Esfahbod b8811429 2015-09-03T15:53:22 Fix Since tags Fixes https://github.com/behdad/harfbuzz/issues/103
Behdad Esfahbod 351f68f4 2015-06-12T17:46:06 [bindings] Fix hb_language_get_default() and hb_ot_tag_to_language() Part of https://github.com/behdad/harfbuzz/issues/91
Behdad Esfahbod 58015215 2015-05-06T00:40:31 Add note re OpenType 1.7 language tags
Roozbeh Pournader f6266ad2 2015-05-05T22:31:19 [minor] Remove comment about Navajo OpenType code. Apparently the code is already standardized: https://www.microsoft.com/typography/otspec/languagetags.htm
Roozbeh Pournader cfeb0562 2015-04-29T09:32:42 Add OpenType language tag 'NAV ' for Navajo. The code is not standardized yet, but is used in some Google fonts.
Behdad Esfahbod 7627100f 2014-07-11T14:54:42 Mark unsigned integer literals with the u suffix Simplifies hb_in_range() calls as the type can be inferred. The rest is obsessiveness, I admit.
Behdad Esfahbod 6334495a 2014-07-10T19:22:07 Use zh-Hans / zh-Hant when converting OT language tag to hb_language_t
Behdad Esfahbod f381e320 2014-07-10T19:20:35 Fix lang matching logic Previous code was broken logically, but harmless.
Behdad Esfahbod ee5350d6 2014-07-10T19:06:45 Accept BCP 47 zh-Hans / zh-Hant language tags
Behdad Esfahbod 2a8c49ad 2013-12-11T20:22:28 Remove unnecessary includes
Behdad Esfahbod 205bf834 2013-12-02T20:41:41 Revert "Karen" language mapping back to what it was before https://bugzilla.mozilla.org/show_bug.cgi?id=941470
Roozbeh Pournader 08c2d27d 2013-11-23T21:39:31 Added support for several new languages Based on research into latest SIL and Windows fonts, pulling in the latest OpenType language tag proposal from Microsoft, and updating to latest language tags and names from ISO 639.
Roozbeh Pournader 05511acd 2013-11-23T15:19:07 Added language tags for S'gaw Karen and Khamti Tags based on support in Windows 8.1's 'Myanmar Text' font.
Behdad Esfahbod ba2d5430 2012-12-08T19:28:41 Update OT language tags Patch from Roozbeh Pournader.
Behdad Esfahbod aba38173 2012-12-05T19:54:48 Minor
Behdad Esfahbod de796a6f 2012-11-12T17:27:51 Add "new" Myanmar OT Script tag Windows 8 added support for Myanmar shaping using the "mym2" script tag, even though Windows never supported the old "mymr" tag.
Behdad Esfahbod 10a33296 2012-11-02T13:38:55 Minor
Behdad Esfahbod 738d096a 2011-09-02T13:31:19 Pass through unknown ISO 639-3 language tags to OpenType engine In hb_ot_tag_from_language(), if first component of an unknown language is three letters long, use it directly as OpenType language tag (after case conversion and padding).
Behdad Esfahbod 4c9fe88d 2011-08-26T09:18:53 [API] Make all _from_string() functions take a len parameter Can be -1 for NUL-terminated string. This is useful for passing parts of a larger string to a function without having to copy or modify the string first. Affected functions: hb_tag_t hb_tag_from_string() hb_direction_from_string() hb_language_from_string() hb_script_from_string()
Behdad Esfahbod c605bbbb 2011-08-04T20:00:53 Remove C++ guards from source files Where causing issues for people with MSVC.
Behdad Esfahbod e3693b72 2011-06-15T09:33:52 Change a couple strstr() to strchr()
Behdad Esfahbod 744970af 2011-05-16T18:15:37 [API] Add support for vertical text Design not final yet, and in fact I'm going to change it immediately, but this is an standalone change for itself.
Behdad Esfahbod 1a64f6e1 2011-05-13T22:55:32 [API] Add HB_LANGUAGE_INVALID
Behdad Esfahbod 40b5c2e8 2011-05-13T22:46:36 [test/test-ot-tag] Test hb-ot-tag.h, fix many bugs I'm in awe with how many bugs this test revealed. All fixed.
Behdad Esfahbod d02985ec 2011-05-02T12:35:14 ISO 15924 fixes Update to http://unicode.org/iso15924 Fixes some of the test failures in test-unicode with ICU. Still one more to fix before the test passes.
Behdad Esfahbod 2409d5f8 2011-04-21T17:14:28 Update Copyright headers
Behdad Esfahbod c57d454a 2011-04-20T18:50:27 Rename all private sources and headers to C++ files So we can liberally use the simple features of C++ that parts of the codebase is already using.