Bug 1961055 - Update harfbuzz to 11.1.0. r=gfx-reviewers,lsalzman

Differential Revision: https://phabricator.services.mozilla.com/D245958
This commit is contained in:
Jonathan Kew
2025-04-17 19:21:24 +00:00
parent e95880aa13
commit f2a8fa4fbb
34 changed files with 2115 additions and 1643 deletions

View File

@@ -1,4 +1,18 @@
Overview of changes leading to 11.0.0 Overview of changes leading to 11.1.0
Wednesdat, April 16, 2025
====================================
- Include bidi mirroring variants of the requested codepoints when subsetting.
The new HB_SUBSET_FLAGS_NO_BIDI_CLOSURE can be used to disable this
behaviour.
- Various bug fixes.
- Various build fixes and improvements.
- Various test suite improvements.
New API:
+HB_SUBSET_FLAGS_NO_BIDI_CLOSURE
Overview of changes leading to 11.0.1
Friday, April 4, 2025 Friday, April 4, 2025
==================================== ====================================
- The change in version 10.3.0 to apply “trak” table tracking values to glyph - The change in version 10.3.0 to apply “trak” table tracking values to glyph

View File

@@ -2,7 +2,7 @@
[![macoOS CI Status](https://github.com/harfbuzz/harfbuzz/actions/workflows/macos-ci.yml/badge.svg)](https://github.com/harfbuzz/harfbuzz/actions/workflows/macos-ci.yml) [![macoOS CI Status](https://github.com/harfbuzz/harfbuzz/actions/workflows/macos-ci.yml/badge.svg)](https://github.com/harfbuzz/harfbuzz/actions/workflows/macos-ci.yml)
[![Windows CI Status](https://github.com/harfbuzz/harfbuzz/actions/workflows/msvc-ci.yml/badge.svg)](https://github.com/harfbuzz/harfbuzz/actions/workflows/msvc-ci.yml) [![Windows CI Status](https://github.com/harfbuzz/harfbuzz/actions/workflows/msvc-ci.yml/badge.svg)](https://github.com/harfbuzz/harfbuzz/actions/workflows/msvc-ci.yml)
[![CircleCI Build Status](https://circleci.com/gh/harfbuzz/harfbuzz/tree/main.svg?style=svg)](https://circleci.com/gh/harfbuzz/harfbuzz/tree/main) [![CircleCI Build Status](https://circleci.com/gh/harfbuzz/harfbuzz/tree/main.svg?style=svg)](https://circleci.com/gh/harfbuzz/harfbuzz/tree/main)
[![OSS-Fuzz Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/harfbuzz.svg)](https://oss-fuzz-build-logs.storage.googleapis.com/index.html) [![OSS-Fuzz Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/harfbuzz.svg)](https://oss-fuzz-build-logs.storage.googleapis.com/index.html#harfbuzz)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/15166/badge.svg)](https://scan.coverity.com/projects/harfbuzz) [![Coverity Scan Build Status](https://scan.coverity.com/projects/15166/badge.svg)](https://scan.coverity.com/projects/harfbuzz)
[![Packaging status](https://repology.org/badge/tiny-repos/harfbuzz.svg)](https://repology.org/project/harfbuzz/versions) [![Packaging status](https://repology.org/badge/tiny-repos/harfbuzz.svg)](https://repology.org/project/harfbuzz/versions)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/harfbuzz/harfbuzz/badge)](https://securityscorecards.dev/viewer/?uri=github.com/harfbuzz/harfbuzz) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/harfbuzz/harfbuzz/badge)](https://securityscorecards.dev/viewer/?uri=github.com/harfbuzz/harfbuzz)
@@ -71,20 +71,24 @@ may want to read [State of Text Rendering 2024][6].
Here are a few presentation slides about HarfBuzz at the Here are a few presentation slides about HarfBuzz at the
Internationalization and Unicode Conference over the years: Internationalization and Unicode Conference over the years:
- November 2014, [Unicode, OpenType, and HarfBuzz: Closing the Circle][7], - 2014 [Unicode, OpenType, and HarfBuzz: Closing the Circle][7]
- October 2012, [HarfBuzz, The Free and Open Text Shaping Engine][8], - 2012 [HarfBuzz, The Free and Open Text Shaping Engine][8]
- October 2009, [HarfBuzz: the Free and Open Shaping Engine][9]. - 2016 [Ten Years of HarfBuzz][20]
- 2009 [HarfBuzz: the Free and Open Shaping Engine][9]
More presentations and papers are available on [behdad][11]'s website. More presentations and papers are available on [behdad][11]'s website.
In particular, the following documents are relevant to HarfBuzz development: In particular, the following _studies_ are relevant to HarfBuzz development:
- 2025 — HarfBuzz Study: Caching — [Paper][12] - 2025 [Subsetting][21]
- 2025 — HarfBuzz Study: `hb-decycler` — [Paper][13] - 2025 [Caching][12]
- 2022 — HarfBuzz Study: `hb-iter` — [Paper][14] - 2025 [`hb-decycler`][13]
- 2022 — HarfBuzz Study: A C library written in C++ — [Paper][15] - 2022 [`hb-iter`][14]
- 2022 — HarfBuzz Study: PackTab: A static integer table packer — [Paper][16] - 2022 [A C library written in C++][15]
- 2014 — Reflections on Building the HarfBuzz Indic Shaper — [Paper][17] - 2022 [The case of the slow `hb-ft` `>h_advance` function][18]
- 2012 — HarfBuzz Memory Consumption — [Paper][10] - 2022 [PackTab: A static integer table packer][16]
- 2020 [HarfBuzz OT+AAT "Unishaper"][19]
- 2014 [Building the Indic Shaper][17]
- 2012 [Memory Consumption][10]
## Name ## Name
@@ -102,6 +106,8 @@ transliterated using the Latin script. It also means "talkative" or
> TrueType that adds support for complex script rendering, and HarfBuzz is an > TrueType that adds support for complex script rendering, and HarfBuzz is an
> implementation of OpenType complex text shaping. > implementation of OpenType complex text shaping.
## Distribution
<details> <details>
<summary>Packaging status of HarfBuzz</summary> <summary>Packaging status of HarfBuzz</summary>
@@ -125,3 +131,7 @@ transliterated using the Latin script. It also means "talkative" or
[15]: https://docs.google.com/document/d/18hI56KJpvXtwWbc9QSaz9zzhJwIMnrJ-zkAaKS-W-8k/preview [15]: https://docs.google.com/document/d/18hI56KJpvXtwWbc9QSaz9zzhJwIMnrJ-zkAaKS-W-8k/preview
[16]: https://docs.google.com/document/d/1Xq3owVt61HVkJqbLFHl73il6pcTy6PdPJJ7bSouQiQw/preview [16]: https://docs.google.com/document/d/1Xq3owVt61HVkJqbLFHl73il6pcTy6PdPJJ7bSouQiQw/preview
[17]: https://docs.google.com/document/d/1wMPwVNBvsIriamcyBO5aNs7Cdr8lmbwLJ8GmZBAswF4/preview [17]: https://docs.google.com/document/d/1wMPwVNBvsIriamcyBO5aNs7Cdr8lmbwLJ8GmZBAswF4/preview
[18]: https://docs.google.com/document/d/1wskYbA-czBt57oH9gEuGf3sWbTx7bfOiEIcDs36-heo/preview
[19]: https://prezi.com/view/THNPJGFVDUCWoM20syev/
[20]: https://behdad.org/doc/harfbuzz10years-slides.pdf
[21]: https://docs.google.com/document/d/1_vZrt97OorJ0jA1YzJ29LRcGr3YGrNJANdOABjVZGEs/preview

View File

@@ -20,11 +20,11 @@ origin:
# Human-readable identifier for this version/release # Human-readable identifier for this version/release
# Generally "version NNN", "tag SSS", "bookmark SSS" # Generally "version NNN", "tag SSS", "bookmark SSS"
release: 11.0.1 (2025-04-04T22:41:26+02:00). release: 11.1.0 (2025-04-16T20:35:58+02:00).
# Revision to pull in # Revision to pull in
# Must be a long or short commit SHA (long preferred) # Must be a long or short commit SHA (long preferred)
revision: 11.0.1 revision: 11.1.0
# The package's license, where possible using the mnemonic from # The package's license, where possible using the mnemonic from
# https://spdx.org/licenses/ # https://spdx.org/licenses/

View File

@@ -22,30 +22,30 @@ if not OBJS:
stat = 0 stat = 0
tested = 0 tested = 0
for obj in OBJS: result = subprocess.run(objdump.split () + ['-t'] + OBJS, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
result = subprocess.run(objdump.split () + ['-t', obj], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if result.returncode: if result.returncode:
if result.stderr.find (b'not recognized') != -1: if result.stderr.find (b'not recognized') != -1:
# https://github.com/harfbuzz/harfbuzz/issues/3019 # https://github.com/harfbuzz/harfbuzz/issues/3019
print ('objdump %s returned "not recognized", skipping' % obj) print ('objdump %s returned "not recognized", skipping')
continue else:
print ('objdump %s returned error:\n%s' % (obj, result.stderr.decode ('utf-8'))) print ('objdump returned error:\n%s' % (result.stderr.decode ('utf-8')))
stat = 2 stat = 2
else:
tested = 1
result = result.stdout.decode ('utf-8') result = result.stdout.decode ('utf-8')
# Checking that no object file has static initializers # Checking that no object file has static initializers
for l in re.findall (r'^.*\.[cd]tors.*$', result, re.MULTILINE): for l in re.findall (r'^.*\.[cd]tors.*$', result, re.MULTILINE):
if not re.match (r'.*\b0+\b', l): if not re.match (r'.*\b0+\b', l):
print ('Ouch, %s has static initializers/finalizers' % obj) print ('Ouch, library has static initializers/finalizers')
stat = 1 stat = 1
# Checking that no object file has lazy static C++ constructors/destructors or other such stuff # Checking that no object file has lazy static C++ constructors/destructors or other such stuff
if ('__cxa_' in result) and ('__ubsan_handle' not in result): if ('__cxa_' in result) and ('__ubsan_handle' not in result):
print ('Ouch, %s has lazy static C++ constructors/destructors or other such stuff' % obj) print ('Ouch, library has lazy static C++ constructors/destructors or other such stuff')
stat = 1 stat = 1
tested += 1
sys.exit (stat if tested else 77) sys.exit (stat if tested else 77)

View File

@@ -17,6 +17,7 @@ IGNORED_SYMBOLS += [
'rust_eh_personality', 'rust_eh_personality',
'_ZN3std9panicking11EMPTY_PANIC.*', # 'std::panicking::EMPTY_PANIC::.*' '_ZN3std9panicking11EMPTY_PANIC.*', # 'std::panicking::EMPTY_PANIC::.*'
'_ZN3std3sys3pal4unix4args3imp15ARGV_INIT_ARRAY.*', # 'std::sys::pal::unix::args::imp::ARGV_INIT_ARRAY::.*' '_ZN3std3sys3pal4unix4args3imp15ARGV_INIT_ARRAY.*', # 'std::sys::pal::unix::args::imp::ARGV_INIT_ARRAY::.*'
'_ZN3std3sys4args4unix3imp15ARGV_INIT_ARRAY.*', # std::sys::args::unix::imp::ARGV_INIT_ARRAY::.*
'_ZN17compiler_builtins4math4libm7generic4sqrt9RSQRT_TAB.*', # 'compiler_builtins::math::libm::generic::sqrt::RSQRT_TAB::.*' '_ZN17compiler_builtins4math4libm7generic4sqrt9RSQRT_TAB.*', # 'compiler_builtins::math::libm::generic::sqrt::RSQRT_TAB::.*'
] ]

View File

@@ -57,6 +57,8 @@
#include "hb-subset-input.cc" #include "hb-subset-input.cc"
#include "hb-subset-instancer-iup.cc" #include "hb-subset-instancer-iup.cc"
#include "hb-subset-instancer-solver.cc" #include "hb-subset-instancer-solver.cc"
#include "hb-subset-plan-layout.cc"
#include "hb-subset-plan-var.cc"
#include "hb-subset-plan.cc" #include "hb-subset-plan.cc"
#include "hb-subset-serialize.cc" #include "hb-subset-serialize.cc"
#include "hb-subset.cc" #include "hb-subset.cc"

View File

@@ -80,7 +80,6 @@ _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N)
#include <atomic> #include <atomic>
#define _hb_memory_barrier() std::atomic_thread_fence(std::memory_order_ack_rel)
#define _hb_memory_r_barrier() std::atomic_thread_fence(std::memory_order_acquire) #define _hb_memory_r_barrier() std::atomic_thread_fence(std::memory_order_acquire)
#define _hb_memory_w_barrier() std::atomic_thread_fence(std::memory_order_release) #define _hb_memory_w_barrier() std::atomic_thread_fence(std::memory_order_release)

View File

@@ -32,38 +32,39 @@
#include "hb.hh" #include "hb.hh"
#line 36 "hb-buffer-deserialize-json.hh" #line 33 "hb-buffer-deserialize-json.hh"
static const unsigned char _deserialize_json_trans_keys[] = { static const unsigned char _deserialize_json_trans_keys[] = {
0u, 0u, 9u, 34u, 97u, 117u, 120u, 121u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u, 0u, 0u, 9u, 34u, 97u, 121u, 120u, 121u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u,
9u, 125u, 9u, 125u, 9u, 93u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u, 9u, 93u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u,
9u, 125u, 9u, 125u, 108u, 108u, 34u, 34u, 9u, 58u, 9u, 57u, 9u, 125u, 9u, 125u, 9u, 125u, 9u, 125u, 108u, 108u, 34u, 34u, 9u, 58u, 9u, 57u, 9u, 125u, 9u, 125u,
120u, 121u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u, 34u, 34u, 120u, 121u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u, 34u, 34u,
9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u, 108u, 108u, 34u, 34u, 9u, 58u, 9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u, 108u, 108u, 34u, 34u, 9u, 58u,
9u, 57u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 34u, 92u, 9u, 125u, 9u, 57u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 34u, 92u, 9u, 125u,
34u, 92u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 9u, 125u, 9u, 123u, 34u, 92u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u,
9u, 123u, 9u, 123u, 0 34u, 34u, 9u, 58u, 9u, 57u, 9u, 125u, 98u, 98u, 9u, 123u, 9u, 123u, 9u, 123u,
0
}; };
static const char _deserialize_json_key_spans[] = { static const char _deserialize_json_key_spans[] = {
0, 26, 21, 2, 1, 50, 49, 10, 0, 26, 25, 2, 1, 50, 49, 10,
117, 117, 85, 117, 1, 50, 49, 10, 117, 117, 85, 117, 1, 50, 49, 10,
117, 117, 1, 1, 50, 49, 117, 117, 117, 117, 1, 1, 50, 49, 117, 117,
2, 1, 50, 49, 10, 117, 117, 1, 2, 1, 50, 49, 10, 117, 117, 1,
50, 49, 10, 117, 117, 1, 1, 50, 50, 49, 10, 117, 117, 1, 1, 50,
49, 117, 117, 1, 50, 49, 59, 117, 49, 117, 117, 1, 50, 49, 59, 117,
59, 117, 117, 1, 50, 49, 117, 115, 59, 117, 117, 1, 50, 49, 10, 117,
115, 115 1, 50, 49, 117, 1, 115, 115, 115
}; };
static const short _deserialize_json_index_offsets[] = { static const short _deserialize_json_index_offsets[] = {
0, 0, 27, 49, 52, 54, 105, 155, 0, 0, 27, 53, 56, 58, 109, 159,
166, 284, 402, 488, 606, 608, 659, 709, 170, 288, 406, 492, 610, 612, 663, 713,
720, 838, 956, 958, 960, 1011, 1061, 1179, 724, 842, 960, 962, 964, 1015, 1065, 1183,
1297, 1300, 1302, 1353, 1403, 1414, 1532, 1650, 1301, 1304, 1306, 1357, 1407, 1418, 1536, 1654,
1652, 1703, 1753, 1764, 1882, 2000, 2002, 2004, 1656, 1707, 1757, 1768, 1886, 2004, 2006, 2008,
2055, 2105, 2223, 2341, 2343, 2394, 2444, 2504, 2059, 2109, 2227, 2345, 2347, 2398, 2448, 2508,
2622, 2682, 2800, 2918, 2920, 2971, 3021, 3139, 2626, 2686, 2804, 2922, 2924, 2975, 3025, 3036,
3255, 3371 3154, 3156, 3207, 3257, 3375, 3377, 3493, 3609
}; };
static const char _deserialize_json_indicies[] = { static const char _deserialize_json_indicies[] = {
@@ -71,28 +72,28 @@ static const char _deserialize_json_indicies[] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
0, 1, 2, 1, 3, 1, 4, 5, 0, 1, 2, 1, 3, 1, 4, 5,
1, 6, 7, 1, 1, 1, 1, 1, 1, 6, 7, 8, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
8, 1, 9, 10, 1, 11, 1, 11, 9, 1, 8, 10, 10, 1, 11, 12,
11, 11, 11, 11, 1, 1, 1, 1, 1, 13, 1, 13, 13, 13, 13, 13,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 11, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1,
12, 1, 12, 12, 12, 12, 12, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 14, 1, 14, 14,
1, 1, 1, 1, 1, 1, 13, 1, 14, 14, 14, 1, 1, 1, 1, 1,
1, 14, 15, 15, 15, 15, 15, 15,
15, 15, 15, 1, 16, 17, 17, 17,
17, 17, 17, 17, 17, 17, 1, 18,
18, 18, 18, 18, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 18, 1, 1, 1, 1, 1, 1, 14, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 19, 1, 1, 1, 1, 1, 1, 1, 15, 1, 1, 16, 17, 17,
17, 17, 17, 17, 17, 17, 17, 1,
18, 19, 19, 19, 19, 19, 19, 19,
19, 19, 1, 20, 20, 20, 20, 20,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 20, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 21, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -102,12 +103,12 @@ static const char _deserialize_json_indicies[] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 20, 1, 21, 21, 21, 1, 1, 1, 1, 1, 1, 1, 22,
21, 21, 1, 1, 1, 1, 1, 1, 1, 23, 23, 23, 23, 23, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 27,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 25, 1, 25, 25, 25, 25, 1, 1, 1, 1, 28, 1, 1, 29,
25, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 25, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
26, 1, 1, 27, 28, 28, 28, 28,
28, 28, 28, 28, 28, 1, 29, 30,
30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
1, 31, 31, 31, 31, 31, 1, 1, 30, 1, 31, 32, 32, 32, 32, 32,
32, 32, 32, 32, 1, 33, 33, 33,
33, 33, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 33, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
31, 1, 1, 1, 1, 1, 1, 1, 34, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 32, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -171,13 +173,13 @@ static const char _deserialize_json_indicies[] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 33, 1, 31, 1, 35, 1, 33, 33, 33, 33, 33,
31, 31, 31, 31, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 1, 1, 1,
46, 1, 46, 46, 46, 46, 46, 1, 1, 1, 49, 1, 1, 50, 51, 51,
51, 51, 51, 51, 51, 51, 51, 1,
52, 53, 53, 53, 53, 53, 53, 53,
53, 53, 1, 54, 54, 54, 54, 54,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 46, 1, 1, 1, 1, 1, 1, 1, 1, 54, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 47, 1, 1, 1, 1, 1, 1, 1, 55, 1,
1, 48, 49, 49, 49, 49, 49, 49,
49, 49, 49, 1, 50, 51, 51, 51,
51, 51, 51, 51, 51, 51, 1, 52,
52, 52, 52, 52, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 52, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 53, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -256,85 +259,57 @@ static const char _deserialize_json_indicies[] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 54, 1, 52, 52, 52,
52, 52, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 52, 1, 1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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 72, 1, 74, 1,
74, 74, 74, 74, 74, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 74,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 75, 1, 75, 75, 75, 75, 75,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 75, 1, 76, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 77, 78, 78, 78, 78, 78, 1, 1, 74, 1, 72, 72, 72, 72,
78, 78, 78, 78, 1, 80, 79, 79, 72, 1, 1, 1, 1, 1, 1, 1,
79, 79, 79, 79, 79, 79, 79, 79,
79, 79, 79, 79, 79, 79, 79, 79,
79, 79, 79, 79, 79, 79, 79, 79,
79, 79, 79, 79, 79, 79, 79, 79,
79, 79, 79, 79, 79, 79, 79, 79,
79, 79, 79, 79, 79, 79, 79, 79,
79, 79, 79, 79, 79, 79, 79, 81,
79, 82, 82, 82, 82, 82, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 72, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 73,
1, 1, 1, 75, 75, 75, 75, 75,
75, 75, 75, 75, 75, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
82, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 83, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -392,65 +361,32 @@ static const char _deserialize_json_indicies[] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
74, 1, 76, 1, 76, 76, 76, 76,
76, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 76, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 84, 1, 79,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 77, 1, 77,
77, 77, 77, 77, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 77, 1,
78, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 79, 80,
80, 80, 80, 80, 80, 80, 80, 80,
1, 82, 81, 81, 81, 81, 81, 81,
81, 81, 81, 81, 81, 81, 81, 81,
81, 81, 81, 81, 81, 81, 81, 81,
81, 81, 81, 81, 81, 81, 81, 81,
81, 81, 81, 81, 81, 81, 81, 81,
81, 81, 81, 81, 81, 81, 81, 81,
81, 81, 81, 81, 81, 81, 81, 81,
81, 81, 81, 83, 81, 84, 84, 84,
84, 84, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 96, 1, 23, 23, 23, 23, 104, 1, 25, 25, 25, 25, 25, 1,
23, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 25, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -502,50 +533,51 @@ static const char _deserialize_json_indicies[] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 96, 1, 1, 1, 1, 1, 104, 1, 0
0
}; };
static const char _deserialize_json_trans_targs[] = { static const char _deserialize_json_trans_targs[] = {
1, 0, 2, 3, 18, 24, 37, 43, 1, 0, 2, 3, 18, 24, 37, 43,
51, 4, 12, 5, 6, 7, 8, 11, 51, 56, 60, 4, 12, 5, 6, 7,
8, 11, 9, 1, 10, 9, 10, 57, 8, 11, 8, 11, 9, 1, 10, 9,
13, 14, 15, 16, 17, 16, 17, 9, 10, 63, 13, 14, 15, 16, 17, 16,
1, 10, 19, 20, 21, 22, 23, 9, 17, 9, 1, 10, 19, 20, 21, 22,
1, 10, 23, 25, 31, 26, 27, 28, 23, 9, 1, 10, 23, 25, 31, 26,
29, 30, 29, 30, 9, 1, 10, 32, 27, 28, 29, 30, 29, 30, 9, 1,
33, 34, 35, 36, 35, 36, 9, 1, 10, 32, 33, 34, 35, 36, 35, 36,
10, 38, 39, 40, 41, 42, 9, 1, 9, 1, 10, 38, 39, 40, 41, 42,
10, 42, 44, 45, 46, 49, 50, 46, 9, 1, 10, 42, 44, 45, 46, 49,
47, 48, 9, 1, 10, 9, 1, 10, 50, 46, 47, 48, 9, 1, 10, 9,
50, 52, 53, 49, 54, 54, 55, 56, 1, 10, 50, 52, 53, 54, 9, 55,
55, 57, 58, 49, 59, 59, 61, 62,
1 1
}; };
static const char _deserialize_json_trans_actions[] = { static const char _deserialize_json_trans_actions[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, 2, 2, 2, 0, 0, 3, 1, 1, 0, 0, 2, 2, 2, 0,
0, 0, 1, 1, 1, 0, 0, 4, 0, 3, 0, 0, 1, 1, 1, 0,
4, 4, 0, 0, 0, 1, 1, 5, 0, 4, 4, 4, 0, 0, 0, 1,
5, 5, 0, 0, 0, 0, 0, 1, 1, 5, 5, 5, 0, 0, 0, 0,
1, 1, 0, 0, 6, 6, 6, 0, 0, 1, 1, 1, 0, 0, 6, 6,
0, 1, 1, 1, 0, 0, 7, 7, 6, 0, 0, 1, 1, 1, 0, 0,
7, 0, 0, 0, 1, 1, 8, 8, 7, 7, 7, 0, 0, 0, 1, 1,
8, 0, 0, 0, 1, 9, 9, 0, 8, 8, 8, 0, 0, 0, 1, 9,
10, 0, 11, 11, 11, 12, 12, 12, 9, 0, 10, 0, 11, 11, 11, 12,
10, 0, 0, 13, 13, 14, 0, 0, 12, 12, 10, 0, 0, 1, 1, 1,
0, 0, 0, 13, 13, 14, 0, 0,
15 15
}; };
static const int deserialize_json_start = 55; static const int deserialize_json_start = 61;
static const int deserialize_json_first_final = 55; static const int deserialize_json_first_final = 61;
static const int deserialize_json_error = 0; static const int deserialize_json_error = 0;
static const int deserialize_json_en_main = 55; static const int deserialize_json_en_main = 61;
#line 111 "hb-buffer-deserialize-json.rl" #line 115 "hb-buffer-deserialize-json.rl"
static hb_bool_t static hb_bool_t
@@ -565,12 +597,12 @@ _hb_buffer_deserialize_json (hb_buffer_t *buffer,
hb_glyph_info_t info = {0}; hb_glyph_info_t info = {0};
hb_glyph_position_t pos = {0}; hb_glyph_position_t pos = {0};
#line 569 "hb-buffer-deserialize-json.hh" #line 594 "hb-buffer-deserialize-json.hh"
{ {
cs = deserialize_json_start; cs = deserialize_json_start;
} }
#line 574 "hb-buffer-deserialize-json.hh" #line 597 "hb-buffer-deserialize-json.hh"
{ {
int _slen; int _slen;
int _trans; int _trans;
@@ -680,7 +712,7 @@ _resume:
#line 56 "hb-buffer-deserialize-json.rl" #line 56 "hb-buffer-deserialize-json.rl"
{ if (unlikely (!buffer->ensure_unicode ())) return false; } { if (unlikely (!buffer->ensure_unicode ())) return false; }
break; break;
#line 684 "hb-buffer-deserialize-json.hh" #line 689 "hb-buffer-deserialize-json.hh"
} }
_again: _again:
@@ -692,7 +724,7 @@ _again:
_out: {} _out: {}
} }
#line 132 "hb-buffer-deserialize-json.rl" #line 136 "hb-buffer-deserialize-json.rl"
*end_ptr = p; *end_ptr = p;

View File

@@ -91,6 +91,8 @@ yoffset = "\"dy\"" colon (num >tok %parse_y_offset);
xadvance= "\"ax\"" colon (num >tok %parse_x_advance); xadvance= "\"ax\"" colon (num >tok %parse_x_advance);
yadvance= "\"ay\"" colon (num >tok %parse_y_advance); yadvance= "\"ay\"" colon (num >tok %parse_y_advance);
glyphflags="\"fl\"" colon (unum >tok %parse_glyph_flags); glyphflags="\"fl\"" colon (unum >tok %parse_glyph_flags);
# Not parsed. Ignored.
glyphextents="\""("xb"|"yb"|"w"|"h")"\"" colon (num >tok);
element = glyph @ensure_glyphs element = glyph @ensure_glyphs
| unicode @ensure_unicode | unicode @ensure_unicode
@@ -99,7 +101,9 @@ element = glyph @ensure_glyphs
| yoffset | yoffset
| xadvance | xadvance
| yadvance | yadvance
| glyphflags; | glyphflags
| glyphextents
;
item = item =
( '{' space* element (comma element)* space* '}' space* (','|']') space* ) ( '{' space* element (comma element)* space* '}' space* (','|']') space* )
>clear_item >clear_item

View File

@@ -32,249 +32,344 @@
#include "hb.hh" #include "hb.hh"
#line 36 "hb-buffer-deserialize-text-glyphs.hh" #line 33 "hb-buffer-deserialize-text-glyphs.hh"
static const unsigned char _deserialize_text_glyphs_trans_keys[] = { static const unsigned char _deserialize_text_glyphs_trans_keys[] = {
0u, 0u, 35u, 124u, 48u, 57u, 93u, 124u, 45u, 57u, 48u, 57u, 35u, 124u, 45u, 57u, 0u, 0u, 35u, 124u, 48u, 57u, 60u, 124u, 45u, 57u, 48u, 57u, 44u, 44u, 45u, 57u,
48u, 57u, 35u, 124u, 35u, 124u, 35u, 124u, 48u, 57u, 35u, 124u, 45u, 57u, 48u, 57u, 48u, 57u, 44u, 44u, 45u, 57u, 48u, 57u, 44u, 44u, 45u, 57u, 48u, 57u, 62u, 62u,
93u, 124u, 45u, 57u, 48u, 57u, 35u, 124u, 45u, 57u, 48u, 57u, 35u, 124u, 35u, 124u,
35u, 124u, 35u, 124u, 35u, 124u, 35u, 124u, 48u, 57u, 35u, 124u, 45u, 57u, 48u, 57u,
44u, 44u, 45u, 57u, 48u, 57u, 35u, 124u, 35u, 124u, 44u, 57u, 35u, 124u, 43u, 124u, 44u, 44u, 45u, 57u, 48u, 57u, 35u, 124u, 35u, 124u, 44u, 57u, 35u, 124u, 43u, 124u,
48u, 124u, 35u, 124u, 35u, 124u, 35u, 124u, 0 35u, 124u, 48u, 62u, 44u, 57u, 44u, 57u, 44u, 57u, 48u, 124u, 35u, 124u, 35u, 124u,
35u, 124u, 0
}; };
static const char _deserialize_text_glyphs_key_spans[] = { static const char _deserialize_text_glyphs_key_spans[] = {
0, 90, 10, 32, 13, 10, 90, 13, 0, 90, 10, 65, 13, 10, 1, 13,
10, 90, 90, 90, 10, 90, 13, 10, 10, 1, 13, 10, 1, 13, 10, 1,
32, 13, 10, 90, 13, 10, 90, 90,
90, 90, 90, 90, 10, 90, 13, 10,
1, 13, 10, 90, 90, 14, 90, 82, 1, 13, 10, 90, 90, 14, 90, 82,
77, 90, 90, 90 90, 15, 14, 14, 14, 77, 90, 90,
90
}; };
static const short _deserialize_text_glyphs_index_offsets[] = { static const short _deserialize_text_glyphs_index_offsets[] = {
0, 0, 91, 102, 135, 149, 160, 251, 0, 0, 91, 102, 168, 182, 193, 195,
265, 276, 367, 458, 549, 560, 651, 665, 209, 220, 222, 236, 247, 249, 263, 274,
676, 678, 692, 703, 794, 885, 900, 991, 276, 309, 323, 334, 425, 439, 450, 541,
1074, 1152, 1243, 1334 632, 723, 814, 905, 996, 1007, 1098, 1112,
1123, 1125, 1139, 1150, 1241, 1332, 1347, 1438,
1521, 1612, 1628, 1643, 1658, 1673, 1751, 1842,
1933
}; };
static const char _deserialize_text_glyphs_indicies[] = { static const char _deserialize_text_glyphs_indicies[] = {
1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0, 2, 3, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 4, 0, 0, 5, 0, 0, 0, 4, 5, 0, 0, 6, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 7, 8, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 7, 0, 8, 9, 9, 9, 0, 0, 8, 0, 9, 10, 10, 10,
9, 9, 9, 9, 9, 9, 3, 10, 10, 10, 10, 10, 10, 10, 3, 11,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 10, 3, 3, 3, 3, 3, 3, 3, 3, 3,
11, 3, 3, 12, 13, 13, 13, 13, 12, 3, 3, 3, 3, 3, 3, 3,
13, 13, 13, 13, 13, 3, 14, 15, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 12,
3, 13, 3, 3, 14, 15, 15, 15,
15, 15, 15, 15, 15, 15, 3, 14,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
3, 16, 3, 3, 3, 3, 3, 3, 15, 3, 16, 3, 17, 3, 3, 18,
3, 3, 17, 3, 3, 3, 3, 3, 19, 19, 19, 19, 19, 19, 19, 19,
3, 3, 3, 3, 3, 3, 3, 3, 19, 3, 18, 19, 19, 19, 19, 19,
3, 3, 3, 3, 3, 3, 3, 3, 19, 19, 19, 19, 3, 20, 3, 21,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 22, 23, 23, 23, 23, 23,
3, 3, 3, 3, 3, 3, 3, 3, 23, 23, 23, 23, 3, 22, 23, 23,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 18, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 18, 3, 19, 3, 3, 20,
21, 21, 21, 21, 21, 21, 21, 21,
21, 3, 22, 23, 23, 23, 23, 23,
23, 23, 23, 23, 3, 24, 3, 3,
3, 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0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 7, 8, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 8, 0, 27, 27, 27,
27, 27, 27, 27, 27, 27, 27, 3,
3, 3, 3, 28, 3, 24, 3, 3,
3, 23, 23, 23, 23, 23, 23, 23,
23, 23, 23, 3, 20, 3, 3, 3,
19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 3, 16, 3, 3, 3, 15,
15, 15, 15, 15, 15, 15, 15, 15,
15, 3, 73, 73, 73, 73, 73, 73,
73, 73, 73, 73, 3, 3, 11, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 12,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 0, 3, 47, 47, 47, 47, 47, 3, 3, 3, 3, 3, 3, 12, 3,
47, 47, 47, 47, 47, 3, 3, 3, 75, 74, 74, 74, 74, 74, 74, 74,
3, 3, 3, 3, 3, 3, 3, 3, 76, 3, 74, 74, 74, 74, 74, 74,
3, 3, 3, 3, 3, 3, 3, 3, 74, 74, 74, 74, 74, 74, 74, 74,
3, 3, 3, 3, 3, 3, 3, 3, 74, 77, 78, 74, 74, 79, 74, 74,
3, 3, 3, 3, 3, 3, 3, 3, 74, 74, 74, 74, 74, 74, 74, 74,
10, 3, 3, 3, 3, 3, 3, 3, 74, 74, 74, 74, 74, 74, 74, 74,
3, 3, 3, 3, 3, 3, 3, 3, 74, 74, 74, 74, 74, 74, 74, 74,
3, 3, 3, 3, 3, 3, 3, 3, 80, 81, 82, 74, 74, 74, 74, 74,
3, 3, 3, 3, 3, 3, 3, 10, 74, 74, 74, 74, 74, 74, 74, 74,
3, 49, 48, 48, 48, 48, 48, 48, 74, 74, 74, 74, 74, 74, 74, 74,
48, 50, 3, 48, 48, 48, 48, 48, 74, 74, 74, 74, 74, 74, 74, 74,
48, 48, 48, 48, 48, 48, 48, 48, 74, 82, 74, 84, 83, 83, 83, 83,
48, 48, 48, 51, 48, 48, 52, 48, 83, 83, 83, 85, 3, 83, 83, 83,
48, 48, 48, 48, 48, 48, 48, 48, 83, 83, 83, 83, 83, 83, 83, 83,
48, 48, 48, 48, 48, 48, 48, 48, 83, 83, 83, 83, 86, 87, 83, 83,
48, 48, 48, 48, 48, 48, 48, 48, 88, 83, 83, 83, 83, 83, 83, 83,
48, 53, 54, 55, 48, 48, 48, 48, 83, 83, 83, 83, 83, 83, 83, 83,
48, 48, 48, 48, 48, 48, 48, 48, 83, 83, 83, 83, 83, 83, 83, 83,
48, 48, 48, 48, 48, 48, 48, 48, 83, 83, 83, 83, 89, 90, 83, 83,
48, 48, 48, 48, 48, 48, 48, 48, 83, 83, 83, 83, 83, 83, 83, 83,
48, 48, 55, 48, 57, 56, 56, 56, 83, 83, 83, 83, 83, 83, 83, 83,
56, 56, 56, 56, 58, 3, 56, 56, 83, 83, 83, 83, 83, 83, 83, 83,
56, 56, 56, 56, 56, 56, 56, 56, 83, 83, 83, 83, 90, 83, 91, 74,
56, 56, 56, 56, 56, 56, 59, 56, 74, 74, 74, 74, 74, 74, 92, 3,
56, 60, 56, 56, 56, 56, 56, 56, 74, 74, 74, 74, 74, 74, 74, 74,
56, 56, 56, 56, 56, 56, 56, 56, 74, 74, 74, 74, 74, 74, 74, 93,
56, 56, 56, 56, 56, 56, 56, 56, 94, 74, 74, 95, 74, 74, 74, 74,
56, 56, 56, 56, 56, 61, 62, 56, 74, 74, 74, 74, 74, 74, 74, 74,
56, 56, 56, 56, 56, 56, 56, 56, 74, 74, 74, 74, 74, 74, 74, 74,
56, 56, 56, 56, 56, 56, 56, 56, 74, 74, 74, 74, 74, 74, 74, 81,
56, 56, 56, 56, 56, 56, 56, 56, 96, 74, 74, 74, 74, 74, 74, 74,
56, 56, 56, 56, 56, 62, 56, 63, 74, 74, 74, 74, 74, 74, 74, 74,
48, 48, 48, 48, 48, 48, 48, 64, 74, 74, 74, 74, 74, 74, 74, 74,
3, 48, 48, 48, 48, 48, 48, 48, 74, 74, 74, 74, 74, 74, 74, 96,
48, 48, 48, 48, 48, 48, 48, 48, 74, 0
48, 65, 48, 48, 66, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48,
54, 67, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48,
67, 48, 0
}; };
static const char _deserialize_text_glyphs_trans_targs[] = { static const char _deserialize_text_glyphs_trans_targs[] = {
1, 2, 4, 0, 12, 14, 23, 26, 1, 2, 17, 0, 25, 28, 30, 39,
3, 24, 26, 5, 6, 11, 6, 11, 47, 3, 45, 4, 47, 5, 6, 44,
2, 7, 26, 8, 9, 10, 9, 10, 7, 8, 9, 43, 10, 11, 12, 42,
2, 26, 13, 22, 2, 4, 14, 26, 13, 14, 15, 41, 16, 47, 18, 19,
15, 16, 21, 16, 21, 17, 18, 19, 24, 19, 24, 2, 20, 4, 47, 21,
20, 19, 20, 2, 4, 26, 22, 24, 22, 23, 22, 23, 2, 4, 47, 26,
1, 2, 4, 12, 14, 27, 23, 26, 27, 40, 29, 38, 2, 17, 4, 30,
1, 2, 4, 12, 14, 23, 26, 2, 47, 31, 32, 37, 32, 37, 33, 34,
4, 12, 14, 26 35, 36, 35, 36, 2, 17, 4, 47,
38, 45, 1, 2, 17, 25, 28, 30,
48, 39, 47, 1, 2, 17, 25, 28,
30, 39, 47, 2, 17, 25, 28, 30,
47
}; };
static const char _deserialize_text_glyphs_trans_actions[] = { static const char _deserialize_text_glyphs_trans_actions[] = {
0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0,
2, 2, 3, 2, 2, 2, 0, 0, 1, 2, 2, 3, 3, 0, 0, 0,
4, 4, 4, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5, 5, 2, 2, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 2, 2,
2, 2, 2, 0, 0, 7, 2, 2, 2, 0, 0, 4, 4, 4, 4, 2,
2, 0, 0, 8, 8, 8, 0, 0, 2, 2, 0, 0, 5, 5, 5, 0,
9, 10, 10, 10, 10, 9, 9, 10, 0, 0, 2, 2, 6, 6, 6, 6,
12, 13, 13, 13, 13, 12, 13, 14, 6, 2, 2, 2, 0, 0, 7, 2,
14, 14, 14, 14 2, 2, 0, 0, 8, 8, 8, 8,
0, 0, 9, 10, 10, 10, 10, 10,
9, 9, 10, 12, 13, 13, 13, 13,
13, 12, 13, 14, 14, 14, 14, 14,
14
}; };
static const char _deserialize_text_glyphs_eof_actions[] = { static const char _deserialize_text_glyphs_eof_actions[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 11, 0 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 11,
0
}; };
static const int deserialize_text_glyphs_start = 25; static const int deserialize_text_glyphs_start = 46;
static const int deserialize_text_glyphs_first_final = 25; static const int deserialize_text_glyphs_first_final = 46;
static const int deserialize_text_glyphs_error = 0; static const int deserialize_text_glyphs_error = 0;
static const int deserialize_text_glyphs_en_main = 25; static const int deserialize_text_glyphs_en_main = 46;
#line 98 "hb-buffer-deserialize-text-glyphs.rl" #line 101 "hb-buffer-deserialize-text-glyphs.rl"
static hb_bool_t static hb_bool_t
@@ -294,12 +389,12 @@ _hb_buffer_deserialize_text_glyphs (hb_buffer_t *buffer,
hb_glyph_info_t info = {0}; hb_glyph_info_t info = {0};
hb_glyph_position_t pos = {0}; hb_glyph_position_t pos = {0};
#line 298 "hb-buffer-deserialize-text-glyphs.hh" #line 386 "hb-buffer-deserialize-text-glyphs.hh"
{ {
cs = deserialize_text_glyphs_start; cs = deserialize_text_glyphs_start;
} }
#line 303 "hb-buffer-deserialize-text-glyphs.hh" #line 389 "hb-buffer-deserialize-text-glyphs.hh"
{ {
int _slen; int _slen;
int _trans; int _trans;
@@ -457,7 +552,7 @@ _resume:
return false; return false;
} }
break; break;
#line 461 "hb-buffer-deserialize-text-glyphs.hh" #line 523 "hb-buffer-deserialize-text-glyphs.hh"
} }
_again: _again:
@@ -478,14 +573,14 @@ _again:
*end_ptr = p; *end_ptr = p;
} }
break; break;
#line 482 "hb-buffer-deserialize-text-glyphs.hh" #line 542 "hb-buffer-deserialize-text-glyphs.hh"
} }
} }
_out: {} _out: {}
} }
#line 119 "hb-buffer-deserialize-text-glyphs.rl" #line 122 "hb-buffer-deserialize-text-glyphs.rl"
*end_ptr = p; *end_ptr = p;

