Update Harfbuzz to version 10.2.0

[ChangeLog][Third-Party Code] Upgraded Harfbuzz to version
10.2.0.

Pick-to: 5.15 6.5 6.8 6.9
Fixes: QTBUG-132855
Change-Id: I542c054ccdc311b17363456c693a2057c2e496c1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2025-01-20 14:14:02 +01:00
parent 549bab4150
commit 308ee2738f
37 changed files with 2420 additions and 1348 deletions

View File

@ -63,7 +63,7 @@ qt_internal_add_3rdparty_library(BundledHarfbuzz
src/hb-subset-instancer-solver.cc src/hb-subset-instancer-solver.cc
src/hb-subset-plan.cc src/hb-subset-plan.cc
src/hb-subset-plan-member-list.hh src/hb-subset-plan-member-list.hh
src/hb-subset-repacker.cc src/hb-subset-repacker.h src/hb-subset-serialize.cc src/hb-subset-serialize.h
src/hb-unicode.cc src/hb-unicode.h src/hb-unicode.hh src/hb-unicode.cc src/hb-unicode.h src/hb-unicode.hh
src/hb-utf.hh src/hb-utf.hh
src/hb-version.h src/hb-version.h

View File

@ -7,8 +7,8 @@
"Description": "HarfBuzz is an OpenType text shaping engine.", "Description": "HarfBuzz is an OpenType text shaping engine.",
"Homepage": "http://harfbuzz.org", "Homepage": "http://harfbuzz.org",
"Version": "10.1.0", "Version": "10.2.0",
"DownloadLocation": "https://github.com/harfbuzz/harfbuzz/releases/tag/10.1.0", "DownloadLocation": "https://github.com/harfbuzz/harfbuzz/releases/tag/10.2.0",
"PURL": "pkg:github/harfbuzz/harfbuzz@$<VERSION>", "PURL": "pkg:github/harfbuzz/harfbuzz@$<VERSION>",
"CPE": "cpe:2.3:a:harfbuzz_project:harfbuzz:$<VERSION>:*:*:*:*:*:*:*", "CPE": "cpe:2.3:a:harfbuzz_project:harfbuzz:$<VERSION>:*:*:*:*:*:*:*",
"License": "MIT License", "License": "MIT License",

View File

@ -1003,7 +1003,7 @@ struct PaintTransform
void paint_glyph (hb_paint_context_t *c) const void paint_glyph (hb_paint_context_t *c) const
{ {
TRACE_PAINT (this); TRACE_PAINT (this);
(this+transform).paint_glyph (c); (this+transform).paint_glyph (c); // This does a push_transform()
c->recurse (this+src); c->recurse (this+src);
c->funcs->pop_transform (c->data); c->funcs->pop_transform (c->data);
} }

View File

@ -58,7 +58,7 @@
#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.cc" #include "hb-subset-plan.cc"
#include "hb-subset-repacker.cc" #include "hb-subset-serialize.cc"
#include "hb-subset.cc" #include "hb-subset.cc"
#include "hb-ucd.cc" #include "hb-ucd.cc"
#include "hb-unicode.cc" #include "hb-unicode.cc"

View File

@ -180,7 +180,7 @@ hb_cairo_paint_color_glyph (hb_paint_funcs_t *pfuncs HB_UNUSED,
hb_position_t x_scale, y_scale; hb_position_t x_scale, y_scale;
hb_font_get_scale (font, &x_scale, &y_scale); hb_font_get_scale (font, &x_scale, &y_scale);
cairo_scale (cr, x_scale, y_scale); cairo_scale (cr, x_scale, -y_scale);
cairo_glyph_t cairo_glyph = { glyph, 0, 0 }; cairo_glyph_t cairo_glyph = { glyph, 0, 0 };
cairo_set_scaled_font (cr, c->scaled_font); cairo_set_scaled_font (cr, c->scaled_font);
@ -597,7 +597,9 @@ hb_cairo_render_glyph (cairo_scaled_font_t *scaled_font,
hb_position_t x_scale, y_scale; hb_position_t x_scale, y_scale;
hb_font_get_scale (font, &x_scale, &y_scale); hb_font_get_scale (font, &x_scale, &y_scale);
cairo_scale (cr, +1./x_scale, -1./y_scale); cairo_scale (cr,
+1. / (x_scale ? x_scale : 1),
-1. / (y_scale ? y_scale : 1));
hb_font_draw_glyph (font, glyph, hb_cairo_draw_get_funcs (), cr); hb_font_draw_glyph (font, glyph, hb_cairo_draw_get_funcs (), cr);
@ -628,7 +630,9 @@ hb_cairo_render_color_glyph (cairo_scaled_font_t *scaled_font,
hb_color_t color = HB_COLOR (0, 0, 0, 255); hb_color_t color = HB_COLOR (0, 0, 0, 255);
hb_position_t x_scale, y_scale; hb_position_t x_scale, y_scale;
hb_font_get_scale (font, &x_scale, &y_scale); hb_font_get_scale (font, &x_scale, &y_scale);
cairo_scale (cr, +1./x_scale, -1./y_scale); cairo_scale (cr,
+1. / (x_scale ? x_scale : 1),
-1. / (y_scale ? y_scale : 1));
hb_cairo_context_t c; hb_cairo_context_t c;
c.scaled_font = scaled_font; c.scaled_font = scaled_font;
@ -1000,6 +1004,7 @@ hb_cairo_glyphs_from_buffer (hb_buffer_t *buffer,
end = start + hb_glyph[i].cluster - hb_glyph[i+1].cluster; end = start + hb_glyph[i].cluster - hb_glyph[i+1].cluster;
else else
end = (const char *) hb_utf_offset_to_pointer<hb_utf8_t> ((const uint8_t *) start, end = (const char *) hb_utf_offset_to_pointer<hb_utf8_t> ((const uint8_t *) start,
(const uint8_t *) utf8, utf8_len,
(signed) (hb_glyph[i].cluster - hb_glyph[i+1].cluster)); (signed) (hb_glyph[i].cluster - hb_glyph[i+1].cluster));
(*clusters)[cluster].num_bytes = end - start; (*clusters)[cluster].num_bytes = end - start;
start = end; start = end;
@ -1020,6 +1025,7 @@ hb_cairo_glyphs_from_buffer (hb_buffer_t *buffer,
end = start + hb_glyph[i].cluster - hb_glyph[i-1].cluster; end = start + hb_glyph[i].cluster - hb_glyph[i-1].cluster;
else else
end = (const char *) hb_utf_offset_to_pointer<hb_utf8_t> ((const uint8_t *) start, end = (const char *) hb_utf_offset_to_pointer<hb_utf8_t> ((const uint8_t *) start,
(const uint8_t *) utf8, utf8_len,
(signed) (hb_glyph[i].cluster - hb_glyph[i-1].cluster)); (signed) (hb_glyph[i].cluster - hb_glyph[i-1].cluster));
(*clusters)[cluster].num_bytes = end - start; (*clusters)[cluster].num_bytes = end - start;
start = end; start = end;

View File

@ -625,6 +625,9 @@ hb_script_get_horizontal_direction (hb_script_t script)
/* Unicode-14.0 additions */ /* Unicode-14.0 additions */
case HB_SCRIPT_OLD_UYGHUR: case HB_SCRIPT_OLD_UYGHUR:
/* Unicode-16.0 additions */
case HB_SCRIPT_GARAY:
return HB_DIRECTION_RTL; return HB_DIRECTION_RTL;

View File

@ -68,8 +68,6 @@
#define HB_NO_FACE_COLLECT_UNICODES #define HB_NO_FACE_COLLECT_UNICODES
#define HB_NO_GETENV #define HB_NO_GETENV
#define HB_NO_HINTING #define HB_NO_HINTING
#define HB_NO_LANGUAGE_LONG
#define HB_NO_LANGUAGE_PRIVATE_SUBTAG
#define HB_NO_LAYOUT_FEATURE_PARAMS #define HB_NO_LAYOUT_FEATURE_PARAMS
#define HB_NO_LAYOUT_COLLECT_GLYPHS #define HB_NO_LAYOUT_COLLECT_GLYPHS
#define HB_NO_LAYOUT_RARELY_USED #define HB_NO_LAYOUT_RARELY_USED

View File

@ -34,8 +34,12 @@
#include "hb-font.hh" #include "hb-font.hh"
#include "hb-machinery.hh" #include "hb-machinery.hh"
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100 #if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1080) \
|| (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 60000) \
|| (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 90000)
# define kCTFontOrientationDefault kCTFontDefaultOrientation # define kCTFontOrientationDefault kCTFontDefaultOrientation
# define kCTFontOrientationHorizontal kCTFontHorizontalOrientation
# define kCTFontOrientationVertical kCTFontVerticalOrientation
#endif #endif
#define MAX_GLYPHS 64u #define MAX_GLYPHS 64u

View File

@ -470,7 +470,8 @@ hb_face_is_immutable (const hb_face_t *face)
* @tag: The #hb_tag_t of the table to query * @tag: The #hb_tag_t of the table to query
* *
* Fetches a reference to the specified table within * Fetches a reference to the specified table within
* the specified face. * the specified face. Returns an empty blob if referencing table data is not
* possible.
* *
* Return value: (transfer full): A pointer to the @tag table within @face * Return value: (transfer full): A pointer to the @tag table within @face
* *

View File

@ -547,7 +547,9 @@ hb_ft_paint_glyph_colr (hb_font_t *font,
c.funcs->push_root_transform (c.data, font); c.funcs->push_root_transform (c.data, font);
if (is_bounded) if (is_bounded)
{
c.recurse (paint); c.recurse (paint);
}
c.funcs->pop_transform (c.data); c.funcs->pop_transform (c.data);
c.funcs->pop_clip (c.data); c.funcs->pop_clip (c.data);

View File

@ -931,11 +931,15 @@ hb_ft_paint_glyph (hb_font_t *font,
hb_lock_t lock (ft_font->lock); hb_lock_t lock (ft_font->lock);
FT_Face ft_face = ft_font->ft_face; FT_Face ft_face = ft_font->ft_face;
FT_Long load_flags = ft_font->load_flags | FT_LOAD_NO_BITMAP | FT_LOAD_COLOR;
#if (FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) >= 21301
load_flags |= FT_LOAD_NO_SVG;
#endif
/* We release the lock before calling into glyph callbacks, such that /* We release the lock before calling into glyph callbacks, such that
* eg. draw API can call back into the face.*/ * eg. draw API can call back into the face.*/
if (unlikely (FT_Load_Glyph (ft_face, gid, if (unlikely (FT_Load_Glyph (ft_face, gid, load_flags)))
ft_font->load_flags | FT_LOAD_COLOR)))
return; return;
if (ft_face->glyph->format == FT_GLYPH_FORMAT_OUTLINE) if (ft_face->glyph->format == FT_GLYPH_FORMAT_OUTLINE)

View File

@ -176,7 +176,7 @@ template <typename Type>
static inline Type& Crap () { static inline Type& Crap () {
static_assert (hb_null_size (Type) <= HB_NULL_POOL_SIZE, "Increase HB_NULL_POOL_SIZE."); static_assert (hb_null_size (Type) <= HB_NULL_POOL_SIZE, "Increase HB_NULL_POOL_SIZE.");
Type *obj = reinterpret_cast<Type *> (_hb_CrapPool); Type *obj = reinterpret_cast<Type *> (_hb_CrapPool);
memcpy (obj, std::addressof (Null (Type)), sizeof (*obj)); memcpy (reinterpret_cast<void*>(obj), std::addressof (Null (Type)), sizeof (*obj));
return *obj; return *obj;
} }
template <typename QType> template <typename QType>

View File

@ -1397,6 +1397,9 @@ struct CmapSubtableFormat14
hb_vector_t<hb_pair_t<unsigned, unsigned>> obj_indices; hb_vector_t<hb_pair_t<unsigned, unsigned>> obj_indices;
for (int i = src_tbl->record.len - 1; i >= 0; i--) for (int i = src_tbl->record.len - 1; i >= 0; i--)
{ {
if (!unicodes->has(src_tbl->record[i].varSelector))
continue;
hb_pair_t<unsigned, unsigned> result = src_tbl->record[i].copy (c, unicodes, glyphs_requested, glyph_map, base); hb_pair_t<unsigned, unsigned> result = src_tbl->record[i].copy (c, unicodes, glyphs_requested, glyph_map, base);
if (result.first || result.second) if (result.first || result.second)
obj_indices.push (result); obj_indices.push (result);
@ -1453,6 +1456,7 @@ struct CmapSubtableFormat14
{ {
+ hb_iter (record) + hb_iter (record)
| hb_filter (hb_bool, &VariationSelectorRecord::nonDefaultUVS) | hb_filter (hb_bool, &VariationSelectorRecord::nonDefaultUVS)
| hb_filter (unicodes, &VariationSelectorRecord::varSelector)
| hb_map (&VariationSelectorRecord::nonDefaultUVS) | hb_map (&VariationSelectorRecord::nonDefaultUVS)
| hb_map (hb_add (this)) | hb_map (hb_add (this))
| hb_apply ([=] (const NonDefaultUVS& _) { _.closure_glyphs (unicodes, glyphset); }) | hb_apply ([=] (const NonDefaultUVS& _) { _.closure_glyphs (unicodes, glyphset); })

View File

@ -1462,6 +1462,7 @@ static inline bool ligate_input (hb_ot_apply_context_t *c,
unsigned int this_comp = _hb_glyph_info_get_lig_comp (&buffer->cur()); unsigned int this_comp = _hb_glyph_info_get_lig_comp (&buffer->cur());
if (this_comp == 0) if (this_comp == 0)
this_comp = last_num_components; this_comp = last_num_components;
assert (components_so_far >= last_num_components);
unsigned int new_lig_comp = components_so_far - last_num_components + unsigned int new_lig_comp = components_so_far - last_num_components +
hb_min (this_comp, last_num_components); hb_min (this_comp, last_num_components);
_hb_glyph_info_set_lig_props_for_mark (&buffer->cur(), lig_id, new_lig_comp); _hb_glyph_info_set_lig_props_for_mark (&buffer->cur(), lig_id, new_lig_comp);
@ -1487,6 +1488,7 @@ static inline bool ligate_input (hb_ot_apply_context_t *c,
unsigned this_comp = _hb_glyph_info_get_lig_comp (&buffer->info[i]); unsigned this_comp = _hb_glyph_info_get_lig_comp (&buffer->info[i]);
if (!this_comp) break; if (!this_comp) break;
assert (components_so_far >= last_num_components);
unsigned new_lig_comp = components_so_far - last_num_components + unsigned new_lig_comp = components_so_far - last_num_components +
hb_min (this_comp, last_num_components); hb_min (this_comp, last_num_components);
_hb_glyph_info_set_lig_props_for_mark (&buffer->info[i], lig_id, new_lig_comp); _hb_glyph_info_set_lig_props_for_mark (&buffer->info[i], lig_id, new_lig_comp);
@ -1542,6 +1544,7 @@ static bool match_lookahead (hb_ot_apply_context_t *c,
TRACE_APPLY (nullptr); TRACE_APPLY (nullptr);
hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_context; hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_context;
assert (start_index >= 1);
skippy_iter.reset (start_index - 1); skippy_iter.reset (start_index - 1);
skippy_iter.set_match_func (match_func, match_data); skippy_iter.set_match_func (match_func, match_data);
skippy_iter.set_glyph_data (lookahead); skippy_iter.set_glyph_data (lookahead);
@ -1852,6 +1855,7 @@ static inline void apply_lookup (hb_ot_apply_context_t *c,
if (match_positions != match_positions_input) if (match_positions != match_positions_input)
hb_free (match_positions); hb_free (match_positions);
assert (end >= 0);
(void) buffer->move_to (end); (void) buffer->move_to (end);
} }

View File

@ -246,6 +246,18 @@ OT::GDEF::is_blocklisted (hb_blob_t *blob,
/* sha1sum: c26e41d567ed821bed997e937bc0c41435689e85 Padauk.ttf /* sha1sum: c26e41d567ed821bed997e937bc0c41435689e85 Padauk.ttf
* "Padauk Regular" "Version 2.5", see https://crbug.com/681813 */ * "Padauk Regular" "Version 2.5", see https://crbug.com/681813 */
case HB_CODEPOINT_ENCODE3 (1004, 59092, 14836): case HB_CODEPOINT_ENCODE3 (1004, 59092, 14836):
/* 88d2006ca084f04af2df1954ed714a8c71e8400f Courier New.ttf from macOS 15 */
case HB_CODEPOINT_ENCODE3 (588, 5078, 14418):
/* 608e3ebb6dd1aee521cff08eb07d500a2c59df68 Courier New Bold.ttf from macOS 15 */
case HB_CODEPOINT_ENCODE3 (588, 5078, 14238):
/* d13221044ff054efd78f1cd8631b853c3ce85676 cour.ttf from Windows 10 */
case HB_CODEPOINT_ENCODE3 (894, 17162, 33960):
/* 68ed4a22d8067fcf1622ac6f6e2f4d3a2e3ec394 courbd.ttf from Windows 10 */
case HB_CODEPOINT_ENCODE3 (894, 17154, 34472):
/* 4cdb0259c96b7fd7c103821bb8f08f7cc6b211d7 cour.ttf from Windows 8.1 */
case HB_CODEPOINT_ENCODE3 (816, 7868, 17052):
/* 920483d8a8ed37f7f0afdabbe7f679aece7c75d8 courbd.ttf from Windows 8.1 */
case HB_CODEPOINT_ENCODE3 (816, 7868, 17138):
return true; return true;
} }
return false; return false;

View File

@ -284,8 +284,8 @@ struct OS2
os2_prime->usWidthClass = width_class; os2_prime->usWidthClass = width_class;
} }
os2_prime->usFirstCharIndex = hb_min (0xFFFFu, c->plan->unicodes.get_min ()); os2_prime->usFirstCharIndex = hb_min (0xFFFFu, c->plan->os2_info.min_cmap_codepoint);
os2_prime->usLastCharIndex = hb_min (0xFFFFu, c->plan->unicodes.get_max ()); os2_prime->usLastCharIndex = hb_min (0xFFFFu, c->plan->os2_info.max_cmap_codepoint);
if (c->plan->flags & HB_SUBSET_FLAGS_NO_PRUNE_UNICODE_RANGES) if (c->plan->flags & HB_SUBSET_FLAGS_NO_PRUNE_UNICODE_RANGES)
return_trace (true); return_trace (true);

File diff suppressed because it is too large Load Diff

View File

@ -48,6 +48,7 @@
#define OT_CM I_Cat(CM) #define OT_CM I_Cat(CM)
#define OT_Symbol I_Cat(Symbol) #define OT_Symbol I_Cat(Symbol)
#define OT_CS I_Cat(CS) #define OT_CS I_Cat(CS)
#define OT_SMPst I_Cat(SMPst)
/* khmer */ /* khmer */
#define OT_VAbv K_Cat(VAbv) #define OT_VAbv K_Cat(VAbv)
#define OT_VBlw K_Cat(VBlw) #define OT_VBlw K_Cat(VBlw)
@ -94,7 +95,8 @@ static_assert (OT_VPst == M_Cat(VPst), "");
#define _OT_R OT_Ra /* 14 chars; Ra */ #define _OT_R OT_Ra /* 14 chars; Ra */
#define _OT_Rf OT_Repha /* 1 chars; Repha */ #define _OT_Rf OT_Repha /* 1 chars; Repha */
#define _OT_Rt OT_Robatic /* 3 chars; Robatic */ #define _OT_Rt OT_Robatic /* 3 chars; Robatic */
#define _OT_SM OT_SM /* 56 chars; SM */ #define _OT_SM OT_SM /* 50 chars; SM */
#define _OT_SP OT_SMPst /* 6 chars; SMPst */
#define _OT_S OT_Symbol /* 22 chars; Symbol */ #define _OT_S OT_Symbol /* 22 chars; Symbol */
#define _OT_V OT_V /* 172 chars; V */ #define _OT_V OT_V /* 172 chars; V */
#define _OT_VA OT_VAbv /* 18 chars; VAbv */ #define _OT_VA OT_VAbv /* 18 chars; VAbv */
@ -145,7 +147,7 @@ static const uint16_t indic_table[] = {
/* Latin-1 Supplement */ /* Latin-1 Supplement */
/* 00B0 */ _(X,X), _(X,X),_(SM,SM),_(SM,SM), _(X,X), _(X,X), _(X,X), _(X,X), /* 00B0 */ _(X,X), _(X,X),_(SP,SM),_(SP,SM), _(X,X), _(X,X), _(X,X), _(X,X),
/* 00B8 */ _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), /* 00B8 */ _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X),
/* 00C0 */ _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), /* 00C0 */ _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X),
/* 00C8 */ _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), /* 00C8 */ _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X),
@ -398,9 +400,9 @@ static const uint16_t indic_table[] = {
/* Superscripts and Subscripts */ /* Superscripts and Subscripts */
/* 2070 */ _(X,X), _(X,X), _(X,X), _(X,X),_(SM,SM), _(X,X), _(X,X), _(X,X), /* 2070 */ _(X,X), _(X,X), _(X,X), _(X,X),_(SP,SM), _(X,X), _(X,X), _(X,X),
/* 2078 */ _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), /* 2078 */ _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X), _(X,X),
/* 2080 */ _(X,X), _(X,X),_(SM,SM),_(SM,SM),_(SM,SM), _(X,X), _(X,X), _(X,X), /* 2080 */ _(X,X), _(X,X),_(SP,SM),_(SP,SM),_(SP,SM), _(X,X), _(X,X), _(X,X),
#define indic_offset_0x25f8u 1592 #define indic_offset_0x25f8u 1592
@ -540,6 +542,7 @@ hb_indic_get_categories (hb_codepoint_t u)
#undef _OT_Rf #undef _OT_Rf
#undef _OT_Rt #undef _OT_Rt
#undef _OT_SM #undef _OT_SM
#undef _OT_SP
#undef _OT_S #undef _OT_S
#undef _OT_V #undef _OT_V
#undef _OT_VA #undef _OT_VA

View File

@ -68,6 +68,7 @@ enum myanmar_syllable_type_t {
#define myanmar_syllable_machine_ex_PT 39u #define myanmar_syllable_machine_ex_PT 39u
#define myanmar_syllable_machine_ex_Ra 15u #define myanmar_syllable_machine_ex_Ra 15u
#define myanmar_syllable_machine_ex_SM 8u #define myanmar_syllable_machine_ex_SM 8u
#define myanmar_syllable_machine_ex_SMPst 57u
#define myanmar_syllable_machine_ex_VAbv 20u #define myanmar_syllable_machine_ex_VAbv 20u
#define myanmar_syllable_machine_ex_VBlw 21u #define myanmar_syllable_machine_ex_VBlw 21u
#define myanmar_syllable_machine_ex_VPre 22u #define myanmar_syllable_machine_ex_VPre 22u
@ -77,35 +78,35 @@ enum myanmar_syllable_type_t {
#define myanmar_syllable_machine_ex_ZWNJ 5u #define myanmar_syllable_machine_ex_ZWNJ 5u
#line 81 "hb-ot-shaper-myanmar-machine.hh" #line 82 "hb-ot-shaper-myanmar-machine.hh"
static const unsigned char _myanmar_syllable_machine_trans_keys[] = { static const unsigned char _myanmar_syllable_machine_trans_keys[] = {
1u, 41u, 3u, 41u, 5u, 39u, 5u, 8u, 3u, 41u, 3u, 39u, 3u, 39u, 5u, 39u, 1u, 57u, 3u, 57u, 5u, 57u, 5u, 57u, 3u, 57u, 5u, 57u, 3u, 57u, 3u, 57u,
5u, 39u, 3u, 39u, 3u, 39u, 3u, 41u, 5u, 39u, 1u, 15u, 3u, 39u, 3u, 39u, 3u, 57u, 3u, 57u, 3u, 57u, 5u, 57u, 1u, 15u, 3u, 57u, 3u, 57u, 3u, 57u,
3u, 40u, 3u, 39u, 3u, 41u, 3u, 41u, 3u, 39u, 3u, 41u, 3u, 41u, 3u, 41u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u,
3u, 41u, 3u, 41u, 5u, 39u, 5u, 8u, 3u, 41u, 3u, 39u, 3u, 39u, 5u, 39u, 3u, 57u, 5u, 57u, 5u, 57u, 3u, 57u, 5u, 57u, 3u, 57u, 3u, 57u, 3u, 57u,
5u, 39u, 3u, 39u, 3u, 39u, 3u, 41u, 5u, 39u, 1u, 15u, 3u, 41u, 3u, 39u, 3u, 57u, 3u, 57u, 5u, 57u, 1u, 15u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u,
3u, 39u, 3u, 40u, 3u, 39u, 3u, 41u, 3u, 41u, 3u, 39u, 3u, 41u, 3u, 41u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u,
3u, 41u, 3u, 41u, 3u, 41u, 3u, 41u, 3u, 41u, 1u, 41u, 1u, 15u, 0 3u, 57u, 3u, 57u, 3u, 57u, 1u, 57u, 1u, 15u, 0
}; };
static const char _myanmar_syllable_machine_key_spans[] = { static const char _myanmar_syllable_machine_key_spans[] = {
41, 39, 35, 4, 39, 37, 37, 35, 57, 55, 53, 53, 55, 53, 55, 55,
35, 37, 37, 39, 35, 15, 37, 37, 55, 55, 55, 53, 15, 55, 55, 55,
38, 37, 39, 39, 37, 39, 39, 39, 55, 55, 55, 55, 55, 55, 55, 55,
39, 39, 35, 4, 39, 37, 37, 35, 55, 53, 53, 55, 53, 55, 55, 55,
35, 37, 37, 39, 35, 15, 39, 37, 55, 55, 53, 15, 55, 55, 55, 55,
37, 38, 37, 39, 39, 37, 39, 39, 55, 55, 55, 55, 55, 55, 55, 55,
39, 39, 39, 39, 39, 41, 15 55, 55, 55, 57, 15
}; };
static const short _myanmar_syllable_machine_index_offsets[] = { static const short _myanmar_syllable_machine_index_offsets[] = {
0, 42, 82, 118, 123, 163, 201, 239, 0, 58, 114, 168, 222, 278, 332, 388,
275, 311, 349, 387, 427, 463, 479, 517, 444, 500, 556, 612, 666, 682, 738, 794,
555, 594, 632, 672, 712, 750, 790, 830, 850, 906, 962, 1018, 1074, 1130, 1186, 1242,
870, 910, 950, 986, 991, 1031, 1069, 1107, 1298, 1354, 1408, 1462, 1518, 1572, 1628, 1684,
1143, 1179, 1217, 1255, 1295, 1331, 1347, 1387, 1740, 1796, 1852, 1906, 1922, 1978, 2034, 2090,
1425, 1463, 1502, 1540, 1580, 1620, 1658, 1698, 2146, 2202, 2258, 2314, 2370, 2426, 2482, 2538,
1738, 1778, 1818, 1858, 1898, 1938, 1980 2594, 2650, 2706, 2762, 2820
}; };
static const char _myanmar_syllable_machine_indicies[] = { static const char _myanmar_syllable_machine_indicies[] = {
@ -114,273 +115,378 @@ static const char _myanmar_syllable_machine_indicies[] = {
0, 8, 0, 9, 10, 11, 12, 0, 0, 8, 0, 9, 10, 11, 12, 0,
0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 13,
0, 0, 14, 15, 16, 17, 18, 19, 0, 0, 14, 15, 16, 17, 18, 19,
20, 0, 22, 23, 24, 24, 21, 25, 20, 0, 0, 0, 0, 0, 0, 0,
26, 21, 21, 21, 21, 21, 21, 21, 0, 0, 0, 0, 0, 0, 0, 0,
21, 21, 21, 27, 28, 29, 30, 21, 21, 0, 23, 24, 25, 25, 22, 26,
21, 21, 21, 21, 21, 21, 21, 31, 27, 22, 22, 22, 22, 22, 22, 22,
21, 21, 32, 33, 34, 35, 36, 37, 22, 22, 22, 28, 29, 30, 31, 22,
38, 21, 24, 24, 21, 25, 21, 21, 22, 22, 22, 22, 22, 22, 22, 32,
21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 33, 34, 35, 36, 37, 38,
21, 21, 21, 21, 30, 21, 21, 21, 39, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 39, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 36, 21, 24, 24, 26, 22, 25, 25, 22, 26, 22, 22,
21, 25, 21, 22, 21, 24, 24, 21, 22, 22, 22, 22, 22, 22, 22, 22,
25, 26, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 31, 22, 22, 22,
21, 21, 21, 21, 40, 21, 21, 30, 22, 22, 22, 22, 22, 40, 22, 22,
21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 37, 22, 22, 22,
41, 21, 21, 42, 21, 21, 21, 36, 22, 22, 22, 22, 22, 22, 22, 22,
21, 41, 21, 22, 21, 24, 24, 21, 22, 22, 22, 22, 22, 22, 26, 22,
25, 26, 21, 21, 21, 21, 21, 21, 25, 25, 22, 26, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 30, 22, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 36, 22, 22, 22, 22, 22, 22, 22, 22,
21, 43, 21, 24, 24, 21, 25, 36, 22, 22, 37, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 26, 22, 41, 22,
21, 21, 21, 21, 21, 21, 44, 21, 25, 25, 22, 26, 37, 22, 22, 22,
21, 21, 21, 21, 21, 36, 21, 24, 22, 22, 22, 22, 22, 22, 22, 22,
24, 21, 25, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 26, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 37, 22, 22, 22, 22, 22,
21, 21, 44, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 36, 21, 24, 24, 21, 25, 21, 22, 22, 22, 22, 26, 22, 25, 25,
21, 21, 21, 21, 21, 21, 21, 21, 22, 26, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 36, 21, 22, 22, 26, 22, 22, 22, 22, 22, 22,
21, 24, 24, 21, 25, 26, 21, 21, 37, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
40, 21, 21, 30, 21, 21, 21, 21, 22, 22, 26, 22, 23, 22, 25, 25,
21, 21, 21, 21, 21, 21, 21, 21, 22, 26, 27, 22, 22, 22, 22, 22,
21, 21, 21, 36, 21, 22, 21, 24, 22, 22, 22, 22, 22, 42, 22, 22,
24, 21, 25, 26, 21, 21, 21, 21, 31, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 40, 21, 22, 43, 22, 22, 44, 22, 22, 22,
21, 30, 21, 21, 21, 21, 21, 21, 37, 22, 43, 22, 22, 22, 22, 22,
21, 21, 41, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 36, 21, 22, 21, 24, 24, 21, 22, 22, 26, 22, 23, 22, 25, 25,
25, 26, 21, 21, 21, 21, 21, 21, 22, 26, 27, 22, 22, 22, 22, 22,
21, 21, 21, 21, 40, 21, 21, 30, 22, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 21, 31, 22, 22, 22, 22, 22, 22, 22,
41, 21, 21, 21, 21, 21, 21, 36, 22, 22, 22, 22, 22, 22, 22, 22,
21, 41, 21, 24, 24, 21, 25, 21, 37, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 30, 21, 21, 22, 22, 26, 22, 23, 22, 25, 25,
21, 21, 21, 21, 21, 21, 21, 21, 22, 26, 27, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 36, 21, 1, 22, 22, 22, 22, 22, 42, 22, 22,
1, 21, 21, 21, 21, 21, 21, 21, 31, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 1, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22,
21, 24, 24, 21, 25, 26, 21, 21, 37, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
27, 28, 21, 30, 21, 21, 21, 21, 22, 22, 26, 22, 23, 22, 25, 25,
21, 21, 21, 21, 21, 21, 21, 21, 22, 26, 27, 22, 22, 22, 22, 22,
21, 21, 21, 36, 21, 22, 21, 24, 22, 22, 22, 22, 22, 42, 22, 22,
24, 21, 25, 26, 21, 21, 21, 21, 31, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 28, 22, 43, 22, 22, 22, 22, 22, 22,
21, 30, 21, 21, 21, 21, 21, 21, 37, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 36, 21, 22, 21, 24, 24, 21, 22, 22, 26, 22, 23, 22, 25, 25,
25, 26, 21, 21, 21, 21, 21, 21, 22, 26, 27, 22, 22, 22, 22, 22,
21, 21, 21, 21, 27, 28, 29, 30, 22, 22, 22, 22, 22, 42, 22, 22,
21, 21, 21, 21, 21, 21, 21, 21, 31, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 36, 22, 43, 22, 22, 22, 22, 22, 22,
45, 21, 22, 21, 24, 24, 21, 25, 37, 22, 43, 22, 22, 22, 22, 22,
26, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 27, 28, 29, 30, 21, 22, 22, 26, 22, 25, 25, 22, 26,
21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 36, 21, 22, 22, 22, 22, 22, 22, 31, 22,
22, 21, 24, 24, 21, 25, 26, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 37, 22,
21, 27, 28, 29, 30, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 31, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
32, 33, 34, 35, 36, 21, 38, 21, 26, 22, 1, 1, 22, 22, 22, 22,
22, 21, 24, 24, 21, 25, 26, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 21, 1, 22, 23, 22, 25, 25, 22, 26,
21, 27, 28, 29, 30, 21, 21, 21, 27, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 45, 21, 21, 22, 22, 22, 28, 29, 22, 31, 22,
21, 21, 21, 21, 36, 21, 38, 21, 22, 22, 22, 22, 22, 22, 22, 22,
22, 21, 24, 24, 21, 25, 26, 21, 22, 22, 22, 22, 22, 22, 37, 22,
21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 27, 28, 29, 30, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 45, 21, 21, 26, 22, 23, 22, 25, 25, 22, 26,
21, 21, 21, 21, 36, 21, 22, 21, 27, 22, 22, 22, 22, 22, 22, 22,
24, 24, 21, 25, 26, 21, 21, 21, 22, 22, 22, 22, 29, 22, 31, 22,
21, 21, 21, 21, 21, 21, 21, 27, 22, 22, 22, 22, 22, 22, 22, 22,
28, 29, 30, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 37, 22,
21, 21, 21, 21, 21, 21, 32, 21, 22, 22, 22, 22, 22, 22, 22, 22,
34, 21, 36, 21, 38, 21, 22, 21, 22, 22, 22, 22, 22, 22, 22, 22,
24, 24, 21, 25, 26, 21, 21, 21, 26, 22, 23, 22, 25, 25, 22, 26,
21, 21, 21, 21, 21, 21, 21, 27, 27, 22, 22, 22, 22, 22, 22, 22,
28, 29, 30, 21, 21, 21, 21, 21, 22, 22, 22, 28, 29, 30, 31, 22,
21, 21, 21, 45, 21, 21, 32, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 21, 36, 21, 38, 21, 22, 21, 22, 22, 22, 22, 22, 22, 37, 45,
24, 24, 21, 25, 26, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 27, 22, 22, 22, 22, 22, 22, 22, 22,
28, 29, 30, 21, 21, 21, 21, 21, 26, 22, 23, 22, 25, 25, 22, 26,
21, 21, 21, 46, 21, 21, 32, 33, 27, 22, 22, 22, 22, 22, 22, 22,
34, 21, 36, 21, 38, 21, 22, 21, 22, 22, 22, 28, 29, 30, 31, 22,
24, 24, 21, 25, 26, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 27, 22, 22, 22, 22, 22, 22, 37, 22,
28, 29, 30, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 32, 33, 22, 22, 22, 22, 22, 22, 22, 22,
34, 21, 36, 21, 38, 21, 22, 23, 26, 22, 23, 22, 25, 25, 22, 26,
24, 24, 21, 25, 26, 21, 21, 21, 27, 22, 22, 22, 22, 22, 22, 22,
21, 21, 21, 21, 21, 21, 21, 27, 22, 22, 22, 28, 29, 30, 31, 22,
28, 29, 30, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 32,
21, 21, 21, 31, 21, 21, 32, 33, 22, 22, 33, 34, 35, 36, 37, 22,
34, 35, 36, 21, 38, 21, 48, 48, 39, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22,
26, 22, 23, 22, 25, 25, 22, 26,
27, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 28, 29, 30, 31, 22,
22, 22, 22, 22, 22, 22, 22, 45,
22, 22, 22, 22, 22, 22, 37, 22,
39, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22,
26, 22, 23, 22, 25, 25, 22, 26,
27, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 28, 29, 30, 31, 22,
22, 22, 22, 22, 22, 22, 22, 45,
22, 22, 22, 22, 22, 22, 37, 22,
22, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22,
26, 22, 23, 22, 25, 25, 22, 26,
27, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 28, 29, 30, 31, 22,
22, 22, 22, 22, 22, 22, 22, 22,
22, 22, 33, 22, 35, 22, 37, 22,
39, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22,
26, 22, 23, 22, 25, 25, 22, 26,
27, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 28, 29, 30, 31, 22,
22, 22, 22, 22, 22, 22, 22, 45,
22, 22, 33, 22, 22, 22, 37, 22,
39, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22,
26, 22, 23, 22, 25, 25, 22, 26,
27, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 28, 29, 30, 31, 22,
22, 22, 22, 22, 22, 22, 22, 46,
22, 22, 33, 34, 35, 22, 37, 22,
39, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22,
26, 22, 23, 22, 25, 25, 22, 26,
27, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 28, 29, 30, 31, 22,
22, 22, 22, 22, 22, 22, 22, 22,
22, 22, 33, 34, 35, 22, 37, 22,
39, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22,
26, 22, 23, 24, 25, 25, 22, 26,
27, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 28, 29, 30, 31, 22,
22, 22, 22, 22, 22, 22, 22, 32,
22, 22, 33, 34, 35, 36, 37, 22,
39, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22,
26, 22, 48, 48, 47, 5, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 12, 47, 47, 47,
47, 47, 47, 47, 47, 49, 47, 47,
47, 47, 47, 47, 18, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 5, 47,
48, 48, 50, 5, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 18, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 5, 50, 51, 47,
48, 48, 47, 5, 18, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 5, 47, 47, 47, 47,
47, 47, 18, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 5, 47, 48, 48,
47, 5, 47, 47, 47, 47, 47, 47, 47, 5, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
12, 47, 47, 47, 47, 47, 47, 47,
47, 49, 47, 47, 47, 47, 47, 47,
18, 47, 48, 48, 47, 5, 47, 2,
47, 48, 48, 47, 5, 6, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
50, 47, 47, 12, 47, 47, 47, 47, 47, 5, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 51, 47, 47, 52, 18, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 18, 47, 51, 47, 2,
47, 48, 48, 47, 5, 6, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 12, 47, 47, 47, 47, 47, 47, 5, 47, 2, 47, 48, 48,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 18, 47, 53, 47, 48,
48, 47, 5, 18, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 54, 47, 47, 47, 47, 47,
47, 18, 47, 48, 48, 47, 5, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 54, 47,
47, 47, 47, 47, 47, 18, 47, 48,
48, 47, 5, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 18, 47, 2, 47, 48, 48, 47,
5, 6, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 50, 47, 47, 12,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 18,
47, 2, 47, 48, 48, 47, 5, 6,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 50, 47, 47, 12, 47, 47,
47, 47, 47, 47, 47, 47, 51, 47,
47, 47, 47, 47, 47, 18, 47, 2,
47, 48, 48, 47, 5, 6, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
50, 47, 47, 12, 47, 47, 47, 47,
47, 47, 47, 47, 51, 47, 47, 47,
47, 47, 47, 18, 47, 51, 47, 48,
48, 47, 5, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 12, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 18, 47, 55, 55, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 55, 47, 2, 3, 48, 48, 47,
5, 6, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 9, 10, 11, 12,
47, 47, 47, 47, 47, 47, 47, 47,
13, 47, 47, 14, 15, 16, 17, 18,
19, 20, 47, 2, 47, 48, 48, 47,
5, 6, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 9, 10, 47, 12,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 18,
47, 2, 47, 48, 48, 47, 5, 6,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 10, 47, 12, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 18, 47, 2,
47, 48, 48, 47, 5, 6, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
9, 10, 11, 12, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 18, 56, 47, 2, 47,
48, 48, 47, 5, 6, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 9,
10, 11, 12, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 18, 47, 2, 47, 48, 48,
47, 5, 6, 47, 47, 47, 47, 47, 47, 5, 6, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 9, 10, 11, 47, 47, 47, 47, 47, 52, 47, 47,
12, 47, 47, 47, 47, 47, 47, 47, 12, 47, 47, 47, 47, 47, 47, 47,
47, 13, 47, 47, 14, 15, 16, 17, 47, 53, 47, 47, 54, 47, 47, 47,
18, 47, 20, 47, 2, 47, 48, 48, 18, 47, 53, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 5, 47, 2, 47, 48, 48,
47, 5, 6, 47, 47, 47, 47, 47, 47, 5, 6, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 9, 10, 11, 47, 47, 47, 47, 47, 47, 47, 47,
12, 47, 47, 47, 47, 47, 47, 47, 12, 47, 47, 47, 47, 47, 47, 47,
47, 56, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
18, 47, 20, 47, 2, 47, 48, 48, 18, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 5, 47, 2, 47, 48, 48,
47, 5, 6, 47, 47, 47, 47, 47, 47, 5, 6, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 9, 10, 11, 47, 47, 47, 47, 47, 52, 47, 47,
12, 47, 47, 47, 47, 47, 47, 47, 12, 47, 47, 47, 47, 47, 47, 47,
47, 56, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
18, 47, 2, 47, 48, 48, 47, 5, 18, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 5, 47, 2, 47, 48, 48,
47, 5, 6, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 52, 47, 47,
12, 47, 47, 47, 47, 47, 47, 47,
47, 53, 47, 47, 47, 47, 47, 47,
18, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 5, 47, 2, 47, 48, 48,
47, 5, 6, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 52, 47, 47,
12, 47, 47, 47, 47, 47, 47, 47,
47, 53, 47, 47, 47, 47, 47, 47,
18, 47, 53, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 5, 47, 48, 48, 47, 5,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 12, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 18, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
5, 47, 55, 55, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
55, 47, 2, 3, 48, 48, 47, 5,
6, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 9, 10, 11, 12, 47,
47, 47, 47, 47, 47, 47, 47, 13,
47, 47, 14, 15, 16, 17, 18, 19,
20, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
5, 47, 2, 47, 48, 48, 47, 5,
6, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 9, 10, 47, 12, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 18, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
5, 47, 2, 47, 48, 48, 47, 5,
6, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 10, 47, 12, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 18, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
5, 47, 2, 47, 48, 48, 47, 5,
6, 47, 47, 47, 47, 47, 47, 47, 6, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 9, 10, 11, 12, 47, 47, 47, 47, 9, 10, 11, 12, 47,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 14, 47, 16, 47, 18, 47, 47, 47, 47, 47, 47, 47, 18, 56,
20, 47, 2, 47, 48, 48, 47, 5, 47, 47, 47, 47, 47, 47, 47, 47,
6, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 9, 10, 11, 12, 47, 5, 47, 2, 47, 48, 48, 47, 5,
47, 47, 47, 47, 47, 47, 47, 56,
47, 47, 14, 47, 47, 47, 18, 47,
20, 47, 2, 47, 48, 48, 47, 5,
6, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 9, 10, 11, 12, 47,
47, 47, 47, 47, 47, 47, 47, 57,
47, 47, 14, 15, 16, 47, 18, 47,
20, 47, 2, 47, 48, 48, 47, 5,
6, 47, 47, 47, 47, 47, 47, 47, 6, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 9, 10, 11, 12, 47, 47, 47, 47, 9, 10, 11, 12, 47,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 14, 15, 16, 47, 18, 47, 47, 47, 47, 47, 47, 47, 18, 47,
20, 47, 2, 3, 48, 48, 47, 5, 47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
5, 47, 2, 47, 48, 48, 47, 5,
6, 47, 47, 47, 47, 47, 47, 47, 6, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 9, 10, 11, 12, 47, 47, 47, 47, 9, 10, 11, 12, 47,
47, 47, 47, 47, 47, 47, 47, 13, 47, 47, 47, 47, 47, 47, 47, 13,
47, 47, 14, 15, 16, 17, 18, 47, 47, 47, 14, 15, 16, 17, 18, 47,
20, 47, 22, 23, 24, 24, 21, 25, 20, 47, 47, 47, 47, 47, 47, 47,
26, 21, 21, 21, 21, 21, 21, 21, 47, 47, 47, 47, 47, 47, 47, 47,
21, 21, 21, 27, 28, 29, 30, 21, 5, 47, 2, 47, 48, 48, 47, 5,
21, 21, 21, 21, 21, 21, 21, 58, 6, 47, 47, 47, 47, 47, 47, 47,
21, 21, 32, 33, 34, 35, 36, 37, 47, 47, 47, 9, 10, 11, 12, 47,
38, 21, 22, 59, 24, 24, 21, 25, 47, 47, 47, 47, 47, 47, 47, 56,
26, 21, 21, 21, 21, 21, 21, 21, 47, 47, 47, 47, 47, 47, 18, 47,
21, 21, 21, 27, 28, 29, 30, 21, 20, 47, 47, 47, 47, 47, 47, 47,
21, 21, 21, 21, 21, 21, 21, 31, 47, 47, 47, 47, 47, 47, 47, 47,
21, 21, 32, 33, 34, 35, 36, 21, 5, 47, 2, 47, 48, 48, 47, 5,
38, 21, 1, 1, 2, 3, 48, 48, 6, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 9, 10, 11, 12, 47,
47, 47, 47, 47, 47, 47, 47, 56,
47, 47, 47, 47, 47, 47, 18, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
5, 47, 2, 47, 48, 48, 47, 5,
6, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 9, 10, 11, 12, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 14, 47, 16, 47, 18, 47,
20, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
5, 47, 2, 47, 48, 48, 47, 5,
6, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 9, 10, 11, 12, 47,
47, 47, 47, 47, 47, 47, 47, 56,
47, 47, 14, 47, 47, 47, 18, 47,
20, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
5, 47, 2, 47, 48, 48, 47, 5,
6, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 9, 10, 11, 12, 47,
47, 47, 47, 47, 47, 47, 47, 57,
47, 47, 14, 15, 16, 47, 18, 47,
20, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
5, 47, 2, 47, 48, 48, 47, 5,
6, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 9, 10, 11, 12, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 14, 15, 16, 47, 18, 47,
20, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
5, 47, 2, 3, 48, 48, 47, 5,
6, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 9, 10, 11, 12, 47,
47, 47, 47, 47, 47, 47, 47, 13,
47, 47, 14, 15, 16, 17, 18, 47,
20, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
5, 47, 23, 24, 25, 25, 22, 26,
27, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 28, 29, 30, 31, 22,
22, 22, 22, 22, 22, 22, 22, 58,
22, 22, 33, 34, 35, 36, 37, 38,
39, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22,
26, 22, 23, 59, 25, 25, 22, 26,
27, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 28, 29, 30, 31, 22,
22, 22, 22, 22, 22, 22, 22, 32,
22, 22, 33, 34, 35, 36, 37, 22,
39, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22,
26, 22, 1, 1, 2, 3, 48, 48,
47, 5, 6, 1, 1, 47, 47, 47, 47, 5, 6, 1, 1, 47, 47, 47,
1, 47, 47, 47, 47, 9, 10, 11, 1, 47, 47, 47, 47, 9, 10, 11,
12, 47, 47, 47, 47, 47, 47, 47, 12, 47, 47, 47, 47, 47, 47, 47,
47, 13, 47, 47, 14, 15, 16, 17, 47, 13, 47, 47, 14, 15, 16, 17,
18, 19, 20, 47, 1, 1, 60, 60, 18, 19, 20, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 5, 47, 1, 1, 60, 60,
60, 60, 60, 60, 60, 1, 1, 60, 60, 60, 60, 60, 60, 1, 1, 60,
60, 60, 1, 60, 0 60, 60, 1, 60, 0
}; };
static const char _myanmar_syllable_machine_trans_targs[] = { static const char _myanmar_syllable_machine_trans_targs[] = {
0, 1, 26, 37, 0, 27, 29, 51, 0, 1, 25, 35, 0, 26, 30, 49,
54, 39, 40, 41, 28, 43, 44, 46, 52, 37, 38, 39, 29, 41, 42, 44,
47, 48, 30, 50, 45, 0, 2, 13, 45, 46, 27, 48, 43, 26, 0, 2,
0, 3, 5, 14, 15, 16, 4, 18, 12, 0, 3, 7, 13, 14, 15, 6,
19, 21, 22, 23, 6, 25, 20, 12, 17, 18, 20, 21, 22, 4, 24, 19,
9, 10, 11, 7, 8, 17, 24, 0, 11, 5, 8, 9, 10, 16, 23, 0,
0, 36, 33, 34, 35, 31, 32, 38, 0, 34, 0, 28, 31, 32, 33, 36,
42, 49, 52, 53, 0 40, 47, 50, 51, 0
}; };
static const char _myanmar_syllable_machine_trans_actions[] = { static const char _myanmar_syllable_machine_trans_actions[] = {
3, 0, 0, 0, 4, 0, 0, 0, 3, 0, 0, 0, 4, 5, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 6, 7, 0,
6, 0, 0, 0, 0, 0, 0, 0, 0, 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, 7, 0, 0, 0, 0, 0, 0, 0, 9,
8, 0, 0, 0, 0, 0, 0, 0, 10, 0, 11, 0, 0, 0, 0, 0,
0, 0, 0, 0, 9 0, 0, 0, 0, 12
}; };
static const char _myanmar_syllable_machine_to_state_actions[] = { static const char _myanmar_syllable_machine_to_state_actions[] = {
@ -390,7 +496,7 @@ static const char _myanmar_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
}; };
static const char _myanmar_syllable_machine_from_state_actions[] = { static const char _myanmar_syllable_machine_from_state_actions[] = {
@ -400,17 +506,17 @@ static const char _myanmar_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
}; };
static const short _myanmar_syllable_machine_eof_trans[] = { static const short _myanmar_syllable_machine_eof_trans[] = {
0, 22, 22, 22, 22, 22, 22, 22, 0, 23, 23, 23, 23, 23, 23, 23,
22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,
22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,
22, 22, 48, 48, 48, 48, 48, 48, 23, 48, 51, 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, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 22, 22, 48, 61 48, 23, 23, 48, 61
}; };
static const int myanmar_syllable_machine_start = 0; static const int myanmar_syllable_machine_start = 0;
@ -424,7 +530,7 @@ static const int myanmar_syllable_machine_en_main = 0;
#line 117 "hb-ot-shaper-myanmar-machine.rl" #line 118 "hb-ot-shaper-myanmar-machine.rl"
#define found_syllable(syllable_type) \ #define found_syllable(syllable_type) \
@ -443,7 +549,7 @@ find_syllables_myanmar (hb_buffer_t *buffer)
int cs; int cs;
hb_glyph_info_t *info = buffer->info; hb_glyph_info_t *info = buffer->info;
#line 447 "hb-ot-shaper-myanmar-machine.hh" #line 553 "hb-ot-shaper-myanmar-machine.hh"
{ {
cs = myanmar_syllable_machine_start; cs = myanmar_syllable_machine_start;
ts = 0; ts = 0;
@ -451,7 +557,7 @@ find_syllables_myanmar (hb_buffer_t *buffer)
act = 0; act = 0;
} }
#line 137 "hb-ot-shaper-myanmar-machine.rl" #line 138 "hb-ot-shaper-myanmar-machine.rl"
p = 0; p = 0;
@ -459,7 +565,7 @@ find_syllables_myanmar (hb_buffer_t *buffer)
unsigned int syllable_serial = 1; unsigned int syllable_serial = 1;
#line 463 "hb-ot-shaper-myanmar-machine.hh" #line 569 "hb-ot-shaper-myanmar-machine.hh"
{ {
int _slen; int _slen;
int _trans; int _trans;
@ -473,7 +579,7 @@ _resume:
#line 1 "NONE" #line 1 "NONE"
{ts = p;} {ts = p;}
break; break;
#line 477 "hb-ot-shaper-myanmar-machine.hh" #line 583 "hb-ot-shaper-myanmar-machine.hh"
} }
_keys = _myanmar_syllable_machine_trans_keys + (cs<<1); _keys = _myanmar_syllable_machine_trans_keys + (cs<<1);
@ -491,35 +597,59 @@ _eof_trans:
goto _again; goto _again;
switch ( _myanmar_syllable_machine_trans_actions[_trans] ) { switch ( _myanmar_syllable_machine_trans_actions[_trans] ) {
case 6: case 8:
#line 110 "hb-ot-shaper-myanmar-machine.rl" #line 111 "hb-ot-shaper-myanmar-machine.rl"
{te = p+1;{ found_syllable (myanmar_consonant_syllable); }} {te = p+1;{ found_syllable (myanmar_consonant_syllable); }}
break; break;
case 4: case 4:
#line 111 "hb-ot-shaper-myanmar-machine.rl" #line 112 "hb-ot-shaper-myanmar-machine.rl"
{te = p+1;{ found_syllable (myanmar_non_myanmar_cluster); }} {te = p+1;{ found_syllable (myanmar_non_myanmar_cluster); }}
break; break;
case 8: case 10:
#line 112 "hb-ot-shaper-myanmar-machine.rl" #line 113 "hb-ot-shaper-myanmar-machine.rl"
{te = p+1;{ found_syllable (myanmar_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }} {te = p+1;{ found_syllable (myanmar_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }}
break; break;
case 3: case 3:
#line 113 "hb-ot-shaper-myanmar-machine.rl" #line 114 "hb-ot-shaper-myanmar-machine.rl"
{te = p+1;{ found_syllable (myanmar_non_myanmar_cluster); }} {te = p+1;{ found_syllable (myanmar_non_myanmar_cluster); }}
break; break;
case 5:
#line 110 "hb-ot-shaper-myanmar-machine.rl"
{te = p;p--;{ found_syllable (myanmar_consonant_syllable); }}
break;
case 7: case 7:
#line 112 "hb-ot-shaper-myanmar-machine.rl" #line 111 "hb-ot-shaper-myanmar-machine.rl"
{te = p;p--;{ found_syllable (myanmar_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }} {te = p;p--;{ found_syllable (myanmar_consonant_syllable); }}
break; break;
case 9: case 9:
#line 113 "hb-ot-shaper-myanmar-machine.rl" #line 113 "hb-ot-shaper-myanmar-machine.rl"
{te = p;p--;{ found_syllable (myanmar_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }}
break;
case 12:
#line 114 "hb-ot-shaper-myanmar-machine.rl"
{te = p;p--;{ found_syllable (myanmar_non_myanmar_cluster); }} {te = p;p--;{ found_syllable (myanmar_non_myanmar_cluster); }}
break; break;
#line 523 "hb-ot-shaper-myanmar-machine.hh" case 11:
#line 1 "NONE"
{ switch( act ) {
case 2:
{{p = ((te))-1;} found_syllable (myanmar_non_myanmar_cluster); }
break;
case 3:
{{p = ((te))-1;} found_syllable (myanmar_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }
break;
}
}
break;
case 6:
#line 1 "NONE"
{te = p+1;}
#line 112 "hb-ot-shaper-myanmar-machine.rl"
{act = 2;}
break;
case 5:
#line 1 "NONE"
{te = p+1;}
#line 113 "hb-ot-shaper-myanmar-machine.rl"
{act = 3;}
break;
#line 653 "hb-ot-shaper-myanmar-machine.hh"
} }
_again: _again:
@ -528,7 +658,7 @@ _again:
#line 1 "NONE" #line 1 "NONE"
{ts = 0;} {ts = 0;}
break; break;
#line 532 "hb-ot-shaper-myanmar-machine.hh" #line 662 "hb-ot-shaper-myanmar-machine.hh"
} }
if ( ++p != pe ) if ( ++p != pe )
@ -544,7 +674,7 @@ _again:
} }
#line 145 "hb-ot-shaper-myanmar-machine.rl" #line 146 "hb-ot-shaper-myanmar-machine.rl"
} }

File diff suppressed because it is too large Load Diff

View File

@ -6,8 +6,8 @@
* *
* on files with these headers: * on files with these headers:
* *
* <meta name="updated_at" content="2024-07-07 12:57 AM" /> * <meta name="updated_at" content="2024-12-05 07:13 PM" />
* File-Date: 2024-06-14 * File-Date: 2024-11-19
*/ */
#ifndef HB_OT_TAG_TABLE_HH #ifndef HB_OT_TAG_TABLE_HH
@ -830,6 +830,7 @@ static const LangTag ot_languages3[] = {
{HB_TAG('k','f','x',' '), HB_TAG('K','U','L',' ')}, /* Kullu Pahari -> Kulvi */ {HB_TAG('k','f','x',' '), HB_TAG('K','U','L',' ')}, /* Kullu Pahari -> Kulvi */
{HB_TAG('k','f','y',' '), HB_TAG('K','M','N',' ')}, /* Kumaoni */ {HB_TAG('k','f','y',' '), HB_TAG('K','M','N',' ')}, /* Kumaoni */
{HB_TAG('k','g','e',' '), HB_TAG_NONE }, /* Komering != Khutsuri Georgian */ {HB_TAG('k','g','e',' '), HB_TAG_NONE }, /* Komering != Khutsuri Georgian */
/*{HB_TAG('k','g','f',' '), HB_TAG('K','G','F',' ')},*/ /* Kube */
{HB_TAG('k','h','a',' '), HB_TAG('K','S','I',' ')}, /* Khasi */ {HB_TAG('k','h','a',' '), HB_TAG('K','S','I',' ')}, /* Khasi */
{HB_TAG('k','h','b',' '), HB_TAG('X','B','D',' ')}, /* Lü */ {HB_TAG('k','h','b',' '), HB_TAG('X','B','D',' ')}, /* Lü */
{HB_TAG('k','h','k',' '), HB_TAG('M','N','G',' ')}, /* Halh Mongolian -> Mongolian */ {HB_TAG('k','h','k',' '), HB_TAG('M','N','G',' ')}, /* Halh Mongolian -> Mongolian */
@ -855,6 +856,7 @@ static const LangTag ot_languages3[] = {
{HB_TAG('k','l','m',' '), HB_TAG_NONE }, /* Migum != Kalmyk */ {HB_TAG('k','l','m',' '), HB_TAG_NONE }, /* Migum != Kalmyk */
{HB_TAG('k','l','n',' '), HB_TAG('K','A','L',' ')}, /* Kalenjin [macrolanguage] */ {HB_TAG('k','l','n',' '), HB_TAG('K','A','L',' ')}, /* Kalenjin [macrolanguage] */
{HB_TAG('k','m','b',' '), HB_TAG('M','B','N',' ')}, /* Kimbundu -> Mbundu */ {HB_TAG('k','m','b',' '), HB_TAG('M','B','N',' ')}, /* Kimbundu -> Mbundu */
/*{HB_TAG('k','m','g',' '), HB_TAG('K','M','G',' ')},*/ /* Kâte */
{HB_TAG('k','m','n',' '), HB_TAG_NONE }, /* Awtuw != Kumaoni */ {HB_TAG('k','m','n',' '), HB_TAG_NONE }, /* Awtuw != Kumaoni */
{HB_TAG('k','m','o',' '), HB_TAG_NONE }, /* Kwoma != Komo */ {HB_TAG('k','m','o',' '), HB_TAG_NONE }, /* Kwoma != Komo */
{HB_TAG('k','m','r',' '), HB_TAG('K','U','R',' ')}, /* Northern Kurdish -> Kurdish */ {HB_TAG('k','m','r',' '), HB_TAG('K','U','R',' ')}, /* Northern Kurdish -> Kurdish */
@ -898,6 +900,7 @@ static const LangTag ot_languages3[] = {
{HB_TAG('k','s','i',' '), HB_TAG_NONE }, /* Krisa != Khasi */ {HB_TAG('k','s','i',' '), HB_TAG_NONE }, /* Krisa != Khasi */
{HB_TAG('k','s','m',' '), HB_TAG_NONE }, /* Kumba != Kildin Sami */ {HB_TAG('k','s','m',' '), HB_TAG_NONE }, /* Kumba != Kildin Sami */
{HB_TAG('k','s','s',' '), HB_TAG('K','I','S',' ')}, /* Southern Kisi -> Kisii */ {HB_TAG('k','s','s',' '), HB_TAG('K','I','S',' ')}, /* Southern Kisi -> Kisii */
/*{HB_TAG('k','s','u',' '), HB_TAG('K','S','U',' ')},*/ /* Khamyang */
{HB_TAG('k','s','w',' '), HB_TAG('K','S','W',' ')}, /* Sgaw Karen */ {HB_TAG('k','s','w',' '), HB_TAG('K','S','W',' ')}, /* Sgaw Karen */
{HB_TAG('k','s','w',' '), HB_TAG('K','R','N',' ')}, /* S'gaw Karen -> Karen */ {HB_TAG('k','s','w',' '), HB_TAG('K','R','N',' ')}, /* S'gaw Karen -> Karen */
{HB_TAG('k','t','b',' '), HB_TAG('K','E','B',' ')}, /* Kambaata -> Kebena */ {HB_TAG('k','t','b',' '), HB_TAG('K','E','B',' ')}, /* Kambaata -> Kebena */
@ -911,6 +914,7 @@ static const LangTag ot_languages3[] = {
{HB_TAG('k','u','y',' '), HB_TAG_NONE }, /* Kuuku-Ya'u != Kuy */ {HB_TAG('k','u','y',' '), HB_TAG_NONE }, /* Kuuku-Ya'u != Kuy */
{HB_TAG('k','v','b',' '), HB_TAG('M','L','Y',' ')}, /* Kubu -> Malay */ {HB_TAG('k','v','b',' '), HB_TAG('M','L','Y',' ')}, /* Kubu -> Malay */
{HB_TAG('k','v','l',' '), HB_TAG('K','R','N',' ')}, /* Kayaw -> Karen */ {HB_TAG('k','v','l',' '), HB_TAG('K','R','N',' ')}, /* Kayaw -> Karen */
{HB_TAG('k','v','q',' '), HB_TAG('K','V','Q',' ')}, /* Geba Karen */
{HB_TAG('k','v','q',' '), HB_TAG('K','R','N',' ')}, /* Geba Karen -> Karen */ {HB_TAG('k','v','q',' '), HB_TAG('K','R','N',' ')}, /* Geba Karen -> Karen */
{HB_TAG('k','v','r',' '), HB_TAG('M','L','Y',' ')}, /* Kerinci -> Malay */ {HB_TAG('k','v','r',' '), HB_TAG('M','L','Y',' ')}, /* Kerinci -> Malay */
{HB_TAG('k','v','t',' '), HB_TAG('K','R','N',' ')}, /* Lahta Karen -> Karen */ {HB_TAG('k','v','t',' '), HB_TAG('K','R','N',' ')}, /* Lahta Karen -> Karen */
@ -1146,6 +1150,7 @@ static const LangTag ot_languages3[] = {
{HB_TAG('n','o','d',' '), HB_TAG('N','T','A',' ')}, /* Northern Thai -> Northern Tai */ {HB_TAG('n','o','d',' '), HB_TAG('N','T','A',' ')}, /* Northern Thai -> Northern Tai */
/*{HB_TAG('n','o','e',' '), HB_TAG('N','O','E',' ')},*/ /* Nimadi */ /*{HB_TAG('n','o','e',' '), HB_TAG('N','O','E',' ')},*/ /* Nimadi */
/*{HB_TAG('n','o','g',' '), HB_TAG('N','O','G',' ')},*/ /* Nogai */ /*{HB_TAG('n','o','g',' '), HB_TAG('N','O','G',' ')},*/ /* Nogai */
/*{HB_TAG('n','o','p',' '), HB_TAG('N','O','P',' ')},*/ /* Numanggang */
/*{HB_TAG('n','o','v',' '), HB_TAG('N','O','V',' ')},*/ /* Novial */ /*{HB_TAG('n','o','v',' '), HB_TAG('N','O','V',' ')},*/ /* Novial */
{HB_TAG('n','p','i',' '), HB_TAG('N','E','P',' ')}, /* Nepali */ {HB_TAG('n','p','i',' '), HB_TAG('N','E','P',' ')}, /* Nepali */
{HB_TAG('n','p','l',' '), HB_TAG('N','A','H',' ')}, /* Southeastern Puebla Nahuatl -> Nahuatl */ {HB_TAG('n','p','l',' '), HB_TAG('N','A','H',' ')}, /* Southeastern Puebla Nahuatl -> Nahuatl */
@ -1156,6 +1161,7 @@ static const LangTag ot_languages3[] = {
{HB_TAG('n','s','u',' '), HB_TAG('N','A','H',' ')}, /* Sierra Negra Nahuatl -> Nahuatl */ {HB_TAG('n','s','u',' '), HB_TAG('N','A','H',' ')}, /* Sierra Negra Nahuatl -> Nahuatl */
{HB_TAG('n','t','o',' '), HB_TAG_NONE }, /* Ntomba != Esperanto */ {HB_TAG('n','t','o',' '), HB_TAG_NONE }, /* Ntomba != Esperanto */
{HB_TAG('n','u','e',' '), HB_TAG('B','A','D','0')}, /* Ngundu -> Banda */ {HB_TAG('n','u','e',' '), HB_TAG('B','A','D','0')}, /* Ngundu -> Banda */
/*{HB_TAG('n','u','k',' '), HB_TAG('N','U','K',' ')},*/ /* Nuu-chah-nulth */
{HB_TAG('n','u','u',' '), HB_TAG('B','A','D','0')}, /* Ngbundu -> Banda */ {HB_TAG('n','u','u',' '), HB_TAG('B','A','D','0')}, /* Ngbundu -> Banda */
{HB_TAG('n','u','z',' '), HB_TAG('N','A','H',' ')}, /* Tlamacazapa Nahuatl -> Nahuatl */ {HB_TAG('n','u','z',' '), HB_TAG('N','A','H',' ')}, /* Tlamacazapa Nahuatl -> Nahuatl */
{HB_TAG('n','w','e',' '), HB_TAG('B','M','L',' ')}, /* Ngwe -> Bamileke */ {HB_TAG('n','w','e',' '), HB_TAG('B','M','L',' ')}, /* Ngwe -> Bamileke */
@ -1399,8 +1405,10 @@ static const LangTag ot_languages3[] = {
{HB_TAG('s','i','z',' '), HB_TAG('B','B','R',' ')}, /* Siwi -> Berber */ {HB_TAG('s','i','z',' '), HB_TAG('B','B','R',' ')}, /* Siwi -> Berber */
/*{HB_TAG('s','j','a',' '), HB_TAG('S','J','A',' ')},*/ /* Epena */ /*{HB_TAG('s','j','a',' '), HB_TAG('S','J','A',' ')},*/ /* Epena */
{HB_TAG('s','j','d',' '), HB_TAG('K','S','M',' ')}, /* Kildin Sami */ {HB_TAG('s','j','d',' '), HB_TAG('K','S','M',' ')}, /* Kildin Sami */
/*{HB_TAG('s','j','e',' '), HB_TAG('S','J','E',' ')},*/ /* Pite Sami */
{HB_TAG('s','j','o',' '), HB_TAG('S','I','B',' ')}, /* Xibe -> Sibe */ {HB_TAG('s','j','o',' '), HB_TAG('S','I','B',' ')}, /* Xibe -> Sibe */
{HB_TAG('s','j','s',' '), HB_TAG('B','B','R',' ')}, /* Senhaja De Srair -> Berber */ {HB_TAG('s','j','s',' '), HB_TAG('B','B','R',' ')}, /* Senhaja De Srair -> Berber */
/*{HB_TAG('s','j','u',' '), HB_TAG('S','J','U',' ')},*/ /* Ume Sami */
{HB_TAG('s','k','g',' '), HB_TAG('M','L','G',' ')}, /* Sakalava Malagasy -> Malagasy */ {HB_TAG('s','k','g',' '), HB_TAG('M','L','G',' ')}, /* Sakalava Malagasy -> Malagasy */
{HB_TAG('s','k','r',' '), HB_TAG('S','R','K',' ')}, /* Saraiki */ {HB_TAG('s','k','r',' '), HB_TAG('S','R','K',' ')}, /* Saraiki */
{HB_TAG('s','k','s',' '), HB_TAG_NONE }, /* Maia != Skolt Sami */ {HB_TAG('s','k','s',' '), HB_TAG_NONE }, /* Maia != Skolt Sami */
@ -1461,6 +1469,7 @@ static const LangTag ot_languages3[] = {
{HB_TAG('t','a','q',' '), HB_TAG('B','B','R',' ')}, /* Tamasheq -> Berber */ {HB_TAG('t','a','q',' '), HB_TAG('B','B','R',' ')}, /* Tamasheq -> Berber */
{HB_TAG('t','a','s',' '), HB_TAG('C','P','P',' ')}, /* Tay Boi -> Creoles */ {HB_TAG('t','a','s',' '), HB_TAG('C','P','P',' ')}, /* Tay Boi -> Creoles */
{HB_TAG('t','a','u',' '), HB_TAG('A','T','H',' ')}, /* Upper Tanana -> Athapaskan */ {HB_TAG('t','a','u',' '), HB_TAG('A','T','H',' ')}, /* Upper Tanana -> Athapaskan */
/*{HB_TAG('t','b','v',' '), HB_TAG('T','B','V',' ')},*/ /* Tobo */
{HB_TAG('t','c','b',' '), HB_TAG('A','T','H',' ')}, /* Tanacross -> Athapaskan */ {HB_TAG('t','c','b',' '), HB_TAG('A','T','H',' ')}, /* Tanacross -> Athapaskan */
{HB_TAG('t','c','e',' '), HB_TAG('A','T','H',' ')}, /* Southern Tutchone -> Athapaskan */ {HB_TAG('t','c','e',' '), HB_TAG('A','T','H',' ')}, /* Southern Tutchone -> Athapaskan */
{HB_TAG('t','c','h',' '), HB_TAG('C','P','P',' ')}, /* Turks And Caicos Creole English -> Creoles */ {HB_TAG('t','c','h',' '), HB_TAG('C','P','P',' ')}, /* Turks And Caicos Creole English -> Creoles */
@ -1623,7 +1632,7 @@ static const LangTag ot_languages3[] = {
{HB_TAG('y','b','a',' '), HB_TAG_NONE }, /* Yala != Yoruba */ {HB_TAG('y','b','a',' '), HB_TAG_NONE }, /* Yala != Yoruba */
{HB_TAG('y','b','b',' '), HB_TAG('B','M','L',' ')}, /* Yemba -> Bamileke */ {HB_TAG('y','b','b',' '), HB_TAG('B','M','L',' ')}, /* Yemba -> Bamileke */
{HB_TAG('y','b','d',' '), HB_TAG('A','R','K',' ')}, /* Yangbye (retired code) -> Rakhine */ {HB_TAG('y','b','d',' '), HB_TAG('A','R','K',' ')}, /* Yangbye (retired code) -> Rakhine */
{HB_TAG('y','c','r',' '), HB_TAG_NONE }, /* Yilan Creole != Y-Cree */ {HB_TAG('y','c','r',' '), HB_TAG('C','P','P',' ')}, /* Yilan Creole -> Creoles */
{HB_TAG('y','d','d',' '), HB_TAG('J','I','I',' ')}, /* Eastern Yiddish -> Yiddish */ {HB_TAG('y','d','d',' '), HB_TAG('J','I','I',' ')}, /* Eastern Yiddish -> Yiddish */
/*{HB_TAG('y','g','p',' '), HB_TAG('Y','G','P',' ')},*/ /* Gepo */ /*{HB_TAG('y','g','p',' '), HB_TAG('Y','G','P',' ')},*/ /* Gepo */
{HB_TAG('y','i','h',' '), HB_TAG('J','I','I',' ')}, /* Western Yiddish -> Yiddish */ {HB_TAG('y','i','h',' '), HB_TAG('J','I','I',' ')}, /* Western Yiddish -> Yiddish */

View File

@ -885,9 +885,9 @@ struct TupleVariationData
* no need to do find_shared_points () again */ * no need to do find_shared_points () again */
hb_vector_t<char> *shared_points_bytes = nullptr; hb_vector_t<char> *shared_points_bytes = nullptr;
/* total compiled byte size as TupleVariationData format, initialized to its /* total compiled byte size as TupleVariationData format, initialized to 0 */
* min_size: 4 */ unsigned compiled_byte_size = 0;
unsigned compiled_byte_size = 4; bool needs_padding = false;
/* for gvar iup delta optimization: whether this is a composite glyph */ /* for gvar iup delta optimization: whether this is a composite glyph */
bool is_composite = false; bool is_composite = false;
@ -1219,12 +1219,21 @@ struct TupleVariationData
bool compile_bytes (const hb_map_t& axes_index_map, bool compile_bytes (const hb_map_t& axes_index_map,
const hb_map_t& axes_old_index_tag_map, const hb_map_t& axes_old_index_tag_map,
bool use_shared_points, bool use_shared_points,
bool is_gvar = false,
const hb_hashmap_t<const hb_vector_t<char>*, unsigned>* shared_tuples_idx_map = nullptr) const hb_hashmap_t<const hb_vector_t<char>*, unsigned>* shared_tuples_idx_map = nullptr)
{ {
// return true for empty glyph
if (!tuple_vars)
return true;
// compile points set and store data in hashmap // compile points set and store data in hashmap
if (!compile_all_point_sets ()) if (!compile_all_point_sets ())
return false; return false;
/* total compiled byte size as TupleVariationData format, initialized to its
* min_size: 4 */
compiled_byte_size += 4;
if (use_shared_points) if (use_shared_points)
{ {
find_shared_points (); find_shared_points ();
@ -1253,6 +1262,13 @@ struct TupleVariationData
return false; return false;
compiled_byte_size += tuple.compiled_tuple_header.length + points_data_length + tuple.compiled_deltas.length; compiled_byte_size += tuple.compiled_tuple_header.length + points_data_length + tuple.compiled_deltas.length;
} }
if (is_gvar && (compiled_byte_size % 2))
{
needs_padding = true;
compiled_byte_size += 1;
}
return true; return true;
} }
@ -1295,7 +1311,7 @@ struct TupleVariationData
} }
/* padding for gvar */ /* padding for gvar */
if (is_gvar && (compiled_byte_size % 2)) if (is_gvar && needs_padding)
{ {
HBUINT8 pad; HBUINT8 pad;
pad = 0; pad = 0;

View File

@ -140,6 +140,7 @@ struct glyph_variations_t
for (tuple_variations_t& vars: glyph_variations) for (tuple_variations_t& vars: glyph_variations)
if (!vars.compile_bytes (axes_index_map, axes_old_index_tag_map, if (!vars.compile_bytes (axes_index_map, axes_old_index_tag_map,
true, /* use shared points*/ true, /* use shared points*/
true,
&shared_tuples_idx_map)) &shared_tuples_idx_map))
return false; return false;

View File

@ -146,7 +146,7 @@ typedef void (*hb_paint_pop_transform_func_t) (hb_paint_funcs_t *funcs,
* *
* A virtual method for the #hb_paint_funcs_t to render a color glyph by glyph index. * A virtual method for the #hb_paint_funcs_t to render a color glyph by glyph index.
* *
* Return value: %true if the glyph was painted, %false otherwise. * Return value: `true` if the glyph was painted, `false` otherwise.
* *
* Since: 8.2.0 * Since: 8.2.0
*/ */

View File

@ -72,8 +72,8 @@
* *
* === The sanitize() contract === * === The sanitize() contract ===
* *
* The sanitize() method of each object type shall return true if it's safe to * The sanitize() method of each object type shall return `true` if it's safe to
* call other methods of the object, and %false otherwise. * call other methods of the object, and `false` otherwise.
* *
* Note that what sanitize() checks for might align with what the specification * Note that what sanitize() checks for might align with what the specification
* describes as valid table data, but does not have to be. In particular, we * describes as valid table data, but does not have to be. In particular, we

View File

@ -36,9 +36,7 @@
#include "hb-map.hh" #include "hb-map.hh"
#include "hb-pool.hh" #include "hb-pool.hh"
#ifdef HB_EXPERIMENTAL_API #include "hb-subset-serialize.h"
#include "hb-subset-repacker.h"
#endif
/* /*
* Serialize * Serialize
@ -75,8 +73,7 @@ struct hb_serialize_context_t
object_t () = default; object_t () = default;
#ifdef HB_EXPERIMENTAL_API object_t (const hb_subset_serialize_object_t &o)
object_t (const hb_object_t &o)
{ {
head = o.head; head = o.head;
tail = o.tail; tail = o.tail;
@ -89,7 +86,6 @@ struct hb_serialize_context_t
for (unsigned i = 0; i < o.num_virtual_links; i++) for (unsigned i = 0; i < o.num_virtual_links; i++)
virtual_links.push (o.virtual_links[i]); virtual_links.push (o.virtual_links[i]);
} }
#endif
bool add_virtual_link (objidx_t objidx) bool add_virtual_link (objidx_t objidx)
{ {
@ -148,8 +144,7 @@ struct hb_serialize_context_t
link_t () = default; link_t () = default;
#ifdef HB_EXPERIMENTAL_API link_t (const hb_subset_serialize_link_t &o)
link_t (const hb_link_t &o)
{ {
width = o.width; width = o.width;
is_signed = 0; is_signed = 0;
@ -158,7 +153,6 @@ struct hb_serialize_context_t
bias = 0; bias = 0;
objidx = o.objidx; objidx = o.objidx;
} }
#endif
HB_INTERNAL static int cmp (const void* a, const void* b) HB_INTERNAL static int cmp (const void* a, const void* b)
{ {
@ -400,6 +394,7 @@ struct hb_serialize_context_t
{ {
merge_virtual_links (obj, objidx); merge_virtual_links (obj, objidx);
obj->fini (); obj->fini ();
object_pool.release (obj);
return objidx; return objidx;
} }
} }
@ -463,9 +458,11 @@ struct hb_serialize_context_t
while (packed.length > 1 && while (packed.length > 1 &&
packed.tail ()->head < tail) packed.tail ()->head < tail)
{ {
packed_map.del (packed.tail ()); object_t *obj = packed.tail ();
assert (!packed.tail ()->next); packed_map.del (obj);
packed.tail ()->fini (); assert (!obj->next);
obj->fini ();
object_pool.release (obj);
packed.pop (); packed.pop ();
} }
if (packed.length > 1) if (packed.length > 1)

View File

@ -53,6 +53,7 @@ hb_shape_full (hb_font_t *font,
unsigned int num_features, unsigned int num_features,
const char * const *shaper_list); const char * const *shaper_list);
#ifdef HB_EXPERIMENTAL_API
HB_EXTERN hb_bool_t HB_EXTERN hb_bool_t
hb_shape_justify (hb_font_t *font, hb_shape_justify (hb_font_t *font,
hb_buffer_t *buffer, hb_buffer_t *buffer,
@ -64,6 +65,7 @@ hb_shape_justify (hb_font_t *font,
float *advance, /* IN/OUT */ float *advance, /* IN/OUT */
hb_tag_t *var_tag, /* OUT */ hb_tag_t *var_tag, /* OUT */
float *var_value /* OUT */); float *var_value /* OUT */);
#endif
HB_EXTERN const char ** HB_EXTERN const char **
hb_shape_list_shapers (void); hb_shape_list_shapers (void);

View File

@ -534,7 +534,6 @@ hb_subset_input_pin_axis_location (hb_subset_input_t *input,
* *
* Note: input min value can not be bigger than input max value. If the input * Note: input min value can not be bigger than input max value. If the input
* default value is not within the new min/max range, it'll be clamped. * default value is not within the new min/max range, it'll be clamped.
* Note: currently it supports gvar and cvar tables only.
* *
* Return value: `true` if success, `false` otherwise * Return value: `true` if success, `false` otherwise
* *
@ -597,6 +596,144 @@ hb_subset_input_get_axis_range (hb_subset_input_t *input,
*axis_max_value = triple->maximum; *axis_max_value = triple->maximum;
return true; return true;
} }
/**
* hb_subset_axis_range_from_string:
* @str: a string to parse
* @len: length of @str, or -1 if str is NULL terminated
* @axis_min_value: (out): the axis min value to initialize with the parsed value
* @axis_max_value: (out): the axis max value to initialize with the parsed value
* @axis_def_value: (out): the axis default value to initialize with the parse
* value
*
* Parses a string into a subset axis range(min, def, max).
* Axis positions string is in the format of min:def:max or min:max
* When parsing axis positions, empty values as meaning the existing value for that part
* E.g: :300:500
* Specifies min = existing, def = 300, max = 500
* In the output axis_range, if a value should be set to it's default value,
* then it will be set to NaN
*
* Return value:
* `true` if @str is successfully parsed, `false` otherwise
*
* Since: 10.2.0
*/
HB_EXTERN hb_bool_t
hb_subset_axis_range_from_string (const char *str, int len,
float *axis_min_value,
float *axis_max_value,
float *axis_def_value)
{
if (len < 0)
len = strlen (str);
const char *end = str + len;
const char* part = strpbrk (str, ":");
if (!part)
{
// Single value.
if (strcmp (str, "drop") == 0)
{
*axis_min_value = NAN;
*axis_def_value = NAN;
*axis_max_value = NAN;
return true;
}
double v;
if (!hb_parse_double (&str, end, &v)) return false;
*axis_min_value = v;
*axis_def_value = v;
*axis_max_value = v;
return true;
}
float values[3];
int count = 0;
for (int i = 0; i < 3; i++) {
count++;
if (!*str || part == str)
{
values[i] = NAN;
if (part == NULL) break;
str = part + 1;
part = strpbrk (str, ":");
continue;
}
double v;
if (!hb_parse_double (&str, part, &v)) return false;
values[i] = v;
if (part == NULL) break;
str = part + 1;
part = strpbrk (str, ":");
}
if (count == 2)
{
*axis_min_value = values[0];
*axis_def_value = NAN;
*axis_max_value = values[1];
return true;
}
else if (count == 3)
{
*axis_min_value = values[0];
*axis_def_value = values[1];
*axis_max_value = values[2];
return true;
}
return false;
}
/**
* hb_subset_axis_range_to_string:
* @input: a #hb_subset_input_t object.
* @axis_tag: an axis to convert
* @buf: (array length=size) (out caller-allocates): output string
* @size: the allocated size of @buf
*
* Converts an axis range into a `NULL`-terminated string in the format
* understood by hb_subset_axis_range_from_string(). The client in responsible for
* allocating big enough size for @buf, 128 bytes is more than enough.
*
* Since: 10.2.0
*/
HB_EXTERN void
hb_subset_axis_range_to_string (hb_subset_input_t *input,
hb_tag_t axis_tag,
char *buf, unsigned size)
{
if (unlikely (!size)) return;
Triple* triple;
if (!input->axes_location.has(axis_tag, &triple)) {
return;
}
char s[128];
unsigned len = 0;
hb_locale_t clocale HB_UNUSED;
hb_locale_t oldlocale HB_UNUSED;
oldlocale = hb_uselocale (clocale = newlocale (LC_ALL_MASK, "C", NULL));
len += hb_max (0, snprintf (s, ARRAY_LENGTH (s) - len, "%g", (double) triple->minimum));
s[len++] = ':';
len += hb_max (0, snprintf (s + len, ARRAY_LENGTH (s) - len, "%g", (double) triple->middle));
s[len++] = ':';
len += hb_max (0, snprintf (s + len, ARRAY_LENGTH (s) - len, "%g", (double) triple->maximum));
(void) hb_uselocale (((void) freelocale (clocale), oldlocale));
assert (len < ARRAY_LENGTH (s));
len = hb_min (len, size - 1);
hb_memcpy (buf, s, len);
buf[len] = '\0';
}
#endif #endif
/** /**

View File

@ -679,6 +679,7 @@ _populate_unicodes_to_retain (const hb_set_t *unicodes,
{ {
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)
{ {
@ -797,6 +798,21 @@ _populate_unicodes_to_retain (const hb_set_t *unicodes,
plan->unicodes.add_sorted_array (&arr.arrayZ->first, arr.length, sizeof (*arr.arrayZ)); plan->unicodes.add_sorted_array (&arr.arrayZ->first, arr.length, sizeof (*arr.arrayZ));
plan->_glyphset_gsub.add_array (&arr.arrayZ->second, arr.length, sizeof (*arr.arrayZ)); plan->_glyphset_gsub.add_array (&arr.arrayZ->second, arr.length, sizeof (*arr.arrayZ));
} }
// Variation selectors don't have glyphs associated with them in the cmap so they will have been filtered out above
// but should still be retained. Add them back here.
// However, the min and max codepoints for OS/2 should be calculated without considering variation selectors,
// so record those first.
plan->os2_info.min_cmap_codepoint = plan->unicodes.get_min();
plan->os2_info.max_cmap_codepoint = plan->unicodes.get_max();
hb_set_t variation_selectors_to_retain;
cmap.collect_variation_selectors(&variation_selectors_to_retain);
+ variation_selectors_to_retain.iter()
| hb_filter(unicodes)
| hb_sink(&plan->unicodes)
;
} }
static unsigned static unsigned

View File

@ -41,6 +41,13 @@ namespace OT {
struct Feature; struct Feature;
} }
struct os2_info_t {
hb_codepoint_t min_cmap_codepoint;
hb_codepoint_t max_cmap_codepoint;
};
typedef struct os2_info_t os2_info_t;
struct head_maxp_info_t struct head_maxp_info_t
{ {
head_maxp_info_t () head_maxp_info_t ()
@ -180,6 +187,8 @@ struct hb_subset_plan_t
//recalculated head/maxp table info after instancing //recalculated head/maxp table info after instancing
mutable head_maxp_info_t head_maxp_info; mutable head_maxp_info_t head_maxp_info;
os2_info_t os2_info;
const hb_subset_accelerator_t* accelerator; const hb_subset_accelerator_t* accelerator;
hb_subset_accelerator_t* inprogress_accelerator; hb_subset_accelerator_t* inprogress_accelerator;

View File

@ -1,81 +0,0 @@
/*
* 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_tag_t table_tag,
hb_object_t* hb_objects,
unsigned num_hb_objs);
#endif
HB_END_DECLS
#endif /* HB_SUBSET_REPACKER_H */

View File

@ -22,37 +22,36 @@
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
* *
*/ */
#include "hb.hh"
#include "hb-subset-serialize.h"
#include "hb-repacker.hh" #include "hb-repacker.hh"
#ifdef HB_EXPERIMENTAL_API
/** /**
* hb_subset_repack_or_fail: * hb_subset_serialize_or_fail:
* @table_tag: tag of the table being packed, needed to allow table specific optimizations. * @table_tag: tag of the table being packed, needed to allow table specific optimizations.
* @hb_objects: raw array of struct hb_object_t, which provides * @hb_objects: raw array of struct hb_subset_serialize_object_t, which provides
* object graph info * object graph info
* @num_hb_objs: number of hb_object_t in the hb_objects array. * @num_hb_objs: number of hb_subset_serialize_object_t in the hb_objects array.
* *
* Given the input object graph info, repack a table to eliminate * Given the input object graph info, repack a table to eliminate offset overflows and
* offset overflows. A nullptr is returned if the repacking attempt fails. * serialize it into a continuous array of bytes. A nullptr is returned if the serializing attempt fails.
* Table specific optimizations (eg. extension promotion in GSUB/GPOS) may be performed. * Table specific optimizations (eg. extension promotion in GSUB/GPOS) may be performed.
* Passing HB_TAG_NONE will disable table specific optimizations. * Passing HB_TAG_NONE will disable table specific optimizations.
* *
* XSince: EXPERIMENTAL * Since: 10.2.0
**/ **/
hb_blob_t* hb_subset_repack_or_fail (hb_tag_t table_tag, HB_EXTERN hb_blob_t *
hb_object_t* hb_objects, hb_subset_serialize_or_fail (hb_tag_t table_tag,
hb_subset_serialize_object_t *hb_objects,
unsigned num_hb_objs) unsigned num_hb_objs)
{ {
hb_vector_t<const hb_object_t *> packed; hb_vector_t<const hb_subset_serialize_object_t *> packed;
packed.alloc (num_hb_objs + 1); packed.alloc (num_hb_objs + 1);
packed.push (nullptr); packed.push (nullptr);
for (unsigned i = 0 ; i < num_hb_objs ; i++) for (unsigned i = 0 ; i < num_hb_objs ; i++)
packed.push (&(hb_objects[i])); packed.push (&(hb_objects[i]));
return hb_resolve_overflows (packed, return hb_resolve_overflows (packed, table_tag, 20, true);
table_tag,
20,
true);
} }
#endif

View File

@ -0,0 +1,83 @@
/*
* 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_SERIALIZE_H
#define HB_SUBSET_SERIALIZE_H
#include "hb.h"
HB_BEGIN_DECLS
/**
* hb_subset_serialize_link_t:
* @width: offsetSize in bytes
* @position: position of the offset field in bytes from
* beginning of subtable
* @objidx: index of subtable
*
* Represents a link between two objects in the object graph
* to be serialized.
*
* Since: 10.2.0
*/
typedef struct hb_subset_serialize_link_t {
unsigned int width;
unsigned int position;
unsigned int objidx;
} hb_subset_serialize_link_t;
/**
* hb_subset_serialize_object_t:
* @head: start of object data
* @tail: end of object data
* @num_real_links: number of offset field in the object
* @real_links: array of offset info
* @num_virtual_links: number of objects that must be packed
* after current object in the final
* serialized order
* @virtual_links: array of virtual link info
*
* Represents an object in the object graph to be serialized.
*
* Since: 10.2.0
*/
typedef struct hb_subset_serialize_object_t {
char *head;
char *tail;
unsigned int num_real_links;
hb_subset_serialize_link_t *real_links;
unsigned int num_virtual_links;
hb_subset_serialize_link_t *virtual_links;
} hb_subset_serialize_object_t;
HB_EXTERN hb_blob_t *
hb_subset_serialize_or_fail (hb_tag_t table_tag,
hb_subset_serialize_object_t *hb_objects,
unsigned num_hb_objs);
HB_END_DECLS
#endif /* HB_SUBSET_SERIALIZE_H */

View File

@ -295,7 +295,7 @@ _try_subset (const TableType *table,
DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c ran out of room; reallocating to %u bytes.", DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c ran out of room; reallocating to %u bytes.",
HB_UNTAG (c->table_tag), buf_size); HB_UNTAG (c->table_tag), buf_size);
if (unlikely (buf_size > c->source_blob->length * 16 || if (unlikely (buf_size > c->source_blob->length * 256 ||
!buf->alloc (buf_size, true))) !buf->alloc (buf_size, true)))
{ {
DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c failed to reallocate %u bytes.", DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c failed to reallocate %u bytes.",

View File

@ -203,6 +203,18 @@ hb_subset_input_set_axis_range (hb_subset_input_t *input,
float axis_max_value, float axis_max_value,
float axis_def_value); float axis_def_value);
HB_EXTERN hb_bool_t
hb_subset_axis_range_from_string (const char *str, int len,
float *axis_min_value,
float *axis_max_value,
float *axis_def_value);
HB_EXTERN void
hb_subset_axis_range_to_string (hb_subset_input_t *input,
hb_tag_t axis_tag,
char *buf,
unsigned size);
#ifdef HB_EXPERIMENTAL_API #ifdef HB_EXPERIMENTAL_API
HB_EXTERN hb_bool_t HB_EXTERN hb_bool_t
hb_subset_input_override_name_table (hb_subset_input_t *input, hb_subset_input_override_name_table (hb_subset_input_t *input,

View File

@ -458,19 +458,21 @@ struct hb_ascii_t
template <typename utf_t> template <typename utf_t>
static inline const typename utf_t::codepoint_t * static inline const typename utf_t::codepoint_t *
hb_utf_offset_to_pointer (const typename utf_t::codepoint_t *start, hb_utf_offset_to_pointer (const typename utf_t::codepoint_t *start,
const typename utf_t::codepoint_t *text,
unsigned text_len,
signed offset) signed offset)
{ {
hb_codepoint_t unicode; hb_codepoint_t unicode;
while (offset-- > 0) while (offset-- > 0)
start = utf_t::next (start, start = utf_t::next (start,
start + utf_t::max_len, text + text_len,
&unicode, &unicode,
HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT); HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT);
while (offset++ < 0) while (offset++ < 0)
start = utf_t::prev (start, start = utf_t::prev (start,
start - utf_t::max_len, text,
&unicode, &unicode,
HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT); HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT);

View File

@ -47,7 +47,7 @@ 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 1 #define HB_VERSION_MINOR 2
/** /**
* HB_VERSION_MICRO: * HB_VERSION_MICRO:
* *
@ -60,7 +60,7 @@ HB_BEGIN_DECLS
* *
* 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 "10.1.0" #define HB_VERSION_STRING "10.2.0"
/** /**
* HB_VERSION_ATLEAST: * HB_VERSION_ATLEAST: