diff options
Diffstat (limited to 'Build/source/libs')
16 files changed, 257 insertions, 106 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README index bacd56a4cad..009f6e22a06 100644 --- a/Build/source/libs/README +++ b/Build/source/libs/README @@ -25,7 +25,7 @@ graphite2 1.3.13 - checked 21dec18 http://sourceforge.net/projects/silgraphite/files/graphite2/ (requires C++11) -harfbuzz 2.6.3 - checked 29oct19 +harfbuzz 2.6.4 - checked 30oct19 http://www.freedesktop.org/software/harfbuzz/release/ icu 63.1 - checked 8jan19 diff --git a/Build/source/libs/harfbuzz/ChangeLog b/Build/source/libs/harfbuzz/ChangeLog index 494524dcf9b..5d6ae4e03df 100644 --- a/Build/source/libs/harfbuzz/ChangeLog +++ b/Build/source/libs/harfbuzz/ChangeLog @@ -1,3 +1,8 @@ +2019-10-30 Akira Kakuto <kakuto@w32tex.org> + + Import harfbuzz-2.6.4. + * version.ac: Adjusted. + 2019-10-29 Akira Kakuto <kakuto@w32tex.org> Import harfbuzz-2.6.3. diff --git a/Build/source/libs/harfbuzz/TLpatches/ChangeLog b/Build/source/libs/harfbuzz/TLpatches/ChangeLog index d94995c93b2..1d06132492a 100644 --- a/Build/source/libs/harfbuzz/TLpatches/ChangeLog +++ b/Build/source/libs/harfbuzz/TLpatches/ChangeLog @@ -1,3 +1,8 @@ +2019-10-30 Akira Kakuto <kakuto@w32tex.org> + + Imported harfbuzz-2.6.4 source tree from: + http://www.freedesktop.org/software/harfbuzz/release/ + 2019-10-29 Akira Kakuto <kakuto@w32tex.org> Imported harfbuzz-2.6.3 source tree from: diff --git a/Build/source/libs/harfbuzz/TLpatches/TL-Changes b/Build/source/libs/harfbuzz/TLpatches/TL-Changes index fff802a49a0..77c29b50e47 100644 --- a/Build/source/libs/harfbuzz/TLpatches/TL-Changes +++ b/Build/source/libs/harfbuzz/TLpatches/TL-Changes @@ -1,4 +1,4 @@ -Changes applied to the harfbuzz-2.6.3/ tree as obtained from: +Changes applied to the harfbuzz-2.6.4/ tree as obtained from: http://www.freedesktop.org/software/harfbuzz/release/ Removed: diff --git a/Build/source/libs/harfbuzz/configure b/Build/source/libs/harfbuzz/configure index 3b0e698ad41..5635c601905 100755 --- a/Build/source/libs/harfbuzz/configure +++ b/Build/source/libs/harfbuzz/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for harfbuzz (TeX Live) 2.6.3. +# Generated by GNU Autoconf 2.69 for harfbuzz (TeX Live) 2.6.4. # # Report bugs to <tex-k@tug.org>. # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='harfbuzz (TeX Live)' PACKAGE_TARNAME='harfbuzz--tex-live-' -PACKAGE_VERSION='2.6.3' -PACKAGE_STRING='harfbuzz (TeX Live) 2.6.3' +PACKAGE_VERSION='2.6.4' +PACKAGE_STRING='harfbuzz (TeX Live) 2.6.4' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1311,7 +1311,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures harfbuzz (TeX Live) 2.6.3 to adapt to many kinds of systems. +\`configure' configures harfbuzz (TeX Live) 2.6.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1382,7 +1382,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of harfbuzz (TeX Live) 2.6.3:";; + short | recursive ) echo "Configuration of harfbuzz (TeX Live) 2.6.4:";; esac cat <<\_ACEOF @@ -1487,7 +1487,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -harfbuzz (TeX Live) configure 2.6.3 +harfbuzz (TeX Live) configure 2.6.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2123,7 +2123,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by harfbuzz (TeX Live) $as_me 2.6.3, which was +It was created by harfbuzz (TeX Live) $as_me 2.6.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4047,7 +4047,7 @@ fi # Define the identity of the package. PACKAGE='harfbuzz--tex-live-' - VERSION='2.6.3' + VERSION='2.6.4' # Some tools Automake needs. @@ -4241,8 +4241,8 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags HB_VERSION_MAJOR=2 HB_VERSION_MINOR=6 -HB_VERSION_MICRO=3 -HB_VERSION=2.6.3 +HB_VERSION_MICRO=4 +HB_VERSION=2.6.4 ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7919,7 +7919,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by harfbuzz (TeX Live) $as_me 2.6.3, which was +This file was extended by harfbuzz (TeX Live) $as_me 2.6.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7985,7 +7985,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -harfbuzz (TeX Live) config.status 2.6.3 +harfbuzz (TeX Live) config.status 2.6.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog index 84dc3cceefc..ec56461cbab 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog +++ b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog @@ -1,3 +1,130 @@ +commit 3a74ee528255cc027d84b204a87b5c25e47bff79 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Oct 29 12:27:03 2019 -0700 + + 2.6.4 + + NEWS | 7 +++++++ + configure.ac | 2 +- + src/hb-version.h | 4 ++-- + 3 files changed, 10 insertions(+), 3 deletions(-) + +commit 3958f6fb2378d83dd5107d62a8464187c93707b0 +Author: Ebrahim Byagowi <ebrahim@gnu.org> +Date: Tue Oct 29 22:36:50 2019 +0330 + + Add in_range in hb_bytes_t to merge range_checker_t with it + + src/hb-array.hh | 9 +++++++++ + src/hb-ot-glyf-table.hh | 28 ++++++++++++-------------- + src/hb-ot-var-gvar-table.hh | 49 +++++++++++++++------------------------------ + 3 files changed, 38 insertions(+), 48 deletions(-) + +commit 7915c5d6fa3efac99df08a54d4437eca0b780033 +Author: Ebrahim Byagowi <ebrahim@gnu.org> +Date: Tue Oct 29 22:55:34 2019 +0330 + + [ci] Check the recipt introduce in 7152ac3 + + .circleci/config.yml | 1 + + 1 file changed, 1 insertion(+) + +commit aa3831e295540083350c640d4a630f53e70d822f +Author: Ebrahim Byagowi <ebrahim@gnu.org> +Date: Tue Oct 29 21:37:07 2019 +0330 + + [glyf] Use contour_bounds_t::empty to simplify get_extents logic + + src/hb-ot-glyf-table.hh | 20 ++++++-------------- + 1 file changed, 6 insertions(+), 14 deletions(-) + +commit d59ae5836d1349b885db980cbb741da33caebfde +Author: Ebrahim Byagowi <ebrahim@gnu.org> +Date: Tue Oct 29 21:30:04 2019 +0330 + + [glyf] Refactor contour_bounds_t use to make its fields protected + + src/hb-ot-glyf-table.hh | 47 ++++++++++++++++++++++++++--------------------- + 1 file changed, 26 insertions(+), 21 deletions(-) + +commit 773ee8041e8905bfb06c1a71d2b4fc99110b3dc6 +Merge: 47b4074d 0efbda7a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Oct 29 10:58:56 2019 -0700 + + Merge pull request #2038 from ebraminio/glyf-contour + + Remove contour_point_t so we won't need to zero its unused var + +commit 0efbda7a40742cbdf30d5a85061ffb6a0a55bcc0 +Author: Ebrahim Byagowi <ebrahim@gnu.org> +Date: Tue Oct 29 21:03:26 2019 +0330 + + Remove contour_point_t so we won't need to zero its unused var + + src/hb-ot-glyf-table.hh | 27 +++++++++++++-------------- + 1 file changed, 13 insertions(+), 14 deletions(-) + +commit 47b4074d5f98d71d2983470602eff9b93f102af4 +Merge: dd8a8460 dd288840 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Oct 29 03:16:34 2019 -0700 + + Merge pull request #2034 from khaledhosny/cmap-notdef + + [cmap] Check GID before adding ranges in format 4 & 12 + +commit dd8a8460377ca54207877ea9da96931175dbb15f +Author: jfkthame <jfkthame@gmail.com> +Date: Tue Oct 29 09:20:41 2019 +0000 + + Use proper y-scale factor for height value + + src/hb-ot-cff1-table.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 7152ac3fcfe8a599aa0d20f8d02ef38c69111231 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Oct 28 17:12:55 2019 -0700 + + Fix build + + $ make CPPFLAGS="-DHB_TINY -DHB_NO_OT_FONT" libharfbuzz-subset.la + + src/hb-subset-plan.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit dd288840d6f87acd13b99b71408dcdb35a2be9cb +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Tue Oct 29 01:45:49 2019 +0200 + + [cmap] Check GID before adding ranges in format 4 & 12 + + Fixes https://github.com/harfbuzz/harfbuzz/issues/2031 + + src/hb-ot-cmap-table.hh | 32 ++++++++++++++++++++++++-------- + test/api/fonts/cmunrm.otf | Bin 0 -> 330492 bytes + test/api/test-collect-unicodes.c | 22 ++++++++++++++++++++++ + 3 files changed, 46 insertions(+), 8 deletions(-) + +commit fd71c045b46380281ba8a7e351fac7248938c74c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Oct 28 17:06:53 2019 -0700 + + Hopefully fix up previous commit and bots + + src/hb.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit e832dc4c642f604d2cbb8e6b2f0b8d37151936f1 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Oct 28 17:02:40 2019 -0700 + + [config] Make HB_NO_ERRNO work with systems defining errno as a macro + + src/hb.hh | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + commit ce11df1b5b8e49712bef249de19bc4768f3a691c Author: Behdad Esfahbod <behdad@behdad.org> Date: Mon Oct 28 14:45:31 2019 -0700 diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS index 6cae06dcdcd..7dde1193f31 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS +++ b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS @@ -1,3 +1,10 @@ +Overview of changes leading to 2.6.4 +Monday, October 29, 2019 +==================================== +- Small bug fix. +- Build fixes. + + Overview of changes leading to 2.6.3 Monday, October 28, 2019 ==================================== diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac b/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac index 38d9e07404f..41257561cc3 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac +++ b/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ([2.64]) AC_INIT([HarfBuzz], - [2.6.3], + [2.6.4], [https://github.com/harfbuzz/harfbuzz/issues/new], [harfbuzz], [http://harfbuzz.org/]) diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-array.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-array.hh index 09d10b47c39..d9adf2c728e 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-array.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-array.hh @@ -196,6 +196,15 @@ struct hb_array_t : hb_iter_with_fallback_t<hb_array_t<Type>, Type&> const T *as () const { return length < hb_null_size (T) ? &Null (T) : reinterpret_cast<const T *> (arrayZ); } + template <typename T, + unsigned P = sizeof (Type), + hb_enable_if (P == 1)> + bool in_range (const T *p, unsigned int size = T::static_size) const + { + return ((const char *) p) >= arrayZ + && ((const char *) p + size) <= arrayZ + length; + } + /* Only call if you allocated the underlying array using malloc() or similar. */ void free () { ::free ((void *) arrayZ); arrayZ = nullptr; length = 0; } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.cc index d1e46256265..55abd11d610 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.cc @@ -336,7 +336,7 @@ bool OT::cff1::accelerator_t::get_extents (hb_font_t *font, hb_codepoint_t glyph else { extents->y_bearing = font->em_scalef_y (bounds.max.y.to_real ()); - extents->height = font->em_scalef_x (bounds.min.y.to_real () - bounds.max.y.to_real ()); + extents->height = font->em_scalef_y (bounds.min.y.to_real () - bounds.max.y.to_real ()); } return true; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh index e6646152978..9ebd8e417f9 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh @@ -342,14 +342,22 @@ struct CmapSubtableFormat4 count--; /* Skip sentinel segment. */ for (unsigned int i = 0; i < count; i++) { + hb_codepoint_t start = this->startCount[i]; + hb_codepoint_t end = this->endCount[i]; unsigned int rangeOffset = this->idRangeOffset[i]; if (rangeOffset == 0) - out->add_range (this->startCount[i], this->endCount[i]); + { + for (hb_codepoint_t codepoint = start; codepoint <= end; codepoint++) + { + hb_codepoint_t gid = (codepoint + this->idDelta[i]) & 0xFFFFu; + if (unlikely (!gid)) + continue; + out->add (codepoint); + } + } else { - for (hb_codepoint_t codepoint = this->startCount[i]; - codepoint <= this->endCount[i]; - codepoint++) + for (hb_codepoint_t codepoint = start; codepoint <= end; codepoint++) { unsigned int index = rangeOffset / 2 + (codepoint - this->startCount[i]) + i - this->segCount; if (unlikely (index >= this->glyphIdArrayLength)) @@ -522,10 +530,18 @@ struct CmapSubtableLongSegmented void collect_unicodes (hb_set_t *out) const { - for (unsigned int i = 0; i < this->groups.len; i++) { - out->add_range (this->groups[i].startCharCode, - hb_min ((hb_codepoint_t) this->groups[i].endCharCode, - (hb_codepoint_t) HB_UNICODE_MAX)); + for (unsigned int i = 0; i < this->groups.len; i++) + { + hb_codepoint_t start = this->groups[i].startCharCode; + hb_codepoint_t end = hb_min ((hb_codepoint_t) this->groups[i].endCharCode, + (hb_codepoint_t) HB_UNICODE_MAX); + for (hb_codepoint_t codepoint = start; codepoint <= end; codepoint++) + { + hb_codepoint_t gid = T::group_get_glyph (this->groups[i], codepoint); + if (unlikely (!gid)) + continue; + out->add (codepoint); + } } } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-glyf-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-glyf-table.hh index f5a64b050e8..571e50ea0c7 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-glyf-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-glyf-table.hh @@ -360,9 +360,9 @@ struct glyf { typedef const CompositeGlyphChain *__item_t__; composite_iter_t (hb_bytes_t glyph_, __item_t__ current_) : - glyph (glyph_), current (current_), checker (range_checker_t (glyph.arrayZ, glyph.length)) + glyph (glyph_), current (current_) { if (!in_range (current)) current = nullptr; } - composite_iter_t () : glyph (hb_bytes_t ()), current (nullptr), checker (range_checker_t (nullptr, 0)) {} + composite_iter_t () : glyph (hb_bytes_t ()), current (nullptr) {} const CompositeGlyphChain &__item__ () const { return *current; } bool __more__ () const { return current; } @@ -380,14 +380,13 @@ struct glyf bool in_range (const CompositeGlyphChain *composite) const { - return checker.in_range (composite, CompositeGlyphChain::min_size) - && checker.in_range (composite, composite->get_size ()); + return glyph.in_range (composite, CompositeGlyphChain::min_size) + && glyph.in_range (composite, composite->get_size ()); } private: hb_bytes_t glyph; __item_t__ current; - range_checker_t checker; }; struct Glyph @@ -537,7 +536,7 @@ struct glyf template <typename T> static bool read_points (const HBUINT8 *&p /* IN/OUT */, contour_point_vector_t &points_ /* IN/OUT */, - const range_checker_t &checker) + const hb_bytes_t &bytes) { T coord_setter; float v = 0; @@ -546,7 +545,7 @@ struct glyf uint8_t flag = points_[i].flag; if (coord_setter.is_short (flag)) { - if (unlikely (!checker.in_range (p))) return false; + if (unlikely (!bytes.in_range (p))) return false; if (coord_setter.is_same (flag)) v += *p++; else @@ -556,7 +555,7 @@ struct glyf { if (!coord_setter.is_same (flag)) { - if (unlikely (!checker.in_range ((const HBUINT16 *) p))) return false; + if (unlikely (!bytes.in_range ((const HBUINT16 *) p))) return false; v += *(const HBINT16 *) p; p += HBINT16::static_size; } @@ -571,9 +570,8 @@ struct glyf const bool phantom_only=false) const { const HBUINT16 *endPtsOfContours = &StructAfter<HBUINT16> (header); - range_checker_t checker (bytes.arrayZ, bytes.length); int num_contours = header.numberOfContours; - if (unlikely (!checker.in_range (&endPtsOfContours[num_contours + 1]))) return false; + if (unlikely (!bytes.in_range (&endPtsOfContours[num_contours + 1]))) return false; unsigned int num_points = endPtsOfContours[num_contours - 1] + 1; points_.resize (num_points + PHANTOM_COUNT); @@ -593,12 +591,12 @@ struct glyf /* Read flags */ for (unsigned int i = 0; i < num_points; i++) { - if (unlikely (!checker.in_range (p))) return false; + if (unlikely (!bytes.in_range (p))) return false; uint8_t flag = *p++; points_[i].flag = flag; if (flag & FLAG_REPEAT) { - if (unlikely (!checker.in_range (p))) return false; + if (unlikely (!bytes.in_range (p))) return false; unsigned int repeat_count = *p++; while ((repeat_count-- > 0) && (++i < num_points)) points_[i].flag = flag; @@ -606,8 +604,8 @@ struct glyf } /* Read x & y coordinates */ - return (read_points<x_setter_t> (p, points_, checker) && - read_points<y_setter_t> (p, points_, checker)); + return (read_points<x_setter_t> (p, points_, bytes) && + read_points<y_setter_t> (p, points_, bytes)); } }; @@ -808,20 +806,36 @@ struct glyf struct contour_bounds_t { - contour_bounds_t () { min.x = min.y = FLT_MAX; max.x = max.y = -FLT_MAX; } + contour_bounds_t () { min_x = min_y = FLT_MAX; max_x = max_y = -FLT_MAX; } void add (const contour_point_t &p) { - min.x = hb_min (min.x, p.x); - min.y = hb_min (min.y, p.y); - max.x = hb_max (max.x, p.x); - max.y = hb_max (max.y, p.y); + min_x = hb_min (min_x, p.x); + min_y = hb_min (min_y, p.y); + max_x = hb_max (max_x, p.x); + max_y = hb_max (max_y, p.y); } - bool empty () const { return (min.x >= max.x) || (min.y >= max.y); } + bool empty () const { return (min_x >= max_x) || (min_y >= max_y); } - contour_point_t min; - contour_point_t max; + void get_extents (hb_font_t *font, hb_glyph_extents_t *extents) + { + if (unlikely (empty ())) + { + extents->width = 0; + extents->x_bearing = 0; + extents->height = 0; + extents->y_bearing = 0; + return; + } + extents->x_bearing = font->em_scalef_x (min_x); + extents->width = font->em_scalef_x (max_x - min_x); + extents->y_bearing = font->em_scalef_y (max_y); + extents->height = font->em_scalef_y (min_y - max_y); + } + + protected: + float min_x, min_y, max_x, max_y; }; #ifndef HB_NO_VAR @@ -919,27 +933,7 @@ struct glyf contour_bounds_t bounds; for (unsigned int i = 0; i + PHANTOM_COUNT < all_points.length; i++) bounds.add (all_points[i]); - - if (bounds.min.x > bounds.max.x) - { - extents->width = 0; - extents->x_bearing = 0; - } - else - { - extents->x_bearing = font->em_scalef_x (bounds.min.x); - extents->width = font->em_scalef_x (bounds.max.x - bounds.min.x); - } - if (bounds.min.y > bounds.max.y) - { - extents->height = 0; - extents->y_bearing = 0; - } - else - { - extents->y_bearing = font->em_scalef_y (bounds.max.y); - extents->height = font->em_scalef_y (bounds.min.y - bounds.max.y); - } + bounds.get_extents (font, extents); } if (phantoms) for (unsigned int i = 0; i < PHANTOM_COUNT; i++) @@ -953,7 +947,7 @@ struct glyf bool get_extents_var (hb_font_t *font, hb_codepoint_t gid, hb_glyph_extents_t *extents) const - { return get_var_extents_and_phantoms (font, gid, extents); } + { return get_var_extents_and_phantoms (font, gid, extents); } #endif public: diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-gvar-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-gvar-table.hh index 666b3089521..a76121d8605 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-gvar-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-gvar-table.hh @@ -78,23 +78,6 @@ struct contour_point_vector_t : hb_vector_t<contour_point_t> } }; -struct range_checker_t -{ - range_checker_t (const void *data_, unsigned int length_) - : data ((const char *) data_), length (length_) {} - - template <typename T> - bool in_range (const T *p, unsigned int size = T::static_size) const - { - return ((const char *) p) >= data - && ((const char *) p + size) <= data + length; - } - - protected: - const char *data; - const unsigned int length; -}; - struct Tuple : UnsizedArrayOf<F2DOT14> {}; struct TuppleIndex : HBUINT16 @@ -233,10 +216,10 @@ struct GlyphVarData { if (var_data->has_shared_point_numbers ()) { - range_checker_t checker (var_data, length); + hb_bytes_t bytes ((const char *) var_data, length); const HBUINT8 *base = &(var_data+var_data->data); const HBUINT8 *p = base; - if (!unpack_points (p, shared_indices, checker)) return false; + if (!unpack_points (p, shared_indices, bytes)) return false; data_offset = p - base; } return true; @@ -292,7 +275,7 @@ struct GlyphVarData static bool unpack_points (const HBUINT8 *&p /* IN/OUT */, hb_vector_t<unsigned int> &points /* OUT */, - const range_checker_t &check) + const hb_bytes_t &bytes) { enum packed_point_flag_t { @@ -300,12 +283,12 @@ struct GlyphVarData POINT_RUN_COUNT_MASK = 0x7F }; - if (unlikely (!check.in_range (p))) return false; + if (unlikely (!bytes.in_range (p))) return false; uint16_t count = *p++; if (count & POINTS_ARE_WORDS) { - if (unlikely (!check.in_range (p))) return false; + if (unlikely (!bytes.in_range (p))) return false; count = ((count & POINT_RUN_COUNT_MASK) << 8) | *p++; } points.resize (count); @@ -314,7 +297,7 @@ struct GlyphVarData uint16_t i = 0; while (i < count) { - if (unlikely (!check.in_range (p))) return false; + if (unlikely (!bytes.in_range (p))) return false; uint16_t j; uint8_t control = *p++; uint16_t run_count = (control & POINT_RUN_COUNT_MASK) + 1; @@ -322,7 +305,7 @@ struct GlyphVarData { for (j = 0; j < run_count && i < count; j++, i++) { - if (unlikely (!check.in_range ((const HBUINT16 *) p))) + if (unlikely (!bytes.in_range ((const HBUINT16 *) p))) return false; n += *(const HBUINT16 *)p; points[i] = n; @@ -333,7 +316,7 @@ struct GlyphVarData { for (j = 0; j < run_count && i < count; j++, i++) { - if (unlikely (!check.in_range (p))) return false; + if (unlikely (!bytes.in_range (p))) return false; n += *p++; points[i] = n; } @@ -345,7 +328,7 @@ struct GlyphVarData static bool unpack_deltas (const HBUINT8 *&p /* IN/OUT */, hb_vector_t<int> &deltas /* IN/OUT */, - const range_checker_t &check) + const hb_bytes_t &bytes) { enum packed_delta_flag_t { @@ -358,7 +341,7 @@ struct GlyphVarData unsigned int count = deltas.length; while (i < count) { - if (unlikely (!check.in_range (p))) return false; + if (unlikely (!bytes.in_range (p))) return false; uint8_t control = *p++; unsigned int run_count = (control & DELTA_RUN_COUNT_MASK) + 1; unsigned int j; @@ -368,7 +351,7 @@ struct GlyphVarData else if (control & DELTAS_ARE_WORDS) for (j = 0; j < run_count && i < count; j++, i++) { - if (unlikely (!check.in_range ((const HBUINT16 *) p))) + if (unlikely (!bytes.in_range ((const HBUINT16 *) p))) return false; deltas[i] = *(const HBINT16 *) p; p += HBUINT16::static_size; @@ -376,7 +359,7 @@ struct GlyphVarData else for (j = 0; j < run_count && i < count; j++, i++) { - if (unlikely (!check.in_range (p))) + if (unlikely (!bytes.in_range (p))) return false; deltas[i] = *(const HBINT8 *) p++; } @@ -611,10 +594,10 @@ struct gvar if (unlikely (!iterator.in_range (p, length))) return false; - range_checker_t checker (p, length); + hb_bytes_t bytes ((const char *) p, length); hb_vector_t<unsigned int> private_indices; if (iterator.current_tuple->has_private_points () && - !GlyphVarData::unpack_points (p, private_indices, checker)) + !GlyphVarData::unpack_points (p, private_indices, bytes)) return false; const hb_array_t<unsigned int> &indices = private_indices.length ? private_indices : shared_indices; @@ -622,11 +605,11 @@ struct gvar unsigned int num_deltas = apply_to_all ? points.length : indices.length; hb_vector_t<int> x_deltas; x_deltas.resize (num_deltas); - if (!GlyphVarData::unpack_deltas (p, x_deltas, checker)) + if (!GlyphVarData::unpack_deltas (p, x_deltas, bytes)) return false; hb_vector_t<int> y_deltas; y_deltas.resize (num_deltas); - if (!GlyphVarData::unpack_deltas (p, y_deltas, checker)) + if (!GlyphVarData::unpack_deltas (p, y_deltas, bytes)) return false; for (unsigned int i = 0; i < deltas.length; i++) diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc index e537772c093..f4912f86bad 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc @@ -71,7 +71,10 @@ _cmap_closure (hb_face_t *face, const hb_set_t *unicodes, hb_set_t *glyphset) { - face->table.cmap->table->closure_glyphs (unicodes, glyphset); + OT::cmap::accelerator_t cmap; + cmap.init (face); + cmap.table->closure_glyphs (unicodes, glyphset); + cmap.fini (); } static inline void diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb.hh index f3165121762..fcbd330588e 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb.hh @@ -370,10 +370,12 @@ extern "C" void hb_free_impl(void *ptr); #define getenv(Name) nullptr #endif -#ifdef HB_NO_ERRNO -static int errno = 0; /* Use something better? */ +#ifndef HB_NO_ERRNO +# include <errno.h> #else -#include <errno.h> +static int HB_UNUSED _hb_errno = 0; +# undef errno +# define errno _hb_errno #endif #if defined(HAVE_ATEXIT) && !defined(HB_USE_ATEXIT) diff --git a/Build/source/libs/harfbuzz/version.ac b/Build/source/libs/harfbuzz/version.ac index 65a8e5045c5..67d67cb2d80 100644 --- a/Build/source/libs/harfbuzz/version.ac +++ b/Build/source/libs/harfbuzz/version.ac @@ -8,4 +8,4 @@ dnl dnl -------------------------------------------------------- dnl dnl m4-include this file to define the current harfbuzz version -m4_define([harfbuzz_version], [2.6.3]) +m4_define([harfbuzz_version], [2.6.4]) |