View File

@@ -76,7 +76,9 @@ glyph = (glyph_id | glyph_name) >tok %parse_glyph;
cluster = '=' (unum >tok %parse_cluster); cluster = '=' (unum >tok %parse_cluster);
offsets = '@' (num >tok %parse_x_offset) ',' (num >tok %parse_y_offset ); offsets = '@' (num >tok %parse_x_offset) ',' (num >tok %parse_y_offset );
advances= '+' (num >tok %parse_x_advance) (',' (num >tok %parse_y_advance))?; advances= '+' (num >tok %parse_x_advance) (',' (num >tok %parse_y_advance))?;
glyphflags= '#' (unum >tok %parse_glyph_flags); glyphflags = '#' (unum >tok %parse_glyph_flags);
# Not parsed. Ignored.
glyphextents = '<' (num ',' num ',' num ',' num) '>';
glyph_item = glyph_item =
( (
@@ -85,6 +87,7 @@ glyph_item =
offsets? offsets?
advances? advances?
glyphflags? glyphflags?
glyphextents?
( '|' | ']') ( '|' | ']')
) )
>clear_item >clear_item

View File

@@ -338,437 +338,7 @@ HB_EXTERN hb_bool_t
hb_language_matches (hb_language_t language, hb_language_matches (hb_language_t language,
hb_language_t specific); hb_language_t specific);
/** #include "hb-script-list.h"
* hb_script_t:
* @HB_SCRIPT_COMMON: `Zyyy`
* @HB_SCRIPT_INHERITED: `Zinh`
* @HB_SCRIPT_UNKNOWN: `Zzzz`
* @HB_SCRIPT_ARABIC: `Arab`
* @HB_SCRIPT_ARMENIAN: `Armn`
* @HB_SCRIPT_BENGALI: `Beng`
* @HB_SCRIPT_CYRILLIC: `Cyrl`
* @HB_SCRIPT_DEVANAGARI: `Deva`
* @HB_SCRIPT_GEORGIAN: `Geor`
* @HB_SCRIPT_GREEK: `Grek`
* @HB_SCRIPT_GUJARATI: `Gujr`
* @HB_SCRIPT_GURMUKHI: `Guru`
* @HB_SCRIPT_HANGUL: `Hang`
* @HB_SCRIPT_HAN: `Hani`
* @HB_SCRIPT_HEBREW: `Hebr`
* @HB_SCRIPT_HIRAGANA: `Hira`
* @HB_SCRIPT_KANNADA: `Knda`
* @HB_SCRIPT_KATAKANA: `Kana`
* @HB_SCRIPT_LAO: `Laoo`
* @HB_SCRIPT_LATIN: `Latn`
* @HB_SCRIPT_MALAYALAM: `Mlym`
* @HB_SCRIPT_ORIYA: `Orya`
* @HB_SCRIPT_TAMIL: `Taml`
* @HB_SCRIPT_TELUGU: `Telu`
* @HB_SCRIPT_THAI: `Thai`
* @HB_SCRIPT_TIBETAN: `Tibt`
* @HB_SCRIPT_BOPOMOFO: `Bopo`
* @HB_SCRIPT_BRAILLE: `Brai`
* @HB_SCRIPT_CANADIAN_SYLLABICS: `Cans`
* @HB_SCRIPT_CHEROKEE: `Cher`
* @HB_SCRIPT_ETHIOPIC: `Ethi`
* @HB_SCRIPT_KHMER: `Khmr`
* @HB_SCRIPT_MONGOLIAN: `Mong`
* @HB_SCRIPT_MYANMAR: `Mymr`
* @HB_SCRIPT_OGHAM: `Ogam`
* @HB_SCRIPT_RUNIC: `Runr`
* @HB_SCRIPT_SINHALA: `Sinh`
* @HB_SCRIPT_SYRIAC: `Syrc`
* @HB_SCRIPT_THAANA: `Thaa`
* @HB_SCRIPT_YI: `Yiii`
* @HB_SCRIPT_DESERET: `Dsrt`
* @HB_SCRIPT_GOTHIC: `Goth`
* @HB_SCRIPT_OLD_ITALIC: `Ital`
* @HB_SCRIPT_BUHID: `Buhd`
* @HB_SCRIPT_HANUNOO: `Hano`
* @HB_SCRIPT_TAGALOG: `Tglg`
* @HB_SCRIPT_TAGBANWA: `Tagb`
* @HB_SCRIPT_CYPRIOT: `Cprt`
* @HB_SCRIPT_LIMBU: `Limb`
* @HB_SCRIPT_LINEAR_B: `Linb`
* @HB_SCRIPT_OSMANYA: `Osma`
* @HB_SCRIPT_SHAVIAN: `Shaw`
* @HB_SCRIPT_TAI_LE: `Tale`
* @HB_SCRIPT_UGARITIC: `Ugar`
* @HB_SCRIPT_BUGINESE: `Bugi`
* @HB_SCRIPT_COPTIC: `Copt`
* @HB_SCRIPT_GLAGOLITIC: `Glag`
* @HB_SCRIPT_KHAROSHTHI: `Khar`
* @HB_SCRIPT_NEW_TAI_LUE: `Talu`
* @HB_SCRIPT_OLD_PERSIAN: `Xpeo`
* @HB_SCRIPT_SYLOTI_NAGRI: `Sylo`
* @HB_SCRIPT_TIFINAGH: `Tfng`
* @HB_SCRIPT_BALINESE: `Bali`
* @HB_SCRIPT_CUNEIFORM: `Xsux`
* @HB_SCRIPT_NKO: `Nkoo`
* @HB_SCRIPT_PHAGS_PA: `Phag`
* @HB_SCRIPT_PHOENICIAN: `Phnx`
* @HB_SCRIPT_CARIAN: `Cari`
* @HB_SCRIPT_CHAM: `Cham`
* @HB_SCRIPT_KAYAH_LI: `Kali`
* @HB_SCRIPT_LEPCHA: `Lepc`
* @HB_SCRIPT_LYCIAN: `Lyci`
* @HB_SCRIPT_LYDIAN: `Lydi`
* @HB_SCRIPT_OL_CHIKI: `Olck`
* @HB_SCRIPT_REJANG: `Rjng`
* @HB_SCRIPT_SAURASHTRA: `Saur`
* @HB_SCRIPT_SUNDANESE: `Sund`
* @HB_SCRIPT_VAI: `Vaii`
* @HB_SCRIPT_AVESTAN: `Avst`
* @HB_SCRIPT_BAMUM: `Bamu`
* @HB_SCRIPT_EGYPTIAN_HIEROGLYPHS: `Egyp`
* @HB_SCRIPT_IMPERIAL_ARAMAIC: `Armi`
* @HB_SCRIPT_INSCRIPTIONAL_PAHLAVI: `Phli`
* @HB_SCRIPT_INSCRIPTIONAL_PARTHIAN: `Prti`
* @HB_SCRIPT_JAVANESE: `Java`
* @HB_SCRIPT_KAITHI: `Kthi`
* @HB_SCRIPT_LISU: `Lisu`
* @HB_SCRIPT_MEETEI_MAYEK: `Mtei`
* @HB_SCRIPT_OLD_SOUTH_ARABIAN: `Sarb`
* @HB_SCRIPT_OLD_TURKIC: `Orkh`
* @HB_SCRIPT_SAMARITAN: `Samr`
* @HB_SCRIPT_TAI_THAM: `Lana`
* @HB_SCRIPT_TAI_VIET: `Tavt`
* @HB_SCRIPT_BATAK: `Batk`
* @HB_SCRIPT_BRAHMI: `Brah`
* @HB_SCRIPT_MANDAIC: `Mand`
* @HB_SCRIPT_CHAKMA: `Cakm`
* @HB_SCRIPT_MEROITIC_CURSIVE: `Merc`
* @HB_SCRIPT_MEROITIC_HIEROGLYPHS: `Mero`
* @HB_SCRIPT_MIAO: `Plrd`
* @HB_SCRIPT_SHARADA: `Shrd`
* @HB_SCRIPT_SORA_SOMPENG: `Sora`
* @HB_SCRIPT_TAKRI: `Takr`
* @HB_SCRIPT_BASSA_VAH: `Bass`, Since: 0.9.30
* @HB_SCRIPT_CAUCASIAN_ALBANIAN: `Aghb`, Since: 0.9.30
* @HB_SCRIPT_DUPLOYAN: `Dupl`, Since: 0.9.30
* @HB_SCRIPT_ELBASAN: `Elba`, Since: 0.9.30
* @HB_SCRIPT_GRANTHA: `Gran`, Since: 0.9.30
* @HB_SCRIPT_KHOJKI: `Khoj`, Since: 0.9.30
* @HB_SCRIPT_KHUDAWADI: `Sind`, Since: 0.9.30
* @HB_SCRIPT_LINEAR_A: `Lina`, Since: 0.9.30
* @HB_SCRIPT_MAHAJANI: `Mahj`, Since: 0.9.30
* @HB_SCRIPT_MANICHAEAN: `Mani`, Since: 0.9.30
* @HB_SCRIPT_MENDE_KIKAKUI: `Mend`, Since: 0.9.30
* @HB_SCRIPT_MODI: `Modi`, Since: 0.9.30
* @HB_SCRIPT_MRO: `Mroo`, Since: 0.9.30
* @HB_SCRIPT_NABATAEAN: `Nbat`, Since: 0.9.30
* @HB_SCRIPT_OLD_NORTH_ARABIAN: `Narb`, Since: 0.9.30
* @HB_SCRIPT_OLD_PERMIC: `Perm`, Since: 0.9.30
* @HB_SCRIPT_PAHAWH_HMONG: `Hmng`, Since: 0.9.30
* @HB_SCRIPT_PALMYRENE: `Palm`, Since: 0.9.30
* @HB_SCRIPT_PAU_CIN_HAU: `Pauc`, Since: 0.9.30
* @HB_SCRIPT_PSALTER_PAHLAVI: `Phlp`, Since: 0.9.30
* @HB_SCRIPT_SIDDHAM: `Sidd`, Since: 0.9.30
* @HB_SCRIPT_TIRHUTA: `Tirh`, Since: 0.9.30
* @HB_SCRIPT_WARANG_CITI: `Wara`, Since: 0.9.30
* @HB_SCRIPT_AHOM: `Ahom`, Since: 0.9.30
* @HB_SCRIPT_ANATOLIAN_HIEROGLYPHS: `Hluw`, Since: 0.9.30
* @HB_SCRIPT_HATRAN: `Hatr`, Since: 0.9.30
* @HB_SCRIPT_MULTANI: `Mult`, Since: 0.9.30
* @HB_SCRIPT_OLD_HUNGARIAN: `Hung`, Since: 0.9.30
* @HB_SCRIPT_SIGNWRITING: `Sgnw`, Since: 0.9.30
* @HB_SCRIPT_ADLAM: `Adlm`, Since: 1.3.0
* @HB_SCRIPT_BHAIKSUKI: `Bhks`, Since: 1.3.0
* @HB_SCRIPT_MARCHEN: `Marc`, Since: 1.3.0
* @HB_SCRIPT_OSAGE: `Osge`, Since: 1.3.0
* @HB_SCRIPT_TANGUT: `Tang`, Since: 1.3.0
* @HB_SCRIPT_NEWA: `Newa`, Since: 1.3.0
* @HB_SCRIPT_MASARAM_GONDI: `Gonm`, Since: 1.6.0
* @HB_SCRIPT_NUSHU: `Nshu`, Since: 1.6.0
* @HB_SCRIPT_SOYOMBO: `Soyo`, Since: 1.6.0
* @HB_SCRIPT_ZANABAZAR_SQUARE: `Zanb`, Since: 1.6.0
* @HB_SCRIPT_DOGRA: `Dogr`, Since: 1.8.0
* @HB_SCRIPT_GUNJALA_GONDI: `Gong`, Since: 1.8.0
* @HB_SCRIPT_HANIFI_ROHINGYA: `Rohg`, Since: 1.8.0
* @HB_SCRIPT_MAKASAR: `Maka`, Since: 1.8.0
* @HB_SCRIPT_MEDEFAIDRIN: `Medf`, Since: 1.8.0
* @HB_SCRIPT_OLD_SOGDIAN: `Sogo`, Since: 1.8.0
* @HB_SCRIPT_SOGDIAN: `Sogd`, Since: 1.8.0
* @HB_SCRIPT_ELYMAIC: `Elym`, Since: 2.4.0
* @HB_SCRIPT_NANDINAGARI: `Nand`, Since: 2.4.0
* @HB_SCRIPT_NYIAKENG_PUACHUE_HMONG: `Hmnp`, Since: 2.4.0
* @HB_SCRIPT_WANCHO: `Wcho`, Since: 2.4.0
* @HB_SCRIPT_CHORASMIAN: `Chrs`, Since: 2.6.7
* @HB_SCRIPT_DIVES_AKURU: `Diak`, Since: 2.6.7
* @HB_SCRIPT_KHITAN_SMALL_SCRIPT: `Kits`, Since: 2.6.7
* @HB_SCRIPT_YEZIDI: `Yezi`, Since: 2.6.7
* @HB_SCRIPT_CYPRO_MINOAN: `Cpmn`, Since: 3.0.0
* @HB_SCRIPT_OLD_UYGHUR: `Ougr`, Since: 3.0.0
* @HB_SCRIPT_TANGSA: `Tnsa`, Since: 3.0.0
* @HB_SCRIPT_TOTO: `Toto`, Since: 3.0.0
* @HB_SCRIPT_VITHKUQI: `Vith`, Since: 3.0.0
* @HB_SCRIPT_MATH: `Zmth`, Since: 3.4.0
* @HB_SCRIPT_KAWI: `Kawi`, Since: 5.2.0
* @HB_SCRIPT_NAG_MUNDARI: `Nagm`, Since: 5.2.0
* @HB_SCRIPT_GARAY: `Gara`, Since: 10.0.0
* @HB_SCRIPT_GURUNG_KHEMA: `Gukh`, Since: 10.0.0
* @HB_SCRIPT_KIRAT_RAI: `Krai`, Since: 10.0.0
* @HB_SCRIPT_OL_ONAL: `Onao`, Since: 10.0.0
* @HB_SCRIPT_SUNUWAR: `Sunu`, Since: 10.0.0
* @HB_SCRIPT_TODHRI: `Todr`, Since: 10.0.0
* @HB_SCRIPT_TULU_TIGALARI: `Tutg`, Since: 10.0.0
* @HB_SCRIPT_INVALID: No script set
*
* Data type for scripts. Each #hb_script_t's value is an #hb_tag_t corresponding
* to the four-letter values defined by [ISO 15924](https://unicode.org/iso15924/).
*
* See also the Script (sc) property of the Unicode Character Database.
*
**/
/* https://docs.google.com/spreadsheets/d/1Y90M0Ie3MUJ6UVCRDOypOtijlMDLNNyyLk36T6iMu0o */
typedef enum
{
HB_SCRIPT_COMMON = HB_TAG ('Z','y','y','y'), /*1.1*/
HB_SCRIPT_INHERITED = HB_TAG ('Z','i','n','h'), /*1.1*/
HB_SCRIPT_UNKNOWN = HB_TAG ('Z','z','z','z'), /*5.0*/
HB_SCRIPT_ARABIC = HB_TAG ('A','r','a','b'), /*1.1*/
HB_SCRIPT_ARMENIAN = HB_TAG ('A','r','m','n'), /*1.1*/
HB_SCRIPT_BENGALI = HB_TAG ('B','e','n','g'), /*1.1*/
HB_SCRIPT_CYRILLIC = HB_TAG ('C','y','r','l'), /*1.1*/
HB_SCRIPT_DEVANAGARI = HB_TAG ('D','e','v','a'), /*1.1*/
HB_SCRIPT_GEORGIAN = HB_TAG ('G','e','o','r'), /*1.1*/
HB_SCRIPT_GREEK = HB_TAG ('G','r','e','k'), /*1.1*/
HB_SCRIPT_GUJARATI = HB_TAG ('G','u','j','r'), /*1.1*/
HB_SCRIPT_GURMUKHI = HB_TAG ('G','u','r','u'), /*1.1*/
HB_SCRIPT_HANGUL = HB_TAG ('H','a','n','g'), /*1.1*/
HB_SCRIPT_HAN = HB_TAG ('H','a','n','i'), /*1.1*/
HB_SCRIPT_HEBREW = HB_TAG ('H','e','b','r'), /*1.1*/
HB_SCRIPT_HIRAGANA = HB_TAG ('H','i','r','a'), /*1.1*/
HB_SCRIPT_KANNADA = HB_TAG ('K','n','d','a'), /*1.1*/
HB_SCRIPT_KATAKANA = HB_TAG ('K','a','n','a'), /*1.1*/
HB_SCRIPT_LAO = HB_TAG ('L','a','o','o'), /*1.1*/
HB_SCRIPT_LATIN = HB_TAG ('L','a','t','n'), /*1.1*/
HB_SCRIPT_MALAYALAM = HB_TAG ('M','l','y','m'), /*1.1*/
HB_SCRIPT_ORIYA = HB_TAG ('O','r','y','a'), /*1.1*/
HB_SCRIPT_TAMIL = HB_TAG ('T','a','m','l'), /*1.1*/
HB_SCRIPT_TELUGU = HB_TAG ('T','e','l','u'), /*1.1*/
HB_SCRIPT_THAI = HB_TAG ('T','h','a','i'), /*1.1*/
HB_SCRIPT_TIBETAN = HB_TAG ('T','i','b','t'), /*2.0*/
HB_SCRIPT_BOPOMOFO = HB_TAG ('B','o','p','o'), /*3.0*/
HB_SCRIPT_BRAILLE = HB_TAG ('B','r','a','i'), /*3.0*/
HB_SCRIPT_CANADIAN_SYLLABICS = HB_TAG ('C','a','n','s'), /*3.0*/
HB_SCRIPT_CHEROKEE = HB_TAG ('C','h','e','r'), /*3.0*/
HB_SCRIPT_ETHIOPIC = HB_TAG ('E','t','h','i'), /*3.0*/
HB_SCRIPT_KHMER = HB_TAG ('K','h','m','r'), /*3.0*/
HB_SCRIPT_MONGOLIAN = HB_TAG ('M','o','n','g'), /*3.0*/
HB_SCRIPT_MYANMAR = HB_TAG ('M','y','m','r'), /*3.0*/
HB_SCRIPT_OGHAM = HB_TAG ('O','g','a','m'), /*3.0*/
HB_SCRIPT_RUNIC = HB_TAG ('R','u','n','r'), /*3.0*/
HB_SCRIPT_SINHALA = HB_TAG ('S','i','n','h'), /*3.0*/
HB_SCRIPT_SYRIAC = HB_TAG ('S','y','r','c'), /*3.0*/
HB_SCRIPT_THAANA = HB_TAG ('T','h','a','a'), /*3.0*/
HB_SCRIPT_YI = HB_TAG ('Y','i','i','i'), /*3.0*/
HB_SCRIPT_DESERET = HB_TAG ('D','s','r','t'), /*3.1*/
HB_SCRIPT_GOTHIC = HB_TAG ('G','o','t','h'), /*3.1*/
HB_SCRIPT_OLD_ITALIC = HB_TAG ('I','t','a','l'), /*3.1*/
HB_SCRIPT_BUHID = HB_TAG ('B','u','h','d'), /*3.2*/
HB_SCRIPT_HANUNOO = HB_TAG ('H','a','n','o'), /*3.2*/
HB_SCRIPT_TAGALOG = HB_TAG ('T','g','l','g'), /*3.2*/
HB_SCRIPT_TAGBANWA = HB_TAG ('T','a','g','b'), /*3.2*/
HB_SCRIPT_CYPRIOT = HB_TAG ('C','p','r','t'), /*4.0*/
HB_SCRIPT_LIMBU = HB_TAG ('L','i','m','b'), /*4.0*/
HB_SCRIPT_LINEAR_B = HB_TAG ('L','i','n','b'), /*4.0*/
HB_SCRIPT_OSMANYA = HB_TAG ('O','s','m','a'), /*4.0*/
HB_SCRIPT_SHAVIAN = HB_TAG ('S','h','a','w'), /*4.0*/
HB_SCRIPT_TAI_LE = HB_TAG ('T','a','l','e'), /*4.0*/
HB_SCRIPT_UGARITIC = HB_TAG ('U','g','a','r'), /*4.0*/
HB_SCRIPT_BUGINESE = HB_TAG ('B','u','g','i'), /*4.1*/
HB_SCRIPT_COPTIC = HB_TAG ('C','o','p','t'), /*4.1*/
HB_SCRIPT_GLAGOLITIC = HB_TAG ('G','l','a','g'), /*4.1*/
HB_SCRIPT_KHAROSHTHI = HB_TAG ('K','h','a','r'), /*4.1*/
HB_SCRIPT_NEW_TAI_LUE = HB_TAG ('T','a','l','u'), /*4.1*/
HB_SCRIPT_OLD_PERSIAN = HB_TAG ('X','p','e','o'), /*4.1*/
HB_SCRIPT_SYLOTI_NAGRI = HB_TAG ('S','y','l','o'), /*4.1*/
HB_SCRIPT_TIFINAGH = HB_TAG ('T','f','n','g'), /*4.1*/
HB_SCRIPT_BALINESE = HB_TAG ('B','a','l','i'), /*5.0*/
HB_SCRIPT_CUNEIFORM = HB_TAG ('X','s','u','x'), /*5.0*/
HB_SCRIPT_NKO = HB_TAG ('N','k','o','o'), /*5.0*/
HB_SCRIPT_PHAGS_PA = HB_TAG ('P','h','a','g'), /*5.0*/
HB_SCRIPT_PHOENICIAN = HB_TAG ('P','h','n','x'), /*5.0*/
HB_SCRIPT_CARIAN = HB_TAG ('C','a','r','i'), /*5.1*/
HB_SCRIPT_CHAM = HB_TAG ('C','h','a','m'), /*5.1*/
HB_SCRIPT_KAYAH_LI = HB_TAG ('K','a','l','i'), /*5.1*/
HB_SCRIPT_LEPCHA = HB_TAG ('L','e','p','c'), /*5.1*/
HB_SCRIPT_LYCIAN = HB_TAG ('L','y','c','i'), /*5.1*/
HB_SCRIPT_LYDIAN = HB_TAG ('L','y','d','i'), /*5.1*/
HB_SCRIPT_OL_CHIKI = HB_TAG ('O','l','c','k'), /*5.1*/
HB_SCRIPT_REJANG = HB_TAG ('R','j','n','g'), /*5.1*/
HB_SCRIPT_SAURASHTRA = HB_TAG ('S','a','u','r'), /*5.1*/
HB_SCRIPT_SUNDANESE = HB_TAG ('S','u','n','d'), /*5.1*/
HB_SCRIPT_VAI = HB_TAG ('V','a','i','i'), /*5.1*/
HB_SCRIPT_AVESTAN = HB_TAG ('A','v','s','t'), /*5.2*/
HB_SCRIPT_BAMUM = HB_TAG ('B','a','m','u'), /*5.2*/
HB_SCRIPT_EGYPTIAN_HIEROGLYPHS = HB_TAG ('E','g','y','p'), /*5.2*/
HB_SCRIPT_IMPERIAL_ARAMAIC = HB_TAG ('A','r','m','i'), /*5.2*/
HB_SCRIPT_INSCRIPTIONAL_PAHLAVI = HB_TAG ('P','h','l','i'), /*5.2*/
HB_SCRIPT_INSCRIPTIONAL_PARTHIAN = HB_TAG ('P','r','t','i'), /*5.2*/
HB_SCRIPT_JAVANESE = HB_TAG ('J','a','v','a'), /*5.2*/
HB_SCRIPT_KAITHI = HB_TAG ('K','t','h','i'), /*5.2*/
HB_SCRIPT_LISU = HB_TAG ('L','i','s','u'), /*5.2*/
HB_SCRIPT_MEETEI_MAYEK = HB_TAG ('M','t','e','i'), /*5.2*/
HB_SCRIPT_OLD_SOUTH_ARABIAN = HB_TAG ('S','a','r','b'), /*5.2*/
HB_SCRIPT_OLD_TURKIC = HB_TAG ('O','r','k','h'), /*5.2*/
HB_SCRIPT_SAMARITAN = HB_TAG ('S','a','m','r'), /*5.2*/
HB_SCRIPT_TAI_THAM = HB_TAG ('L','a','n','a'), /*5.2*/
HB_SCRIPT_TAI_VIET = HB_TAG ('T','a','v','t'), /*5.2*/
HB_SCRIPT_BATAK = HB_TAG ('B','a','t','k'), /*6.0*/
HB_SCRIPT_BRAHMI = HB_TAG ('B','r','a','h'), /*6.0*/
HB_SCRIPT_MANDAIC = HB_TAG ('M','a','n','d'), /*6.0*/
HB_SCRIPT_CHAKMA = HB_TAG ('C','a','k','m'), /*6.1*/
HB_SCRIPT_MEROITIC_CURSIVE = HB_TAG ('M','e','r','c'), /*6.1*/
HB_SCRIPT_MEROITIC_HIEROGLYPHS = HB_TAG ('M','e','r','o'), /*6.1*/
HB_SCRIPT_MIAO = HB_TAG ('P','l','r','d'), /*6.1*/
HB_SCRIPT_SHARADA = HB_TAG ('S','h','r','d'), /*6.1*/
HB_SCRIPT_SORA_SOMPENG = HB_TAG ('S','o','r','a'), /*6.1*/
HB_SCRIPT_TAKRI = HB_TAG ('T','a','k','r'), /*6.1*/
/*
* Since: 0.9.30
*/
HB_SCRIPT_BASSA_VAH = HB_TAG ('B','a','s','s'), /*7.0*/
HB_SCRIPT_CAUCASIAN_ALBANIAN = HB_TAG ('A','g','h','b'), /*7.0*/
HB_SCRIPT_DUPLOYAN = HB_TAG ('D','u','p','l'), /*7.0*/
HB_SCRIPT_ELBASAN = HB_TAG ('E','l','b','a'), /*7.0*/
HB_SCRIPT_GRANTHA = HB_TAG ('G','r','a','n'), /*7.0*/
HB_SCRIPT_KHOJKI = HB_TAG ('K','h','o','j'), /*7.0*/
HB_SCRIPT_KHUDAWADI = HB_TAG ('S','i','n','d'), /*7.0*/
HB_SCRIPT_LINEAR_A = HB_TAG ('L','i','n','a'), /*7.0*/
HB_SCRIPT_MAHAJANI = HB_TAG ('M','a','h','j'), /*7.0*/
HB_SCRIPT_MANICHAEAN = HB_TAG ('M','a','n','i'), /*7.0*/
HB_SCRIPT_MENDE_KIKAKUI = HB_TAG ('M','e','n','d'), /*7.0*/
HB_SCRIPT_MODI = HB_TAG ('M','o','d','i'), /*7.0*/
HB_SCRIPT_MRO = HB_TAG ('M','r','o','o'), /*7.0*/
HB_SCRIPT_NABATAEAN = HB_TAG ('N','b','a','t'), /*7.0*/
HB_SCRIPT_OLD_NORTH_ARABIAN = HB_TAG ('N','a','r','b'), /*7.0*/
HB_SCRIPT_OLD_PERMIC = HB_TAG ('P','e','r','m'), /*7.0*/
HB_SCRIPT_PAHAWH_HMONG = HB_TAG ('H','m','n','g'), /*7.0*/
HB_SCRIPT_PALMYRENE = HB_TAG ('P','a','l','m'), /*7.0*/
HB_SCRIPT_PAU_CIN_HAU = HB_TAG ('P','a','u','c'), /*7.0*/
HB_SCRIPT_PSALTER_PAHLAVI = HB_TAG ('P','h','l','p'), /*7.0*/
HB_SCRIPT_SIDDHAM = HB_TAG ('S','i','d','d'), /*7.0*/
HB_SCRIPT_TIRHUTA = HB_TAG ('T','i','r','h'), /*7.0*/
HB_SCRIPT_WARANG_CITI = HB_TAG ('W','a','r','a'), /*7.0*/
HB_SCRIPT_AHOM = HB_TAG ('A','h','o','m'), /*8.0*/
HB_SCRIPT_ANATOLIAN_HIEROGLYPHS = HB_TAG ('H','l','u','w'), /*8.0*/
HB_SCRIPT_HATRAN = HB_TAG ('H','a','t','r'), /*8.0*/
HB_SCRIPT_MULTANI = HB_TAG ('M','u','l','t'), /*8.0*/
HB_SCRIPT_OLD_HUNGARIAN = HB_TAG ('H','u','n','g'), /*8.0*/
HB_SCRIPT_SIGNWRITING = HB_TAG ('S','g','n','w'), /*8.0*/
/*
* Since 1.3.0
*/
HB_SCRIPT_ADLAM = HB_TAG ('A','d','l','m'), /*9.0*/
HB_SCRIPT_BHAIKSUKI = HB_TAG ('B','h','k','s'), /*9.0*/
HB_SCRIPT_MARCHEN = HB_TAG ('M','a','r','c'), /*9.0*/
HB_SCRIPT_OSAGE = HB_TAG ('O','s','g','e'), /*9.0*/
HB_SCRIPT_TANGUT = HB_TAG ('T','a','n','g'), /*9.0*/
HB_SCRIPT_NEWA = HB_TAG ('N','e','w','a'), /*9.0*/
/*
* Since 1.6.0
*/
HB_SCRIPT_MASARAM_GONDI = HB_TAG ('G','o','n','m'), /*10.0*/
HB_SCRIPT_NUSHU = HB_TAG ('N','s','h','u'), /*10.0*/
HB_SCRIPT_SOYOMBO = HB_TAG ('S','o','y','o'), /*10.0*/
HB_SCRIPT_ZANABAZAR_SQUARE = HB_TAG ('Z','a','n','b'), /*10.0*/
/*
* Since 1.8.0
*/
HB_SCRIPT_DOGRA = HB_TAG ('D','o','g','r'), /*11.0*/
HB_SCRIPT_GUNJALA_GONDI = HB_TAG ('G','o','n','g'), /*11.0*/
HB_SCRIPT_HANIFI_ROHINGYA = HB_TAG ('R','o','h','g'), /*11.0*/
HB_SCRIPT_MAKASAR = HB_TAG ('M','a','k','a'), /*11.0*/
HB_SCRIPT_MEDEFAIDRIN = HB_TAG ('M','e','d','f'), /*11.0*/
HB_SCRIPT_OLD_SOGDIAN = HB_TAG ('S','o','g','o'), /*11.0*/
HB_SCRIPT_SOGDIAN = HB_TAG ('S','o','g','d'), /*11.0*/
/*
* Since 2.4.0
*/
HB_SCRIPT_ELYMAIC = HB_TAG ('E','l','y','m'), /*12.0*/
HB_SCRIPT_NANDINAGARI = HB_TAG ('N','a','n','d'), /*12.0*/
HB_SCRIPT_NYIAKENG_PUACHUE_HMONG = HB_TAG ('H','m','n','p'), /*12.0*/
HB_SCRIPT_WANCHO = HB_TAG ('W','c','h','o'), /*12.0*/
/*
* Since 2.6.7
*/
HB_SCRIPT_CHORASMIAN = HB_TAG ('C','h','r','s'), /*13.0*/
HB_SCRIPT_DIVES_AKURU = HB_TAG ('D','i','a','k'), /*13.0*/
HB_SCRIPT_KHITAN_SMALL_SCRIPT = HB_TAG ('K','i','t','s'), /*13.0*/
HB_SCRIPT_YEZIDI = HB_TAG ('Y','e','z','i'), /*13.0*/
/*
* Since 3.0.0
*/
HB_SCRIPT_CYPRO_MINOAN = HB_TAG ('C','p','m','n'), /*14.0*/
HB_SCRIPT_OLD_UYGHUR = HB_TAG ('O','u','g','r'), /*14.0*/
HB_SCRIPT_TANGSA = HB_TAG ('T','n','s','a'), /*14.0*/
HB_SCRIPT_TOTO = HB_TAG ('T','o','t','o'), /*14.0*/
HB_SCRIPT_VITHKUQI = HB_TAG ('V','i','t','h'), /*14.0*/
/*
* Since 3.4.0
*/
HB_SCRIPT_MATH = HB_TAG ('Z','m','t','h'),
/*
* Since 5.2.0
*/
HB_SCRIPT_KAWI = HB_TAG ('K','a','w','i'), /*15.0*/
HB_SCRIPT_NAG_MUNDARI = HB_TAG ('N','a','g','m'), /*15.0*/
/*
* Since 10.0.0
*/
HB_SCRIPT_GARAY = HB_TAG ('G','a','r','a'), /*16.0*/
HB_SCRIPT_GURUNG_KHEMA = HB_TAG ('G','u','k','h'), /*16.0*/
HB_SCRIPT_KIRAT_RAI = HB_TAG ('K','r','a','i'), /*16.0*/
HB_SCRIPT_OL_ONAL = HB_TAG ('O','n','a','o'), /*16.0*/
HB_SCRIPT_SUNUWAR = HB_TAG ('S','u','n','u'), /*16.0*/
HB_SCRIPT_TODHRI = HB_TAG ('T','o','d','r'), /*16.0*/
HB_SCRIPT_TULU_TIGALARI = HB_TAG ('T','u','t','g'), /*16.0*/
/* No script set. */
HB_SCRIPT_INVALID = HB_TAG_NONE,
/*< private >*/
/* Dummy values to ensure any hb_tag_t value can be passed/stored as hb_script_t
* without risking undefined behavior. We have two, for historical reasons.
* HB_TAG_MAX used to be unsigned, but that was invalid Ansi C, so was changed
* to _HB_SCRIPT_MAX_VALUE to be equal to HB_TAG_MAX_SIGNED as well.
*
* See this thread for technicalities:
*
* https://lists.freedesktop.org/archives/harfbuzz/2014-March/004150.html
*/
_HB_SCRIPT_MAX_VALUE = HB_TAG_MAX_SIGNED, /*< skip >*/
_HB_SCRIPT_MAX_VALUE_SIGNED = HB_TAG_MAX_SIGNED /*< skip >*/
} hb_script_t;
/* Script functions */ /* Script functions */

