summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-07-04 07:14:37 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-07-04 07:14:37 +0000
commit9d5e239b66f12f75c7e0b7c869bbacd18429130d (patch)
treeb6ec3a404dc034983673de93a837ec12650d63b5 /Build
parentd5588d938102254b0cf8345cdca07b6ca6dabb7d (diff)
harfbuzz 1.8.2
git-svn-id: svn://tug.org/texlive/trunk@48132 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/libs/README2
-rw-r--r--Build/source/libs/harfbuzz/ChangeLog4
-rw-r--r--Build/source/libs/harfbuzz/TLpatches/ChangeLog5
-rw-r--r--Build/source/libs/harfbuzz/TLpatches/TL-Changes2
-rwxr-xr-xBuild/source/libs/harfbuzz/configure24
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog338
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/NEWS8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/configure.ac2
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.cc124
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-file-private.hh196
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type-private.hh1
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common-private.hh17
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh5
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc13
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc31
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh3
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/main.cc3
-rw-r--r--Build/source/libs/harfbuzz/version.ac2
20 files changed, 703 insertions, 89 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README
index 1d55f12d00b..fed17f86f88 100644
--- a/Build/source/libs/README
+++ b/Build/source/libs/README
@@ -24,7 +24,7 @@ gmp 6.1.2 - checked 16dec16
graphite2 1.3.11 - checked 05mar18
http://sourceforge.net/projects/silgraphite/files/graphite2/
-harfbuzz 1.8.1 - checked 15jun18
+harfbuzz 1.8.2 - checked 05jul18
http://www.freedesktop.org/software/harfbuzz/release/
icu 61.1 - checked 29mar18
diff --git a/Build/source/libs/harfbuzz/ChangeLog b/Build/source/libs/harfbuzz/ChangeLog
index f583190c11e..fdc132da6df 100644
--- a/Build/source/libs/harfbuzz/ChangeLog
+++ b/Build/source/libs/harfbuzz/ChangeLog
@@ -1,3 +1,7 @@
+2018-07-04 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ Import harfbuzz-1.8.2.
+
2018-06-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
Import harfbuzz-1.8.1.
diff --git a/Build/source/libs/harfbuzz/TLpatches/ChangeLog b/Build/source/libs/harfbuzz/TLpatches/ChangeLog
index da8b2044137..723d72a3b9d 100644
--- a/Build/source/libs/harfbuzz/TLpatches/ChangeLog
+++ b/Build/source/libs/harfbuzz/TLpatches/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-04 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ Imported harfbuzz-1.8.2 source tree from:
+ http://www.freedesktop.org/software/harfbuzz/release/
+
2018-06-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
Imported harfbuzz-1.8.1 source tree from:
diff --git a/Build/source/libs/harfbuzz/TLpatches/TL-Changes b/Build/source/libs/harfbuzz/TLpatches/TL-Changes
index 283523019f8..1badc257ec8 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-1.8.1/ tree as obtained from:
+Changes applied to the harfbuzz-1.8.2/ 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 daf40de927f..745587eda52 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) 1.8.1.
+# Generated by GNU Autoconf 2.69 for harfbuzz (TeX Live) 1.8.2.
#
# 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='1.8.1'
-PACKAGE_STRING='harfbuzz (TeX Live) 1.8.1'
+PACKAGE_VERSION='1.8.2'
+PACKAGE_STRING='harfbuzz (TeX Live) 1.8.2'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
@@ -1317,7 +1317,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) 1.8.1 to adapt to many kinds of systems.
+\`configure' configures harfbuzz (TeX Live) 1.8.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1388,7 +1388,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of harfbuzz (TeX Live) 1.8.1:";;
+ short | recursive ) echo "Configuration of harfbuzz (TeX Live) 1.8.2:";;
esac
cat <<\_ACEOF
@@ -1495,7 +1495,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-harfbuzz (TeX Live) configure 1.8.1
+harfbuzz (TeX Live) configure 1.8.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2131,7 +2131,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 1.8.1, which was
+It was created by harfbuzz (TeX Live) $as_me 1.8.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -4054,7 +4054,7 @@ fi
# Define the identity of the package.
PACKAGE='harfbuzz--tex-live-'
- VERSION='1.8.1'
+ VERSION='1.8.2'
# Some tools Automake needs.
@@ -4248,8 +4248,8 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags
HB_VERSION_MAJOR=1
HB_VERSION_MINOR=8
-HB_VERSION_MICRO=1
-HB_VERSION=1.8.1
+HB_VERSION_MICRO=2
+HB_VERSION=1.8.2
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -8140,7 +8140,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 1.8.1, which was
+This file was extended by harfbuzz (TeX Live) $as_me 1.8.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -8206,7 +8206,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 1.8.1
+harfbuzz (TeX Live) config.status 1.8.2
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 73314711964..2ea2db34012 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
@@ -1,3 +1,341 @@
+commit 29e7879bcf3fe955a0be3bb41e929e68f39ad01e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 3 12:38:21 2018 +0430
+
+ Disable .dfont code for now
+
+ The get_table imple was wrong, as table offsets in a dfont are
+ relative to the resource. We were treating them as relative to
+ the big blob itself. To be fixed.
+
+ Part of https://github.com/harfbuzz/harfbuzz/pull/1085
+
+ src/hb-open-file-private.hh | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 32348a43c154eac6bfb21b9e8044b38ed763601e
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Sun Jul 1 15:32:43 2018 +0430
+
+ Fix trak table apply logic
+
+ In collaboration with Behdad
+
+ src/hb-aat-layout-trak-table.hh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 225b92b7d4437360f8779850ee0aae85966679b5
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Sun Jul 1 14:32:00 2018 +0430
+
+ Support dfont font files (#949)
+
+ src/hb-open-file-private.hh | 196
+ ++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-open-type-private.hh | 1 +
+ src/main.cc | 3 +
+ 3 files changed, 200 insertions(+)
+
+commit 5d8cafcf6a47ce73afff06499f6be23c72ab6797
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Sun Jul 1 01:54:14 2018 +0430
+
+ Improve nommap naming and use C style comments on create_from_file
+ (#1084)
+
+ .circleci/config.yml | 2 +-
+ src/hb-blob.cc | 16 ++++++++--------
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
+commit d3c0980ac234698627cb281e5526cc99139eed30
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 30 15:59:25 2018 +0430
+
+ Adjust MarkBasePos heuristic in presence of MultipleSubst
+
+ From the issue:
+ "In this font, the virama,ya first forms a ligature, then decomposes
+ back to
+ virama,ya. This causes those two to be marked parts of a MultipleSubst
+ sequence. When attaching the matra, we look for the first of the
+ MultipleSubst
+ sequence because that's where we attach to (because of eg #740). In
+ this case,
+ the first glyph in the MultipleSubst sequence is a mark, so we skip
+ it and
+ attach to the base char before it."
+
+ Font in question is Nirmala UI from Windows 10. Test sequence:
+
+ U+0926,U+094D,U+092F,U+0941
+
+ Fixes https://github.com/harfbuzz/harfbuzz/issues/1020
+
+ src/hb-ot-layout-gpos-table.hh | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+commit 8b9cbe3b24be2ae0166e682103e22ec916316ecf
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 30 12:28:03 2018 +0430
+
+ [indic] Tweak for old-spec Bengali and halant-ya-halant
+
+ Fixes https://github.com/harfbuzz/harfbuzz/issues/1073
+
+ src/hb-ot-shape-complex-indic.cc | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+commit 9541c9dae10156fb61e4786545d1976cdcfb6bda
+Author: punchcutter <zarijoscha@gmail.com>
+Date: Sun Jun 24 22:54:57 2018 -0700
+
+ Rebase and update USE overrides for Bhaiksuki Gap Fillers and
+ Grantha Anusvara
+
+ src/gen-use-table.py | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+commit 7b8dfac560abe89d48cfc2f6efb4a61820bd28bf
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 30 09:16:54 2018 +0430
+
+ [khmer] Fix infinite-loop in cluster merging
+
+ Indic shaper already had this check. We removed it when forking
+ Khmer shaper by mistake.
+
+ Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1464623
+
+ src/hb-ot-shape-complex-khmer.cc | 31 +++++++++++++++++--------------
+ 1 file changed, 17 insertions(+), 14 deletions(-)
+
+commit 25970a93aa6596d50ae538c6274625f95153572c
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Thu Jun 28 14:32:36 2018 +0430
+
+ armcc compatibility, don't use EINTR if doesn't exist
+
+ Fixes #1081
+
+ src/hb-blob.cc | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 8a51f91b7035bbfaf39af1b962faf1613d2ea3b7
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Thu Jun 28 13:22:21 2018 +0430
+
+ Minor on hb_blob_create_from_file, reuse ferror result
+
+ Oops
+
+ src/hb-blob.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 71971800ed1c0501a58e6ff7730e3cebec2ef2f8
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Wed Jun 27 18:14:52 2018 +0430
+
+ [ci] Don't fail on apt update and revive clang-O3-O0
+
+ .circleci/config.yml | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 7b4099f35f766d33d483a4b9d0805ef16020ea23
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Wed Jun 27 16:54:44 2018 +0430
+
+ Minor, rename blob to data on blob_from_file
+
+ src/hb-blob.cc | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+commit fa090ed4d47df12b2e611c9a667c398742f7e4ba
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Wed Jun 27 14:13:26 2018 +0430
+
+ Minor touches on hb_blob_create_from_file (#1079)
+
+ * Handle EINTR on fallback reader
+ * Increase fallback reader limitation size limitation to 2 << 28
+ * Ensure _O_BINARY does exist if MMAP is used on Windows
+ (maybe superfluous but makes me more confident)
+
+ src/hb-blob.cc | 22 +++++++++++++---------
+ 1 file changed, 13 insertions(+), 9 deletions(-)
+
+commit 01dff1ea1aa871fa19a92c2afd63c8cb5dd6e455
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 26 18:00:58 2018 -0400
+
+ Make round() fallback portable to systems that do have round()
+
+ Makes compiling without HAVE_ROUND on systems that do have it work.
+
+ src/hb-private.hh | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 7db2e9ea38329b9393c9e8cc905b180735c9b0f4
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Tue Jun 26 10:46:10 2018 +0430
+
+ Minor on hb_blob_create_from_file
+
+ Add one more "unlikely" annotation and use explicit nullptr check
+ for more consistency.
+
+ src/hb-blob.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 4f8753464ae44dfb60bee81ede10448175db7b90
+Author: Garret Rieger <grieger@google.com>
+Date: Fri Jun 22 15:29:34 2018 -0700
+
+ [subset] Add fuzzer test case that caused a timeout to the corpus.
+
+ ...testcase-minimized-hb-subset-fuzzer-5750092395970560 | Bin 0 ->
+ 72435 bytes
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+
+commit 35ce8f31d37cf7c2a1f8265d36ba4c2c9a3efb2c
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Mon Jun 25 22:23:43 2018 +0430
+
+ Unify our pipe reader with the fallback reader (#1068)
+
+ And assign one bot to use the path always using NOMMAPFILEREADER
+ token.
+
+ It's limited to 200mb so no more fun with using /dev/zero on hb-view!
+
+ .circleci/config.yml | 6 +-
+ src/hb-blob.cc | 152
+ ++++++++++++++++++++++-----------------------------
+ 2 files changed, 68 insertions(+), 90 deletions(-)
+
+commit f57804a8a596e88843ddc8b88afac7526349b89b
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Mon Jun 25 18:45:49 2018 +0430
+
+ Resolve ttx absolute path before use (#1075)
+
+ test/subset/run-tests.py | 101
+ ++++++++++++++++++++++++++---------------------
+ 1 file changed, 57 insertions(+), 44 deletions(-)
+
+commit 159ddb872986f121818e816d2ea75d271075ba1f
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Sun Jun 24 23:09:16 2018 +0430
+
+ Treat - just as /dev/stdin and remove one extra file reader (#1065)
+
+ util/options.cc | 27 +++++++++------------------
+ 1 file changed, 9 insertions(+), 18 deletions(-)
+
+commit b2a187918757a0faaf0f564ec2b0766c09fa364c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 23 10:32:28 2018 -0400
+
+ In Coverage iterator, bail out if table smells
+
+ In particular, if CoverageFormat2 has unsorted ranges, bail out.
+ Otherwise, 64k ranges of each 64k glyphs can DoS closure() method.
+
+ We can do the same for CoverageFormat1, but that one does not expose
+ the quadratic behavior, so, fine.
+
+ src/hb-ot-layout-common-private.hh | 17 +++++++++++++++--
+ 1 file changed, 15 insertions(+), 2 deletions(-)
+
+commit 941f2b85489b344698bf036922c589483034a7f2
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Mon Jun 18 20:35:40 2018 +0430
+
+ Support pipe and friends on hb_blob_create_from_file (#1061)
+
+ With this hb-view/hb-shape support pipes and possibly socket and
+ named pipe
+ also, anything fails just on mmap.
+
+ We can later do the same for Windows also.
+
+ This however reveals two issues, the fact most of our bots don't
+ have HAVE_MMAP and using
+ this instead the other fread/fopen reader can make failure on CI. I
+ should look at them separately
+ this change however is very low risk I believe.
+
+ src/hb-blob.cc | 44 +++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 43 insertions(+), 1 deletion(-)
+
+commit d0c2889dfc43da92c76d6eab5482b1298744dc9c
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Mon Jun 18 19:59:33 2018 +0430
+
+ Revert file blob sanitization and index checking (#1062)
+
+ As
+ https://github.com/harfbuzz/harfbuzz/pull/1059#issuecomment-397912812
+ we
+ like to still work with blobs that harfbuzz itself can't handle
+ directly that are failing sanitization
+ currently apparently.
+
+ util/options.cc | 12 ++----------
+ util/options.hh | 2 +-
+ 2 files changed, 3 insertions(+), 11 deletions(-)
+
+commit c53697d3f2a3fae8b68ec4c5146c7000a07e0963
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Sun Jun 17 17:04:55 2018 +0430
+
+ Verbose fail when something is wrong with hb-shape/hb-view input
+ font file (#1059)
+
+ This checks if the blob isn't empty and uses `hb_face_count`
+ to see if the font file passes the simple font file sanitization
+ so can detect if the input is actually a font and checks also
+ whether input font-index is out of range.
+
+ util/options.cc | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+commit aa0c5df4199ef4e96df2b856c8f629e49fdd5120
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Sun Jun 17 16:49:34 2018 +0430
+
+ Fix reading fonts from stdin (#1060)
+
+ We were passing the font path directly to freetype so rendering
+ was broken when we are getting the font from stdin.
+
+ This fixes it by using FT_New_Memory_Face instead.
+
+ This fixes:
+ * build/util/hb-view /dev/stdin text < font.ttf
+ * build/util/hb-view - text < font.ttf
+ * cat font.ttf | build/util/hb-view - text
+
+ but doesn't work on
+ * cat font.ttf | build/util/hb-view /dev/stdin text
+
+ which I will try to fix separately.
+
+ util/helper-cairo.cc | 14 ++++++++++----
+ util/options.cc | 5 ++---
+ util/options.hh | 4 +++-
+ 3 files changed, 15 insertions(+), 8 deletions(-)
+
+commit 3654d9be6b017e66307fe0ffe635266938b14702
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 12 19:38:04 2018 -0400
+
+ 1.8.1
+
+ NEWS | 8 ++++++++
+ configure.ac | 2 +-
+ src/hb-version.h | 4 ++--
+ 3 files changed, 11 insertions(+), 3 deletions(-)
+
commit f3e58ab8a957cdf36bddef793c473664744885a7
Author: Behdad Esfahbod <behdad@behdad.org>
Date: Tue Jun 12 19:32:04 2018 -0400
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
index 12010bdd9ef..c4fad25a928 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 1.8.2
+Tuesday, July 3, 2018
+====================================
+- Fix infinite loop in Khmer shaper.
+- Improve hb_blob_create_from_file() for streams.
+
+
Overview of changes leading to 1.8.1
Tuesday, June 12, 2018
====================================
@@ -5,6 +12,7 @@ Tuesday, June 12, 2018
- Add correctness bug in hb_set_t operations, introduced in 1.7.7.
- Remove HB_SUBSET_BUILTIN build option. Not necessary.
+
Overview of changes leading to 1.8.0
Tuesday, June 5, 2018
====================================
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac b/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
index 13cd1ce0d18..d6c23e53c01 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],
- [1.8.1],
+ [1.8.2],
[https://github.com/harfbuzz/harfbuzz/issues/new],
[harfbuzz],
[http://harfbuzz.org/])
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
index 6aa5f881c73..e7c621cac49 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
@@ -47,6 +47,9 @@ defaults = ('Other', 'Not_Applicable', 'Cn', 'No_Block')
data[0][0x034F] = defaults[0]
data[0][0x2060] = defaults[0]
data[0][0x20F0] = defaults[0]
+# TODO https://github.com/roozbehp/unicode-data/issues/9
+data[0][0x11C44] = 'Consonant_Placeholder'
+data[0][0x11C45] = 'Consonant_Placeholder'
for u in range (0xFE00, 0xFE0F + 1):
data[0][u] = defaults[0]
@@ -165,7 +168,7 @@ def is_BASE(U, UISC, UGC):
def is_BASE_IND(U, UISC, UGC):
#SPEC-DRAFT return (UISC in [Consonant_Dead, Modifying_Letter] or UGC == Po)
return (UISC in [Consonant_Dead, Modifying_Letter] or
- (UGC == Po and not U in [0x104B, 0x104E, 0x2022, 0x11A3F, 0x11A45]) or
+ (UGC == Po and not U in [0x104B, 0x104E, 0x2022, 0x11A3F, 0x11A45, 0x11C44, 0x11C45]) or
False # SPEC-DRAFT-OUTDATED! U == 0x002D
)
def is_BASE_NUM(U, UISC, UGC):
@@ -344,6 +347,9 @@ def map_to_use(data):
if 0xA926 <= U <= 0xA92A: UIPC = Top
if U == 0x111CA: UIPC = Bottom
if U == 0x11300: UIPC = Top
+ # TODO: https://github.com/harfbuzz/harfbuzz/pull/1037
+ if U == 0x11302: UIPC = Top
+ if U == 0x1133C: UIPC = Bottom
if U == 0x1171E: UIPC = Left # Correct?!
if 0x1CF2 <= U <= 0x1CF3: UIPC = Right
if 0x1CF8 <= U <= 0x1CF9: UIPC = Top
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh
index 0617e23d517..f5dc558c3fe 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh
@@ -172,7 +172,7 @@ struct trak
hb_position_t advance_to_add = c->font->em_scalef_x (tracking / 2);
foreach_grapheme (buffer, start, end)
{
- /* TODO This is wrong. */
+ buffer->pos[start].x_offset += advance_to_add;
buffer->pos[start].x_advance += advance_to_add;
buffer->pos[end].x_advance += advance_to_add;
}
@@ -184,7 +184,7 @@ struct trak
hb_position_t advance_to_add = c->font->em_scalef_y (tracking / 2);
foreach_grapheme (buffer, start, end)
{
- /* TODO This is wrong. */
+ buffer->pos[start].y_offset += advance_to_add;
buffer->pos[start].y_advance += advance_to_add;
buffer->pos[end].y_advance += advance_to_add;
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.cc
index c138648ca7b..98e9c65c23d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.cc
@@ -489,10 +489,10 @@ hb_blob_t::try_make_writable (void)
#if defined(_WIN32) || defined(__CYGWIN__)
# include <windows.h>
-#endif
-
-#ifndef _O_BINARY
-# define _O_BINARY 0
+#else
+# ifndef _O_BINARY
+# define _O_BINARY 0
+# endif
#endif
#ifndef MAP_NORESERVE
@@ -517,7 +517,7 @@ _hb_mapped_file_destroy (hb_mapped_file_t *file)
UnmapViewOfFile (file->contents);
CloseHandle (file->mapping);
#else
- free (file->contents);
+ assert (0); // If we don't have mmap we shouldn't reach here
#endif
free (file);
@@ -534,77 +534,103 @@ _hb_mapped_file_destroy (hb_mapped_file_t *file)
hb_blob_t *
hb_blob_create_from_file (const char *file_name)
{
- // Adopted from glib's gmappedfile.c with Matthias Clasen and
- // Allison Lortie permission but changed a lot to suit our need.
- bool writable = false;
- hb_memory_mode_t mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
+ /* Adopted from glib's gmappedfile.c with Matthias Clasen and
+ Allison Lortie permission but changed a lot to suit our need. */
+#if defined(HAVE_MMAP) && !defined(HB_NO_MMAP)
hb_mapped_file_t *file = (hb_mapped_file_t *) calloc (1, sizeof (hb_mapped_file_t));
if (unlikely (!file)) return hb_blob_get_empty ();
-#ifdef HAVE_MMAP
- int fd = open (file_name, (writable ? O_RDWR : O_RDONLY) | _O_BINARY, 0);
-# define CLOSE close
+ int fd = open (file_name, O_RDONLY | _O_BINARY, 0);
if (unlikely (fd == -1)) goto fail_without_close;
struct stat st;
if (unlikely (fstat (fd, &st) == -1)) goto fail;
- // See https://github.com/GNOME/glib/blob/f9faac7/glib/gmappedfile.c#L139-L142
- if (unlikely (st.st_size == 0 && S_ISREG (st.st_mode))) goto fail;
-
file->length = (unsigned long) st.st_size;
- file->contents = (char *) mmap (nullptr, file->length,
- writable ? PROT_READ|PROT_WRITE : PROT_READ,
+ file->contents = (char *) mmap (nullptr, file->length, PROT_READ,
MAP_PRIVATE | MAP_NORESERVE, fd, 0);
if (unlikely (file->contents == MAP_FAILED)) goto fail;
-#elif defined(_WIN32) || defined(__CYGWIN__)
- HANDLE fd = CreateFile (file_name,
- writable ? GENERIC_READ|GENERIC_WRITE : GENERIC_READ,
- FILE_SHARE_READ, nullptr, OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, nullptr);
-# define CLOSE CloseHandle
+ close (fd);
+
+ return hb_blob_create (file->contents, file->length,
+ HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE, (void *) file,
+ (hb_destroy_func_t) _hb_mapped_file_destroy);
+
+fail:
+ close (fd);
+fail_without_close:
+ free (file);
+
+#elif (defined(_WIN32) || defined(__CYGWIN__)) && !defined(HB_NO_MMAP)
+ hb_mapped_file_t *file = (hb_mapped_file_t *) calloc (1, sizeof (hb_mapped_file_t));
+ if (unlikely (!file)) return hb_blob_get_empty ();
+
+ HANDLE fd = CreateFile (file_name, GENERIC_READ, FILE_SHARE_READ, nullptr,
+ OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL|FILE_FLAG_OVERLAPPED,
+ nullptr);
if (unlikely (fd == INVALID_HANDLE_VALUE)) goto fail_without_close;
file->length = (unsigned long) GetFileSize (fd, nullptr);
- file->mapping = CreateFileMapping (fd, nullptr,
- writable ? PAGE_WRITECOPY : PAGE_READONLY,
- 0, 0, nullptr);
+ file->mapping = CreateFileMapping (fd, nullptr, PAGE_READONLY, 0, 0, nullptr);
if (unlikely (file->mapping == nullptr)) goto fail;
- file->contents = (char *) MapViewOfFile (file->mapping,
- writable ? FILE_MAP_COPY : FILE_MAP_READ,
- 0, 0, 0);
+ file->contents = (char *) MapViewOfFile (file->mapping, FILE_MAP_READ, 0, 0, 0);
if (unlikely (file->contents == nullptr)) goto fail;
-#else
- mm = HB_MEMORY_MODE_WRITABLE;
+ CloseHandle (fd);
+ return hb_blob_create (file->contents, file->length,
+ HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE, (void *) file,
+ (hb_destroy_func_t) _hb_mapped_file_destroy);
- FILE *fd = fopen (file_name, "rb");
-# define CLOSE fclose
- if (unlikely (!fd)) goto fail_without_close;
+fail:
+ CloseHandle (fd);
+fail_without_close:
+ free (file);
- fseek (fd, 0, SEEK_END);
- file->length = ftell (fd);
- rewind (fd);
- file->contents = (char *) malloc (file->length);
- if (unlikely (!file->contents)) goto fail;
+#endif
- if (unlikely (fread (file->contents, 1, file->length, fd) != file->length))
- goto fail;
+ /* The following tries to read a file without knowing its size beforehand
+ It's used as a fallback for systems without mmap or to read from pipes */
+ unsigned long len = 0, allocated = BUFSIZ * 16;
+ char *data = (char *) malloc (allocated);
+ if (unlikely (data == nullptr)) return hb_blob_get_empty ();
+
+ FILE *fp = fopen (file_name, "rb");
+ if (unlikely (fp == nullptr)) goto fread_fail_without_close;
+
+ while (!feof (fp))
+ {
+ if (allocated - len < BUFSIZ)
+ {
+ allocated *= 2;
+ /* Don't allocate and go more than ~536MB, our mmap reader still
+ can cover files like that but lets limit our fallback reader */
+ if (unlikely (allocated > (2 << 28))) goto fread_fail;
+ char *new_data = (char *) realloc (data, allocated);
+ if (unlikely (new_data == nullptr)) goto fread_fail;
+ data = new_data;
+ }
+ unsigned long addition = fread (data + len, 1, allocated - len, fp);
+
+ int err = ferror (fp);
+#ifdef EINTR // armcc doesn't have it
+ if (unlikely (err == EINTR)) continue;
#endif
+ if (unlikely (err)) goto fread_fail;
- CLOSE (fd);
- return hb_blob_create (file->contents, file->length, mm, (void *) file,
- (hb_destroy_func_t) _hb_mapped_file_destroy);
+ len += addition;
+ }
-fail:
- CLOSE (fd);
-#undef CLOSE
-fail_without_close:
- free (file);
+ return hb_blob_create (data, len, HB_MEMORY_MODE_WRITABLE, data,
+ (hb_destroy_func_t) free);
+
+fread_fail:
+ fclose (fp);
+fread_fail_without_close:
+ free (data);
return hb_blob_get_empty ();
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-file-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-file-private.hh
index 2965b46263a..226c48f6a32 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-file-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-file-private.hh
@@ -286,6 +286,197 @@ struct TTCHeader
} u;
};
+/*
+ * Mac Resource Fork
+ */
+
+struct ResourceRefItem
+{
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ // actual data sanitization is done on ResourceForkHeader sanitizer
+ return_trace (likely (c->check_struct (this)));
+ }
+
+ HBINT16 id; /* Resource ID, is really should be signed? */
+ HBINT16 nameOffset; /* Offset from beginning of resource name list
+ * to resource name, minus means there is no */
+ HBUINT8 attr; /* Resource attributes */
+ HBUINT24 dataOffset; /* Offset from beginning of resource data to
+ * data for this resource */
+ HBUINT32 reserved; /* Reserved for handle to resource */
+ public:
+ DEFINE_SIZE_STATIC (12);
+};
+
+struct ResourceTypeItem
+{
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ // RefList sanitization is done on ResourceMap sanitizer
+ return_trace (likely (c->check_struct (this)));
+ }
+
+ inline unsigned int get_resource_count () const
+ {
+ return numRes + 1;
+ }
+
+ inline bool is_sfnt () const
+ {
+ return type == HB_TAG ('s','f','n','t');
+ }
+
+ inline const ResourceRefItem& get_ref_item (const void *base,
+ unsigned int i) const
+ {
+ return (base+refList)[i];
+ }
+
+ protected:
+ Tag type; /* Resource type */
+ HBUINT16 numRes; /* Number of resource this type in map minus 1 */
+ OffsetTo<UnsizedArrayOf<ResourceRefItem> >
+ refList; /* Offset from beginning of resource type list
+ * to reference list for this type */
+ public:
+ DEFINE_SIZE_STATIC (8);
+};
+
+struct ResourceMap
+{
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ if (unlikely (!c->check_struct (this)))
+ return_trace (false);
+ for (unsigned int i = 0; i < get_types_count (); ++i)
+ {
+ const ResourceTypeItem& type = get_type (i);
+ if (unlikely (!type.sanitize (c)))
+ return_trace (false);
+ for (unsigned int j = 0; j < type.get_resource_count (); ++j)
+ if (unlikely (!get_ref_item (type, j).sanitize (c)))
+ return_trace (false);
+ }
+ return_trace (true);
+ }
+
+ inline const ResourceTypeItem& get_type (unsigned int i) const
+ {
+ // Why offset from the second byte of the object? I'm not sure
+ return ((&reserved[2])+typeList)[i];
+ }
+
+ inline unsigned int get_types_count () const
+ {
+ return nTypes + 1;
+ }
+
+ inline const ResourceRefItem &get_ref_item (const ResourceTypeItem &type,
+ unsigned int i) const
+ {
+ return type.get_ref_item (&(this+typeList), i);
+ }
+
+ inline const PString& get_name (const ResourceRefItem &item,
+ unsigned int i) const
+ {
+ if (item.nameOffset == -1)
+ return Null (PString);
+
+ return StructAtOffset<PString> (this, nameList + item.nameOffset);
+ }
+
+ protected:
+ HBUINT8 reserved[16]; /* Reserved for copy of resource header */
+ LOffsetTo<ResourceMap>
+ reserved1; /* Reserved for handle to next resource map */
+ HBUINT16 reserved2; /* Reserved for file reference number */
+ HBUINT16 attr; /* Resource fork attribute */
+ OffsetTo<UnsizedArrayOf<ResourceTypeItem> >
+ typeList; /* Offset from beginning of map to
+ * resource type list */
+ HBUINT16 nameList; /* Offset from beginning of map to
+ * resource name list */
+ HBUINT16 nTypes; /* Number of types in the map minus 1 */
+ public:
+ DEFINE_SIZE_STATIC (30);
+};
+
+struct ResourceForkHeader
+{
+ inline unsigned int get_face_count () const
+ {
+ const ResourceMap &resource_map = this+map;
+ for (unsigned int i = 0; i < resource_map.get_types_count (); ++i)
+ {
+ const ResourceTypeItem& type = resource_map.get_type (i);
+ if (type.is_sfnt ())
+ return type.get_resource_count ();
+ }
+ return 0;
+ }
+
+ inline const LArrayOf<HBUINT8>& get_data (const ResourceTypeItem& type,
+ unsigned int idx) const
+ {
+ const ResourceMap &resource_map = this+map;
+ unsigned int offset = dataOffset;
+ offset += resource_map.get_ref_item (type, idx).dataOffset;
+ return StructAtOffset<LArrayOf<HBUINT8> > (this, offset);
+ }
+
+ inline const OpenTypeFontFace& get_face (unsigned int idx) const
+ {
+ const ResourceMap &resource_map = this+map;
+ for (unsigned int i = 0; i < resource_map.get_types_count (); ++i)
+ {
+ const ResourceTypeItem& type = resource_map.get_type (i);
+ if (type.is_sfnt () && idx < type.get_resource_count ())
+ return (OpenTypeFontFace&) get_data (type, idx).arrayZ;
+ }
+ return Null (OpenTypeFontFace);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ if (unlikely (!c->check_struct (this)))
+ return_trace (false);
+
+ const ResourceMap &resource_map = this+map;
+ if (unlikely (!resource_map.sanitize (c)))
+ return_trace (false);
+
+ for (unsigned int i = 0; i < resource_map.get_types_count (); ++i)
+ {
+ const ResourceTypeItem& type = resource_map.get_type (i);
+ for (unsigned int j = 0; j < type.get_resource_count (); ++j)
+ {
+ const LArrayOf<HBUINT8>& data = get_data (type, j);
+ if (unlikely (!(data.sanitize (c) &&
+ ((OpenTypeFontFace&) data.arrayZ).sanitize (c))))
+ return_trace (false);
+ }
+ }
+
+ return_trace (true);
+ }
+
+ protected:
+ HBUINT32 dataOffset; /* Offset from beginning of resource fork
+ * to resource data */
+ LOffsetTo<ResourceMap>
+ map; /* Offset from beginning of resource fork
+ * to resource map */
+ HBUINT32 dataLen; /* Length of resource data */
+ HBUINT32 mapLen; /* Length of resource map */
+ public:
+ DEFINE_SIZE_STATIC (16);
+};
/*
* OpenType Font File
@@ -299,6 +490,7 @@ struct OpenTypeFontFile
CFFTag = HB_TAG ('O','T','T','O'), /* OpenType with Postscript outlines */
TrueTypeTag = HB_TAG ( 0 , 1 , 0 , 0 ), /* OpenType with TrueType outlines */
TTCTag = HB_TAG ('t','t','c','f'), /* TrueType Collection */
+ DFontTag = HB_TAG ( 0 , 0 , 1 , 0 ), /* DFont Mac Resource Fork */
TrueTag = HB_TAG ('t','r','u','e'), /* Obsolete Apple TrueType */
Typ1Tag = HB_TAG ('t','y','p','1') /* Obsolete Apple Type1 font in SFNT container */
};
@@ -313,6 +505,7 @@ struct OpenTypeFontFile
case Typ1Tag:
case TrueTypeTag: return 1;
case TTCTag: return u.ttcHeader.get_face_count ();
+// case DFontTag: return u.rfHeader.get_face_count ();
default: return 0;
}
}
@@ -327,6 +520,7 @@ struct OpenTypeFontFile
case Typ1Tag:
case TrueTypeTag: return u.fontFace;
case TTCTag: return u.ttcHeader.get_face (i);
+// case DFontTag: return u.rfHeader.get_face (i);
default: return Null(OpenTypeFontFace);
}
}
@@ -353,6 +547,7 @@ struct OpenTypeFontFile
case Typ1Tag:
case TrueTypeTag: return_trace (u.fontFace.sanitize (c));
case TTCTag: return_trace (u.ttcHeader.sanitize (c));
+// case DFontTag: return_trace (u.rfHeader.sanitize (c));
default: return_trace (true);
}
}
@@ -362,6 +557,7 @@ struct OpenTypeFontFile
Tag tag; /* 4-byte identifier. */
OpenTypeFontFace fontFace;
TTCHeader ttcHeader;
+ ResourceForkHeader rfHeader;
} u;
public:
DEFINE_SIZE_UNION (4, tag);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type-private.hh
index 8180287d494..9a4835b8920 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type-private.hh
@@ -1033,6 +1033,7 @@ struct ArrayOf
DEFINE_SIZE_ARRAY (sizeof (LenType), arrayZ);
};
template <typename Type> struct LArrayOf : ArrayOf<Type, HBUINT32> {};
+typedef ArrayOf<HBUINT8, HBUINT8> PString;
/* Array of Offset's */
template <typename Type, typename OffsetType=HBUINT16>
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common-private.hh
index 763ea92f935..ff9c5650f69 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common-private.hh
@@ -832,7 +832,12 @@ struct CoverageFormat2
c = &c_;
coverage = 0;
i = 0;
- j = c->rangeRecord.len ? c_.rangeRecord[0].start : 0;
+ j = c->rangeRecord.len ? c->rangeRecord[0].start : 0;
+ if (unlikely (c->rangeRecord[0].start > c->rangeRecord[0].end))
+ {
+ /* Broken table. Skip. */
+ i = c->rangeRecord.len;
+ }
}
inline bool more (void) { return i < c->rangeRecord.len; }
inline void next (void)
@@ -842,7 +847,14 @@ struct CoverageFormat2
i++;
if (more ())
{
+ hb_codepoint_t old = j;
j = c->rangeRecord[i].start;
+ if (unlikely (j <= old))
+ {
+ /* Broken table. Skip. Important to avoid DoS. */
+ i = c->rangeRecord.len;
+ return;
+ }
coverage = c->rangeRecord[i].value;
}
return;
@@ -855,7 +867,8 @@ struct CoverageFormat2
private:
const struct CoverageFormat2 *c;
- unsigned int i, j, coverage;
+ unsigned int i, coverage;
+ hb_codepoint_t j;
};
private:
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh
index bc8a5fd6bf8..182c8d90984 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh
@@ -1074,10 +1074,13 @@ struct MarkBasePosFormat1
if (!skippy_iter.prev ()) return_trace (false);
/* We only want to attach to the first of a MultipleSubst sequence.
* https://github.com/harfbuzz/harfbuzz/issues/740
- * Reject others. */
+ * Reject others...
+ * ...but stop if we find a mark in the MultipleSubst sequence:
+ * https://github.com/harfbuzz/harfbuzz/issues/1020 */
if (!_hb_glyph_info_multiplied (&buffer->info[skippy_iter.idx]) ||
0 == _hb_glyph_info_get_lig_comp (&buffer->info[skippy_iter.idx]) ||
(skippy_iter.idx == 0 ||
+ _hb_glyph_info_is_mark (&buffer->info[skippy_iter.idx - 1]) ||
_hb_glyph_info_get_lig_id (&buffer->info[skippy_iter.idx]) !=
_hb_glyph_info_get_lig_id (&buffer->info[skippy_iter.idx - 1]) ||
_hb_glyph_info_get_lig_comp (&buffer->info[skippy_iter.idx]) !=
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc
index 447e36cc4dd..8377dae979a 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc
@@ -668,8 +668,9 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
*
* Reports suggest that in some scripts Uniscribe does this only if there
* is *not* a Halant after last consonant already (eg. Kannada), while it
- * does it unconditionally in other scripts (eg. Malayalam). We don't
- * currently know about other scripts, so we single out Malayalam for now.
+ * does it unconditionally in other scripts (eg. Malayalam, Bengali). We
+ * don't currently know about other scripts, so we whitelist Malayalam and
+ * Bengali for now.
*
* Kannada test case:
* U+0C9A,U+0CCD,U+0C9A,U+0CCD
@@ -679,10 +680,16 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
* Malayalam test case:
* U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D
* With lohit-ttf-20121122/Lohit-Malayalam.ttf
+ *
+ * Bengali test case
+ * U+0998,U+09CD,U+09AF,U+09CD
+ * With Windows XP vrinda.ttf
+ * https://github.com/harfbuzz/harfbuzz/issues/1073
*/
if (indic_plan->is_old_spec)
{
- bool disallow_double_halants = buffer->props.script != HB_SCRIPT_MALAYALAM;
+ bool disallow_double_halants = buffer->props.script != HB_SCRIPT_MALAYALAM &&
+ buffer->props.script != HB_SCRIPT_BENGALI;
for (unsigned int i = base + 1; i < end; i++)
if (info[i].indic_category() == OT_H)
{
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc
index 18e3c941ef8..7876d366662 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc
@@ -372,22 +372,25 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
break;
}
- /* Note! syllable() is a one-byte field. */
- for (unsigned int i = base; i < end; i++)
- if (info[i].syllable() != 255)
- {
- unsigned int max = i;
- unsigned int j = start + info[i].syllable();
- while (j != i)
+ if (unlikely (end - start >= 127))
+ buffer->merge_clusters (start, end);
+ else
+ /* Note! syllable() is a one-byte field. */
+ for (unsigned int i = base; i < end; i++)
+ if (info[i].syllable() != 255)
{
- max = MAX (max, j);
- unsigned int next = start + info[j].syllable();
- info[j].syllable() = 255; /* So we don't process j later again. */
- j = next;
+ unsigned int max = i;
+ unsigned int j = start + info[i].syllable();
+ while (j != i)
+ {
+ max = MAX (max, j);
+ unsigned int next = start + info[j].syllable();
+ info[j].syllable() = 255; /* So we don't process j later again. */
+ j = next;
+ }
+ if (i != max)
+ buffer->merge_clusters (i, max + 1);
}
- if (i != max)
- buffer->merge_clusters (i, max + 1);
- }
/* Put syllable back in. */
for (unsigned int i = start; i < end; i++)
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh
index 32e335495cf..91162f93a8a 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh
@@ -1228,13 +1228,14 @@ struct hb_bytes_t
/* fallback for round() */
#if !defined (HAVE_ROUND) && !defined (HAVE_DECL_ROUND)
static inline double
-round (double x)
+_hb_round (double x)
{
if (x >= 0)
return floor (x + 0.5);
else
return ceil (x - 0.5);
}
+#define round(x) _hb_round(x)
#endif
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/main.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/main.cc
index ca0fcc5b607..873d240a362 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/main.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/main.cc
@@ -78,6 +78,9 @@ main (int argc, char **argv)
case OpenTypeFontFile::Typ1Tag:
printf ("Obsolete Apple Type1 font in SFNT container\n");
break;
+ case OpenTypeFontFile::DFontTag:
+ printf ("DFont Mac Resource Fork\n");
+ break;
default:
printf ("Unknown font format\n");
break;
diff --git a/Build/source/libs/harfbuzz/version.ac b/Build/source/libs/harfbuzz/version.ac
index 34a7918a32a..6284bdc6794 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], [1.8.1])
+m4_define([harfbuzz_version], [1.8.2])