1. 12 10月, 2018 26 次提交
    • D
      Parse Indic3 tags · 28d091d0
      David Corbett 提交于
      28d091d0
    • B
      Remove remains of get-codepoint-fuzzer · 211cd369
      Behdad Esfahbod 提交于
      211cd369
    • B
      120ed027
    • B
      [aat] Fix two wrongs that made a right before! · 2c824d36
      Behdad Esfahbod 提交于
      Unfortunately our static asserts (DEFINE_SIZE_STATIC) don't actually
      fail when used in templates, thanks to SFINAE.  Le sighs.
      
      Probably fixes https://oss-fuzz.com/v2/testcase-detail/5740171484463104
      2c824d36
    • B
    • B
      Minor · 1d995a34
      Behdad Esfahbod 提交于
      1d995a34
    • B
      [arabic] Update to latest UTR#53 · 0744a02c
      Behdad Esfahbod 提交于
      From Lorna Evans: "That was a new character added to Unicode 11.0"
      0744a02c
    • B
      [test] Fix use of deprecated symbols · 57b05210
      Behdad Esfahbod 提交于
      57b05210
    • B
      [graphite] Remove deprecated symbol use · 4f9e36e8
      Behdad Esfahbod 提交于
      4f9e36e8
    • B
      Whitespace · da591f2a
      Behdad Esfahbod 提交于
      da591f2a
    • B
    • B
      Add doc stubs for recently added API · 8061664a
      Behdad Esfahbod 提交于
      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()
      8061664a
    • B
      Remove use of deprecated function · cf975ac6
      Behdad Esfahbod 提交于
      cf975ac6
    • D
      Increase HB_OT_MAX_TAGS_PER_SCRIPT to 3 · 66790d64
      David Corbett 提交于
      No script has 3 tags yet, but the plan is for the Indic scripts to each
      get a third tag someday.
      66790d64
    • D
      Update language system tag registry to OT 1.8.3 · bca7a169
      David Corbett 提交于
      bca7a169
    • D
      Add hb_ot_tags_to_script_and_language · 7f1fbfe2
      David Corbett 提交于
      7f1fbfe2
    • D
      Switch on the first char of a complex language tag · 3f887747
      David Corbett 提交于
      This results in a tenfold speed-up for the common case of tags that are
      not complex, in the sense of `hb_ot_tags_from_complex_language`.
      3f887747
    • D
      Map Quechua languages to closest ones with tags · a754d441
      David Corbett 提交于
      OpenType only officially maps four ISO 639 codes to Quechua languages,
      but prior versions of HarfBuzz also mapped qu to 'QUZ '. Because qu is a
      macrolanguage, the mapping now applies to all individual Quechua
      languages. OpenType calls 'QUZ ' "Quechua", but it really corresponds to
      Cusco Quechua, so the individual Quechua languages should not all
      necessarily be mapped to it.
      a754d441
    • D
      Test deprecated tag fallback in a font · 65d01f77
      David Corbett 提交于
      The font supports the deprecated tag 'DHV ' instead of 'DIV '. dv is
      mapped to 'DIV ' and 'DHV ', in that order. The test specifies
      `--language=dv`, demonstrating that if a font does not support the first
      OpenType tag mapped to a BCP 47 tag, it will fall back to the next tag.
      65d01f77
    • D
      Match extlang subtags · 7c7cb2a9
      David Corbett 提交于
      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.
      7c7cb2a9
    • D
      Autogenerate the BCP 47 to OpenType mappings · 2f1f961c
      David Corbett 提交于
      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`.
      2f1f961c
    • D
      Deprecate obsolete functions · 2c7d4db7
      David Corbett 提交于
      `hb_ot_tags` replaces `hb_ot_tags_from_script` and
      `hb_ot_tag_from_language`.
      
      `hb_ot_layout_table_select_script` replaces
      `hb_ot_layout_table_choose_script`.
      
      `hb_ot_layout_script_select_language` replaces
      `hb_ot_layout_script_find_language`.
      2c7d4db7
    • D
      Refactor the selection of script and language tags · 91067716
      David Corbett 提交于
      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.
      91067716
    • D
      Replace "ISO 639" with "BCP 47" · a03f5f4d
      David Corbett 提交于
      `hb_language_from_string` accepts not only ISO 639 but also BCP 47. Not
      all ISO 639 codes are valid BCP 47 tags but the function does not accept
      overlong language subtags anyway.
      a03f5f4d
    • B
      [aat] Apply kerx if GPOS kern was not applied · 0b9d60e1
      Behdad Esfahbod 提交于
      Ned tells me this is what Apple does.
      0b9d60e1
    • B
      Minor · b59a428a
      Behdad Esfahbod 提交于
      b59a428a
  2. 11 10月, 2018 14 次提交