View File

@@ -63,13 +63,13 @@ public:
uint64_t RegisterFontFileStream (IDWriteFontFileStream *fontFileStream) uint64_t RegisterFontFileStream (IDWriteFontFileStream *fontFileStream)
{ {
fontFileStream->AddRef (); fontFileStream->AddRef ();
auto lock = hb_lock_t (mutex); hb_lock_t lock {mutex};
mFontStreams.set (mNextFontFileKey, fontFileStream); mFontStreams.set (mNextFontFileKey, fontFileStream);
return mNextFontFileKey++; return mNextFontFileKey++;
} }
void UnregisterFontFileStream (uint64_t fontFileKey) void UnregisterFontFileStream (uint64_t fontFileKey)
{ {
auto lock = hb_lock_t (mutex); hb_lock_t lock {mutex};
IDWriteFontFileStream *stream = mFontStreams.get (fontFileKey); IDWriteFontFileStream *stream = mFontStreams.get (fontFileKey);
if (stream) if (stream)
{ {

View File

@@ -672,7 +672,7 @@ hb_face_make_immutable (hb_face_t *face)
* Since: 0.9.2 * Since: 0.9.2
**/ **/
hb_bool_t hb_bool_t
hb_face_is_immutable (const hb_face_t *face) hb_face_is_immutable (hb_face_t *face)
{ {
return hb_object_is_immutable (face); return hb_object_is_immutable (face);
} }

View File

@@ -131,7 +131,7 @@ HB_EXTERN void
hb_face_make_immutable (hb_face_t *face); hb_face_make_immutable (hb_face_t *face);
HB_EXTERN hb_bool_t HB_EXTERN hb_bool_t
hb_face_is_immutable (const hb_face_t *face); hb_face_is_immutable (hb_face_t *face);
HB_EXTERN hb_blob_t * HB_EXTERN hb_blob_t *

View File

@@ -781,8 +781,8 @@ struct hb_font_t
bool y_neg = y_scale < 0; bool y_neg = y_scale < 0;
y_mult = (y_neg ? -((int64_t) -y_scale << 16) : ((int64_t) y_scale << 16)) / upem; y_mult = (y_neg ? -((int64_t) -y_scale << 16) : ((int64_t) y_scale << 16)) / upem;
x_strength = fabsf (roundf (x_scale * x_embolden)); x_strength = roundf (abs (x_scale) * x_embolden);
y_strength = fabsf (roundf (y_scale * y_embolden)); y_strength = roundf (abs (y_scale) * y_embolden);
slant_xy = y_scale ? slant * x_scale / y_scale : 0.f; slant_xy = y_scale ? slant * x_scale / y_scale : 0.f;

View File

@@ -667,10 +667,10 @@ hb_ft_get_glyph_extents (hb_font_t *font,
float x2 = x1 + x_mult * ft_face->glyph->metrics.width; float x2 = x1 + x_mult * ft_face->glyph->metrics.width;
float y2 = y1 + y_mult * -ft_face->glyph->metrics.height; float y2 = y1 + y_mult * -ft_face->glyph->metrics.height;
extents->x_bearing = round (x1); extents->x_bearing = roundf (x1);
extents->y_bearing = round (y1); extents->y_bearing = roundf (y1);
extents->width = round (x2) - extents->x_bearing; extents->width = roundf (x2) - extents->x_bearing;
extents->height = round (y2) - extents->y_bearing; extents->height = roundf (y2) - extents->y_bearing;
return true; return true;
} }

View File

@@ -99,6 +99,8 @@ struct hb_mutex_t
hb_mutex_t () { init (); } hb_mutex_t () { init (); }
~hb_mutex_t () { fini (); } ~hb_mutex_t () { fini (); }
hb_mutex_t (const hb_mutex_t &) = delete;
hb_mutex_t &operator= (const hb_mutex_t &) = delete;
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-align" #pragma GCC diagnostic ignored "-Wcast-align"
@@ -114,6 +116,10 @@ struct hb_lock_t
hb_lock_t (hb_mutex_t &mutex_) : mutex (&mutex_) { mutex->lock (); } hb_lock_t (hb_mutex_t &mutex_) : mutex (&mutex_) { mutex->lock (); }
hb_lock_t (hb_mutex_t *mutex_) : mutex (mutex_) { if (mutex) mutex->lock (); } hb_lock_t (hb_mutex_t *mutex_) : mutex (mutex_) { if (mutex) mutex->lock (); }
~hb_lock_t () { if (mutex) mutex->unlock (); } ~hb_lock_t () { if (mutex) mutex->unlock (); }
hb_lock_t (const hb_lock_t &) = delete;
hb_lock_t &operator= (const hb_lock_t &) = delete;
private: private:
hb_mutex_t *mutex; hb_mutex_t *mutex;
}; };

View File

@@ -2863,8 +2863,13 @@ struct VarData
const hb_vector_t<const hb_vector_t<int>*>& rows) const hb_vector_t<const hb_vector_t<int>*>& rows)
{ {
TRACE_SERIALIZE (this); TRACE_SERIALIZE (this);
if (unlikely (!c->extend_min (this))) return_trace (false);
unsigned row_count = rows.length; unsigned row_count = rows.length;
if (!row_count) {
// Nothing to serialize, will be empty.
return false;
}
if (unlikely (!c->extend_min (this))) return_trace (false);
itemCount = row_count; itemCount = row_count;
int min_threshold = has_long ? -65536 : -128; int min_threshold = has_long ? -65536 : -128;
@@ -4779,12 +4784,12 @@ struct VariationDevice
hb_position_t get_x_delta (hb_font_t *font, hb_position_t get_x_delta (hb_font_t *font,
const ItemVariationStore &store, const ItemVariationStore &store,
ItemVariationStore::cache_t *store_cache = nullptr) const ItemVariationStore::cache_t *store_cache = nullptr) const
{ return font->em_scalef_x (get_delta (font, store, store_cache)); } { return !font->num_coords ? 0 : font->em_scalef_x (get_delta (font, store, store_cache)); }
hb_position_t get_y_delta (hb_font_t *font, hb_position_t get_y_delta (hb_font_t *font,
const ItemVariationStore &store, const ItemVariationStore &store,
ItemVariationStore::cache_t *store_cache = nullptr) const ItemVariationStore::cache_t *store_cache = nullptr) const
{ return font->em_scalef_y (get_delta (font, store, store_cache)); } { return !font->num_coords ? 0 : font->em_scalef_y (get_delta (font, store, store_cache)); }
VariationDevice* copy (hb_serialize_context_t *c, VariationDevice* copy (hb_serialize_context_t *c,
const hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> *layout_variation_idx_delta_map) const const hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> *layout_variation_idx_delta_map) const

View File

@@ -2632,7 +2632,8 @@ struct hb_get_glyph_alternates_dispatch_t :
* @alternate_glyphs: (out caller-allocates) (array length=alternate_count): A glyphs buffer. * @alternate_glyphs: (out caller-allocates) (array length=alternate_count): A glyphs buffer.
* Alternate glyphs associated with the glyph id. * Alternate glyphs associated with the glyph id.
* *
* Fetches alternates of a glyph from a given GSUB lookup index. * Fetches alternates of a glyph from a given GSUB lookup index. Note that for one-to-one GSUB
* glyph substitutions, this function fetches the substituted glyph.
* *
* Return value: Total number of alternates found in the specific lookup index for the given glyph id. * Return value: Total number of alternates found in the specific lookup index for the given glyph id.
* *

View File

@@ -1104,6 +1104,24 @@ struct MATH
mathVariants.sanitize (c, this)); mathVariants.sanitize (c, this));
} }
// https://github.com/harfbuzz/harfbuzz/issues/4653
HB_INTERNAL bool is_bad_cambria (hb_font_t *font) const
{
#ifndef HB_NO_MATH
switch HB_CODEPOINT_ENCODE3 (font->face->table.MATH.get_blob ()->length,
get_constant (HB_OT_MATH_CONSTANT_DISPLAY_OPERATOR_MIN_HEIGHT, font),
get_constant (HB_OT_MATH_CONSTANT_DELIMITED_SUB_FORMULA_MIN_HEIGHT, font))
{
/* sha1sum:ab4a4fe054d23061f3c039493d6f665cfda2ecf5 cambria.ttc
* sha1sum:086855301bff644f9d8827b88491fcf73a6d4cb9 cambria.ttc
* sha1sum:b1e5a3feaca2ea3dfcf79ccb377de749ecf60343 cambria.ttc */
case HB_CODEPOINT_ENCODE3 (25722, 2500, 3000):
return true;
}
#endif
return false;
}
hb_position_t get_constant (hb_ot_math_constant_t constant, hb_position_t get_constant (hb_ot_math_constant_t constant,
hb_font_t *font) const hb_font_t *font) const
{ return (this+mathConstants).get_value (constant, font); } { return (this+mathConstants).get_value (constant, font); }

View File

@@ -87,6 +87,20 @@ hb_position_t
hb_ot_math_get_constant (hb_font_t *font, hb_ot_math_get_constant (hb_font_t *font,
hb_ot_math_constant_t constant) hb_ot_math_constant_t constant)
{ {
/* https://github.com/harfbuzz/harfbuzz/issues/4653
* Cambria Math has incorrect value for displayOperatorMinHeight, and
* apparently Microsoft implementation swaps displayOperatorMinHeight and
* delimitedSubFormulaMinHeight, so we do the same if we detect Cambria Math
* with the swapped values. */
if ((constant == HB_OT_MATH_CONSTANT_DISPLAY_OPERATOR_MIN_HEIGHT ||
constant == HB_OT_MATH_CONSTANT_DELIMITED_SUB_FORMULA_MIN_HEIGHT) &&
font->face->table.MATH->is_bad_cambria (font))
{
if (constant == HB_OT_MATH_CONSTANT_DISPLAY_OPERATOR_MIN_HEIGHT)
constant = HB_OT_MATH_CONSTANT_DELIMITED_SUB_FORMULA_MIN_HEIGHT;
else
constant = HB_OT_MATH_CONSTANT_DISPLAY_OPERATOR_MIN_HEIGHT;
}
return font->face->table.MATH->get_constant(constant, font); return font->face->table.MATH->get_constant(constant, font);
} }

View File

@@ -0,0 +1,484 @@
/*
* Copyright © 2007,2008,2009 Red Hat, Inc.
* Copyright © 2011,2012 Google, Inc.
*
* This is part of HarfBuzz, a text shaping library.
*
* Permission is hereby granted, without written agreement and without
* license or royalty fees, to use, copy, modify, and distribute this
* software and its documentation for any purpose, provided that the
* above copyright notice and the following two paragraphs appear in
* all copies of this software.
*
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* Red Hat Author(s): Behdad Esfahbod
* Google Author(s): Behdad Esfahbod
*/
#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb.h> instead."
#endif
#ifndef HB_SCRIPT_LIST_H
#define HB_SCRIPT_LIST_H
/* This file belongs to the middle of hb-common.h.
* The reason it has been surgically extracted is because
* FreeType imports types and enums from hb-common.h,
* and since this enum is large and growing, we want to
* make it easy to just copy the file over to FreeType.
* https://github.com/harfbuzz/harfbuzz/issues/5271
*/
/* Dummy lines to make our checks happy. */
#if 0
#include "hb-common.h"
HB_BEGIN_DECLS
HB_END_DECLS
#endif
/**
* hb_script_t:
* @HB_SCRIPT_COMMON: `Zyyy`
* @HB_SCRIPT_INHERITED: `Zinh`
* @HB_SCRIPT_UNKNOWN: `Zzzz`
* @HB_SCRIPT_ARABIC: `Arab`
* @HB_SCRIPT_ARMENIAN: `Armn`
* @HB_SCRIPT_BENGALI: `Beng`
* @HB_SCRIPT_CYRILLIC: `Cyrl`
* @HB_SCRIPT_DEVANAGARI: `Deva`
* @HB_SCRIPT_GEORGIAN: `Geor`
* @HB_SCRIPT_GREEK: `Grek`
* @HB_SCRIPT_GUJARATI: `Gujr`
* @HB_SCRIPT_GURMUKHI: `Guru`
* @HB_SCRIPT_HANGUL: `Hang`
* @HB_SCRIPT_HAN: `Hani`
* @HB_SCRIPT_HEBREW: `Hebr`
* @HB_SCRIPT_HIRAGANA: `Hira`
* @HB_SCRIPT_KANNADA: `Knda`
* @HB_SCRIPT_KATAKANA: `Kana`
* @HB_SCRIPT_LAO: `Laoo`
* @HB_SCRIPT_LATIN: `Latn`
* @HB_SCRIPT_MALAYALAM: `Mlym`
* @HB_SCRIPT_ORIYA: `Orya`
* @HB_SCRIPT_TAMIL: `Taml`
* @HB_SCRIPT_TELUGU: `Telu`
* @HB_SCRIPT_THAI: `Thai`
* @HB_SCRIPT_TIBETAN: `Tibt`
* @HB_SCRIPT_BOPOMOFO: `Bopo`
* @HB_SCRIPT_BRAILLE: `Brai`
* @HB_SCRIPT_CANADIAN_SYLLABICS: `Cans`
* @HB_SCRIPT_CHEROKEE: `Cher`
* @HB_SCRIPT_ETHIOPIC: `Ethi`
* @HB_SCRIPT_KHMER: `Khmr`
* @HB_SCRIPT_MONGOLIAN: `Mong`
* @HB_SCRIPT_MYANMAR: `Mymr`
* @HB_SCRIPT_OGHAM: `Ogam`
* @HB_SCRIPT_RUNIC: `Runr`
* @HB_SCRIPT_SINHALA: `Sinh`
* @HB_SCRIPT_SYRIAC: `Syrc`
* @HB_SCRIPT_THAANA: `Thaa`
* @HB_SCRIPT_YI: `Yiii`
* @HB_SCRIPT_DESERET: `Dsrt`
* @HB_SCRIPT_GOTHIC: `Goth`
* @HB_SCRIPT_OLD_ITALIC: `Ital`
* @HB_SCRIPT_BUHID: `Buhd`
* @HB_SCRIPT_HANUNOO: `Hano`
* @HB_SCRIPT_TAGALOG: `Tglg`
* @HB_SCRIPT_TAGBANWA: `Tagb`
* @HB_SCRIPT_CYPRIOT: `Cprt`
* @HB_SCRIPT_LIMBU: `Limb`
* @HB_SCRIPT_LINEAR_B: `Linb`
* @HB_SCRIPT_OSMANYA: `Osma`
* @HB_SCRIPT_SHAVIAN: `Shaw`
* @HB_SCRIPT_TAI_LE: `Tale`
* @HB_SCRIPT_UGARITIC: `Ugar`
* @HB_SCRIPT_BUGINESE: `Bugi`
* @HB_SCRIPT_COPTIC: `Copt`
* @HB_SCRIPT_GLAGOLITIC: `Glag`
* @HB_SCRIPT_KHAROSHTHI: `Khar`
* @HB_SCRIPT_NEW_TAI_LUE: `Talu`
* @HB_SCRIPT_OLD_PERSIAN: `Xpeo`
* @HB_SCRIPT_SYLOTI_NAGRI: `Sylo`
* @HB_SCRIPT_TIFINAGH: `Tfng`
* @HB_SCRIPT_BALINESE: `Bali`
* @HB_SCRIPT_CUNEIFORM: `Xsux`
* @HB_SCRIPT_NKO: `Nkoo`
* @HB_SCRIPT_PHAGS_PA: `Phag`
* @HB_SCRIPT_PHOENICIAN: `Phnx`
* @HB_SCRIPT_CARIAN: `Cari`
* @HB_SCRIPT_CHAM: `Cham`
* @HB_SCRIPT_KAYAH_LI: `Kali`
* @HB_SCRIPT_LEPCHA: `Lepc`
* @HB_SCRIPT_LYCIAN: `Lyci`
* @HB_SCRIPT_LYDIAN: `Lydi`
* @HB_SCRIPT_OL_CHIKI: `Olck`
* @HB_SCRIPT_REJANG: `Rjng`
* @HB_SCRIPT_SAURASHTRA: `Saur`
* @HB_SCRIPT_SUNDANESE: `Sund`
* @HB_SCRIPT_VAI: `Vaii`
* @HB_SCRIPT_AVESTAN: `Avst`
* @HB_SCRIPT_BAMUM: `Bamu`
* @HB_SCRIPT_EGYPTIAN_HIEROGLYPHS: `Egyp`
* @HB_SCRIPT_IMPERIAL_ARAMAIC: `Armi`
* @HB_SCRIPT_INSCRIPTIONAL_PAHLAVI: `Phli`
* @HB_SCRIPT_INSCRIPTIONAL_PARTHIAN: `Prti`
* @HB_SCRIPT_JAVANESE: `Java`
* @HB_SCRIPT_KAITHI: `Kthi`
* @HB_SCRIPT_LISU: `Lisu`
* @HB_SCRIPT_MEETEI_MAYEK: `Mtei`
* @HB_SCRIPT_OLD_SOUTH_ARABIAN: `Sarb`
* @HB_SCRIPT_OLD_TURKIC: `Orkh`
* @HB_SCRIPT_SAMARITAN: `Samr`
* @HB_SCRIPT_TAI_THAM: `Lana`
* @HB_SCRIPT_TAI_VIET: `Tavt`
* @HB_SCRIPT_BATAK: `Batk`
* @HB_SCRIPT_BRAHMI: `Brah`
* @HB_SCRIPT_MANDAIC: `Mand`
* @HB_SCRIPT_CHAKMA: `Cakm`
* @HB_SCRIPT_MEROITIC_CURSIVE: `Merc`
* @HB_SCRIPT_MEROITIC_HIEROGLYPHS: `Mero`
* @HB_SCRIPT_MIAO: `Plrd`
* @HB_SCRIPT_SHARADA: `Shrd`
* @HB_SCRIPT_SORA_SOMPENG: `Sora`
* @HB_SCRIPT_TAKRI: `Takr`
* @HB_SCRIPT_BASSA_VAH: `Bass`, Since: 0.9.30
* @HB_SCRIPT_CAUCASIAN_ALBANIAN: `Aghb`, Since: 0.9.30
* @HB_SCRIPT_DUPLOYAN: `Dupl`, Since: 0.9.30
* @HB_SCRIPT_ELBASAN: `Elba`, Since: 0.9.30
* @HB_SCRIPT_GRANTHA: `Gran`, Since: 0.9.30
* @HB_SCRIPT_KHOJKI: `Khoj`, Since: 0.9.30
* @HB_SCRIPT_KHUDAWADI: `Sind`, Since: 0.9.30
* @HB_SCRIPT_LINEAR_A: `Lina`, Since: 0.9.30
* @HB_SCRIPT_MAHAJANI: `Mahj`, Since: 0.9.30
* @HB_SCRIPT_MANICHAEAN: `Mani`, Since: 0.9.30
* @HB_SCRIPT_MENDE_KIKAKUI: `Mend`, Since: 0.9.30
* @HB_SCRIPT_MODI: `Modi`, Since: 0.9.30
* @HB_SCRIPT_MRO: `Mroo`, Since: 0.9.30
* @HB_SCRIPT_NABATAEAN: `Nbat`, Since: 0.9.30
* @HB_SCRIPT_OLD_NORTH_ARABIAN: `Narb`, Since: 0.9.30
* @HB_SCRIPT_OLD_PERMIC: `Perm`, Since: 0.9.30
* @HB_SCRIPT_PAHAWH_HMONG: `Hmng`, Since: 0.9.30
* @HB_SCRIPT_PALMYRENE: `Palm`, Since: 0.9.30
* @HB_SCRIPT_PAU_CIN_HAU: `Pauc`, Since: 0.9.30
* @HB_SCRIPT_PSALTER_PAHLAVI: `Phlp`, Since: 0.9.30
* @HB_SCRIPT_SIDDHAM: `Sidd`, Since: 0.9.30
* @HB_SCRIPT_TIRHUTA: `Tirh`, Since: 0.9.30
* @HB_SCRIPT_WARANG_CITI: `Wara`, Since: 0.9.30
* @HB_SCRIPT_AHOM: `Ahom`, Since: 0.9.30
* @HB_SCRIPT_ANATOLIAN_HIEROGLYPHS: `Hluw`, Since: 0.9.30
* @HB_SCRIPT_HATRAN: `Hatr`, Since: 0.9.30
* @HB_SCRIPT_MULTANI: `Mult`, Since: 0.9.30
* @HB_SCRIPT_OLD_HUNGARIAN: `Hung`, Since: 0.9.30
* @HB_SCRIPT_SIGNWRITING: `Sgnw`, Since: 0.9.30
* @HB_SCRIPT_ADLAM: `Adlm`, Since: 1.3.0
* @HB_SCRIPT_BHAIKSUKI: `Bhks`, Since: 1.3.0
* @HB_SCRIPT_MARCHEN: `Marc`, Since: 1.3.0
* @HB_SCRIPT_OSAGE: `Osge`, Since: 1.3.0
* @HB_SCRIPT_TANGUT: `Tang`, Since: 1.3.0
* @HB_SCRIPT_NEWA: `Newa`, Since: 1.3.0
* @HB_SCRIPT_MASARAM_GONDI: `Gonm`, Since: 1.6.0
* @HB_SCRIPT_NUSHU: `Nshu`, Since: 1.6.0
* @HB_SCRIPT_SOYOMBO: `Soyo`, Since: 1.6.0
* @HB_SCRIPT_ZANABAZAR_SQUARE: `Zanb`, Since: 1.6.0
* @HB_SCRIPT_DOGRA: `Dogr`, Since: 1.8.0
* @HB_SCRIPT_GUNJALA_GONDI: `Gong`, Since: 1.8.0
* @HB_SCRIPT_HANIFI_ROHINGYA: `Rohg`, Since: 1.8.0
* @HB_SCRIPT_MAKASAR: `Maka`, Since: 1.8.0
* @HB_SCRIPT_MEDEFAIDRIN: `Medf`, Since: 1.8.0
* @HB_SCRIPT_OLD_SOGDIAN: `Sogo`, Since: 1.8.0
* @HB_SCRIPT_SOGDIAN: `Sogd`, Since: 1.8.0
* @HB_SCRIPT_ELYMAIC: `Elym`, Since: 2.4.0
* @HB_SCRIPT_NANDINAGARI: `Nand`, Since: 2.4.0
* @HB_SCRIPT_NYIAKENG_PUACHUE_HMONG: `Hmnp`, Since: 2.4.0
* @HB_SCRIPT_WANCHO: `Wcho`, Since: 2.4.0
* @HB_SCRIPT_CHORASMIAN: `Chrs`, Since: 2.6.7
* @HB_SCRIPT_DIVES_AKURU: `Diak`, Since: 2.6.7
* @HB_SCRIPT_KHITAN_SMALL_SCRIPT: `Kits`, Since: 2.6.7
* @HB_SCRIPT_YEZIDI: `Yezi`, Since: 2.6.7
* @HB_SCRIPT_CYPRO_MINOAN: `Cpmn`, Since: 3.0.0
* @HB_SCRIPT_OLD_UYGHUR: `Ougr`, Since: 3.0.0
* @HB_SCRIPT_TANGSA: `Tnsa`, Since: 3.0.0
* @HB_SCRIPT_TOTO: `Toto`, Since: 3.0.0
* @HB_SCRIPT_VITHKUQI: `Vith`, Since: 3.0.0
* @HB_SCRIPT_MATH: `Zmth`, Since: 3.4.0
* @HB_SCRIPT_KAWI: `Kawi`, Since: 5.2.0
* @HB_SCRIPT_NAG_MUNDARI: `Nagm`, Since: 5.2.0
* @HB_SCRIPT_GARAY: `Gara`, Since: 10.0.0
* @HB_SCRIPT_GURUNG_KHEMA: `Gukh`, Since: 10.0.0
* @HB_SCRIPT_KIRAT_RAI: `Krai`, Since: 10.0.0
* @HB_SCRIPT_OL_ONAL: `Onao`, Since: 10.0.0
* @HB_SCRIPT_SUNUWAR: `Sunu`, Since: 10.0.0
* @HB_SCRIPT_TODHRI: `Todr`, Since: 10.0.0
* @HB_SCRIPT_TULU_TIGALARI: `Tutg`, Since: 10.0.0
* @HB_SCRIPT_INVALID: No script set
*
* Data type for scripts. Each #hb_script_t's value is an #hb_tag_t corresponding
* to the four-letter values defined by [ISO 15924](https://unicode.org/iso15924/).
*
* See also the Script (sc) property of the Unicode Character Database.
*
**/
/* https://docs.google.com/spreadsheets/d/1Y90M0Ie3MUJ6UVCRDOypOtijlMDLNNyyLk36T6iMu0o */
typedef enum
{
HB_SCRIPT_COMMON = HB_TAG ('Z','y','y','y'), /*1.1*/
HB_SCRIPT_INHERITED = HB_TAG ('Z','i','n','h'), /*1.1*/
HB_SCRIPT_UNKNOWN = HB_TAG ('Z','z','z','z'), /*5.0*/
HB_SCRIPT_ARABIC = HB_TAG ('A','r','a','b'), /*1.1*/
HB_SCRIPT_ARMENIAN = HB_TAG ('A','r','m','n'), /*1.1*/
HB_SCRIPT_BENGALI = HB_TAG ('B','e','n','g'), /*1.1*/
HB_SCRIPT_CYRILLIC = HB_TAG ('C','y','r','l'), /*1.1*/
HB_SCRIPT_DEVANAGARI = HB_TAG ('D','e','v','a'), /*1.1*/
HB_SCRIPT_GEORGIAN = HB_TAG ('G','e','o','r'), /*1.1*/
HB_SCRIPT_GREEK = HB_TAG ('G','r','e','k'), /*1.1*/
HB_SCRIPT_GUJARATI = HB_TAG ('G','u','j','r'), /*1.1*/
HB_SCRIPT_GURMUKHI = HB_TAG ('G','u','r','u'), /*1.1*/
HB_SCRIPT_HANGUL = HB_TAG ('H','a','n','g'), /*1.1*/
HB_SCRIPT_HAN = HB_TAG ('H','a','n','i'), /*1.1*/
HB_SCRIPT_HEBREW = HB_TAG ('H','e','b','r'), /*1.1*/
HB_SCRIPT_HIRAGANA = HB_TAG ('H','i','r','a'), /*1.1*/
HB_SCRIPT_KANNADA = HB_TAG ('K','n','d','a'), /*1.1*/
HB_SCRIPT_KATAKANA = HB_TAG ('K','a','n','a'), /*1.1*/
HB_SCRIPT_LAO = HB_TAG ('L','a','o','o'), /*1.1*/
HB_SCRIPT_LATIN = HB_TAG ('L','a','t','n'), /*1.1*/
HB_SCRIPT_MALAYALAM = HB_TAG ('M','l','y','m'), /*1.1*/
HB_SCRIPT_ORIYA = HB_TAG ('O','r','y','a'), /*1.1*/
HB_SCRIPT_TAMIL = HB_TAG ('T','a','m','l'), /*1.1*/
HB_SCRIPT_TELUGU = HB_TAG ('T','e','l','u'), /*1.1*/
HB_SCRIPT_THAI = HB_TAG ('T','h','a','i'), /*1.1*/
HB_SCRIPT_TIBETAN = HB_TAG ('T','i','b','t'), /*2.0*/
HB_SCRIPT_BOPOMOFO = HB_TAG ('B','o','p','o'), /*3.0*/
HB_SCRIPT_BRAILLE = HB_TAG ('B','r','a','i'), /*3.0*/
HB_SCRIPT_CANADIAN_SYLLABICS = HB_TAG ('C','a','n','s'), /*3.0*/
HB_SCRIPT_CHEROKEE = HB_TAG ('C','h','e','r'), /*3.0*/
HB_SCRIPT_ETHIOPIC = HB_TAG ('E','t','h','i'), /*3.0*/
HB_SCRIPT_KHMER = HB_TAG ('K','h','m','r'), /*3.0*/
HB_SCRIPT_MONGOLIAN = HB_TAG ('M','o','n','g'), /*3.0*/
HB_SCRIPT_MYANMAR = HB_TAG ('M','y','m','r'), /*3.0*/
HB_SCRIPT_OGHAM = HB_TAG ('O','g','a','m'), /*3.0*/
HB_SCRIPT_RUNIC = HB_TAG ('R','u','n','r'), /*3.0*/
HB_SCRIPT_SINHALA = HB_TAG ('S','i','n','h'), /*3.0*/
HB_SCRIPT_SYRIAC = HB_TAG ('S','y','r','c'), /*3.0*/
HB_SCRIPT_THAANA = HB_TAG ('T','h','a','a'), /*3.0*/
HB_SCRIPT_YI = HB_TAG ('Y','i','i','i'), /*3.0*/
HB_SCRIPT_DESERET = HB_TAG ('D','s','r','t'), /*3.1*/
HB_SCRIPT_GOTHIC = HB_TAG ('G','o','t','h'), /*3.1*/
HB_SCRIPT_OLD_ITALIC = HB_TAG ('I','t','a','l'), /*3.1*/
HB_SCRIPT_BUHID = HB_TAG ('B','u','h','d'), /*3.2*/
HB_SCRIPT_HANUNOO = HB_TAG ('H','a','n','o'), /*3.2*/
HB_SCRIPT_TAGALOG = HB_TAG ('T','g','l','g'), /*3.2*/
HB_SCRIPT_TAGBANWA = HB_TAG ('T','a','g','b'), /*3.2*/
HB_SCRIPT_CYPRIOT = HB_TAG ('C','p','r','t'), /*4.0*/
HB_SCRIPT_LIMBU = HB_TAG ('L','i','m','b'), /*4.0*/
HB_SCRIPT_LINEAR_B = HB_TAG ('L','i','n','b'), /*4.0*/
HB_SCRIPT_OSMANYA = HB_TAG ('O','s','m','a'), /*4.0*/
HB_SCRIPT_SHAVIAN = HB_TAG ('S','h','a','w'), /*4.0*/
HB_SCRIPT_TAI_LE = HB_TAG ('T','a','l','e'), /*4.0*/
HB_SCRIPT_UGARITIC = HB_TAG ('U','g','a','r'), /*4.0*/
HB_SCRIPT_BUGINESE = HB_TAG ('B','u','g','i'), /*4.1*/
HB_SCRIPT_COPTIC = HB_TAG ('C','o','p','t'), /*4.1*/
HB_SCRIPT_GLAGOLITIC = HB_TAG ('G','l','a','g'), /*4.1*/
HB_SCRIPT_KHAROSHTHI = HB_TAG ('K','h','a','r'), /*4.1*/
HB_SCRIPT_NEW_TAI_LUE = HB_TAG ('T','a','l','u'), /*4.1*/
HB_SCRIPT_OLD_PERSIAN = HB_TAG ('X','p','e','o'), /*4.1*/
HB_SCRIPT_SYLOTI_NAGRI = HB_TAG ('S','y','l','o'), /*4.1*/
HB_SCRIPT_TIFINAGH = HB_TAG ('T','f','n','g'), /*4.1*/
HB_SCRIPT_BALINESE = HB_TAG ('B','a','l','i'), /*5.0*/
HB_SCRIPT_CUNEIFORM = HB_TAG ('X','s','u','x'), /*5.0*/
HB_SCRIPT_NKO = HB_TAG ('N','k','o','o'), /*5.0*/
HB_SCRIPT_PHAGS_PA = HB_TAG ('P','h','a','g'), /*5.0*/
HB_SCRIPT_PHOENICIAN = HB_TAG ('P','h','n','x'), /*5.0*/
HB_SCRIPT_CARIAN = HB_TAG ('C','a','r','i'), /*5.1*/
HB_SCRIPT_CHAM = HB_TAG ('C','h','a','m'), /*5.1*/
HB_SCRIPT_KAYAH_LI = HB_TAG ('K','a','l','i'), /*5.1*/
HB_SCRIPT_LEPCHA = HB_TAG ('L','e','p','c'), /*5.1*/
HB_SCRIPT_LYCIAN = HB_TAG ('L','y','c','i'), /*5.1*/
HB_SCRIPT_LYDIAN = HB_TAG ('L','y','d','i'), /*5.1*/
HB_SCRIPT_OL_CHIKI = HB_TAG ('O','l','c','k'), /*5.1*/
HB_SCRIPT_REJANG = HB_TAG ('R','j','n','g'), /*5.1*/
HB_SCRIPT_SAURASHTRA = HB_TAG ('S','a','u','r'), /*5.1*/
HB_SCRIPT_SUNDANESE = HB_TAG ('S','u','n','d'), /*5.1*/
HB_SCRIPT_VAI = HB_TAG ('V','a','i','i'), /*5.1*/
HB_SCRIPT_AVESTAN = HB_TAG ('A','v','s','t'), /*5.2*/
HB_SCRIPT_BAMUM = HB_TAG ('B','a','m','u'), /*5.2*/
HB_SCRIPT_EGYPTIAN_HIEROGLYPHS = HB_TAG ('E','g','y','p'), /*5.2*/
HB_SCRIPT_IMPERIAL_ARAMAIC = HB_TAG ('A','r','m','i'), /*5.2*/
HB_SCRIPT_INSCRIPTIONAL_PAHLAVI = HB_TAG ('P','h','l','i'), /*5.2*/
HB_SCRIPT_INSCRIPTIONAL_PARTHIAN = HB_TAG ('P','r','t','i'), /*5.2*/
HB_SCRIPT_JAVANESE = HB_TAG ('J','a','v','a'), /*5.2*/
HB_SCRIPT_KAITHI = HB_TAG ('K','t','h','i'), /*5.2*/
HB_SCRIPT_LISU = HB_TAG ('L','i','s','u'), /*5.2*/
HB_SCRIPT_MEETEI_MAYEK = HB_TAG ('M','t','e','i'), /*5.2*/
HB_SCRIPT_OLD_SOUTH_ARABIAN = HB_TAG ('S','a','r','b'), /*5.2*/
HB_SCRIPT_OLD_TURKIC = HB_TAG ('O','r','k','h'), /*5.2*/
HB_SCRIPT_SAMARITAN = HB_TAG ('S','a','m','r'), /*5.2*/
HB_SCRIPT_TAI_THAM = HB_TAG ('L','a','n','a'), /*5.2*/
HB_SCRIPT_TAI_VIET = HB_TAG ('T','a','v','t'), /*5.2*/
HB_SCRIPT_BATAK = HB_TAG ('B','a','t','k'), /*6.0*/
HB_SCRIPT_BRAHMI = HB_TAG ('B','r','a','h'), /*6.0*/
HB_SCRIPT_MANDAIC = HB_TAG ('M','a','n','d'), /*6.0*/
HB_SCRIPT_CHAKMA = HB_TAG ('C','a','k','m'), /*6.1*/
HB_SCRIPT_MEROITIC_CURSIVE = HB_TAG ('M','e','r','c'), /*6.1*/
HB_SCRIPT_MEROITIC_HIEROGLYPHS = HB_TAG ('M','e','r','o'), /*6.1*/
HB_SCRIPT_MIAO = HB_TAG ('P','l','r','d'), /*6.1*/
HB_SCRIPT_SHARADA = HB_TAG ('S','h','r','d'), /*6.1*/
HB_SCRIPT_SORA_SOMPENG = HB_TAG ('S','o','r','a'), /*6.1*/
HB_SCRIPT_TAKRI = HB_TAG ('T','a','k','r'), /*6.1*/
/*
* Since: 0.9.30
*/
HB_SCRIPT_BASSA_VAH = HB_TAG ('B','a','s','s'), /*7.0*/
HB_SCRIPT_CAUCASIAN_ALBANIAN = HB_TAG ('A','g','h','b'), /*7.0*/
HB_SCRIPT_DUPLOYAN = HB_TAG ('D','u','p','l'), /*7.0*/
HB_SCRIPT_ELBASAN = HB_TAG ('E','l','b','a'), /*7.0*/
HB_SCRIPT_GRANTHA = HB_TAG ('G','r','a','n'), /*7.0*/
HB_SCRIPT_KHOJKI = HB_TAG ('K','h','o','j'), /*7.0*/
HB_SCRIPT_KHUDAWADI = HB_TAG ('S','i','n','d'), /*7.0*/
HB_SCRIPT_LINEAR_A = HB_TAG ('L','i','n','a'), /*7.0*/
HB_SCRIPT_MAHAJANI = HB_TAG ('M','a','h','j'), /*7.0*/
HB_SCRIPT_MANICHAEAN = HB_TAG ('M','a','n','i'), /*7.0*/
HB_SCRIPT_MENDE_KIKAKUI = HB_TAG ('M','e','n','d'), /*7.0*/
HB_SCRIPT_MODI = HB_TAG ('M','o','d','i'), /*7.0*/
HB_SCRIPT_MRO = HB_TAG ('M','r','o','o'), /*7.0*/
HB_SCRIPT_NABATAEAN = HB_TAG ('N','b','a','t'), /*7.0*/
HB_SCRIPT_OLD_NORTH_ARABIAN = HB_TAG ('N','a','r','b'), /*7.0*/
HB_SCRIPT_OLD_PERMIC = HB_TAG ('P','e','r','m'), /*7.0*/
HB_SCRIPT_PAHAWH_HMONG = HB_TAG ('H','m','n','g'), /*7.0*/
HB_SCRIPT_PALMYRENE = HB_TAG ('P','a','l','m'), /*7.0*/
HB_SCRIPT_PAU_CIN_HAU = HB_TAG ('P','a','u','c'), /*7.0*/
HB_SCRIPT_PSALTER_PAHLAVI = HB_TAG ('P','h','l','p'), /*7.0*/
HB_SCRIPT_SIDDHAM = HB_TAG ('S','i','d','d'), /*7.0*/
HB_SCRIPT_TIRHUTA = HB_TAG ('T','i','r','h'), /*7.0*/
HB_SCRIPT_WARANG_CITI = HB_TAG ('W','a','r','a'), /*7.0*/
HB_SCRIPT_AHOM = HB_TAG ('A','h','o','m'), /*8.0*/
HB_SCRIPT_ANATOLIAN_HIEROGLYPHS = HB_TAG ('H','l','u','w'), /*8.0*/
HB_SCRIPT_HATRAN = HB_TAG ('H','a','t','r'), /*8.0*/
HB_SCRIPT_MULTANI = HB_TAG ('M','u','l','t'), /*8.0*/
HB_SCRIPT_OLD_HUNGARIAN = HB_TAG ('H','u','n','g'), /*8.0*/
HB_SCRIPT_SIGNWRITING = HB_TAG ('S','g','n','w'), /*8.0*/
/*
* Since 1.3.0
*/
HB_SCRIPT_ADLAM = HB_TAG ('A','d','l','m'), /*9.0*/
HB_SCRIPT_BHAIKSUKI = HB_TAG ('B','h','k','s'), /*9.0*/
HB_SCRIPT_MARCHEN = HB_TAG ('M','a','r','c'), /*9.0*/
HB_SCRIPT_OSAGE = HB_TAG ('O','s','g','e'), /*9.0*/
HB_SCRIPT_TANGUT = HB_TAG ('T','a','n','g'), /*9.0*/
HB_SCRIPT_NEWA = HB_TAG ('N','e','w','a'), /*9.0*/
/*
* Since 1.6.0
*/
HB_SCRIPT_MASARAM_GONDI = HB_TAG ('G','o','n','m'), /*10.0*/
HB_SCRIPT_NUSHU = HB_TAG ('N','s','h','u'), /*10.0*/
HB_SCRIPT_SOYOMBO = HB_TAG ('S','o','y','o'), /*10.0*/
HB_SCRIPT_ZANABAZAR_SQUARE = HB_TAG ('Z','a','n','b'), /*10.0*/
/*
* Since 1.8.0
*/
HB_SCRIPT_DOGRA = HB_TAG ('D','o','g','r'), /*11.0*/
HB_SCRIPT_GUNJALA_GONDI = HB_TAG ('G','o','n','g'), /*11.0*/
HB_SCRIPT_HANIFI_ROHINGYA = HB_TAG ('R','o','h','g'), /*11.0*/
HB_SCRIPT_MAKASAR = HB_TAG ('M','a','k','a'), /*11.0*/
HB_SCRIPT_MEDEFAIDRIN = HB_TAG ('M','e','d','f'), /*11.0*/
HB_SCRIPT_OLD_SOGDIAN = HB_TAG ('S','o','g','o'), /*11.0*/
HB_SCRIPT_SOGDIAN = HB_TAG ('S','o','g','d'), /*11.0*/
/*
* Since 2.4.0
*/
HB_SCRIPT_ELYMAIC = HB_TAG ('E','l','y','m'), /*12.0*/
HB_SCRIPT_NANDINAGARI = HB_TAG ('N','a','n','d'), /*12.0*/
HB_SCRIPT_NYIAKENG_PUACHUE_HMONG = HB_TAG ('H','m','n','p'), /*12.0*/
HB_SCRIPT_WANCHO = HB_TAG ('W','c','h','o'), /*12.0*/
/*
* Since 2.6.7
*/
HB_SCRIPT_CHORASMIAN = HB_TAG ('C','h','r','s'), /*13.0*/
HB_SCRIPT_DIVES_AKURU = HB_TAG ('D','i','a','k'), /*13.0*/
HB_SCRIPT_KHITAN_SMALL_SCRIPT = HB_TAG ('K','i','t','s'), /*13.0*/
HB_SCRIPT_YEZIDI = HB_TAG ('Y','e','z','i'), /*13.0*/
/*
* Since 3.0.0
*/
HB_SCRIPT_CYPRO_MINOAN = HB_TAG ('C','p','m','n'), /*14.0*/
HB_SCRIPT_OLD_UYGHUR = HB_TAG ('O','u','g','r'), /*14.0*/
HB_SCRIPT_TANGSA = HB_TAG ('T','n','s','a'), /*14.0*/
HB_SCRIPT_TOTO = HB_TAG ('T','o','t','o'), /*14.0*/
HB_SCRIPT_VITHKUQI = HB_TAG ('V','i','t','h'), /*14.0*/
/*
* Since 3.4.0
*/
HB_SCRIPT_MATH = HB_TAG ('Z','m','t','h'),
/*
* Since 5.2.0
*/
HB_SCRIPT_KAWI = HB_TAG ('K','a','w','i'), /*15.0*/
HB_SCRIPT_NAG_MUNDARI = HB_TAG ('N','a','g','m'), /*15.0*/
/*
* Since 10.0.0
*/
HB_SCRIPT_GARAY = HB_TAG ('G','a','r','a'), /*16.0*/
HB_SCRIPT_GURUNG_KHEMA = HB_TAG ('G','u','k','h'), /*16.0*/
HB_SCRIPT_KIRAT_RAI = HB_TAG ('K','r','a','i'), /*16.0*/
HB_SCRIPT_OL_ONAL = HB_TAG ('O','n','a','o'), /*16.0*/
HB_SCRIPT_SUNUWAR = HB_TAG ('S','u','n','u'), /*16.0*/
HB_SCRIPT_TODHRI = HB_TAG ('T','o','d','r'), /*16.0*/
HB_SCRIPT_TULU_TIGALARI = HB_TAG ('T','u','t','g'), /*16.0*/
/* No script set. */
HB_SCRIPT_INVALID = HB_TAG_NONE,
/*< private >*/
/* Dummy values to ensure any hb_tag_t value can be passed/stored as hb_script_t
* without risking undefined behavior. We have two, for historical reasons.
* HB_TAG_MAX used to be unsigned, but that was invalid Ansi C, so was changed
* to _HB_SCRIPT_MAX_VALUE to be equal to HB_TAG_MAX_SIGNED as well.
*
* See this thread for technicalities:
*
* https://lists.freedesktop.org/archives/harfbuzz/2014-March/004150.html
*/
_HB_SCRIPT_MAX_VALUE = HB_TAG_MAX_SIGNED, /*< skip >*/
_HB_SCRIPT_MAX_VALUE_SIGNED = HB_TAG_MAX_SIGNED /*< skip >*/
} hb_script_t;
#endif /* HB_SCRIPT_LIST_H */

View File

@@ -868,7 +868,7 @@ hb_subset_input_override_name_table (hb_subset_input_t *input,
src = hb_utf8_t::next (src, src_end, &unicode, replacement); src = hb_utf8_t::next (src, src_end, &unicode, replacement);
if (unicode >= 0x0080u) if (unicode >= 0x0080u)
{ {
printf ("Non-ascii character detected, ignored...This API supports ascii characters only for mac platform\n"); // Non-ascii character detected, ignored...
return false; return false;
} }
} }

View File

@@ -0,0 +1,382 @@
/*
* Copyright © 2023 Google, Inc.
*
* This is part of HarfBuzz, a text shaping library.
*
* Permission is hereby granted, without written agreement and without
* license or royalty fees, to use, copy, modify, and distribute this
* software and its documentation for any purpose, provided that the
* above copyright notice and the following two paragraphs appear in
* all copies of this software.
*
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* Google Author(s): Garret Rieger, Qunxin Liu, Roderick Sheeter
*/
#include "hb-subset-plan.hh"
#include "hb-ot-layout-gdef-table.hh"
#include "hb-ot-layout-gpos-table.hh"
#include "hb-ot-layout-gsub-table.hh"
using OT::Layout::GSUB;
using OT::Layout::GPOS;
#ifndef HB_NO_SUBSET_LAYOUT
void
remap_used_mark_sets (hb_subset_plan_t *plan,
hb_map_t& used_mark_sets_map)
{
hb_blob_ptr_t<OT::GDEF> gdef = plan->source_table<OT::GDEF> ();
if (!gdef->has_data () || !gdef->has_mark_glyph_sets ())
{
gdef.destroy ();
return;
}
hb_set_t used_mark_sets;
gdef->get_mark_glyph_sets ().collect_used_mark_sets (plan->_glyphset_gsub, used_mark_sets);
gdef.destroy ();
remap_indexes (&used_mark_sets, &used_mark_sets_map);
}
/*
* Removes all tags from 'tags' that are not in filter. Additionally eliminates any duplicates.
* Returns true if anything was removed (not including duplicates).
*/
static bool _filter_tag_list(hb_vector_t<hb_tag_t>* tags, /* IN/OUT */
const hb_set_t* filter)
{
hb_vector_t<hb_tag_t> out;
out.alloc (tags->get_size() + 1); // +1 is to allocate room for the null terminator.
bool removed = false;
hb_set_t visited;
for (hb_tag_t tag : *tags)
{
if (!tag) continue;
if (visited.has (tag)) continue;
if (!filter->has (tag))
{
removed = true;
continue;
}
visited.add (tag);
out.push (tag);
}
// The collect function needs a null element to signal end of the array.
out.push (HB_TAG_NONE);
hb_swap (out, *tags);
return removed;
}
template <typename T>
static void _collect_layout_indices (hb_subset_plan_t *plan,
const T& table,
hb_set_t *lookup_indices, /* OUT */
hb_set_t *feature_indices, /* OUT */
hb_hashmap_t<unsigned, hb::shared_ptr<hb_set_t>> *feature_record_cond_idx_map, /* OUT */
hb_hashmap_t<unsigned, const OT::Feature*> *feature_substitutes_map, /* OUT */
hb_set_t& catch_all_record_feature_idxes, /* OUT */
hb_hashmap_t<unsigned, hb_pair_t<const void*, const void*>>& catch_all_record_idx_feature_map /* OUT */)
{
unsigned num_features = table.get_feature_count ();
hb_vector_t<hb_tag_t> features;
if (!plan->check_success (features.resize (num_features))) return;
table.get_feature_tags (0, &num_features, features.arrayZ);
bool retain_all_features = !_filter_tag_list (&features, &plan->layout_features);
unsigned num_scripts = table.get_script_count ();
hb_vector_t<hb_tag_t> scripts;
if (!plan->check_success (scripts.resize (num_scripts))) return;
table.get_script_tags (0, &num_scripts, scripts.arrayZ);
bool retain_all_scripts = !_filter_tag_list (&scripts, &plan->layout_scripts);
if (!plan->check_success (!features.in_error ()) || !features
|| !plan->check_success (!scripts.in_error ()) || !scripts)
return;
hb_ot_layout_collect_features (plan->source,
T::tableTag,
retain_all_scripts ? nullptr : scripts.arrayZ,
nullptr,
retain_all_features ? nullptr : features.arrayZ,
feature_indices);
#ifndef HB_NO_VAR
// collect feature substitutes with variations
if (!plan->user_axes_location.is_empty ())
{
hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned> conditionset_map;
OT::hb_collect_feature_substitutes_with_var_context_t c =
{
&plan->axes_old_index_tag_map,
&plan->axes_location,
feature_record_cond_idx_map,
feature_substitutes_map,
catch_all_record_feature_idxes,
feature_indices,
false,
false,
false,
0,
&conditionset_map
};
table.collect_feature_substitutes_with_variations (&c);
}
#endif
for (unsigned feature_index : *feature_indices)
{
const OT::Feature* f = &(table.get_feature (feature_index));
const OT::Feature **p = nullptr;
if (feature_substitutes_map->has (feature_index, &p))
f = *p;
f->add_lookup_indexes_to (lookup_indices);
}
#ifndef HB_NO_VAR
if (catch_all_record_feature_idxes)
{
for (unsigned feature_index : catch_all_record_feature_idxes)
{
const OT::Feature& f = table.get_feature (feature_index);
f.add_lookup_indexes_to (lookup_indices);
const void *tag = reinterpret_cast<const void*> (&(table.get_feature_list ().get_tag (feature_index)));
catch_all_record_idx_feature_map.set (feature_index, hb_pair (&f, tag));
}
}
// If all axes are pinned then all feature variations will be dropped so there's no need
// to collect lookups from them.
if (!plan->all_axes_pinned)
table.feature_variation_collect_lookups (feature_indices,
plan->user_axes_location.is_empty () ? nullptr: feature_record_cond_idx_map,
lookup_indices);
#endif
}
static inline void
_GSUBGPOS_find_duplicate_features (const OT::GSUBGPOS &g,
const hb_map_t *lookup_indices,
const hb_set_t *feature_indices,
const hb_hashmap_t<unsigned, const OT::Feature*> *feature_substitutes_map,
hb_map_t *duplicate_feature_map /* OUT */)
{
if (feature_indices->is_empty ()) return;
hb_hashmap_t<hb_tag_t, hb::unique_ptr<hb_set_t>> unique_features;
//find out duplicate features after subset
for (unsigned i : feature_indices->iter ())
{
hb_tag_t t = g.get_feature_tag (i);
if (t == HB_MAP_VALUE_INVALID) continue;
if (!unique_features.has (t))
{
if (unlikely (!unique_features.set (t, hb::unique_ptr<hb_set_t> {hb_set_create ()})))
return;
if (unique_features.has (t))
unique_features.get (t)->add (i);
duplicate_feature_map->set (i, i);
continue;
}
bool found = false;
hb_set_t* same_tag_features = unique_features.get (t);
for (unsigned other_f_index : same_tag_features->iter ())
{
const OT::Feature* f = &(g.get_feature (i));
const OT::Feature **p = nullptr;
if (feature_substitutes_map->has (i, &p))
f = *p;
const OT::Feature* other_f = &(g.get_feature (other_f_index));
if (feature_substitutes_map->has (other_f_index, &p))
other_f = *p;
auto f_iter =
+ hb_iter (f->lookupIndex)
| hb_filter (lookup_indices)
;
auto other_f_iter =
+ hb_iter (other_f->lookupIndex)
| hb_filter (lookup_indices)
;
bool is_equal = true;
for (; f_iter && other_f_iter; f_iter++, other_f_iter++)
{
unsigned a = *f_iter;
unsigned b = *other_f_iter;
if (a != b) { is_equal = false; break; }
}
if (is_equal == false || f_iter || other_f_iter) continue;
found = true;
duplicate_feature_map->set (i, other_f_index);
break;
}
if (found == false)
{
same_tag_features->add (i);
duplicate_feature_map->set (i, i);
}
}
}
template <typename T>
static void
_closure_glyphs_lookups_features (hb_subset_plan_t *plan,
hb_set_t *gids_to_retain,
hb_map_t *lookups,
hb_map_t *features,
script_langsys_map *langsys_map,
hb_hashmap_t<unsigned, hb::shared_ptr<hb_set_t>> *feature_record_cond_idx_map,
hb_hashmap_t<unsigned, const OT::Feature*> *feature_substitutes_map,
hb_set_t &catch_all_record_feature_idxes,
hb_hashmap_t<unsigned, hb_pair_t<const void*, const void*>>& catch_all_record_idx_feature_map)
{
hb_blob_ptr_t<T> table = plan->source_table<T> ();
hb_tag_t table_tag = table->tableTag;
hb_set_t lookup_indices, feature_indices;
_collect_layout_indices<T> (plan,
*table,
&lookup_indices,
&feature_indices,
feature_record_cond_idx_map,
feature_substitutes_map,
catch_all_record_feature_idxes,
catch_all_record_idx_feature_map);
if (table_tag == HB_OT_TAG_GSUB && !(plan->flags & HB_SUBSET_FLAGS_NO_LAYOUT_CLOSURE))
hb_ot_layout_lookups_substitute_closure (plan->source,
&lookup_indices,
gids_to_retain);
table->closure_lookups (plan->source,
gids_to_retain,
&lookup_indices);
remap_indexes (&lookup_indices, lookups);
// prune features
table->prune_features (lookups,
plan->user_axes_location.is_empty () ? nullptr : feature_record_cond_idx_map,
feature_substitutes_map,
&feature_indices);
hb_map_t duplicate_feature_map;
_GSUBGPOS_find_duplicate_features (*table, lookups, &feature_indices, feature_substitutes_map, &duplicate_feature_map);
feature_indices.clear ();
table->prune_langsys (&duplicate_feature_map, &plan->layout_scripts, langsys_map, &feature_indices);
remap_indexes (&feature_indices, features);
table.destroy ();
}
void layout_nameid_closure (hb_subset_plan_t* plan,
hb_set_t* drop_tables)
{
if (!drop_tables->has (HB_OT_TAG_GPOS))
{
hb_blob_ptr_t<GPOS> gpos = plan->source_table<GPOS> ();
gpos->collect_name_ids (&plan->gpos_features, &plan->name_ids);
gpos.destroy ();
}
if (!drop_tables->has (HB_OT_TAG_GSUB))
{
hb_blob_ptr_t<GSUB> gsub = plan->source_table<GSUB> ();
gsub->collect_name_ids (&plan->gsub_features, &plan->name_ids);
gsub.destroy ();
}
}
void
layout_populate_gids_to_retain (hb_subset_plan_t* plan,
hb_set_t* drop_tables) {
if (!drop_tables->has (HB_OT_TAG_GSUB))
// closure all glyphs/lookups/features needed for GSUB substitutions.
_closure_glyphs_lookups_features<GSUB> (
plan,
&plan->_glyphset_gsub,
&plan->gsub_lookups,
&plan->gsub_features,
&plan->gsub_langsys,
&plan->gsub_feature_record_cond_idx_map,
&plan->gsub_feature_substitutes_map,
plan->gsub_old_features,
plan->gsub_old_feature_idx_tag_map);
if (!drop_tables->has (HB_OT_TAG_GPOS))
_closure_glyphs_lookups_features<GPOS> (
plan,
&plan->_glyphset_gsub,
&plan->gpos_lookups,
&plan->gpos_features,
&plan->gpos_langsys,
&plan->gpos_feature_record_cond_idx_map,
&plan->gpos_feature_substitutes_map,
plan->gpos_old_features,
plan->gpos_old_feature_idx_tag_map);
}
#ifndef HB_NO_VAR
void
collect_layout_variation_indices (hb_subset_plan_t* plan)
{
hb_blob_ptr_t<OT::GDEF> gdef = plan->source_table<OT::GDEF> ();
hb_blob_ptr_t<GPOS> gpos = plan->source_table<GPOS> ();
if (!gdef->has_data () || !gdef->has_var_store ())
{
gdef.destroy ();
gpos.destroy ();
return;
}
hb_set_t varidx_set;
OT::hb_collect_variation_indices_context_t c (&varidx_set,
&plan->_glyphset_gsub,
&plan->gpos_lookups);
gdef->collect_variation_indices (&c);
if (hb_ot_layout_has_positioning (plan->source))
gpos->collect_variation_indices (&c);
remap_variation_indices (gdef->get_var_store (),
varidx_set, plan->normalized_coords,
!plan->pinned_at_default,
plan->all_axes_pinned,
plan->layout_variation_idx_delta_map);
unsigned subtable_count = gdef->get_var_store ().get_sub_table_count ();
generate_varstore_inner_maps (varidx_set, subtable_count, plan->gdef_varstore_inner_maps);
gdef.destroy ();
gpos.destroy ();
}
#endif
#endif

