summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/libs/harfbuzz/ChangeLog5
-rw-r--r--Build/source/libs/harfbuzz/Makefile.am2
-rw-r--r--Build/source/libs/harfbuzz/Makefile.in2
-rwxr-xr-xBuild/source/libs/harfbuzz/configure24
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-PATCHES/ChangeLog5
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-PATCHES/TL-Changes2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog582
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/NEWS24
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/config.h.in43
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/configure.ac9
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources2
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/check-symbols.sh4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh9
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.cc3
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-math-table.hh722
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh3
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc248
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math.h209
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot.h1
-rw-r--r--Build/source/libs/harfbuzz/version.ac2
20 files changed, 1879 insertions, 22 deletions
diff --git a/Build/source/libs/harfbuzz/ChangeLog b/Build/source/libs/harfbuzz/ChangeLog
index 65bc8a006ca..73ff81e81d3 100644
--- a/Build/source/libs/harfbuzz/ChangeLog
+++ b/Build/source/libs/harfbuzz/ChangeLog
@@ -1,3 +1,8 @@
+2016-10-26 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ Import harfbuzz-1.3.3.
+ * Makefile.am, version.ac: Adjusted.
+
2016-09-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
Import harfbuzz-1.3.2.
diff --git a/Build/source/libs/harfbuzz/Makefile.am b/Build/source/libs/harfbuzz/Makefile.am
index 36d099d9150..437671c0640 100644
--- a/Build/source/libs/harfbuzz/Makefile.am
+++ b/Build/source/libs/harfbuzz/Makefile.am
@@ -81,9 +81,11 @@ libharfbuzz_a_SOURCES += \
@HARFBUZZ_TREE@/src/hb-ot-layout-gsubgpos-private.hh \
@HARFBUZZ_TREE@/src/hb-ot-layout-gsub-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-layout-jstf-table.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-layout-math-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-layout-private.hh \
@HARFBUZZ_TREE@/src/hb-ot-map.cc \
@HARFBUZZ_TREE@/src/hb-ot-map-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-math.h \
@HARFBUZZ_TREE@/src/hb-ot-shape.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-arabic.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-arabic-fallback.hh \
diff --git a/Build/source/libs/harfbuzz/Makefile.in b/Build/source/libs/harfbuzz/Makefile.in
index 8ebfa4070ec..bd50c48c544 100644
--- a/Build/source/libs/harfbuzz/Makefile.in
+++ b/Build/source/libs/harfbuzz/Makefile.in
@@ -689,9 +689,11 @@ libharfbuzz_a_SOURCES = @HARFBUZZ_TREE@/src/hb-atomic-private.hh \
@HARFBUZZ_TREE@/src/hb-ot-layout-gsubgpos-private.hh \
@HARFBUZZ_TREE@/src/hb-ot-layout-gsub-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-layout-jstf-table.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-layout-math-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-layout-private.hh \
@HARFBUZZ_TREE@/src/hb-ot-map.cc \
@HARFBUZZ_TREE@/src/hb-ot-map-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-math.h \
@HARFBUZZ_TREE@/src/hb-ot-shape.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-arabic.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-arabic-fallback.hh \
diff --git a/Build/source/libs/harfbuzz/configure b/Build/source/libs/harfbuzz/configure
index 8546ce4ddc2..025da32436f 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.3.2.
+# Generated by GNU Autoconf 2.69 for harfbuzz (TeX Live) 1.3.3.
#
# 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.3.2'
-PACKAGE_STRING='harfbuzz (TeX Live) 1.3.2'
+PACKAGE_VERSION='1.3.3'
+PACKAGE_STRING='harfbuzz (TeX Live) 1.3.3'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
@@ -1312,7 +1312,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.3.2 to adapt to many kinds of systems.
+\`configure' configures harfbuzz (TeX Live) 1.3.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1383,7 +1383,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of harfbuzz (TeX Live) 1.3.2:";;
+ short | recursive ) echo "Configuration of harfbuzz (TeX Live) 1.3.3:";;
esac
cat <<\_ACEOF
@@ -1490,7 +1490,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-harfbuzz (TeX Live) configure 1.3.2
+harfbuzz (TeX Live) configure 1.3.3
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2080,7 +2080,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.3.2, which was
+It was created by harfbuzz (TeX Live) $as_me 1.3.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -4003,7 +4003,7 @@ fi
# Define the identity of the package.
PACKAGE='harfbuzz--tex-live-'
- VERSION='1.3.2'
+ VERSION='1.3.3'
cat >>confdefs.h <<_ACEOF
@@ -4206,8 +4206,8 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags
HB_VERSION_MAJOR=1
HB_VERSION_MINOR=3
-HB_VERSION_MICRO=2
-HB_VERSION=1.3.2
+HB_VERSION_MICRO=3
+HB_VERSION=1.3.3
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -6866,7 +6866,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.3.2, which was
+This file was extended by harfbuzz (TeX Live) $as_me 1.3.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -6932,7 +6932,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.3.2
+harfbuzz (TeX Live) config.status 1.3.3
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-PATCHES/ChangeLog b/Build/source/libs/harfbuzz/harfbuzz-PATCHES/ChangeLog
index 0b19ae47df4..5b8c123abb3 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-PATCHES/ChangeLog
+++ b/Build/source/libs/harfbuzz/harfbuzz-PATCHES/ChangeLog
@@ -1,3 +1,8 @@
+2016-10-26 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ Imported harfbuzz-1.3.3 source tree from:
+ http://www.freedesktop.org/software/harfbuzz/release/
+
2016-09-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
Imported harfbuzz-1.3.2 source tree from:
diff --git a/Build/source/libs/harfbuzz/harfbuzz-PATCHES/TL-Changes b/Build/source/libs/harfbuzz/harfbuzz-PATCHES/TL-Changes
index d5111a80969..b4436fa8fb8 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-PATCHES/TL-Changes
+++ b/Build/source/libs/harfbuzz/harfbuzz-PATCHES/TL-Changes
@@ -1,4 +1,4 @@
-Changes applied to the harfbuzz-1.3.2/ tree as obtained from:
+Changes applied to the harfbuzz-1.3.3/ tree as obtained from:
http://www.freedesktop.org/software/harfbuzz/release/
Removed:
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
index 0241bbc8849..142d6533891 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
@@ -1,3 +1,274 @@
+commit 118164293cc7eb18ba03896f602aff816400134b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 26 16:04:30 2016 +0200
+
+ Fix "make distcheck"
+
+ configure.ac | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+commit b6c765871b752c9436ec993e47b48f9d4fecaed5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 26 10:33:33 2016 +0200
+
+ [ci] Fix appveyor.yml syntax error
+
+ appveyor.yml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 0e79ebb3ca9b7b6d238a0007e5ca022845ee9afc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Oct 23 14:39:43 2016 +0200
+
+ [gobject] Update for new MATH structs
+
+ src/hb-gobject-structs.cc | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 8c854dc023b1f9e081a3bbd16416b88a4671c267
+Merge: bb9805f c3fa5d0
+Author: Khaled Hosny <khaledhosny@eglug.org>
+Date: Tue Oct 25 00:31:36 2016 +0300
+
+ Merge pull request #352 from fred-wang/makefile-am
+
+ Remove inexistent file ttx file from test/api/Makefile.am
+
+commit c3fa5d0e03b57be131c66ea8720806c946d0e10f
+Author: Frédéric Wang <fred.wang@free.fr>
+Date: Mon Oct 24 21:42:04 2016 +0200
+
+ Remove inexistent file ttx file from test/api/Makefile.am
+
+ test/api/Makefile.am | 1 -
+ 1 file changed, 1 deletion(-)
+
+commit bb9805f5419f18c7f5cab32d660fd4109c30f7cc
+Merge: 702d9f5 755a0c2
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Sat Oct 22 12:23:05 2016 +0330
+
+ Merge pull request #349 from ebraminio/mergebackvcpkgpatches
+
+ [ci] Enable hb-freetype on Windows build tests
+
+commit 755a0c20798e3c3e6bb933a28e38f9667fccdadc
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Fri Oct 21 11:48:58 2016 +0330
+
+ [ci] Enable freetype on msvc using vcpkg
+
+ appveyor.yml | 15 +++++++++++++--
+ 1 file changed, 13 insertions(+), 2 deletions(-)
+
+commit 4631d84c2bb51395efe3156f9c9f1a6b0e277947
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Tue Oct 18 14:30:00 2016 +0330
+
+ Merge back @vlj's local patches of vcpkg
+
+ win32/config-msvc.mak | 7 +++++++
+ win32/detectenv-msvc.mak | 3 +++
+ 2 files changed, 10 insertions(+)
+
+commit 702d9f522d1ac4797700f0ea056f69169b8d1a78
+Merge: 331c46c d8e2eb9
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Fri Oct 14 13:54:55 2016 +0330
+
+ Merge pull request #340 from ebraminio/nouniscribe
+
+ Make Uniscribe optional on nmake win32 builds
+
+commit d8e2eb9ee0f47af7e90056d8db5949d10a88786a
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Sun Oct 9 09:06:05 2016 +0330
+
+ Make Uniscribe optional on nmake win32 builds
+
+ Most of harfbuzz clients don't need Uniscribe and DirectWrite support
+ at all
+ as harfbuzz is a replacement for Uniscribe so Chromium and Firefox
+ are using
+ harfbuzz without them on Windows.
+
+ This removal also helps win32 nmake clients to have reduced binary
+ size and
+ libs count.
+
+ appveyor.yml | 2 +-
+ win32/README.txt | 13 +++++++------
+ win32/config-msvc.mak | 18 +++++++++++++-----
+ win32/config.h.win32.in | 2 +-
+ win32/info-msvc.mak | 11 +++++++++--
+ 5 files changed, 31 insertions(+), 15 deletions(-)
+
+commit 331c46c79b4d18cb4948be12c78ebb71a143e7ac
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 11 13:45:22 2016 -0700
+
+ Fix configure on iOS
+
+ Fixes https://github.com/behdad/harfbuzz/issues/342
+
+ configure.ac | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit f6e194e77a2c34cd118b47c0d73a22afde85dfda
+Merge: 7201fdd bef240b
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Tue Oct 11 17:23:41 2016 +0330
+
+ Merge pull request #344 from ebraminio/fixmacci
+
+ [ci] Whitelist more symbols and unbreak mac CI
+
+commit bef240b36ee9086b0d92e351e4c5118c0bbb5df6
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Mon Oct 10 17:27:52 2016 +0330
+
+ [ci] Whitelist more symbols and unbreak mac CI
+
+ Thanks to @khaledhosny, actually this is his work :)
+
+ src/check-symbols.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 7201fdd0a8e26d49b13e289b53de375d5b1c9fcb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 4 14:53:17 2016 -0700
+
+ LFS (large file system?) support in hb-*shap*, hb-view
+
+ Fixes https://github.com/behdad/harfbuzz/issues/336
+
+ configure.ac | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 34fc4a2cfa61089b7ec2d9510d99cdc4c13bceb4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Sep 28 19:17:27 2016 +0200
+
+ Fix dist
+
+ test/api/Makefile.am | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+commit d1c62370a0c2bdb365a1468dc8d782b9a7245946
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Sep 28 19:11:22 2016 +0200
+
+ Aim math API for 1.3.3 instead of 1.4.0
+
+ docs/harfbuzz-docs.xml | 6 +++---
+ docs/harfbuzz-sections.txt | 12 ++++++------
+ src/hb-ot-layout.cc | 18 +++++++++---------
+ src/hb-ot-math.h | 10 +++++-----
+ 4 files changed, 23 insertions(+), 23 deletions(-)
+
+commit 7adbc5dd62ca03a65d1886e0f32e7026964dc5e5
+Author: Khaled Hosny <khaledhosny@eglug.org>
+Date: Fri Sep 30 04:01:24 2016 -0700
+
+ Fix building math docs (#335)
+
+ src/hb-ot-layout.cc | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+commit fd7a245d3525905ffbce57472b52900fcb0e330b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Sep 27 17:56:35 2016 +0200
+
+ Require glib >= 2.38.0 for G_TEST_DIST
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 6d3e6abf0c6ad55dabae96c76b4da9ab14bf16ef
+Merge: f73a87d c3e21a6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Sep 27 17:15:59 2016 +0200
+
+ Merge branch 'math'
+
+ Supercedes https://github.com/behdad/harfbuzz/pull/326
+ Fixes https://github.com/behdad/harfbuzz/pull/331
+
+commit c3e21a6620c35500afa350d11620f69802920df3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Sep 27 16:51:38 2016 +0200
+
+ [MATH] Fix more docs
+
+ src/hb-ot-layout.cc | 18 +++++++++---------
+ src/hb-ot-math.h | 25 +++++++++++++++++++++++++
+ 2 files changed, 34 insertions(+), 9 deletions(-)
+
+commit 46cc4a3a2a529c80677babe38ca1542f9c773ac0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Sep 27 16:44:22 2016 +0200
+
+ [MATH] Rename hb_math_*_t types to hb_ot_math_*_t
+
+ With this, I believe MATH table API is not ready to be merged.
+
+ docs/harfbuzz-sections.txt | 6 +++---
+ src/hb-ot-layout-math-table.hh | 12 ++++++------
+ src/hb-ot-layout.cc | 8 ++++----
+ src/hb-ot-math.h | 16 ++++++++--------
+ test/api/test-ot-math.c | 4 ++--
+ 5 files changed, 23 insertions(+), 23 deletions(-)
+
+commit db5ebcf10f8595d1f4a9df27befd6cb5e76ca94d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Sep 27 16:42:25 2016 +0200
+
+ Update docs
+
+ docs/harfbuzz-docs.xml | 9 +++++++++
+ docs/harfbuzz-sections.txt | 30 ++++++++++++++++++++++++++++--
+ 2 files changed, 37 insertions(+), 2 deletions(-)
+
+commit 0762b35474c47171e5661904e93851eb73a44e5c
+Author: Frédéric Wang <fred.wang@free.fr>
+Date: Tue Sep 27 15:28:35 2016 +0200
+
+ Document API for MathVariants (#330)
+
+ src/hb-ot-layout.cc | 56
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 56 insertions(+)
+
+commit 8d622f1114d6a0eca1786b94c7fc1a0bcd87f74b
+Author: Frédéric Wang <fred.wang@free.fr>
+Date: Tue Sep 27 13:53:34 2016 +0200
+
+ Add tests for get_mathvariant (#329)
+
+ test/api/test-ot-math.c | 160
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 160 insertions(+)
+
+commit f73a87d9a8c76a181794b74b527ea268048f78e3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Sep 27 13:50:54 2016 +0200
+
+ 1.3.2
+
+ NEWS | 7 +++++++
+ configure.ac | 2 +-
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+commit 485e4873fb7cacfa9d853272c2275bbc5826023e
+Author: Frédéric Wang <fred.wang@free.fr>
+Date: Tue Sep 27 13:18:00 2016 +0200
+
+ Add tests for hb_ot_math_get_glyph_variants (#328)
+
+ test/api/test-ot-math.c | 126
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 126 insertions(+)
+
commit f16bf6c2dacf5b9c82b2d1ffacc092cc396189a7
Author: Phil Krylov <phil.krylov@gmail.com>
Date: Tue Sep 27 12:38:49 2016 +0200
@@ -7,6 +278,317 @@ Date: Tue Sep 27 12:38:49 2016 +0200
configure.ac | 10 ++++++++++
1 file changed, 10 insertions(+)
+commit a5629a2ed9c2e69f2b4ebb74d85fbe0b5ba2be67
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Sep 27 11:30:44 2016 +0200
+
+ [MATH] Simplify test
+
+ test/api/test-ot-math.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+commit edcfa789bf92c18f5badad31c0ad04a6a77d7226
+Author: Frédéric Wang <fred.wang@free.fr>
+Date: Tue Sep 27 11:02:08 2016 +0200
+
+ test-ot-math: Use different scales for vertical
+ and horizontal directions and add test for
+ hb_ot_math_get_min_connector_overlap. (#327)
+
+ test/api/test-ot-math.c | 81
+ ++++++++++++++++++++++++++++++-------------------
+ 1 file changed, 49 insertions(+), 32 deletions(-)
+
+commit bc19f7fe20e89823dba07a46c3d48c7406b781b6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Sep 27 10:58:08 2016 +0200
+
+ [MATH] Add HB_OT_MATH_SCRIPT
+
+ src/hb-ot-math.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit cdc9eef7da934ae71578694f29665e439686c3bd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 26 22:18:41 2016 +0200
+
+ [MATH] Enable tests for glyph-assembly italics-correction
+
+ test/api/test-ot-math.c | 49
+ ++++++++++++++++++++++++++++++-------------------
+ 1 file changed, 30 insertions(+), 19 deletions(-)
+
+commit 86106c7528d9bff8de6bc3e1487be780c31ea4fd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 26 22:12:48 2016 +0200
+
+ [MATH] Rename all API to hb_ot_math_*
+
+ src/hb-ot-layout-private.hh | 10 --
+ src/hb-ot-layout.cc | 69 ++++----
+ src/hb-ot-math.h | 56 +++---
+ test/api/Makefile.am | 6 +-
+ test/api/test-ot-layout-math.c | 382
+ -----------------------------------------
+ test/api/test-ot-math.c | 381
+ ++++++++++++++++++++++++++++++++++++++++
+ 6 files changed, 447 insertions(+), 457 deletions(-)
+
+commit 1ba767cd4e3606beb9dc59806b83b1e61f5958d4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 26 21:57:14 2016 +0200
+
+ [MATH] Move API from hb-ot-layout.h to hb-ot-math.h
+
+ src/hb-ot-layout.h | 52
+ --------------------------------------------------
+ src/hb-ot-math.h | 56
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-ot.h | 1 +
+ 3 files changed, 57 insertions(+), 52 deletions(-)
+
+commit 97b72da6006d8d6355ee90d514f627e6604a4936
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 26 21:53:25 2016 +0200
+
+ Whitespace
+
+ src/hb-ot-layout-math-table.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 559eb564472575ae4d87a241314b8a3ca24418c4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 26 21:46:05 2016 +0200
+
+ [MATH] Wire up get_glyph_assembly()
+
+ src/hb-ot-layout-math-table.hh | 64
+ ++++++++++++++++++++++++++++++++++++++----
+ src/hb-ot-layout.cc | 26 +++++++++--------
+ src/hb-ot-layout.h | 14 ++++-----
+ 3 files changed, 81 insertions(+), 23 deletions(-)
+
+commit 353f455af7ccbc1af8338dcb0c8ab87aef866c79
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 26 21:22:48 2016 +0200
+
+ [MATH] Wire up get_glyph_variants()
+
+ src/hb-font-private.hh | 11 ++-
+ src/hb-ot-layout-math-table.hh | 178
+ +++++++++++++++++++----------------------
+ src/hb-ot-layout.cc | 7 +-
+ src/hb-ot-layout.h | 2 +-
+ 4 files changed, 95 insertions(+), 103 deletions(-)
+
+commit 7fe0e28c22331a353d396f8bc1e3a60f1580a96d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 26 17:51:47 2016 +0100
+
+ [MATH] Start fleshing out glyph variant API
+
+ src/hb-font-private.hh | 4 +++
+ src/hb-ot-layout-math-table.hh | 10 ++----
+ src/hb-ot-layout.cc | 73
+ +++++++++++++++---------------------------
+ src/hb-ot-layout.h | 20 ++++++++++++
+ src/hb-ot-math.h | 18 +++++++++++
+ 5 files changed, 71 insertions(+), 54 deletions(-)
+
+commit 1f3327f21045df8a050a21a949b44b9ce186ceaa
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 26 16:10:08 2016 +0100
+
+ [MATH] Clean up math variants
+
+ src/hb-ot-layout-math-table.hh | 35 +++++++++--------------------------
+ 1 file changed, 9 insertions(+), 26 deletions(-)
+
+commit 51da7a1cd672aada84bdbb3a2a8dd77ab1134249
+Author: Frédéric Wang <fred.wang@free.fr>
+Date: Thu Aug 25 11:17:50 2016 +0200
+
+ MATH table: Add API to access math variants.
+
+ src/hb-ot-layout-math-table.hh | 253
+ +++++++++++++++++++++++++++++++-
+ src/hb-ot-layout-private.hh | 10 ++
+ src/hb-ot-layout.cc | 54 +++++++
+ test/api/fonts/MathTestFontPartial4.otf | Bin 0 -> 14360 bytes
+ test/api/test-ot-layout-math.c | 51 +++++++
+ 5 files changed, 364 insertions(+), 4 deletions(-)
+
+commit 722e620f20fa2225cf874f4aeb115a064142fcf1
+Author: Frédéric Wang <fred.wang@free.fr>
+Date: Mon Sep 26 11:51:36 2016 +0200
+
+ Use G_TEST_DIST to build the path of math test fonts
+
+ test/api/Makefile.am | 2 ++
+ test/api/test-ot-layout-math.c | 8 ++++++--
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+commit 8d58e3433e242bd9dd18aa08f55ab0a406583fb0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 26 13:39:58 2016 +0100
+
+ [MATH] Fix get_kerning() with negative y-scale
+
+ src/hb-ot-layout-math-table.hh | 36 +++++++++++++++++++++---------------
+ 1 file changed, 21 insertions(+), 15 deletions(-)
+
+commit 94f5df5626b223ad92d0c167f560c1f2e2f19042
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 26 13:31:47 2016 +0100
+
+ [MATH] Clean up get_kerning()
+
+ src/hb-ot-layout-math-table.hh | 29 +++++++++++++++++------------
+ src/hb-ot-layout.cc | 5 +----
+ 2 files changed, 18 insertions(+), 16 deletions(-)
+
+commit 17ff30e9afde79e41c17786223293e867b49ebba
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 26 12:18:32 2016 +0100
+
+ [MATH] Clean up get_top_accent_attachment()
+
+ Note, the function now returns "half of horizontal advance width"
+ if top accent attachment for glyph is not explicitly defined.
+ This is what the spec requires. Updated tests.
+
+ src/hb-ot-layout-math-table.hh | 31 +++++++++++--------------------
+ src/hb-ot-layout.cc | 7 +------
+ test/api/test-ot-layout-math.c | 8 ++++----
+ 3 files changed, 16 insertions(+), 30 deletions(-)
+
+commit 8bcf517fe59608d2247a8974445b3ff0f4b4b4ac
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 26 12:12:41 2016 +0100
+
+ [MATH] Clean up get_italics_correction()
+
+ src/hb-ot-layout-math-table.hh | 16 ++++++++--------
+ src/hb-ot-layout.cc | 17 ++++++-----------
+ src/hb-ot-layout.h | 4 ++--
+ test/api/test-ot-layout-math.c | 18 +++++++++---------
+ 4 files changed, 25 insertions(+), 30 deletions(-)
+
+commit 06003f71ba0d0327fb1a17098a9d7faa8fb336f0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 26 12:07:29 2016 +0100
+
+ [MATH] Clean up a bit more
+
+ src/hb-ot-layout-math-table.hh | 12 +--------
+ src/hb-ot-layout.cc | 57
+ ++++++++++++++++--------------------------
+ 2 files changed, 22 insertions(+), 47 deletions(-)
+
+commit 54c0cc38fba24fa4370231408ba121589b190a28
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 26 11:56:40 2016 +0100
+
+ [MATH] Clean up get_math_constant implementation
+
+ src/hb-ot-layout-math-table.hh | 10 +++++-----
+ src/hb-ot-layout.cc | 5 ++---
+ 2 files changed, 7 insertions(+), 8 deletions(-)
+
+commit 8a8cfad9a0834fe278a747c1d755144bd78f564b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 26 11:47:05 2016 +0100
+
+ [MATH] Cleanup previous commit a bit
+
+ src/hb-ot-layout-math-table.hh | 186
+ ++++++++++++++++++++---------------------
+ src/hb-ot-layout.cc | 30 +++----
+ src/hb-ot-layout.h | 14 ++--
+ 3 files changed, 113 insertions(+), 117 deletions(-)
+
+commit d7182d129612c619b9026ee9b15f2dcfada132db
+Author: Frédéric Wang <fred.wang@free.fr>
+Date: Thu Aug 25 11:15:31 2016 +0200
+
+ MATH Table: Add API to access glyph info.
+
+ src/hb-ot-layout-math-table.hh | 271
+ +++++++++++++++++++++++++++++++-
+ src/hb-ot-layout.cc | 114 ++++++++++++++
+ src/hb-ot-layout.h | 18 +++
+ src/hb-ot-math.h | 7 +
+ test/api/fonts/MathTestFontPartial1.otf | Bin 0 -> 14348 bytes
+ test/api/fonts/MathTestFontPartial2.otf | Bin 0 -> 14356 bytes
+ test/api/fonts/MathTestFontPartial3.otf | Bin 0 -> 14380 bytes
+ test/api/test-ot-layout-math.c | 155 ++++++++++++++++++
+ 8 files changed, 563 insertions(+), 2 deletions(-)
+
+commit 6fd2fe418dc838743f0d4a8a2222cdcaf587500c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 26 11:24:39 2016 +0100
+
+ [MATH] Fixup math constants commit a bit more
+
+ src/hb-ot-layout-math-table.hh | 24 +++++++++++-------------
+ 1 file changed, 11 insertions(+), 13 deletions(-)
+
+commit 1a381153a2e6a15bded1f8e31f6b0e0cadb078af
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 26 11:15:59 2016 +0100
+
+ [MATH] Fixups for math constants commit
+
+ src/hb-ot-layout-math-table.hh | 19 +++++++++----------
+ 1 file changed, 9 insertions(+), 10 deletions(-)
+
+commit 319ff59161e6b027391f8b9fdce0db6dd44cc20d
+Author: Frédéric Wang <fred.wang@free.fr>
+Date: Thu Aug 25 11:06:41 2016 +0200
+
+ MATH Table: Add API to access math contants.
+
+ src/Makefile.sources | 1 +
+ src/hb-ot-layout-math-table.hh | 146
+ +++++++++++++++++++++++++++++++++++-
+ src/hb-ot-layout.cc | 25 ++++++
+ src/hb-ot-layout.h | 5 ++
+ src/hb-ot-math.h | 100 ++++++++++++++++++++++++
+ test/api/fonts/MathTestFontFull.otf | Bin 0 -> 25412 bytes
+ test/api/test-ot-layout-math.c | 72 ++++++++++++++++++
+ 7 files changed, 345 insertions(+), 4 deletions(-)
+
+commit 4d3892e9b05a4df67b2f5cfd6dd3a1e0f5b38fc7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 26 10:45:58 2016 +0100
+
+ [MATH] Fixups for previous commit
+
+ src/hb-ot-layout-math-table.hh | 8 ++++----
+ src/hb-ot-layout.cc | 29 +++++++++++++++++++----------
+ src/hb-ot-layout.h | 2 ++
+ test/api/Makefile.am | 6 ++----
+ test/api/test-ot-layout-math.c | 16 +++++++++-------
+ 5 files changed, 36 insertions(+), 25 deletions(-)
+
+commit 5fbcb992bd7887f95b1cf2ca045c9226de8148fc
+Author: Frédéric Wang <fred.wang@free.fr>
+Date: Thu Aug 25 10:47:15 2016 +0200
+
+ MATH Table: Add API to check availability of math data.
+
+ src/Makefile.sources | 1 +
+ src/hb-ot-layout-math-table.hh | 60 +++++++++++++++++++++
+ src/hb-ot-layout-private.hh | 3 ++
+ src/hb-ot-layout.cc | 45 ++++++++++++++++
+ src/hb-ot-layout.h | 7 +++
+ test/api/Makefile.am | 14 ++++-
+ test/api/fonts/MathTestFontEmpty.otf | Bin 0 -> 14320 bytes
+ test/api/fonts/MathTestFontNone.otf | Bin 0 -> 14284 bytes
+ test/api/test-ot-layout-math.c | 98
+ +++++++++++++++++++++++++++++++++++
+ 9 files changed, 227 insertions(+), 1 deletion(-)
+
commit 02bfd965af588640250c47f344ad3096c8a373e0
Author: Gregory Morse <gregory.morse@live.com>
Date: Mon Sep 12 10:22:15 2016 +0200
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
index ae0926e6391..e83f25f2bcb 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
@@ -1,3 +1,27 @@
+Overview of changes leading to 1.3.3
+Wednesday, September 28, 2016
+====================================
+
+- Implement parsing of OpenType MATH table.
+New API:
+HB_OT_TAG_MATH
+HB_OT_MATH_SCRIPT
+hb_ot_math_constant_t
+hb_ot_math_kern_t
+hb_ot_math_glyph_variant_t
+hb_ot_math_glyph_part_flags_t
+hb_ot_math_glyph_part_t
+hb_ot_math_has_data
+hb_ot_math_get_constant
+hb_ot_math_get_glyph_italics_correction
+hb_ot_math_get_glyph_top_accent_attachment
+hb_ot_math_get_glyph_kerning
+hb_ot_math_is_glyph_extended_shape
+hb_ot_math_get_glyph_variants
+hb_ot_math_get_min_connector_overlap
+hb_ot_math_get_glyph_assembly
+
+
Overview of changes leading to 1.3.2
Wednesday, September 27, 2016
====================================
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/config.h.in b/Build/source/libs/harfbuzz/harfbuzz-src/config.h.in
index c4ca47347a6..def9f3e0835 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/config.h.in
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/config.h.in
@@ -154,3 +154,46 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Enable large inode numbers on Mac OS X 10.5. */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac b/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
index 57e9e6db67f..b38ba98c74b 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.3.2],
+ [1.3.3],
[https://github.com/behdad/harfbuzz/issues/new],
[harfbuzz],
[http://harfbuzz.org/])
@@ -19,9 +19,11 @@ LT_PREREQ([2.2])
LT_INIT([disable-static])
# Check for programs
+AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CXX
+AC_SYS_LARGEFILE
PKG_PROG_PKG_CONFIG([0.20])
AM_MISSING_PROG([RAGEL], [ragel])
AM_MISSING_PROG([GIT], [git])
@@ -145,7 +147,7 @@ AC_ARG_WITH(glib,
[Use glib @<:@default=auto@:>@])],,
[with_glib=auto])
have_glib=false
-GLIB_DEPS="glib-2.0 >= 2.16"
+GLIB_DEPS="glib-2.0 >= 2.38"
AC_SUBST(GLIB_DEPS)
if test "x$with_glib" = "xyes" -o "x$with_glib" = "xauto"; then
PKG_CHECK_MODULES(GLIB, $GLIB_DEPS, have_glib=true, :)
@@ -411,7 +413,8 @@ if test "x$with_coretext" = "xyes" -o "x$with_coretext" = "xauto"; then
else
# On iOS CoreText and CoreGraphics are stand-alone frameworks
if test "x$have_coretext" != "xtrue"; then
- AC_CHECK_TYPE(CTFontRef, have_coretext=true,, [#include <CoreText/CoreText.h>])
+ # Check for a different symbol to avoid getting cached result.
+ AC_CHECK_TYPE(CTRunRef, have_coretext=true,, [#include <CoreText/CoreText.h>])
fi
if $have_coretext; then
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources
index ac806838ca6..5c695c5c2dc 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources
@@ -75,6 +75,7 @@ HB_OT_sources = \
hb-ot-layout-gsubgpos-private.hh \
hb-ot-layout-gsub-table.hh \
hb-ot-layout-jstf-table.hh \
+ hb-ot-layout-math-table.hh \
hb-ot-layout-private.hh \
hb-ot-map.cc \
hb-ot-map-private.hh \
@@ -111,6 +112,7 @@ HB_OT_headers = \
hb-ot.h \
hb-ot-font.h \
hb-ot-layout.h \
+ hb-ot-math.h \
hb-ot-shape.h \
hb-ot-tag.h \
$(NULL)
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/check-symbols.sh b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-symbols.sh
index b2bf43fcea5..ba09ba1cc5e 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/check-symbols.sh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-symbols.sh
@@ -19,8 +19,8 @@ tested=false
for suffix in so dylib; do
so=.libs/libharfbuzz.$suffix
if ! test -f "$so"; then continue; fi
-
- EXPORTED_SYMBOLS="`nm "$so" | grep ' [BCDGINRSTVW] ' | grep -v ' _fini\>\| _init\>\| _fdata\>\| _ftext\>\| _fbss\>\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>\| __gcov_flush\>\| llvm_' | cut -d' ' -f3`"
+
+ EXPORTED_SYMBOLS="`nm "$so" | grep ' [BCDGINRSTVW] ' | grep -v ' _fini\>\| _init\>\| _fdata\>\| _ftext\>\| _fbss\>\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>\| __gcov_flush\>\| ___gcov_flush\>\| llvm_\| _llvm_' | cut -d' ' -f3`"
prefix=`basename "$so" | sed 's/libharfbuzz/hb/; s/-/_/g; s/[.].*//'`
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh
index 0b755779490..6d5012ec1f4 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh
@@ -116,8 +116,12 @@ struct hb_font_t {
/* Convert from font-space to user-space */
- inline hb_position_t em_scale_x (int16_t v) { return em_scale (v, this->x_scale); }
- inline hb_position_t em_scale_y (int16_t v) { return em_scale (v, this->y_scale); }
+ inline int dir_scale (hb_direction_t direction)
+ { return HB_DIRECTION_IS_VERTICAL(direction) ? y_scale : x_scale; }
+ inline hb_position_t em_scale_x (int16_t v) { return em_scale (v, x_scale); }
+ inline hb_position_t em_scale_y (int16_t v) { return em_scale (v, y_scale); }
+ inline hb_position_t em_scale_dir (int16_t v, hb_direction_t direction)
+ { return em_scale (v, dir_scale (direction)); }
/* Convert from parent-font user-space to our user-space */
inline hb_position_t parent_scale_x_distance (hb_position_t v) {
@@ -504,7 +508,6 @@ struct hb_font_t {
return false;
}
- private:
inline hb_position_t em_scale (int16_t v, int scale)
{
int upem = face->get_upem ();
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.cc
index 6bd63368b65..fef00245b79 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.cc
@@ -78,3 +78,6 @@ HB_DEFINE_VALUE_TYPE (glyph_info)
HB_DEFINE_VALUE_TYPE (glyph_position)
HB_DEFINE_VALUE_TYPE (segment_properties)
HB_DEFINE_VALUE_TYPE (user_data_key)
+
+HB_DEFINE_VALUE_TYPE (ot_math_glyph_variant)
+HB_DEFINE_VALUE_TYPE (ot_math_glyph_part)
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-math-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-math-table.hh
new file mode 100644
index 00000000000..b52b1215d2d
--- /dev/null
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-math-table.hh
@@ -0,0 +1,722 @@
+/*
+ * Copyright © 2016 Igalia S.L.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Igalia Author(s): Frédéric Wang
+ */
+
+#ifndef HB_OT_LAYOUT_MATH_TABLE_HH
+#define HB_OT_LAYOUT_MATH_TABLE_HH
+
+#include "hb-open-type-private.hh"
+#include "hb-ot-layout-common-private.hh"
+#include "hb-ot-math.h"
+
+namespace OT {
+
+
+struct MathValueRecord
+{
+ inline hb_position_t get_x_value (hb_font_t *font, const void *base) const
+ { return font->em_scale_x (value) + (base+deviceTable).get_x_delta (font); }
+ inline hb_position_t get_y_value (hb_font_t *font, const void *base) const
+ { return font->em_scale_y (value) + (base+deviceTable).get_y_delta (font); }
+
+ inline bool sanitize (hb_sanitize_context_t *c, const void *base) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) && deviceTable.sanitize (c, base));
+ }
+
+ protected:
+ SHORT value; /* The X or Y value in design units */
+ OffsetTo<Device> deviceTable; /* Offset to the device table - from the
+ * beginning of parent table. May be NULL.
+ * Suggested format for device table is 1. */
+
+ public:
+ DEFINE_SIZE_STATIC (4);
+};
+
+struct MathConstants
+{
+ inline bool sanitize_math_value_records (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+
+ unsigned int count = ARRAY_LENGTH (mathValueRecords);
+ for (unsigned int i = 0; i < count; i++)
+ if (!mathValueRecords[i].sanitize (c, this))
+ return_trace (false);
+
+ return_trace (true);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) && sanitize_math_value_records(c));
+ }
+
+ inline hb_position_t get_value (hb_ot_math_constant_t constant,
+ hb_font_t *font) const
+ {
+ switch (constant) {
+
+ case HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN:
+ case HB_OT_MATH_CONSTANT_SCRIPT_SCRIPT_PERCENT_SCALE_DOWN:
+ return percentScaleDown[constant - HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN];
+
+ case HB_OT_MATH_CONSTANT_DELIMITED_SUB_FORMULA_MIN_HEIGHT:
+ case HB_OT_MATH_CONSTANT_DISPLAY_OPERATOR_MIN_HEIGHT:
+ return font->em_scale_y (minHeight[constant - HB_OT_MATH_CONSTANT_DELIMITED_SUB_FORMULA_MIN_HEIGHT]);
+
+ case HB_OT_MATH_CONSTANT_RADICAL_KERN_AFTER_DEGREE:
+ case HB_OT_MATH_CONSTANT_RADICAL_KERN_BEFORE_DEGREE:
+ case HB_OT_MATH_CONSTANT_SKEWED_FRACTION_HORIZONTAL_GAP:
+ case HB_OT_MATH_CONSTANT_SPACE_AFTER_SCRIPT:
+ return mathValueRecords[constant - HB_OT_MATH_CONSTANT_MATH_LEADING].get_x_value(font, this);
+
+ case HB_OT_MATH_CONSTANT_ACCENT_BASE_HEIGHT:
+ case HB_OT_MATH_CONSTANT_AXIS_HEIGHT:
+ case HB_OT_MATH_CONSTANT_FLATTENED_ACCENT_BASE_HEIGHT:
+ case HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_DISPLAY_STYLE_SHIFT_DOWN:
+ case HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_GAP_MIN:
+ case HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_SHIFT_DOWN:
+ case HB_OT_MATH_CONSTANT_FRACTION_DENOM_DISPLAY_STYLE_GAP_MIN:
+ case HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_DISPLAY_STYLE_SHIFT_UP:
+ case HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_GAP_MIN:
+ case HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_SHIFT_UP:
+ case HB_OT_MATH_CONSTANT_FRACTION_NUM_DISPLAY_STYLE_GAP_MIN:
+ case HB_OT_MATH_CONSTANT_FRACTION_RULE_THICKNESS:
+ case HB_OT_MATH_CONSTANT_LOWER_LIMIT_BASELINE_DROP_MIN:
+ case HB_OT_MATH_CONSTANT_LOWER_LIMIT_GAP_MIN:
+ case HB_OT_MATH_CONSTANT_MATH_LEADING:
+ case HB_OT_MATH_CONSTANT_OVERBAR_EXTRA_ASCENDER:
+ case HB_OT_MATH_CONSTANT_OVERBAR_RULE_THICKNESS:
+ case HB_OT_MATH_CONSTANT_OVERBAR_VERTICAL_GAP:
+ case HB_OT_MATH_CONSTANT_RADICAL_DISPLAY_STYLE_VERTICAL_GAP:
+ case HB_OT_MATH_CONSTANT_RADICAL_EXTRA_ASCENDER:
+ case HB_OT_MATH_CONSTANT_RADICAL_RULE_THICKNESS:
+ case HB_OT_MATH_CONSTANT_RADICAL_VERTICAL_GAP:
+ case HB_OT_MATH_CONSTANT_SKEWED_FRACTION_VERTICAL_GAP:
+ case HB_OT_MATH_CONSTANT_STACK_BOTTOM_DISPLAY_STYLE_SHIFT_DOWN:
+ case HB_OT_MATH_CONSTANT_STACK_BOTTOM_SHIFT_DOWN:
+ case HB_OT_MATH_CONSTANT_STACK_DISPLAY_STYLE_GAP_MIN:
+ case HB_OT_MATH_CONSTANT_STACK_GAP_MIN:
+ case HB_OT_MATH_CONSTANT_STACK_TOP_DISPLAY_STYLE_SHIFT_UP:
+ case HB_OT_MATH_CONSTANT_STACK_TOP_SHIFT_UP:
+ case HB_OT_MATH_CONSTANT_STRETCH_STACK_BOTTOM_SHIFT_DOWN:
+ case HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_ABOVE_MIN:
+ case HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_BELOW_MIN:
+ case HB_OT_MATH_CONSTANT_STRETCH_STACK_TOP_SHIFT_UP:
+ case HB_OT_MATH_CONSTANT_SUBSCRIPT_BASELINE_DROP_MIN:
+ case HB_OT_MATH_CONSTANT_SUBSCRIPT_SHIFT_DOWN:
+ case HB_OT_MATH_CONSTANT_SUBSCRIPT_TOP_MAX:
+ case HB_OT_MATH_CONSTANT_SUB_SUPERSCRIPT_GAP_MIN:
+ case HB_OT_MATH_CONSTANT_SUPERSCRIPT_BASELINE_DROP_MAX:
+ case HB_OT_MATH_CONSTANT_SUPERSCRIPT_BOTTOM_MAX_WITH_SUBSCRIPT:
+ case HB_OT_MATH_CONSTANT_SUPERSCRIPT_BOTTOM_MIN:
+ case HB_OT_MATH_CONSTANT_SUPERSCRIPT_SHIFT_UP:
+ case HB_OT_MATH_CONSTANT_SUPERSCRIPT_SHIFT_UP_CRAMPED:
+ case HB_OT_MATH_CONSTANT_UNDERBAR_EXTRA_DESCENDER:
+ case HB_OT_MATH_CONSTANT_UNDERBAR_RULE_THICKNESS:
+ case HB_OT_MATH_CONSTANT_UNDERBAR_VERTICAL_GAP:
+ case HB_OT_MATH_CONSTANT_UPPER_LIMIT_BASELINE_RISE_MIN:
+ case HB_OT_MATH_CONSTANT_UPPER_LIMIT_GAP_MIN:
+ return mathValueRecords[constant - HB_OT_MATH_CONSTANT_MATH_LEADING].get_y_value(font, this);
+
+ case HB_OT_MATH_CONSTANT_RADICAL_DEGREE_BOTTOM_RAISE_PERCENT:
+ return radicalDegreeBottomRaisePercent;
+
+ default:
+ return 0;
+ }
+ }
+
+ protected:
+ SHORT percentScaleDown[2];
+ USHORT minHeight[2];
+ MathValueRecord mathValueRecords[51];
+ SHORT radicalDegreeBottomRaisePercent;
+
+ public:
+ DEFINE_SIZE_STATIC (214);
+};
+
+struct MathItalicsCorrectionInfo
+{
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) &&
+ coverage.sanitize (c, this) &&
+ italicsCorrection.sanitize (c, this));
+ }
+
+ inline hb_position_t get_value (hb_codepoint_t glyph,
+ hb_font_t *font) const
+ {
+ unsigned int index = (this+coverage).get_coverage (glyph);
+ return italicsCorrection[index].get_x_value (font, this);
+ }
+
+ protected:
+ OffsetTo<Coverage> coverage; /* Offset to Coverage table -
+ * from the beginning of
+ * MathItalicsCorrectionInfo
+ * table. */
+ ArrayOf<MathValueRecord> italicsCorrection; /* Array of MathValueRecords
+ * defining italics correction
+ * values for each
+ * covered glyph. */
+
+ public:
+ DEFINE_SIZE_ARRAY (4, italicsCorrection);
+};
+
+struct MathTopAccentAttachment
+{
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) &&
+ topAccentCoverage.sanitize (c, this) &&
+ topAccentAttachment.sanitize (c, this));
+ }
+
+ inline hb_position_t get_value (hb_codepoint_t glyph,
+ hb_font_t *font) const
+ {
+ unsigned int index = (this+topAccentCoverage).get_coverage (glyph);
+ if (index == NOT_COVERED)
+ return font->get_glyph_h_advance (glyph) / 2;
+ return topAccentAttachment[index].get_x_value(font, this);
+ }
+
+ protected:
+ OffsetTo<Coverage> topAccentCoverage; /* Offset to Coverage table -
+ * from the beginning of
+ * MathTopAccentAttachment
+ * table. */
+ ArrayOf<MathValueRecord> topAccentAttachment; /* Array of MathValueRecords
+ * defining top accent
+ * attachment points for each
+ * covered glyph. */
+
+ public:
+ DEFINE_SIZE_ARRAY (2 + 2, topAccentAttachment);
+};
+
+struct MathKern
+{
+ inline bool sanitize_math_value_records (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ unsigned int count = 2 * heightCount + 1;
+ for (unsigned int i = 0; i < count; i++)
+ if (!mathValueRecords[i].sanitize (c, this)) return_trace (false);
+ return_trace (true);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) &&
+ c->check_array (mathValueRecords,
+ mathValueRecords[0].static_size,
+ 2 * heightCount + 1) &&
+ sanitize_math_value_records (c));
+ }
+
+ inline hb_position_t get_value (hb_position_t correction_height, hb_font_t *font) const
+ {
+ const MathValueRecord* correctionHeight = mathValueRecords;
+ const MathValueRecord* kernValue = mathValueRecords + heightCount;
+ int sign = font->y_scale < 0 ? -1 : +1;
+
+ /* The description of the MathKern table is a ambiguous, but interpreting
+ * "between the two heights found at those indexes" for 0 < i < len as
+ *
+ * correctionHeight[i-1] < correction_height <= correctionHeight[i]
+ *
+ * makes the result consistent with the limit cases and we can just use the
+ * binary search algorithm of std::upper_bound:
+ */
+ unsigned int i = 0;
+ unsigned int count = heightCount;
+ while (count > 0)
+ {
+ unsigned int half = count / 2;
+ hb_position_t height = correctionHeight[i + half].get_y_value(font, this);
+ if (sign * height < sign * correction_height)
+ {
+ i += half + 1;
+ count -= half + 1;
+ } else
+ count = half;
+ }
+ return kernValue[i].get_x_value(font, this);
+ }
+
+ protected:
+ USHORT heightCount;
+ MathValueRecord mathValueRecords[VAR]; /* Array of correction heights at
+ * which the kern value changes.
+ * Sorted by the height value in
+ * design units (heightCount entries),
+ * Followed by:
+ * Array of kern values corresponding
+ * to heights. (heightCount+1 entries).
+ */
+
+ public:
+ DEFINE_SIZE_ARRAY (2, mathValueRecords);
+};
+
+struct MathKernInfoRecord
+{
+ inline bool sanitize (hb_sanitize_context_t *c, const void *base) const
+ {
+ TRACE_SANITIZE (this);
+
+ unsigned int count = ARRAY_LENGTH (mathKern);
+ for (unsigned int i = 0; i < count; i++)
+ if (unlikely (!mathKern[i].sanitize (c, base)))
+ return_trace (false);
+
+ return_trace (true);
+ }
+
+ inline hb_position_t get_kerning (hb_ot_math_kern_t kern,
+ hb_position_t correction_height,
+ hb_font_t *font,
+ const void *base) const
+ {
+ unsigned int idx = kern;
+ if (unlikely (idx >= ARRAY_LENGTH (mathKern))) return 0;
+ return (base+mathKern[idx]).get_value (correction_height, font);
+ }
+
+ protected:
+ /* Offset to MathKern table for each corner -
+ * from the beginning of MathKernInfo table. May be NULL. */
+ OffsetTo<MathKern> mathKern[4];
+
+ public:
+ DEFINE_SIZE_STATIC (8);
+};
+
+struct MathKernInfo
+{
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) &&
+ mathKernCoverage.sanitize (c, this) &&
+ mathKernInfoRecords.sanitize (c, this));
+ }
+
+ inline hb_position_t get_kerning (hb_codepoint_t glyph,
+ hb_ot_math_kern_t kern,
+ hb_position_t correction_height,
+ hb_font_t *font) const
+ {
+ unsigned int index = (this+mathKernCoverage).get_coverage (glyph);
+ return mathKernInfoRecords[index].get_kerning (kern, correction_height, font, this);
+ }
+
+ protected:
+ OffsetTo<Coverage> mathKernCoverage; /* Offset to Coverage table -
+ * from the beginning of the
+ * MathKernInfo table. */
+ ArrayOf<MathKernInfoRecord> mathKernInfoRecords; /* Array of
+ * MathKernInfoRecords,
+ * per-glyph information for
+ * mathematical positioning
+ * of subscripts and
+ * superscripts. */
+
+ public:
+ DEFINE_SIZE_ARRAY (4, mathKernInfoRecords);
+};
+
+struct MathGlyphInfo
+{
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) &&
+ mathItalicsCorrectionInfo.sanitize (c, this) &&
+ mathTopAccentAttachment.sanitize (c, this) &&
+ extendedShapeCoverage.sanitize (c, this) &&
+ mathKernInfo.sanitize(c, this));
+ }
+
+ inline hb_position_t
+ get_italics_correction (hb_codepoint_t glyph, hb_font_t *font) const
+ { return (this+mathItalicsCorrectionInfo).get_value (glyph, font); }
+
+ inline hb_position_t
+ get_top_accent_attachment (hb_codepoint_t glyph, hb_font_t *font) const
+ { return (this+mathTopAccentAttachment).get_value (glyph, font); }
+
+ inline bool is_extended_shape (hb_codepoint_t glyph) const
+ { return (this+extendedShapeCoverage).get_coverage (glyph) != NOT_COVERED; }
+
+ inline hb_position_t get_kerning (hb_codepoint_t glyph,
+ hb_ot_math_kern_t kern,
+ hb_position_t correction_height,
+ hb_font_t *font) const
+ { return (this+mathKernInfo).get_kerning (glyph, kern, correction_height, font); }
+
+ protected:
+ /* Offset to MathItalicsCorrectionInfo table -
+ * from the beginning of MathGlyphInfo table. */
+ OffsetTo<MathItalicsCorrectionInfo> mathItalicsCorrectionInfo;
+
+ /* Offset to MathTopAccentAttachment table -
+ * from the beginning of MathGlyphInfo table. */
+ OffsetTo<MathTopAccentAttachment> mathTopAccentAttachment;
+
+ /* Offset to coverage table for Extended Shape glyphs -
+ * from the beginning of MathGlyphInfo table. When the left or right glyph of
+ * a box is an extended shape variant, the (ink) box (and not the default
+ * position defined by values in MathConstants table) should be used for
+ * vertical positioning purposes. May be NULL.. */
+ OffsetTo<Coverage> extendedShapeCoverage;
+
+ /* Offset to MathKernInfo table -
+ * from the beginning of MathGlyphInfo table. */
+ OffsetTo<MathKernInfo> mathKernInfo;
+
+ public:
+ DEFINE_SIZE_STATIC (8);
+};
+
+struct MathGlyphVariantRecord
+{
+ friend struct MathGlyphConstruction;
+
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this));
+ }
+
+ protected:
+ GlyphID variantGlyph; /* Glyph ID for the variant. */
+ USHORT advanceMeasurement; /* Advance width/height, in design units, of the
+ * variant, in the direction of requested
+ * glyph extension. */
+
+ public:
+ DEFINE_SIZE_STATIC (4);
+};
+
+struct PartFlags : USHORT
+{
+ enum Flags {
+ Extender = 0x0001u, /* If set, the part can be skipped or repeated. */
+
+ Defined = 0x0001u, /* All defined flags. */
+ };
+
+ public:
+ DEFINE_SIZE_STATIC (2);
+};
+
+struct MathGlyphPartRecord
+{
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this));
+ }
+
+ inline void extract (hb_ot_math_glyph_part_t &out,
+ int scale,
+ hb_font_t *font) const
+ {
+ out.glyph = glyph;
+
+ out.start_connector_length = font->em_scale (startConnectorLength, scale);
+ out.end_connector_length = font->em_scale (endConnectorLength, scale);
+ out.full_advance = font->em_scale (fullAdvance, scale);
+
+ ASSERT_STATIC ((unsigned int) HB_MATH_GLYPH_PART_FLAG_EXTENDER ==
+ (unsigned int) PartFlags::Extender);
+
+ out.flags = (hb_ot_math_glyph_part_flags_t)
+ (unsigned int)
+ (partFlags & PartFlags::Defined);
+ }
+
+ protected:
+ GlyphID glyph; /* Glyph ID for the part. */
+ USHORT startConnectorLength; /* Advance width/ height of the straight bar
+ * connector material, in design units, is at
+ * the beginning of the glyph, in the
+ * direction of the extension. */
+ USHORT endConnectorLength; /* Advance width/ height of the straight bar
+ * connector material, in design units, is at
+ * the end of the glyph, in the direction of
+ * the extension. */
+ USHORT fullAdvance; /* Full advance width/height for this part,
+ * in the direction of the extension.
+ * In design units. */
+ PartFlags partFlags; /* Part qualifiers. */
+
+ public:
+ DEFINE_SIZE_STATIC (10);
+};
+
+struct MathGlyphAssembly
+{
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) &&
+ italicsCorrection.sanitize(c, this) &&
+ partRecords.sanitize(c));
+ }
+
+ inline unsigned int get_parts (hb_direction_t direction,
+ hb_font_t *font,
+ unsigned int start_offset,
+ unsigned int *parts_count, /* IN/OUT */
+ hb_ot_math_glyph_part_t *parts /* OUT */,
+ hb_position_t *italics_correction /* OUT */) const
+ {
+ if (parts_count)
+ {
+ int scale = font->dir_scale (direction);
+ const MathGlyphPartRecord *arr =
+ partRecords.sub_array (start_offset, parts_count);
+ unsigned int count = *parts_count;
+ for (unsigned int i = 0; i < count; i++)
+ arr[i].extract (parts[i], scale, font);
+ }
+
+ if (italics_correction)
+ *italics_correction = italicsCorrection.get_x_value (font, this);
+
+ return partRecords.len;
+ }
+
+ protected:
+ MathValueRecord italicsCorrection; /* Italics correction of this
+ * MathGlyphAssembly. Should not
+ * depend on the assembly size. */
+ ArrayOf<MathGlyphPartRecord> partRecords; /* Array of part records, from
+ * left to right and bottom to
+ * top. */
+
+ public:
+ DEFINE_SIZE_ARRAY (6, partRecords);
+};
+
+struct MathGlyphConstruction
+{
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) &&
+ glyphAssembly.sanitize(c, this) &&
+ mathGlyphVariantRecord.sanitize(c));
+ }
+
+ inline const MathGlyphAssembly &get_assembly (void) const
+ { return this+glyphAssembly; }
+
+ inline unsigned int get_variants (hb_direction_t direction,
+ hb_font_t *font,
+ unsigned int start_offset,
+ unsigned int *variants_count, /* IN/OUT */
+ hb_ot_math_glyph_variant_t *variants /* OUT */) const
+ {
+ if (variants_count)
+ {
+ int scale = font->dir_scale (direction);
+ const MathGlyphVariantRecord *arr =
+ mathGlyphVariantRecord.sub_array (start_offset, variants_count);
+ unsigned int count = *variants_count;
+ for (unsigned int i = 0; i < count; i++)
+ {
+ variants[i].glyph = arr[i].variantGlyph;
+ variants[i].advance = font->em_scale (arr[i].advanceMeasurement, scale);
+ }
+ }
+ return mathGlyphVariantRecord.len;
+ }
+
+ protected:
+ /* Offset to MathGlyphAssembly table for this shape - from the beginning of
+ MathGlyphConstruction table. May be NULL. */
+ OffsetTo<MathGlyphAssembly> glyphAssembly;
+
+ /* MathGlyphVariantRecords for alternative variants of the glyphs. */
+ ArrayOf<MathGlyphVariantRecord> mathGlyphVariantRecord;
+
+ public:
+ DEFINE_SIZE_ARRAY (4, mathGlyphVariantRecord);
+};
+
+struct MathVariants
+{
+ inline bool sanitize_offsets (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ unsigned int count = vertGlyphCount + horizGlyphCount;
+ for (unsigned int i = 0; i < count; i++)
+ if (!glyphConstruction[i].sanitize (c, this)) return_trace (false);
+ return_trace (true);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) &&
+ vertGlyphCoverage.sanitize (c, this) &&
+ horizGlyphCoverage.sanitize (c, this) &&
+ c->check_array (glyphConstruction,
+ glyphConstruction[0].static_size,
+ vertGlyphCount + horizGlyphCount) &&
+ sanitize_offsets (c));
+ }
+
+ inline hb_position_t get_min_connector_overlap (hb_direction_t direction,
+ hb_font_t *font) const
+ { return font->em_scale_dir (minConnectorOverlap, direction); }
+
+ inline unsigned int get_glyph_variants (hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_font_t *font,
+ unsigned int start_offset,
+ unsigned int *variants_count, /* IN/OUT */
+ hb_ot_math_glyph_variant_t *variants /* OUT */) const
+ { return get_glyph_construction (glyph, direction, font)
+ .get_variants (direction, font, start_offset, variants_count, variants); }
+
+ inline unsigned int get_glyph_parts (hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_font_t *font,
+ unsigned int start_offset,
+ unsigned int *parts_count, /* IN/OUT */
+ hb_ot_math_glyph_part_t *parts /* OUT */,
+ hb_position_t *italics_correction /* OUT */) const
+ { return get_glyph_construction (glyph, direction, font)
+ .get_assembly ()
+ .get_parts (direction, font,
+ start_offset, parts_count, parts,
+ italics_correction); }
+
+ private:
+ inline const MathGlyphConstruction &
+ get_glyph_construction (hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_font_t *font) const
+ {
+ bool vertical = HB_DIRECTION_IS_VERTICAL (direction);
+ unsigned int count = vertical ? vertGlyphCount : horizGlyphCount;
+ const OffsetTo<Coverage> &coverage = vertical ? vertGlyphCoverage
+ : horizGlyphCoverage;
+
+ unsigned int index = (this+coverage).get_coverage (glyph);
+ if (unlikely (index >= count)) return Null(MathGlyphConstruction);
+
+ if (!vertical)
+ index += vertGlyphCount;
+
+ return this+glyphConstruction[index];
+ }
+
+ protected:
+ USHORT minConnectorOverlap; /* Minimum overlap of connecting
+ * glyphs during glyph construction,
+ * in design units. */
+ OffsetTo<Coverage> vertGlyphCoverage; /* Offset to Coverage table -
+ * from the beginning of MathVariants
+ * table. */
+ OffsetTo<Coverage> horizGlyphCoverage; /* Offset to Coverage table -
+ * from the beginning of MathVariants
+ * table. */
+ USHORT vertGlyphCount; /* Number of glyphs for which
+ * information is provided for
+ * vertically growing variants. */
+ USHORT horizGlyphCount; /* Number of glyphs for which
+ * information is provided for
+ * horizontally growing variants. */
+
+ /* Array of offsets to MathGlyphConstruction tables - from the beginning of
+ the MathVariants table, for shapes growing in vertical/horizontal
+ direction. */
+ OffsetTo<MathGlyphConstruction> glyphConstruction[VAR];
+
+ public:
+ DEFINE_SIZE_ARRAY (10, glyphConstruction);
+};
+
+
+/*
+ * MATH -- The MATH Table
+ */
+
+struct MATH
+{
+ static const hb_tag_t tableTag = HB_OT_TAG_MATH;
+
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (version.sanitize (c) &&
+ likely (version.major == 1) &&
+ mathConstants.sanitize (c, this) &&
+ mathGlyphInfo.sanitize (c, this) &&
+ mathVariants.sanitize (c, this));
+ }
+
+ inline hb_position_t get_constant (hb_ot_math_constant_t constant,
+ hb_font_t *font) const
+ { return (this+mathConstants).get_value (constant, font); }
+
+ inline const MathGlyphInfo &get_math_glyph_info (void) const
+ { return this+mathGlyphInfo; }
+
+ inline const MathVariants &get_math_variants (void) const
+ { return this+mathVariants; }
+
+ protected:
+ FixedVersion<>version; /* Version of the MATH table
+ * initially set to 0x00010000u */
+ OffsetTo<MathConstants> mathConstants;/* MathConstants table */
+ OffsetTo<MathGlyphInfo> mathGlyphInfo;/* MathGlyphInfo table */
+ OffsetTo<MathVariants> mathVariants; /* MathVariants table */
+
+ public:
+ DEFINE_SIZE_STATIC (10);
+};
+
+} /* mathspace OT */
+
+
+#endif /* HB_OT_LAYOUT_MATH_TABLE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh
index 778b2c442b0..a4272de631c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh
@@ -124,6 +124,7 @@ namespace OT {
struct GDEF;
struct GSUB;
struct GPOS;
+ struct MATH;
}
struct hb_ot_layout_lookup_accelerator_t
@@ -152,10 +153,12 @@ struct hb_ot_layout_t
hb_blob_t *gdef_blob;
hb_blob_t *gsub_blob;
hb_blob_t *gpos_blob;
+ hb_blob_t *math_blob;
const struct OT::GDEF *gdef;
const struct OT::GSUB *gsub;
const struct OT::GPOS *gpos;
+ const struct OT::MATH *math;
unsigned int gsub_lookup_count;
unsigned int gpos_lookup_count;
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 5cb1491c341..0501181a332 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
@@ -35,6 +35,7 @@
#include "hb-ot-layout-gsub-table.hh"
#include "hb-ot-layout-gpos-table.hh"
#include "hb-ot-layout-jstf-table.hh"
+#include "hb-ot-layout-math-table.hh"
#include "hb-ot-map-private.hh"
@@ -60,6 +61,10 @@ _hb_ot_layout_create (hb_face_t *face)
layout->gpos_blob = OT::Sanitizer<OT::GPOS>::sanitize (face->reference_table (HB_OT_TAG_GPOS));
layout->gpos = OT::Sanitizer<OT::GPOS>::lock_instance (layout->gpos_blob);
+ /* The MATH table is rarely used, so only try and load it in _get_math. */
+ layout->math_blob = NULL;
+ layout->math = NULL;
+
{
/*
* The ugly business of blacklisting individual fonts' tables happen here!
@@ -177,6 +182,7 @@ _hb_ot_layout_destroy (hb_ot_layout_t *layout)
hb_blob_destroy (layout->gdef_blob);
hb_blob_destroy (layout->gsub_blob);
hb_blob_destroy (layout->gpos_blob);
+ hb_blob_destroy (layout->math_blob);
free (layout);
}
@@ -199,6 +205,30 @@ _get_gpos (hb_face_t *face)
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return OT::Null(OT::GPOS);
return *hb_ot_layout_from_face (face)->gpos;
}
+static inline const OT::MATH&
+_get_math (hb_face_t *face)
+{
+ if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return OT::Null(OT::MATH);
+
+ hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
+
+retry:
+ const OT::MATH *math = (const OT::MATH *) hb_atomic_ptr_get (&layout->math);
+
+ if (unlikely (!math))
+ {
+ hb_blob_t *blob = OT::Sanitizer<OT::MATH>::sanitize (face->reference_table (HB_OT_TAG_MATH));
+ math = OT::Sanitizer<OT::MATH>::lock_instance (blob);
+ if (!hb_atomic_ptr_cmpexch (&layout->math, NULL, math))
+ {
+ hb_blob_destroy (blob);
+ goto retry;
+ }
+ layout->math_blob = blob;
+ }
+
+ return *math;
+}
/*
@@ -1190,3 +1220,221 @@ hb_ot_layout_substitute_lookup (OT::hb_apply_context_t *c,
{
apply_string<GSUBProxy> (c, lookup, accel);
}
+
+
+/*
+ * MATH
+ */
+/* TODO Move this to hb-ot-math.cc and separate it from hb_ot_layout_t. */
+
+/**
+ * hb_ot_math_has_data:
+ * @face: #hb_face_t to test
+ *
+ * This function allows to verify the presence of an OpenType MATH table on the
+ * face. If so, such a table will be loaded into memory and sanitized. You can
+ * then safely call other functions for math layout and shaping.
+ *
+ * Return value: #TRUE if face has a MATH table and #FALSE otherwise
+ *
+ * Since: 1.3.3
+ **/
+hb_bool_t
+hb_ot_math_has_data (hb_face_t *face)
+{
+ return &_get_math (face) != &OT::Null(OT::MATH);
+}
+
+/**
+ * hb_ot_math_get_constant:
+ * @font: #hb_font_t from which to retrieve the value
+ * @constant: #hb_ot_math_constant_t the constant to retrieve
+ *
+ * This function returns the requested math constants as a #hb_position_t.
+ * If the request constant is HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN,
+ * HB_OT_MATH_CONSTANT_SCRIPT_SCRIPT_PERCENT_SCALE_DOWN or
+ * HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN then the return value is
+ * actually an integer between 0 and 100 representing that percentage.
+ *
+ * Return value: the requested constant or 0
+ *
+ * Since: 1.3.3
+ **/
+hb_position_t
+hb_ot_math_get_constant (hb_font_t *font,
+ hb_ot_math_constant_t constant)
+{
+ const OT::MATH &math = _get_math (font->face);
+ return math.get_constant(constant, font);
+}
+
+/**
+ * hb_ot_math_get_glyph_italics_correction:
+ * @font: #hb_font_t from which to retrieve the value
+ * @glyph: glyph index from which to retrieve the value
+ *
+ * Return value: the italics correction of the glyph or 0
+ *
+ * Since: 1.3.3
+ **/
+hb_position_t
+hb_ot_math_get_glyph_italics_correction (hb_font_t *font,
+ hb_codepoint_t glyph)
+{
+ const OT::MATH &math = _get_math (font->face);
+ return math.get_math_glyph_info().get_italics_correction (glyph, font);
+}
+
+/**
+ * hb_ot_math_get_glyph_top_accent_attachment:
+ * @font: #hb_font_t from which to retrieve the value
+ * @glyph: glyph index from which to retrieve the value
+ *
+ * Return value: the top accent attachment of the glyph or 0
+ *
+ * Since: 1.3.3
+ **/
+hb_position_t
+hb_ot_math_get_glyph_top_accent_attachment (hb_font_t *font,
+ hb_codepoint_t glyph)
+{
+ const OT::MATH &math = _get_math (font->face);
+ return math.get_math_glyph_info().get_top_accent_attachment (glyph, font);
+}
+
+/**
+ * hb_ot_math_is_glyph_extended_shape:
+ * @font: a #hb_font_t to test
+ * @glyph: a glyph index to test
+ *
+ * Return value: #TRUE if the glyph is an extended shape and #FALSE otherwise
+ *
+ * Since: 1.3.3
+ **/
+hb_bool_t
+hb_ot_math_is_glyph_extended_shape (hb_face_t *face,
+ hb_codepoint_t glyph)
+{
+ const OT::MATH &math = _get_math (face);
+ return math.get_math_glyph_info().is_extended_shape (glyph);
+}
+
+/**
+ * hb_ot_math_get_glyph_kerning:
+ * @font: #hb_font_t from which to retrieve the value
+ * @glyph: glyph index from which to retrieve the value
+ * @kern: the #hb_ot_math_kern_t from which to retrieve the value
+ * @correction_height: the correction height to use to determine the kerning.
+ *
+ * This function tries to retrieve the MathKern table for the specified font,
+ * glyph and #hb_ot_math_kern_t. Then it browses the list of heights from the
+ * MathKern table to find one value that is greater or equal to specified
+ * correction_height. If one is found the corresponding value from the list of
+ * kerns is returned and otherwise the last kern value is returned.
+ *
+ * Return value: requested kerning or 0
+ *
+ * Since: 1.3.3
+ **/
+hb_position_t
+hb_ot_math_get_glyph_kerning (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_ot_math_kern_t kern,
+ hb_position_t correction_height)
+{
+ const OT::MATH &math = _get_math (font->face);
+ return math.get_math_glyph_info().get_kerning (glyph, kern, correction_height, font);
+}
+
+/**
+ * hb_ot_math_get_glyph_variants:
+ * @font: #hb_font_t from which to retrieve the values
+ * @glyph: index of the glyph to stretch
+ * @direction: direction of the stretching
+ * @start_offset: offset of the first variant to retrieve
+ * @variants_count: maximum number of variants to retrieve after start_offset
+ * (IN) and actual number of variants retrieved (OUT)
+ * @variants: array of size at least @variants_count to store the result
+ *
+ * This function tries to retrieve the MathGlyphConstruction for the specified
+ * font, glyph and direction. Note that only the value of
+ * #HB_DIRECTION_IS_HORIZONTAL is considered. It provides the corresponding list
+ * of size variants as an array of hb_ot_math_glyph_variant_t structs.
+ *
+ * Return value: the total number of size variants available or 0
+ *
+ * Since: 1.3.3
+ **/
+unsigned int
+hb_ot_math_get_glyph_variants (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_direction_t direction,
+ unsigned int start_offset,
+ unsigned int *variants_count, /* IN/OUT */
+ hb_ot_math_glyph_variant_t *variants /* OUT */)
+{
+ const OT::MATH &math = _get_math (font->face);
+ return math.get_math_variants().get_glyph_variants (glyph, direction, font,
+ start_offset,
+ variants_count,
+ variants);
+}
+
+/**
+ * hb_ot_math_get_min_connector_overlap:
+ * @font: #hb_font_t from which to retrieve the value
+ * @direction: direction of the stretching
+ *
+ * This function tries to retrieve the MathVariants table for the specified
+ * font and returns the minimum overlap of connecting glyphs to draw a glyph
+ * assembly in the specified direction. Note that only the value of
+ * #HB_DIRECTION_IS_HORIZONTAL is considered.
+ *
+ * Return value: requested min connector overlap or 0
+ *
+ * Since: 1.3.3
+ **/
+hb_position_t
+hb_ot_math_get_min_connector_overlap (hb_font_t *font,
+ hb_direction_t direction)
+{
+ const OT::MATH &math = _get_math (font->face);
+ return math.get_math_variants().get_min_connector_overlap (direction, font);
+}
+
+/**
+ * hb_ot_math_get_glyph_assembly:
+ * @font: #hb_font_t from which to retrieve the values
+ * @glyph: index of the glyph to stretch
+ * @direction: direction of the stretching
+ * @start_offset: offset of the first glyph part to retrieve
+ * @parts_count: maximum number of glyph parts to retrieve after start_offset
+ * (IN) and actual number of parts retrieved (OUT)
+ * @parts: array of size at least @parts_count to store the result
+ * @italics_correction: italic correction of the glyph assembly
+ *
+ * This function tries to retrieve the GlyphAssembly for the specified font,
+ * glyph and direction. Note that only the value of #HB_DIRECTION_IS_HORIZONTAL
+ * is considered. It provides the information necessary to draw the glyph
+ * assembly as an array of #hb_ot_math_glyph_part_t.
+ *
+ * Return value: the total number of parts in the glyph assembly
+ *
+ * Since: 1.3.3
+ **/
+unsigned int
+hb_ot_math_get_glyph_assembly (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_direction_t direction,
+ unsigned int start_offset,
+ unsigned int *parts_count, /* IN/OUT */
+ hb_ot_math_glyph_part_t *parts, /* OUT */
+ hb_position_t *italics_correction /* OUT */)
+{
+ const OT::MATH &math = _get_math (font->face);
+ return math.get_math_variants().get_glyph_parts (glyph, direction, font,
+ start_offset,
+ parts_count,
+ parts,
+ italics_correction);
+}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math.h
new file mode 100644
index 00000000000..521a5ca0376
--- /dev/null
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math.h
@@ -0,0 +1,209 @@
+/*
+ * Copyright © 2016 Igalia S.L.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Igalia Author(s): Frédéric Wang
+ */
+
+#ifndef HB_OT_H_IN
+#error "Include <hb-ot.h> instead."
+#endif
+
+#ifndef HB_OT_MATH_H
+#define HB_OT_MATH_H
+
+#include "hb.h"
+
+HB_BEGIN_DECLS
+
+
+/*
+ * MATH
+ */
+
+#define HB_OT_TAG_MATH HB_TAG('M','A','T','H')
+
+/* Use with hb_buffer_set_script() for math shaping. */
+#define HB_OT_MATH_SCRIPT HB_TAG('m','a','t','h')
+
+/* Types */
+
+/**
+ * hb_ot_math_constant_t:
+ *
+ * Since: 1.3.3
+ */
+typedef enum {
+ HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN = 0,
+ HB_OT_MATH_CONSTANT_SCRIPT_SCRIPT_PERCENT_SCALE_DOWN = 1,
+ HB_OT_MATH_CONSTANT_DELIMITED_SUB_FORMULA_MIN_HEIGHT = 2,
+ HB_OT_MATH_CONSTANT_DISPLAY_OPERATOR_MIN_HEIGHT = 3,
+ HB_OT_MATH_CONSTANT_MATH_LEADING = 4,
+ HB_OT_MATH_CONSTANT_AXIS_HEIGHT = 5,
+ HB_OT_MATH_CONSTANT_ACCENT_BASE_HEIGHT = 6,
+ HB_OT_MATH_CONSTANT_FLATTENED_ACCENT_BASE_HEIGHT = 7,
+ HB_OT_MATH_CONSTANT_SUBSCRIPT_SHIFT_DOWN = 8,
+ HB_OT_MATH_CONSTANT_SUBSCRIPT_TOP_MAX = 9,
+ HB_OT_MATH_CONSTANT_SUBSCRIPT_BASELINE_DROP_MIN = 10,
+ HB_OT_MATH_CONSTANT_SUPERSCRIPT_SHIFT_UP = 11,
+ HB_OT_MATH_CONSTANT_SUPERSCRIPT_SHIFT_UP_CRAMPED = 12,
+ HB_OT_MATH_CONSTANT_SUPERSCRIPT_BOTTOM_MIN = 13,
+ HB_OT_MATH_CONSTANT_SUPERSCRIPT_BASELINE_DROP_MAX = 14,
+ HB_OT_MATH_CONSTANT_SUB_SUPERSCRIPT_GAP_MIN = 15,
+ HB_OT_MATH_CONSTANT_SUPERSCRIPT_BOTTOM_MAX_WITH_SUBSCRIPT = 16,
+ HB_OT_MATH_CONSTANT_SPACE_AFTER_SCRIPT = 17,
+ HB_OT_MATH_CONSTANT_UPPER_LIMIT_GAP_MIN = 18,
+ HB_OT_MATH_CONSTANT_UPPER_LIMIT_BASELINE_RISE_MIN = 19,
+ HB_OT_MATH_CONSTANT_LOWER_LIMIT_GAP_MIN = 20,
+ HB_OT_MATH_CONSTANT_LOWER_LIMIT_BASELINE_DROP_MIN = 21,
+ HB_OT_MATH_CONSTANT_STACK_TOP_SHIFT_UP = 22,
+ HB_OT_MATH_CONSTANT_STACK_TOP_DISPLAY_STYLE_SHIFT_UP = 23,
+ HB_OT_MATH_CONSTANT_STACK_BOTTOM_SHIFT_DOWN = 24,
+ HB_OT_MATH_CONSTANT_STACK_BOTTOM_DISPLAY_STYLE_SHIFT_DOWN = 25,
+ HB_OT_MATH_CONSTANT_STACK_GAP_MIN = 26,
+ HB_OT_MATH_CONSTANT_STACK_DISPLAY_STYLE_GAP_MIN = 27,
+ HB_OT_MATH_CONSTANT_STRETCH_STACK_TOP_SHIFT_UP = 28,
+ HB_OT_MATH_CONSTANT_STRETCH_STACK_BOTTOM_SHIFT_DOWN = 29,
+ HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_ABOVE_MIN = 30,
+ HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_BELOW_MIN = 31,
+ HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_SHIFT_UP = 32,
+ HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_DISPLAY_STYLE_SHIFT_UP = 33,
+ HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_SHIFT_DOWN = 34,
+ HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_DISPLAY_STYLE_SHIFT_DOWN = 35,
+ HB_OT_MATH_CONSTANT_FRACTION_NUMERATOR_GAP_MIN = 36,
+ HB_OT_MATH_CONSTANT_FRACTION_NUM_DISPLAY_STYLE_GAP_MIN = 37,
+ HB_OT_MATH_CONSTANT_FRACTION_RULE_THICKNESS = 38,
+ HB_OT_MATH_CONSTANT_FRACTION_DENOMINATOR_GAP_MIN = 39,
+ HB_OT_MATH_CONSTANT_FRACTION_DENOM_DISPLAY_STYLE_GAP_MIN = 40,
+ HB_OT_MATH_CONSTANT_SKEWED_FRACTION_HORIZONTAL_GAP = 41,
+ HB_OT_MATH_CONSTANT_SKEWED_FRACTION_VERTICAL_GAP = 42,
+ HB_OT_MATH_CONSTANT_OVERBAR_VERTICAL_GAP = 43,
+ HB_OT_MATH_CONSTANT_OVERBAR_RULE_THICKNESS = 44,
+ HB_OT_MATH_CONSTANT_OVERBAR_EXTRA_ASCENDER = 45,
+ HB_OT_MATH_CONSTANT_UNDERBAR_VERTICAL_GAP = 46,
+ HB_OT_MATH_CONSTANT_UNDERBAR_RULE_THICKNESS = 47,
+ HB_OT_MATH_CONSTANT_UNDERBAR_EXTRA_DESCENDER = 48,
+ HB_OT_MATH_CONSTANT_RADICAL_VERTICAL_GAP = 49,
+ HB_OT_MATH_CONSTANT_RADICAL_DISPLAY_STYLE_VERTICAL_GAP = 50,
+ HB_OT_MATH_CONSTANT_RADICAL_RULE_THICKNESS = 51,
+ HB_OT_MATH_CONSTANT_RADICAL_EXTRA_ASCENDER = 52,
+ HB_OT_MATH_CONSTANT_RADICAL_KERN_BEFORE_DEGREE = 53,
+ HB_OT_MATH_CONSTANT_RADICAL_KERN_AFTER_DEGREE = 54,
+ HB_OT_MATH_CONSTANT_RADICAL_DEGREE_BOTTOM_RAISE_PERCENT = 55
+} hb_ot_math_constant_t;
+
+/**
+ * hb_ot_math_kern_t:
+ *
+ * Since: 1.3.3
+ */
+typedef enum {
+ HB_OT_MATH_KERN_TOP_RIGHT = 0,
+ HB_OT_MATH_KERN_TOP_LEFT = 1,
+ HB_OT_MATH_KERN_BOTTOM_RIGHT = 2,
+ HB_OT_MATH_KERN_BOTTOM_LEFT = 3
+} hb_ot_math_kern_t;
+
+/**
+ * hb_ot_math_glyph_variant_t:
+ *
+ * Since: 1.3.3
+ */
+typedef struct hb_ot_math_glyph_variant_t {
+ hb_codepoint_t glyph;
+ hb_position_t advance;
+} hb_ot_math_glyph_variant_t;
+
+/**
+ * hb_ot_math_glyph_part_flags_t:
+ *
+ * Since: 1.3.3
+ */
+typedef enum { /*< flags >*/
+ HB_MATH_GLYPH_PART_FLAG_EXTENDER = 0x00000001u /* Extender glyph */
+} hb_ot_math_glyph_part_flags_t;
+
+/**
+ * hb_ot_math_glyph_part_t:
+ *
+ * Since: 1.3.3
+ */
+typedef struct hb_ot_math_glyph_part_t {
+ hb_codepoint_t glyph;
+ hb_position_t start_connector_length;
+ hb_position_t end_connector_length;
+ hb_position_t full_advance;
+ hb_ot_math_glyph_part_flags_t flags;
+} hb_ot_math_glyph_part_t;
+
+/* Methods */
+
+HB_EXTERN hb_bool_t
+hb_ot_math_has_data (hb_face_t *face);
+
+HB_EXTERN hb_position_t
+hb_ot_math_get_constant (hb_font_t *font,
+ hb_ot_math_constant_t constant);
+
+HB_EXTERN hb_position_t
+hb_ot_math_get_glyph_italics_correction (hb_font_t *font,
+ hb_codepoint_t glyph);
+
+HB_EXTERN hb_position_t
+hb_ot_math_get_glyph_top_accent_attachment (hb_font_t *font,
+ hb_codepoint_t glyph);
+
+HB_EXTERN hb_bool_t
+hb_ot_math_is_glyph_extended_shape (hb_face_t *face,
+ hb_codepoint_t glyph);
+
+HB_EXTERN hb_position_t
+hb_ot_math_get_glyph_kerning (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_ot_math_kern_t kern,
+ hb_position_t correction_height);
+
+HB_EXTERN unsigned int
+hb_ot_math_get_glyph_variants (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_direction_t direction,
+ unsigned int start_offset,
+ unsigned int *variants_count, /* IN/OUT */
+ hb_ot_math_glyph_variant_t *variants /* OUT */);
+
+HB_EXTERN hb_position_t
+hb_ot_math_get_min_connector_overlap (hb_font_t *font,
+ hb_direction_t direction);
+
+HB_EXTERN unsigned int
+hb_ot_math_get_glyph_assembly (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_direction_t direction,
+ unsigned int start_offset,
+ unsigned int *parts_count, /* IN/OUT */
+ hb_ot_math_glyph_part_t *parts, /* OUT */
+ hb_position_t *italics_correction /* OUT */);
+
+
+HB_END_DECLS
+
+#endif /* HB_OT_MATH_H */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot.h
index 47c92a58e4b..113e37b08ab 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot.h
@@ -32,6 +32,7 @@
#include "hb-ot-font.h"
#include "hb-ot-layout.h"
+#include "hb-ot-math.h"
#include "hb-ot-tag.h"
#include "hb-ot-shape.h"
diff --git a/Build/source/libs/harfbuzz/version.ac b/Build/source/libs/harfbuzz/version.ac
index a8916c3aebd..fe8c0ecfe55 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.3.2])
+m4_define([harfbuzz_version], [1.3.3])