summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/libs/README2
-rw-r--r--Build/source/libs/harfbuzz/ChangeLog5
-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/ChangeLog319
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/NEWS11
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/README1
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/README.md1
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/configure.ac2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-lcar-table.hh115
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-opbd-table.hh124
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh11
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc25
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc29
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.h5
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc348
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.h26
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff2-table.cc4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh16
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc6
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc11
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc11
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc22
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc15
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc3
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-avar-table.hh30
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh14
-rw-r--r--Build/source/libs/harfbuzz/version.ac2
29 files changed, 795 insertions, 394 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README
index e330fcdc6e0..94bc8899a8d 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.0 - checked 15aug19
+harfbuzz 2.6.1 - checked 24aug19
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 2956ddda01f..6b3b2466b16 100644
--- a/Build/source/libs/harfbuzz/ChangeLog
+++ b/Build/source/libs/harfbuzz/ChangeLog
@@ -1,3 +1,8 @@
+2019-08-24 Akira Kakuto <kakuto@w32tex.org>
+
+ Import harfbuzz-2.6.1.
+ * version.ac: Adjusted.
+
2019-08-15 Akira Kakuto <kakuto@w32tex.org>
Import harfbuzz-2.6.0.
diff --git a/Build/source/libs/harfbuzz/TLpatches/ChangeLog b/Build/source/libs/harfbuzz/TLpatches/ChangeLog
index 13ca5672ea8..38e801f899e 100644
--- a/Build/source/libs/harfbuzz/TLpatches/ChangeLog
+++ b/Build/source/libs/harfbuzz/TLpatches/ChangeLog
@@ -1,3 +1,8 @@
+2019-08-24 Akira Kakuto <kakuto@w32tex.org>
+
+ Imported harfbuzz-2.6.1 source tree from:
+ http://www.freedesktop.org/software/harfbuzz/release/
+
2019-08-15 Akira Kakuto <kakuto@w32tex.org>
Imported harfbuzz-2.6.0 source tree from:
diff --git a/Build/source/libs/harfbuzz/TLpatches/TL-Changes b/Build/source/libs/harfbuzz/TLpatches/TL-Changes
index d53c27a8905..5c4f4e2d6ed 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.0/ tree as obtained from:
+Changes applied to the harfbuzz-2.6.1/ 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 c503c4be3f0..425ecf3d5df 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.0.
+# Generated by GNU Autoconf 2.69 for harfbuzz (TeX Live) 2.6.1.
#
# 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.0'
-PACKAGE_STRING='harfbuzz (TeX Live) 2.6.0'
+PACKAGE_VERSION='2.6.1'
+PACKAGE_STRING='harfbuzz (TeX Live) 2.6.1'
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.0 to adapt to many kinds of systems.
+\`configure' configures harfbuzz (TeX Live) 2.6.1 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.0:";;
+ short | recursive ) echo "Configuration of harfbuzz (TeX Live) 2.6.1:";;
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.0
+harfbuzz (TeX Live) configure 2.6.1
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.0, which was
+It was created by harfbuzz (TeX Live) $as_me 2.6.1, 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.0'
+ VERSION='2.6.1'
# 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=0
-HB_VERSION=2.6.0
+HB_VERSION_MICRO=1
+HB_VERSION=2.6.1
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.0, which was
+This file was extended by harfbuzz (TeX Live) $as_me 2.6.1, 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.0
+harfbuzz (TeX Live) config.status 2.6.1
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 226448d0aed..481fb20dbd6 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
@@ -1,3 +1,279 @@
+commit be97e9d678017d4ec66625fa2b17ef3485552cad
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 22 15:52:24 2019 -0700
+
+ 2.6.1
+
+ NEWS | 11 +++++++++++
+ configure.ac | 2 +-
+ src/hb-version.h | 4 ++--
+ 3 files changed, 14 insertions(+), 3 deletions(-)
+
+commit d304d60e4d49df14ed85d6646680085f27bafbf2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 21 12:30:22 2019 -0700
+
+ [ot-font] Prefer symbol cmap subtable if found
+
+ Fixes https://github.com/harfbuzz/harfbuzz/issues/1918
+
+ Hopefully doesn't break anyone...
+
+ src/hb-ot-cmap-table.hh | 16 +++++++++-------
+ 1 file changed, 9 insertions(+), 7 deletions(-)
+
+commit 2a3d4987a75fb2cd51ccf4c1d08baba383ceda7b
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Wed Aug 21 03:02:01 2019 +0430
+
+ Remove hb_directwrite_shape_experimental_width public API
+
+ I had specially exposed the API as I didn't know how to embed harfbuzz
+ easily elsewhere but now with harfbuzz.cc it has become very easy
+ and I don't like to see its use anywhere as it has a bad naming and
+ its Kashida adding is bogus and only useful to check where it should
+ be added, not visually useful however.
+
+ src/hb-directwrite.cc | 29 ++++++-----------------------
+ src/hb-directwrite.h | 5 -----
+ 2 files changed, 6 insertions(+), 28 deletions(-)
+
+commit 163a66dc737645852d7515381304d69706688e16
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 20 14:22:57 2019 -0700
+
+ [test] Add test for aaa85931f3542639cd9d0dfb92fd6baab5b0298d
+
+ test/api/test-shape.c | 48 ++++++++++++++++++++++++++++++------------------
+ 1 file changed, 30 insertions(+), 18 deletions(-)
+
+commit aaa85931f3542639cd9d0dfb92fd6baab5b0298d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 20 13:06:10 2019 -0700
+
+ [font] Update multipliers when creating sub_font
+
+ Fixes https://github.com/harfbuzz/harfbuzz/issues/1910
+
+ src/hb-font.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit bbad1b8298125d78c159ed7fdd7bde6a3f3fff56
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Tue Aug 20 14:46:48 2019 +0430
+
+ [trak] minor, use roundf instead round to normalize the use
+
+ The change to `round` wasn't intended
+
+ src/hb-aat-layout-trak-table.hh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit e67cb500e9c5f6717d0d1cd152de84d88ec7370e
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Tue Aug 20 13:30:34 2019 +0430
+
+ [readme] add oss-fuzz badge
+
+ Related:
+ https://github.com/google/oss-fuzz/pull/2513
+ https://github.com/systemd/systemd/commit/ce2098b7e9443cd6f31fb70af7f72308cd2962a3
+
+ README.md | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit d59d89b28128cf644d76098c709b9309b834eb09
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Tue Aug 20 13:07:17 2019 +0430
+
+ [test] Rebase 10.14 trak related test
+
+ test/shaping/data/in-house/tests/macos.tests | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 20b1a27c8a319d43a582c3efa8233b9f2c3cc73e
+Merge: 5ee1e451 37de38ad
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Tue Aug 20 13:04:51 2019 +0430
+
+ Merge remove-coretext-96dpi-assumption, @drott
+
+ Remove assumption about Core Text working in 96 DPI
+
+commit 37de38adeae48e1855c2431a39639db873a74554
+Merge: f401f85a 5ee1e451
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Tue Aug 20 12:59:33 2019 +0430
+
+ Merge branch 'master' into remove-coretext-96dpi-assumption
+
+commit 5ee1e451cfc75dc6ddbc3ae300ba7394a0cd560e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 19 14:23:17 2019 -0700
+
+ Minor touch-up for recent change
+
+ src/hb-ot-var-avar-table.hh | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 33489928444b94bdd2cc523dac14707eb29d667e
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Wed Aug 7 20:07:58 2019 +0430
+
+ [avar] Implement inverse map, unmap
+
+ src/hb-ot-var-avar-table.hh | 30 ++++++++++++++++++++++++------
+ 1 file changed, 24 insertions(+), 6 deletions(-)
+
+commit 981f5a54c3cbc1de45ba941fdf5315c62d86b6f3
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Wed Aug 7 18:45:39 2019 +0430
+
+ [fvar] Implement inverse normalize, unnormalize
+
+ src/hb-ot-var-fvar-table.hh | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+commit dcb4cd400fb44172872a20ba54baa011d748b61d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 19 11:35:37 2019 -0700
+
+ Minor
+
+ src/hb-font.cc | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+commit ca54440324745afc388edac40ad1047e92567fdb
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Sun Aug 18 11:58:04 2019 +0430
+
+ Remove continuous development helper script
+
+ Not have used it personally for a long time, lets remove it
+
+ src/dev-run.sh | 99 ----------------------------------------------------------
+ 1 file changed, 99 deletions(-)
+
+commit 40aef1b473f63701ab901880d764e33682f13414
+Author: Khaled Hosny <khaledhosny@eglug.org>
+Date: Fri Aug 16 01:00:30 2019 +0200
+
+ [ot-shape] Keep horizontal_features array sorted
+
+ src/hb-ot-shape.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit da5118da77898ae4778af1ace4af52334b210dd6
+Author: Khaled Hosny <khaledhosny@eglug.org>
+Date: Fri Aug 16 00:48:26 2019 +0200
+
+ [ot-shape] Enable abvm/blwm features by default
+
+ Core Text seems to apply them to Latin text, but Uniscribe doesn’t.
+
+ See https://github.com/harfbuzz/harfbuzz/pull/1908#issuecomment-521819343
+
+ src/hb-ot-shape-complex-indic.cc | 9 ---------
+ src/hb-ot-shape-complex-khmer.cc | 9 ---------
+ src/hb-ot-shape-complex-myanmar.cc | 21 ---------------------
+ src/hb-ot-shape-complex-use.cc | 14 --------------
+ src/hb-ot-shape.cc | 2 ++
+ test/shaping/data/in-house/Makefile.sources | 2 +-
+ .../ea3f63620511b2097200d23774ffef197e829e69.ttf | Bin 0 -> 1804 bytes
+ .../f79eb71df4e4c9c273b67b89a06e5ff9e3c1f834.ttf | Bin 0 -> 1860 bytes
+ test/shaping/data/in-house/tests/dist.tests | 1 -
+ .../data/in-house/tests/positioning-features.tests | 3 +++
+ 10 files changed, 6 insertions(+), 55 deletions(-)
+
+commit 2164bd6f29df265acdc04b84f5f94cf63b2cea8a
+Author: Khaled Hosny <khaledhosny@eglug.org>
+Date: Fri Aug 16 00:28:41 2019 +0200
+
+ [ot-shape] Enable dist feature by default (#1908)
+
+ Fixes https://github.com/harfbuzz/harfbuzz/issues/1907
+
+ src/hb-ot-shape-complex-indic.cc | 2 --
+ src/hb-ot-shape-complex-khmer.cc | 2 --
+ src/hb-ot-shape-complex-myanmar.cc | 1 -
+ src/hb-ot-shape-complex-use.cc | 1 -
+ src/hb-ot-shape.cc | 1 +
+ test/shaping/data/in-house/Makefile.sources | 1 +
+ .../fonts/53a91c20e33a596f2be17fb68b382d6b7eb85d5c.ttf | Bin 0 -> 2020 bytes
+ test/shaping/data/in-house/tests/dist.tests | 1 +
+ 8 files changed, 3 insertions(+), 6 deletions(-)
+
+commit bc27f86ffef537835f6c9dbbecbc2ee6792cb127
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Wed Aug 14 22:37:00 2019 +0430
+
+ Move HB_NO_VAR to a better place in hb-font.cc
+
+ Needed for other works
+
+ src/hb-font.cc | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+commit 1cc844da66ab527991ff96efdf10d97f6b626bfe
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Wed Aug 14 19:10:02 2019 +0430
+
+ minor
+
+ Use hb_font_t coords directly
+
+ src/hb-ot-cff2-table.cc | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+commit 6a194b6876db12f083ae5391ca01972168d4e68a
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Wed Aug 14 18:49:57 2019 +0430
+
+ Minor, remove trailing spaces in hb-font.{cc,h} as .editorconfig
+
+ src/hb-font.cc | 338 ++++++++++++++++++++++++++++-----------------------------
+ src/hb-font.h | 26 ++---
+ 2 files changed, 182 insertions(+), 182 deletions(-)
+
+commit 3ae44645d60fe8271ad18b004434d475eaeb7ad6
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Wed Aug 14 14:34:55 2019 +0430
+
+ Fix caret_count value when AAT is disabled
+
+ Set caret_count to zero as that is what we want to happen inside lcar when
+ there is no result.
+
+ src/hb-ot-layout.cc | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+commit a5aa67b9f288687e21ca7a9887483f7fe1cbce54
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Wed Aug 14 14:29:01 2019 +0430
+
+ [lcar] Use multiformat convention
+
+ src/hb-aat-layout-lcar-table.hh | 115 +++++++++++++++++++++++++++++++---------
+ 1 file changed, 90 insertions(+), 25 deletions(-)
+
+commit bfffe85dd7d7557e10ec9f9886b86fe0d8b4a7a2
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Wed Aug 14 13:55:49 2019 +0430
+
+ [opbd] Use multiformat convention on the table
+
+ src/hb-aat-layout-opbd-table.hh | 116 ++++++++++++++++++++++++++++++----------
+ 1 file changed, 89 insertions(+), 27 deletions(-)
+
+commit d6206dbcc4e4ef8c034ee714e74d3a76c5333a12
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Wed Aug 14 11:24:06 2019 +0430
+
+ [opbd] Turn OpticalBounds fields to FWORD
+
+ src/hb-aat-layout-opbd-table.hh | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
commit 6461143b44f81a4190d3f1cb02238750536f08e4
Author: Behdad Esfahbod <behdad@behdad.org>
Date: Tue Aug 13 22:20:54 2019 -0700
@@ -15661,6 +15937,49 @@ Date: Tue Jan 15 13:58:19 2019 -0500
src/hb-machinery.hh | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
+commit f401f85a5a3ec4ab9c28012a0bfe713d7ee96951
+Author: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
+Date: Mon Dec 17 00:48:35 2018 +0100
+
+ Remove assumption about Core Text working in 96 DPI
+
+ Core Text doesn't actually have a concept of DPI internally, as it
+ doesn't rasterize anything by itself, it just generates vector paths
+ that get passed along to Core Graphics.
+
+ In practice this means Core Text operates in the classical macOS
+ logical DPI of 72, with one typographic point corresponding to one
+ point in the Core Graphics coordinate system, which for a normal
+ bitmap context then corresponds to one pixel -- or two pixels for
+ a "retina" context with a 2x scale transform.
+
+ Scaling the font point sizes given to HarfBuzz to an assumed DPI
+ of 96 is problematic with this in mind, as fonts with optical
+ features such as 'trak' tables for tracking, or color glyphs,
+ will then base the metrics off of the wrong point size compared
+ to what the client asked for.
+
+ This in turn causes mismatches between the metrics of the shaped
+ text and the actual rasterization, which doesn't include the 72
+ to 96 DPI scaling.
+
+ If a 96 DPI is needed, such as on the Web, the scaling should be
+ done outside of HarfBuzz, allowing the client to keep the DPI of
+ the shaping in sync with the rasterization.
+
+ The recommended way to do that is by scaling the font point size,
+ not by applying a transform to the target Core Graphics context,
+ to let Core Text choose the right optical features of the target
+ point size, as described in WWDC 2015 session 804:
+
+ https://developer.apple.com/videos/play/wwdc2015/804/
+
+ src/hb-aat-layout-trak-table.hh | 11 ++---------
+ src/hb-coretext.cc | 25 ++++---------------------
+ test/shaping/data/in-house/tests/aat-trak.tests | 14 +++++++-------
+ test/shaping/data/in-house/tests/macos.tests | 4 ++--
+ 4 files changed, 15 insertions(+), 39 deletions(-)
+
commit 0d2727f4fe734af146785df10a44e3505e410ba1
Author: Behdad Esfahbod <behdad@behdad.org>
Date: Mon Jan 14 18:23:17 2019 -0800
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
index cbec26512aa..ef5f487af1d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
@@ -1,3 +1,14 @@
+Overview of changes leading to 2.6.1
+Thursday, August 22, 2019
+====================================
+- Fix regression with hb_font_create_sub_font scaling introduced in 2.6.0.
+- Change interpretation of font PTEM size / CoreText font size handling.
+ See https://github.com/harfbuzz/harfbuzz/pull/1484
+- hb-ot-font: Prefer symbol cmap subtable if present.
+- Apply 'dist'/'abvm'/'blwm' features to all scripts.
+- Drop experimental DirectWrite API.
+
+
Overview of changes leading to 2.6.0
Tuesday, August 13, 2019
====================================
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/README b/Build/source/libs/harfbuzz/harfbuzz-src/README
index ce3e84dde5a..c3cc0c26e94 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/README
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/README
@@ -1,6 +1,7 @@
[![Travis Build Status](https://travis-ci.org/harfbuzz/harfbuzz.svg?branch=master)](https://travis-ci.org/harfbuzz/harfbuzz)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/0t0flrxpstj9lb9w?svg=true&branch=master)](https://ci.appveyor.com/project/harfbuzz/harfbuzz)
[![CircleCI Build Status](https://circleci.com/gh/harfbuzz/harfbuzz/tree/master.svg?style=svg)](https://circleci.com/gh/harfbuzz/harfbuzz/tree/master)
+[![OSS-Fuzz Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/harfbuzz.svg)](https://oss-fuzz-build-logs.storage.googleapis.com/index.html)
[![Coverity Code Health](https://img.shields.io/coverity/scan/5450.svg)](https://scan.coverity.com/projects/behdad-harfbuzz)
[![Codacy Code Health](https://api.codacy.com/project/badge/Grade/f17f1708783c447488bc8dd317150eaa)](https://app.codacy.com/app/behdad/harfbuzz)
[![Codecov Code Coverage](https://codecov.io/gh/harfbuzz/harfbuzz/branch/master/graph/badge.svg)](https://codecov.io/gh/harfbuzz/harfbuzz)
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/README.md b/Build/source/libs/harfbuzz/harfbuzz-src/README.md
index ce3e84dde5a..c3cc0c26e94 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/README.md
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/README.md
@@ -1,6 +1,7 @@
[![Travis Build Status](https://travis-ci.org/harfbuzz/harfbuzz.svg?branch=master)](https://travis-ci.org/harfbuzz/harfbuzz)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/0t0flrxpstj9lb9w?svg=true&branch=master)](https://ci.appveyor.com/project/harfbuzz/harfbuzz)
[![CircleCI Build Status](https://circleci.com/gh/harfbuzz/harfbuzz/tree/master.svg?style=svg)](https://circleci.com/gh/harfbuzz/harfbuzz/tree/master)
+[![OSS-Fuzz Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/harfbuzz.svg)](https://oss-fuzz-build-logs.storage.googleapis.com/index.html)
[![Coverity Code Health](https://img.shields.io/coverity/scan/5450.svg)](https://scan.coverity.com/projects/behdad-harfbuzz)
[![Codacy Code Health](https://api.codacy.com/project/badge/Grade/f17f1708783c447488bc8dd317150eaa)](https://app.codacy.com/app/behdad/harfbuzz)
[![Codecov Code Coverage](https://codecov.io/gh/harfbuzz/harfbuzz/branch/master/graph/badge.svg)](https://codecov.io/gh/harfbuzz/harfbuzz)
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac b/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
index 95c55c9a048..ab079fc0583 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.0],
+ [2.6.1],
[https://github.com/harfbuzz/harfbuzz/issues/new],
[harfbuzz],
[http://harfbuzz.org/])
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-lcar-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-lcar-table.hh
index 2e45fd28b82..7063b386c2e 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-lcar-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-lcar-table.hh
@@ -38,56 +38,121 @@ namespace AAT {
typedef ArrayOf<HBINT16> LigCaretClassEntry;
-struct lcar
+struct lcarFormat0
{
- static constexpr hb_tag_t tableTag = HB_AAT_TAG_lcar;
+ unsigned int get_lig_carets (hb_font_t *font,
+ hb_direction_t direction,
+ hb_codepoint_t glyph,
+ unsigned int start_offset,
+ unsigned int *caret_count /* IN/OUT */,
+ hb_position_t *caret_array /* OUT */,
+ const void *base) const
+ {
+ const OffsetTo<LigCaretClassEntry>* entry_offset = lookupTable.get_value (glyph,
+ font->face->get_num_glyphs ());
+ const LigCaretClassEntry& array = entry_offset ? base+*entry_offset : Null (LigCaretClassEntry);
+ if (caret_count)
+ {
+ hb_array_t<const HBINT16> arr = array.sub_array (start_offset, caret_count);
+ for (unsigned int i = 0; i < arr.length; ++i)
+ caret_array[i] = font->em_scale_dir (arr[i], direction);
+ }
+ return array.len;
+ }
+ bool sanitize (hb_sanitize_context_t *c, const void *base) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (likely (c->check_struct (this) && lookupTable.sanitize (c, base)));
+ }
+
+ protected:
+ Lookup<OffsetTo<LigCaretClassEntry>>
+ lookupTable; /* data Lookup table associating glyphs */
+ public:
+ DEFINE_SIZE_MIN (2);
+};
+
+struct lcarFormat1
+{
unsigned int get_lig_carets (hb_font_t *font,
hb_direction_t direction,
hb_codepoint_t glyph,
unsigned int start_offset,
unsigned int *caret_count /* IN/OUT */,
- hb_position_t *caret_array /* OUT */) const
+ hb_position_t *caret_array /* OUT */,
+ const void *base) const
{
- const OffsetTo<LigCaretClassEntry>* entry_offset = lookup.get_value (glyph,
- font->face->get_num_glyphs ());
- const LigCaretClassEntry& array = entry_offset ? this+*entry_offset : Null (LigCaretClassEntry);
+ const OffsetTo<LigCaretClassEntry>* entry_offset = lookupTable.get_value (glyph,
+ font->face->get_num_glyphs ());
+ const LigCaretClassEntry& array = entry_offset ? base+*entry_offset : Null (LigCaretClassEntry);
if (caret_count)
{
hb_array_t<const HBINT16> arr = array.sub_array (start_offset, caret_count);
- switch (format)
+ for (unsigned int i = 0; i < arr.length; ++i)
{
- case 0:
- for (unsigned int i = 0; i < arr.length; ++i)
- caret_array[i] = font->em_scale_dir (arr[i], direction);
- break;
- case 1:
- for (unsigned int i = 0; i < arr.length; ++i)
- {
- hb_position_t x, y;
- font->get_glyph_contour_point_for_origin (glyph, arr[i], direction, &x, &y);
- caret_array[i] = HB_DIRECTION_IS_HORIZONTAL (direction) ? x : y;
- }
- break;
+ hb_position_t x = 0, y = 0;
+ font->get_glyph_contour_point_for_origin (glyph, arr[i], direction, &x, &y);
+ caret_array[i] = HB_DIRECTION_IS_HORIZONTAL (direction) ? x : y;
}
}
return array.len;
}
+ bool sanitize (hb_sanitize_context_t *c, const void *base) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (likely (c->check_struct (this) && lookupTable.sanitize (c, base)));
+ }
+
+ protected:
+ Lookup<OffsetTo<LigCaretClassEntry>>
+ lookupTable; /* data Lookup table associating glyphs */
+ public:
+ DEFINE_SIZE_MIN (2);
+};
+
+struct lcar
+{
+ static constexpr hb_tag_t tableTag = HB_AAT_TAG_lcar;
+
+ unsigned int get_lig_carets (hb_font_t *font,
+ hb_direction_t direction,
+ hb_codepoint_t glyph,
+ unsigned int start_offset,
+ unsigned int *caret_count /* IN/OUT */,
+ hb_position_t *caret_array /* OUT */) const
+ {
+ switch (format)
+ {
+ case 0: return u.format0.get_lig_carets (font, direction, glyph, start_offset,
+ caret_count, caret_array, this);
+ case 1: return u.format1.get_lig_carets (font, direction, glyph, start_offset,
+ caret_count, caret_array, this);
+ default:if (caret_count) *caret_count = 0; return 0;
+ }
+ }
+
bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
- return_trace (likely (c->check_struct (this) &&
- version.major == 1 &&
- lookup.sanitize (c, this)));
+ if (unlikely (!c->check_struct (this) || version.major != 1))
+ return_trace (false);
+
+ switch (format) {
+ case 0: return_trace (u.format0.sanitize (c, this));
+ case 1: return_trace (u.format1.sanitize (c, this));
+ default:return_trace (true);
+ }
}
protected:
FixedVersion<>version; /* Version number of the ligature caret table */
HBUINT16 format; /* Format of the ligature caret table. */
- Lookup<OffsetTo<LigCaretClassEntry>>
- lookup; /* data Lookup table associating glyphs */
-
+ union {
+ lcarFormat0 format0;
+ lcarFormat0 format1;
+ } u;
public:
DEFINE_SIZE_MIN (8);
};
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-opbd-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-opbd-table.hh
index 5b9c3912507..4e0234074fe 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-opbd-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-opbd-table.hh
@@ -45,50 +45,112 @@ struct OpticalBounds
return_trace (likely (c->check_struct (this)));
}
- HBINT16 leftSide;
- HBINT16 topSide;
- HBINT16 rightSide;
- HBINT16 bottomSide;
+ FWORD leftSide;
+ FWORD topSide;
+ FWORD rightSide;
+ FWORD bottomSide;
public:
DEFINE_SIZE_STATIC (8);
};
-struct opbd
+struct opbdFormat0
{
- static constexpr hb_tag_t tableTag = HB_AAT_TAG_opbd;
+ bool get_bounds (hb_font_t *font, hb_codepoint_t glyph_id,
+ hb_glyph_extents_t *extents, const void *base) const
+ {
+ const OffsetTo<OpticalBounds> *bounds_offset = lookupTable.get_value (glyph_id, font->face->get_num_glyphs ());
+ if (!bounds_offset) return false;
+ const OpticalBounds &bounds = base+*bounds_offset;
+
+ if (extents)
+ *extents = {
+ font->em_scale_x (bounds.leftSide),
+ font->em_scale_y (bounds.topSide),
+ font->em_scale_x (bounds.rightSide),
+ font->em_scale_y (bounds.bottomSide)
+ };
+ return true;
+ }
+
+ bool sanitize (hb_sanitize_context_t *c, const void *base) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (likely (c->check_struct (this) && lookupTable.sanitize (c, base)));
+ }
+
+ protected:
+ Lookup<OffsetTo<OpticalBounds>>
+ lookupTable; /* Lookup table associating glyphs with the four
+ * int16 values for the left-side, top-side,
+ * right-side, and bottom-side optical bounds. */
+ public:
+ DEFINE_SIZE_MIN (2);
+};
- bool get_optical_bounds (hb_font_t *font, hb_codepoint_t glyph_id,
- hb_position_t *left, hb_position_t *top,
- hb_position_t *right, hb_position_t *bottom) const
+struct opbdFormat1
+{
+ bool get_bounds (hb_font_t *font, hb_codepoint_t glyph_id,
+ hb_glyph_extents_t *extents, const void *base) const
{
const OffsetTo<OpticalBounds> *bounds_offset = lookupTable.get_value (glyph_id, font->face->get_num_glyphs ());
if (!bounds_offset) return false;
- const OpticalBounds &bounds = this+*bounds_offset;
- switch (format)
+ const OpticalBounds &bounds = base+*bounds_offset;
+
+ hb_position_t left = 0, top = 0, right = 0, bottom = 0, ignore;
+ if (font->get_glyph_contour_point (glyph_id, bounds.leftSide, &left, &ignore) ||
+ font->get_glyph_contour_point (glyph_id, bounds.topSide, &ignore, &top) ||
+ font->get_glyph_contour_point (glyph_id, bounds.rightSide, &right, &ignore) ||
+ font->get_glyph_contour_point (glyph_id, bounds.bottomSide, &ignore, &bottom))
{
- case 0:
- *left = font->em_scale_x (bounds.leftSide);
- *top = font->em_scale_y (bounds.topSide);
- *right = font->em_scale_x (bounds.rightSide);
- *bottom = font->em_scale_y (bounds.bottomSide);
+ if (extents)
+ *extents = {left, top, right, bottom};
return true;
- case 1:
- hb_position_t ignore;
- return font->get_glyph_contour_point (glyph_id, bounds.leftSide, left, &ignore) &&
- font->get_glyph_contour_point (glyph_id, bounds.topSide, &ignore, top) &&
- font->get_glyph_contour_point (glyph_id, bounds.rightSide, right, &ignore) &&
- font->get_glyph_contour_point (glyph_id, bounds.bottomSide, &ignore, bottom);
- default:
- return false;
+ }
+ return false;
+ }
+
+ bool sanitize (hb_sanitize_context_t *c, const void *base) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (likely (c->check_struct (this) && lookupTable.sanitize (c, base)));
+ }
+
+ protected:
+ Lookup<OffsetTo<OpticalBounds>>
+ lookupTable; /* Lookup table associating glyphs with the four
+ * int16 values for the left-side, top-side,
+ * right-side, and bottom-side optical bounds. */
+ public:
+ DEFINE_SIZE_MIN (2);
+};
+
+struct opbd
+{
+ static constexpr hb_tag_t tableTag = HB_AAT_TAG_opbd;
+
+ bool get_bounds (hb_font_t *font, hb_codepoint_t glyph_id,
+ hb_glyph_extents_t *extents) const
+ {
+ switch (format)
+ {
+ case 0: return u.format0.get_bounds (font, glyph_id, extents, this);
+ case 1: return u.format1.get_bounds (font, glyph_id, extents, this);
+ default:return false;
}
}
bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
- return_trace (likely (c->check_struct (this) &&
- version.major == 1 &&
- lookupTable.sanitize (c, this)));
+ if (unlikely (!c->check_struct (this) || version.major != 1))
+ return_trace (false);
+
+ switch (format)
+ {
+ case 0: return_trace (u.format0.sanitize (c, this));
+ case 1: return_trace (u.format1.sanitize (c, this));
+ default:return_trace (true);
+ }
}
protected:
@@ -97,10 +159,10 @@ struct opbd
HBUINT16 format; /* Format of the optical bounds table.
* Format 0 indicates distance and Format 1 indicates
* control point. */
- Lookup<OffsetTo<OpticalBounds>>
- lookupTable; /* Lookup table associating glyphs with the four
- * int16 values for the left-side, top-side,
- * right-side, and bottom-side optical bounds. */
+ union {
+ opbdFormat0 format0;
+ opbdFormat1 format1;
+ } u;
public:
DEFINE_SIZE_MIN (8);
};
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 2eace2aa044..e6b6d55e043 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
@@ -93,13 +93,6 @@ struct TrackData
int get_tracking (const void *base, float ptem) const
{
- /* CoreText points are CSS pixels (96 per inch),
- * NOT typographic points (72 per inch).
- *
- * https://developer.apple.com/library/content/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html
- */
- float csspx = ptem * 96.f / 72.f;
-
/*
* Choose track.
*/
@@ -130,10 +123,10 @@ struct TrackData
hb_array_t<const Fixed> size_table ((base+sizeTable).arrayZ, sizes);
unsigned int size_index;
for (size_index = 0; size_index < sizes - 1; size_index++)
- if (size_table[size_index].to_float () >= csspx)
+ if (size_table[size_index].to_float () >= ptem)
break;
- return roundf (interpolate_at (size_index ? size_index - 1 : 0, csspx,
+ return roundf (interpolate_at (size_index ? size_index - 1 : 0, ptem,
*trackTableEntry, base));
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc
index e8a4fd51e56..31aa00a1110 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc
@@ -49,24 +49,6 @@
/* https://developer.apple.com/documentation/coretext/1508745-ctfontcreatewithgraphicsfont */
#define HB_CORETEXT_DEFAULT_FONT_SIZE 12.f
-static CGFloat
-coretext_font_size_from_ptem (float ptem)
-{
- /* CoreText points are CSS pixels (96 per inch),
- * NOT typographic points (72 per inch).
- *
- * https://developer.apple.com/library/content/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html
- */
- ptem *= 96.f / 72.f;
- return (CGFloat) (ptem <= 0.f ? HB_CORETEXT_DEFAULT_FONT_SIZE : ptem);
-}
-static float
-coretext_font_size_to_ptem (CGFloat size)
-{
- size *= 72. / 96.;
- return size <= 0 ? 0 : size;
-}
-
static void
release_table_data (void *user_data)
{
@@ -320,7 +302,8 @@ _hb_coretext_shaper_font_data_create (hb_font_t *font)
if (unlikely (!face_data)) return nullptr;
CGFontRef cg_font = (CGFontRef) (const void *) face->data.coretext;
- CTFontRef ct_font = create_ct_font (cg_font, coretext_font_size_from_ptem (font->ptem));
+ CGFloat font_size = font->ptem <= 0.f ? HB_CORETEXT_DEFAULT_FONT_SIZE : font->ptem;
+ CTFontRef ct_font = create_ct_font (cg_font, font_size);
if (unlikely (!ct_font))
{
@@ -344,7 +327,7 @@ retry:
const hb_coretext_font_data_t *data = font->data.coretext;
if (unlikely (!data)) return nullptr;
- if (fabs (CTFontGetSize((CTFontRef) data) - coretext_font_size_from_ptem (font->ptem)) > .5)
+ if (fabs (CTFontGetSize ((CTFontRef) data) - font->ptem) > .5)
{
/* XXX-MT-bug
* Note that evaluating condition above can be dangerous if another thread
@@ -384,7 +367,7 @@ hb_coretext_font_create (CTFontRef ct_font)
if (unlikely (hb_object_is_immutable (font)))
return font;
- hb_font_set_ptem (font, coretext_font_size_to_ptem (CTFontGetSize(ct_font)));
+ hb_font_set_ptem (font, CTFontGetSize (ct_font));
/* Let there be dragons here... */
font->data.coretext.cmpexch (nullptr, (hb_coretext_font_data_t *) CFRetain (ct_font));
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc
index c14e9d2be4b..a079563af48 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc
@@ -879,29 +879,12 @@ _hb_directwrite_shape (hb_shape_plan_t *shape_plan,
features, num_features, 0);
}
-/**
- * hb_directwrite_shape_experimental_width:
- * Experimental API to test DirectWrite's justification algorithm.
- *
- * It inserts Kashida at wrong order so don't use the API ever.
- *
- * It doesn't work with cygwin/msys due to header bugs so one
- * should use MSVC toolchain in order to use it for now.
- *
- * @font:
- * @buffer:
- * @features:
- * @num_features:
- * @width:
- *
- * Since: 1.4.2
- **/
-hb_bool_t
-hb_directwrite_shape_experimental_width (hb_font_t *font,
- hb_buffer_t *buffer,
- const hb_feature_t *features,
- unsigned int num_features,
- float width)
+HB_UNUSED static bool
+_hb_directwrite_shape_experimental_width (hb_font_t *font,
+ hb_buffer_t *buffer,
+ const hb_feature_t *features,
+ unsigned int num_features,
+ float width)
{
static const char *shapers = "directwrite";
hb_shape_plan_t *shape_plan;
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.h
index de813d069f2..f837627a286 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.h
@@ -29,11 +29,6 @@
HB_BEGIN_DECLS
-HB_EXTERN hb_bool_t
-hb_directwrite_shape_experimental_width (hb_font_t *font, hb_buffer_t *buffer,
- const hb_feature_t *features,
- unsigned int num_features, float width);
-
HB_EXTERN hb_face_t *
hb_directwrite_face_create (IDWriteFontFace *font_face);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc
index e6339cdcee8..445878bfe40 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc
@@ -518,9 +518,9 @@ static const hb_font_funcs_t _hb_font_funcs_default = {
/**
* hb_font_funcs_create: (Xconstructor)
*
- *
*
- * Return value: (transfer full):
+ *
+ * Return value: (transfer full):
*
* Since: 0.9.2
**/
@@ -540,9 +540,9 @@ hb_font_funcs_create ()
/**
* hb_font_funcs_get_empty:
*
- *
*
- * Return value: (transfer full):
+ *
+ * Return value: (transfer full):
*
* Since: 0.9.2
**/
@@ -556,9 +556,9 @@ hb_font_funcs_get_empty ()
* hb_font_funcs_reference: (skip)
* @ffuncs: font functions.
*
- *
*
- * Return value:
+ *
+ * Return value:
*
* Since: 0.9.2
**/
@@ -572,7 +572,7 @@ hb_font_funcs_reference (hb_font_funcs_t *ffuncs)
* hb_font_funcs_destroy: (skip)
* @ffuncs: font functions.
*
- *
+ *
*
* Since: 0.9.2
**/
@@ -592,14 +592,14 @@ hb_font_funcs_destroy (hb_font_funcs_t *ffuncs)
/**
* hb_font_funcs_set_user_data: (skip)
* @ffuncs: font functions.
- * @key:
- * @data:
- * @destroy:
- * @replace:
+ * @key:
+ * @data:
+ * @destroy:
+ * @replace:
*
- *
*
- * Return value:
+ *
+ * Return value:
*
* Since: 0.9.2
**/
@@ -616,11 +616,11 @@ hb_font_funcs_set_user_data (hb_font_funcs_t *ffuncs,
/**
* hb_font_funcs_get_user_data: (skip)
* @ffuncs: font functions.
- * @key:
+ * @key:
+ *
*
- *
*
- * Return value: (transfer none):
+ * Return value: (transfer none):
*
* Since: 0.9.2
**/
@@ -636,7 +636,7 @@ hb_font_funcs_get_user_data (hb_font_funcs_t *ffuncs,
* hb_font_funcs_make_immutable:
* @ffuncs: font functions.
*
- *
+ *
*
* Since: 0.9.2
**/
@@ -653,9 +653,9 @@ hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs)
* hb_font_funcs_is_immutable:
* @ffuncs: font functions.
*
- *
*
- * Return value:
+ *
+ * Return value:
*
* Since: 0.9.2
**/
@@ -751,13 +751,13 @@ hb_font_get_v_extents (hb_font_t *font,
/**
* hb_font_get_glyph:
* @font: a font.
- * @unicode:
- * @variation_selector:
- * @glyph: (out):
+ * @unicode:
+ * @variation_selector:
+ * @glyph: (out):
*
- *
*
- * Return value:
+ *
+ * Return value:
*
* Since: 0.9.2
**/
@@ -774,12 +774,12 @@ hb_font_get_glyph (hb_font_t *font,
/**
* hb_font_get_nominal_glyph:
* @font: a font.
- * @unicode:
- * @glyph: (out):
+ * @unicode:
+ * @glyph: (out):
+ *
*
- *
*
- * Return value:
+ * Return value:
*
* Since: 1.2.3
**/
@@ -794,13 +794,13 @@ hb_font_get_nominal_glyph (hb_font_t *font,
/**
* hb_font_get_variation_glyph:
* @font: a font.
- * @unicode:
- * @variation_selector:
- * @glyph: (out):
+ * @unicode:
+ * @variation_selector:
+ * @glyph: (out):
+ *
*
- *
*
- * Return value:
+ * Return value:
*
* Since: 1.2.3
**/
@@ -815,11 +815,11 @@ hb_font_get_variation_glyph (hb_font_t *font,
/**
* hb_font_get_glyph_h_advance:
* @font: a font.
- * @glyph:
+ * @glyph:
*
- *
*
- * Return value:
+ *
+ * Return value:
*
* Since: 0.9.2
**/
@@ -833,11 +833,11 @@ hb_font_get_glyph_h_advance (hb_font_t *font,
/**
* hb_font_get_glyph_v_advance:
* @font: a font.
- * @glyph:
+ * @glyph:
*
- *
*
- * Return value:
+ *
+ * Return value:
*
* Since: 0.9.2
**/
@@ -852,7 +852,7 @@ hb_font_get_glyph_v_advance (hb_font_t *font,
* hb_font_get_glyph_h_advances:
* @font: a font.
*
- *
+ *
*
* Since: 1.8.6
**/
@@ -870,7 +870,7 @@ hb_font_get_glyph_h_advances (hb_font_t* font,
* hb_font_get_glyph_v_advances:
* @font: a font.
*
- *
+ *
*
* Since: 1.8.6
**/
@@ -888,13 +888,13 @@ hb_font_get_glyph_v_advances (hb_font_t* font,
/**
* hb_font_get_glyph_h_origin:
* @font: a font.
- * @glyph:
- * @x: (out):
- * @y: (out):
+ * @glyph:
+ * @x: (out):
+ * @y: (out):
+ *
*
- *
*
- * Return value:
+ * Return value:
*
* Since: 0.9.2
**/
@@ -909,13 +909,13 @@ hb_font_get_glyph_h_origin (hb_font_t *font,
/**
* hb_font_get_glyph_v_origin:
* @font: a font.
- * @glyph:
- * @x: (out):
- * @y: (out):
+ * @glyph:
+ * @x: (out):
+ * @y: (out):
*
- *
*
- * Return value:
+ *
+ * Return value:
*
* Since: 0.9.2
**/
@@ -930,12 +930,12 @@ hb_font_get_glyph_v_origin (hb_font_t *font,
/**
* hb_font_get_glyph_h_kerning:
* @font: a font.
- * @left_glyph:
- * @right_glyph:
+ * @left_glyph:
+ * @right_glyph:
*
- *
*
- * Return value:
+ *
+ * Return value:
*
* Since: 0.9.2
**/
@@ -950,12 +950,12 @@ hb_font_get_glyph_h_kerning (hb_font_t *font,
/**
* hb_font_get_glyph_v_kerning:
* @font: a font.
- * @top_glyph:
- * @bottom_glyph:
+ * @top_glyph:
+ * @bottom_glyph:
+ *
*
- *
*
- * Return value:
+ * Return value:
*
* Since: 0.9.2
* Deprecated: 2.0.0
@@ -971,12 +971,12 @@ hb_font_get_glyph_v_kerning (hb_font_t *font,
/**
* hb_font_get_glyph_extents:
* @font: a font.
- * @glyph:
- * @extents: (out):
+ * @glyph:
+ * @extents: (out):
+ *
*
- *
*
- * Return value:
+ * Return value:
*
* Since: 0.9.2
**/
@@ -991,14 +991,14 @@ hb_font_get_glyph_extents (hb_font_t *font,
/**
* hb_font_get_glyph_contour_point:
* @font: a font.
- * @glyph:
- * @point_index:
- * @x: (out):
- * @y: (out):
+ * @glyph:
+ * @point_index:
+ * @x: (out):
+ * @y: (out):
+ *
*
- *
*
- * Return value:
+ * Return value:
*
* Since: 0.9.2
**/
@@ -1013,13 +1013,13 @@ hb_font_get_glyph_contour_point (hb_font_t *font,
/**
* hb_font_get_glyph_name:
* @font: a font.
- * @glyph:
- * @name: (array length=size):
- * @size:
+ * @glyph:
+ * @name: (array length=size):
+ * @size:
*
- *
*
- * Return value:
+ *
+ * Return value:
*
* Since: 0.9.2
**/
@@ -1034,13 +1034,13 @@ hb_font_get_glyph_name (hb_font_t *font,
/**
* hb_font_get_glyph_from_name:
* @font: a font.
- * @name: (array length=len):
- * @len:
- * @glyph: (out):
+ * @name: (array length=len):
+ * @len:
+ * @glyph: (out):
*
- *
*
- * Return value:
+ *
+ * Return value:
*
* Since: 0.9.2
**/
@@ -1075,12 +1075,12 @@ hb_font_get_extents_for_direction (hb_font_t *font,
/**
* hb_font_get_glyph_advance_for_direction:
* @font: a font.
- * @glyph:
- * @direction:
- * @x: (out):
- * @y: (out):
+ * @glyph:
+ * @direction:
+ * @x: (out):
+ * @y: (out):
+ *
*
- *
*
* Since: 0.9.2
**/
@@ -1095,9 +1095,9 @@ hb_font_get_glyph_advance_for_direction (hb_font_t *font,
/**
* hb_font_get_glyph_advances_for_direction:
* @font: a font.
- * @direction:
+ * @direction:
+ *
*
- *
*
* Since: 1.8.6
**/
@@ -1116,12 +1116,12 @@ hb_font_get_glyph_advances_for_direction (hb_font_t* font,
/**
* hb_font_get_glyph_origin_for_direction:
* @font: a font.
- * @glyph:
- * @direction:
- * @x: (out):
- * @y: (out):
+ * @glyph:
+ * @direction:
+ * @x: (out):
+ * @y: (out):
+ *
*
- *
*
* Since: 0.9.2
**/
@@ -1137,12 +1137,12 @@ hb_font_get_glyph_origin_for_direction (hb_font_t *font,
/**
* hb_font_add_glyph_origin_for_direction:
* @font: a font.
- * @glyph:
- * @direction:
- * @x: (out):
- * @y: (out):
+ * @glyph:
+ * @direction:
+ * @x: (out):
+ * @y: (out):
+ *
*
- *
*
* Since: 0.9.2
**/
@@ -1158,12 +1158,12 @@ hb_font_add_glyph_origin_for_direction (hb_font_t *font,
/**
* hb_font_subtract_glyph_origin_for_direction:
* @font: a font.
- * @glyph:
- * @direction:
- * @x: (out):
- * @y: (out):
+ * @glyph:
+ * @direction:
+ * @x: (out):
+ * @y: (out):
+ *
*
- *
*
* Since: 0.9.2
**/
@@ -1179,13 +1179,13 @@ hb_font_subtract_glyph_origin_for_direction (hb_font_t *font,
/**
* hb_font_get_glyph_kerning_for_direction:
* @font: a font.
- * @first_glyph:
- * @second_glyph:
- * @direction:
- * @x: (out):
- * @y: (out):
+ * @first_glyph:
+ * @second_glyph:
+ * @direction:
+ * @x: (out):
+ * @y: (out):
+ *
*
- *
*
* Since: 0.9.2
**/
@@ -1201,13 +1201,13 @@ hb_font_get_glyph_kerning_for_direction (hb_font_t *font,
/**
* hb_font_get_glyph_extents_for_origin:
* @font: a font.
- * @glyph:
- * @direction:
- * @extents: (out):
+ * @glyph:
+ * @direction:
+ * @extents: (out):
+ *
*
- *
*
- * Return value:
+ * Return value:
*
* Since: 0.9.2
**/
@@ -1223,15 +1223,15 @@ hb_font_get_glyph_extents_for_origin (hb_font_t *font,
/**
* hb_font_get_glyph_contour_point_for_origin:
* @font: a font.
- * @glyph:
- * @point_index:
- * @direction:
- * @x: (out):
- * @y: (out):
+ * @glyph:
+ * @point_index:
+ * @direction:
+ * @x: (out):
+ * @y: (out):
+ *
*
- *
*
- * Return value:
+ * Return value:
*
* Since: 0.9.2
**/
@@ -1248,11 +1248,11 @@ hb_font_get_glyph_contour_point_for_origin (hb_font_t *font,
/**
* hb_font_glyph_to_string:
* @font: a font.
- * @glyph:
- * @s: (array length=size):
- * @size:
+ * @glyph:
+ * @s: (array length=size):
+ * @size:
+ *
*
- *
*
* Since: 0.9.2
**/
@@ -1268,13 +1268,13 @@ hb_font_glyph_to_string (hb_font_t *font,
/**
* hb_font_glyph_from_string:
* @font: a font.
- * @s: (array length=len) (element-type uint8_t):
- * @len:
- * @glyph: (out):
+ * @s: (array length=len) (element-type uint8_t):
+ * @len:
+ * @glyph: (out):
*
- *
*
- * Return value:
+ *
+ * Return value:
*
* Since: 0.9.2
**/
@@ -1341,9 +1341,9 @@ _hb_font_create (hb_face_t *face)
* hb_font_create: (Xconstructor)
* @face: a face.
*
- *
*
- * Return value: (transfer full):
+ *
+ * Return value: (transfer full):
*
* Since: 0.9.2
**/
@@ -1364,9 +1364,9 @@ hb_font_create (hb_face_t *face)
* hb_font_create_sub_font:
* @parent: parent font.
*
- *
*
- * Return value: (transfer full):
+ *
+ * Return value: (transfer full):
*
* Since: 0.9.2
**/
@@ -1385,14 +1385,13 @@ hb_font_create_sub_font (hb_font_t *parent)
font->x_scale = parent->x_scale;
font->y_scale = parent->y_scale;
+ font->mults_changed ();
font->x_ppem = parent->x_ppem;
font->y_ppem = parent->y_ppem;
font->ptem = parent->ptem;
font->num_coords = parent->num_coords;
- if (!font->num_coords)
- font->coords = nullptr;
- else
+ if (font->num_coords)
{
unsigned int size = parent->num_coords * sizeof (parent->coords[0]);
font->coords = (int *) malloc (size);
@@ -1408,7 +1407,7 @@ hb_font_create_sub_font (hb_font_t *parent)
/**
* hb_font_get_empty:
*
- *
+ *
*
* Return value: (transfer full)
*
@@ -1424,9 +1423,9 @@ hb_font_get_empty ()
* hb_font_reference: (skip)
* @font: a font.
*
- *
*
- * Return value: (transfer full):
+ *
+ * Return value: (transfer full):
*
* Since: 0.9.2
**/
@@ -1440,7 +1439,7 @@ hb_font_reference (hb_font_t *font)
* hb_font_destroy: (skip)
* @font: a font.
*
- *
+ *
*
* Since: 0.9.2
**/
@@ -1466,14 +1465,14 @@ hb_font_destroy (hb_font_t *font)
/**
* hb_font_set_user_data: (skip)
* @font: a font.
- * @key:
- * @data:
- * @destroy:
- * @replace:
+ * @key:
+ * @data:
+ * @destroy:
+ * @replace:
+ *
*
- *
*
- * Return value:
+ * Return value:
*
* Since: 0.9.2
**/
@@ -1490,11 +1489,11 @@ hb_font_set_user_data (hb_font_t *font,
/**
* hb_font_get_user_data: (skip)
* @font: a font.
- * @key:
+ * @key:
+ *
*
- *
*
- * Return value: (transfer none):
+ * Return value: (transfer none):
*
* Since: 0.9.2
**/
@@ -1509,7 +1508,7 @@ hb_font_get_user_data (hb_font_t *font,
* hb_font_make_immutable:
* @font: a font.
*
- *
+ *
*
* Since: 0.9.2
**/
@@ -1529,9 +1528,9 @@ hb_font_make_immutable (hb_font_t *font)
* hb_font_is_immutable:
* @font: a font.
*
- *
*
- * Return value:
+ *
+ * Return value:
*
* Since: 0.9.2
**/
@@ -1571,9 +1570,9 @@ hb_font_set_parent (hb_font_t *font,
* hb_font_get_parent:
* @font: a font.
*
- *
*
- * Return value: (transfer none):
+ *
+ * Return value: (transfer none):
*
* Since: 0.9.2
**/
@@ -1615,9 +1614,9 @@ hb_font_set_face (hb_font_t *font,
* hb_font_get_face:
* @font: a font.
*
- *
*
- * Return value: (transfer none):
+ *
+ * Return value: (transfer none):
*
* Since: 0.9.2
**/
@@ -1632,10 +1631,10 @@ hb_font_get_face (hb_font_t *font)
* hb_font_set_funcs:
* @font: a font.
* @klass: (closure font_data) (destroy destroy) (scope notified):
- * @font_data:
- * @destroy:
+ * @font_data:
+ * @destroy:
+ *
*
- *
*
* Since: 0.9.2
**/
@@ -1669,9 +1668,9 @@ hb_font_set_funcs (hb_font_t *font,
* hb_font_set_funcs_data:
* @font: a font.
* @font_data: (destroy destroy) (scope notified):
- * @destroy:
+ * @destroy:
+ *
*
- *
*
* Since: 0.9.2
**/
@@ -1699,10 +1698,10 @@ hb_font_set_funcs_data (hb_font_t *font,
/**
* hb_font_set_scale:
* @font: a font.
- * @x_scale:
- * @y_scale:
+ * @x_scale:
+ * @y_scale:
+ *
*
- *
*
* Since: 0.9.2
**/
@@ -1722,10 +1721,10 @@ hb_font_set_scale (hb_font_t *font,
/**
* hb_font_get_scale:
* @font: a font.
- * @x_scale: (out):
- * @y_scale: (out):
+ * @x_scale: (out):
+ * @y_scale: (out):
+ *
*
- *
*
* Since: 0.9.2
**/
@@ -1741,10 +1740,10 @@ hb_font_get_scale (hb_font_t *font,
/**
* hb_font_set_ppem:
* @font: a font.
- * @x_ppem:
- * @y_ppem:
+ * @x_ppem:
+ * @y_ppem:
+ *
*
- *
*
* Since: 0.9.2
**/
@@ -1763,10 +1762,10 @@ hb_font_set_ppem (hb_font_t *font,
/**
* hb_font_get_ppem:
* @font: a font.
- * @x_ppem: (out):
- * @y_ppem: (out):
+ * @x_ppem: (out):
+ * @y_ppem: (out):
+ *
*
- *
*
* Since: 0.9.2
**/
@@ -1815,6 +1814,7 @@ hb_font_get_ptem (hb_font_t *font)
return font->ptem;
}
+#ifndef HB_NO_VAR
/*
* Variations
*/
@@ -1830,7 +1830,6 @@ _hb_font_adopt_var_coords_normalized (hb_font_t *font,
font->num_coords = coords_length;
}
-#ifndef HB_NO_VAR
/**
* hb_font_set_variations:
*
@@ -1909,7 +1908,6 @@ hb_font_set_var_named_instance (hb_font_t *font,
hb_font_set_var_coords_design (font, coords, coords_length);
free (coords);
}
-#endif
/**
* hb_font_set_var_coords_normalized:
@@ -1951,7 +1949,7 @@ hb_font_get_var_coords_normalized (hb_font_t *font,
return font->coords;
}
-
+#endif
#ifndef HB_DISABLE_DEPRECATED
/*
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.h
index e68fd1813b6..9b6518791e1 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.h
@@ -224,7 +224,7 @@ hb_font_funcs_set_font_v_extents_func (hb_font_funcs_t *ffuncs,
* @user_data:
* @destroy:
*
- *
+ *
*
* Since: 1.2.3
**/
@@ -256,7 +256,7 @@ hb_font_funcs_set_nominal_glyphs_func (hb_font_funcs_t *ffuncs,
* @user_data:
* @destroy:
*
- *
+ *
*
* Since: 1.2.3
**/
@@ -272,7 +272,7 @@ hb_font_funcs_set_variation_glyph_func (hb_font_funcs_t *ffuncs,
* @user_data:
* @destroy:
*
- *
+ *
*
* Since: 0.9.2
**/
@@ -288,7 +288,7 @@ hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t *ffuncs,
* @user_data:
* @destroy:
*
- *
+ *
*
* Since: 0.9.2
**/
@@ -304,7 +304,7 @@ hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t *ffuncs,
* @user_data:
* @destroy:
*
- *
+ *
*
* Since: 1.8.6
**/
@@ -320,7 +320,7 @@ hb_font_funcs_set_glyph_h_advances_func (hb_font_funcs_t *ffuncs,
* @user_data:
* @destroy:
*
- *
+ *
*
* Since: 1.8.6
**/
@@ -336,7 +336,7 @@ hb_font_funcs_set_glyph_v_advances_func (hb_font_funcs_t *ffuncs,
* @user_data:
* @destroy:
*
- *
+ *
*
* Since: 0.9.2
**/
@@ -352,7 +352,7 @@ hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs,
* @user_data:
* @destroy:
*
- *
+ *
*
* Since: 0.9.2
**/
@@ -368,7 +368,7 @@ hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs,
* @user_data:
* @destroy:
*
- *
+ *
*
* Since: 0.9.2
**/
@@ -384,7 +384,7 @@ hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t *ffuncs,
* @user_data:
* @destroy:
*
- *
+ *
*
* Since: 0.9.2
**/
@@ -400,7 +400,7 @@ hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs,
* @user_data:
* @destroy:
*
- *
+ *
*
* Since: 0.9.2
**/
@@ -416,7 +416,7 @@ hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs,
* @user_data:
* @destroy:
*
- *
+ *
*
* Since: 0.9.2
**/
@@ -432,7 +432,7 @@ hb_font_funcs_set_glyph_name_func (hb_font_funcs_t *ffuncs,
* @user_data:
* @destroy:
*
- *
+ *
*
* Since: 0.9.2
**/
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff2-table.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff2-table.cc
index 33b51fea43b..0251efac8b5 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff2-table.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff2-table.cc
@@ -110,12 +110,10 @@ bool OT::cff2::accelerator_t::get_extents (hb_font_t *font,
if (unlikely (!is_valid () || (glyph >= num_glyphs))) return false;
- unsigned int num_coords;
- const int *coords = hb_font_get_var_coords_normalized (font, &num_coords);
unsigned int fd = fdSelect->get_fd (glyph);
cff2_cs_interpreter_t<cff2_cs_opset_extents_t, cff2_extents_param_t> interp;
const byte_str_t str = (*charStrings)[glyph];
- interp.env.init (str, *this, fd, coords, num_coords);
+ interp.env.init (str, *this, fd, font->coords, font->num_coords);
cff2_extents_param_t param;
param.init ();
if (unlikely (!interp.interpret (param))) return false;
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 746e87f48fd..23ea4659d20 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
@@ -993,6 +993,15 @@ struct cmap
const CmapSubtable *subtable;
+ /* Symbol subtable.
+ * Prefer symbol if available.
+ * https://github.com/harfbuzz/harfbuzz/issues/1918 */
+ if ((subtable = this->find_subtable (3, 0)))
+ {
+ if (symbol) *symbol = true;
+ return subtable;
+ }
+
/* 32-bit subtables. */
if ((subtable = this->find_subtable (3, 10))) return subtable;
if ((subtable = this->find_subtable (0, 6))) return subtable;
@@ -1005,13 +1014,6 @@ struct cmap
if ((subtable = this->find_subtable (0, 1))) return subtable;
if ((subtable = this->find_subtable (0, 0))) return subtable;
- /* Symbol subtable. */
- if ((subtable = this->find_subtable (3, 0)))
- {
- if (symbol) *symbol = true;
- return subtable;
- }
-
/* Meh. */
return &Null (CmapSubtable);
}
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 d95e5a0b15c..72d65c95041 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
@@ -375,10 +375,14 @@ hb_ot_layout_get_ligature_carets (hb_font_t *font,
{
if (caret_count) *caret_count = result_caret_count;
}
-#ifndef HB_NO_AAT
else
+ {
+#ifndef HB_NO_AAT
result = font->face->table.lcar->get_lig_carets (font, direction, glyph, start_offset, caret_count, caret_array);
+#else
+ if (caret_count) *caret_count = 0;
#endif
+ }
return result;
}
#endif
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 fd099cac73e..a04c92074f5 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
@@ -131,13 +131,6 @@ indic_features[] =
{HB_TAG('b','l','w','s'), F_GLOBAL_MANUAL_JOINERS},
{HB_TAG('p','s','t','s'), F_GLOBAL_MANUAL_JOINERS},
{HB_TAG('h','a','l','n'), F_GLOBAL_MANUAL_JOINERS},
- /*
- * Positioning features.
- * We don't care about the types.
- */
- {HB_TAG('d','i','s','t'), F_GLOBAL},
- {HB_TAG('a','b','v','m'), F_GLOBAL},
- {HB_TAG('b','l','w','m'), F_GLOBAL},
};
/*
@@ -163,10 +156,6 @@ enum {
_INDIC_PSTS,
_INDIC_HALN,
- _INDIC_DIST,
- _INDIC_ABVM,
- _INDIC_BLWM,
-
INDIC_NUM_FEATURES,
INDIC_BASIC_FEATURES = INDIC_INIT, /* Don't forget to update this! */
};
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 b1fa0156aec..cd82900ba11 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
@@ -56,13 +56,6 @@ khmer_features[] =
{HB_TAG('a','b','v','s'), F_GLOBAL_MANUAL_JOINERS},
{HB_TAG('b','l','w','s'), F_GLOBAL_MANUAL_JOINERS},
{HB_TAG('p','s','t','s'), F_GLOBAL_MANUAL_JOINERS},
- /*
- * Positioning features.
- * We don't care about the types.
- */
- {HB_TAG('d','i','s','t'), F_GLOBAL},
- {HB_TAG('a','b','v','m'), F_GLOBAL},
- {HB_TAG('b','l','w','m'), F_GLOBAL},
};
/*
@@ -80,10 +73,6 @@ enum {
_KHMER_BLWS,
_KHMER_PSTS,
- _KHMER_DIST,
- _KHMER_ABVM,
- _KHMER_BLWM,
-
KHMER_NUM_FEATURES,
KHMER_BASIC_FEATURES = _KHMER_PRES, /* Don't forget to update this! */
};
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc
index 14d215eac31..8b9afa503f2 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc
@@ -59,25 +59,6 @@ myanmar_other_features[] =
HB_TAG('b','l','w','s'),
HB_TAG('p','s','t','s'),
};
-static const hb_tag_t
-myanmar_positioning_features[] =
-{
- /*
- * Positioning features.
- * We don't care about the types.
- */
- HB_TAG('d','i','s','t'),
- /* Pre-release version of Windows 8 Myanmar font had abvm,blwm
- * features. The released Windows 8 version of the font (as well
- * as the released spec) used 'mark' instead. The Windows 8
- * shaper however didn't apply 'mark' but did apply 'mkmk'.
- * Perhaps it applied abvm/blwm. This was fixed in a Windows 8
- * update, so now it applies mark/mkmk. We are guessing that
- * it still applies abvm/blwm too.
- */
- HB_TAG('a','b','v','m'),
- HB_TAG('b','l','w','m'),
-};
static void
setup_syllables_myanmar (const hb_ot_shape_plan_t *plan,
@@ -114,9 +95,6 @@ collect_features_myanmar (hb_ot_shape_planner_t *plan)
for (unsigned int i = 0; i < ARRAY_LENGTH (myanmar_other_features); i++)
map->enable_feature (myanmar_other_features[i], F_MANUAL_ZWJ);
-
- for (unsigned int i = 0; i < ARRAY_LENGTH (myanmar_positioning_features); i++)
- map->enable_feature (myanmar_positioning_features[i]);
}
static void
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc
index 1ea2957f261..ffef685babb 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc
@@ -88,17 +88,6 @@ use_other_features[] =
HB_TAG('p','r','e','s'),
HB_TAG('p','s','t','s'),
};
-static const hb_tag_t
-use_positioning_features[] =
-{
- /*
- * Positioning features.
- * We don't care about the types.
- */
- HB_TAG('d','i','s','t'),
- HB_TAG('a','b','v','m'),
- HB_TAG('b','l','w','m'),
-};
static void
setup_syllables_use (const hb_ot_shape_plan_t *plan,
@@ -154,10 +143,6 @@ collect_features_use (hb_ot_shape_planner_t *plan)
/* "Standard typographic presentation" */
for (unsigned int i = 0; i < ARRAY_LENGTH (use_other_features); i++)
map->enable_feature (use_other_features[i], F_MANUAL_ZWJ);
-
- /* "Positional feature application" */
- for (unsigned int i = 0; i < ARRAY_LENGTH (use_positioning_features); i++)
- map->enable_feature (use_positioning_features[i]);
}
struct use_shape_plan_t
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc
index c8bda2aad50..d0c66b44613 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc
@@ -285,6 +285,8 @@ hb_ot_shape_plan_t::position (hb_font_t *font,
static const hb_ot_map_feature_t
common_features[] =
{
+ {HB_TAG('a','b','v','m'), F_GLOBAL},
+ {HB_TAG('b','l','w','m'), F_GLOBAL},
{HB_TAG('c','c','m','p'), F_GLOBAL},
{HB_TAG('l','o','c','l'), F_GLOBAL},
{HB_TAG('m','a','r','k'), F_GLOBAL_MANUAL_JOINERS},
@@ -299,6 +301,7 @@ horizontal_features[] =
{HB_TAG('c','a','l','t'), F_GLOBAL},
{HB_TAG('c','l','i','g'), F_GLOBAL},
{HB_TAG('c','u','r','s'), F_GLOBAL},
+ {HB_TAG('d','i','s','t'), F_GLOBAL},
{HB_TAG('k','e','r','n'), F_GLOBAL_HAS_FALLBACK},
{HB_TAG('l','i','g','a'), F_GLOBAL},
{HB_TAG('r','c','l','t'), F_GLOBAL},
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-avar-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-avar-table.hh
index 57a3a6d16f8..45f702dbd9e 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-avar-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-avar-table.hh
@@ -49,9 +49,10 @@ struct AxisValueMap
}
public:
- F2DOT14 fromCoord; /* A normalized coordinate value obtained using
- * default normalization. */
- F2DOT14 toCoord; /* The modified, normalized coordinate value. */
+ F2DOT14 coords[2];
+// F2DOT14 fromCoord; /* A normalized coordinate value obtained using
+// * default normalization. */
+// F2DOT14 toCoord; /* The modified, normalized coordinate value. */
public:
DEFINE_SIZE_STATIC (4);
@@ -59,12 +60,13 @@ struct AxisValueMap
struct SegmentMaps : ArrayOf<AxisValueMap>
{
- int map (int value) const
+ int map (int value, unsigned int from_offset = 0, unsigned int to_offset = 1) const
{
+#define fromCoord coords[from_offset]
+#define toCoord coords[to_offset]
/* The following special-cases are not part of OpenType, which requires
* that at least -1, 0, and +1 must be mapped. But we include these as
* part of a better error recovery scheme. */
-
if (len < 2)
{
if (!len)
@@ -91,8 +93,12 @@ struct SegmentMaps : ArrayOf<AxisValueMap>
return arrayZ[i-1].toCoord +
((arrayZ[i].toCoord - arrayZ[i-1].toCoord) *
(value - arrayZ[i-1].fromCoord) + denom/2) / denom;
+#undef toCoord
+#undef fromCoord
}
+ int unmap (int value) const { return map (value, 1, 0); }
+
public:
DEFINE_SIZE_ARRAY (2, *this);
};
@@ -133,6 +139,18 @@ struct avar
}
}
+ void unmap_coords (int *coords, unsigned int coords_length) const
+ {
+ unsigned int count = hb_min (coords_length, axisCount);
+
+ const SegmentMaps *map = &firstAxisSegmentMaps;
+ for (unsigned int i = 0; i < count; i++)
+ {
+ coords[i] = map->unmap (coords[i]);
+ map = &StructAfter<SegmentMaps> (*map);
+ }
+ }
+
protected:
FixedVersion<>version; /* Version of the avar table
* initially set to 0x00010000u */
@@ -140,7 +158,7 @@ struct avar
HBUINT16 axisCount; /* The number of variation axes in the font. This
* must be the same number as axisCount in the
* 'fvar' table. */
- SegmentMaps firstAxisSegmentMaps;
+ SegmentMaps firstAxisSegmentMaps;
public:
DEFINE_SIZE_MIN (8);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh
index 18b9518d3a4..f1d024560e5 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh
@@ -240,6 +240,20 @@ struct fvar
return roundf (v * 16384.f);
}
+ float unnormalize_axis_value (unsigned int axis_index, float v) const
+ {
+ hb_ot_var_axis_info_t axis;
+ get_axis_info (axis_index, &axis);
+
+ if (v == 0)
+ return axis.default_value;
+ else if (v < 0)
+ v = v * (axis.default_value - axis.min_value) / 16384.f + axis.default_value;
+ else
+ v = v * (axis.max_value - axis.default_value) / 16384.f + axis.default_value;
+ return v;
+ }
+
unsigned int get_instance_count () const { return instanceCount; }
hb_ot_name_id_t get_instance_subfamily_name_id (unsigned int instance_index) const
diff --git a/Build/source/libs/harfbuzz/version.ac b/Build/source/libs/harfbuzz/version.ac
index 4de444be1dd..4604201932f 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.0])
+m4_define([harfbuzz_version], [2.6.1])