View File

@@ -0,0 +1,388 @@
/*
* Copyright © 2023 Google, Inc.
*
* This is part of HarfBuzz, a text shaping library.
*
* Permission is hereby granted, without written agreement and without
* license or royalty fees, to use, copy, modify, and distribute this
* software and its documentation for any purpose, provided that the
* above copyright notice and the following two paragraphs appear in
* all copies of this software.
*
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* Google Author(s): Garret Rieger, Qunxin Liu, Roderick Sheeter
*/
#include "hb-ot-layout-common.hh"
#include "hb-subset-plan.hh"
#include "hb-ot-var-common.hh"
#include "hb-ot-layout-base-table.hh"
#include "hb-ot-glyf-table.hh"
#include "hb-ot-var-fvar-table.hh"
#include "hb-ot-var-avar-table.hh"
#include "hb-ot-cff2-table.hh"
#ifndef HB_NO_VAR
void
generate_varstore_inner_maps (const hb_set_t& varidx_set,
unsigned subtable_count,
hb_vector_t<hb_inc_bimap_t> &inner_maps /* OUT */)
{
if (varidx_set.is_empty () || subtable_count == 0) return;
if (unlikely (!inner_maps.resize (subtable_count))) return;
for (unsigned idx : varidx_set)
{
uint16_t major = idx >> 16;
uint16_t minor = idx & 0xFFFF;
if (major >= subtable_count)
continue;
inner_maps[major].add (minor);
}
}
static inline hb_font_t*
_get_hb_font_with_variations (const hb_subset_plan_t *plan)
{
hb_font_t *font = hb_font_create (plan->source);
hb_vector_t<hb_variation_t> vars;
if (!vars.alloc (plan->user_axes_location.get_population ())) {
hb_font_destroy (font);
return nullptr;
}
for (auto _ : plan->user_axes_location)
{
hb_variation_t var;
var.tag = _.first;
var.value = _.second.middle;
vars.push (var);
}
hb_font_set_variations (font, vars.arrayZ, plan->user_axes_location.get_population ());
return font;
}
template<typename ItemVarStore>
void
remap_variation_indices (const ItemVarStore &var_store,
const hb_set_t &variation_indices,
const hb_vector_t<int>& normalized_coords,
bool calculate_delta, /* not pinned at default */
bool no_variations, /* all axes pinned */
hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> &variation_idx_delta_map /* OUT */)
{
if (&var_store == &Null (OT::ItemVariationStore)) return;
unsigned subtable_count = var_store.get_sub_table_count ();
auto *store_cache = var_store.create_cache ();
unsigned new_major = 0, new_minor = 0;
unsigned last_major = (variation_indices.get_min ()) >> 16;
for (unsigned idx : variation_indices)
{
int delta = 0;
if (calculate_delta)
delta = roundf (var_store.get_delta (idx, normalized_coords.arrayZ,
normalized_coords.length, store_cache));
if (no_variations)
{
variation_idx_delta_map.set (idx, hb_pair_t<unsigned, int> (HB_OT_LAYOUT_NO_VARIATIONS_INDEX, delta));
continue;
}
uint16_t major = idx >> 16;
if (major >= subtable_count) break;
if (major != last_major)
{
new_minor = 0;
++new_major;
}
unsigned new_idx = (new_major << 16) + new_minor;
variation_idx_delta_map.set (idx, hb_pair_t<unsigned, int> (new_idx, delta));
++new_minor;
last_major = major;
}
var_store.destroy_cache (store_cache);
}
template
void
remap_variation_indices<OT::ItemVariationStore> (const OT::ItemVariationStore &var_store,
const hb_set_t &variation_indices,
const hb_vector_t<int>& normalized_coords,
bool calculate_delta, /* not pinned at default */
bool no_variations, /* all axes pinned */
hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> &variation_idx_delta_map /* OUT */);
#ifndef HB_NO_BASE
void
collect_base_variation_indices (hb_subset_plan_t* plan)
{
hb_blob_ptr_t<OT::BASE> base = plan->source_table<OT::BASE> ();
if (!base->has_var_store ())
{
base.destroy ();
return;
}
hb_set_t varidx_set;
base->collect_variation_indices (plan, varidx_set);
const OT::ItemVariationStore &var_store = base->get_var_store ();
unsigned subtable_count = var_store.get_sub_table_count ();
remap_variation_indices (var_store, varidx_set,
plan->normalized_coords,
!plan->pinned_at_default,
plan->all_axes_pinned,
plan->base_variation_idx_map);
generate_varstore_inner_maps (varidx_set, subtable_count, plan->base_varstore_inner_maps);
base.destroy ();
}
#endif
void
normalize_axes_location (hb_face_t *face, hb_subset_plan_t *plan)
{
if (plan->user_axes_location.is_empty ())
return;
hb_array_t<const OT::AxisRecord> axes = face->table.fvar->get_axes ();
plan->normalized_coords.resize (axes.length);
bool has_avar = face->table.avar->has_data ();
const OT::SegmentMaps *seg_maps = nullptr;
unsigned avar_axis_count = 0;
if (has_avar)
{
seg_maps = face->table.avar->get_segment_maps ();
avar_axis_count = face->table.avar->get_axis_count();
}
bool axis_not_pinned = false;
unsigned old_axis_idx = 0, new_axis_idx = 0;
for (const auto& axis : axes)
{
hb_tag_t axis_tag = axis.get_axis_tag ();
plan->axes_old_index_tag_map.set (old_axis_idx, axis_tag);
if (!plan->user_axes_location.has (axis_tag) ||
!plan->user_axes_location.get (axis_tag).is_point ())
{
axis_not_pinned = true;
plan->axes_index_map.set (old_axis_idx, new_axis_idx);
plan->axis_tags.push (axis_tag);
new_axis_idx++;
}
Triple *axis_range;
if (plan->user_axes_location.has (axis_tag, &axis_range))
{
plan->axes_triple_distances.set (axis_tag, axis.get_triple_distances ());
int normalized_min = axis.normalize_axis_value (axis_range->minimum);
int normalized_default = axis.normalize_axis_value (axis_range->middle);
int normalized_max = axis.normalize_axis_value (axis_range->maximum);
if (has_avar && old_axis_idx < avar_axis_count)
{
normalized_min = seg_maps->map (normalized_min);
normalized_default = seg_maps->map (normalized_default);
normalized_max = seg_maps->map (normalized_max);
}
plan->axes_location.set (axis_tag, Triple (static_cast<double> (normalized_min / 16384.0),
static_cast<double> (normalized_default / 16384.0),
static_cast<double> (normalized_max / 16384.0)));
if (normalized_default != 0)
plan->pinned_at_default = false;
plan->normalized_coords[old_axis_idx] = normalized_default;
}
old_axis_idx++;
if (has_avar && old_axis_idx < avar_axis_count)
seg_maps = &StructAfter<OT::SegmentMaps> (*seg_maps);
}
plan->all_axes_pinned = !axis_not_pinned;
}
void
update_instance_metrics_map_from_cff2 (hb_subset_plan_t *plan)
{
if (!plan->normalized_coords) return;
OT::cff2::accelerator_t cff2 (plan->source);
if (!cff2.is_valid ()) return;
hb_font_t *font = _get_hb_font_with_variations (plan);
if (unlikely (!plan->check_success (font != nullptr)))
{
hb_font_destroy (font);
return;
}
hb_glyph_extents_t extents = {0x7FFF, -0x7FFF};
OT::hmtx_accelerator_t _hmtx (plan->source);
OT::ItemVariationStore::cache_t *hvar_store_cache = nullptr;
if (_hmtx.has_data () && _hmtx.var_table.get_length ())
hvar_store_cache = _hmtx.var_table->get_var_store ().create_cache ();
OT::vmtx_accelerator_t _vmtx (plan->source);
OT::ItemVariationStore::cache_t *vvar_store_cache = nullptr;
if (_vmtx.has_data () && _vmtx.var_table.get_length ())
vvar_store_cache = _vmtx.var_table->get_var_store ().create_cache ();
for (auto p : *plan->glyph_map)
{
hb_codepoint_t old_gid = p.first;
hb_codepoint_t new_gid = p.second;
if (!cff2.get_extents (font, old_gid, &extents)) continue;
bool has_bounds_info = true;
if (extents.x_bearing == 0 && extents.width == 0 &&
extents.height == 0 && extents.y_bearing == 0)
has_bounds_info = false;
if (has_bounds_info)
{
plan->head_maxp_info.xMin = hb_min (plan->head_maxp_info.xMin, extents.x_bearing);
plan->head_maxp_info.xMax = hb_max (plan->head_maxp_info.xMax, extents.x_bearing + extents.width);
plan->head_maxp_info.yMax = hb_max (plan->head_maxp_info.yMax, extents.y_bearing);
plan->head_maxp_info.yMin = hb_min (plan->head_maxp_info.yMin, extents.y_bearing + extents.height);
}
if (_hmtx.has_data ())
{
int hori_aw = _hmtx.get_advance_without_var_unscaled (old_gid);
if (_hmtx.var_table.get_length ())
hori_aw += (int) roundf (_hmtx.var_table->get_advance_delta_unscaled (old_gid, font->coords, font->num_coords,
hvar_store_cache));
int lsb = extents.x_bearing;
if (!has_bounds_info)
{
if (!_hmtx.get_leading_bearing_without_var_unscaled (old_gid, &lsb))
continue;
}
plan->hmtx_map.set (new_gid, hb_pair ((unsigned) hori_aw, lsb));
plan->bounds_width_vec[new_gid] = extents.width;
}
if (_vmtx.has_data ())
{
int vert_aw = _vmtx.get_advance_without_var_unscaled (old_gid);
if (_vmtx.var_table.get_length ())
vert_aw += (int) roundf (_vmtx.var_table->get_advance_delta_unscaled (old_gid, font->coords, font->num_coords,
vvar_store_cache));
int tsb = extents.y_bearing;
if (!has_bounds_info)
{
if (!_vmtx.get_leading_bearing_without_var_unscaled (old_gid, &tsb))
continue;
}
plan->vmtx_map.set (new_gid, hb_pair ((unsigned) vert_aw, tsb));
plan->bounds_height_vec[new_gid] = extents.height;
}
}
hb_font_destroy (font);
if (hvar_store_cache)
_hmtx.var_table->get_var_store ().destroy_cache (hvar_store_cache);
if (vvar_store_cache)
_vmtx.var_table->get_var_store ().destroy_cache (vvar_store_cache);
}
bool
get_instance_glyphs_contour_points (hb_subset_plan_t *plan)
{
/* contour_points vector only needed for updating gvar table (infer delta and
* iup delta optimization) during partial instancing */
if (plan->user_axes_location.is_empty () || plan->all_axes_pinned)
return true;
OT::glyf_accelerator_t glyf (plan->source);
for (auto &_ : plan->new_to_old_gid_list)
{
hb_codepoint_t new_gid = _.first;
contour_point_vector_t all_points;
if (new_gid == 0 && !(plan->flags & HB_SUBSET_FLAGS_NOTDEF_OUTLINE))
{
if (unlikely (!plan->new_gid_contour_points_map.set (new_gid, all_points)))
return false;
continue;
}
hb_codepoint_t old_gid = _.second;
auto glyph = glyf.glyph_for_gid (old_gid);
if (unlikely (!glyph.get_all_points_without_var (plan->source, all_points)))
return false;
if (unlikely (!plan->new_gid_contour_points_map.set (new_gid, all_points)))
return false;
/* composite new gids are only needed by iup delta optimization */
if ((plan->flags & HB_SUBSET_FLAGS_OPTIMIZE_IUP_DELTAS) && glyph.is_composite ())
plan->composite_new_gids.add (new_gid);
}
return true;
}
template<typename DeltaSetIndexMap>
void
remap_colrv1_delta_set_index_indices (const DeltaSetIndexMap &index_map,
const hb_set_t &delta_set_idxes,
hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> &variation_idx_delta_map, /* IN/OUT */
hb_map_t &new_deltaset_idx_varidx_map /* OUT */)
{
if (!index_map.get_map_count ())
return;
hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> delta_set_idx_delta_map;
unsigned new_delta_set_idx = 0;
for (unsigned delta_set_idx : delta_set_idxes)
{
unsigned var_idx = index_map.map (delta_set_idx);
unsigned new_varidx = HB_OT_LAYOUT_NO_VARIATIONS_INDEX;
int delta = 0;
if (var_idx != HB_OT_LAYOUT_NO_VARIATIONS_INDEX)
{
hb_pair_t<unsigned, int> *new_varidx_delta;
if (!variation_idx_delta_map.has (var_idx, &new_varidx_delta)) continue;
new_varidx = hb_first (*new_varidx_delta);
delta = hb_second (*new_varidx_delta);
}
new_deltaset_idx_varidx_map.set (new_delta_set_idx, new_varidx);
delta_set_idx_delta_map.set (delta_set_idx, hb_pair_t<unsigned, int> (new_delta_set_idx, delta));
new_delta_set_idx++;
}
variation_idx_delta_map = std::move (delta_set_idx_delta_map);
}
template void
remap_colrv1_delta_set_index_indices<OT::DeltaSetIndexMap> (const OT::DeltaSetIndexMap &index_map,
const hb_set_t &delta_set_idxes,
hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> &variation_idx_delta_map, /* IN/OUT */
hb_map_t &new_deltaset_idx_varidx_map /* OUT */);
#endif

View File

