diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-04-24 04:08:31 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-04-24 04:08:31 +0000 |
commit | ebbc015f344e5e46d09dfdc5b173424c7d23a440 (patch) | |
tree | 8379e80738c0015803e3f7e6a72febac9e2ae23c /Build/source/libs/harfbuzz/harfbuzz-src/src | |
parent | c5ad0b1434f22257a1e23eb519ad56e781b03471 (diff) |
harfbuzz 1.4.6
git-svn-id: svn://tug.org/texlive/trunk@44006 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src')
8 files changed, 67 insertions, 41 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am index e322d568647..0c077d99013 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am @@ -25,11 +25,13 @@ HBLIBS = HBNONPCLIBS = HBDEPS = HBSOURCES = $(HB_BASE_sources) +HBSOURCES += $(HB_BASE_RAGEL_GENERATED_sources) HBHEADERS = $(HB_BASE_headers) HBNODISTHEADERS = $(HB_NODIST_headers) if HAVE_OT HBSOURCES += $(HB_OT_sources) +HBSOURCES += $(HB_OT_RAGEL_GENERATED_sources) HBHEADERS += $(HB_OT_headers) endif @@ -251,19 +253,13 @@ built-sources: $(BUILT_SOURCES) .PHONY: unicode-tables arabic-table indic-table use-table built-sources RAGEL_GENERATED = \ - $(srcdir)/hb-buffer-deserialize-json.hh \ - $(srcdir)/hb-buffer-deserialize-text.hh \ - $(srcdir)/hb-ot-shape-complex-indic-machine.hh \ - $(srcdir)/hb-ot-shape-complex-myanmar-machine.hh \ - $(srcdir)/hb-ot-shape-complex-use-machine.hh \ + $(patsubst %,$(srcdir)/%,$(HB_BASE_RAGEL_GENERATED_sources)) \ + $(patsubst %,$(srcdir)/%,$(HB_OT_RAGEL_GENERATED_sources)) \ $(NULL) BUILT_SOURCES += $(RAGEL_GENERATED) EXTRA_DIST += \ - hb-buffer-deserialize-json.rl \ - hb-buffer-deserialize-text.rl \ - hb-ot-shape-complex-indic-machine.rl \ - hb-ot-shape-complex-myanmar-machine.rl \ - hb-ot-shape-complex-use-machine.rl \ + $(HB_BASE_RAGEL_sources) \ + $(HB_OT_RAGEL_sources) \ $(NULL) MAINTAINERCLEANFILES += $(RAGEL_GENERATED) $(srcdir)/%.hh: $(srcdir)/%.rl diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources index 6363cf9300a..51e687b4a14 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources @@ -5,8 +5,6 @@ NULL = HB_BASE_sources = \ hb-atomic-private.hh \ hb-blob.cc \ - hb-buffer-deserialize-json.hh \ - hb-buffer-deserialize-text.hh \ hb-buffer-private.hh \ hb-buffer-serialize.cc \ hb-buffer.cc \ @@ -47,6 +45,15 @@ HB_BASE_sources = \ hb-warning.cc \ $(NULL) +HB_BASE_RAGEL_GENERATED_sources = \ + hb-buffer-deserialize-json.hh \ + hb-buffer-deserialize-text.hh \ + $(NULL) +HB_BASE_RAGEL_sources = \ + hb-buffer-deserialize-json.rl \ + hb-buffer-deserialize-text.rl \ + $(NULL) + HB_BASE_headers = \ hb.h \ hb-blob.h \ @@ -91,15 +98,12 @@ HB_OT_sources = \ hb-ot-shape-complex-hangul.cc \ hb-ot-shape-complex-hebrew.cc \ hb-ot-shape-complex-indic.cc \ - hb-ot-shape-complex-indic-machine.hh \ hb-ot-shape-complex-indic-private.hh \ hb-ot-shape-complex-indic-table.cc \ hb-ot-shape-complex-myanmar.cc \ - hb-ot-shape-complex-myanmar-machine.hh \ hb-ot-shape-complex-thai.cc \ hb-ot-shape-complex-tibetan.cc \ hb-ot-shape-complex-use.cc \ - hb-ot-shape-complex-use-machine.hh \ hb-ot-shape-complex-use-private.hh \ hb-ot-shape-complex-use-table.cc \ hb-ot-shape-complex-private.hh \ @@ -115,6 +119,17 @@ HB_OT_sources = \ hb-ot-var-mvar-table.hh \ $(NULL) +HB_OT_RAGEL_GENERATED_sources = \ + hb-ot-shape-complex-indic-machine.hh \ + hb-ot-shape-complex-myanmar-machine.hh \ + hb-ot-shape-complex-use-machine.hh \ + $(NULL) +HB_OT_RAGEL_sources = \ + hb-ot-shape-complex-indic-machine.rl \ + hb-ot-shape-complex-myanmar-machine.rl \ + hb-ot-shape-complex-use-machine.rl \ + $(NULL) + HB_OT_headers = \ hb-ot.h \ hb-ot-font.h \ diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc index 64e77d43472..39006237a0c 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc @@ -186,8 +186,10 @@ lang_equal (hb_language_t v1, const unsigned char *p1 = (const unsigned char *) v1; const unsigned char *p2 = (const unsigned char *) v2; - while (*p1 && *p1 == canon_map[*p2]) - p1++, p2++; + while (*p1 && *p1 == canon_map[*p2]) { + p1++; + p2++; + } return *p1 == canon_map[*p2]; } @@ -667,7 +669,7 @@ parse_float (const char **pp, const char *end, float *pv) float v; errno = 0; - v = strtof (p, &pend); + v = strtod (p, &pend); if (errno || p == pend) return false; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc index 5b804b8294e..c9799e9da00 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc @@ -301,7 +301,7 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan, hb_codepoint_t *pg = gids; clusters[0].cluster = buffer->info[0].cluster; - float curradv = HB_DIRECTION_IS_BACKWARD(buffer->props.direction) ? gr_slot_origin_X(gr_seg_first_slot(seg)) : 0.; + float curradv = 0.; if (HB_DIRECTION_IS_BACKWARD(buffer->props.direction)) { curradv = gr_slot_origin_X(gr_seg_first_slot(seg)); @@ -330,13 +330,10 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan, c->base_glyph = ic; c->num_glyphs = 0; if (HB_DIRECTION_IS_BACKWARD(buffer->props.direction)) - { - ci++; - clusters[ci].advance = curradv - gr_slot_origin_X(is); - } else { + c->advance = curradv - gr_slot_origin_X(is); + else clusters[ci].advance = gr_slot_origin_X(is) - curradv; - ci++; - } + ci++; curradv = gr_slot_origin_X(is); } clusters[ci].num_glyphs++; @@ -345,7 +342,9 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan, clusters[ci].num_chars = after + 1 - clusters[ci].base_char; } - if (!HB_DIRECTION_IS_BACKWARD(buffer->props.direction)) + if (HB_DIRECTION_IS_BACKWARD(buffer->props.direction)) + clusters[ci].advance += curradv; + else clusters[ci].advance = gr_seg_advance_X(seg) - curradv; ci++; @@ -366,11 +365,11 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan, float yscale = (float) font->y_scale / upem; yscale *= yscale / xscale; /* Positioning. */ + int currclus = -1; + const hb_glyph_info_t *info = buffer->info; + hb_glyph_position_t *pPos = hb_buffer_get_glyph_positions (buffer, NULL); if (!HB_DIRECTION_IS_BACKWARD(buffer->props.direction)) { - int currclus = -1; - const hb_glyph_info_t *info = buffer->info; - hb_glyph_position_t *pPos = hb_buffer_get_glyph_positions (buffer, NULL); curradvx = 0; for (is = gr_seg_first_slot (seg); is; pPos++, ++info, is = gr_slot_next_in_segment (is)) { @@ -389,23 +388,20 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan, } else { - int currclus = -1; - const hb_glyph_info_t *info = buffer->info; - hb_glyph_position_t *pPos = hb_buffer_get_glyph_positions (buffer, NULL); - curradvx = gr_seg_advance_X(seg) * xscale; + curradvx = gr_seg_advance_X(seg); for (is = gr_seg_first_slot (seg); is; pPos++, info++, is = gr_slot_next_in_segment (is)) { if (info->cluster != currclus) { pPos->x_advance = info->var1.i32 * xscale; - if (currclus != -1) curradvx -= info[-1].var1.i32 * xscale; + curradvx -= pPos->x_advance; currclus = info->cluster; } else - pPos->x_advance = 0.; + pPos->x_advance = 0.; pPos->y_advance = gr_slot_advance_Y (is, grface, NULL) * yscale; curradvy -= pPos->y_advance; - pPos->x_offset = gr_slot_origin_X (is) * xscale - curradvx + pPos->x_advance; + pPos->x_offset = (gr_slot_origin_X (is) - info->var1.i32) * xscale - curradvx + pPos->x_advance; pPos->y_offset = gr_slot_origin_Y (is) * yscale - curradvy; } hb_buffer_reverse_clusters (buffer); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh index f9fcec52b77..921859a6603 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh @@ -342,7 +342,7 @@ struct hb_apply_context_t : inline void init (hb_apply_context_t *c_, bool context_match = false) { c = c_; - match_glyph_data = NULL, + match_glyph_data = NULL; matcher.set_match_func (NULL, NULL); matcher.set_lookup_props (c->lookup_props); /* Ignore ZWNJ if we are matching GSUB context, or matching GPOS. */ diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc index e78e1524e65..7f4e0184427 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc @@ -101,10 +101,18 @@ _hb_ot_layout_create (hb_face_t *face) || (928 == gdef_len && 59332 == gpos_len && 23298 == gsub_len) /* sha1sum:6d400781948517c3c0441ba42acb309584b73033 tahomabd.ttf from Windows 8.1 */ || (940 == gdef_len && 60732 == gpos_len && 23310 == gsub_len) + /* tahoma.ttf v6.04 from Windows 8.1 x64, see https://bugzilla.mozilla.org/show_bug.cgi?id=1279925 */ + || (964 == gdef_len && 60072 == gpos_len && 23836 == gsub_len) + /* tahomabd.ttf v6.04 from Windows 8.1 x64, see https://bugzilla.mozilla.org/show_bug.cgi?id=1279925 */ + || (976 == gdef_len && 61456 == gpos_len && 23832 == gsub_len) /* sha1sum:e55fa2dfe957a9f7ec26be516a0e30b0c925f846 tahoma.ttf from Windows 10 */ || (994 == gdef_len && 60336 == gpos_len && 24474 == gsub_len) /* sha1sum:7199385abb4c2cc81c83a151a7599b6368e92343 tahomabd.ttf from Windows 10 */ || (1006 == gdef_len && 61740 == gpos_len && 24470 == gsub_len) + /* tahoma.ttf v6.91 from Windows 10 x64, see https://bugzilla.mozilla.org/show_bug.cgi?id=1279925 */ + || (1006 == gdef_len && 61346 == gpos_len && 24576 == gsub_len) + /* tahomabd.ttf v6.91 from Windows 10 x64, see https://bugzilla.mozilla.org/show_bug.cgi?id=1279925 */ + || (1018 == gdef_len && 62828 == gpos_len && 24572 == gsub_len) /* sha1sum:b9c84d820c49850d3d27ec498be93955b82772b5 tahoma.ttf from Windows 10 AU */ || (1006 == gdef_len && 61352 == gpos_len && 24576 == gsub_len) /* sha1sum:2bdfaab28174bdadd2f3d4200a30a7ae31db79d2 tahomabd.ttf from Windows 10 AU */ @@ -125,6 +133,14 @@ _hb_ot_layout_create (hb_face_t *face) /* 2c0c90c6f6087ffbfea76589c93113a9cbb0e75f cantarell-fonts-0.0.21/otf/Cantarell-Bold.otf */ /* 55461f5b853c6da88069ffcdf7f4dd3f8d7e3e6b cantarell-fonts-0.0.21/otf/Cantarell-Bold-Oblique.otf */ || (188 == gdef_len && 3426 == gpos_len && 264 == gsub_len) + /* d125afa82a77a6475ac0e74e7c207914af84b37a padauk-2.80/Padauk.ttf RHEL 7.2 */ + || (1058 == gdef_len && 11818 == gpos_len && 47032 == gsub_len) + /* 0f7b80437227b90a577cc078c0216160ae61b031 padauk-2.80/Padauk-Bold.ttf RHEL 7.2*/ + || (1046 == gdef_len && 12600 == gpos_len && 47030 == gsub_len) + /* d3dde9aa0a6b7f8f6a89ef1002e9aaa11b882290 padauk-2.80/Padauk.ttf Ubuntu 16.04 */ + || (1058 == gdef_len && 16770 == gpos_len && 71796 == gsub_len) + /* 5f3c98ccccae8a953be2d122c1b3a77fd805093f padauk-2.80/Padauk-Bold.ttf Ubuntu 16.04 */ + || (1046 == gdef_len && 17862 == gpos_len && 71790 == gsub_len) /* 6c93b63b64e8b2c93f5e824e78caca555dc887c7 padauk-2.80/Padauk-book.ttf */ || (1046 == gdef_len && 17112 == gpos_len && 71788 == gsub_len) /* d89b1664058359b8ec82e35d3531931125991fb9 padauk-2.80/Padauk-bookbold.ttf */ diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map-private.hh index 0395c9c22ff..b69e5344c14 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map-private.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map-private.hh @@ -113,7 +113,7 @@ struct hb_ot_map_t assert (stage <= stages[table_index].len); unsigned int start = stage ? stages[table_index][stage - 1].last_lookup : 0; unsigned int end = stage < stages[table_index].len ? stages[table_index][stage].last_lookup : lookups[table_index].len; - *plookups = &lookups[table_index][start]; + *plookups = end == start ? NULL : &lookups[table_index][start]; *lookup_count = end - start; } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc index 1ac77bef750..61737669c08 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc @@ -431,11 +431,12 @@ static inline hb_bool_t hb_non_global_user_features_present (const hb_feature_t *user_features, unsigned int num_user_features) { - while (num_user_features) + while (num_user_features) { if (user_features->start != 0 || user_features->end != (unsigned int) -1) return true; - else - num_user_features--, user_features++; + num_user_features--; + user_features++; + } return false; } |