diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-03-07 22:32:14 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-03-07 22:32:14 +0000 |
commit | ef9282421b00185a4962b7d22b96e979687258e2 (patch) | |
tree | b6d0d8c700086d3141e228187693a26b102c971f /Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc | |
parent | 55fbdeae2498166ec7c7301fd48d990fc9010058 (diff) |
harfbuzz-1.7.6
git-svn-id: svn://tug.org/texlive/trunk@46877 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc')
-rw-r--r-- | Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc index 6b228790af8..c7b46053d8c 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc @@ -200,8 +200,7 @@ position_mark (const hb_ot_shape_plan_t *plan, unsigned int combining_class) { hb_glyph_extents_t mark_extents; - if (!font->get_glyph_extents (buffer->info[i].codepoint, - &mark_extents)) + if (!font->get_glyph_extents (buffer->info[i].codepoint, &mark_extents)) return; hb_position_t y_gap = font->y_scale / 16; @@ -322,7 +321,9 @@ position_around_base (const hb_ot_shape_plan_t *plan, base_extents.y_bearing += buffer->pos[base].y_offset; unsigned int lig_id = _hb_glyph_info_get_lig_id (&buffer->info[base]); - unsigned int num_lig_components = _hb_glyph_info_get_lig_num_comps (&buffer->info[base]); + /* Use integer for num_lig_components such that it doesn't convert to unsigned + * when we divide or multiply by it. */ + int num_lig_components = _hb_glyph_info_get_lig_num_comps (&buffer->info[base]); hb_position_t x_offset = 0, y_offset = 0; if (HB_DIRECTION_IS_FORWARD (buffer->props.direction)) { @@ -331,7 +332,7 @@ position_around_base (const hb_ot_shape_plan_t *plan, } hb_glyph_extents_t component_extents = base_extents; - unsigned int last_lig_component = (unsigned int) -1; + int last_lig_component = -1; unsigned int last_combining_class = 255; hb_glyph_extents_t cluster_extents = base_extents; /* Initialization is just to shut gcc up. */ hb_glyph_info_t *info = buffer->info; @@ -340,7 +341,7 @@ position_around_base (const hb_ot_shape_plan_t *plan, { if (num_lig_components > 1) { unsigned int this_lig_id = _hb_glyph_info_get_lig_id (&info[i]); - unsigned int this_lig_component = _hb_glyph_info_get_lig_comp (&info[i]) - 1; + int this_lig_component = _hb_glyph_info_get_lig_comp (&info[i]) - 1; /* Conditions for attaching to the last component. */ if (!lig_id || lig_id != this_lig_id || this_lig_component >= num_lig_components) this_lig_component = num_lig_components - 1; @@ -526,7 +527,7 @@ _hb_ot_shape_fallback_spaces (const hb_ot_shape_plan_t *plan, break; case t::SPACE_4_EM_18: - pos[i].x_advance = font->x_scale * 4 / 18; + pos[i].x_advance = (int64_t) font->x_scale * 4 / 18; break; case t::SPACE_FIGURE: |