@@ -29,27 +29,21 @@
#include "hb-map.hh" #include "hb-map.hh"
#include "hb-multimap.hh" #include "hb-multimap.hh"
#include "hb-set.hh" #include "hb-set.hh"
#include "hb-subset.h"
#include "hb-unicode.h"
#include "hb-ot-cmap-table.hh" #include "hb-ot-cmap-table.hh"
#include "hb-ot-glyf-table.hh" #include "hb-ot-glyf-table.hh"
#include "hb-ot-layout-base-table.hh" #include "hb-ot-layout-base-table.hh"
#include "hb-ot-layout-gdef-table.hh"
#include "hb-ot-layout-gpos-table.hh"
#include "hb-ot-layout-gsub-table.hh"
#include "hb-ot-cff1-table.hh" #include "hb-ot-cff1-table.hh"
#include "hb-ot-cff2-table.hh" #include "hb-ot-cff2-table.hh"
#include "OT/Color/COLR/COLR.hh" #include "OT/Color/COLR/COLR.hh"
#include "OT/Color/COLR/colrv1-closure.hh" #include "OT/Color/COLR/colrv1-closure.hh"
#include "OT/Color/CPAL/CPAL.hh" #include "OT/Color/CPAL/CPAL.hh"
#include "hb-ot-var-fvar-table.hh" #include "hb-ot-var-fvar-table.hh"
#include "hb-ot-var-avar-table.hh"
#include "hb-ot-stat-table.hh" #include "hb-ot-stat-table.hh"
#include "hb-ot-math-table.hh" #include "hb-ot-math-table.hh"
using OT::Layout::GSUB;
using OT::Layout::GPOS;
hb_subset_accelerator_t::~hb_subset_accelerator_t () hb_subset_accelerator_t::~hb_subset_accelerator_t ()
{ {
if (cmap_cache && destroy_cmap_cache) if (cmap_cache && destroy_cmap_cache)
@@ -63,7 +57,6 @@ hb_subset_accelerator_t::~hb_subset_accelerator_t ()
} }
typedef hb_hashmap_t<unsigned, hb::unique_ptr<hb_set_t>> script_langsys_map;
#ifndef HB_NO_SUBSET_CFF #ifndef HB_NO_SUBSET_CFF
static inline bool static inline bool
_add_cff_seac_components (const OT::cff1::accelerator_subset_t &cff, _add_cff_seac_components (const OT::cff1::accelerator_subset_t &cff,
@@ -98,414 +91,14 @@ _remap_palette_indexes (const hb_set_t *palette_indexes,
} }
} }
static void void
_remap_indexes (const hb_set_t *indexes, remap_indexes (const hb_set_t *indexes,
hb_map_t *mapping /* OUT */) hb_map_t *mapping /* OUT */)
{ {
for (auto _ : + hb_enumerate (indexes->iter ())) for (auto _ : + hb_enumerate (indexes->iter ()))
mapping->set (_.second, _.first); mapping->set (_.second, _.first);
} }
#ifndef HB_NO_SUBSET_LAYOUT
/*
* Removes all tags from 'tags' that are not in filter. Additionally eliminates any duplicates.
* Returns true if anything was removed (not including duplicates).
*/
static bool _filter_tag_list(hb_vector_t<hb_tag_t>* tags, /* IN/OUT */
const hb_set_t* filter)
{
hb_vector_t<hb_tag_t> out;
out.alloc (tags->get_size() + 1); // +1 is to allocate room for the null terminator.
bool removed = false;
hb_set_t visited;
for (hb_tag_t tag : *tags)
{
if (!tag) continue;
if (visited.has (tag)) continue;
if (!filter->has (tag))
{
removed = true;
continue;
}
visited.add (tag);
out.push (tag);
}
// The collect function needs a null element to signal end of the array.
out.push (HB_TAG_NONE);
hb_swap (out, *tags);
return removed;
}
template <typename T>
static void _collect_layout_indices (hb_subset_plan_t *plan,
const T& table,
hb_set_t *lookup_indices, /* OUT */
hb_set_t *feature_indices, /* OUT */
hb_hashmap_t<unsigned, hb::shared_ptr<hb_set_t>> *feature_record_cond_idx_map, /* OUT */
hb_hashmap_t<unsigned, const OT::Feature*> *feature_substitutes_map, /* OUT */
hb_set_t& catch_all_record_feature_idxes, /* OUT */
hb_hashmap_t<unsigned, hb_pair_t<const void*, const void*>>& catch_all_record_idx_feature_map /* OUT */)
{
unsigned num_features = table.get_feature_count ();
hb_vector_t<hb_tag_t> features;
if (!plan->check_success (features.resize (num_features))) return;
table.get_feature_tags (0, &num_features, features.arrayZ);
bool retain_all_features = !_filter_tag_list (&features, &plan->layout_features);
unsigned num_scripts = table.get_script_count ();
hb_vector_t<hb_tag_t> scripts;
if (!plan->check_success (scripts.resize (num_scripts))) return;
table.get_script_tags (0, &num_scripts, scripts.arrayZ);
bool retain_all_scripts = !_filter_tag_list (&scripts, &plan->layout_scripts);
if (!plan->check_success (!features.in_error ()) || !features
|| !plan->check_success (!scripts.in_error ()) || !scripts)
return;
hb_ot_layout_collect_features (plan->source,
T::tableTag,
retain_all_scripts ? nullptr : scripts.arrayZ,
nullptr,
retain_all_features ? nullptr : features.arrayZ,
feature_indices);
#ifndef HB_NO_VAR
// collect feature substitutes with variations
if (!plan->user_axes_location.is_empty ())
{
hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned> conditionset_map;
OT::hb_collect_feature_substitutes_with_var_context_t c =
{
&plan->axes_old_index_tag_map,
&plan->axes_location,
feature_record_cond_idx_map,
feature_substitutes_map,
catch_all_record_feature_idxes,
feature_indices,
false,
false,
false,
0,
&conditionset_map
};
table.collect_feature_substitutes_with_variations (&c);
}
#endif
for (unsigned feature_index : *feature_indices)
{
const OT::Feature* f = &(table.get_feature (feature_index));
const OT::Feature **p = nullptr;
if (feature_substitutes_map->has (feature_index, &p))
f = *p;
f->add_lookup_indexes_to (lookup_indices);
}
#ifndef HB_NO_VAR
if (catch_all_record_feature_idxes)
{
for (unsigned feature_index : catch_all_record_feature_idxes)
{
const OT::Feature& f = table.get_feature (feature_index);
f.add_lookup_indexes_to (lookup_indices);
const void *tag = reinterpret_cast<const void*> (&(table.get_feature_list ().get_tag (feature_index)));
catch_all_record_idx_feature_map.set (feature_index, hb_pair (&f, tag));
}
}
// If all axes are pinned then all feature variations will be dropped so there's no need
// to collect lookups from them.
if (!plan->all_axes_pinned)
table.feature_variation_collect_lookups (feature_indices,
plan->user_axes_location.is_empty () ? nullptr: feature_record_cond_idx_map,
lookup_indices);
#endif
}
static inline void
_GSUBGPOS_find_duplicate_features (const OT::GSUBGPOS &g,
const hb_map_t *lookup_indices,
const hb_set_t *feature_indices,
const hb_hashmap_t<unsigned, const OT::Feature*> *feature_substitutes_map,
hb_map_t *duplicate_feature_map /* OUT */)
{
if (feature_indices->is_empty ()) return;
hb_hashmap_t<hb_tag_t, hb::unique_ptr<hb_set_t>> unique_features;
//find out duplicate features after subset
for (unsigned i : feature_indices->iter ())
{
hb_tag_t t = g.get_feature_tag (i);
if (t == HB_MAP_VALUE_INVALID) continue;
if (!unique_features.has (t))
{
if (unlikely (!unique_features.set (t, hb::unique_ptr<hb_set_t> {hb_set_create ()})))
return;
if (unique_features.has (t))
unique_features.get (t)->add (i);
duplicate_feature_map->set (i, i);
continue;
}
bool found = false;
hb_set_t* same_tag_features = unique_features.get (t);
for (unsigned other_f_index : same_tag_features->iter ())
{
const OT::Feature* f = &(g.get_feature (i));
const OT::Feature **p = nullptr;
if (feature_substitutes_map->has (i, &p))
f = *p;
const OT::Feature* other_f = &(g.get_feature (other_f_index));
if (feature_substitutes_map->has (other_f_index, &p))
other_f = *p;
auto f_iter =
+ hb_iter (f->lookupIndex)
| hb_filter (lookup_indices)
;
auto other_f_iter =
+ hb_iter (other_f->lookupIndex)
| hb_filter (lookup_indices)
;
bool is_equal = true;
for (; f_iter && other_f_iter; f_iter++, other_f_iter++)
{
unsigned a = *f_iter;
unsigned b = *other_f_iter;
if (a != b) { is_equal = false; break; }
}
if (is_equal == false || f_iter || other_f_iter) continue;
found = true;
duplicate_feature_map->set (i, other_f_index);
break;
}
if (found == false)
{
same_tag_features->add (i);
duplicate_feature_map->set (i, i);
}
}
}
template <typename T>
static inline void
_closure_glyphs_lookups_features (hb_subset_plan_t *plan,
hb_set_t *gids_to_retain,
hb_map_t *lookups,
hb_map_t *features,
script_langsys_map *langsys_map,
hb_hashmap_t<unsigned, hb::shared_ptr<hb_set_t>> *feature_record_cond_idx_map,
hb_hashmap_t<unsigned, const OT::Feature*> *feature_substitutes_map,
hb_set_t &catch_all_record_feature_idxes,
hb_hashmap_t<unsigned, hb_pair_t<const void*, const void*>>& catch_all_record_idx_feature_map)
{
hb_blob_ptr_t<T> table = plan->source_table<T> ();
hb_tag_t table_tag = table->tableTag;
hb_set_t lookup_indices, feature_indices;
_collect_layout_indices<T> (plan,
*table,
&lookup_indices,
&feature_indices,
feature_record_cond_idx_map,
feature_substitutes_map,
catch_all_record_feature_idxes,
catch_all_record_idx_feature_map);
if (table_tag == HB_OT_TAG_GSUB && !(plan->flags & HB_SUBSET_FLAGS_NO_LAYOUT_CLOSURE))
hb_ot_layout_lookups_substitute_closure (plan->source,
&lookup_indices,
gids_to_retain);
table->closure_lookups (plan->source,
gids_to_retain,
&lookup_indices);
_remap_indexes (&lookup_indices, lookups);
// prune features
table->prune_features (lookups,
plan->user_axes_location.is_empty () ? nullptr : feature_record_cond_idx_map,
feature_substitutes_map,
&feature_indices);
hb_map_t duplicate_feature_map;
_GSUBGPOS_find_duplicate_features (*table, lookups, &feature_indices, feature_substitutes_map, &duplicate_feature_map);
feature_indices.clear ();
table->prune_langsys (&duplicate_feature_map, &plan->layout_scripts, langsys_map, &feature_indices);
_remap_indexes (&feature_indices, features);
table.destroy ();
}
#endif
#ifndef HB_NO_VAR
static inline void
_generate_varstore_inner_maps (const hb_set_t& varidx_set,
unsigned subtable_count,
hb_vector_t<hb_inc_bimap_t> &inner_maps /* OUT */)
{
if (varidx_set.is_empty () || subtable_count == 0) return;
if (unlikely (!inner_maps.resize (subtable_count))) return;
for (unsigned idx : varidx_set)
{
uint16_t major = idx >> 16;
uint16_t minor = idx & 0xFFFF;
if (major >= subtable_count)
continue;
inner_maps[major].add (minor);
}
}
static inline hb_font_t*
_get_hb_font_with_variations (const hb_subset_plan_t *plan)
{
hb_font_t *font = hb_font_create (plan->source);
hb_vector_t<hb_variation_t> vars;
if (!vars.alloc (plan->user_axes_location.get_population ())) {
hb_font_destroy (font);
return nullptr;
}
for (auto _ : plan->user_axes_location)
{
hb_variation_t var;
var.tag = _.first;
var.value = _.second.middle;
vars.push (var);
}
#ifndef HB_NO_VAR
hb_font_set_variations (font, vars.arrayZ, plan->user_axes_location.get_population ());
#endif
return font;
}
static inline void
_remap_variation_indices (const OT::ItemVariationStore &var_store,
const hb_set_t &variation_indices,
const hb_vector_t<int>& normalized_coords,
bool calculate_delta, /* not pinned at default */
bool no_variations, /* all axes pinned */
hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> &variation_idx_delta_map /* OUT */)
{
if (&var_store == &Null (OT::ItemVariationStore)) return;
unsigned subtable_count = var_store.get_sub_table_count ();
auto *store_cache = var_store.create_cache ();
unsigned new_major = 0, new_minor = 0;
unsigned last_major = (variation_indices.get_min ()) >> 16;
for (unsigned idx : variation_indices)
{
int delta = 0;
if (calculate_delta)
delta = roundf (var_store.get_delta (idx, normalized_coords.arrayZ,
normalized_coords.length, store_cache));
if (no_variations)
{
variation_idx_delta_map.set (idx, hb_pair_t<unsigned, int> (HB_OT_LAYOUT_NO_VARIATIONS_INDEX, delta));
continue;
}
uint16_t major = idx >> 16;
if (major >= subtable_count) break;
if (major != last_major)
{
new_minor = 0;
++new_major;
}
unsigned new_idx = (new_major << 16) + new_minor;
variation_idx_delta_map.set (idx, hb_pair_t<unsigned, int> (new_idx, delta));
++new_minor;
last_major = major;
}
var_store.destroy_cache (store_cache);
}
static inline void
_collect_layout_variation_indices (hb_subset_plan_t* plan)
{
hb_blob_ptr_t<OT::GDEF> gdef = plan->source_table<OT::GDEF> ();
hb_blob_ptr_t<GPOS> gpos = plan->source_table<GPOS> ();
if (!gdef->has_data () || !gdef->has_var_store ())
{
gdef.destroy ();
gpos.destroy ();
return;
}
hb_set_t varidx_set;
OT::hb_collect_variation_indices_context_t c (&varidx_set,
&plan->_glyphset_gsub,
&plan->gpos_lookups);
gdef->collect_variation_indices (&c);
if (hb_ot_layout_has_positioning (plan->source))
gpos->collect_variation_indices (&c);
_remap_variation_indices (gdef->get_var_store (),
varidx_set, plan->normalized_coords,
!plan->pinned_at_default,
plan->all_axes_pinned,
plan->layout_variation_idx_delta_map);
unsigned subtable_count = gdef->get_var_store ().get_sub_table_count ();
_generate_varstore_inner_maps (varidx_set, subtable_count, plan->gdef_varstore_inner_maps);
gdef.destroy ();
gpos.destroy ();
}
#ifndef HB_NO_BASE
static inline void
_collect_base_variation_indices (hb_subset_plan_t* plan)
{
hb_blob_ptr_t<OT::BASE> base = plan->source_table<OT::BASE> ();
if (!base->has_var_store ())
{
base.destroy ();
return;
}
hb_set_t varidx_set;
base->collect_variation_indices (plan, varidx_set);
const OT::ItemVariationStore &var_store = base->get_var_store ();
unsigned subtable_count = var_store.get_sub_table_count ();
_remap_variation_indices (var_store, varidx_set,
plan->normalized_coords,
!plan->pinned_at_default,
plan->all_axes_pinned,
plan->base_variation_idx_map);
_generate_varstore_inner_maps (varidx_set, subtable_count, plan->base_varstore_inner_maps);
base.destroy ();
}
#endif
#endif
static inline void static inline void
_cmap_closure (hb_face_t *face, _cmap_closure (hb_face_t *face,
const hb_set_t *unicodes, const hb_set_t *unicodes,
@@ -515,41 +108,6 @@ _cmap_closure (hb_face_t *face,
cmap.table->closure_glyphs (unicodes, glyphset); cmap.table->closure_glyphs (unicodes, glyphset);
} }
#ifndef HB_NO_VAR
static void
_remap_colrv1_delta_set_index_indices (const OT::DeltaSetIndexMap &index_map,
const hb_set_t &delta_set_idxes,
hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> &variation_idx_delta_map, /* IN/OUT */
hb_map_t &new_deltaset_idx_varidx_map /* OUT */)
{
if (!index_map.get_map_count ())
return;
hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> delta_set_idx_delta_map;
unsigned new_delta_set_idx = 0;
for (unsigned delta_set_idx : delta_set_idxes)
{
unsigned var_idx = index_map.map (delta_set_idx);
unsigned new_varidx = HB_OT_LAYOUT_NO_VARIATIONS_INDEX;
int delta = 0;
if (var_idx != HB_OT_LAYOUT_NO_VARIATIONS_INDEX)
{
hb_pair_t<unsigned, int> *new_varidx_delta;
if (!variation_idx_delta_map.has (var_idx, &new_varidx_delta)) continue;
new_varidx = hb_first (*new_varidx_delta);
delta = hb_second (*new_varidx_delta);
}
new_deltaset_idx_varidx_map.set (new_delta_set_idx, new_varidx);
delta_set_idx_delta_map.set (delta_set_idx, hb_pair_t<unsigned, int> (new_delta_set_idx, delta));
new_delta_set_idx++;
}
variation_idx_delta_map = std::move (delta_set_idx_delta_map);
}
#endif
static void _colr_closure (hb_subset_plan_t* plan, static void _colr_closure (hb_subset_plan_t* plan,
hb_set_t *glyphs_colred) hb_set_t *glyphs_colred)
{ {
@@ -569,7 +127,7 @@ static void _colr_closure (hb_subset_plan_t* plan,
colr.closure_forV1 (glyphs_colred, &layer_indices, &palette_indices, &variation_indices, &delta_set_indices); colr.closure_forV1 (glyphs_colred, &layer_indices, &palette_indices, &variation_indices, &delta_set_indices);
colr.closure_V0palette_indices (glyphs_colred, &palette_indices); colr.closure_V0palette_indices (glyphs_colred, &palette_indices);
_remap_indexes (&layer_indices, &plan->colrv1_layers); remap_indexes (&layer_indices, &plan->colrv1_layers);
_remap_palette_indexes (&palette_indices, &plan->colr_palettes); _remap_palette_indexes (&palette_indices, &plan->colr_palettes);
#ifndef HB_NO_VAR #ifndef HB_NO_VAR
@@ -578,7 +136,7 @@ static void _colr_closure (hb_subset_plan_t* plan,
const OT::ItemVariationStore &var_store = colr.get_var_store (); const OT::ItemVariationStore &var_store = colr.get_var_store ();
// generated inner_maps is used by ItemVariationStore serialize(), which is subset only // generated inner_maps is used by ItemVariationStore serialize(), which is subset only
unsigned subtable_count = var_store.get_sub_table_count (); unsigned subtable_count = var_store.get_sub_table_count ();
_generate_varstore_inner_maps (variation_indices, subtable_count, plan->colrv1_varstore_inner_maps); generate_varstore_inner_maps (variation_indices, subtable_count, plan->colrv1_varstore_inner_maps);
/* colr variation indices mapping during planning phase: /* colr variation indices mapping during planning phase:
* generate colrv1_variation_idx_delta_map. When delta set index map is not * generate colrv1_variation_idx_delta_map. When delta set index map is not
@@ -590,7 +148,7 @@ static void _colr_closure (hb_subset_plan_t* plan,
* instancing. */ * instancing. */
if (!plan->all_axes_pinned) if (!plan->all_axes_pinned)
{ {
_remap_variation_indices (var_store, remap_variation_indices (var_store,
variation_indices, variation_indices,
plan->normalized_coords, plan->normalized_coords,
false, /* no need to calculate delta for COLR during planning */ false, /* no need to calculate delta for COLR during planning */
@@ -598,7 +156,7 @@ static void _colr_closure (hb_subset_plan_t* plan,
plan->colrv1_variation_idx_delta_map); plan->colrv1_variation_idx_delta_map);
if (colr.has_delta_set_index_map ()) if (colr.has_delta_set_index_map ())
_remap_colrv1_delta_set_index_indices (colr.get_delta_set_index_map (), remap_colrv1_delta_set_index_indices (colr.get_delta_set_index_map (),
delta_set_indices, delta_set_indices,
plan->colrv1_variation_idx_delta_map, plan->colrv1_variation_idx_delta_map,
plan->colrv1_new_deltaset_idx_varidx_map); plan->colrv1_new_deltaset_idx_varidx_map);
@@ -616,25 +174,6 @@ _math_closure (hb_subset_plan_t *plan,
math.destroy (); math.destroy ();
} }
static inline void
_remap_used_mark_sets (hb_subset_plan_t *plan,
hb_map_t& used_mark_sets_map)
{
hb_blob_ptr_t<OT::GDEF> gdef = plan->source_table<OT::GDEF> ();
if (!gdef->has_data () || !gdef->has_mark_glyph_sets ())
{
gdef.destroy ();
return;
}
hb_set_t used_mark_sets;
gdef->get_mark_glyph_sets ().collect_used_mark_sets (plan->_glyphset_gsub, used_mark_sets);
gdef.destroy ();
_remap_indexes (&used_mark_sets, &used_mark_sets_map);
}
static inline void static inline void
_remove_invalid_gids (hb_set_t *glyphs, _remove_invalid_gids (hb_set_t *glyphs,
unsigned int num_glyphs) unsigned int num_glyphs)
@@ -672,15 +211,46 @@ _fill_unicode_and_glyph_map(hb_subset_plan_t *plan,
_fill_unicode_and_glyph_map(plan, unicode_iterator, unicode_to_gid_for_iterator, unicode_to_gid_for_iterator); _fill_unicode_and_glyph_map(plan, unicode_iterator, unicode_to_gid_for_iterator, unicode_to_gid_for_iterator);
} }
/*
* Finds additional unicode codepoints which are reachable from the input unicode set.
* Currently this adds in mirrored variants (needed for bidi) of any input unicodes.
*/
static hb_set_t
_unicode_closure (const hb_set_t* unicodes, bool bidi_closure) {
// TODO: we may want to also consider pulling in reachable unicode composition and decompositions.
// see: https://github.com/harfbuzz/harfbuzz/issues/2283
hb_set_t out = *unicodes;
if (!bidi_closure) return out;
if (out.is_inverted()) {
// don't closure inverted sets, they are asking to specifically exclude certain codepoints.
// otherwise everything is already included.
return out;
}
auto unicode_funcs = hb_unicode_funcs_get_default ();
for (hb_codepoint_t cp : *unicodes) {
hb_codepoint_t mirror = hb_unicode_mirroring(unicode_funcs, cp);
if (unlikely (mirror != cp)) {
out.add(mirror);
}
}
return out;
}
static void static void
_populate_unicodes_to_retain (const hb_set_t *unicodes, _populate_unicodes_to_retain (const hb_set_t *unicodes_in,
const hb_set_t *glyphs, const hb_set_t *glyphs,
hb_subset_plan_t *plan) hb_subset_plan_t *plan)
{ {
hb_set_t unicodes = _unicode_closure(unicodes_in,
!(plan->flags & HB_SUBSET_FLAGS_NO_BIDI_CLOSURE));
OT::cmap::accelerator_t cmap (plan->source); OT::cmap::accelerator_t cmap (plan->source);
unsigned size_threshold = plan->source->get_num_glyphs (); unsigned size_threshold = plan->source->get_num_glyphs ();
if (glyphs->is_empty () && unicodes->get_population () < size_threshold) if (glyphs->is_empty () && unicodes.get_population () < size_threshold)
{ {
const hb_map_t* unicode_to_gid = nullptr; const hb_map_t* unicode_to_gid = nullptr;
@@ -690,9 +260,9 @@ _populate_unicodes_to_retain (const hb_set_t *unicodes,
// This is approach to collection is faster, but can only be used if glyphs // This is approach to collection is faster, but can only be used if glyphs
// are not being explicitly added to the subset and the input unicodes set is // are not being explicitly added to the subset and the input unicodes set is
// not excessively large (eg. an inverted set). // not excessively large (eg. an inverted set).
plan->unicode_to_new_gid_list.alloc (unicodes->get_population ()); plan->unicode_to_new_gid_list.alloc (unicodes.get_population ());
if (!unicode_to_gid) { if (!unicode_to_gid) {
_fill_unicode_and_glyph_map(plan, unicodes->iter(), [&] (hb_codepoint_t cp) { _fill_unicode_and_glyph_map(plan, unicodes.iter(), [&] (hb_codepoint_t cp) {
hb_codepoint_t gid; hb_codepoint_t gid;
if (!cmap.get_nominal_glyph (cp, &gid)) { if (!cmap.get_nominal_glyph (cp, &gid)) {
return HB_MAP_VALUE_INVALID; return HB_MAP_VALUE_INVALID;
@@ -704,7 +274,7 @@ _populate_unicodes_to_retain (const hb_set_t *unicodes,
// the map. This code is mostly duplicated from above to avoid doing // the map. This code is mostly duplicated from above to avoid doing
// conditionals on the presence of the unicode_to_gid map each // conditionals on the presence of the unicode_to_gid map each
// iteration. // iteration.
_fill_unicode_and_glyph_map(plan, unicodes->iter(), [&] (hb_codepoint_t cp) { _fill_unicode_and_glyph_map(plan, unicodes.iter(), [&] (hb_codepoint_t cp) {
return unicode_to_gid->get (cp); return unicode_to_gid->get (cp);
}); });
} }
@@ -721,7 +291,7 @@ _populate_unicodes_to_retain (const hb_set_t *unicodes,
if (!plan->accelerator) { if (!plan->accelerator) {
cmap.collect_mapping (&cmap_unicodes_storage, &unicode_glyphid_map_storage); cmap.collect_mapping (&cmap_unicodes_storage, &unicode_glyphid_map_storage);
plan->unicode_to_new_gid_list.alloc (hb_min(unicodes->get_population () plan->unicode_to_new_gid_list.alloc (hb_min(unicodes.get_population ()
+ glyphs->get_population (), + glyphs->get_population (),
cmap_unicodes->get_population ())); cmap_unicodes->get_population ()));
} else { } else {
@@ -730,10 +300,10 @@ _populate_unicodes_to_retain (const hb_set_t *unicodes,
} }
if (plan->accelerator && if (plan->accelerator &&
unicodes->get_population () < cmap_unicodes->get_population () && unicodes.get_population () < cmap_unicodes->get_population () &&
glyphs->get_population () < cmap_unicodes->get_population ()) glyphs->get_population () < cmap_unicodes->get_population ())
{ {
plan->codepoint_to_glyph->alloc (unicodes->get_population () + glyphs->get_population ()); plan->codepoint_to_glyph->alloc (unicodes.get_population () + glyphs->get_population ());
auto &gid_to_unicodes = plan->accelerator->gid_to_unicodes; auto &gid_to_unicodes = plan->accelerator->gid_to_unicodes;
@@ -748,7 +318,7 @@ _populate_unicodes_to_retain (const hb_set_t *unicodes,
}); });
} }
_fill_unicode_and_glyph_map(plan, unicodes->iter(), [&] (hb_codepoint_t cp) { _fill_unicode_and_glyph_map(plan, unicodes.iter(), [&] (hb_codepoint_t cp) {
/* Don't double-add entry. */ /* Don't double-add entry. */
if (plan->codepoint_to_glyph->has (cp)) if (plan->codepoint_to_glyph->has (cp))
return HB_MAP_VALUE_INVALID; return HB_MAP_VALUE_INVALID;
@@ -769,7 +339,7 @@ _populate_unicodes_to_retain (const hb_set_t *unicodes,
{ {
_fill_unicode_and_glyph_map(plan, hb_range(first, last + 1), [&] (hb_codepoint_t cp) { _fill_unicode_and_glyph_map(plan, hb_range(first, last + 1), [&] (hb_codepoint_t cp) {
hb_codepoint_t gid = (*unicode_glyphid_map)[cp]; hb_codepoint_t gid = (*unicode_glyphid_map)[cp];
if (!unicodes->has (cp) && !glyphs->has (gid)) if (!unicodes.has (cp) && !glyphs->has (gid))
return HB_MAP_VALUE_INVALID; return HB_MAP_VALUE_INVALID;
return gid; return gid;
}, },
@@ -860,18 +430,7 @@ _nameid_closure (hb_subset_plan_t* plan,
#endif #endif
#ifndef HB_NO_SUBSET_LAYOUT #ifndef HB_NO_SUBSET_LAYOUT
if (!drop_tables->has (HB_OT_TAG_GPOS)) layout_nameid_closure(plan, drop_tables);
{
hb_blob_ptr_t<GPOS> gpos = plan->source_table<GPOS> ();
gpos->collect_name_ids (&plan->gpos_features, &plan->name_ids);
gpos.destroy ();
}
if (!drop_tables->has (HB_OT_TAG_GSUB))
{
hb_blob_ptr_t<GSUB> gsub = plan->source_table<GSUB> ();
gsub->collect_name_ids (&plan->gsub_features, &plan->name_ids);
gsub.destroy ();
}
#endif #endif
} }
@@ -893,31 +452,9 @@ _populate_gids_to_retain (hb_subset_plan_t* plan,
_cmap_closure (plan->source, &plan->unicodes, &plan->_glyphset_gsub); _cmap_closure (plan->source, &plan->unicodes, &plan->_glyphset_gsub);
#ifndef HB_NO_SUBSET_LAYOUT #ifndef HB_NO_SUBSET_LAYOUT
if (!drop_tables->has (HB_OT_TAG_GSUB)) layout_populate_gids_to_retain(plan, drop_tables);
// closure all glyphs/lookups/features needed for GSUB substitutions.
_closure_glyphs_lookups_features<GSUB> (
plan,
&plan->_glyphset_gsub,
&plan->gsub_lookups,
&plan->gsub_features,
&plan->gsub_langsys,
&plan->gsub_feature_record_cond_idx_map,
&plan->gsub_feature_substitutes_map,
plan->gsub_old_features,
plan->gsub_old_feature_idx_tag_map);
if (!drop_tables->has (HB_OT_TAG_GPOS))
_closure_glyphs_lookups_features<GPOS> (
plan,
&plan->_glyphset_gsub,
&plan->gpos_lookups,
&plan->gpos_features,
&plan->gpos_langsys,
&plan->gpos_feature_record_cond_idx_map,
&plan->gpos_feature_substitutes_map,
plan->gpos_old_features,
plan->gpos_old_feature_idx_tag_map);
#endif #endif
_remove_invalid_gids (&plan->_glyphset_gsub, plan->source->get_num_glyphs ()); _remove_invalid_gids (&plan->_glyphset_gsub, plan->source->get_num_glyphs ());
plan->_glyphset_mathed = plan->_glyphset_gsub; plan->_glyphset_mathed = plan->_glyphset_gsub;
@@ -962,8 +499,10 @@ _populate_gids_to_retain (hb_subset_plan_t* plan,
_remove_invalid_gids (&plan->_glyphset, plan->source->get_num_glyphs ()); _remove_invalid_gids (&plan->_glyphset, plan->source->get_num_glyphs ());
#ifndef HB_NO_VAR #ifndef HB_NO_VAR
#ifndef HB_NO_SUBSET_LAYOUT
if (!drop_tables->has (HB_OT_TAG_GDEF)) if (!drop_tables->has (HB_OT_TAG_GDEF))
_collect_layout_variation_indices (plan); collect_layout_variation_indices (plan);
#endif
#endif #endif
} }
@@ -1077,193 +616,6 @@ _create_old_gid_to_new_gid_map (const hb_face_t *face,
return true; return true;
} }
#ifndef HB_NO_VAR
static void
_normalize_axes_location (hb_face_t *face, hb_subset_plan_t *plan)
{
if (plan->user_axes_location.is_empty ())
return;
hb_array_t<const OT::AxisRecord> axes = face->table.fvar->get_axes ();
plan->normalized_coords.resize (axes.length);
bool has_avar = face->table.avar->has_data ();
const OT::SegmentMaps *seg_maps = nullptr;
unsigned avar_axis_count = 0;
if (has_avar)
{
seg_maps = face->table.avar->get_segment_maps ();
avar_axis_count = face->table.avar->get_axis_count();
}
bool axis_not_pinned = false;
unsigned old_axis_idx = 0, new_axis_idx = 0;
for (const auto& axis : axes)
{
hb_tag_t axis_tag = axis.get_axis_tag ();
plan->axes_old_index_tag_map.set (old_axis_idx, axis_tag);
if (!plan->user_axes_location.has (axis_tag) ||
!plan->user_axes_location.get (axis_tag).is_point ())
{
axis_not_pinned = true;
plan->axes_index_map.set (old_axis_idx, new_axis_idx);
plan->axis_tags.push (axis_tag);
new_axis_idx++;
}
Triple *axis_range;
if (plan->user_axes_location.has (axis_tag, &axis_range))
{
plan->axes_triple_distances.set (axis_tag, axis.get_triple_distances ());
int normalized_min = axis.normalize_axis_value (axis_range->minimum);
int normalized_default = axis.normalize_axis_value (axis_range->middle);
int normalized_max = axis.normalize_axis_value (axis_range->maximum);
if (has_avar && old_axis_idx < avar_axis_count)
{
normalized_min = seg_maps->map (normalized_min);
normalized_default = seg_maps->map (normalized_default);
normalized_max = seg_maps->map (normalized_max);
}
plan->axes_location.set (axis_tag, Triple (static_cast<double> (normalized_min / 16384.0),
static_cast<double> (normalized_default / 16384.0),
static_cast<double> (normalized_max / 16384.0)));
if (normalized_default != 0)
plan->pinned_at_default = false;
plan->normalized_coords[old_axis_idx] = normalized_default;
}
old_axis_idx++;
if (has_avar && old_axis_idx < avar_axis_count)
seg_maps = &StructAfter<OT::SegmentMaps> (*seg_maps);
}
plan->all_axes_pinned = !axis_not_pinned;
}
static void
_update_instance_metrics_map_from_cff2 (hb_subset_plan_t *plan)
{
if (!plan->normalized_coords) return;
OT::cff2::accelerator_t cff2 (plan->source);
if (!cff2.is_valid ()) return;
hb_font_t *font = _get_hb_font_with_variations (plan);
if (unlikely (!plan->check_success (font != nullptr)))
{
hb_font_destroy (font);
return;
}
hb_glyph_extents_t extents = {0x7FFF, -0x7FFF};
OT::hmtx_accelerator_t _hmtx (plan->source);
OT::ItemVariationStore::cache_t *hvar_store_cache = nullptr;
if (_hmtx.has_data () && _hmtx.var_table.get_length ())
hvar_store_cache = _hmtx.var_table->get_var_store ().create_cache ();
OT::vmtx_accelerator_t _vmtx (plan->source);
OT::ItemVariationStore::cache_t *vvar_store_cache = nullptr;
if (_vmtx.has_data () && _vmtx.var_table.get_length ())
vvar_store_cache = _vmtx.var_table->get_var_store ().create_cache ();
for (auto p : *plan->glyph_map)
{
hb_codepoint_t old_gid = p.first;
hb_codepoint_t new_gid = p.second;
if (!cff2.get_extents (font, old_gid, &extents)) continue;
bool has_bounds_info = true;
if (extents.x_bearing == 0 && extents.width == 0 &&
extents.height == 0 && extents.y_bearing == 0)
has_bounds_info = false;
if (has_bounds_info)
{
plan->head_maxp_info.xMin = hb_min (plan->head_maxp_info.xMin, extents.x_bearing);
plan->head_maxp_info.xMax = hb_max (plan->head_maxp_info.xMax, extents.x_bearing + extents.width);
plan->head_maxp_info.yMax = hb_max (plan->head_maxp_info.yMax, extents.y_bearing);
plan->head_maxp_info.yMin = hb_min (plan->head_maxp_info.yMin, extents.y_bearing + extents.height);
}
if (_hmtx.has_data ())
{
int hori_aw = _hmtx.get_advance_without_var_unscaled (old_gid);
if (_hmtx.var_table.get_length ())
hori_aw += (int) roundf (_hmtx.var_table->get_advance_delta_unscaled (old_gid, font->coords, font->num_coords,
hvar_store_cache));
int lsb = extents.x_bearing;
if (!has_bounds_info)
{
if (!_hmtx.get_leading_bearing_without_var_unscaled (old_gid, &lsb))
continue;
}
plan->hmtx_map.set (new_gid, hb_pair ((unsigned) hori_aw, lsb));
plan->bounds_width_vec[new_gid] = extents.width;
}
if (_vmtx.has_data ())
{
int vert_aw = _vmtx.get_advance_without_var_unscaled (old_gid);
if (_vmtx.var_table.get_length ())
vert_aw += (int) roundf (_vmtx.var_table->get_advance_delta_unscaled (old_gid, font->coords, font->num_coords,
vvar_store_cache));
int tsb = extents.y_bearing;
if (!has_bounds_info)
{
if (!_vmtx.get_leading_bearing_without_var_unscaled (old_gid, &tsb))
continue;
}
plan->vmtx_map.set (new_gid, hb_pair ((unsigned) vert_aw, tsb));
plan->bounds_height_vec[new_gid] = extents.height;
}
}
hb_font_destroy (font);
if (hvar_store_cache)
_hmtx.var_table->get_var_store ().destroy_cache (hvar_store_cache);
if (vvar_store_cache)
_vmtx.var_table->get_var_store ().destroy_cache (vvar_store_cache);
}
static bool
_get_instance_glyphs_contour_points (hb_subset_plan_t *plan)
{
/* contour_points vector only needed for updating gvar table (infer delta and
* iup delta optimization) during partial instancing */
if (plan->user_axes_location.is_empty () || plan->all_axes_pinned)
return true;
OT::glyf_accelerator_t glyf (plan->source);
for (auto &_ : plan->new_to_old_gid_list)
{
hb_codepoint_t new_gid = _.first;
contour_point_vector_t all_points;
if (new_gid == 0 && !(plan->flags & HB_SUBSET_FLAGS_NOTDEF_OUTLINE))
{
if (unlikely (!plan->new_gid_contour_points_map.set (new_gid, all_points)))
return false;
continue;
}
hb_codepoint_t old_gid = _.second;
auto glyph = glyf.glyph_for_gid (old_gid);
if (unlikely (!glyph.get_all_points_without_var (plan->source, all_points)))
return false;
if (unlikely (!plan->new_gid_contour_points_map.set (new_gid, all_points)))
return false;
/* composite new gids are only needed by iup delta optimization */
if ((plan->flags & HB_SUBSET_FLAGS_OPTIMIZE_IUP_DELTAS) && glyph.is_composite ())
plan->composite_new_gids.add (new_gid);
}
return true;
}
#endif
hb_subset_plan_t::hb_subset_plan_t (hb_face_t *face, hb_subset_plan_t::hb_subset_plan_t (hb_face_t *face,
const hb_subset_input_t *input) const hb_subset_input_t *input)
{ {
@@ -1324,7 +676,7 @@ hb_subset_plan_t::hb_subset_plan_t (hb_face_t *face,
return; return;
#ifndef HB_NO_VAR #ifndef HB_NO_VAR
_normalize_axes_location (face, this); normalize_axes_location (face, this);
#endif #endif
_populate_unicodes_to_retain (input->sets.unicodes, input->sets.glyphs, this); _populate_unicodes_to_retain (input->sets.unicodes, input->sets.glyphs, this);
@@ -1365,13 +717,15 @@ hb_subset_plan_t::hb_subset_plan_t (hb_face_t *face,
for (auto &v : bounds_height_vec) for (auto &v : bounds_height_vec)
v = 0xFFFFFFFF; v = 0xFFFFFFFF;
#ifndef HB_NO_SUBSET_LAYOUT
if (!drop_tables.has (HB_OT_TAG_GDEF)) if (!drop_tables.has (HB_OT_TAG_GDEF))
_remap_used_mark_sets (this, used_mark_sets_map); remap_used_mark_sets (this, used_mark_sets_map);
#endif
#ifndef HB_NO_VAR #ifndef HB_NO_VAR
#ifndef HB_NO_BASE #ifndef HB_NO_BASE
if (!drop_tables.has (HB_OT_TAG_BASE)) if (!drop_tables.has (HB_OT_TAG_BASE))
_collect_base_variation_indices (this); collect_base_variation_indices (this);
#endif #endif
#endif #endif
@@ -1379,8 +733,8 @@ hb_subset_plan_t::hb_subset_plan_t (hb_face_t *face,
return; return;
#ifndef HB_NO_VAR #ifndef HB_NO_VAR
_update_instance_metrics_map_from_cff2 (this); update_instance_metrics_map_from_cff2 (this);
if (!check_success (_get_instance_glyphs_contour_points (this))) if (!check_success (get_instance_glyphs_contour_points (this)))
return; return;
#endif #endif

View File

@@ -296,5 +296,75 @@ struct hb_subset_plan_t
} }
}; };
// hb-subset-plan implementation is split into multiple files to keep
// compile times more reasonable:
// - hb-subset-plan.cc
// - hb-subset-plan-layout.cc
//
// The functions below are those needed to connect the split files
// above together.
HB_INTERNAL void
remap_indexes (const hb_set_t *indexes,
hb_map_t *mapping /* OUT */);
#ifndef HB_NO_VAR
template<typename ItemVarStore>
HB_INTERNAL void
remap_variation_indices (const ItemVarStore &var_store,
const hb_set_t &variation_indices,
const hb_vector_t<int>& normalized_coords,
bool calculate_delta, /* not pinned at default */
bool no_variations, /* all axes pinned */
hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> &variation_idx_delta_map /* OUT */);
template<typename DeltaSetIndexMap>
HB_INTERNAL void
remap_colrv1_delta_set_index_indices (const DeltaSetIndexMap &index_map,
const hb_set_t &delta_set_idxes,
hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> &variation_idx_delta_map, /* IN/OUT */
hb_map_t &new_deltaset_idx_varidx_map /* OUT */);
HB_INTERNAL void
generate_varstore_inner_maps (const hb_set_t& varidx_set,
unsigned subtable_count,
hb_vector_t<hb_inc_bimap_t> &inner_maps /* OUT */);
HB_INTERNAL void
normalize_axes_location (hb_face_t *face, hb_subset_plan_t *plan);
HB_INTERNAL void
update_instance_metrics_map_from_cff2 (hb_subset_plan_t *plan);
HB_INTERNAL bool
get_instance_glyphs_contour_points (hb_subset_plan_t *plan);
#ifndef HB_NO_BASE
HB_INTERNAL void
collect_base_variation_indices (hb_subset_plan_t* plan);
#endif
#endif
#ifndef HB_NO_SUBSET_LAYOUT
typedef hb_hashmap_t<unsigned, hb::unique_ptr<hb_set_t>> script_langsys_map;
HB_INTERNAL void
remap_used_mark_sets (hb_subset_plan_t *plan,
hb_map_t& used_mark_sets_map);
HB_INTERNAL void
layout_nameid_closure (hb_subset_plan_t* plan,
hb_set_t* drop_tables);
HB_INTERNAL void
layout_populate_gids_to_retain (hb_subset_plan_t* plan,
hb_set_t* drop_tables);
HB_INTERNAL void
collect_layout_variation_indices (hb_subset_plan_t* plan);
#endif
#endif /* HB_SUBSET_PLAN_HH */ #endif /* HB_SUBSET_PLAN_HH */

View File

@@ -730,7 +730,7 @@ static hb_blob_t* get_charstrings_data(accel_t& accel, hb_codepoint_t glyph_inde
const char* cff_data = hb_blob_get_data(cff_blob, &length) ; const char* cff_data = hb_blob_get_data(cff_blob, &length) ;
long int offset = (const char*) bytes.arrayZ - cff_data; long int offset = (const char*) bytes.arrayZ - cff_data;
if (offset < 0 || offset > UINT32_MAX) { if (offset < 0 || offset > INT32_MAX) {
return hb_blob_get_empty (); return hb_blob_get_empty ();
} }
@@ -751,7 +751,7 @@ static hb_blob_t* get_charstrings_index(accel_t& accel) {
const char* cff_data = hb_blob_get_data(cff_blob, &length) ; const char* cff_data = hb_blob_get_data(cff_blob, &length) ;
long int offset = charstrings_start - cff_data; long int offset = charstrings_start - cff_data;
if (offset < 0 || offset > UINT32_MAX) { if (offset < 0 || offset > INT32_MAX) {
return hb_blob_get_empty (); return hb_blob_get_empty ();
} }

View File

@@ -71,10 +71,12 @@ typedef struct hb_subset_plan_t hb_subset_plan_t;
* in the final subset. * in the final subset.
* @HB_SUBSET_FLAGS_NO_PRUNE_UNICODE_RANGES: If set then the unicode ranges in * @HB_SUBSET_FLAGS_NO_PRUNE_UNICODE_RANGES: If set then the unicode ranges in
* OS/2 will not be recalculated. * OS/2 will not be recalculated.
* @HB_SUBSET_FLAGS_NO_LAYOUT_CLOSURE: If set don't perform glyph closure on layout * @HB_SUBSET_FLAGS_NO_LAYOUT_CLOSURE: If set do not perform glyph closure on layout
* substitution rules (GSUB). Since: 7.2.0. * substitution rules (GSUB). Since: 7.2.0.
* @HB_SUBSET_FLAGS_OPTIMIZE_IUP_DELTAS: If set perform IUP delta optimization on the * @HB_SUBSET_FLAGS_OPTIMIZE_IUP_DELTAS: If set perform IUP delta optimization on the
* remaining gvar table's deltas. Since: 8.5.0 * remaining gvar table's deltas. Since: 8.5.0
* @HB_SUBSET_FLAGS_NO_BIDI_CLOSURE: If set do not pull mirrored versions of input
* codepoints into the subset. Since: 11.1.0
* @HB_SUBSET_FLAGS_IFTB_REQUIREMENTS: If set enforce requirements on the output subset * @HB_SUBSET_FLAGS_IFTB_REQUIREMENTS: If set enforce requirements on the output subset
* to allow it to be used with incremental font transfer IFTB patches. Primarily, * to allow it to be used with incremental font transfer IFTB patches. Primarily,
* this forces all outline data to use long (32 bit) offsets. Since: EXPERIMENTAL * this forces all outline data to use long (32 bit) offsets. Since: EXPERIMENTAL
@@ -96,8 +98,9 @@ typedef enum { /*< flags >*/
HB_SUBSET_FLAGS_NO_PRUNE_UNICODE_RANGES = 0x00000100u, HB_SUBSET_FLAGS_NO_PRUNE_UNICODE_RANGES = 0x00000100u,
HB_SUBSET_FLAGS_NO_LAYOUT_CLOSURE = 0x00000200u, HB_SUBSET_FLAGS_NO_LAYOUT_CLOSURE = 0x00000200u,
HB_SUBSET_FLAGS_OPTIMIZE_IUP_DELTAS = 0x00000400u, HB_SUBSET_FLAGS_OPTIMIZE_IUP_DELTAS = 0x00000400u,
HB_SUBSET_FLAGS_NO_BIDI_CLOSURE = 0x00000800u,
#ifdef HB_EXPERIMENTAL_API #ifdef HB_EXPERIMENTAL_API
HB_SUBSET_FLAGS_IFTB_REQUIREMENTS = 0x00000800u, HB_SUBSET_FLAGS_IFTB_REQUIREMENTS = 0x00001000u,
#endif #endif
} hb_subset_flags_t; } hb_subset_flags_t;

View File

@@ -47,20 +47,20 @@ HB_BEGIN_DECLS
* *
* The minor component of the library version available at compile-time. * The minor component of the library version available at compile-time.
*/ */
#define HB_VERSION_MINOR 0 #define HB_VERSION_MINOR 1
/** /**
* HB_VERSION_MICRO: * HB_VERSION_MICRO:
* *
* The micro component of the library version available at compile-time. * The micro component of the library version available at compile-time.
*/ */
#define HB_VERSION_MICRO 1 #define HB_VERSION_MICRO 0
/** /**
* HB_VERSION_STRING: * HB_VERSION_STRING:
* *
* A string literal containing the library version available at compile-time. * A string literal containing the library version available at compile-time.
*/ */
#define HB_VERSION_STRING "11.0.1" #define HB_VERSION_STRING "11.1.0"
/** /**
* HB_VERSION_ATLEAST: * HB_VERSION_ATLEAST:

View File

@@ -465,7 +465,7 @@ static int HB_UNUSED _hb_errno = 0;
# define hb_atexit atexit # define hb_atexit atexit
# else # else
template <void (*function) (void)> struct hb_atexit_t { ~hb_atexit_t () { function (); } }; template <void (*function) (void)> struct hb_atexit_t { ~hb_atexit_t () { function (); } };
# define hb_atexit(f) static hb_atexit_t<f> _hb_atexit_##__LINE__; # define hb_atexit(f) static hb_atexit_t<f> _hb_atexit_##__LINE__
# endif # endif
#endif #endif
#endif #endif

View File

@@ -318,6 +318,7 @@ hb_base_headers = files(
'hb-ot-shape.h', 'hb-ot-shape.h',
'hb-ot-var.h', 'hb-ot-var.h',
'hb-ot.h', 'hb-ot.h',
'hb-script-list.h',
'hb-set.h', 'hb-set.h',
'hb-shape-plan.h', 'hb-shape-plan.h',
'hb-shape.h', 'hb-shape.h',
@@ -392,6 +393,8 @@ hb_subset_sources = files(
'hb-subset-instancer-solver.hh', 'hb-subset-instancer-solver.hh',
'hb-subset-instancer-solver.cc', 'hb-subset-instancer-solver.cc',
'hb-subset-plan.cc', 'hb-subset-plan.cc',
'hb-subset-plan-layout.cc',
'hb-subset-plan-var.cc',
'hb-subset-plan.hh', 'hb-subset-plan.hh',
'hb-subset-plan-member-list.hh', 'hb-subset-plan-member-list.hh',
'hb-subset-serialize.cc', 'hb-subset-serialize.cc',
@@ -596,7 +599,7 @@ defs_list = [harfbuzz_def]
version = '0.@0@.0'.format(hb_version_int) version = '0.@0@.0'.format(hb_version_int)
extra_hb_cpp_args = [] extra_hb_cpp_args = []
if cpp.get_define('_MSC_FULL_VER') != '' if cpp_is_microsoft_compiler
if get_option('default_library') != 'static' if get_option('default_library') != 'static'
extra_hb_cpp_args += '-DHB_DLL_EXPORT' extra_hb_cpp_args += '-DHB_DLL_EXPORT'
endif endif
@@ -718,7 +721,7 @@ if get_option('tests').enabled()
# TODO: Microsoft LINK gives the following because extern, non dllexport # TODO: Microsoft LINK gives the following because extern, non dllexport
# symbols can only be used when linking against a static library # symbols can only be used when linking against a static library
# error LNK2019: unresolved external symbol "unsigned __int64 const * const _hb_NullPool" # error LNK2019: unresolved external symbol "unsigned __int64 const * const _hb_NullPool"
if cpp.get_define('_MSC_FULL_VER') == '' if not cpp_is_microsoft_compiler
noinst_programs = { noinst_programs = {
'main': 'main.cc', 'main': 'main.cc',
'test-basics': 'test.cc', 'test-basics': 'test.cc',
@@ -765,7 +768,7 @@ if get_option('tests').enabled()
'test-unicode-ranges': ['test-unicode-ranges.cc'], 'test-unicode-ranges': ['test-unicode-ranges.cc'],
} }
foreach name, source : compiled_tests foreach name, source : compiled_tests
if cpp.get_define('_MSC_FULL_VER') != '' and source.contains('hb-static.cc') if cpp_is_microsoft_compiler and source.contains('hb-static.cc')
# TODO: Microsoft compilers cannot link tests using hb-static.cc, fix them # TODO: Microsoft compilers cannot link tests using hb-static.cc, fix them
continue continue
endif endif
@@ -837,15 +840,10 @@ have_gobject = conf.get('HAVE_GOBJECT', 0) == 1
cmake_config = configuration_data() cmake_config = configuration_data()
cmake_config_dir = cmake_package_install_dir / 'harfbuzz' cmake_config_dir = cmake_package_install_dir / 'harfbuzz'
have_fs_relative_to = meson.version().version_compare('>=1.3.0') if meson.version().version_compare('>=1.3.0')
if not have_fs_relative_to
relative_to = find_program('relative_to.py')
endif
if have_fs_relative_to
cmake_package_prefix_dir = fs.relative_to(get_option('prefix'), get_option('prefix') / cmake_config_dir) cmake_package_prefix_dir = fs.relative_to(get_option('prefix'), get_option('prefix') / cmake_config_dir)
else else
relative_to = find_program('relative_to.py')
cmake_package_prefix_dir = run_command(relative_to, get_option('prefix'), get_option('prefix') / cmake_config_dir, check: true).stdout().strip() cmake_package_prefix_dir = run_command(relative_to, get_option('prefix'), get_option('prefix') / cmake_config_dir, check: true).stdout().strip()
endif endif
@@ -857,7 +855,7 @@ cmake_package_prefix_dir = '${CMAKE_CURRENT_LIST_DIR}/@0@'.format(cmake_package_
cmake_install_includedir = get_option('includedir') cmake_install_includedir = get_option('includedir')
if fs.is_absolute(cmake_install_includedir) if fs.is_absolute(cmake_install_includedir)
if have_fs_relative_to if meson.version().version_compare('>=1.3.0')
cmake_install_includedir = fs.relative_to(cmake_install_includedir, get_option('prefix')) cmake_install_includedir = fs.relative_to(cmake_install_includedir, get_option('prefix'))
else else
cmake_install_includedir = run_command(relative_to, cmake_install_includedir, get_option('prefix'), check: true).stdout().strip() cmake_install_includedir = run_command(relative_to, cmake_install_includedir, get_option('prefix'), check: true).stdout().strip()
@@ -867,7 +865,7 @@ endif
cmake_install_libdir = get_option('libdir') cmake_install_libdir = get_option('libdir')
if fs.is_absolute(cmake_install_libdir) if fs.is_absolute(cmake_install_libdir)
if have_fs_relative_to if meson.version().version_compare('>=1.3.0')
cmake_install_libdir = fs.relative_to(cmake_install_libdir, get_option('prefix')) cmake_install_libdir = fs.relative_to(cmake_install_libdir, get_option('prefix'))
else else
cmake_install_libdir = run_command(relative_to, cmake_install_libdir, get_option('prefix'), check: true).stdout().strip() cmake_install_libdir = run_command(relative_to, cmake_install_libdir, get_option('prefix'), check: true).stdout().strip()
@@ -1039,16 +1037,22 @@ if get_option('tests').enabled()
env = environment() env = environment()
env.set('srcdir', meson.current_source_dir()) env.set('srcdir', meson.current_source_dir())
env.set('base_srcdir', meson.source_root()) env.set('base_srcdir', meson.project_source_root())
env.set('builddir', meson.current_build_dir()) env.set('builddir', meson.current_build_dir())
env.set('libs', meson.current_build_dir()) # TODO: Merge this with builddir after autotools removal env.set('libs', meson.current_build_dir()) # TODO: Merge this with builddir after autotools removal
HBSOURCES = [] HBSOURCES = []
foreach f : hb_sources foreach f : hb_sources
if meson.version().version_compare('>=1.4.0')
f = f.full_path()
endif
HBSOURCES += '@0@'.format(f) HBSOURCES += '@0@'.format(f)
endforeach endforeach
env.set('HBSOURCES', ' '.join(HBSOURCES)) env.set('HBSOURCES', ' '.join(HBSOURCES))
HBHEADERS = [] HBHEADERS = []
foreach f : hb_headers foreach f : hb_headers
if meson.version().version_compare('>=1.4.0')
f = f.full_path()
endif
HBHEADERS += '@0@'.format(f) HBHEADERS += '@0@'.format(f)
endforeach endforeach
env.set('HBHEADERS', ' '.join(HBHEADERS)) env.set('HBHEADERS', ' '.join(HBHEADERS))

View File

@@ -29,6 +29,7 @@ EXPORTS.harfbuzz += [
'hb-ot-var.h', 'hb-ot-var.h',
'hb-ot.h', 'hb-ot.h',
'hb-paint.h', 'hb-paint.h',
'hb-script-list.h',
'hb-set.h', 'hb-set.h',
'hb-shape-plan.h', 'hb-shape-plan.h',
'hb-shape.h', 'hb-shape.h',
@@ -39,6 +40,7 @@ EXPORTS.harfbuzz += [
] ]
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'graph/gsubgpos-context.cc',
'hb-aat-layout.cc', 'hb-aat-layout.cc',
'hb-aat-map.cc', 'hb-aat-map.cc',
'hb-blob.cc', 'hb-blob.cc',
@@ -91,6 +93,17 @@ UNIFIED_SOURCES += [
'hb-shaper.cc', 'hb-shaper.cc',
'hb-static.cc', 'hb-static.cc',
'hb-style.cc', 'hb-style.cc',
'hb-subset-cff-common.cc',
'hb-subset-cff1.cc',
'hb-subset-cff2.cc',
'hb-subset-input.cc',
'hb-subset-instancer-iup.cc',
'hb-subset-instancer-solver.cc',
'hb-subset-plan-layout.cc',
'hb-subset-plan-var.cc',
'hb-subset-plan.cc',
'hb-subset-serialize.cc',
'hb-subset.cc',
'hb-unicode.cc', 'hb-unicode.cc',
] ]