HarfBuzz: Update to version 4.0.1

This commit is contained in:
bruvzg 2022-03-18 14:50:57 +02:00
parent 309cd91ea7
commit 94a365e94b
No known key found for this signature in database
GPG key ID: 7960FCF39844EC38
16 changed files with 1217 additions and 558 deletions

View file

@ -103,6 +103,7 @@ if env["builtin_harfbuzz"]:
"src/hb-subset-cff2.cc", "src/hb-subset-cff2.cc",
"src/hb-subset-input.cc", "src/hb-subset-input.cc",
"src/hb-subset-plan.cc", "src/hb-subset-plan.cc",
"src/hb-subset-repacker.cc",
"src/hb-subset.cc", "src/hb-subset.cc",
"src/hb-ucd.cc", "src/hb-ucd.cc",
"src/hb-unicode.cc", "src/hb-unicode.cc",

View file

@ -192,7 +192,7 @@ Files extracted from upstream source:
## harfbuzz ## harfbuzz
- Upstream: https://github.com/harfbuzz/harfbuzz - Upstream: https://github.com/harfbuzz/harfbuzz
- Version: 4.0.0 (8d1b000a3edc90c12267b836b4ef3f81c0e53edc, 2022) - Version: 4.0.1 (1f79ba9407ecd54e382997940cbcc3fb71bef8be, 2022)
- License: MIT - License: MIT
Files extracted from upstream source: Files extracted from upstream source:

View file

@ -108,7 +108,7 @@ static const hb_aat_feature_mapping_t feature_mappings[] =
{HB_TAG ('f','r','a','c'), HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS, HB_AAT_LAYOUT_FEATURE_SELECTOR_DIAGONAL_FRACTIONS, HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_FRACTIONS}, {HB_TAG ('f','r','a','c'), HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS, HB_AAT_LAYOUT_FEATURE_SELECTOR_DIAGONAL_FRACTIONS, HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_FRACTIONS},
{HB_TAG ('f','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_FEATURE_SELECTOR_MONOSPACED_TEXT, (hb_aat_layout_feature_selector_t) 7}, {HB_TAG ('f','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_FEATURE_SELECTOR_MONOSPACED_TEXT, (hb_aat_layout_feature_selector_t) 7},
{HB_TAG ('h','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALT_HALF_WIDTH_TEXT, (hb_aat_layout_feature_selector_t) 7}, {HB_TAG ('h','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALT_HALF_WIDTH_TEXT, (hb_aat_layout_feature_selector_t) 7},
{HB_TAG ('h','i','s','t'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, HB_AAT_LAYOUT_FEATURE_SELECTOR_HISTORICAL_LIGATURES_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_HISTORICAL_LIGATURES_OFF}, {HB_TAG ('h','i','s','t'), (hb_aat_layout_feature_type_t) 40, (hb_aat_layout_feature_selector_t) 0, (hb_aat_layout_feature_selector_t) 1},
{HB_TAG ('h','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_HORIZ_KANA_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_HORIZ_KANA_OFF}, {HB_TAG ('h','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_HORIZ_KANA_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_HORIZ_KANA_OFF},
{HB_TAG ('h','l','i','g'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, HB_AAT_LAYOUT_FEATURE_SELECTOR_HISTORICAL_LIGATURES_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_HISTORICAL_LIGATURES_OFF}, {HB_TAG ('h','l','i','g'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, HB_AAT_LAYOUT_FEATURE_SELECTOR_HISTORICAL_LIGATURES_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_HISTORICAL_LIGATURES_OFF},
{HB_TAG ('h','n','g','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION, HB_AAT_LAYOUT_FEATURE_SELECTOR_HANJA_TO_HANGUL, HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_TRANSLITERATION}, {HB_TAG ('h','n','g','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION, HB_AAT_LAYOUT_FEATURE_SELECTOR_HANJA_TO_HANGUL, HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_TRANSLITERATION},
@ -170,6 +170,7 @@ static const hb_aat_feature_mapping_t feature_mappings[] =
{HB_TAG ('v','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_VERT_KANA_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_VERT_KANA_OFF}, {HB_TAG ('v','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_VERT_KANA_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_VERT_KANA_OFF},
{HB_TAG ('v','p','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALT_PROPORTIONAL_TEXT, (hb_aat_layout_feature_selector_t) 7}, {HB_TAG ('v','p','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALT_PROPORTIONAL_TEXT, (hb_aat_layout_feature_selector_t) 7},
{HB_TAG ('v','r','t','2'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION, HB_AAT_LAYOUT_FEATURE_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_OFF}, {HB_TAG ('v','r','t','2'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION, HB_AAT_LAYOUT_FEATURE_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_OFF},
{HB_TAG ('v','r','t','r'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION, (hb_aat_layout_feature_selector_t) 2, (hb_aat_layout_feature_selector_t) 3},
{HB_TAG ('z','e','r','o'), HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS, HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASHED_ZERO_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASHED_ZERO_OFF}, {HB_TAG ('z','e','r','o'), HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS, HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASHED_ZERO_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASHED_ZERO_OFF},
}; };

View file

@ -478,7 +478,7 @@ _resume:
case 18: case 18:
#line 58 "hb-buffer-deserialize-text.rl" #line 58 "hb-buffer-deserialize-text.rl"
{ {
/* TODO Unescape delimeters. */ /* TODO Unescape delimiters. */
if (!hb_font_glyph_from_string (font, if (!hb_font_glyph_from_string (font,
tok, p - tok, tok, p - tok,
&info.codepoint)) &info.codepoint))
@ -535,7 +535,7 @@ _resume:
case 16: case 16:
#line 58 "hb-buffer-deserialize-text.rl" #line 58 "hb-buffer-deserialize-text.rl"
{ {
/* TODO Unescape delimeters. */ /* TODO Unescape delimiters. */
if (!hb_font_glyph_from_string (font, if (!hb_font_glyph_from_string (font,
tok, p - tok, tok, p - tok,
&info.codepoint)) &info.codepoint))
@ -635,7 +635,7 @@ _resume:
} }
#line 58 "hb-buffer-deserialize-text.rl" #line 58 "hb-buffer-deserialize-text.rl"
{ {
/* TODO Unescape delimeters. */ /* TODO Unescape delimiters. */
if (!hb_font_glyph_from_string (font, if (!hb_font_glyph_from_string (font,
tok, p - tok, tok, p - tok,
&info.codepoint)) &info.codepoint))
@ -645,7 +645,7 @@ _resume:
case 17: case 17:
#line 58 "hb-buffer-deserialize-text.rl" #line 58 "hb-buffer-deserialize-text.rl"
{ {
/* TODO Unescape delimeters. */ /* TODO Unescape delimiters. */
if (!hb_font_glyph_from_string (font, if (!hb_font_glyph_from_string (font,
tok, p - tok, tok, p - tok,
&info.codepoint)) &info.codepoint))
@ -674,7 +674,7 @@ _resume:
} }
#line 58 "hb-buffer-deserialize-text.rl" #line 58 "hb-buffer-deserialize-text.rl"
{ {
/* TODO Unescape delimeters. */ /* TODO Unescape delimiters. */
if (!hb_font_glyph_from_string (font, if (!hb_font_glyph_from_string (font,
tok, p - tok, tok, p - tok,
&info.codepoint)) &info.codepoint))
@ -701,7 +701,7 @@ _resume:
} }
#line 58 "hb-buffer-deserialize-text.rl" #line 58 "hb-buffer-deserialize-text.rl"
{ {
/* TODO Unescape delimeters. */ /* TODO Unescape delimiters. */
if (!hb_font_glyph_from_string (font, if (!hb_font_glyph_from_string (font,
tok, p - tok, tok, p - tok,
&info.codepoint)) &info.codepoint))
@ -733,7 +733,7 @@ _again:
case 16: case 16:
#line 58 "hb-buffer-deserialize-text.rl" #line 58 "hb-buffer-deserialize-text.rl"
{ {
/* TODO Unescape delimeters. */ /* TODO Unescape delimiters. */
if (!hb_font_glyph_from_string (font, if (!hb_font_glyph_from_string (font,
tok, p - tok, tok, p - tok,
&info.codepoint)) &info.codepoint))
@ -820,7 +820,7 @@ _again:
} }
#line 58 "hb-buffer-deserialize-text.rl" #line 58 "hb-buffer-deserialize-text.rl"
{ {
/* TODO Unescape delimeters. */ /* TODO Unescape delimiters. */
if (!hb_font_glyph_from_string (font, if (!hb_font_glyph_from_string (font,
tok, p - tok, tok, p - tok,
&info.codepoint)) &info.codepoint))

View file

@ -117,7 +117,7 @@ typedef struct hb_glyph_info_t {
* from there, and repeat. * from there, and repeat.
* At the start of next line a similar algorithm can * At the start of next line a similar algorithm can
* be implemented. That is: 1. Iterate forward from * be implemented. That is: 1. Iterate forward from
* the line-break position untill the first cluster * the line-break position until the first cluster
* start position that is NOT unsafe-to-concat, 2. * start position that is NOT unsafe-to-concat, 2.
* shape the segment from beginning of the line to * shape the segment from beginning of the line to
* that position, 3. check whether the resulting * that position, 3. check whether the resulting

View file

@ -41,7 +41,10 @@ namespace OT {
struct BaseCoordFormat1 struct BaseCoordFormat1
{ {
hb_position_t get_coord () const { return coordinate; } hb_position_t get_coord (hb_font_t *font, hb_direction_t direction) const
{
return HB_DIRECTION_IS_HORIZONTAL (direction) ? font->em_scale_y (coordinate) : font->em_scale_x (coordinate);
}
bool sanitize (hb_sanitize_context_t *c) const bool sanitize (hb_sanitize_context_t *c) const
{ {
@ -58,10 +61,10 @@ struct BaseCoordFormat1
struct BaseCoordFormat2 struct BaseCoordFormat2
{ {
hb_position_t get_coord () const hb_position_t get_coord (hb_font_t *font, hb_direction_t direction) const
{ {
/* TODO */ /* TODO */
return coordinate; return HB_DIRECTION_IS_HORIZONTAL (direction) ? font->em_scale_y (coordinate) : font->em_scale_x (coordinate);
} }
bool sanitize (hb_sanitize_context_t *c) const bool sanitize (hb_sanitize_context_t *c) const
@ -87,9 +90,10 @@ struct BaseCoordFormat3
hb_direction_t direction) const hb_direction_t direction) const
{ {
const Device &device = this+deviceTable; const Device &device = this+deviceTable;
return coordinate + (HB_DIRECTION_IS_VERTICAL (direction) ?
device.get_y_delta (font, var_store) : return HB_DIRECTION_IS_HORIZONTAL (direction)
device.get_x_delta (font, var_store)); ? font->em_scale_y (coordinate) + device.get_y_delta (font, var_store)
: font->em_scale_x (coordinate) + device.get_x_delta (font, var_store);
} }
@ -120,8 +124,8 @@ struct BaseCoord
hb_direction_t direction) const hb_direction_t direction) const
{ {
switch (u.format) { switch (u.format) {
case 1: return u.format1.get_coord (); case 1: return u.format1.get_coord (font, direction);
case 2: return u.format2.get_coord (); case 2: return u.format2.get_coord (font, direction);
case 3: return u.format3.get_coord (font, var_store, direction); case 3: return u.format3.get_coord (font, var_store, direction);
default:return 0; default:return 0;
} }

View file

@ -2060,12 +2060,7 @@ hb_ot_layout_get_baseline (hb_font_t *font,
hb_tag_t language_tag, hb_tag_t language_tag,
hb_position_t *coord /* OUT. May be NULL. */) hb_position_t *coord /* OUT. May be NULL. */)
{ {
bool result = font->face->table.BASE->get_baseline (font, baseline_tag, direction, script_tag, language_tag, coord); return font->face->table.BASE->get_baseline (font, baseline_tag, direction, script_tag, language_tag, coord);
if (result && coord)
*coord = HB_DIRECTION_IS_HORIZONTAL (direction) ? font->em_scale_y (*coord) : font->em_scale_x (*coord);
return result;
} }
/** /**

View file

@ -92,41 +92,60 @@ enum use_syllable_type_t {
#define use_syllable_machine_ex_VMPst 39u #define use_syllable_machine_ex_VMPst 39u
#define use_syllable_machine_ex_VPre 22u #define use_syllable_machine_ex_VPre 22u
#define use_syllable_machine_ex_VPst 35u #define use_syllable_machine_ex_VPst 35u
#define use_syllable_machine_ex_WJ 16u
#define use_syllable_machine_ex_ZWNJ 14u #define use_syllable_machine_ex_ZWNJ 14u
#line 99 "hb-ot-shape-complex-use-machine.hh" #line 100 "hb-ot-shape-complex-use-machine.hh"
static const unsigned char _use_syllable_machine_trans_keys[] = { static const unsigned char _use_syllable_machine_trans_keys[] = {
0u, 51u, 41u, 42u, 42u, 42u, 11u, 48u, 11u, 48u, 1u, 1u, 22u, 48u, 23u, 48u, 0u, 51u, 11u, 48u, 11u, 48u, 1u, 1u, 22u, 48u, 23u, 48u, 24u, 47u, 25u, 47u,
26u, 47u, 45u, 46u, 46u, 46u, 24u, 48u, 24u, 48u, 24u, 48u, 1u, 1u, 24u, 48u,
23u, 48u, 23u, 48u, 23u, 48u, 22u, 48u, 22u, 48u, 22u, 48u, 11u, 48u, 1u, 48u,
11u, 48u, 41u, 42u, 42u, 42u, 11u, 48u, 11u, 48u, 1u, 1u, 22u, 48u, 23u, 48u,
24u, 47u, 25u, 47u, 26u, 47u, 45u, 46u, 46u, 46u, 24u, 48u, 24u, 48u, 24u, 48u, 24u, 47u, 25u, 47u, 26u, 47u, 45u, 46u, 46u, 46u, 24u, 48u, 24u, 48u, 24u, 48u,
1u, 1u, 24u, 48u, 23u, 48u, 23u, 48u, 23u, 48u, 22u, 48u, 22u, 48u, 22u, 48u, 1u, 1u, 24u, 48u, 23u, 48u, 23u, 48u, 23u, 48u, 22u, 48u, 22u, 48u, 22u, 48u,
11u, 48u, 1u, 48u, 13u, 13u, 4u, 4u, 11u, 48u, 11u, 48u, 1u, 1u, 22u, 48u, 11u, 48u, 1u, 48u, 13u, 13u, 4u, 4u, 11u, 48u, 11u, 48u, 1u, 1u, 22u, 48u,
23u, 48u, 24u, 47u, 25u, 47u, 26u, 47u, 45u, 46u, 46u, 46u, 24u, 48u, 24u, 48u, 23u, 48u, 24u, 47u, 25u, 47u, 26u, 47u, 45u, 46u, 46u, 46u, 24u, 48u, 24u, 48u,
24u, 48u, 1u, 1u, 24u, 48u, 23u, 48u, 23u, 48u, 23u, 48u, 22u, 48u, 22u, 48u, 24u, 48u, 1u, 1u, 24u, 48u, 23u, 48u, 23u, 48u, 23u, 48u, 22u, 48u, 22u, 48u,
22u, 48u, 11u, 48u, 1u, 48u, 4u, 4u, 13u, 13u, 1u, 48u, 11u, 48u, 41u, 42u, 22u, 48u, 11u, 48u, 1u, 48u, 11u, 48u, 11u, 48u, 1u, 1u, 22u, 48u, 23u, 48u,
42u, 42u, 1u, 5u, 50u, 52u, 49u, 52u, 49u, 51u, 0 24u, 47u, 25u, 47u, 26u, 47u, 45u, 46u, 46u, 46u, 24u, 48u, 24u, 48u, 24u, 48u,
1u, 1u, 24u, 48u, 23u, 48u, 23u, 48u, 23u, 48u, 22u, 48u, 22u, 48u, 22u, 48u,
11u, 48u, 1u, 48u, 4u, 4u, 13u, 13u, 1u, 48u, 11u, 48u, 41u, 42u, 42u, 42u,
1u, 5u, 50u, 52u, 49u, 52u, 49u, 51u, 0
}; };
static const char _use_syllable_machine_key_spans[] = { static const char _use_syllable_machine_key_spans[] = {
52, 2, 1, 38, 38, 1, 27, 26, 52, 38, 38, 1, 27, 26, 24, 23,
22, 2, 1, 25, 25, 25, 1, 25,
26, 26, 26, 27, 27, 27, 38, 48,
38, 2, 1, 38, 38, 1, 27, 26,
24, 23, 22, 2, 1, 25, 25, 25, 24, 23, 22, 2, 1, 25, 25, 25,
1, 25, 26, 26, 26, 27, 27, 27, 1, 25, 26, 26, 26, 27, 27, 27,
38, 48, 1, 1, 38, 38, 1, 27, 38, 48, 1, 1, 38, 38, 1, 27,
26, 24, 23, 22, 2, 1, 25, 25, 26, 24, 23, 22, 2, 1, 25, 25,
25, 1, 25, 26, 26, 26, 27, 27, 25, 1, 25, 26, 26, 26, 27, 27,
27, 38, 48, 1, 1, 48, 38, 2, 27, 38, 48, 38, 38, 1, 27, 26,
1, 5, 3, 4, 3 24, 23, 22, 2, 1, 25, 25, 25,
1, 25, 26, 26, 26, 27, 27, 27,
38, 48, 1, 1, 48, 38, 2, 1,
5, 3, 4, 3
}; };
static const short _use_syllable_machine_index_offsets[] = { static const short _use_syllable_machine_index_offsets[] = {
0, 53, 56, 58, 97, 136, 138, 166, 0, 53, 92, 131, 133, 161, 188, 213,
193, 218, 242, 265, 268, 270, 296, 322, 237, 260, 263, 265, 291, 317, 343, 345,
348, 350, 376, 403, 430, 457, 485, 513, 371, 398, 425, 452, 480, 508, 536, 575,
541, 580, 629, 631, 633, 672, 711, 713, 624, 663, 666, 668, 707, 746, 748, 776,
741, 768, 793, 817, 840, 843, 845, 871, 803, 828, 852, 875, 878, 880, 906, 932,
897, 923, 925, 951, 978, 1005, 1032, 1060, 958, 960, 986, 1013, 1040, 1067, 1095, 1123,
1088, 1116, 1155, 1204, 1206, 1208, 1257, 1296, 1151, 1190, 1239, 1241, 1243, 1282, 1321, 1323,
1299, 1301, 1307, 1311, 1316 1351, 1378, 1403, 1427, 1450, 1453, 1455, 1481,
1507, 1533, 1535, 1561, 1588, 1615, 1642, 1670,
1698, 1726, 1765, 1814, 1853, 1892, 1894, 1922,
1949, 1974, 1998, 2021, 2024, 2026, 2052, 2078,
2104, 2106, 2132, 2159, 2186, 2213, 2241, 2269,
2297, 2336, 2385, 2387, 2389, 2438, 2477, 2480,
2482, 2488, 2492, 2497
}; };
static const char _use_syllable_machine_indicies[] = { static const char _use_syllable_machine_indicies[] = {
@ -136,178 +155,331 @@ static const char _use_syllable_machine_indicies[] = {
11, 12, 13, 14, 15, 9, 16, 17, 11, 12, 13, 14, 15, 9, 16, 17,
18, 19, 20, 21, 2, 22, 23, 24, 18, 19, 20, 21, 2, 22, 23, 24,
2, 25, 26, 27, 28, 29, 30, 31, 2, 25, 26, 27, 28, 29, 30, 31,
6, 32, 2, 33, 2, 0, 35, 34, 6, 32, 2, 33, 2, 35, 36, 34,
35, 34, 37, 38, 36, 36, 36, 36, 34, 34, 34, 34, 34, 34, 34, 34,
36, 36, 36, 36, 36, 39, 40, 41, 37, 38, 39, 40, 41, 42, 43, 37,
42, 43, 44, 45, 39, 46, 1, 47, 44, 45, 46, 47, 48, 49, 34, 50,
48, 49, 50, 36, 51, 52, 53, 36, 51, 52, 34, 53, 54, 34, 55, 56,
36, 36, 36, 54, 55, 56, 57, 38, 57, 58, 36, 34, 35, 36, 34, 34,
36, 37, 38, 36, 36, 36, 36, 36, 34, 34, 34, 34, 34, 34, 34, 37,
36, 36, 36, 36, 39, 40, 41, 42, 38, 39, 40, 41, 42, 43, 37, 44,
43, 44, 45, 39, 46, 47, 47, 48, 46, 46, 47, 48, 49, 34, 50, 51,
49, 50, 36, 51, 52, 53, 36, 36, 52, 34, 34, 34, 34, 55, 56, 57,
36, 36, 54, 55, 56, 57, 38, 36, 58, 36, 34, 35, 34, 37, 38, 39,
37, 58, 39, 40, 41, 42, 43, 36, 40, 41, 34, 34, 34, 34, 34, 34,
36, 36, 36, 36, 36, 48, 49, 50, 47, 48, 49, 34, 50, 51, 52, 34,
36, 51, 52, 53, 36, 36, 36, 36, 34, 34, 34, 38, 56, 57, 58, 59,
40, 55, 56, 57, 59, 36, 40, 41, 34, 38, 39, 40, 41, 34, 34, 34,
42, 43, 36, 36, 36, 36, 36, 36, 34, 34, 34, 34, 34, 34, 34, 50,
36, 36, 36, 36, 51, 52, 53, 36, 51, 52, 34, 34, 34, 34, 34, 56,
36, 36, 36, 36, 55, 56, 57, 59, 57, 58, 59, 34, 39, 40, 41, 34,
36, 41, 42, 43, 36, 36, 36, 36, 34, 34, 34, 34, 34, 34, 34, 34,
36, 36, 36, 36, 36, 36, 36, 36, 34, 34, 34, 34, 34, 34, 34, 34,
36, 36, 36, 36, 36, 36, 55, 56, 34, 56, 57, 58, 34, 40, 41, 34,
57, 36, 42, 43, 36, 36, 36, 36, 34, 34, 34, 34, 34, 34, 34, 34,
36, 36, 36, 36, 36, 36, 36, 36, 34, 34, 34, 34, 34, 34, 34, 34,
36, 36, 36, 36, 36, 36, 55, 56, 34, 56, 57, 58, 34, 41, 34, 34,
57, 36, 43, 36, 36, 36, 36, 36, 34, 34, 34, 34, 34, 34, 34, 34,
36, 36, 36, 36, 36, 36, 36, 36, 34, 34, 34, 34, 34, 34, 34, 34,
36, 36, 36, 36, 36, 55, 56, 57, 56, 57, 58, 34, 56, 57, 34, 57,
36, 55, 56, 36, 56, 36, 41, 42, 34, 39, 40, 41, 34, 34, 34, 34,
43, 36, 36, 36, 36, 36, 36, 36, 34, 34, 34, 34, 34, 34, 50, 51,
36, 36, 36, 51, 52, 53, 36, 36, 52, 34, 34, 34, 34, 34, 56, 57,
36, 36, 36, 55, 56, 57, 59, 36, 58, 59, 34, 39, 40, 41, 34, 34,
41, 42, 43, 36, 36, 36, 36, 36, 34, 34, 34, 34, 34, 34, 34, 34,
36, 36, 36, 36, 36, 36, 52, 53, 34, 51, 52, 34, 34, 34, 34, 34,
36, 36, 36, 36, 36, 55, 56, 57, 56, 57, 58, 59, 34, 39, 40, 41,
59, 36, 41, 42, 43, 36, 36, 36, 34, 34, 34, 34, 34, 34, 34, 34,
36, 36, 36, 36, 36, 36, 36, 36, 34, 34, 34, 34, 52, 34, 34, 34,
36, 53, 36, 36, 36, 36, 36, 55, 34, 34, 56, 57, 58, 59, 34, 60,
56, 57, 59, 36, 61, 60, 41, 42, 34, 39, 40, 41, 34, 34, 34, 34,
43, 36, 36, 36, 36, 36, 36, 36, 34, 34, 34, 34, 34, 34, 34, 34,
36, 36, 36, 36, 36, 36, 36, 36, 34, 34, 34, 34, 34, 34, 56, 57,
36, 36, 36, 55, 56, 57, 59, 36, 58, 59, 34, 38, 39, 40, 41, 34,
40, 41, 42, 43, 36, 36, 36, 36, 34, 34, 34, 34, 34, 47, 48, 49,
36, 36, 48, 49, 50, 36, 51, 52, 34, 50, 51, 52, 34, 34, 34, 34,
53, 36, 36, 36, 36, 40, 55, 56, 38, 56, 57, 58, 59, 34, 38, 39,
57, 59, 36, 40, 41, 42, 43, 36, 40, 41, 34, 34, 34, 34, 34, 34,
36, 36, 36, 36, 36, 36, 49, 50, 34, 48, 49, 34, 50, 51, 52, 34,
36, 51, 52, 53, 36, 36, 36, 36, 34, 34, 34, 38, 56, 57, 58, 59,
40, 55, 56, 57, 59, 36, 40, 41, 34, 38, 39, 40, 41, 34, 34, 34,
42, 43, 36, 36, 36, 36, 36, 36, 34, 34, 34, 34, 34, 49, 34, 50,
36, 36, 50, 36, 51, 52, 53, 36, 51, 52, 34, 34, 34, 34, 38, 56,
36, 36, 36, 40, 55, 56, 57, 59, 57, 58, 59, 34, 37, 38, 39, 40,
36, 39, 40, 41, 42, 43, 36, 45, 41, 34, 43, 37, 34, 34, 34, 47,
39, 36, 36, 36, 48, 49, 50, 36, 48, 49, 34, 50, 51, 52, 34, 34,
51, 52, 53, 36, 36, 36, 36, 40, 34, 34, 38, 56, 57, 58, 59, 34,
55, 56, 57, 59, 36, 39, 40, 41, 37, 38, 39, 40, 41, 34, 34, 37,
42, 43, 36, 36, 39, 36, 36, 36, 34, 34, 34, 47, 48, 49, 34, 50,
48, 49, 50, 36, 51, 52, 53, 36, 51, 52, 34, 34, 34, 34, 38, 56,
36, 36, 36, 40, 55, 56, 57, 59, 57, 58, 59, 34, 37, 38, 39, 40,
36, 39, 40, 41, 42, 43, 44, 45, 41, 42, 43, 37, 34, 34, 34, 47,
39, 36, 36, 36, 48, 49, 50, 36, 48, 49, 34, 50, 51, 52, 34, 34,
51, 52, 53, 36, 36, 36, 36, 40, 34, 34, 38, 56, 57, 58, 59, 34,
55, 56, 57, 59, 36, 37, 38, 36, 35, 36, 34, 34, 34, 34, 34, 34,
36, 36, 36, 36, 36, 36, 36, 36, 34, 34, 34, 37, 38, 39, 40, 41,
39, 40, 41, 42, 43, 44, 45, 39, 42, 43, 37, 44, 34, 46, 47, 48,
46, 36, 47, 48, 49, 50, 36, 51, 49, 34, 50, 51, 52, 34, 34, 34,
52, 53, 36, 36, 36, 36, 54, 55, 34, 55, 56, 57, 58, 36, 34, 35,
56, 57, 38, 36, 37, 58, 58, 58, 34, 34, 34, 34, 34, 34, 34, 34,
58, 58, 58, 58, 58, 58, 58, 58, 34, 34, 34, 34, 34, 34, 34, 34,
58, 58, 58, 58, 58, 58, 58, 58, 34, 34, 34, 34, 34, 38, 39, 40,
58, 58, 40, 41, 42, 43, 58, 58, 41, 34, 34, 34, 34, 34, 34, 34,
58, 58, 58, 58, 58, 58, 58, 58, 34, 34, 34, 50, 51, 52, 34, 34,
51, 52, 53, 58, 58, 58, 58, 58, 34, 34, 34, 56, 57, 58, 59, 34,
55, 56, 57, 59, 58, 63, 62, 3, 35, 36, 34, 34, 34, 34, 34, 34,
64, 37, 38, 36, 36, 36, 36, 36, 34, 34, 34, 37, 38, 39, 40, 41,
36, 36, 36, 36, 39, 40, 41, 42, 42, 43, 37, 44, 45, 46, 47, 48,
43, 44, 45, 39, 46, 1, 47, 48, 49, 34, 50, 51, 52, 34, 34, 34,
49, 50, 36, 51, 52, 53, 36, 0, 34, 55, 56, 57, 58, 36, 34, 53,
35, 36, 54, 55, 56, 57, 38, 36, 54, 34, 54, 34, 62, 63, 61, 61,
5, 6, 65, 65, 65, 65, 65, 65, 61, 61, 61, 61, 61, 61, 61, 64,
65, 65, 65, 9, 10, 11, 12, 13, 65, 66, 67, 68, 69, 70, 64, 71,
14, 15, 9, 16, 18, 18, 19, 20, 1, 72, 73, 74, 75, 61, 76, 77,
21, 65, 22, 23, 24, 65, 65, 65, 78, 61, 61, 61, 61, 79, 80, 81,
65, 28, 29, 30, 31, 6, 65, 5, 82, 63, 61, 62, 63, 61, 61, 61,
65, 9, 10, 11, 12, 13, 65, 65, 61, 61, 61, 61, 61, 61, 64, 65,
65, 65, 65, 65, 19, 20, 21, 65, 66, 67, 68, 69, 70, 64, 71, 72,
22, 23, 24, 65, 65, 65, 65, 10, 72, 73, 74, 75, 61, 76, 77, 78,
29, 30, 31, 66, 65, 10, 11, 12, 61, 61, 61, 61, 79, 80, 81, 82,
13, 65, 65, 65, 65, 65, 65, 65, 63, 61, 62, 83, 64, 65, 66, 67,
65, 65, 65, 22, 23, 24, 65, 65, 68, 61, 61, 61, 61, 61, 61, 73,
65, 65, 65, 29, 30, 31, 66, 65, 74, 75, 61, 76, 77, 78, 61, 61,
11, 12, 13, 65, 65, 65, 65, 65, 61, 61, 65, 80, 81, 82, 84, 61,
65, 65, 65, 65, 65, 65, 65, 65, 65, 66, 67, 68, 61, 61, 61, 61,
65, 65, 65, 65, 65, 29, 30, 31, 61, 61, 61, 61, 61, 61, 76, 77,
65, 12, 13, 65, 65, 65, 65, 65, 78, 61, 61, 61, 61, 61, 80, 81,
65, 65, 65, 65, 65, 65, 65, 65, 82, 84, 61, 66, 67, 68, 61, 61,
65, 65, 65, 65, 65, 29, 30, 31, 61, 61, 61, 61, 61, 61, 61, 61,
65, 13, 65, 65, 65, 65, 65, 65, 61, 61, 61, 61, 61, 61, 61, 61,
65, 65, 65, 65, 65, 65, 65, 65, 80, 81, 82, 61, 67, 68, 61, 61,
65, 65, 65, 65, 29, 30, 31, 65, 61, 61, 61, 61, 61, 61, 61, 61,
29, 30, 65, 30, 65, 11, 12, 13, 61, 61, 61, 61, 61, 61, 61, 61,
65, 65, 65, 65, 65, 65, 65, 65, 80, 81, 82, 61, 68, 61, 61, 61,
65, 65, 22, 23, 24, 65, 65, 65, 61, 61, 61, 61, 61, 61, 61, 61,
65, 65, 29, 30, 31, 66, 65, 11, 61, 61, 61, 61, 61, 61, 61, 80,
12, 13, 65, 65, 65, 65, 65, 65, 81, 82, 61, 80, 81, 61, 81, 61,
65, 65, 65, 65, 65, 23, 24, 65, 66, 67, 68, 61, 61, 61, 61, 61,
65, 65, 65, 65, 29, 30, 31, 66, 61, 61, 61, 61, 61, 76, 77, 78,
65, 11, 12, 13, 65, 65, 65, 65, 61, 61, 61, 61, 61, 80, 81, 82,
65, 65, 65, 65, 65, 65, 65, 65, 84, 61, 66, 67, 68, 61, 61, 61,
24, 65, 65, 65, 65, 65, 29, 30, 61, 61, 61, 61, 61, 61, 61, 61,
31, 66, 65, 67, 65, 11, 12, 13, 77, 78, 61, 61, 61, 61, 61, 80,
65, 65, 65, 65, 65, 65, 65, 65, 81, 82, 84, 61, 66, 67, 68, 61,
65, 65, 65, 65, 65, 65, 65, 65, 61, 61, 61, 61, 61, 61, 61, 61,
65, 65, 29, 30, 31, 66, 65, 10, 61, 61, 61, 78, 61, 61, 61, 61,
11, 12, 13, 65, 65, 65, 65, 65, 61, 80, 81, 82, 84, 61, 86, 85,
65, 19, 20, 21, 65, 22, 23, 24, 66, 67, 68, 61, 61, 61, 61, 61,
65, 65, 65, 65, 10, 29, 30, 31, 61, 61, 61, 61, 61, 61, 61, 61,
66, 65, 10, 11, 12, 13, 65, 65, 61, 61, 61, 61, 61, 80, 81, 82,
65, 65, 65, 65, 65, 20, 21, 65, 84, 61, 65, 66, 67, 68, 61, 61,
22, 23, 24, 65, 65, 65, 65, 10, 61, 61, 61, 61, 73, 74, 75, 61,
29, 30, 31, 66, 65, 10, 11, 12, 76, 77, 78, 61, 61, 61, 61, 65,
13, 65, 65, 65, 65, 65, 65, 65, 80, 81, 82, 84, 61, 65, 66, 67,
65, 21, 65, 22, 23, 24, 65, 65, 68, 61, 61, 61, 61, 61, 61, 61,
65, 65, 10, 29, 30, 31, 66, 65, 74, 75, 61, 76, 77, 78, 61, 61,
9, 10, 11, 12, 13, 65, 15, 9, 61, 61, 65, 80, 81, 82, 84, 61,
65, 65, 65, 19, 20, 21, 65, 22, 65, 66, 67, 68, 61, 61, 61, 61,
23, 24, 65, 65, 65, 65, 10, 29, 61, 61, 61, 61, 75, 61, 76, 77,
30, 31, 66, 65, 9, 10, 11, 12, 78, 61, 61, 61, 61, 65, 80, 81,
13, 65, 65, 9, 65, 65, 65, 19, 82, 84, 61, 64, 65, 66, 67, 68,
20, 21, 65, 22, 23, 24, 65, 65, 61, 70, 64, 61, 61, 61, 73, 74,
65, 65, 10, 29, 30, 31, 66, 65, 75, 61, 76, 77, 78, 61, 61, 61,
61, 65, 80, 81, 82, 84, 61, 64,
65, 66, 67, 68, 61, 61, 64, 61,
61, 61, 73, 74, 75, 61, 76, 77,
78, 61, 61, 61, 61, 65, 80, 81,
82, 84, 61, 64, 65, 66, 67, 68,
69, 70, 64, 61, 61, 61, 73, 74,
75, 61, 76, 77, 78, 61, 61, 61,
61, 65, 80, 81, 82, 84, 61, 62,
63, 61, 61, 61, 61, 61, 61, 61,
61, 61, 64, 65, 66, 67, 68, 69,
70, 64, 71, 61, 72, 73, 74, 75,
61, 76, 77, 78, 61, 61, 61, 61,
79, 80, 81, 82, 63, 61, 62, 83,
83, 83, 83, 83, 83, 83, 83, 83,
83, 83, 83, 83, 83, 83, 83, 83,
83, 83, 83, 83, 65, 66, 67, 68,
83, 83, 83, 83, 83, 83, 83, 83,
83, 83, 76, 77, 78, 83, 83, 83,
83, 83, 80, 81, 82, 84, 83, 88,
87, 3, 89, 90, 91, 61, 61, 61,
61, 61, 61, 61, 61, 61, 92, 93,
94, 95, 96, 97, 98, 92, 99, 100,
101, 102, 103, 104, 61, 105, 106, 107,
61, 53, 54, 61, 108, 109, 110, 82,
91, 61, 90, 91, 61, 61, 61, 61,
61, 61, 61, 61, 61, 92, 93, 94,
95, 96, 97, 98, 92, 99, 101, 101,
102, 103, 104, 61, 105, 106, 107, 61,
61, 61, 61, 108, 109, 110, 82, 91,
61, 90, 83, 92, 93, 94, 95, 96,
61, 61, 61, 61, 61, 61, 102, 103,
104, 61, 105, 106, 107, 61, 61, 61,
61, 93, 109, 110, 82, 111, 61, 93,
94, 95, 96, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 105, 106, 107,
61, 61, 61, 61, 61, 109, 110, 82,
111, 61, 94, 95, 96, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 109,
110, 82, 61, 95, 96, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 109,
110, 82, 61, 96, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 109, 110,
82, 61, 109, 110, 61, 110, 61, 94,
95, 96, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 105, 106, 107, 61,
61, 61, 61, 61, 109, 110, 82, 111,
61, 94, 95, 96, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 106,
107, 61, 61, 61, 61, 61, 109, 110,
82, 111, 61, 94, 95, 96, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 107, 61, 61, 61, 61, 61,
109, 110, 82, 111, 61, 112, 85, 94,
95, 96, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 109, 110, 82, 111,
61, 93, 94, 95, 96, 61, 61, 61,
61, 61, 61, 102, 103, 104, 61, 105,
106, 107, 61, 61, 61, 61, 93, 109,
110, 82, 111, 61, 93, 94, 95, 96,
61, 61, 61, 61, 61, 61, 61, 103,
104, 61, 105, 106, 107, 61, 61, 61,
61, 93, 109, 110, 82, 111, 61, 93,
94, 95, 96, 61, 61, 61, 61, 61,
61, 61, 61, 104, 61, 105, 106, 107,
61, 61, 61, 61, 93, 109, 110, 82,
111, 61, 92, 93, 94, 95, 96, 61,
98, 92, 61, 61, 61, 102, 103, 104,
61, 105, 106, 107, 61, 61, 61, 61,
93, 109, 110, 82, 111, 61, 92, 93,
94, 95, 96, 61, 61, 92, 61, 61,
61, 102, 103, 104, 61, 105, 106, 107,
61, 61, 61, 61, 93, 109, 110, 82,
111, 61, 92, 93, 94, 95, 96, 97,
98, 92, 61, 61, 61, 102, 103, 104,
61, 105, 106, 107, 61, 61, 61, 61,
93, 109, 110, 82, 111, 61, 90, 91,
61, 61, 61, 61, 61, 61, 61, 61,
61, 92, 93, 94, 95, 96, 97, 98,
92, 99, 61, 101, 102, 103, 104, 61,
105, 106, 107, 61, 61, 61, 61, 108,
109, 110, 82, 91, 61, 90, 83, 83,
83, 83, 83, 83, 83, 83, 83, 83,
83, 83, 83, 83, 83, 83, 83, 83,
83, 83, 83, 93, 94, 95, 96, 83,
83, 83, 83, 83, 83, 83, 83, 83,
83, 105, 106, 107, 83, 83, 83, 83,
83, 109, 110, 82, 111, 83, 90, 91,
61, 61, 61, 61, 61, 61, 61, 61,
61, 92, 93, 94, 95, 96, 97, 98,
92, 99, 100, 101, 102, 103, 104, 61,
105, 106, 107, 61, 61, 61, 61, 108,
109, 110, 82, 91, 61, 5, 6, 113,
113, 113, 113, 113, 113, 113, 113, 113,
9, 10, 11, 12, 13, 14, 15, 9, 9, 10, 11, 12, 13, 14, 15, 9,
65, 65, 65, 19, 20, 21, 65, 22, 16, 18, 18, 19, 20, 21, 113, 22,
23, 24, 65, 65, 65, 65, 10, 29, 23, 24, 113, 113, 113, 113, 28, 29,
30, 31, 66, 65, 5, 6, 65, 65, 30, 31, 6, 113, 5, 113, 9, 10,
65, 65, 65, 65, 65, 65, 65, 9, 11, 12, 13, 113, 113, 113, 113, 113,
10, 11, 12, 13, 14, 15, 9, 16, 113, 19, 20, 21, 113, 22, 23, 24,
65, 18, 19, 20, 21, 65, 22, 23, 113, 113, 113, 113, 10, 29, 30, 31,
24, 65, 65, 65, 65, 28, 29, 30, 114, 113, 10, 11, 12, 13, 113, 113,
31, 6, 65, 5, 65, 65, 65, 65, 113, 113, 113, 113, 113, 113, 113, 113,
65, 65, 65, 65, 65, 65, 65, 65, 22, 23, 24, 113, 113, 113, 113, 113,
65, 65, 65, 65, 65, 65, 65, 65, 29, 30, 31, 114, 113, 11, 12, 13,
65, 10, 11, 12, 13, 65, 65, 65, 113, 113, 113, 113, 113, 113, 113, 113,
65, 65, 65, 65, 65, 65, 65, 22, 113, 113, 113, 113, 113, 113, 113, 113,
23, 24, 65, 65, 65, 65, 65, 29, 113, 113, 29, 30, 31, 113, 12, 13,
30, 31, 66, 65, 68, 65, 7, 65, 113, 113, 113, 113, 113, 113, 113, 113,
1, 65, 65, 65, 1, 65, 65, 65, 113, 113, 113, 113, 113, 113, 113, 113,
65, 65, 5, 6, 7, 65, 65, 65, 113, 113, 29, 30, 31, 113, 13, 113,
65, 65, 65, 65, 65, 9, 10, 11, 113, 113, 113, 113, 113, 113, 113, 113,
12, 13, 14, 15, 9, 16, 17, 18, 113, 113, 113, 113, 113, 113, 113, 113,
19, 20, 21, 65, 22, 23, 24, 65, 113, 29, 30, 31, 113, 29, 30, 113,
25, 26, 65, 28, 29, 30, 31, 6, 30, 113, 11, 12, 13, 113, 113, 113,
65, 5, 6, 65, 65, 65, 65, 65, 113, 113, 113, 113, 113, 113, 113, 22,
65, 65, 65, 65, 9, 10, 11, 12, 23, 24, 113, 113, 113, 113, 113, 29,
13, 14, 15, 9, 16, 17, 18, 19, 30, 31, 114, 113, 11, 12, 13, 113,
20, 21, 65, 22, 23, 24, 65, 65, 113, 113, 113, 113, 113, 113, 113, 113,
65, 65, 28, 29, 30, 31, 6, 65, 113, 113, 23, 24, 113, 113, 113, 113,
25, 26, 65, 26, 65, 1, 69, 69, 113, 29, 30, 31, 114, 113, 11, 12,
69, 1, 69, 71, 70, 32, 70, 32, 13, 113, 113, 113, 113, 113, 113, 113,
71, 70, 71, 70, 32, 70, 33, 70, 113, 113, 113, 113, 113, 24, 113, 113,
0 113, 113, 113, 29, 30, 31, 114, 113,
115, 113, 11, 12, 13, 113, 113, 113,
113, 113, 113, 113, 113, 113, 113, 113,
113, 113, 113, 113, 113, 113, 113, 29,
30, 31, 114, 113, 10, 11, 12, 13,
113, 113, 113, 113, 113, 113, 19, 20,
21, 113, 22, 23, 24, 113, 113, 113,
113, 10, 29, 30, 31, 114, 113, 10,
11, 12, 13, 113, 113, 113, 113, 113,
113, 113, 20, 21, 113, 22, 23, 24,
113, 113, 113, 113, 10, 29, 30, 31,
114, 113, 10, 11, 12, 13, 113, 113,
113, 113, 113, 113, 113, 113, 21, 113,
22, 23, 24, 113, 113, 113, 113, 10,
29, 30, 31, 114, 113, 9, 10, 11,
12, 13, 113, 15, 9, 113, 113, 113,
19, 20, 21, 113, 22, 23, 24, 113,
113, 113, 113, 10, 29, 30, 31, 114,
113, 9, 10, 11, 12, 13, 113, 113,
9, 113, 113, 113, 19, 20, 21, 113,
22, 23, 24, 113, 113, 113, 113, 10,
29, 30, 31, 114, 113, 9, 10, 11,
12, 13, 14, 15, 9, 113, 113, 113,
19, 20, 21, 113, 22, 23, 24, 113,
113, 113, 113, 10, 29, 30, 31, 114,
113, 5, 6, 113, 113, 113, 113, 113,
113, 113, 113, 113, 9, 10, 11, 12,
13, 14, 15, 9, 16, 113, 18, 19,
20, 21, 113, 22, 23, 24, 113, 113,
113, 113, 28, 29, 30, 31, 6, 113,
5, 113, 113, 113, 113, 113, 113, 113,
113, 113, 113, 113, 113, 113, 113, 113,
113, 113, 113, 113, 113, 113, 10, 11,
12, 13, 113, 113, 113, 113, 113, 113,
113, 113, 113, 113, 22, 23, 24, 113,
113, 113, 113, 113, 29, 30, 31, 114,
113, 116, 113, 7, 113, 1, 113, 113,
113, 1, 113, 113, 113, 113, 113, 5,
6, 7, 113, 113, 113, 113, 113, 113,
113, 113, 9, 10, 11, 12, 13, 14,
15, 9, 16, 17, 18, 19, 20, 21,
113, 22, 23, 24, 113, 25, 26, 113,
28, 29, 30, 31, 6, 113, 5, 6,
113, 113, 113, 113, 113, 113, 113, 113,
113, 9, 10, 11, 12, 13, 14, 15,
9, 16, 17, 18, 19, 20, 21, 113,
22, 23, 24, 113, 113, 113, 113, 28,
29, 30, 31, 6, 113, 25, 26, 113,
26, 113, 1, 117, 117, 117, 1, 117,
119, 118, 32, 118, 32, 119, 118, 119,
118, 32, 118, 33, 118, 0
}; };
static const char _use_syllable_machine_trans_targs[] = { static const char _use_syllable_machine_trans_targs[] = {
1, 3, 0, 26, 28, 29, 30, 51, 1, 27, 0, 50, 52, 76, 77, 98,
53, 31, 32, 33, 34, 35, 46, 47, 100, 78, 79, 80, 81, 82, 93, 94,
48, 54, 49, 43, 44, 45, 38, 39, 95, 101, 96, 90, 91, 92, 85, 86,
40, 55, 56, 57, 50, 36, 37, 0, 87, 102, 103, 104, 97, 83, 84, 0,
58, 60, 0, 2, 0, 4, 5, 6, 105, 107, 0, 2, 3, 4, 5, 6,
7, 8, 9, 10, 21, 22, 23, 24, 7, 8, 19, 20, 21, 24, 22, 16,
18, 19, 20, 13, 14, 15, 25, 11, 17, 18, 11, 12, 13, 25, 26, 23,
12, 0, 0, 16, 0, 17, 0, 27, 9, 10, 0, 14, 15, 0, 28, 29,
0, 0, 41, 42, 52, 0, 0, 59 30, 31, 32, 33, 34, 45, 46, 47,
48, 42, 43, 44, 37, 38, 39, 49,
35, 36, 0, 0, 40, 0, 41, 0,
51, 0, 53, 54, 55, 56, 57, 58,
59, 70, 71, 72, 75, 73, 67, 68,
69, 62, 63, 64, 74, 60, 61, 65,
66, 0, 88, 89, 99, 0, 0, 106
}; };
static const char _use_syllable_machine_trans_actions[] = { static const char _use_syllable_machine_trans_actions[] = {
@ -315,11 +487,17 @@ static const char _use_syllable_machine_trans_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, 4, 0, 0, 0, 0, 0, 0, 0, 4,
0, 0, 5, 0, 6, 0, 0, 0, 0, 0, 5, 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, 8, 0, 9, 0, 10, 0, 0, 0, 6, 0, 0, 7, 0, 0,
11, 12, 0, 0, 0, 13, 14, 0 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 8, 9, 0, 10, 0, 11,
0, 12, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 13, 0, 0, 0, 14, 15, 0
}; };
static const char _use_syllable_machine_to_state_actions[] = { static const char _use_syllable_machine_to_state_actions[] = {
@ -330,7 +508,13 @@ static const char _use_syllable_machine_to_state_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, 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, 0
}; };
static const char _use_syllable_machine_from_state_actions[] = { static const char _use_syllable_machine_from_state_actions[] = {
@ -341,18 +525,30 @@ static const char _use_syllable_machine_from_state_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, 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, 0
}; };
static const short _use_syllable_machine_eof_trans[] = { static const short _use_syllable_machine_eof_trans[] = {
0, 35, 35, 37, 37, 59, 37, 37, 0, 35, 35, 35, 35, 35, 35, 35,
37, 37, 37, 37, 37, 37, 37, 37, 35, 35, 35, 35, 35, 35, 35, 35,
61, 37, 37, 37, 37, 37, 37, 37, 35, 35, 35, 35, 35, 35, 35, 35,
37, 59, 63, 65, 37, 66, 66, 66, 35, 35, 35, 62, 62, 84, 62, 62,
66, 66, 66, 66, 66, 66, 66, 66, 62, 62, 62, 62, 62, 62, 62, 62,
66, 66, 66, 66, 66, 66, 66, 66, 86, 62, 62, 62, 62, 62, 62, 62,
66, 66, 66, 66, 66, 66, 66, 66, 62, 84, 88, 90, 62, 62, 84, 62,
66, 70, 71, 71, 71 62, 62, 62, 62, 62, 62, 62, 62,
62, 86, 62, 62, 62, 62, 62, 62,
62, 62, 84, 62, 114, 114, 114, 114,
114, 114, 114, 114, 114, 114, 114, 114,
114, 114, 114, 114, 114, 114, 114, 114,
114, 114, 114, 114, 114, 114, 114, 114,
118, 119, 119, 119
}; };
static const int use_syllable_machine_start = 0; static const int use_syllable_machine_start = 0;
@ -366,7 +562,7 @@ static const int use_syllable_machine_en_main = 0;
#line 179 "hb-ot-shape-complex-use-machine.rl" #line 181 "hb-ot-shape-complex-use-machine.rl"
#define found_syllable(syllable_type) \ #define found_syllable(syllable_type) \
@ -422,7 +618,7 @@ HB_FUNCOBJ (machine_index);
static bool static bool
not_ccs_default_ignorable (const hb_glyph_info_t &i) not_ccs_default_ignorable (const hb_glyph_info_t &i)
{ return !(i.use_category() == USE(CGJ) && _hb_glyph_info_is_default_ignorable (&i)); } { return i.use_category() != USE(CGJ); }
static inline void static inline void
find_syllables_use (hb_buffer_t *buffer) find_syllables_use (hb_buffer_t *buffer)
@ -451,7 +647,7 @@ find_syllables_use (hb_buffer_t *buffer)
unsigned int act HB_UNUSED; unsigned int act HB_UNUSED;
int cs; int cs;
#line 453 "hb-ot-shape-complex-use-machine.hh" #line 651 "hb-ot-shape-complex-use-machine.hh"
{ {
cs = use_syllable_machine_start; cs = use_syllable_machine_start;
ts = 0; ts = 0;
@ -459,12 +655,12 @@ find_syllables_use (hb_buffer_t *buffer)
act = 0; act = 0;
} }
#line 263 "hb-ot-shape-complex-use-machine.rl" #line 267 "hb-ot-shape-complex-use-machine.rl"
unsigned int syllable_serial = 1; unsigned int syllable_serial = 1;
#line 466 "hb-ot-shape-complex-use-machine.hh" #line 664 "hb-ot-shape-complex-use-machine.hh"
{ {
int _slen; int _slen;
int _trans; int _trans;
@ -478,7 +674,7 @@ _resume:
#line 1 "NONE" #line 1 "NONE"
{ts = p;} {ts = p;}
break; break;
#line 480 "hb-ot-shape-complex-use-machine.hh" #line 678 "hb-ot-shape-complex-use-machine.hh"
} }
_keys = _use_syllable_machine_trans_keys + (cs<<1); _keys = _use_syllable_machine_trans_keys + (cs<<1);
@ -496,55 +692,59 @@ _eof_trans:
goto _again; goto _again;
switch ( _use_syllable_machine_trans_actions[_trans] ) { switch ( _use_syllable_machine_trans_actions[_trans] ) {
case 7: case 8:
#line 169 "hb-ot-shape-complex-use-machine.rl" #line 171 "hb-ot-shape-complex-use-machine.rl"
{te = p+1;{ found_syllable (use_standard_cluster); }} {te = p+1;{ found_syllable (use_standard_cluster); }}
break; break;
case 4: case 6:
#line 174 "hb-ot-shape-complex-use-machine.rl" #line 174 "hb-ot-shape-complex-use-machine.rl"
{te = p+1;{ found_syllable (use_symbol_cluster); }}
break;
case 4:
#line 176 "hb-ot-shape-complex-use-machine.rl"
{te = p+1;{ found_syllable (use_broken_cluster); }} {te = p+1;{ found_syllable (use_broken_cluster); }}
break; break;
case 3: case 3:
#line 175 "hb-ot-shape-complex-use-machine.rl" #line 177 "hb-ot-shape-complex-use-machine.rl"
{te = p+1;{ found_syllable (use_non_cluster); }} {te = p+1;{ found_syllable (use_non_cluster); }}
break; break;
case 8: case 9:
#line 167 "hb-ot-shape-complex-use-machine.rl" #line 169 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (use_virama_terminated_cluster); }} {te = p;p--;{ found_syllable (use_virama_terminated_cluster); }}
break; break;
case 9: case 10:
#line 168 "hb-ot-shape-complex-use-machine.rl" #line 170 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (use_sakot_terminated_cluster); }} {te = p;p--;{ found_syllable (use_sakot_terminated_cluster); }}
break; break;
case 6: case 7:
#line 169 "hb-ot-shape-complex-use-machine.rl" #line 171 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (use_standard_cluster); }} {te = p;p--;{ found_syllable (use_standard_cluster); }}
break; break;
case 11: case 12:
#line 170 "hb-ot-shape-complex-use-machine.rl" #line 172 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (use_number_joiner_terminated_cluster); }} {te = p;p--;{ found_syllable (use_number_joiner_terminated_cluster); }}
break; break;
case 10: case 11:
#line 171 "hb-ot-shape-complex-use-machine.rl" #line 173 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (use_numeral_cluster); }} {te = p;p--;{ found_syllable (use_numeral_cluster); }}
break; break;
case 5: case 5:
#line 172 "hb-ot-shape-complex-use-machine.rl" #line 174 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (use_symbol_cluster); }} {te = p;p--;{ found_syllable (use_symbol_cluster); }}
break; break;
case 14: case 15:
#line 173 "hb-ot-shape-complex-use-machine.rl" #line 175 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (use_hieroglyph_cluster); }} {te = p;p--;{ found_syllable (use_hieroglyph_cluster); }}
break; break;
case 12: case 13:
#line 174 "hb-ot-shape-complex-use-machine.rl" #line 176 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (use_broken_cluster); }} {te = p;p--;{ found_syllable (use_broken_cluster); }}
break; break;
case 13: case 14:
#line 175 "hb-ot-shape-complex-use-machine.rl" #line 177 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (use_non_cluster); }} {te = p;p--;{ found_syllable (use_non_cluster); }}
break; break;
#line 546 "hb-ot-shape-complex-use-machine.hh" #line 748 "hb-ot-shape-complex-use-machine.hh"
} }
_again: _again:
@ -553,7 +753,7 @@ _again:
#line 1 "NONE" #line 1 "NONE"
{ts = 0;} {ts = 0;}
break; break;
#line 555 "hb-ot-shape-complex-use-machine.hh" #line 757 "hb-ot-shape-complex-use-machine.hh"
} }
if ( ++p != pe ) if ( ++p != pe )
@ -569,7 +769,7 @@ _again:
} }
#line 268 "hb-ot-shape-complex-use-machine.rl" #line 272 "hb-ot-shape-complex-use-machine.rl"
} }

File diff suppressed because it is too large Load diff

View file

@ -206,7 +206,7 @@ setup_masks_use (const hb_ot_shape_plan_t *plan,
unsigned int count = buffer->len; unsigned int count = buffer->len;
hb_glyph_info_t *info = buffer->info; hb_glyph_info_t *info = buffer->info;
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++)
info[i].use_category() = hb_use_get_category (info[i].codepoint); info[i].use_category() = hb_use_get_category (info[i]);
} }
static void static void
@ -257,7 +257,6 @@ setup_topographical_masks (const hb_ot_shape_plan_t *plan,
use_syllable_type_t syllable_type = (use_syllable_type_t) (info[start].syllable() & 0x0F); use_syllable_type_t syllable_type = (use_syllable_type_t) (info[start].syllable() & 0x0F);
switch (syllable_type) switch (syllable_type)
{ {
case use_symbol_cluster:
case use_hieroglyph_cluster: case use_hieroglyph_cluster:
case use_non_cluster: case use_non_cluster:
/* These don't join. Nothing to do. */ /* These don't join. Nothing to do. */
@ -269,6 +268,7 @@ setup_topographical_masks (const hb_ot_shape_plan_t *plan,
case use_standard_cluster: case use_standard_cluster:
case use_number_joiner_terminated_cluster: case use_number_joiner_terminated_cluster:
case use_numeral_cluster: case use_numeral_cluster:
case use_symbol_cluster:
case use_broken_cluster: case use_broken_cluster:
bool join = last_form == JOINING_FORM_FINA || last_form == JOINING_FORM_ISOL; bool join = last_form == JOINING_FORM_FINA || last_form == JOINING_FORM_ISOL;
@ -363,6 +363,7 @@ reorder_syllable_use (hb_buffer_t *buffer, unsigned int start, unsigned int end)
(FLAG (use_virama_terminated_cluster) | (FLAG (use_virama_terminated_cluster) |
FLAG (use_sakot_terminated_cluster) | FLAG (use_sakot_terminated_cluster) |
FLAG (use_standard_cluster) | FLAG (use_standard_cluster) |
FLAG (use_symbol_cluster) |
FLAG (use_broken_cluster) | FLAG (use_broken_cluster) |
0)))) 0))))
return; return;

View file

@ -7,7 +7,7 @@
* on files with these headers: * on files with these headers:
* *
* <meta name="updated_at" content="2022-01-28 10:00 PM" /> * <meta name="updated_at" content="2022-01-28 10:00 PM" />
* File-Date: 2021-12-29 * File-Date: 2022-03-02
*/ */
#ifndef HB_OT_TAG_TABLE_HH #ifndef HB_OT_TAG_TABLE_HH
@ -54,6 +54,7 @@ static const LangTag ot_languages[] = {
/*{"aio", HB_TAG('A','I','O',' ')},*/ /* Aiton */ /*{"aio", HB_TAG('A','I','O',' ')},*/ /* Aiton */
{"aiw", HB_TAG('A','R','I',' ')}, /* Aari */ {"aiw", HB_TAG('A','R','I',' ')}, /* Aari */
{"ajp", HB_TAG('A','R','A',' ')}, /* South Levantine Arabic -> Arabic */ {"ajp", HB_TAG('A','R','A',' ')}, /* South Levantine Arabic -> Arabic */
{"ajt", HB_TAG('A','R','A',' ')}, /* Judeo-Tunisian Arabic (retired code) -> Arabic */
{"ak", HB_TAG('A','K','A',' ')}, /* Akan [macrolanguage] */ {"ak", HB_TAG('A','K','A',' ')}, /* Akan [macrolanguage] */
{"akb", HB_TAG('A','K','B',' ')}, /* Batak Angkola */ {"akb", HB_TAG('A','K','B',' ')}, /* Batak Angkola */
{"akb", HB_TAG('B','T','K',' ')}, /* Batak Angkola -> Batak */ {"akb", HB_TAG('B','T','K',' ')}, /* Batak Angkola -> Batak */
@ -809,7 +810,7 @@ static const LangTag ot_languages[] = {
{"lac", HB_TAG('M','Y','N',' ')}, /* Lacandon -> Mayan */ {"lac", HB_TAG('M','Y','N',' ')}, /* Lacandon -> Mayan */
{"lad", HB_TAG('J','U','D',' ')}, /* Ladino */ {"lad", HB_TAG('J','U','D',' ')}, /* Ladino */
{"lah", HB_TAG_NONE }, /* Lahnda [macrolanguage] != Lahuli */ {"lah", HB_TAG_NONE }, /* Lahnda [macrolanguage] != Lahuli */
{"lak", HB_TAG_NONE }, /* Laka (Nigeria) != Lak */ {"lak", HB_TAG_NONE }, /* Laka (Nigeria) (retired code) != Lak */
{"lam", HB_TAG_NONE }, /* Lamba != Lambani */ {"lam", HB_TAG_NONE }, /* Lamba != Lambani */
{"laz", HB_TAG_NONE }, /* Aribwatsa != Laz */ {"laz", HB_TAG_NONE }, /* Aribwatsa != Laz */
{"lb", HB_TAG('L','T','Z',' ')}, /* Luxembourgish */ {"lb", HB_TAG('L','T','Z',' ')}, /* Luxembourgish */
@ -1339,12 +1340,14 @@ static const LangTag ot_languages[] = {
{"sla", HB_TAG_NONE }, /* Slavic [collection] != Slavey */ {"sla", HB_TAG_NONE }, /* Slavic [collection] != Slavey */
{"sm", HB_TAG('S','M','O',' ')}, /* Samoan */ {"sm", HB_TAG('S','M','O',' ')}, /* Samoan */
{"sma", HB_TAG('S','S','M',' ')}, /* Southern Sami */ {"sma", HB_TAG('S','S','M',' ')}, /* Southern Sami */
{"smd", HB_TAG('M','B','N',' ')}, /* Sama (retired code) -> Mbundu */
{"smj", HB_TAG('L','S','M',' ')}, /* Lule Sami */ {"smj", HB_TAG('L','S','M',' ')}, /* Lule Sami */
{"sml", HB_TAG_NONE }, /* Central Sama != Somali */ {"sml", HB_TAG_NONE }, /* Central Sama != Somali */
{"smn", HB_TAG('I','S','M',' ')}, /* Inari Sami */ {"smn", HB_TAG('I','S','M',' ')}, /* Inari Sami */
{"sms", HB_TAG('S','K','S',' ')}, /* Skolt Sami */ {"sms", HB_TAG('S','K','S',' ')}, /* Skolt Sami */
{"smt", HB_TAG('Q','I','N',' ')}, /* Simte -> Chin */ {"smt", HB_TAG('Q','I','N',' ')}, /* Simte -> Chin */
{"sn", HB_TAG('S','N','A','0')}, /* Shona */ {"sn", HB_TAG('S','N','A','0')}, /* Shona */
{"snb", HB_TAG('I','B','A',' ')}, /* Sebuyau (retired code) -> Iban */
{"snh", HB_TAG_NONE }, /* Shinabo (retired code) != Sinhala (Sinhalese) */ {"snh", HB_TAG_NONE }, /* Shinabo (retired code) != Sinhala (Sinhalese) */
/*{"snk", HB_TAG('S','N','K',' ')},*/ /* Soninke */ /*{"snk", HB_TAG('S','N','K',' ')},*/ /* Soninke */
{"so", HB_TAG('S','M','L',' ')}, /* Somali */ {"so", HB_TAG('S','M','L',' ')}, /* Somali */

View file

@ -37,7 +37,6 @@
* For a detailed writeup on the overflow resolution algorithm see: * For a detailed writeup on the overflow resolution algorithm see:
* docs/repacker.md * docs/repacker.md
*/ */
struct graph_t struct graph_t
{ {
struct vertex_t struct vertex_t
@ -140,7 +139,8 @@ struct graph_t
* the 'packed' object stack used internally in the * the 'packed' object stack used internally in the
* serializer * serializer
*/ */
graph_t (const hb_vector_t<hb_serialize_context_t::object_t *>& objects) template<typename T>
graph_t (const T& objects)
: parents_invalid (true), : parents_invalid (true),
distance_invalid (true), distance_invalid (true),
positions_invalid (true), positions_invalid (true),
@ -1098,8 +1098,9 @@ struct graph_t
hb_vector_t<unsigned> num_roots_for_space_; hb_vector_t<unsigned> num_roots_for_space_;
}; };
static bool _try_isolating_subgraphs (const hb_vector_t<graph_t::overflow_record_t>& overflows, static inline
graph_t& sorted_graph) bool _try_isolating_subgraphs (const hb_vector_t<graph_t::overflow_record_t>& overflows,
graph_t& sorted_graph)
{ {
unsigned space = 0; unsigned space = 0;
hb_set_t roots_to_isolate; hb_set_t roots_to_isolate;
@ -1147,9 +1148,10 @@ static bool _try_isolating_subgraphs (const hb_vector_t<graph_t::overflow_record
return true; return true;
} }
static bool _process_overflows (const hb_vector_t<graph_t::overflow_record_t>& overflows, static inline
hb_set_t& priority_bumped_parents, bool _process_overflows (const hb_vector_t<graph_t::overflow_record_t>& overflows,
graph_t& sorted_graph) hb_set_t& priority_bumped_parents,
graph_t& sorted_graph)
{ {
bool resolution_attempted = false; bool resolution_attempted = false;
@ -1207,8 +1209,9 @@ static bool _process_overflows (const hb_vector_t<graph_t::overflow_record_t>& o
* For a detailed writeup describing how the algorithm operates see: * For a detailed writeup describing how the algorithm operates see:
* docs/repacker.md * docs/repacker.md
*/ */
template<typename T>
inline hb_blob_t* inline hb_blob_t*
hb_resolve_overflows (const hb_vector_t<hb_serialize_context_t::object_t *>& packed, hb_resolve_overflows (const T& packed,
hb_tag_t table_tag, hb_tag_t table_tag,
unsigned max_rounds = 20) { unsigned max_rounds = 20) {
// Kahn sort is ~twice as fast as shortest distance sort and works for many fonts // Kahn sort is ~twice as fast as shortest distance sort and works for many fonts

View file

@ -36,6 +36,9 @@
#include "hb-map.hh" #include "hb-map.hh"
#include "hb-pool.hh" #include "hb-pool.hh"
#ifdef HB_EXPERIMENTAL_API
#include "hb-subset-repacker.h"
#endif
/* /*
* Serialize * Serialize
@ -70,6 +73,24 @@ struct hb_serialize_context_t
virtual_links.fini (); virtual_links.fini ();
} }
object_t () = default;
#ifdef HB_EXPERIMENTAL_API
object_t (const hb_object_t &o)
{
head = o.head;
tail = o.tail;
next = nullptr;
real_links.alloc (o.num_real_links);
for (unsigned i = 0 ; i < o.num_real_links; i++)
real_links.push (o.real_links[i]);
virtual_links.alloc (o.num_virtual_links);
for (unsigned i = 0; i < o.num_virtual_links; i++)
virtual_links.push (o.virtual_links[i]);
}
#endif
bool operator == (const object_t &o) const bool operator == (const object_t &o) const
{ {
// Virtual links aren't considered for equality since they don't affect the functionality // Virtual links aren't considered for equality since they don't affect the functionality
@ -95,6 +116,20 @@ struct hb_serialize_context_t
unsigned position: 28; unsigned position: 28;
unsigned bias; unsigned bias;
objidx_t objidx; objidx_t objidx;
link_t () = default;
#ifdef HB_EXPERIMENTAL_API
link_t (const hb_link_t &o)
{
width = o.width;
is_signed = 0;
whence = 0;
position = o.position;
bias = 0;
objidx = o.objidx;
}
#endif
}; };
char *head; char *head;

View file

@ -0,0 +1,49 @@
/*
* Copyright © 2022 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.
*
*/
#include "hb-repacker.hh"
#ifdef HB_EXPERIMENTAL_API
/**
* hb_subset_repack_or_fail:
* @hb_objects: raw array of struct hb_object_t, which provides
* object graph info
* @num_hb_objs: number of hb_object_t in the hb_objects array.
*
* Given the input object graph info, repack a table to eliminate
* offset overflows. A nullptr is returned if the repacking attempt fails.
*
* Since: EXPERIMENTAL
**/
hb_blob_t* hb_subset_repack_or_fail (hb_object_t* hb_objects, unsigned num_hb_objs)
{
hb_vector_t<const hb_object_t *> packed;
packed.alloc (num_hb_objs + 1);
packed.push (nullptr);
for (unsigned i = 0 ; i < num_hb_objs ; i++)
packed.push (&(hb_objects[i]));
return hb_resolve_overflows (packed, HB_OT_TAG_GSUB);
}
#endif

View file

@ -0,0 +1,80 @@
/*
* Copyright © 2022 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.
*
*/
#ifndef HB_SUBSET_REPACKER_H
#define HB_SUBSET_REPACKER_H
#include "hb.h"
HB_BEGIN_DECLS
#ifdef HB_EXPERIMENTAL_API
/**
* struct hb_link_t
* width: offsetSize in bytes
* position: position of the offset field in bytes
* from beginning of subtable
* objidx: index of subtable
**/
struct hb_link_t
{
unsigned width;
unsigned position;
unsigned objidx;
};
typedef struct hb_link_t hb_link_t;
/**
* struct hb_object_t
* head: start of object data
* tail: end of object data
* num_real_links: num of offset field in the object
* real_links: pointer to array of offset info
* num_virtual_links: num of objects that must be packed
* after current object in the final serialized order
* virtual_links: array of virtual link info
**/
struct hb_object_t
{
char *head;
char *tail;
unsigned num_real_links;
hb_link_t *real_links;
unsigned num_virtual_links;
hb_link_t *virtual_links;
};
typedef struct hb_object_t hb_object_t;
HB_EXTERN hb_blob_t*
hb_subset_repack_or_fail (hb_object_t* hb_objects,
unsigned num_hb_objs);
#endif
HB_END_DECLS
#endif /* HB_SUBSET_REPACKER_H */

View file

@ -53,14 +53,14 @@ HB_BEGIN_DECLS
* *
* 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 0 #define HB_VERSION_MICRO 1
/** /**
* 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 "4.0.0" #define HB_VERSION_STRING "4.0.1"
/** /**
* HB_VERSION_ATLEAST: * HB_VERSION_ATLEAST: