summaryrefslogtreecommitdiff
path: root/Build/source/libs
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-12-28 13:04:03 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-12-28 13:04:03 +0000
commit74c0c4d1d90ea4f85a3de0304bcd009cb29acf9d (patch)
treee372a73826b75e2c70c80b6a903e9a9e60f928d4 /Build/source/libs
parentcf483bef74e67ba3d39108df4864121c887f95e6 (diff)
harfbuzz-1.1.2
git-svn-id: svn://tug.org/texlive/trunk@39213 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs')
-rw-r--r--Build/source/libs/README2
-rw-r--r--Build/source/libs/harfbuzz/ChangeLog5
-rw-r--r--Build/source/libs/harfbuzz/Makefile.in4
-rwxr-xr-xBuild/source/libs/harfbuzz/configure30
-rw-r--r--Build/source/libs/harfbuzz/configure.ac6
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src-PATCHES/ChangeLog (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4-PATCHES/ChangeLog)5
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src-PATCHES/TL-Changes (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4-PATCHES/TL-Changes)3
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/AUTHORS (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/AUTHORS)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/Android.mk (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/Android.mk)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/BUILD.md25
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/ChangeLog)1916
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/Makefile.am (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/Makefile.am)1
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/NEWS (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/NEWS)81
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/README (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/README)1
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/README.python (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/README.python)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/THANKS (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/THANKS)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/TODO (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/TODO)0
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/autogen.sh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/autogen.sh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/config.h.in (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/config.h.in)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/configure.ac (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/configure.ac)3
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/gtk-doc.make (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/gtk-doc.make)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/harfbuzz.doap (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/harfbuzz.doap)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/Makefile.am)18
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/check-c-linkage-decls.sh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-c-linkage-decls.sh)0
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/check-defs.sh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-defs.sh)0
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/check-header-guards.sh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-header-guards.sh)0
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/check-includes.sh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-includes.sh)0
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/check-libstdc++.sh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-libstdc++.sh)0
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/check-static-inits.sh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-static-inits.sh)0
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/check-symbols.sh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-symbols.sh)0
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/gen-arabic-table.py (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/gen-arabic-table.py)0
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/gen-indic-table.py)0
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/gen-use-table.py)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz-gobject.pc.in (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/harfbuzz-gobject.pc.in)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz-icu.pc.in (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/harfbuzz-icu.pc.in)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz.pc.in (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/harfbuzz.pc.in)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-atomic-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-blob.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-blob.h)24
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer-deserialize-json.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.rl (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer-deserialize-json.rl)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer-deserialize-text.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.rl (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer-deserialize-text.rl)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer-private.hh)34
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer-serialize.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer.cc)14
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer.h)100
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-cache-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-cache-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-common.cc)2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-common.h)22
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-coretext.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-coretext.h)6
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-deprecated.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-deprecated.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-face-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-face.cc)2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-face.h)34
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-fallback-shape.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-fallback-shape.cc)2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-font-private.hh)150
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-font.cc)278
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-font.h)116
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ft.cc)257
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ft.h)25
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-glib.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-glib.cc)2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-glib.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-glib.h)8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-enums.cc.tmpl (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-gobject-enums.cc.tmpl)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-enums.h.tmpl (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-gobject-enums.h.tmpl)2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-gobject-structs.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-gobject-structs.h)26
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-gobject.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-graphite2.cc)11
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-graphite2.h)4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-icu.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-icu.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-icu.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-icu.h)6
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-mutex-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-mutex-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-object-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-object-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-file-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-open-file-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-open-type-private.hh)42
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-cmap-table.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-font.cc)152
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-font.h)2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-glyf-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-glyf-table.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-head-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-head-table.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hhea-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-hhea-table.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hmtx-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-hmtx-table.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-common-private.hh)15
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gdef-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-gdef-table.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-gpos-table.hh)31
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-gsub-table.hh)17
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-gsubgpos-private.hh)80
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-jstf-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-jstf-table.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-private.hh)134
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout.cc)18
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout.h)56
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-map-private.hh)16
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-map.cc)2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-maxp-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-maxp-table.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-name-table.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-fallback.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-arabic-fallback.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-arabic-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-arabic-table.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-win1256.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-arabic-win1256.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-arabic.cc)243
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-default.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-default.cc)1
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-hangul.cc)9
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hebrew.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-hebrew.cc)3
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-machine.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-indic-machine.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-machine.rl (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-indic-machine.rl)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-indic-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-table.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-indic-table.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-indic.cc)23
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar-machine.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-myanmar-machine.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar-machine.rl (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-myanmar-machine.rl)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-myanmar.cc)12
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-private.hh)9
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-thai.cc)7
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-tibetan.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-tibetan.cc)1
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-use-machine.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.rl (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-use-machine.rl)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-use-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-use-table.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-use.cc)21
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-fallback-private.hh)4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-fallback.cc)71
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-normalize-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-normalize.cc)109
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape.cc)111
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape.h)4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-tag.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-tag.h)8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-private.hh)79
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-set-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-set.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-set.h)52
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shape-plan-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shape-plan.cc)11
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shape-plan.h)18
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shape.cc)5
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shape.h)10
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper-impl-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shaper-impl-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper-list.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shaper-list.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shaper-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shaper.cc)2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ucdn.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-unicode-private.hh)48
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-unicode.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-unicode.h)52
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-uniscribe.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-uniscribe.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-uniscribe.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-uniscribe.h)4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-utf-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-utf-private.hh)46
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-version.h.in (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-version.h.in)6
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-warning.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-warning.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb.h (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb.h)4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/main.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/main.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/test-buffer-serialize.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/test-buffer-serialize.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/test-size-params.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/test-size-params.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/test-would-substitute.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/test-would-substitute.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/test.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/test.cc)0
-rw-r--r--Build/source/libs/harfbuzz/version.ac2
160 files changed, 3841 insertions, 924 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README
index 9cbf841895c..484618e09a0 100644
--- a/Build/source/libs/README
+++ b/Build/source/libs/README
@@ -24,7 +24,7 @@ gmp 6.1.0 - checked 28dec15
graphite2 1.3.3 - checked 27sep15
http://sourceforge.net/projects/silgraphite/files/graphite2/
-harfbuzz 1.0.4 - checked 1oct15
+harfbuzz 1.1.2 - checked 28dec15
http://www.freedesktop.org/software/harfbuzz/release/
icu 56.1 (release) - checked 8oct15
diff --git a/Build/source/libs/harfbuzz/ChangeLog b/Build/source/libs/harfbuzz/ChangeLog
index 9c29774aa4b..3f260cf530e 100644
--- a/Build/source/libs/harfbuzz/ChangeLog
+++ b/Build/source/libs/harfbuzz/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ Import harfbuzz-1.1.2.
+ * version.ac: Adjusted.
+
2015-10-01 Peter Breitenlohner <peb@mppmu.mpg.de>
Import harfbuzz-1.0.4.
diff --git a/Build/source/libs/harfbuzz/Makefile.in b/Build/source/libs/harfbuzz/Makefile.in
index 2e93cb79cbb..35811728ceb 100644
--- a/Build/source/libs/harfbuzz/Makefile.in
+++ b/Build/source/libs/harfbuzz/Makefile.in
@@ -461,7 +461,7 @@ am__DIST_COMMON = $(srcdir)/../../am/dist_hook.am \
$(top_srcdir)/../../build-aux/install-sh \
$(top_srcdir)/../../build-aux/missing \
$(top_srcdir)/../../build-aux/test-driver \
- $(top_srcdir)/harfbuzz-1.0.4/src/hb-version.h.in \
+ $(top_srcdir)/harfbuzz-src/src/hb-version.h.in \
../../build-aux/compile ../../build-aux/config.guess \
../../build-aux/config.sub ../../build-aux/depcomp \
../../build-aux/install-sh ../../build-aux/ltmain.sh \
@@ -789,7 +789,7 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
distclean-hdr:
-rm -f config.h stamp-h1
-hb-version.h: $(top_builddir)/config.status $(top_srcdir)/harfbuzz-1.0.4/src/hb-version.h.in
+hb-version.h: $(top_builddir)/config.status $(top_srcdir)/harfbuzz-src/src/hb-version.h.in
cd $(top_builddir) && $(SHELL) ./config.status $@
clean-noinstLIBRARIES:
diff --git a/Build/source/libs/harfbuzz/configure b/Build/source/libs/harfbuzz/configure
index 647972ab2eb..97d492c4a33 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.0.4.
+# Generated by GNU Autoconf 2.69 for harfbuzz (TeX Live) 1.1.2.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -580,12 +580,12 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='harfbuzz (TeX Live)'
PACKAGE_TARNAME='harfbuzz--tex-live-'
-PACKAGE_VERSION='1.0.4'
-PACKAGE_STRING='harfbuzz (TeX Live) 1.0.4'
+PACKAGE_VERSION='1.1.2'
+PACKAGE_STRING='harfbuzz (TeX Live) 1.1.2'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
-ac_unique_file="harfbuzz-1.0.4/src/harfbuzz.pc.in"
+ac_unique_file="harfbuzz-src/src/harfbuzz.pc.in"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
@@ -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.0.4 to adapt to many kinds of systems.
+\`configure' configures harfbuzz (TeX Live) 1.1.2 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.0.4:";;
+ short | recursive ) echo "Configuration of harfbuzz (TeX Live) 1.1.2:";;
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.0.4
+harfbuzz (TeX Live) configure 1.1.2
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.0.4, which was
+It was created by harfbuzz (TeX Live) $as_me 1.1.2, 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.0.4'
+ VERSION='1.1.2'
cat >>confdefs.h <<_ACEOF
@@ -4207,7 +4207,7 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags
HB_VERSION_MAJOR=1
HB_VERSION_MINOR=0
HB_VERSION_MICRO=4
-HB_VERSION=1.0.4
+HB_VERSION=1.1.2
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -6310,14 +6310,14 @@ $as_echo "#define HAVE_INTEL_ATOMIC_PRIMITIVES 1" >>confdefs.h
fi
-HARFBUZZ_TREE=harfbuzz-1.0.4
+HARFBUZZ_TREE=harfbuzz-src
if test -f $srcdir/$HARFBUZZ_TREE/src/hb-version.h; then
as_fn_error $? "Sorry, you must remove the file $HARFBUZZ_TREE/src/hb-version.h" "$LINENO" 5
fi
-ac_config_files="$ac_config_files Makefile include/Makefile hb-version.h:harfbuzz-1.0.4/src/hb-version.h.in"
+ac_config_files="$ac_config_files Makefile include/Makefile hb-version.h:harfbuzz-src/src/hb-version.h.in"
cat >confcache <<\_ACEOF
@@ -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.0.4, which was
+This file was extended by harfbuzz (TeX Live) $as_me 1.1.2, 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.0.4
+harfbuzz (TeX Live) config.status 1.1.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -7065,7 +7065,7 @@ do
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
- "hb-version.h") CONFIG_FILES="$CONFIG_FILES hb-version.h:harfbuzz-1.0.4/src/hb-version.h.in" ;;
+ "hb-version.h") CONFIG_FILES="$CONFIG_FILES hb-version.h:harfbuzz-src/src/hb-version.h.in" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
diff --git a/Build/source/libs/harfbuzz/configure.ac b/Build/source/libs/harfbuzz/configure.ac
index 5b087728ebd..75e3ae77176 100644
--- a/Build/source/libs/harfbuzz/configure.ac
+++ b/Build/source/libs/harfbuzz/configure.ac
@@ -9,7 +9,7 @@ dnl
m4_include([version.ac])[] dnl define harfbuzz_version
AC_INIT([harfbuzz (TeX Live)], harfbuzz_version, [tex-k@tug.org])
AC_PREREQ([2.65])
-AC_CONFIG_SRCDIR([harfbuzz-]harfbuzz_version[/src/harfbuzz.pc.in])
+AC_CONFIG_SRCDIR([harfbuzz-src/src/harfbuzz.pc.in])
AC_CONFIG_AUX_DIR([../../build-aux])
AC_CONFIG_MACRO_DIR([../../m4])
@@ -75,7 +75,7 @@ dnl add all these to config.h.in but do not define them in config.h
AC_DEFINE([HAVE_INTEL_ATOMIC_PRIMITIVES], 1, [Use Intel __sync_* atomic primitives])
fi
-AC_SUBST([HARFBUZZ_TREE], [harfbuzz-]harfbuzz_version)
+AC_SUBST([HARFBUZZ_TREE], [harfbuzz-src])
if test -f $srcdir/$HARFBUZZ_TREE/src/hb-version.h; then
AC_MSG_ERROR([Sorry, you must remove the file $HARFBUZZ_TREE/src/hb-version.h])
@@ -83,6 +83,6 @@ fi
AC_CONFIG_FILES([Makefile
include/Makefile
- hb-version.h:harfbuzz-]harfbuzz_version[/src/hb-version.h.in])
+ hb-version.h:harfbuzz-src/src/hb-version.h.in])
AC_OUTPUT
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4-PATCHES/ChangeLog b/Build/source/libs/harfbuzz/harfbuzz-src-PATCHES/ChangeLog
index 62fff4f77ce..6cc48e250a5 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4-PATCHES/ChangeLog
+++ b/Build/source/libs/harfbuzz/harfbuzz-src-PATCHES/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ Imported harfbuzz-1.1.2 source tree from:
+ http://www.freedesktop.org/software/harfbuzz/release/
+
2014-07-23 Peter Breitenlohner <peb@mppmu.mpg.de>
Imported harfbuzz-0.9.33 source tree from:
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4-PATCHES/TL-Changes b/Build/source/libs/harfbuzz/harfbuzz-src-PATCHES/TL-Changes
index 032e76e4bfe..8ad66250b35 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4-PATCHES/TL-Changes
+++ b/Build/source/libs/harfbuzz/harfbuzz-src-PATCHES/TL-Changes
@@ -1,4 +1,4 @@
-Changes applied to the harfbuzz-1.0.4/ tree as obtained from:
+Changes applied to the harfbuzz-1.1.2/ tree as obtained from:
http://www.freedesktop.org/software/harfbuzz/release/
Removed:
@@ -25,4 +25,3 @@ Removed unused dirs:
test
util
src/hb-ucdn
-
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/AUTHORS b/Build/source/libs/harfbuzz/harfbuzz-src/AUTHORS
index 81cdc4cf37f..81cdc4cf37f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/AUTHORS
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/AUTHORS
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/Android.mk b/Build/source/libs/harfbuzz/harfbuzz-src/Android.mk
index 2c266221d85..2c266221d85 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/Android.mk
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/Android.mk
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/BUILD.md b/Build/source/libs/harfbuzz/harfbuzz-src/BUILD.md
new file mode 100644
index 00000000000..7f4d4bca7b0
--- /dev/null
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/BUILD.md
@@ -0,0 +1,25 @@
+On Linux, install the development packages for
+[FreeType](http://www.freedesktop.org/wiki/Software/FreeType/),
+Cairo, and GLib. For example, on Ubuntu / Debian, you would do:
+* sudo apt-get install gcc g++ libfreetype6-dev libglib2.0-dev libcairo2-dev
+
+whereas on Fedora, RHEL, CentOS, and other Red Hat based systems you would do:
+* sudo yum install gcc gcc-c++ freetype-devel glib2-devel cairo-devel
+
+or using MacPorts:
+* sudo port install freetype glib2 cairo
+
+If you are using a tarball, you can now proceed to running configure and make
+as with any other standard package. That should leave you with a shared
+library in src/, and a few utility programs including hb-view and hb-shape
+under util/.
+If you are bootstraping from git, you need a few more tools before you can
+run autogen.sh for the first time. Namely, pkg-config and ragel. Again,
+on Ubuntu / Debian:
+* sudo apt-get install autoconf automake libtool pkg-config ragel gtk-doc-tools
+
+and on Fedora, RHEL, CentOS:
+* sudo yum install autoconf automake libtool pkgconfig ragel gtk-doc
+
+or using MacPorts:
+* sudo port install autoconf automake libtool pkgconfig ragel gtk-doc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/ChangeLog b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
index 9d157598a2f..1d34c693294 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/ChangeLog
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
@@ -1,3 +1,1865 @@
+commit 35d18585fc57750d817f57bfffe569069f9803b5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 26 19:30:37 2015 -0500
+
+ Fix a few docs blocks
+
+ src/hb-buffer.cc | 4 ++++
+ src/hb-glib.cc | 2 ++
+ src/hb-ot-font.cc | 2 ++
+ src/hb-ot-layout.cc | 6 ++++++
+ src/hb-ot-shape.cc | 4 ++++
+ 5 files changed, 18 insertions(+)
+
+commit 0e38c918b66df31978d8fd3d8271a9b781384545
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 26 19:26:26 2015 -0500
+
+ [introspection] Make scanner happy with HB_EXTERN
+
+ src/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit ea512f71084296be3bd893f78650def894066de0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 26 19:22:22 2015 -0500
+
+ Use C-style casts instead of compare to 0, to convert hb_bool_t
+ to bool
+
+ src/hb-common.cc | 2 +-
+ src/hb-fallback-shape.cc | 2 +-
+ src/hb-font-private.hh | 2 +-
+ src/hb-ot-layout.cc | 2 +-
+ src/hb-ot-map.cc | 2 +-
+ src/hb-ot-shape-complex-hangul.cc | 2 +-
+ src/hb-ot-shape-complex-hebrew.cc | 2 +-
+ src/hb-ot-shape-complex-indic.cc | 4 ++--
+ src/hb-ot-shape-normalize.cc | 6 +++---
+ src/hb-ot-shape.cc | 2 +-
+ 10 files changed, 13 insertions(+), 13 deletions(-)
+
+commit 67a36a725e2a61a096ba0324f359d17f9b02d312
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 26 18:48:42 2015 -0500
+
+ Fix vertical GPOS
+
+ This was brorken earlier, though, it's really hard to notice it.
+ Unlike the glyph_h_origin(), an unset glyph_v_origin() does NOT
+ mean that the vertical origin is at 0,0.
+
+ Related to https://github.com/behdad/harfbuzz/issues/187
+
+ src/hb-ot-shape.cc | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+commit 1c6a057dd1a52511474630896a597bf8e5215214
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 26 18:48:30 2015 -0500
+
+ Add tests for previous commit
+
+ test/shaping/Makefile.am | 1 +
+ .../sha1sum/49c9f7485c1392fa09a1b801bc2ffea79275f22e.ttf | Bin 0 ->
+ 1496 bytes
+ test/shaping/fonts/sha1sum/MANIFEST | 1 +
+ test/shaping/tests/MANIFEST | 1 +
+ test/shaping/tests/simple.tests | 2 ++
+ 5 files changed, 5 insertions(+)
+
+commit c41c145c7386ebe72b1cfb0475d836a689fecc5e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 26 18:43:15 2015 -0500
+
+ Make nil glyph_h_origin() function return true
+
+ Fixes https://github.com/behdad/harfbuzz/issues/187
+
+ Funcs implementations that have a non-zero horizontal origin must
+ implement the glyph_h_origin() callback, nothing new here.
+
+ Other implementations (all I know of!) can simply not set
+ glyph_h_origin() now. I did that for hb-ot and hb-ft in
+ 44f82750807475aa5b16099ccccd917d488df703, though that broke the
+ fallback shaper because the default was returning false...
+
+ src/hb-font.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 766963adba6770dcd45de4417481ed8eda60a716
+Merge: b344af8 f798b8e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 24 15:38:43 2015 -0600
+
+ Merge pull request #114 from ThePhD/vc++-fixes
+
+ Fix all VC++ warnings and errors
+
+commit b344af80ca95b9eddfd6017aa6ae103388d6b5f8
+Merge: 662acd2 835bbdc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 24 15:30:27 2015 -0600
+
+ Merge pull request #177 from fanc999/exporting
+
+ Enable use of compiler directives to export symbols
+
+commit 662acd26d10c38e96a9afcdaab2cb2979794966f
+Merge: b24e93e 1979f6f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 24 15:29:44 2015 -0600
+
+ Merge pull request #181 from mhosken/master
+
+ Fix y_scale problems in hb-gr
+
+commit b24e93e3a4d98111c4684fa08e9080b471881d5c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 24 13:18:20 2015 -0600
+
+ 1.1.1
+
+ NEWS | 7 +++++++
+ configure.ac | 2 +-
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+commit 233944ac91bb81250c0e63150eecfedfaf09f590
+Merge: 5a24b1d d538201
+Author: Khaled Hosny <khaledhosny@eglug.org>
+Date: Tue Nov 24 18:37:35 2015 +0400
+
+ Merge pull request #185 from khaledhosny/travis-osx
+
+ [travis] Enable Mac OS X support
+
+commit d538201918e6932ef7645f8d5b2c3491954936f8
+Author: Khaled Hosny <khaledhosny@eglug.org>
+Date: Tue Nov 24 12:46:35 2015 +0400
+
+ [travis] Enable Mac OS X support
+
+ Fixes https://github.com/behdad/harfbuzz/issues/182
+
+ .travis.yml | 22 ++++++++++++++++------
+ 1 file changed, 16 insertions(+), 6 deletions(-)
+
+commit 5a24b1d25c59865e298bf105f54503e79587265c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 23 16:46:14 2015 -0600
+
+ [travis] Remove coverity scan
+
+ I never could get it to work, and it's a proprietary platform.
+
+ .travis.yml | 11 -----------
+ README | 1 -
+ 2 files changed, 12 deletions(-)
+
+commit 1979f6fedca82fa1e4f65491de491db1aa6dc645
+Author: Martin Hosken <martin_hosken@sil.org>
+Date: Mon Nov 23 10:03:56 2015 +0700
+
+ Fix y_scale problems in hb-gr
+
+ src/hb-graphite2.cc | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+commit 835bbdc7c92bd774ff92c42a9277ded72066d29d
+Author: Chun-wei Fan <fanchunwei@src.gnome.org>
+Date: Thu Nov 19 18:34:12 2015 +0800
+
+ Public headers: Decorate public symbols with HB_EXTERN
+
+ This prepares the headers for exporting symbols using visibility
+ attributes or __declspec(dllexport), so that we do not need to
+ maintain
+ symbols listing files, as this is what was and is done in GLib
+ and GTK+.
+
+ src/hb-blob.h | 24 +++++-----
+ src/hb-buffer.h | 100 +++++++++++++++++++-------------------
+ src/hb-common.h | 22 ++++-----
+ src/hb-coretext.h | 6 +--
+ src/hb-face.h | 34 ++++++-------
+ src/hb-font.h | 114
+ ++++++++++++++++++++++----------------------
+ src/hb-ft.h | 18 +++----
+ src/hb-glib.h | 8 ++--
+ src/hb-gobject-enums.h.tmpl | 2 +-
+ src/hb-gobject-structs.h | 26 +++++-----
+ src/hb-graphite2.h | 4 +-
+ src/hb-icu.h | 6 +--
+ src/hb-ot-font.h | 2 +-
+ src/hb-ot-layout.h | 56 +++++++++++-----------
+ src/hb-ot-shape.h | 4 +-
+ src/hb-ot-tag.h | 8 ++--
+ src/hb-set.h | 52 ++++++++++----------
+ src/hb-shape-plan.h | 18 +++----
+ src/hb-shape.h | 10 ++--
+ src/hb-unicode.h | 52 ++++++++++----------
+ src/hb-uniscribe.h | 4 +-
+ src/hb-version.h.in | 6 +--
+ src/hb.h | 4 ++
+ 23 files changed, 292 insertions(+), 288 deletions(-)
+
+commit f798b8e2d683a1b89b6905b1a8615375b847b468
+Author: ThePhD <phdofthehouse@gmail.com>
+Date: Sat Nov 21 16:57:26 2015 -0500
+
+ c-style cast
+
+ src/hb-ot-shape-complex-use.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit a6991813659376a6a11c00a9f67d85b4f7ba9b5d
+Merge: 1dc32ea f19c6db
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 20 13:28:42 2015 -0800
+
+ Merge pull request #176 from behdad/missing-braces
+
+ Add braces for subobject initializer in _hb_font_funcs_nil
+
+commit 1dc32ea4d2f294f9d1ae1c8fd19fb75f9278223b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 20 13:24:19 2015 -0800
+
+ Whitespace
+
+ src/hb-private.hh | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+commit f94c0ecbb1488138d3ec3b9d6d9fb78113dfee4f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 20 13:21:29 2015 -0800
+
+ Define HB_MARK_AS_FLAG_T as a macro instead of using templates
+
+ The generic template operator overloading was causing more problems
+ than it
+ solved. Eg:
+
+ https://github.com/behdad/harfbuzz/pull/163
+ https://github.com/behdad/harfbuzz/issues/175
+
+ So, just use macros.
+
+ Fixes https://github.com/behdad/harfbuzz/issues/175
+ Fixes https://github.com/behdad/harfbuzz/pull/178
+
+ src/hb-private.hh | 27 +++++++++++----------------
+ 1 file changed, 11 insertions(+), 16 deletions(-)
+
+commit f19c6db18e2e2dd0e9a406fc7e8533049fab48b0
+Author: jfkthame <jfkthame@gmail.com>
+Date: Fri Nov 20 08:43:49 2015 +0000
+
+ Add braces for subobject initializer in _hb_font_funcs_nil
+
+ To avoid triggering -Wmissing-braces; see
+ https://bugzilla.mozilla.org/show_bug.cgi?id=1226175#c8
+
+ src/hb-font.cc | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+commit 9cc1ed4fa68075b3b142a2737438109772dd0002
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 19 12:39:09 2015 -0800
+
+ Do not allow recursiving to same position and same lookup
+
+ This is just to make it harder to be extremely slow. There definitely
+ are ways still, just harder. Oh well... how do we tame this problem
+ without solving halting problem?!
+
+ Fixes https://github.com/behdad/harfbuzz/issues/174
+
+ src/hb-ot-layout-gsubgpos-private.hh | 5 +++++
+ test/shaping/fonts/sha1sum/MANIFEST | 1 +
+ .../sha1sum/fab39d60d758cb586db5a504f218442cd1395725.ttf | Bin 0 ->
+ 1894 bytes
+ test/shaping/tests/fuzzed.tests | 1 +
+ 4 files changed, 7 insertions(+)
+
+commit 7d75eee799bbb5ee7eef2651cf7b7d3aee6f09b0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 19 12:03:04 2015 -0800
+
+ [fuzzing] Run fuzzing tests using hb-fuzzer as well
+
+ test/fuzzing/Makefile.am | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 13188cba7f0eaacd587beeb1c2258526ae24c438
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 19 11:59:03 2015 -0800
+
+ Revert "Fix hang in OOM situations"
+
+ This reverts commit f0599db761d7fc2d585d86e757a797f75ebc7499.
+
+ Commit abadc1717d997b69f987fdf1be9e12156d2d13d6 provides a better
+ fix for this.
+
+ src/hb-buffer-private.hh | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+commit 18e1c6b6ef7c85a1b02e3dae86280d8ed6b65118
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 19 11:50:58 2015 -0800
+
+ Revert "Make sure we make progress in OOM situations"
+
+ This reverts commit 68b507a3c3c62c28c38e13fee733702bb703b6ca.
+
+ Commit abadc1717d997b69f987fdf1be9e12156d2d13d6 provides a better
+ fix for this.
+
+ src/hb-buffer-private.hh | 7 +++++--
+ src/hb-buffer.cc | 31 ++++++++-----------------------
+ 2 files changed, 13 insertions(+), 25 deletions(-)
+
+commit e1118aeac3b5556df0ce502732df8ac92bdac45a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 18 23:40:47 2015 -0800
+
+ 1.1.0
+
+ NEWS | 22 ++++++++++++++++++++++
+ configure.ac | 2 +-
+ 2 files changed, 23 insertions(+), 1 deletion(-)
+
+commit 63fe05c8b1cd4f08b525028409e1299f34750810
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 18 23:52:34 2015 -0800
+
+ Fix make distcheck
+
+ src/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 9b087dec7753ad96d256ce1b9ae347bd8d697c75
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 18 23:23:35 2015 -0800
+
+ [travis] Only coverity-scan the coverity_scan branch
+
+ This essentially disables coverity-scan right now, until we find
+ a pattern to continuously submit branches there.
+
+ For background reasoning, see:
+ Fixes https://github.com/behdad/harfbuzz/issues/171
+
+ .travis.yml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 85062e3b4655ec6d5c3cf5344ce22cd88c21a2aa
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 18 23:09:13 2015 -0800
+
+ Add tests for previous two commits
+
+ To fully test what these are supposed to test, they should be run
+ against libharfbuzz-fuzzing.la instead of libharfbuzz.la, but for
+ now just record the files.
+
+ .../sha1sum/43979b90b2dd929723cf4fe1715990bcb9c9a56b.ttf | Bin 0 ->
+ 1804 bytes
+ test/shaping/fonts/sha1sum/MANIFEST | 2 ++
+ .../sha1sum/b9e2aaa0d75fcef6971ec3a96d806ba4a6b31fe2.ttf | Bin 0 ->
+ 1804 bytes
+ test/shaping/tests/fuzzed.tests | 2 ++
+ 4 files changed, 4 insertions(+)
+
+commit 37b40cd8a18e25d3324f829acec197f016f4a524
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 18 23:04:45 2015 -0800
+
+ Fix another move_to assertion failure
+
+ If buf->idx is at end, don't set end past it...
+
+ Fixes https://github.com/behdad/harfbuzz/issues/173
+
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit abadc1717d997b69f987fdf1be9e12156d2d13d6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 18 17:52:08 2015 -0800
+
+ Try to better handle OOM situations
+
+ Fixes assert fail in https://github.com/behdad/harfbuzz/issues/161
+ with libharfbuzz-fuzzing.
+
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ src/hb-ot-layout.cc | 2 +-
+ src/hb-ot-shape-complex-hangul.cc | 2 +-
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ src/hb-ot-shape-complex-thai.cc | 2 +-
+ src/hb-ot-shape-complex-use.cc | 8 +-------
+ src/hb-ot-shape-normalize.cc | 10 +++++-----
+ src/hb-ot-shape.cc | 2 +-
+ 8 files changed, 12 insertions(+), 18 deletions(-)
+
+commit ec625f7dfb5f6df19d35d81af6605d05e08321f2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 18 16:37:59 2015 -0800
+
+ Try to fix gnome-continuous build fail
+
+ test/fuzzing/Makefile.am | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit ff16ef3379e06afe44b5e78b8893aeae0cee2b5b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 18 16:27:32 2015 -0800
+
+ Enable building a bounded version of the library for fuzzing
+
+ test/fuzzing/hb-fuzzer links against libharfbuzz-fuzzing.so now.
+
+ src/Makefile.am | 16 ++++++++++++++++
+ test/fuzzing/Makefile.am | 9 ++-------
+ test/fuzzing/README | 6 ++----
+ 3 files changed, 20 insertions(+), 11 deletions(-)
+
+commit e0082ae60dbd87d433f3b2b9d2bfa64b9a4c3663
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 17 18:42:13 2015 -0800
+
+ Move things around
+
+ src/hb-private.hh | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+commit dde8cc87bd880bd35baf764820f4c85bd0a58696
+Merge: e97835a 167c327
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 17 18:40:10 2015 -0800
+
+ Merge pull request #163 from fanc999/msvc.src
+
+ Update the sources so they will compile under Visual Studio
+
+commit 167c3271778cd1a8c4433b9d2230901ce17c099e
+Author: Chun-wei Fan <fanchunwei@src.gnome.org>
+Date: Mon Nov 9 17:17:56 2015 +0800
+
+ Fix build on MSVC >= 2012
+
+ Use the DEFINE_ENUM_FLAG_OPERATORS macro in winnt.h on Visual Studio,
+ which defines the bitwise operators for the enumerations that we
+ want to
+ mark as hb_mark_as_flags_t, which will take care of the situation
+ on newer
+ Visual Studio (>= 2012), where the build breaks with C2057 errors
+ as the
+ underlying types of the enumerations is not clear to the compiler
+ when we
+ do a bitwise op within the declaration of the enumerations themselves.
+
+ Also disable the C4200 (nonstandard extension used : zero-sized
+ array in
+ struct/union) and C4800 ('type' : forcing value to bool 'true' or
+ 'false'
+ (performance warning)) warnings as the C4200 is the intended
+ scenario and
+ C4800 is harmless but is so far an unavoidable side effect of using
+ DEFINE_ENUM_FLAG_OPERATORS.
+
+ src/hb-buffer-private.hh | 6 +++---
+ src/hb-ot-layout-common-private.hh | 2 +-
+ src/hb-ot-layout-private.hh | 4 ++--
+ src/hb-ot-map-private.hh | 2 +-
+ src/hb-private.hh | 11 +++++++++++
+ 5 files changed, 18 insertions(+), 7 deletions(-)
+
+commit 4d27bb87468a1b84387e7ce084e3d92c0fc8f065
+Author: Chun-wei Fan <fanchunwei@src.gnome.org>
+Date: Fri Nov 6 14:28:30 2015 +0800
+
+ hb-ot-shape-complex-arabic.cc: Fix build on Visual Studio
+
+ Visual Studio does not like declaring a enum variable within a for
+ statement, so fix the build by declaring the enum before doing the for
+ loop.
+
+ src/hb-ot-shape-complex-arabic.cc | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit a49e7b7e40127beba25f39ef3c10d7a77e2bb0f0
+Author: Chun-wei Fan <fanchunwei@src.gnome.org>
+Date: Tue Nov 3 18:49:34 2015 +0800
+
+ MSVC builds: Add fallback implementation for pre-2013 MSVC
+
+ Pre-2013 MSVC does not have scalbn() and scalbnf(), which are used
+ in the
+ utility programs. Add fallback implementations for these, which
+ can be
+ used when necessary.
+
+ util/options.hh | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+commit 998e8dda938cfef0146f1bfc4e8973a0e12d7d35
+Author: Chun-wei Fan <fanchunwei@src.gnome.org>
+Date: Mon Nov 2 16:55:29 2015 +0800
+
+ util: Fix build on Visual Studio
+
+ Use the fallback implementation for lround() only on pre-2013 Visual
+ Studio, and ensure we are clear about the types of the parameters for
+ lround() and scalbnf(), since Visual Studio can be quite picky on
+ ambiguous parameter types. Also, use g_ascii_strcasecmp() rather than
+ strcasecmp() as we are already using GLib for this code and we are
+ assured that g_ascii_strcasemp() is available.
+
+ For scalbnf() on pre-2013 Visaul Studio, a fallback implementation is
+ needed, but use another forced-included header for those compilers,
+ which
+ will be added later.
+
+ Also use (char)27 on Visual Studio builds as '\e' is not a recognized
+ escape sequence, which will do the same thing.
+
+ util/ansi-print.cc | 16 +++++++++-------
+ util/helper-cairo.cc | 20 ++++++++++----------
+ util/options.cc | 2 +-
+ 3 files changed, 20 insertions(+), 18 deletions(-)
+
+commit e97835ad43f5c68e8cb29599246cae0f4461d663
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 10 11:37:01 2015 -0800
+
+ [util] Fix crash when --output-file is specified but not
+ --output-format
+
+ util/options.hh | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit d5f0d7c9fb14255388ab616f56e178cb7ca10ec2
+Merge: 04ff23e 529a933
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Nov 7 07:50:58 2015 -0800
+
+ Merge pull request #167 from KonstantinRitt/unicode_cp_opt
+
+ Micro optimizations to UTF-16 and UTF-32 codecs
+
+commit 04ff23e73d847ab3a5da0e9fac4fbca19aefd284
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 6 16:29:44 2015 -0800
+
+ [arabic] Improve stretch length calculation
+
+ Err on the side of being too short, than too wide. Reduces chance
+ of overlaps with neighboring glyphs.
+
+ src/hb-ot-shape-complex-arabic.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 59821ab8b413df3a444c38b80582a5137e364a70
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 6 16:27:44 2015 -0800
+
+ [arabic] Don't stretch over cased letters
+
+ Addresses
+ https://github.com/behdad/harfbuzz/commit/6e6f82b6f3dde0fc6c3c7d991d9ec6cfff57823d#commitcomment-14248516
+
+ src/hb-ot-shape-complex-arabic.cc | 24
+ +++++++++++++++++++++-
+ src/hb-unicode-private.hh | 20
+ ------------------
+ .../script-syriac/misc/abbreviation-mark.txt | 4 ++--
+ 3 files changed, 25 insertions(+), 23 deletions(-)
+
+commit 5337db29af39084d677a63154f404eca0c20cfeb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 6 16:18:09 2015 -0800
+
+ Revert "Don't process lookups if buffer is in error"
+
+ This reverts commit f92bd86cc8c11d262d1830c631cb7c63fc9d4bc8.
+
+ We don't want to be like cairo, where as soon as there's an error,
+ nothing works anymore. So, lets process lookups as long as there's
+ no new memory needed. That's also a model that hides fewer bugs.
+
+ src/hb-ot-layout.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 529a93312815dff3c2f37f880bf6ccb428bd3da0
+Author: Konstantin Ritt <ritt.ks@gmail.com>
+Date: Sat Nov 7 02:00:04 2015 +0400
+
+ Micro optimization to hb_utf16_t and hb_utf32_t ::prev()
+
+ Implement reverse lookup instead of re-using next()
+
+ src/hb-utf-private.hh | 29 +++++++++++++++++++----------
+ 1 file changed, 19 insertions(+), 10 deletions(-)
+
+commit 44ae9be7a29eebd6003cad2fdb90b40512a9c8eb
+Author: Konstantin Ritt <ritt.ks@gmail.com>
+Date: Sat Nov 7 01:58:38 2015 +0400
+
+ Nano optimization to hb_utf16_t and hb_utf32_t ::next()
+
+ src/hb-utf-private.hh | 17 ++++++-----------
+ 1 file changed, 6 insertions(+), 11 deletions(-)
+
+commit a6d7668a954a763a053f8af8edbff4731aa43729
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 6 09:46:54 2015 -0800
+
+ [fuzzing] Cap max buffer len at 128
+
+ test/fuzzing/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit f1c4adbcd3f6275e81e118ddadc9396f82daeccf
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 6 09:46:05 2015 -0800
+
+ Fix typo
+
+ src/hb-buffer-private.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 68b507a3c3c62c28c38e13fee733702bb703b6ca
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 6 00:09:26 2015 -0800
+
+ Make sure we make progress in OOM situations
+
+ src/hb-buffer-private.hh | 7 ++-----
+ src/hb-buffer.cc | 31 +++++++++++++++++++++++--------
+ 2 files changed, 25 insertions(+), 13 deletions(-)
+
+commit 5a7eb5d4d862f402136044c19ead87ad098bd78f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 6 00:01:24 2015 -0800
+
+ [fuzzing] Add test case for OOM
+
+ From https://github.com/behdad/harfbuzz/issues/161
+
+ .../sha1sum/3511ff5c1647150595846ac414c595cccac34f18.ttf | Bin 0 ->
+ 1483 bytes
+ test/shaping/fonts/sha1sum/MANIFEST | 2 +-
+ test/shaping/tests/fuzzed.tests | 1 +
+ 3 files changed, 2 insertions(+), 1 deletion(-)
+
+commit f0599db761d7fc2d585d86e757a797f75ebc7499
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 23:52:41 2015 -0800
+
+ Fix hang in OOM situations
+
+ Fixes https://github.com/behdad/harfbuzz/issues/161
+
+ src/hb-buffer-private.hh | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+commit f92bd86cc8c11d262d1830c631cb7c63fc9d4bc8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 23:52:29 2015 -0800
+
+ Don't process lookups if buffer is in error
+
+ src/hb-ot-layout.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 4301703bddb63a01651a0d58474bb15ac0ebbcf6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 23:44:59 2015 -0800
+
+ Limit buffer max size growth
+
+ https://github.com/behdad/harfbuzz/issues/161
+
+ src/hb-buffer-private.hh | 11 +++++++++++
+ src/hb-buffer.cc | 8 ++++++++
+ src/hb-ot-shape.cc | 6 ++++++
+ test/fuzzing/Makefile.am | 2 ++
+ 4 files changed, 27 insertions(+)
+
+commit 19300183a6f0bac0d23f7a994b40a51e9c90d6e1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 23:08:50 2015 -0800
+
+ [fuzzing] Add build system
+
+ configure.ac | 1 +
+ test/Makefile.am | 2 +-
+ test/fuzzing/Makefile.am | 44
+ ++++++++++++++++++++++++++++++++++++++++++++
+ test/fuzzing/README | 2 ++
+ test/fuzzing/hb-fuzzer.cc | 4 ++--
+ 5 files changed, 50 insertions(+), 3 deletions(-)
+
+commit 9c9ad214af43685b00f6d8493b7807d6607d4e2d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 22:50:52 2015 -0800
+
+ [fuzzer] Add README
+
+ https://github.com/behdad/harfbuzz/issues/139#issuecomment-154202645
+
+ test/fuzzing/README | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+commit 6e6f82b6f3dde0fc6c3c7d991d9ec6cfff57823d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 17:29:03 2015 -0800
+
+ Implement SYRIAC ABBREVIATION MARK with 'stch' feature
+
+ The feature is enabled for any character in the Arabic shaper.
+ We should experiment with using it for Arabic subtending marks.
+ Though, that has a directionality problem as well, since those
+ are used with digits...
+
+ Fixes https://github.com/behdad/harfbuzz/issues/141
+
+ src/hb-ot-shape-complex-arabic.cc | 219
+ ++++++++++++++++++++-
+ src/hb-unicode-private.hh | 19 ++
+ .../shaper-arabic/script-syriac/misc/MANIFEST | 1 +
+ .../script-syriac/misc/abbreviation-mark.txt | 11 ++
+ 4 files changed, 244 insertions(+), 6 deletions(-)
+
+commit c743ec5886a1f6d57de26da33a770a8706be83d6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 17:33:57 2015 -0800
+
+ [ft] Fix extents with negative scales
+
+ Fixes https://github.com/behdad/harfbuzz/issues/162
+
+ src/hb-ft.cc | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+commit 73fec3992acb492829bde1d885f1ebeed8dcc133
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 15:22:18 2015 -0800
+
+ Reserve a few scratch-flags bits for complex shapers
+
+ src/hb-buffer-private.hh | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+commit 136863371c1402769426d892aef1b92f9ca1a25e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 13:24:15 2015 -0800
+
+ Add new shaper method postprocess_glyphs()
+
+ Unused currently. To be used for Syriac stretch implementation.
+
+ https://github.com/behdad/harfbuzz/issues/141
+
+ src/hb-ot-shape-complex-arabic.cc | 3 ++-
+ src/hb-ot-shape-complex-default.cc | 1 +
+ src/hb-ot-shape-complex-hangul.cc | 7 ++++---
+ src/hb-ot-shape-complex-hebrew.cc | 1 +
+ src/hb-ot-shape-complex-indic.cc | 1 +
+ src/hb-ot-shape-complex-myanmar.cc | 2 ++
+ src/hb-ot-shape-complex-private.hh | 9 +++++++++
+ src/hb-ot-shape-complex-thai.cc | 1 +
+ src/hb-ot-shape-complex-tibetan.cc | 1 +
+ src/hb-ot-shape-complex-use.cc | 1 +
+ src/hb-ot-shape.cc | 9 ++++++---
+ 11 files changed, 29 insertions(+), 7 deletions(-)
+
+commit 6c0ebd02c99e7536975ba7194832a1f33abd7faf
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 11:37:48 2015 -0800
+
+ [util] If font has color, generate PNG with color
+
+ util/helper-cairo.cc | 33 ++++++++++++++++++++++++++-------
+ util/helper-cairo.hh | 6 +++++-
+ util/view-cairo.cc | 7 ++++++-
+ 3 files changed, 37 insertions(+), 9 deletions(-)
+
+commit e95eb23a4ee920eab1e2f4eec9cf490bb431452c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 22:55:11 2015 -0800
+
+ Don't try zeroing marks by GDEF if there are no non-ASCII
+
+ This one is a hack, but should be ok.
+
+ src/hb-ot-shape.cc | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 7fa54ed75aa30ae1d6ee9136ccb83b630c24fb65
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 22:54:49 2015 -0800
+
+ Don't try zeroing mark attachments by Unicode if there's no non-ASCII
+
+ src/hb-ot-shape.cc | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 550bd14d2b21ec2a2b509ff42f4df4341dbf2d46
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 22:58:58 2015 -0800
+
+ Actually commit changes for previous commit
+
+ src/hb-buffer-private.hh | 2 ++
+ src/hb-ot-layout-gpos-table.hh | 15 ++++++++-------
+ 2 files changed, 10 insertions(+), 7 deletions(-)
+
+commit ff31b3c1b8a2a21b57dba37eb5bb5db0579e0640
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 22:42:41 2015 -0800
+
+ Skip GPOS cursive / attachment adjustmnent if none happened
+
+ I'm starting to really like how free these new scratch_flags are.
+
+ src/hb-ot-layout-gpos-table.hh | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 0f407325f6923db11d332585e8250e3646cb74d6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 22:28:44 2015 -0800
+
+ Minor
+
+ src/hb-ot-shape.cc | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+commit 497a6c2071cd0638e4c6af07621d01335fd963a9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 22:24:19 2015 -0800
+
+ Skip forming clusters if text is all ASCII
+
+ src/hb-ot-shape.cc | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 28de104f15b80df4b678267c4488b7d09a42720c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 22:00:25 2015 -0800
+
+ Move variable-sized struct member to end
+
+ Hopefully makes clang build happy
+
+ src/hb-font-private.hh | 21 ++++++++++-----------
+ src/hb-font.cc | 20 ++++++++++++++++++++
+ 2 files changed, 30 insertions(+), 11 deletions(-)
+
+commit 5bc28b5f688ee90d103d052e98bc15d6e0e7e0b1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 21:53:16 2015 -0800
+
+ Optimize positioning for when h_origin is nil
+
+ src/hb-ot-shape.cc | 38 ++++++++++++++++++++------------------
+ 1 file changed, 20 insertions(+), 18 deletions(-)
+
+commit 762770c964f9f0591bf4c44427f73ea3e1c51733
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 21:42:55 2015 -0800
+
+ Add font->has_...() to check for individual nil font funcs
+
+ Hopefully this wouldn't break any compiler. There was some magic
+ moments to getting this to compile...
+
+ src/hb-font-private.hh | 19 +++++++++++++++++--
+ src/hb-font.cc | 7 +++++++
+ 2 files changed, 24 insertions(+), 2 deletions(-)
+
+commit 88e9a9bcae61421d9dd65715d25e5f20b2847c03
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 21:16:26 2015 -0800
+
+ Minor reshaping of hb_font_funcs_t implementation
+
+ In anticipation of further changes. No functional changes.
+
+ src/hb-font-private.hh | 80
+ ++++++++++++++++++++++++++------------------------
+ src/hb-font.cc | 4 +--
+ 2 files changed, 43 insertions(+), 41 deletions(-)
+
+commit a6a7715bac8b0c8f5473b84bc649c315ad4d2d51
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 20:51:21 2015 -0800
+
+ Comments
+
+ src/hb-font-private.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 6c48ec830ffac00a920d047ed77acd1b05549074
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 20:47:42 2015 -0800
+
+ [ot] Remove font funcs that do nothing
+
+ src/hb-ot-font.cc | 95
+ ++++---------------------------------------------------
+ 1 file changed, 7 insertions(+), 88 deletions(-)
+
+commit 75ea2daa1d9bbe235cd4a8570efb1913d58c3c62
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 20:43:59 2015 -0800
+
+ [ot] Port ot font funcs to allocated object
+
+ src/hb-ot-font.cc | 47 ++++++++++++++++++++++++++++++++++++++---------
+ 1 file changed, 38 insertions(+), 9 deletions(-)
+
+commit 44f82750807475aa5b16099ccccd917d488df703
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 20:40:05 2015 -0800
+
+ [ft] Remove font funcs that do nothing
+
+ src/hb-ft.cc | 29 ++++-------------------------
+ 1 file changed, 4 insertions(+), 25 deletions(-)
+
+commit 7918c261efd283e0428ce7836e9e42768a6aa05c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 20:37:49 2015 -0800
+
+ [ft] Port ft font funcs to allocated object
+
+ src/hb-ft.cc | 45 ++++++++++++++++++++++++++++++++++++---------
+ 1 file changed, 36 insertions(+), 9 deletions(-)
+
+commit da29b43794cfa3f9a602c34b33c5d8a9c36f87b5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 20:22:44 2015 -0800
+
+ Separate nil font-funcs from parent-peeking font-funcs
+
+ API change: all fonts created with hb_font_create() now inherit from
+ (ie have parent) hb_font_get_empty().
+
+ src/hb-font.cc | 211
+ +++++++++++++++++++++++++++++++++++----------------
+ test/api/test-font.c | 2 +-
+ 2 files changed, 145 insertions(+), 68 deletions(-)
+
+commit bee901b38ef3c26a04f69c299c8d5e028a0090e9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 19:28:17 2015 -0800
+
+ Optimize positioning direction calculations
+
+ It makes the binary smaller AND faster. Yumm!
+
+ src/hb-font-private.hh | 40 +++++++++++++++++++++++++++++++++++++++
+ src/hb-ot-shape.cc | 51
+ +++++++++++++++++++++++++++-----------------------
+ 2 files changed, 68 insertions(+), 23 deletions(-)
+
+commit e3e4bb011ae1a2f1ba05e7ea450595b185304bec
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 18:58:02 2015 -0800
+
+ Don't do fractions if buffer is ASCII-only
+
+ src/hb-buffer-private.hh | 5 +++--
+ src/hb-ot-layout-private.hh | 1 +
+ src/hb-ot-shape.cc | 3 ++-
+ 3 files changed, 6 insertions(+), 3 deletions(-)
+
+commit 6986208ba3b395534f4c7bcfa51df6bf9038f717
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 18:46:22 2015 -0800
+
+ Optimize runs without Default_Ignorable's
+
+ Now that we have a buffer-wide scratch flags facility, use it to
+ optimize away a few passes.
+
+ src/hb-buffer-private.hh | 3 ++-
+ src/hb-ot-layout-private.hh | 4 +++-
+ src/hb-ot-shape-normalize.cc | 4 ++--
+ src/hb-ot-shape.cc | 10 ++++++----
+ src/hb-private.hh | 3 +++
+ 5 files changed, 16 insertions(+), 8 deletions(-)
+
+commit 14c2de321826c36037adde859ccca3e2011325a9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 18:00:57 2015 -0800
+
+ Limit max edits during sanitize to 8
+
+ Used to be 100. If a tabe needs more than one or two edits, it's
+ probably completely bogus...
+
+ Might help with speeding up fuzzing for
+ https://github.com/behdad/harfbuzz/issues/157
+
+ src/hb-open-type-private.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 9cbc39aef962a95b0eba32c24ff9c415d1316d56
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 18:00:53 2015 -0800
+
+ Minor
+
+ src/hb-ot-shape-normalize.cc | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 52e6c4e15893ed1cb0997795912a07b3e446b65a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 17:45:06 2015 -0800
+
+ If font doesn't support U+2011, fall back to U+2010
+
+ Test passes now.
+
+ src/hb-ot-shape-normalize.cc | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+commit 75483aafa6ad02d6391712d082d093823edcd758
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 17:43:36 2015 -0800
+
+ Untangle if/else waterfall
+
+ src/hb-ot-shape-normalize.cc | 40
+ +++++++++++++++++++++++++++-------------
+ 1 file changed, 27 insertions(+), 13 deletions(-)
+
+commit 04fd8517f85ae9aa05b44f25578d2b19abfef7cb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 17:38:22 2015 -0800
+
+ Add tests for hyphen fallback
+
+ U+2011 is <noBreak> equivaent of U+2010, so we should do the fallback
+ for it. Currently fails.
+
+ test/shaping/Makefile.am | 1 +
+ .../sha1sum/1c04a16f32a39c26c851b7fc014d2e8d298ba2b8.ttf | Bin 0 ->
+ 820 bytes
+ test/shaping/fonts/sha1sum/MANIFEST | 2 ++
+ test/shaping/tests/MANIFEST | 1 +
+ test/shaping/tests/hyphens.tests | 2 ++
+ 5 files changed, 6 insertions(+)
+
+commit 550417117da7e14457a11f49a20145311f58587b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 17:37:30 2015 -0800
+
+ [test] Drop hintings when subsetting fonts to record
+
+ test/shaping/record-test.sh | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 49ef630936325b2e56a870fcef9aa8473a8f8526
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 17:27:07 2015 -0800
+
+ Adjust the width of various spaces if font does not cover them
+
+ See discussion here:
+ https://github.com/behdad/harfbuzz/commit/81ef4f407d9c7bd98cf62cef951dc538b13442eb
+
+ There's no way to disable this fallback, but I don't think it would
+ be needed. Let's hope for the best!
+
+ Fixes https://github.com/behdad/harfbuzz/issues/153
+
+ src/hb-buffer-private.hh | 7 ++++
+ src/hb-buffer.cc | 2 ++
+ src/hb-ot-shape-fallback-private.hh | 4 +++
+ src/hb-ot-shape-fallback.cc | 67
+ +++++++++++++++++++++++++++++++++++++
+ src/hb-ot-shape-normalize.cc | 1 +
+ src/hb-ot-shape.cc | 3 ++
+ src/hb-unicode-private.hh | 56 +++++++++++++++++--------------
+ test/shaping/tests/spaces.tests | 24 ++++++-------
+ 8 files changed, 126 insertions(+), 38 deletions(-)
+
+commit aa7044de0ceacd71cab19212d266c3a66c03b41e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 16:25:57 2015 -0800
+
+ Generalize flags types
+
+ src/hb-buffer-private.hh | 3 +++
+ src/hb-ot-layout-common-private.hh | 5 +++++
+ src/hb-ot-layout-private.hh | 8 +++++---
+ src/hb-ot-map-private.hh | 16 +---------------
+ src/hb-ot-shape.cc | 2 +-
+ src/hb-private.hh | 14 ++++++++++++++
+ 6 files changed, 29 insertions(+), 19 deletions(-)
+
+commit 7793aad946e09b53523b30d57de85abd1d15f8b6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 14:48:46 2015 -0800
+
+ Normalize various spaces to space if font doesn't support
+
+ This resurrects the space fallback feature, after I disabled
+ the compatibility decomposition. Now I can release HarfBuzz
+ again without breaking Pango!
+
+ It also remembers which space character it was, such that later
+ on we can approximate the width of this particular space
+ character. That part is not implemented yet.
+
+ We normalize all GC=Zs chars except for U+1680 OGHA SPACE MARK,
+ which is better left alone.
+
+ src/hb-ot-layout-private.hh | 47
+ +++------------------
+ src/hb-ot-shape-normalize.cc | 12 +++++-
+ src/hb-unicode-private.hh | 40
+ ++++++++++++++++++
+ test/shaping/Makefile.am | 1 +
+ .../1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf | Bin 0 -> 316 bytes
+ test/shaping/fonts/sha1sum/MANIFEST | 1 +
+ test/shaping/tests/MANIFEST | 1 +
+ test/shaping/tests/spaces.tests | 17 ++++++++
+ 8 files changed, 76 insertions(+), 43 deletions(-)
+
+commit 8b3c7f9ede77052225cff8495d660860bf9c7629
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 15:30:48 2015 -0800
+
+ [test] Support recording multiple lines of text in record-test.sh
+
+ test/shaping/record-test.sh | 15 +++++++++++++--
+ 1 file changed, 13 insertions(+), 2 deletions(-)
+
+commit 85658394809fe0593ab5dfb30fd96118765c7dc5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 14:46:52 2015 -0800
+
+ Protect against possible invalid-memory access after OOM
+
+ src/hb-buffer-private.hh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 4cc80bed25450af3d84a30ea417fa9275b15e014
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 14:46:10 2015 -0800
+
+ Fix typo!
+
+ Ouch! Fortunately that function was unused.
+
+ src/hb-buffer-private.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 9ac4b9656dd78ffd129bc3d560a92e2692bc3058
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 14:18:39 2015 -0800
+
+ Add Unicode space category
+
+ Unused so far.
+
+ src/hb-ot-layout-private.hh | 78
+ +++++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 76 insertions(+), 2 deletions(-)
+
+commit 8249ec3f86510fd24462ce71ed64a6978f0ade17
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 13:26:17 2015 -0800
+
+ Make top-byte of unicode_props available to be used differently per-GC
+
+ src/hb-ot-layout-private.hh | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+commit cc5d3a33882b52f906ee4346707700f5e846d2ac
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 13:21:25 2015 -0800
+
+ Towards using top-byte of unicode-props for more things
+
+ src/hb-ot-layout-gsubgpos-private.hh | 1 -
+ src/hb-ot-layout-private.hh | 3 ++-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 2f38dde5a1ea5459789fabaee661cae9235d204e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 13:17:33 2015 -0800
+
+ Add _hb_glyph_info_is_unicode_mark()
+
+ Unused right now.
+
+ src/hb-ot-layout-private.hh | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+commit 90d75f93bb85aeb627c4e6bb9e4cbd75895c99f7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 12:58:12 2015 -0800
+
+ Tighten ccc-setting a bit and document it
+
+ src/hb-ot-layout-private.hh | 12 +++++++++++-
+ src/hb-unicode-private.hh | 5 +++++
+ 2 files changed, 16 insertions(+), 1 deletion(-)
+
+commit 2f0dfd43cdc2259e6117704f8077ab6951c761e5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 12:28:34 2015 -0800
+
+ Fix test expectation
+
+ test/shaping/tests/fuzzed.tests | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit df698f3299d92867e3305715f675b2621c316acd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 12:15:12 2015 -0800
+
+ [ot-font] Fix hmtx table length checking, *again*
+
+ Exactly the same problem that I fixed in
+ 63ef0b41dc48d6112d1918c1b1de9de8ea90adb5
+
+ I rewrote the table checking yesterday in
+ 67f8821fb25d9bd55719f5e29a582ae1af4b02b3
+ and introduced the exact same issue again. :(
+ Good thing we have ongoing fuzzing going now. Was discovered
+ immediately by libFuzzer. Thanks kcc!
+
+ https://github.com/behdad/harfbuzz/issues/139#issuecomment-153449473
+ Fixes https://github.com/behdad/harfbuzz/issues/156
+
+ src/hb-ot-font.cc | 4 ++--
+ .../sha1sum/8240789f6d12d4cfc4b5e8e6f246c3701bcf861f.ttf | Bin 0 ->
+ 633 bytes
+ test/shaping/fonts/sha1sum/MANIFEST | 1 +
+ test/shaping/tests/fuzzed.tests | 1 +
+ 4 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 3530cc2d7c3b7102902cb0e38b0bf9f46188078d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 11:34:47 2015 -0800
+
+ [util] Fix option-parsing leaks
+
+ util/helper-cairo.cc | 7 +++++--
+ util/main-font-text.hh | 22 ++++++++++++++++++---
+ util/options.cc | 21 ++++++++++----------
+ util/options.hh | 53
+ +++++++++++++++++++++++++++++++++-----------------
+ 4 files changed, 70 insertions(+), 33 deletions(-)
+
+commit 642135f3b2d6d6eb800153c76c4718239733c0e6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 11:26:34 2015 -0800
+
+ [util] In --debug mode, duplicate font data
+
+ This has the effect that the font data will end up in a memory
+ section malloc()ed exactly to its size. This gives us better
+ valgrind detection of out-of-bounds access.
+
+ Previously, the font data was placed in a mmap()ed section or
+ GString-allocated area, which didn't have proper protections
+ at the end when running under valgrind.
+
+ util/options.cc | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit ed2024ef93ac3af214082016e5aa8c14db9d7515
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 17:58:12 2015 -0800
+
+ [perf] Micro-optimize
+
+ src/hb-ot-layout-private.hh | 23 ++++++++++++++---------
+ 1 file changed, 14 insertions(+), 9 deletions(-)
+
+commit 76a5310a830c7ae12037b768c5043bef0ff733a0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 17:52:45 2015 -0800
+
+ Remove irrelevant comment
+
+ I tried moving the is_default_ignorable() function to an INTERNAL
+ function. That made the binary size grow by 5k AND things got a
+ tad bit slower!
+
+ src/hb-ot-layout-private.hh | 1 -
+ 1 file changed, 1 deletion(-)
+
+commit 8259669fbd1b070fc02287325894caf1bc4d590e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 17:44:05 2015 -0800
+
+ Minor
+
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ src/hb-ot-shape-complex-thai.cc | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 9382c471eabce8d36d3a73c97499ab60af422716
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 17:36:51 2015 -0800
+
+ Combine unicode_props0/1 into a uint16
+
+ Slightly faster. In prep for more changes.
+
+ src/hb-ot-layout-private.hh | 55
+ ++++++++++++++++++++++++---------------------
+ 1 file changed, 29 insertions(+), 26 deletions(-)
+
+commit 71277185454482cff9b0c10b85c416eb4d6e0ed9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 17:27:48 2015 -0800
+
+ [perf] Only call combining_class() for marks
+
+ Saves some time. Also preparing for reusing the ccc byte for
+ other stuff.
+
+ src/hb-ot-layout-private.hh | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+commit 5ba450407b9d9856453e63a815499da8721ff6a7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 15:43:08 2015 -0800
+
+ Make max context-length and max nesting level configurable
+
+ ...at compile time.
+
+ src/hb-ot-layout-common-private.hh | 10 ++++++++--
+ src/hb-ot-layout-gsub-table.hh | 4 ++--
+ src/hb-ot-layout-gsubgpos-private.hh | 20 ++++++++++----------
+ 3 files changed, 20 insertions(+), 14 deletions(-)
+
+commit 67f8821fb25d9bd55719f5e29a582ae1af4b02b3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 15:37:29 2015 -0800
+
+ [ot] Make bad-hmtx handling match FreeType
+
+ Also route fuzzing-related tests through hb-ot-font, to reduce
+ dependency
+ on FreeType behavior for badly-broken fonts. Fixes failing test with
+ FreeType master.
+
+ src/hb-ot-font.cc | 24 ++++++++++++++----------
+ test/shaping/tests/fuzzed.tests | 10 +++++-----
+ 2 files changed, 19 insertions(+), 15 deletions(-)
+
+commit 672ca3b4e65a75fb3a418ec5d117ad242a98acbb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Oct 26 14:05:05 2015 -0700
+
+ Use templates for making sure expression is constant
+
+ src/hb-private.hh | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 5c8174eda32c08187bc2ed40eefa1017f5b40668
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 21 18:51:40 2015 -0200
+
+ Update comments for removal of compat decompositions
+
+ src/hb-ot-shape-normalize.cc | 16 ++--------------
+ 1 file changed, 2 insertions(+), 14 deletions(-)
+
+commit f6799700404c49ae0a6018fd51be19551c76768a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 21 17:20:55 2015 -0200
+
+ Disable compatibility decomposition usage during normalization
+
+ Fixes https://github.com/behdad/harfbuzz/issues/152
+
+ src/hb-ot-shape-normalize.cc | 24 ------------------------
+ 1 file changed, 24 deletions(-)
+
+commit ce889189c1f8ef5b400a17f623dcb8b935d1102b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 21 11:23:12 2015 -0200
+
+ Fix two more -Wshadow warnings
+
+ https://bugzilla.mozilla.org/show_bug.cgi?id=1215894
+
+ src/hb-open-type-private.hh | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+commit 4a6b1eedbb0044b57505eea65a329d2dc4f9f917
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 21 11:20:55 2015 -0200
+
+ Fix one more -Wshadow warning
+
+ https://bugzilla.mozilla.org/show_bug.cgi?id=1215894
+
+ src/hb-ot-layout-gsubgpos-private.hh | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 6f932bc8f9045b224613a617af2b4f3450c79467
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 21 11:16:49 2015 -0200
+
+ Fix a few more -Wshadow-local warnings
+
+ https://bugzilla.mozilla.org/show_bug.cgi?id=1215894
+
+ src/hb-ot-shape-complex-indic.cc | 10 +++++-----
+ src/hb-ot-shape-complex-myanmar.cc | 10 +++++-----
+ src/hb-ot-shape-complex-use.cc | 10 +++++-----
+ 3 files changed, 15 insertions(+), 15 deletions(-)
+
+commit b90cb366d7723c28758c6b75a0770613fbb5456e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 21 11:13:21 2015 -0200
+
+ Fix one -Wshadow-compatible-local warning
+
+ From https://bugzilla.mozilla.org/show_bug.cgi?id=1215894
+
+ src/hb-ot-shape-complex-indic.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 50e5750bd8670b4cf4463471a2348d4c99c9d054
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 21 11:10:10 2015 -0200
+
+ Avoid unnecessary cast to 64-bit
+
+ Fixes https://github.com/behdad/harfbuzz/issues/146
+
+ Or I think it should.
+
+ src/hb-private.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 305d2fbf5a2db51447c8ed894a48a88896930673
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 21 11:04:28 2015 -0200
+
+ Add HB_FALLTHROUGH
+
+ Borrowed from https://bugzilla.mozilla.org/show_bug.cgi?id=1215411
+
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ src/hb-ot-shape-complex-thai.cc | 2 +-
+ src/hb-ot-shape-fallback.cc | 4 +++-
+ src/hb-private.hh | 30 ++++++++++++++++++++++++++++++
+ 4 files changed, 35 insertions(+), 3 deletions(-)
+
+commit 6486e3755482563ecd89aeb3f8348ed190945e26
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 20 16:39:41 2015 -0200
+
+ Fix typo
+
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 753ea7b90904c951c199861409458bea182abb37
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 20 15:21:18 2015 -0200
+
+ Add BUILD.md to dist
+
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 5d7a30fde09320c2c62c7c73570ce3f2e298eba6
+Merge: 904b0dc 2fb95a0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 20 15:19:41 2015 -0200
+
+ Merge pull request #148 from ebraminio/inst
+
+ Add BUILD.md based on harfbuzz.org docs
+
+commit 904b0dc3811464cf61dc9457664de95ee4f61a86
+Merge: 86cadc2 ba096bc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Oct 19 16:59:43 2015 -0200
+
+ Merge pull request #147 from ebraminio/dockerci
+
+ [ci] change to docker infrastructure
+
+commit ba096bcc28ca80e2096e0a15191848fcd175e395
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Mon Oct 19 21:41:01 2015 +0330
+
+ [ci] change to docker infrastructure
+
+ .travis.yml | 24 ++++++++++++++++--------
+ 1 file changed, 16 insertions(+), 8 deletions(-)
+
+commit 2fb95a0c9d2cb8b03b7c158706d6b0e41283a6df
+Author: Ebrahim Byagowi <ebrahim@gnu.org>
+Date: Mon Oct 19 22:02:12 2015 +0330
+
+ Add BUILD.md based on harfbuzz.org docs
+
+ BUILD.md | 25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
+
+commit 86cadc2cd4171050e9d74306b76c42f6ec74b861
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 15 20:25:29 2015 -0300
+
+ 1.0.6
+
+ NEWS | 13 +++++++++++++
+ configure.ac | 2 +-
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+
+commit ca97ea7aa2cb7186f432aaba76f4f151aa90c1d0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 15 20:20:22 2015 -0300
+
+ [ft] Revert change-of-behavior of hb_ft_font_create() introduced
+ in 1.0.5
+
+ The default FreeType load flags where changed from FT_LOAD_NO_HINTING
+ to FT_LOAD_DEFAULT in 2a9627c5641cd000e2adff0e42a0dc687b53ec70.
+ This is crashing HarfBuzz-enabled FreeType as I suppose it causes
+ infinite recursion between HB and FT autohinter...
+
+ Revert the behavior change.
+
+ Fixes https://github.com/behdad/harfbuzz/issues/143
+
+ src/hb-ft.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 338ffec9e4a5819f2be21c3a320a567378c977b1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 15 12:55:57 2015 -0300
+
+ Add tests for a couple of fixed issues found by libFuzzer
+
+ From:
+ https://github.com/behdad/harfbuzz/issues/139#issuecomment-147616887
+ https://github.com/behdad/harfbuzz/issues/139#issuecomment-148289957
+
+ .../sha1sum/375d6ae32a3cbe52fbf81a4e5777e3377675d5a3.ttf | Bin 0 ->
+ 1024 bytes
+ .../sha1sum/641bd9db850193064d17575053ae2bf8ec149ddc.ttf | Bin 0 ->
+ 305 bytes
+ test/shaping/fonts/sha1sum/MANIFEST | 2 ++
+ test/shaping/tests/fuzzed.tests | 2 ++
+ 4 files changed, 4 insertions(+)
+
+commit 63ef0b41dc48d6112d1918c1b1de9de8ea90adb5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 15 12:47:22 2015 -0300
+
+ [ot-font] Fix hmtx wrong table length check
+
+ Discovered by libFuzzer. Ouch!
+
+ https://github.com/behdad/harfbuzz/issues/139#issuecomment-148289957
+
+ src/hb-ot-font.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 613e630617074eb9b62b794cc37c9b42a7fb079b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 13 23:33:28 2015 -0300
+
+ Reduce max nesting level from 8 to 6
+
+ We probably should implement better system to catch cyclic lookups.
+ But for now, this speeds up worst case behavior with broken fonts
+ considerably without compromising legitimate usecases.
+
+ https://github.com/behdad/harfbuzz/issues/139#issuecomment-147788447
+
+ src/hb-ot-layout-common-private.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit ab170529246ad80830bef2b3c8b48e9a8d2b7483
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 13 10:55:33 2015 -0300
+
+ 1.0.5
+
+ NEWS | 24 ++++++++++++++++++++++++
+ configure.ac | 2 +-
+ 2 files changed, 25 insertions(+), 1 deletion(-)
+
+commit ed13e2ce509408f849255be1d3cc3dbd7dbb3ba2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 13 10:32:56 2015 -0300
+
+ [ot-font] Fix leak
+
+ https://github.com/behdad/harfbuzz/issues/139#issuecomment-147616887
+
+ src/hb-ot-font.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 55db94be2b754ba9b9121f09abcf8496c798affc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 13 00:33:59 2015 -0400
+
+ Add test for previous commit
+
+ .../sha1sum/0509e80afb379d16560e9e47bdd7d888bebdebc6.ttf | Bin 0 ->
+ 61 bytes
+ test/shaping/fonts/sha1sum/MANIFEST | 1 +
+ test/shaping/tests/fuzzed.tests | 1 +
+ 3 files changed, 2 insertions(+)
+
+commit f96664974774bfeb237a7274f512f64aaafb201e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 13 00:30:50 2015 -0400
+
+ Fix another memory access issue discovered by libFuzzer
+
+ Fixes
+ https://github.com/behdad/harfbuzz/issues/139#issuecomment-146984679
+
+ src/hb-ot-layout-gpos-table.hh | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+commit c1a5dc46c2231f7b62421e06b9766ccfebaf3ef5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Oct 12 17:39:52 2015 -0400
+
+ [fuzz] Add fuzzing script from kcc@
+
+ https://github.com/behdad/harfbuzz/issues/139
+
+ test/fuzzing/hb-fuzzer.cc | 47
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 47 insertions(+)
+
+commit cc6ea308d4c99b9dd6d625fa3a9b0ef62fa2614f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Oct 12 17:21:52 2015 -0400
+
+ Extern "C" custom-allocator declerations
+
+ src/hb-private.hh | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+commit 98c6fccc00062ead7a86892dd059aa13d266b981
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Oct 11 21:41:04 2015 -0400
+
+ Add test for ee9b0b6cb5fdb08671ab064f26c299135f828260
+
+ .../sha1sum/5a5daf5eb5a4db77a2baa3ad9c7a6ed6e0655fa8.ttf | Bin 0 ->
+ 61 bytes
+ test/shaping/fonts/sha1sum/MANIFEST | 1 +
+ test/shaping/tests/fuzzed.tests | 1 +
+ 3 files changed, 2 insertions(+)
+
+commit 50f489a0a013fc589626bb532a9f64f50bb41f58
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Oct 11 20:59:29 2015 -0400
+
+ Typo
+
+ src/hb-font-private.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit ee9b0b6cb5fdb08671ab064f26c299135f828260
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 9 14:23:15 2015 -0400
+
+ Fix another sanitize bug
+
+ Also discovered by "libFuzzer".
+
+ src/hb-open-type-private.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 34379b49e6922b86c15ee62f7fe3bf016cdc2514
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 9 12:34:02 2015 -0400
+
+ Add test for previous fix
+
+ test/shaping/Makefile.am | 1 +
+ .../sha1sum/1a6f1687b7a221f9f2c834b0b360d3c8463b6daf.ttf | Bin 0 ->
+ 64 bytes
+ test/shaping/fonts/sha1sum/MANIFEST | 1 +
+ test/shaping/tests/MANIFEST | 1 +
+ test/shaping/tests/fuzzed.tests | 1 +
+ 5 files changed, 4 insertions(+)
+
+commit f396fbb000dc1c8acddbf6a16e193b328c5e551e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 9 12:25:55 2015 -0400
+
+ Fix return value of sanitize when subformat is not readable
+
+ This is a fix on top of the previous issue fixed in
+ c917965b9e6fe2b21ed6c51559673288fa3af4b7.
+
+ This was caught by "libFuzzer" testing.
+
+ src/hb-open-type-private.hh | 2 ++
+ src/hb-ot-layout-gpos-table.hh | 15 +++++++--------
+ src/hb-ot-layout-gsub-table.hh | 13 ++++++-------
+ src/hb-ot-layout-gsubgpos-private.hh | 8 ++++----
+ 4 files changed, 19 insertions(+), 19 deletions(-)
+
+commit 77a1a2bc18e7b04d4e352a8777ccce345b2f8659
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 9 12:20:58 2015 -0400
+
+ Add hb_dispatch_context_t
+
+ src/hb-open-type-private.hh | 26 ++++++++++++++++++++++----
+ src/hb-ot-layout-gsubgpos-private.hh | 36
+ ++++++++++++------------------------
+ src/hb-ot-layout.cc | 8 +++-----
+ 3 files changed, 37 insertions(+), 33 deletions(-)
+
+commit 3e905e396bcd745bda88e751998a76556c5cb8c6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 8 12:51:02 2015 -0400
+
+ Add hb_font_set_parent()
+
+ No reason to not have it. Makes life easier later.
+ We (hb-ft, hb-ot-font, etc) can use this API to inject new
+ parent into a font...
+
+ src/hb-font.cc | 26 ++++++++++++++++++++++++++
+ src/hb-font.h | 4 ++++
+ test/api/test-font.c | 12 ++++++++++++
+ 3 files changed, 42 insertions(+)
+
+commit edeb3dabf4a589d67c3f1da7ba43a74e4d3a9afd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 8 12:47:15 2015 -0400
+
+ [ft] Add version for new API
+
+ src/hb-ft.cc | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+commit 2a9627c5641cd000e2adff0e42a0dc687b53ec70
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 7 17:33:20 2015 -0400
+
+ [ft] API: Add hb_font_[sg]et_load_flags() API
+
+ This changes the default load_flags of fonts created using
+ hb_ft_font_create() from NO_HINTING to DEFAULT. Hope that doesn't
+ break too much client code.
+
+ Code calling hb_ft_font_set_funcs() is unaffected.
+
+ src/hb-ft.cc | 163
+ +++++++++++++++++++++++++++++++++++++++--------------------
+ src/hb-ft.h | 13 +++--
+ 2 files changed, 118 insertions(+), 58 deletions(-)
+
+commit 3224a594dcf2164b5585b4ccba34f244af3f61b9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 7 17:33:02 2015 -0400
+
+ Minor
+
+ src/hb-ot-font.cc | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+commit 52b418555b62a3b25399f202c1fa72ab7288c224
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Oct 3 13:20:55 2015 +0100
+
+ Allow compiling with custom allocators
+
+ User can define hb_malloc_impl, etc, to name of custom allocator
+ functions
+ that have the same signature as malloc.
+
+ src/hb-private.hh | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+commit 88da7bba9fa4665b33f5bfcd45add7443097eaf3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 2 14:38:20 2015 +0100
+
+ Default font scale to face upem
+
+ Makes for a better default and avoids nasty inheritance issues.
+ See mailing list thread "Default hb_font_t scale".
+
+ src/hb-font.cc | 2 ++
+ test/api/test-font.c | 13 ++++++++-----
+ 2 files changed, 10 insertions(+), 5 deletions(-)
+
+commit 1866e17114b41d565eb066e7d9393c2ff3e0a12b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 2 14:21:29 2015 +0100
+
+ Make hb_font_create_sub_font() NOT make parent immutable
+
+ We don't rely on that. However, whenever hb_font_make_immutable()
+ is called, it makes its parenting chain immutable.
+
+ src/hb-font.cc | 4 +++-
+ test/api/test-font.c | 21 +++++++++++++++------
+ 2 files changed, 18 insertions(+), 7 deletions(-)
+
+commit 980e25cad2e58c31f5361862b9223d94ec47fc7a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 2 08:21:12 2015 +0100
+
+ Fix hb-ot-shape-normalize with empty buffer
+
+ Part of https://github.com/behdad/harfbuzz/issues/136
+
+ src/hb-ot-shape-normalize.cc | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit a5efaac4ff61b587f228830b265b39fe8e5e4e47
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 2 08:02:29 2015 +0100
+
+ Replace a couple of malloc()s with calloc()
+
+ src/hb-face.cc | 2 +-
+ src/hb-shape-plan.cc | 2 +-
+ src/hb-shaper.cc | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 26ba4d1e1fb8949632fe08e6a7600badfba4f142
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 2 07:25:52 2015 +0100
+
+ Fix segfault with empty buffer in hb_shape_plan_execute()
+
+ Move the empty-buffer check from hb_shape_full() to
+ hb_shape_plan_execute().
+
+ Reported by Simon Cozens.
+
+ src/hb-shape-plan.cc | 9 +++++++--
+ src/hb-shape.cc | 5 -----
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
commit 432ffc47a46d41bea17d839d0d3980e654c6e638
Author: Behdad Esfahbod <behdad@behdad.org>
Date: Wed Sep 30 22:51:16 2015 +0100
@@ -677,6 +2539,22 @@ Date: Mon Aug 17 16:03:28 2015 +0200
src/hb-ot-shape-complex-use.cc | 8 --------
1 file changed, 8 deletions(-)
+commit 23237b0279a04407addf33f599c45faa60f002ca
+Author: ThePhD <phdofthehouse@gmail.com>
+Date: Fri Aug 14 01:19:08 2015 -0400
+
+ Last apparent boolean fix!
+
+ src/hb-ot-shape-complex-use.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 5c99cf93d6242803bddcac2ca8300fdec7e0f8a7
+Merge: 8ad89f0 539a610
+Author: ThePhD <phdofthehouse@gmail.com>
+Date: Fri Aug 14 01:02:00 2015 -0400
+
+ Merge branch 'master' into vc++-fixes
+
commit 539a610e2e72375e598ab29fd390ed9ec93816d5
Author: Behdad Esfahbod <behdad@behdad.org>
Date: Tue Aug 11 12:58:49 2015 +0200
@@ -1638,6 +3516,44 @@ Date: Sun Jul 5 22:43:17 2015 +0100
src/hb-warning.cc | 10 ----------
2 files changed, 15 deletions(-)
+commit 8ad89f057d737ccbc6f411e9ebcf11b8130a50bb
+Author: ThePhD <phdofthehouse@gmail.com>
+Date: Tue Jun 23 09:09:24 2015 -0400
+
+ Spelling words is not my strong point.
+
+ src/hb-private.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit e0a828ecbd708757d67977f7e92a6f4c1b0b92fd
+Author: ThePhD <phdofthehouse@gmail.com>
+Date: Tue Jun 23 09:07:17 2015 -0400
+
+ Back to using regular `strdup`, with an `hb-private.hh` fix that
+ special-cases VC++'s
+ definition and usage of the words
+
+ src/hb-common.cc | 2 +-
+ src/hb-private.hh | 3 +++
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+commit 8e545d59610211261e684c10158b9e5df6fae24d
+Author: ThePhD <phdofthehouse@gmail.com>
+Date: Mon Jun 22 22:29:04 2015 -0400
+
+ Fix all VC++ warnings and errors in the current commit's builds.
+
+ src/hb-common.cc | 4 ++--
+ src/hb-fallback-shape.cc | 2 +-
+ src/hb-ot-layout.cc | 2 +-
+ src/hb-ot-map.cc | 2 +-
+ src/hb-ot-shape-complex-hangul.cc | 2 +-
+ src/hb-ot-shape-complex-hebrew.cc | 2 +-
+ src/hb-ot-shape-complex-indic.cc | 4 ++--
+ src/hb-ot-shape-normalize.cc | 6 +++---
+ src/hb-ot-shape.cc | 2 +-
+ 9 files changed, 13 insertions(+), 13 deletions(-)
+
commit 5f13bbd9d4b0970851626e2ce3cf4ecb3cfde801
Author: Behdad Esfahbod <behdad@behdad.org>
Date: Fri Jun 19 13:31:49 2015 -0700
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/Makefile.am b/Build/source/libs/harfbuzz/harfbuzz-src/Makefile.am
index 47aeb97768e..3c1e7a27cee 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/Makefile.am
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/Makefile.am
@@ -11,6 +11,7 @@ EXTRA_DIST = \
harfbuzz.doap \
Android.mk \
README.python \
+ BUILD.md \
$(NULL)
MAINTAINERCLEANFILES = \
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/NEWS b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
index 24db6661e95..3e8b1002570 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/NEWS
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
@@ -1,3 +1,84 @@
+Overview of changes leading to 1.1.2
+Wednesday, November 26, 2015
+====================================
+
+- Fix badly-broken fallback shaper that affected terminology.
+ https://github.com/behdad/harfbuzz/issues/187
+- Fix y_scaling in Graphite shaper.
+- API changes:
+ * An unset glyph_h_origin() function in font-funcs now (sensibly)
+ implies horizontal origin at 0,0. Ie, the nil callback returns
+ true instead of false. As such, implementations that have a
+ glyph_h_origin() that simply returns true, can remove that function
+ with HarfBuzz >= 1.1.2. This results in a tiny speedup.
+
+
+Overview of changes leading to 1.1.1
+Wednesday, November 24, 2015
+====================================
+
+- Build fixes, specially for hb-coretext.
+
+
+Overview of changes leading to 1.1.0
+Wednesday, November 18, 2015
+====================================
+
+- Implement 'stch' stretch feature for Syriac Abbreviation Mark.
+ https://github.com/behdad/harfbuzz/issues/141
+- Disable use of decompose_compatibility() callback.
+- Implement "shaping" of various Unicode space characters, even
+ if the font does not support them.
+ https://github.com/behdad/harfbuzz/issues/153
+- If font does not support U+2011 NO-BREAK HYPHEN, fallback to
+ U+2010 HYPHEN.
+- Changes resulting from libFuzzer continuous fuzzing:
+ * Reject font tables that need more than 8 edits,
+ * Bound buffer growth during shaping to 32x,
+ * Fix assertions and other issues at OOM / buffer max-growth.
+- Misc fixes and optimizations.
+- API changes:
+ * All fonts created with hb_font_create() now inherit from
+ (ie. have parent) hb_font_get_empty().
+
+
+Overview of changes leading to 1.0.6
+Thursday, October 15, 2015
+====================================
+
+- Reduce max nesting level in OT lookups from 8 to 6.
+ Should not affect any real font as far as I know.
+- Fix memory access issue in ot-font.
+- Revert default load-flags of fonts created using hb_ft_font_create()
+ back to FT_LOAD_DEFAULT|FT_LOAD_NO_HINTING. This was changed in
+ last release (1.0.5), but caused major issues, so revert.
+ https://github.com/behdad/harfbuzz/issues/143
+
+
+Overview of changes leading to 1.0.5
+Tuesday, October 13, 2015
+====================================
+
+- Fix multiple memory access bugs discovered using libFuzzer.
+ https://github.com/behdad/harfbuzz/issues/139
+ Everyone should upgrade to this version as soon as possible.
+ We now have continuous fuzzing set up, to avoid issues like
+ these creeping in again.
+- Misc fixes.
+
+- New API:
+ * hb_font_set_parent().
+ * hb_ft_font_[sg]et_load_flags()
+ The default flags for fonts created using hb_ft_font_create()
+ has changed to default to FT_LOAD_DEFAULT now. Previously it
+ was defaulting to FT_LOAD_DFEAULT|FT_LOAD_NO_HINTING.
+
+- API changes:
+ * Fonts now default to units-per-EM as their scale, instead of 0.
+ * hb_font_create_sub_font() does NOT make parent font immutable
+ anymore. hb_font_make_immutable() does.
+
+
Overview of changes leading to 1.0.4
Wednesday, September 30, 2015
====================================
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/README b/Build/source/libs/harfbuzz/harfbuzz-src/README
index dea10688f3f..d34bc74f997 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/README
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/README
@@ -1,6 +1,5 @@
[![Build Status](https://travis-ci.org/behdad/harfbuzz.svg)](https://travis-ci.org/behdad/harfbuzz)
[![Coverage Status](https://img.shields.io/coveralls/behdad/harfbuzz.svg)](https://coveralls.io/r/behdad/harfbuzz)
-[![Coverity Scan](https://img.shields.io/coverity/scan/5450.svg)](https://scan.coverity.com/projects/5450)
This is HarfBuzz, a text shaping library.
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/README.python b/Build/source/libs/harfbuzz/harfbuzz-src/README.python
index cd312649dbc..cd312649dbc 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/README.python
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/README.python
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/THANKS b/Build/source/libs/harfbuzz/harfbuzz-src/THANKS
index 940cfde5c39..940cfde5c39 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/THANKS
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/THANKS
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/TODO b/Build/source/libs/harfbuzz/harfbuzz-src/TODO
index e1aa39c4c01..e1aa39c4c01 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/TODO
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/TODO
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/autogen.sh b/Build/source/libs/harfbuzz/harfbuzz-src/autogen.sh
index ff1b0c0c99b..ff1b0c0c99b 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/autogen.sh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/autogen.sh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/config.h.in b/Build/source/libs/harfbuzz/harfbuzz-src/config.h.in
index 8937bd644d6..8937bd644d6 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/config.h.in
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/config.h.in
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/configure.ac b/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
index 15decdc9ff0..044a1d65968 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/configure.ac
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
@@ -1,6 +1,6 @@
AC_PREREQ([2.64])
AC_INIT([HarfBuzz],
- [1.0.4],
+ [1.1.2],
[http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz],
[harfbuzz],
[http://harfbuzz.org/])
@@ -440,6 +440,7 @@ src/hb-ucdn/Makefile
util/Makefile
test/Makefile
test/api/Makefile
+test/fuzzing/Makefile
test/shaping/Makefile
docs/Makefile
docs/version.xml
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/gtk-doc.make b/Build/source/libs/harfbuzz/harfbuzz-src/gtk-doc.make
index e7916563d75..e7916563d75 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/gtk-doc.make
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/gtk-doc.make
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/harfbuzz.doap b/Build/source/libs/harfbuzz/harfbuzz-src/harfbuzz.doap
index d2896ebefa8..d2896ebefa8 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/harfbuzz.doap
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/harfbuzz.doap
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/Makefile.am b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am
index 5699782529c..ec55656263b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/Makefile.am
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am
@@ -15,6 +15,7 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
# Convenience targets:
lib: $(BUILT_SOURCES) libharfbuzz.la
+fuzzing: $(BUILT_SOURCES) libharfbuzz-fuzzing.la
lib_LTLIBRARIES = libharfbuzz.la
@@ -219,6 +220,22 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = harfbuzz.pc
EXTRA_DIST += harfbuzz.pc.in
+FUZZING_CPPFLAGS= \
+ -DHB_MAX_NESTING_LEVEL=3 \
+ -DHB_SANITIZE_MAX_EDITS=3 \
+ -DHB_BUFFER_MAX_EXPANSION_FACTOR=3 \
+ -DHB_BUFFER_MAX_LEN_MIN=8 \
+ -DHB_BUFFER_MAX_LEN_DEFAULT=128 \
+ $(NULL)
+EXTRA_LTLIBRARIES = libharfbuzz-fuzzing.la
+libharfbuzz_fuzzing_la_LINK = $(libharfbuzz_la_LINK)
+libharfbuzz_fuzzing_la_SOURCES = $(libharfbuzz_la_SOURCES)
+libharfbuzz_fuzzing_la_CPPFLAGS = $(libharfbuzz_la_CPPFLAGS) $(FUZZING_CPPFLAGS)
+libharfbuzz_fuzzing_la_LDFLAGS = $(libharfbuzz_la_LDFLAGS)
+libharfbuzz_fuzzing_la_LIBADD = $(libharfbuzz_la_LIBADD)
+EXTRA_libharfbuzz_fuzzing_la_DEPENDENCIES = $(EXTRA_libharfbuzz_la_DEPENDENCIES)
+CLEANFILES += libharfbuzz-fuzzing.la
+
if HAVE_ICU
lib_LTLIBRARIES += libharfbuzz-icu.la
libharfbuzz_icu_la_SOURCES = hb-icu.cc
@@ -402,6 +419,7 @@ HarfBuzz_0_0_gir_CFLAGS = \
-DHB_OT_H_IN \
-DHB_GOBJECT_H \
-DHB_GOBJECT_H_IN \
+ -DHB_EXTERN= \
$(NULL)
HarfBuzz_0_0_gir_LIBS = \
libharfbuzz.la \
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-c-linkage-decls.sh b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-c-linkage-decls.sh
index b10310f5384..b10310f5384 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-c-linkage-decls.sh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-c-linkage-decls.sh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-defs.sh b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-defs.sh
index 65a24670e48..65a24670e48 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-defs.sh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-defs.sh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-header-guards.sh b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-header-guards.sh
index 9a3302c7f87..9a3302c7f87 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-header-guards.sh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-header-guards.sh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-includes.sh b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-includes.sh
index 902f2357e2a..902f2357e2a 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-includes.sh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-includes.sh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-libstdc++.sh b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-libstdc++.sh
index b541828bcd9..b541828bcd9 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-libstdc++.sh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-libstdc++.sh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-static-inits.sh b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-static-inits.sh
index 1446fa73405..1446fa73405 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-static-inits.sh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-static-inits.sh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-symbols.sh b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-symbols.sh
index b2bf43fcea5..b2bf43fcea5 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/check-symbols.sh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-symbols.sh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/gen-arabic-table.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-arabic-table.py
index 308435f991e..308435f991e 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/gen-arabic-table.py
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-arabic-table.py
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/gen-indic-table.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py
index f5716bda789..f5716bda789 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/gen-indic-table.py
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/gen-use-table.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
index be04e4ba4c5..be04e4ba4c5 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/gen-use-table.py
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/harfbuzz-gobject.pc.in b/Build/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz-gobject.pc.in
index 70083601901..70083601901 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/harfbuzz-gobject.pc.in
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz-gobject.pc.in
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/harfbuzz-icu.pc.in b/Build/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz-icu.pc.in
index 949869a3563..949869a3563 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/harfbuzz-icu.pc.in
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz-icu.pc.in
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/harfbuzz.pc.in b/Build/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz.pc.in
index b3e124aa8c3..b3e124aa8c3 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/harfbuzz.pc.in
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz.pc.in
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-atomic-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic-private.hh
index 8179571ad2d..8179571ad2d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-atomic-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-blob.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.cc
index a6870dc06e4..a6870dc06e4 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-blob.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-blob.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.h
index b2419abfd2a..ef3fc98c05d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-blob.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.h
@@ -64,7 +64,7 @@ typedef enum {
typedef struct hb_blob_t hb_blob_t;
-hb_blob_t *
+HB_EXTERN hb_blob_t *
hb_blob_create (const char *data,
unsigned int length,
hb_memory_mode_t mode,
@@ -77,21 +77,21 @@ hb_blob_create (const char *data,
* modify the parent data as that data may be
* shared among multiple sub-blobs.
*/
-hb_blob_t *
+HB_EXTERN hb_blob_t *
hb_blob_create_sub_blob (hb_blob_t *parent,
unsigned int offset,
unsigned int length);
-hb_blob_t *
+HB_EXTERN hb_blob_t *
hb_blob_get_empty (void);
-hb_blob_t *
+HB_EXTERN hb_blob_t *
hb_blob_reference (hb_blob_t *blob);
-void
+HB_EXTERN void
hb_blob_destroy (hb_blob_t *blob);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_blob_set_user_data (hb_blob_t *blob,
hb_user_data_key_t *key,
void * data,
@@ -99,25 +99,25 @@ hb_blob_set_user_data (hb_blob_t *blob,
hb_bool_t replace);
-void *
+HB_EXTERN void *
hb_blob_get_user_data (hb_blob_t *blob,
hb_user_data_key_t *key);
-void
+HB_EXTERN void
hb_blob_make_immutable (hb_blob_t *blob);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_blob_is_immutable (hb_blob_t *blob);
-unsigned int
+HB_EXTERN unsigned int
hb_blob_get_length (hb_blob_t *blob);
-const char *
+HB_EXTERN const char *
hb_blob_get_data (hb_blob_t *blob, unsigned int *length);
-char *
+HB_EXTERN char *
hb_blob_get_data_writable (hb_blob_t *blob, unsigned int *length);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer-deserialize-json.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.hh
index 3f626bda40d..3f626bda40d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer-deserialize-json.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer-deserialize-json.rl b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.rl
index 91b350f5ac0..91b350f5ac0 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer-deserialize-json.rl
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.rl
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer-deserialize-text.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.hh
index d2d8daae7ed..d2d8daae7ed 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer-deserialize-text.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer-deserialize-text.rl b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.rl
index 8a682f7378a..8a682f7378a 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer-deserialize-text.rl
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.rl
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-private.hh
index 7fed7386b0e..111078c240c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-private.hh
@@ -35,9 +35,37 @@
#include "hb-unicode-private.hh"
+#ifndef HB_BUFFER_MAX_EXPANSION_FACTOR
+#define HB_BUFFER_MAX_EXPANSION_FACTOR 32
+#endif
+#ifndef HB_BUFFER_MAX_LEN_MIN
+#define HB_BUFFER_MAX_LEN_MIN 8192
+#endif
+#ifndef HB_BUFFER_MAX_LEN_DEFAULT
+#define HB_BUFFER_MAX_LEN_DEFAULT 0x3FFFFFFF /* Shaping more than a billion chars? Let us know! */
+#endif
+
ASSERT_STATIC (sizeof (hb_glyph_info_t) == 20);
ASSERT_STATIC (sizeof (hb_glyph_info_t) == sizeof (hb_glyph_position_t));
+HB_MARK_AS_FLAG_T (hb_buffer_flags_t);
+HB_MARK_AS_FLAG_T (hb_buffer_serialize_flags_t);
+
+enum hb_buffer_scratch_flags_t {
+ HB_BUFFER_SCRATCH_FLAG_DEFAULT = 0x00000000u,
+ HB_BUFFER_SCRATCH_FLAG_HAS_NON_ASCII = 0x00000001u,
+ HB_BUFFER_SCRATCH_FLAG_HAS_DEFAULT_IGNORABLES = 0x00000002u,
+ HB_BUFFER_SCRATCH_FLAG_HAS_SPACE_FALLBACK = 0x00000004u,
+ HB_BUFFER_SCRATCH_FLAG_HAS_GPOS_CURSIVE = 0x00000008u,
+ HB_BUFFER_SCRATCH_FLAG_HAS_GPOS_ATTACHMENT = 0x00000010u,
+ /* Reserved for complex shapers' internal use. */
+ HB_BUFFER_SCRATCH_FLAG_COMPLEX0 = 0x01000000u,
+ HB_BUFFER_SCRATCH_FLAG_COMPLEX1 = 0x02000000u,
+ HB_BUFFER_SCRATCH_FLAG_COMPLEX2 = 0x04000000u,
+ HB_BUFFER_SCRATCH_FLAG_COMPLEX3 = 0x08000000u,
+};
+HB_MARK_AS_FLAG_T (hb_buffer_scratch_flags_t);
+
/*
* hb_buffer_t
@@ -52,6 +80,8 @@ struct hb_buffer_t {
hb_buffer_flags_t flags; /* BOT / EOT / etc. */
hb_buffer_cluster_level_t cluster_level;
hb_codepoint_t replacement; /* U+FFFD or something else. */
+ hb_buffer_scratch_flags_t scratch_flags; /* Have space-flallback, etc. */
+ unsigned int max_len; /* Maximum allowed len. */
/* Buffer contents */
hb_buffer_content_type_t content_type;
@@ -76,8 +106,8 @@ struct hb_buffer_t {
inline hb_glyph_position_t &cur_pos (unsigned int i = 0) { return pos[idx + i]; }
inline hb_glyph_position_t cur_pos (unsigned int i = 0) const { return pos[idx + i]; }
- inline hb_glyph_info_t &prev (void) { return out_info[out_len - 1]; }
- inline hb_glyph_info_t prev (void) const { return info[out_len - 1]; }
+ inline hb_glyph_info_t &prev (void) { return out_info[out_len ? out_len - 1 : 0]; }
+ inline hb_glyph_info_t prev (void) const { return out_info[out_len ? out_len - 1 : 0]; }
inline bool has_separate_output (void) const { return info != out_info; }
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer-serialize.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc
index 7839cbc3f06..7839cbc3f06 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer-serialize.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc
index 50710dd23e5..c271086cde4 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc
@@ -37,6 +37,8 @@
/**
+ * hb_segment_properties_equal:
+ *
* Since: 0.9.7
**/
hb_bool_t
@@ -52,6 +54,8 @@ hb_segment_properties_equal (const hb_segment_properties_t *a,
}
/**
+ * hb_segment_properties_hash:
+ *
* Since: 0.9.7
**/
unsigned int
@@ -91,6 +95,11 @@ hb_buffer_t::enlarge (unsigned int size)
{
if (unlikely (in_error))
return false;
+ if (unlikely (size > max_len))
+ {
+ in_error = true;
+ return false;
+ }
unsigned int new_allocated = allocated;
hb_glyph_position_t *new_pos = NULL;
@@ -198,6 +207,7 @@ hb_buffer_t::clear (void)
hb_segment_properties_t default_props = HB_SEGMENT_PROPERTIES_DEFAULT;
props = default_props;
+ scratch_flags = HB_BUFFER_SCRATCH_FLAG_DEFAULT;
content_type = HB_BUFFER_CONTENT_TYPE_INVALID;
in_error = false;
@@ -714,6 +724,8 @@ hb_buffer_create (void)
if (!(buffer = hb_object_create<hb_buffer_t> ()))
return hb_buffer_get_empty ();
+ buffer->max_len = HB_BUFFER_MAX_LEN_DEFAULT;
+
buffer->reset ();
return buffer;
@@ -738,6 +750,8 @@ hb_buffer_get_empty (void)
HB_BUFFER_FLAG_DEFAULT,
HB_BUFFER_CLUSTER_LEVEL_DEFAULT,
HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT,
+ HB_BUFFER_SCRATCH_FLAG_DEFAULT,
+ HB_BUFFER_MAX_LEN_DEFAULT,
HB_BUFFER_CONTENT_TYPE_INVALID,
HB_SEGMENT_PROPERTIES_DEFAULT,
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.h
index bb89dc3de74..d3a2512d800 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-buffer.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.h
@@ -77,11 +77,11 @@ typedef struct hb_segment_properties_t {
NULL, \
NULL}
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_segment_properties_equal (const hb_segment_properties_t *a,
const hb_segment_properties_t *b);
-unsigned int
+HB_EXTERN unsigned int
hb_segment_properties_hash (const hb_segment_properties_t *p);
@@ -92,26 +92,26 @@ hb_segment_properties_hash (const hb_segment_properties_t *p);
typedef struct hb_buffer_t hb_buffer_t;
-hb_buffer_t *
+HB_EXTERN hb_buffer_t *
hb_buffer_create (void);
-hb_buffer_t *
+HB_EXTERN hb_buffer_t *
hb_buffer_get_empty (void);
-hb_buffer_t *
+HB_EXTERN hb_buffer_t *
hb_buffer_reference (hb_buffer_t *buffer);
-void
+HB_EXTERN void
hb_buffer_destroy (hb_buffer_t *buffer);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_buffer_set_user_data (hb_buffer_t *buffer,
hb_user_data_key_t *key,
void * data,
hb_destroy_func_t destroy,
hb_bool_t replace);
-void *
+HB_EXTERN void *
hb_buffer_get_user_data (hb_buffer_t *buffer,
hb_user_data_key_t *key);
@@ -122,52 +122,52 @@ typedef enum {
HB_BUFFER_CONTENT_TYPE_GLYPHS
} hb_buffer_content_type_t;
-void
+HB_EXTERN void
hb_buffer_set_content_type (hb_buffer_t *buffer,
hb_buffer_content_type_t content_type);
-hb_buffer_content_type_t
+HB_EXTERN hb_buffer_content_type_t
hb_buffer_get_content_type (hb_buffer_t *buffer);
-void
+HB_EXTERN void
hb_buffer_set_unicode_funcs (hb_buffer_t *buffer,
hb_unicode_funcs_t *unicode_funcs);
-hb_unicode_funcs_t *
+HB_EXTERN hb_unicode_funcs_t *
hb_buffer_get_unicode_funcs (hb_buffer_t *buffer);
-void
+HB_EXTERN void
hb_buffer_set_direction (hb_buffer_t *buffer,
hb_direction_t direction);
-hb_direction_t
+HB_EXTERN hb_direction_t
hb_buffer_get_direction (hb_buffer_t *buffer);
-void
+HB_EXTERN void
hb_buffer_set_script (hb_buffer_t *buffer,
hb_script_t script);
-hb_script_t
+HB_EXTERN hb_script_t
hb_buffer_get_script (hb_buffer_t *buffer);
-void
+HB_EXTERN void
hb_buffer_set_language (hb_buffer_t *buffer,
hb_language_t language);
-hb_language_t
+HB_EXTERN hb_language_t
hb_buffer_get_language (hb_buffer_t *buffer);
-void
+HB_EXTERN void
hb_buffer_set_segment_properties (hb_buffer_t *buffer,
const hb_segment_properties_t *props);
-void
+HB_EXTERN void
hb_buffer_get_segment_properties (hb_buffer_t *buffer,
hb_segment_properties_t *props);
-void
+HB_EXTERN void
hb_buffer_guess_segment_properties (hb_buffer_t *buffer);
@@ -181,11 +181,11 @@ typedef enum { /*< flags >*/
HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES = 0x00000004u
} hb_buffer_flags_t;
-void
+HB_EXTERN void
hb_buffer_set_flags (hb_buffer_t *buffer,
hb_buffer_flags_t flags);
-hb_buffer_flags_t
+HB_EXTERN hb_buffer_flags_t
hb_buffer_get_flags (hb_buffer_t *buffer);
/*
@@ -198,77 +198,77 @@ typedef enum {
HB_BUFFER_CLUSTER_LEVEL_DEFAULT = HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES
} hb_buffer_cluster_level_t;
-void
+HB_EXTERN void
hb_buffer_set_cluster_level (hb_buffer_t *buffer,
hb_buffer_cluster_level_t cluster_level);
-hb_buffer_cluster_level_t
+HB_EXTERN hb_buffer_cluster_level_t
hb_buffer_get_cluster_level (hb_buffer_t *buffer);
#define HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT 0xFFFDu
/* Sets codepoint used to replace invalid UTF-8/16/32 entries.
* Default is 0xFFFDu. */
-void
+HB_EXTERN void
hb_buffer_set_replacement_codepoint (hb_buffer_t *buffer,
hb_codepoint_t replacement);
-hb_codepoint_t
+HB_EXTERN hb_codepoint_t
hb_buffer_get_replacement_codepoint (hb_buffer_t *buffer);
/* Resets the buffer. Afterwards it's as if it was just created,
* except that it has a larger buffer allocated perhaps... */
-void
+HB_EXTERN void
hb_buffer_reset (hb_buffer_t *buffer);
/* Like reset, but does NOT clear unicode_funcs and replacement_codepoint. */
-void
+HB_EXTERN void
hb_buffer_clear_contents (hb_buffer_t *buffer);
/* Returns false if allocation failed */
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_buffer_pre_allocate (hb_buffer_t *buffer,
unsigned int size);
/* Returns false if allocation has failed before */
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_buffer_allocation_successful (hb_buffer_t *buffer);
-void
+HB_EXTERN void
hb_buffer_reverse (hb_buffer_t *buffer);
-void
+HB_EXTERN void
hb_buffer_reverse_range (hb_buffer_t *buffer,
unsigned int start, unsigned int end);
-void
+HB_EXTERN void
hb_buffer_reverse_clusters (hb_buffer_t *buffer);
/* Filling the buffer in */
-void
+HB_EXTERN void
hb_buffer_add (hb_buffer_t *buffer,
hb_codepoint_t codepoint,
unsigned int cluster);
-void
+HB_EXTERN void
hb_buffer_add_utf8 (hb_buffer_t *buffer,
const char *text,
int text_length,
unsigned int item_offset,
int item_length);
-void
+HB_EXTERN void
hb_buffer_add_utf16 (hb_buffer_t *buffer,
const uint16_t *text,
int text_length,
unsigned int item_offset,
int item_length);
-void
+HB_EXTERN void
hb_buffer_add_utf32 (hb_buffer_t *buffer,
const uint32_t *text,
int text_length,
@@ -276,7 +276,7 @@ hb_buffer_add_utf32 (hb_buffer_t *buffer,
int item_length);
/* Allows only access to first 256 Unicode codepoints. */
-void
+HB_EXTERN void
hb_buffer_add_latin1 (hb_buffer_t *buffer,
const uint8_t *text,
int text_length,
@@ -284,7 +284,7 @@ hb_buffer_add_latin1 (hb_buffer_t *buffer,
int item_length);
/* Like add_utf32 but does NOT check for invalid Unicode codepoints. */
-void
+HB_EXTERN void
hb_buffer_add_codepoints (hb_buffer_t *buffer,
const hb_codepoint_t *text,
int text_length,
@@ -293,23 +293,23 @@ hb_buffer_add_codepoints (hb_buffer_t *buffer,
/* Clears any new items added at the end */
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_buffer_set_length (hb_buffer_t *buffer,
unsigned int length);
/* Return value valid as long as buffer not modified */
-unsigned int
+HB_EXTERN unsigned int
hb_buffer_get_length (hb_buffer_t *buffer);
/* Getting glyphs out of the buffer */
/* Return value valid as long as buffer not modified */
-hb_glyph_info_t *
+HB_EXTERN hb_glyph_info_t *
hb_buffer_get_glyph_infos (hb_buffer_t *buffer,
unsigned int *length);
/* Return value valid as long as buffer not modified */
-hb_glyph_position_t *
+HB_EXTERN hb_glyph_position_t *
hb_buffer_get_glyph_positions (hb_buffer_t *buffer,
unsigned int *length);
@@ -317,7 +317,7 @@ hb_buffer_get_glyph_positions (hb_buffer_t *buffer,
/* Reorders a glyph buffer to have canonical in-cluster glyph order / position.
* The resulting clusters should behave identical to pre-reordering clusters.
* NOTE: This has nothing to do with Unicode normalization. */
-void
+HB_EXTERN void
hb_buffer_normalize_glyphs (hb_buffer_t *buffer);
@@ -343,17 +343,17 @@ typedef enum {
} hb_buffer_serialize_format_t;
/* len=-1 means str is NUL-terminated. */
-hb_buffer_serialize_format_t
+HB_EXTERN hb_buffer_serialize_format_t
hb_buffer_serialize_format_from_string (const char *str, int len);
-const char *
+HB_EXTERN const char *
hb_buffer_serialize_format_to_string (hb_buffer_serialize_format_t format);
-const char **
+HB_EXTERN const char **
hb_buffer_serialize_list_formats (void);
/* Returns number of items, starting at start, that were serialized. */
-unsigned int
+HB_EXTERN unsigned int
hb_buffer_serialize_glyphs (hb_buffer_t *buffer,
unsigned int start,
unsigned int end,
@@ -364,7 +364,7 @@ hb_buffer_serialize_glyphs (hb_buffer_t *buffer,
hb_buffer_serialize_format_t format,
hb_buffer_serialize_flags_t flags);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_buffer_deserialize_glyphs (hb_buffer_t *buffer,
const char *buf,
int buf_len, /* -1 means nul-terminated */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-cache-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-cache-private.hh
index 19b70b7e395..19b70b7e395 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-cache-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-cache-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-common.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc
index e67059d10be..710b36e554d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-common.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc
@@ -521,7 +521,7 @@ hb_user_data_array_t::set (hb_user_data_key_t *key,
}
}
hb_user_data_item_t item = {key, data, destroy};
- bool ret = !!items.replace_or_insert (item, lock, replace);
+ bool ret = !!items.replace_or_insert (item, lock, (bool) replace);
return ret;
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-common.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.h
index c291dbbe947..af17d780c27 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-common.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.h
@@ -98,11 +98,11 @@ typedef uint32_t hb_tag_t;
#define HB_TAG_MAX_SIGNED HB_TAG(0x7f,0xff,0xff,0xff)
/* len=-1 means str is NUL-terminated. */
-hb_tag_t
+HB_EXTERN hb_tag_t
hb_tag_from_string (const char *str, int len);
/* buf should have 4 bytes. */
-void
+HB_EXTERN void
hb_tag_to_string (hb_tag_t tag, char *buf);
@@ -117,10 +117,10 @@ typedef enum {
} hb_direction_t;
/* len=-1 means str is NUL-terminated */
-hb_direction_t
+HB_EXTERN hb_direction_t
hb_direction_from_string (const char *str, int len);
-const char *
+HB_EXTERN const char *
hb_direction_to_string (hb_direction_t direction);
#define HB_DIRECTION_IS_VALID(dir) ((((unsigned int) (dir)) & ~3U) == 4)
@@ -137,15 +137,15 @@ hb_direction_to_string (hb_direction_t direction);
typedef const struct hb_language_impl_t *hb_language_t;
/* len=-1 means str is NUL-terminated */
-hb_language_t
+HB_EXTERN hb_language_t
hb_language_from_string (const char *str, int len);
-const char *
+HB_EXTERN const char *
hb_language_to_string (hb_language_t language);
#define HB_LANGUAGE_INVALID ((hb_language_t) NULL)
-hb_language_t
+HB_EXTERN hb_language_t
hb_language_get_default (void);
@@ -324,18 +324,18 @@ typedef enum
/* Script functions */
-hb_script_t
+HB_EXTERN hb_script_t
hb_script_from_iso15924_tag (hb_tag_t tag);
/* sugar for tag_from_string() then script_from_iso15924_tag */
/* len=-1 means s is NUL-terminated */
-hb_script_t
+HB_EXTERN hb_script_t
hb_script_from_string (const char *s, int len);
-hb_tag_t
+HB_EXTERN hb_tag_t
hb_script_to_iso15924_tag (hb_script_t script);
-hb_direction_t
+HB_EXTERN hb_direction_t
hb_script_get_horizontal_direction (hb_script_t script);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-coretext.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc
index 13ba5d94ef1..13ba5d94ef1 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-coretext.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-coretext.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.h
index 25267bc9784..82066e4e0dc 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-coretext.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.h
@@ -44,14 +44,14 @@ HB_BEGIN_DECLS
#define HB_CORETEXT_TAG_MORX HB_TAG('m','o','r','x')
-hb_face_t *
+HB_EXTERN hb_face_t *
hb_coretext_face_create (CGFontRef cg_font);
-CGFontRef
+HB_EXTERN CGFontRef
hb_coretext_face_get_cg_font (hb_face_t *face);
-CTFontRef
+HB_EXTERN CTFontRef
hb_coretext_font_get_ct_font (hb_font_t *font);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-deprecated.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-deprecated.h
index 30ae4b1caf7..30ae4b1caf7 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-deprecated.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-deprecated.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-face-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face-private.hh
index c4266fff4f0..c4266fff4f0 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-face-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-face.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc
index 7aa89fcadb5..9effc41c887 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-face.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc
@@ -113,7 +113,7 @@ _hb_face_for_data_closure_create (hb_blob_t *blob, unsigned int index)
{
hb_face_for_data_closure_t *closure;
- closure = (hb_face_for_data_closure_t *) malloc (sizeof (hb_face_for_data_closure_t));
+ closure = (hb_face_for_data_closure_t *) calloc (1, sizeof (hb_face_for_data_closure_t));
if (unlikely (!closure))
return NULL;
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-face.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.h
index f682c468de5..91237b70850 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-face.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.h
@@ -43,28 +43,28 @@ HB_BEGIN_DECLS
typedef struct hb_face_t hb_face_t;
-hb_face_t *
+HB_EXTERN hb_face_t *
hb_face_create (hb_blob_t *blob,
unsigned int index);
typedef hb_blob_t * (*hb_reference_table_func_t) (hb_face_t *face, hb_tag_t tag, void *user_data);
/* calls destroy() when not needing user_data anymore */
-hb_face_t *
+HB_EXTERN hb_face_t *
hb_face_create_for_tables (hb_reference_table_func_t reference_table_func,
void *user_data,
hb_destroy_func_t destroy);
-hb_face_t *
+HB_EXTERN hb_face_t *
hb_face_get_empty (void);
-hb_face_t *
+HB_EXTERN hb_face_t *
hb_face_reference (hb_face_t *face);
-void
+HB_EXTERN void
hb_face_destroy (hb_face_t *face);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_face_set_user_data (hb_face_t *face,
hb_user_data_key_t *key,
void * data,
@@ -72,43 +72,43 @@ hb_face_set_user_data (hb_face_t *face,
hb_bool_t replace);
-void *
+HB_EXTERN void *
hb_face_get_user_data (hb_face_t *face,
hb_user_data_key_t *key);
-void
+HB_EXTERN void
hb_face_make_immutable (hb_face_t *face);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_face_is_immutable (hb_face_t *face);
-hb_blob_t *
+HB_EXTERN hb_blob_t *
hb_face_reference_table (hb_face_t *face,
hb_tag_t tag);
-hb_blob_t *
+HB_EXTERN hb_blob_t *
hb_face_reference_blob (hb_face_t *face);
-void
+HB_EXTERN void
hb_face_set_index (hb_face_t *face,
unsigned int index);
-unsigned int
+HB_EXTERN unsigned int
hb_face_get_index (hb_face_t *face);
-void
+HB_EXTERN void
hb_face_set_upem (hb_face_t *face,
unsigned int upem);
-unsigned int
+HB_EXTERN unsigned int
hb_face_get_upem (hb_face_t *face);
-void
+HB_EXTERN void
hb_face_set_glyph_count (hb_face_t *face,
unsigned int glyph_count);
-unsigned int
+HB_EXTERN unsigned int
hb_face_get_glyph_count (hb_face_t *face);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-fallback-shape.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-fallback-shape.cc
index 9d061a9e845..b5ebfc04666 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-fallback-shape.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-fallback-shape.cc
@@ -106,7 +106,7 @@ _hb_fallback_shape (hb_shape_plan_t *shape_plan HB_UNUSED,
*/
hb_codepoint_t space;
- bool has_space = font->get_glyph (' ', 0, &space);
+ bool has_space = (bool) font->get_glyph (' ', 0, &space);
buffer->clear_positions ();
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-font-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh
index 33bbf7143a2..7255cb95d43 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-font-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh
@@ -61,14 +61,6 @@ struct hb_font_funcs_t {
hb_bool_t immutable;
- /* Don't access these directly. Call hb_font_get_*() instead. */
-
- struct {
-#define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_func_t name;
- HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_FONT_FUNC_IMPLEMENT
- } get;
-
struct {
#define HB_FONT_FUNC_IMPLEMENT(name) void *name;
HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
@@ -80,6 +72,16 @@ struct hb_font_funcs_t {
HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
#undef HB_FONT_FUNC_IMPLEMENT
} destroy;
+
+ /* Don't access these directly. Call font->get_*() instead. */
+ union get_t {
+ struct get_funcs_t {
+#define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_func_t name;
+ HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
+ } f;
+ void (*array[]) (void);
+ } get;
};
@@ -144,7 +146,21 @@ struct hb_font_t {
/* Public getters */
- inline hb_bool_t has_glyph (hb_codepoint_t unicode)
+ HB_INTERNAL bool has_func (unsigned int i);
+
+ /* has_* ... */
+#define HB_FONT_FUNC_IMPLEMENT(name) \
+ bool \
+ has_##name##_func (void) \
+ { \
+ hb_font_funcs_t *funcs = this->klass; \
+ unsigned int i = offsetof (hb_font_funcs_t::get_t::get_funcs_t, name) / sizeof (funcs->get.array[0]); \
+ return has_func (i); \
+ }
+ HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
+
+ inline bool has_glyph (hb_codepoint_t unicode)
{
hb_codepoint_t glyph;
return get_glyph (unicode, 0, &glyph);
@@ -154,85 +170,85 @@ struct hb_font_t {
hb_codepoint_t *glyph)
{
*glyph = 0;
- return klass->get.glyph (this, user_data,
- unicode, variation_selector, glyph,
- klass->user_data.glyph);
+ return klass->get.f.glyph (this, user_data,
+ unicode, variation_selector, glyph,
+ klass->user_data.glyph);
}
inline hb_position_t get_glyph_h_advance (hb_codepoint_t glyph)
{
- return klass->get.glyph_h_advance (this, user_data,
- glyph,
- klass->user_data.glyph_h_advance);
+ return klass->get.f.glyph_h_advance (this, user_data,
+ glyph,
+ klass->user_data.glyph_h_advance);
}
inline hb_position_t get_glyph_v_advance (hb_codepoint_t glyph)
{
- return klass->get.glyph_v_advance (this, user_data,
- glyph,
- klass->user_data.glyph_v_advance);
+ return klass->get.f.glyph_v_advance (this, user_data,
+ glyph,
+ klass->user_data.glyph_v_advance);
}
inline hb_bool_t get_glyph_h_origin (hb_codepoint_t glyph,
hb_position_t *x, hb_position_t *y)
{
*x = *y = 0;
- return klass->get.glyph_h_origin (this, user_data,
- glyph, x, y,
- klass->user_data.glyph_h_origin);
+ return klass->get.f.glyph_h_origin (this, user_data,
+ glyph, x, y,
+ klass->user_data.glyph_h_origin);
}
inline hb_bool_t get_glyph_v_origin (hb_codepoint_t glyph,
hb_position_t *x, hb_position_t *y)
{
*x = *y = 0;
- return klass->get.glyph_v_origin (this, user_data,
- glyph, x, y,
- klass->user_data.glyph_v_origin);
+ return klass->get.f.glyph_v_origin (this, user_data,
+ glyph, x, y,
+ klass->user_data.glyph_v_origin);
}
inline hb_position_t get_glyph_h_kerning (hb_codepoint_t left_glyph, hb_codepoint_t right_glyph)
{
- return klass->get.glyph_h_kerning (this, user_data,
- left_glyph, right_glyph,
- klass->user_data.glyph_h_kerning);
+ return klass->get.f.glyph_h_kerning (this, user_data,
+ left_glyph, right_glyph,
+ klass->user_data.glyph_h_kerning);
}
inline hb_position_t get_glyph_v_kerning (hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph)
{
- return klass->get.glyph_v_kerning (this, user_data,
- top_glyph, bottom_glyph,
- klass->user_data.glyph_v_kerning);
+ return klass->get.f.glyph_v_kerning (this, user_data,
+ top_glyph, bottom_glyph,
+ klass->user_data.glyph_v_kerning);
}
inline hb_bool_t get_glyph_extents (hb_codepoint_t glyph,
hb_glyph_extents_t *extents)
{
memset (extents, 0, sizeof (*extents));
- return klass->get.glyph_extents (this, user_data,
- glyph,
- extents,
- klass->user_data.glyph_extents);
+ return klass->get.f.glyph_extents (this, user_data,
+ glyph,
+ extents,
+ klass->user_data.glyph_extents);
}
inline hb_bool_t get_glyph_contour_point (hb_codepoint_t glyph, unsigned int point_index,
hb_position_t *x, hb_position_t *y)
{
*x = *y = 0;
- return klass->get.glyph_contour_point (this, user_data,
- glyph, point_index,
- x, y,
- klass->user_data.glyph_contour_point);
+ return klass->get.f.glyph_contour_point (this, user_data,
+ glyph, point_index,
+ x, y,
+ klass->user_data.glyph_contour_point);
}
inline hb_bool_t get_glyph_name (hb_codepoint_t glyph,
char *name, unsigned int size)
{
if (size) *name = '\0';
- return klass->get.glyph_name (this, user_data,
- glyph,
- name, size,
- klass->user_data.glyph_name);
+ return klass->get.f.glyph_name (this, user_data,
+ glyph,
+ name, size,
+ klass->user_data.glyph_name);
}
inline hb_bool_t get_glyph_from_name (const char *name, int len, /* -1 means nul-terminated */
@@ -240,10 +256,10 @@ struct hb_font_t {
{
*glyph = 0;
if (len == -1) len = strlen (name);
- return klass->get.glyph_from_name (this, user_data,
- name, len,
- glyph,
- klass->user_data.glyph_from_name);
+ return klass->get.f.glyph_from_name (this, user_data,
+ name, len,
+ glyph,
+ klass->user_data.glyph_from_name);
}
@@ -268,7 +284,7 @@ struct hb_font_t {
{
*x = get_glyph_h_advance (glyph) / 2;
- /* TODO use font_metics.ascent */
+ /* TODO use font_metrics.ascent */
*y = y_scale;
}
@@ -298,6 +314,26 @@ struct hb_font_t {
}
}
+ inline void add_glyph_h_origin (hb_codepoint_t glyph,
+ hb_position_t *x, hb_position_t *y)
+ {
+ hb_position_t origin_x, origin_y;
+
+ get_glyph_h_origin (glyph, &origin_x, &origin_y);
+
+ *x += origin_x;
+ *y += origin_y;
+ }
+ inline void add_glyph_v_origin (hb_codepoint_t glyph,
+ hb_position_t *x, hb_position_t *y)
+ {
+ hb_position_t origin_x, origin_y;
+
+ get_glyph_v_origin (glyph, &origin_x, &origin_y);
+
+ *x += origin_x;
+ *y += origin_y;
+ }
inline void add_glyph_origin_for_direction (hb_codepoint_t glyph,
hb_direction_t direction,
hb_position_t *x, hb_position_t *y)
@@ -310,6 +346,26 @@ struct hb_font_t {
*y += origin_y;
}
+ inline void subtract_glyph_h_origin (hb_codepoint_t glyph,
+ hb_position_t *x, hb_position_t *y)
+ {
+ hb_position_t origin_x, origin_y;
+
+ get_glyph_h_origin (glyph, &origin_x, &origin_y);
+
+ *x -= origin_x;
+ *y -= origin_y;
+ }
+ inline void subtract_glyph_v_origin (hb_codepoint_t glyph,
+ hb_position_t *x, hb_position_t *y)
+ {
+ hb_position_t origin_x, origin_y;
+
+ get_glyph_v_origin (glyph, &origin_x, &origin_y);
+
+ *x -= origin_x;
+ *y -= origin_y;
+ }
inline void subtract_glyph_origin_for_direction (hb_codepoint_t glyph,
hb_direction_t direction,
hb_position_t *x, hb_position_t *y)
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-font.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc
index 94045e36daf..d1b8a8822d4 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-font.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc
@@ -45,130 +45,176 @@
*/
static hb_bool_t
-hb_font_get_glyph_nil (hb_font_t *font,
+hb_font_get_glyph_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t unicode,
hb_codepoint_t variation_selector,
hb_codepoint_t *glyph,
void *user_data HB_UNUSED)
{
- if (font->parent)
- return font->parent->get_glyph (unicode, variation_selector, glyph);
-
*glyph = 0;
return false;
}
+static hb_bool_t
+hb_font_get_glyph_parent (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t unicode,
+ hb_codepoint_t variation_selector,
+ hb_codepoint_t *glyph,
+ void *user_data HB_UNUSED)
+{
+ return font->parent->get_glyph (unicode, variation_selector, glyph);
+}
static hb_position_t
-hb_font_get_glyph_h_advance_nil (hb_font_t *font,
+hb_font_get_glyph_h_advance_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t glyph,
void *user_data HB_UNUSED)
{
- if (font->parent)
- return font->parent_scale_x_distance (font->parent->get_glyph_h_advance (glyph));
-
return font->x_scale;
}
+static hb_position_t
+hb_font_get_glyph_h_advance_parent (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t glyph,
+ void *user_data HB_UNUSED)
+{
+ return font->parent_scale_x_distance (font->parent->get_glyph_h_advance (glyph));
+}
static hb_position_t
-hb_font_get_glyph_v_advance_nil (hb_font_t *font,
+hb_font_get_glyph_v_advance_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t glyph,
void *user_data HB_UNUSED)
{
- if (font->parent)
- return font->parent_scale_y_distance (font->parent->get_glyph_v_advance (glyph));
-
return font->y_scale;
}
+static hb_position_t
+hb_font_get_glyph_v_advance_parent (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t glyph,
+ void *user_data HB_UNUSED)
+{
+ return font->parent_scale_y_distance (font->parent->get_glyph_v_advance (glyph));
+}
static hb_bool_t
-hb_font_get_glyph_h_origin_nil (hb_font_t *font,
+hb_font_get_glyph_h_origin_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t glyph,
hb_position_t *x,
hb_position_t *y,
void *user_data HB_UNUSED)
{
- if (font->parent) {
- hb_bool_t ret = font->parent->get_glyph_h_origin (glyph, x, y);
- if (ret)
- font->parent_scale_position (x, y);
- return ret;
- }
-
*x = *y = 0;
- return false;
+ return true;
+}
+static hb_bool_t
+hb_font_get_glyph_h_origin_parent (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t glyph,
+ hb_position_t *x,
+ hb_position_t *y,
+ void *user_data HB_UNUSED)
+{
+ hb_bool_t ret = font->parent->get_glyph_h_origin (glyph, x, y);
+ if (ret)
+ font->parent_scale_position (x, y);
+ return ret;
}
static hb_bool_t
-hb_font_get_glyph_v_origin_nil (hb_font_t *font,
+hb_font_get_glyph_v_origin_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t glyph,
hb_position_t *x,
hb_position_t *y,
void *user_data HB_UNUSED)
{
- if (font->parent) {
- hb_bool_t ret = font->parent->get_glyph_v_origin (glyph, x, y);
- if (ret)
- font->parent_scale_position (x, y);
- return ret;
- }
-
*x = *y = 0;
return false;
}
+static hb_bool_t
+hb_font_get_glyph_v_origin_parent (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t glyph,
+ hb_position_t *x,
+ hb_position_t *y,
+ void *user_data HB_UNUSED)
+{
+ hb_bool_t ret = font->parent->get_glyph_v_origin (glyph, x, y);
+ if (ret)
+ font->parent_scale_position (x, y);
+ return ret;
+}
static hb_position_t
-hb_font_get_glyph_h_kerning_nil (hb_font_t *font,
+hb_font_get_glyph_h_kerning_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t left_glyph,
hb_codepoint_t right_glyph,
void *user_data HB_UNUSED)
{
- if (font->parent)
- return font->parent_scale_x_distance (font->parent->get_glyph_h_kerning (left_glyph, right_glyph));
-
return 0;
}
+static hb_position_t
+hb_font_get_glyph_h_kerning_parent (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t left_glyph,
+ hb_codepoint_t right_glyph,
+ void *user_data HB_UNUSED)
+{
+ return font->parent_scale_x_distance (font->parent->get_glyph_h_kerning (left_glyph, right_glyph));
+}
static hb_position_t
-hb_font_get_glyph_v_kerning_nil (hb_font_t *font,
+hb_font_get_glyph_v_kerning_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t top_glyph,
hb_codepoint_t bottom_glyph,
void *user_data HB_UNUSED)
{
- if (font->parent)
- return font->parent_scale_y_distance (font->parent->get_glyph_v_kerning (top_glyph, bottom_glyph));
-
return 0;
}
+static hb_position_t
+hb_font_get_glyph_v_kerning_parent (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t top_glyph,
+ hb_codepoint_t bottom_glyph,
+ void *user_data HB_UNUSED)
+{
+ return font->parent_scale_y_distance (font->parent->get_glyph_v_kerning (top_glyph, bottom_glyph));
+}
static hb_bool_t
-hb_font_get_glyph_extents_nil (hb_font_t *font,
+hb_font_get_glyph_extents_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t glyph,
hb_glyph_extents_t *extents,
void *user_data HB_UNUSED)
{
- if (font->parent) {
- hb_bool_t ret = font->parent->get_glyph_extents (glyph, extents);
- if (ret) {
- font->parent_scale_position (&extents->x_bearing, &extents->y_bearing);
- font->parent_scale_distance (&extents->width, &extents->height);
- }
- return ret;
- }
-
memset (extents, 0, sizeof (*extents));
return false;
}
+static hb_bool_t
+hb_font_get_glyph_extents_parent (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t glyph,
+ hb_glyph_extents_t *extents,
+ void *user_data HB_UNUSED)
+{
+ hb_bool_t ret = font->parent->get_glyph_extents (glyph, extents);
+ if (ret) {
+ font->parent_scale_position (&extents->x_bearing, &extents->y_bearing);
+ font->parent_scale_distance (&extents->width, &extents->height);
+ }
+ return ret;
+}
static hb_bool_t
-hb_font_get_glyph_contour_point_nil (hb_font_t *font,
+hb_font_get_glyph_contour_point_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t glyph,
unsigned int point_index,
@@ -176,44 +222,63 @@ hb_font_get_glyph_contour_point_nil (hb_font_t *font,
hb_position_t *y,
void *user_data HB_UNUSED)
{
- if (font->parent) {
- hb_bool_t ret = font->parent->get_glyph_contour_point (glyph, point_index, x, y);
- if (ret)
- font->parent_scale_position (x, y);
- return ret;
- }
-
*x = *y = 0;
return false;
}
+static hb_bool_t
+hb_font_get_glyph_contour_point_parent (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t glyph,
+ unsigned int point_index,
+ hb_position_t *x,
+ hb_position_t *y,
+ void *user_data HB_UNUSED)
+{
+ hb_bool_t ret = font->parent->get_glyph_contour_point (glyph, point_index, x, y);
+ if (ret)
+ font->parent_scale_position (x, y);
+ return ret;
+}
static hb_bool_t
-hb_font_get_glyph_name_nil (hb_font_t *font,
+hb_font_get_glyph_name_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t glyph,
char *name, unsigned int size,
void *user_data HB_UNUSED)
{
- if (font->parent)
- return font->parent->get_glyph_name (glyph, name, size);
-
if (size) *name = '\0';
return false;
}
+static hb_bool_t
+hb_font_get_glyph_name_parent (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t glyph,
+ char *name, unsigned int size,
+ void *user_data HB_UNUSED)
+{
+ return font->parent->get_glyph_name (glyph, name, size);
+}
static hb_bool_t
-hb_font_get_glyph_from_name_nil (hb_font_t *font,
+hb_font_get_glyph_from_name_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
const char *name, int len, /* -1 means nul-terminated */
hb_codepoint_t *glyph,
void *user_data HB_UNUSED)
{
- if (font->parent)
- return font->parent->get_glyph_from_name (name, len, glyph);
-
*glyph = 0;
return false;
}
+static hb_bool_t
+hb_font_get_glyph_from_name_parent (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ const char *name, int len, /* -1 means nul-terminated */
+ hb_codepoint_t *glyph,
+ void *user_data HB_UNUSED)
+{
+ return font->parent->get_glyph_from_name (name, len, glyph);
+}
static const hb_font_funcs_t _hb_font_funcs_nil = {
@@ -222,9 +287,44 @@ static const hb_font_funcs_t _hb_font_funcs_nil = {
true, /* immutable */
{
+#define HB_FONT_FUNC_IMPLEMENT(name) NULL,
+ HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
+ },
+ {
+#define HB_FONT_FUNC_IMPLEMENT(name) NULL,
+ HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
+ },
+ {
+ {
#define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_nil,
+ HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
+ }
+ }
+};
+static const hb_font_funcs_t _hb_font_funcs_parent = {
+ HB_OBJECT_HEADER_STATIC,
+
+ true, /* immutable */
+
+ {
+#define HB_FONT_FUNC_IMPLEMENT(name) NULL,
+ HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
+ },
+ {
+#define HB_FONT_FUNC_IMPLEMENT(name) NULL,
HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
#undef HB_FONT_FUNC_IMPLEMENT
+ },
+ {
+ {
+#define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_parent,
+ HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
+ }
}
};
@@ -246,7 +346,7 @@ hb_font_funcs_create (void)
if (!(ffuncs = hb_object_create<hb_font_funcs_t> ()))
return hb_font_funcs_get_empty ();
- ffuncs->get = _hb_font_funcs_nil.get;
+ ffuncs->get = _hb_font_funcs_parent.get;
return ffuncs;
}
@@ -263,7 +363,7 @@ hb_font_funcs_create (void)
hb_font_funcs_t *
hb_font_funcs_get_empty (void)
{
- return const_cast<hb_font_funcs_t *> (&_hb_font_funcs_nil);
+ return const_cast<hb_font_funcs_t *> (&_hb_font_funcs_parent);
}
/**
@@ -398,11 +498,11 @@ hb_font_funcs_set_##name##_func (hb_font_funcs_t *ffuncs, \
ffuncs->destroy.name (ffuncs->user_data.name); \
\
if (func) { \
- ffuncs->get.name = func; \
+ ffuncs->get.f.name = func; \
ffuncs->user_data.name = user_data; \
ffuncs->destroy.name = destroy; \
} else { \
- ffuncs->get.name = hb_font_get_##name##_nil; \
+ ffuncs->get.f.name = hb_font_get_##name##_parent; \
ffuncs->user_data.name = NULL; \
ffuncs->destroy.name = NULL; \
} \
@@ -411,6 +511,13 @@ hb_font_funcs_set_##name##_func (hb_font_funcs_t *ffuncs, \
HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
#undef HB_FONT_FUNC_IMPLEMENT
+bool
+hb_font_t::has_func (unsigned int i)
+{
+ if (parent && parent != hb_font_get_empty () && parent->has_func (i))
+ return true;
+ return this->klass->get.array[i] != _hb_font_funcs_parent.get.array[i];
+}
/* Public getters */
@@ -858,9 +965,12 @@ hb_font_create (hb_face_t *face)
return hb_font_get_empty ();
hb_face_make_immutable (face);
+ font->parent = hb_font_get_empty ();
font->face = hb_face_reference (face);
font->klass = hb_font_funcs_get_empty ();
+ font->x_scale = font->y_scale = hb_face_get_upem (face);
+
return font;
}
@@ -885,7 +995,6 @@ hb_font_create_sub_font (hb_font_t *parent)
if (unlikely (hb_object_is_inert (font)))
return font;
- hb_font_make_immutable (parent);
font->parent = hb_font_reference (parent);
font->x_scale = parent->x_scale;
@@ -916,8 +1025,8 @@ hb_font_get_empty (void)
NULL, /* parent */
const_cast<hb_face_t *> (&_hb_face_nil),
- 0, /* x_scale */
- 0, /* y_scale */
+ 1000, /* x_scale */
+ 1000, /* y_scale */
0, /* x_ppem */
0, /* y_ppem */
@@ -1035,6 +1144,9 @@ hb_font_make_immutable (hb_font_t *font)
if (unlikely (hb_object_is_inert (font)))
return;
+ if (font->parent)
+ hb_font_make_immutable (font->parent);
+
font->immutable = true;
}
@@ -1055,6 +1167,32 @@ hb_font_is_immutable (hb_font_t *font)
}
/**
+ * hb_font_set_parent:
+ * @font: a font.
+ * @parent: new parent.
+ *
+ * Sets parent font of @font.
+ *
+ * Since: 1.0.5
+ **/
+void
+hb_font_set_parent (hb_font_t *font,
+ hb_font_t *parent)
+{
+ if (font->immutable)
+ return;
+
+ if (!parent)
+ parent = hb_font_get_empty ();
+
+ hb_font_t *old = font->parent;
+
+ font->parent = hb_font_reference (parent);
+
+ hb_font_destroy (old);
+}
+
+/**
* hb_font_get_parent:
* @font: a font.
*
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-font.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.h
index ffb2010e7b8..c3165e1d74c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-font.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.h
@@ -46,19 +46,19 @@ typedef struct hb_font_t hb_font_t;
typedef struct hb_font_funcs_t hb_font_funcs_t;
-hb_font_funcs_t *
+HB_EXTERN hb_font_funcs_t *
hb_font_funcs_create (void);
-hb_font_funcs_t *
+HB_EXTERN hb_font_funcs_t *
hb_font_funcs_get_empty (void);
-hb_font_funcs_t *
+HB_EXTERN hb_font_funcs_t *
hb_font_funcs_reference (hb_font_funcs_t *ffuncs);
-void
+HB_EXTERN void
hb_font_funcs_destroy (hb_font_funcs_t *ffuncs);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_font_funcs_set_user_data (hb_font_funcs_t *ffuncs,
hb_user_data_key_t *key,
void * data,
@@ -66,15 +66,15 @@ hb_font_funcs_set_user_data (hb_font_funcs_t *ffuncs,
hb_bool_t replace);
-void *
+HB_EXTERN void *
hb_font_funcs_get_user_data (hb_font_funcs_t *ffuncs,
hb_user_data_key_t *key);
-void
+HB_EXTERN void
hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs);
@@ -151,7 +151,7 @@ typedef hb_bool_t (*hb_font_get_glyph_from_name_func_t) (hb_font_t *font, void *
*
* Since: 0.9.2
**/
-void
+HB_EXTERN void
hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -167,7 +167,7 @@ hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs,
*
* Since: 0.9.2
**/
-void
+HB_EXTERN void
hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_h_advance_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -183,7 +183,7 @@ hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t *ffuncs,
*
* Since: 0.9.2
**/
-void
+HB_EXTERN void
hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_v_advance_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -199,7 +199,7 @@ hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t *ffuncs,
*
* Since: 0.9.2
**/
-void
+HB_EXTERN void
hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_h_origin_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -215,7 +215,7 @@ hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs,
*
* Since: 0.9.2
**/
-void
+HB_EXTERN void
hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_v_origin_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -231,7 +231,7 @@ hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs,
*
* Since: 0.9.2
**/
-void
+HB_EXTERN void
hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_h_kerning_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -247,7 +247,7 @@ hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t *ffuncs,
*
* Since: 0.9.2
**/
-void
+HB_EXTERN void
hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_v_kerning_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -263,7 +263,7 @@ hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs,
*
* Since: 0.9.2
**/
-void
+HB_EXTERN void
hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_extents_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -279,7 +279,7 @@ hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs,
*
* Since: 0.9.2
**/
-void
+HB_EXTERN void
hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_contour_point_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -295,7 +295,7 @@ hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs,
*
* Since: 0.9.2
**/
-void
+HB_EXTERN void
hb_font_funcs_set_glyph_name_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_name_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -311,7 +311,7 @@ hb_font_funcs_set_glyph_name_func (hb_font_funcs_t *ffuncs,
*
* Since: 0.9.2
**/
-void
+HB_EXTERN void
hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_from_name_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -319,49 +319,49 @@ hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t *ffuncs,
/* func dispatch */
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_font_get_glyph (hb_font_t *font,
hb_codepoint_t unicode, hb_codepoint_t variation_selector,
hb_codepoint_t *glyph);
-hb_position_t
+HB_EXTERN hb_position_t
hb_font_get_glyph_h_advance (hb_font_t *font,
hb_codepoint_t glyph);
-hb_position_t
+HB_EXTERN hb_position_t
hb_font_get_glyph_v_advance (hb_font_t *font,
hb_codepoint_t glyph);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_font_get_glyph_h_origin (hb_font_t *font,
hb_codepoint_t glyph,
hb_position_t *x, hb_position_t *y);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_font_get_glyph_v_origin (hb_font_t *font,
hb_codepoint_t glyph,
hb_position_t *x, hb_position_t *y);
-hb_position_t
+HB_EXTERN hb_position_t
hb_font_get_glyph_h_kerning (hb_font_t *font,
hb_codepoint_t left_glyph, hb_codepoint_t right_glyph);
-hb_position_t
+HB_EXTERN hb_position_t
hb_font_get_glyph_v_kerning (hb_font_t *font,
hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_font_get_glyph_extents (hb_font_t *font,
hb_codepoint_t glyph,
hb_glyph_extents_t *extents);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_font_get_glyph_contour_point (hb_font_t *font,
hb_codepoint_t glyph, unsigned int point_index,
hb_position_t *x, hb_position_t *y);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_font_get_glyph_name (hb_font_t *font,
hb_codepoint_t glyph,
char *name, unsigned int size);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_font_get_glyph_from_name (hb_font_t *font,
const char *name, int len, /* -1 means nul-terminated */
hb_codepoint_t *glyph);
@@ -369,52 +369,52 @@ hb_font_get_glyph_from_name (hb_font_t *font,
/* high-level funcs, with fallback */
-void
+HB_EXTERN void
hb_font_get_glyph_advance_for_direction (hb_font_t *font,
hb_codepoint_t glyph,
hb_direction_t direction,
hb_position_t *x, hb_position_t *y);
-void
+HB_EXTERN void
hb_font_get_glyph_origin_for_direction (hb_font_t *font,
hb_codepoint_t glyph,
hb_direction_t direction,
hb_position_t *x, hb_position_t *y);
-void
+HB_EXTERN void
hb_font_add_glyph_origin_for_direction (hb_font_t *font,
hb_codepoint_t glyph,
hb_direction_t direction,
hb_position_t *x, hb_position_t *y);
-void
+HB_EXTERN void
hb_font_subtract_glyph_origin_for_direction (hb_font_t *font,
hb_codepoint_t glyph,
hb_direction_t direction,
hb_position_t *x, hb_position_t *y);
-void
+HB_EXTERN void
hb_font_get_glyph_kerning_for_direction (hb_font_t *font,
hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
hb_direction_t direction,
hb_position_t *x, hb_position_t *y);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_font_get_glyph_extents_for_origin (hb_font_t *font,
hb_codepoint_t glyph,
hb_direction_t direction,
hb_glyph_extents_t *extents);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_font_get_glyph_contour_point_for_origin (hb_font_t *font,
hb_codepoint_t glyph, unsigned int point_index,
hb_direction_t direction,
hb_position_t *x, hb_position_t *y);
/* Generates gidDDD if glyph has no name. */
-void
+HB_EXTERN void
hb_font_glyph_to_string (hb_font_t *font,
hb_codepoint_t glyph,
char *s, unsigned int size);
/* Parses gidDDD and uniUUUU strings automatically. */
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_font_glyph_from_string (hb_font_t *font,
const char *s, int len, /* -1 means nul-terminated */
hb_codepoint_t *glyph);
@@ -426,22 +426,22 @@ hb_font_glyph_from_string (hb_font_t *font,
/* Fonts are very light-weight objects */
-hb_font_t *
+HB_EXTERN hb_font_t *
hb_font_create (hb_face_t *face);
-hb_font_t *
+HB_EXTERN hb_font_t *
hb_font_create_sub_font (hb_font_t *parent);
-hb_font_t *
+HB_EXTERN hb_font_t *
hb_font_get_empty (void);
-hb_font_t *
+HB_EXTERN hb_font_t *
hb_font_reference (hb_font_t *font);
-void
+HB_EXTERN void
hb_font_destroy (hb_font_t *font);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_font_set_user_data (hb_font_t *font,
hb_user_data_key_t *key,
void * data,
@@ -449,42 +449,46 @@ hb_font_set_user_data (hb_font_t *font,
hb_bool_t replace);
-void *
+HB_EXTERN void *
hb_font_get_user_data (hb_font_t *font,
hb_user_data_key_t *key);
-void
+HB_EXTERN void
hb_font_make_immutable (hb_font_t *font);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_font_is_immutable (hb_font_t *font);
-hb_font_t *
+HB_EXTERN void
+hb_font_set_parent (hb_font_t *font,
+ hb_font_t *parent);
+
+HB_EXTERN hb_font_t *
hb_font_get_parent (hb_font_t *font);
-hb_face_t *
+HB_EXTERN hb_face_t *
hb_font_get_face (hb_font_t *font);
-void
+HB_EXTERN void
hb_font_set_funcs (hb_font_t *font,
hb_font_funcs_t *klass,
void *font_data,
hb_destroy_func_t destroy);
/* Be *very* careful with this function! */
-void
+HB_EXTERN void
hb_font_set_funcs_data (hb_font_t *font,
void *font_data,
hb_destroy_func_t destroy);
-void
+HB_EXTERN void
hb_font_set_scale (hb_font_t *font,
int x_scale,
int y_scale);
-void
+HB_EXTERN void
hb_font_get_scale (hb_font_t *font,
int *x_scale,
int *y_scale);
@@ -492,12 +496,12 @@ hb_font_get_scale (hb_font_t *font,
/*
* A zero value means "no hinting in that direction"
*/
-void
+HB_EXTERN void
hb_font_set_ppem (hb_font_t *font,
unsigned int x_ppem,
unsigned int y_ppem);
-void
+HB_EXTERN void
hb_font_get_ppem (hb_font_t *font,
unsigned int *x_ppem,
unsigned int *y_ppem);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ft.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc
index edafff4e92b..9b872ea58f0 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ft.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc
@@ -1,6 +1,7 @@
/*
* Copyright © 2009 Red Hat, Inc.
* Copyright © 2009 Keith Stribley
+ * Copyright © 2015 Google, Inc.
*
* This is part of HarfBuzz, a text shaping library.
*
@@ -23,6 +24,7 @@
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
*/
#include "hb-private.hh"
@@ -46,17 +48,15 @@
* In general, this file does a fine job of what it's supposed to do.
* There are, however, things that need more work:
*
- * - We don't handle any load_flags. That definitely has API implications. :(
- * I believe hb_ft_font_create() should take load_flags input.
- * In particular, FT_Get_Advance() without the NO_HINTING flag seems to be
- * buggy.
+ * - I remember seeing FT_Get_Advance() without the NO_HINTING flag to be buggy.
+ * Have not investigated.
*
- * FreeType works in 26.6 mode. Clients can decide to use that mode, and everything
+ * - FreeType works in 26.6 mode. Clients can decide to use that mode, and everything
* would work fine. However, we also abuse this API for performing in font-space,
* but don't pass the correct flags to FreeType. We just abuse the no-hinting mode
* for that, such that no rounding etc happens. As such, we don't set ppem, and
- * pass NO_HINTING around. This seems to work best, until we go ahead and add a full
- * load_flags API.
+ * pass NO_HINTING as load_flags. Would be much better to use NO_SCALE, and scale
+ * ourselves, like we do in uniscribe, etc.
*
* - We don't handle / allow for emboldening / obliqueing.
*
@@ -66,6 +66,94 @@
*/
+struct hb_ft_font_t
+{
+ FT_Face ft_face;
+ int load_flags;
+ bool unref; /* Whether to destroy ft_face when done. */
+};
+
+static hb_ft_font_t *
+_hb_ft_font_create (FT_Face ft_face, bool unref)
+{
+ hb_ft_font_t *ft_font = (hb_ft_font_t *) calloc (1, sizeof (hb_ft_font_t));
+
+ if (unlikely (!ft_font))
+ return NULL;
+
+ ft_font->ft_face = ft_face;
+ ft_font->unref = unref;
+
+ ft_font->load_flags = FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING;
+
+ return ft_font;
+}
+
+static void
+_hb_ft_font_destroy (hb_ft_font_t *ft_font)
+{
+ if (ft_font->unref)
+ FT_Done_Face (ft_font->ft_face);
+
+ free (ft_font);
+}
+
+/**
+ * hb_ft_font_set_load_flags:
+ * @font:
+ * @load_flags:
+ *
+ *
+ *
+ * Since: 1.0.5
+ **/
+void
+hb_ft_font_set_load_flags (hb_font_t *font, int load_flags)
+{
+ if (font->immutable)
+ return;
+
+ if (font->destroy != (hb_destroy_func_t) _hb_ft_font_destroy)
+ return;
+
+ hb_ft_font_t *ft_font = (hb_ft_font_t *) font->user_data;
+
+ ft_font->load_flags = load_flags;
+}
+
+/**
+ * hb_ft_font_get_load_flags:
+ * @font:
+ *
+ *
+ *
+ * Return value:
+ * Since: 1.0.5
+ **/
+int
+hb_ft_font_get_load_flags (hb_font_t *font)
+{
+ if (font->destroy != (hb_destroy_func_t) _hb_ft_font_destroy)
+ return 0;
+
+ const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font->user_data;
+
+ return ft_font->load_flags;
+}
+
+FT_Face
+hb_ft_font_get_face (hb_font_t *font)
+{
+ if (font->destroy != (hb_destroy_func_t) _hb_ft_font_destroy)
+ return NULL;
+
+ const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font->user_data;
+
+ return ft_font->ft_face;
+}
+
+
+
static hb_bool_t
hb_ft_get_glyph (hb_font_t *font HB_UNUSED,
void *font_data,
@@ -75,13 +163,13 @@ hb_ft_get_glyph (hb_font_t *font HB_UNUSED,
void *user_data HB_UNUSED)
{
+ const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data;
unsigned int g;
- FT_Face ft_face = (FT_Face) font_data;
if (likely (!variation_selector))
- g = FT_Get_Char_Index (ft_face, unicode);
+ g = FT_Get_Char_Index (ft_font->ft_face, unicode);
else
- g = FT_Face_GetCharVariantIndex (ft_face, unicode, variation_selector);
+ g = FT_Face_GetCharVariantIndex (ft_font->ft_face, unicode, variation_selector);
if (unlikely (!g))
return false;
@@ -96,11 +184,10 @@ hb_ft_get_glyph_h_advance (hb_font_t *font HB_UNUSED,
hb_codepoint_t glyph,
void *user_data HB_UNUSED)
{
- FT_Face ft_face = (FT_Face) font_data;
- int load_flags = FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING;
+ const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data;
FT_Fixed v;
- if (unlikely (FT_Get_Advance (ft_face, glyph, load_flags, &v)))
+ if (unlikely (FT_Get_Advance (ft_font->ft_face, glyph, ft_font->load_flags, &v)))
return 0;
if (font->x_scale < 0)
@@ -115,11 +202,10 @@ hb_ft_get_glyph_v_advance (hb_font_t *font HB_UNUSED,
hb_codepoint_t glyph,
void *user_data HB_UNUSED)
{
- FT_Face ft_face = (FT_Face) font_data;
- int load_flags = FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING | FT_LOAD_VERTICAL_LAYOUT;
+ const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data;
FT_Fixed v;
- if (unlikely (FT_Get_Advance (ft_face, glyph, load_flags, &v)))
+ if (unlikely (FT_Get_Advance (ft_font->ft_face, glyph, ft_font->load_flags | FT_LOAD_VERTICAL_LAYOUT, &v)))
return 0;
if (font->y_scale < 0)
@@ -131,18 +217,6 @@ hb_ft_get_glyph_v_advance (hb_font_t *font HB_UNUSED,
}
static hb_bool_t
-hb_ft_get_glyph_h_origin (hb_font_t *font HB_UNUSED,
- void *font_data HB_UNUSED,
- hb_codepoint_t glyph HB_UNUSED,
- hb_position_t *x HB_UNUSED,
- hb_position_t *y HB_UNUSED,
- void *user_data HB_UNUSED)
-{
- /* We always work in the horizontal coordinates. */
- return true;
-}
-
-static hb_bool_t
hb_ft_get_glyph_v_origin (hb_font_t *font HB_UNUSED,
void *font_data,
hb_codepoint_t glyph,
@@ -150,10 +224,10 @@ hb_ft_get_glyph_v_origin (hb_font_t *font HB_UNUSED,
hb_position_t *y,
void *user_data HB_UNUSED)
{
- FT_Face ft_face = (FT_Face) font_data;
- int load_flags = FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING;
+ const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data;
+ FT_Face ft_face = ft_font->ft_face;
- if (unlikely (FT_Load_Glyph (ft_face, glyph, load_flags)))
+ if (unlikely (FT_Load_Glyph (ft_face, glyph, ft_font->load_flags)))
return false;
/* Note: FreeType's vertical metrics grows downward while other FreeType coordinates
@@ -176,27 +250,16 @@ hb_ft_get_glyph_h_kerning (hb_font_t *font,
hb_codepoint_t right_glyph,
void *user_data HB_UNUSED)
{
- FT_Face ft_face = (FT_Face) font_data;
+ const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data;
FT_Vector kerningv;
FT_Kerning_Mode mode = font->x_ppem ? FT_KERNING_DEFAULT : FT_KERNING_UNFITTED;
- if (FT_Get_Kerning (ft_face, left_glyph, right_glyph, mode, &kerningv))
+ if (FT_Get_Kerning (ft_font->ft_face, left_glyph, right_glyph, mode, &kerningv))
return 0;
return kerningv.x;
}
-static hb_position_t
-hb_ft_get_glyph_v_kerning (hb_font_t *font HB_UNUSED,
- void *font_data HB_UNUSED,
- hb_codepoint_t top_glyph HB_UNUSED,
- hb_codepoint_t bottom_glyph HB_UNUSED,
- void *user_data HB_UNUSED)
-{
- /* FreeType API doesn't support vertical kerning */
- return 0;
-}
-
static hb_bool_t
hb_ft_get_glyph_extents (hb_font_t *font HB_UNUSED,
void *font_data,
@@ -204,16 +267,26 @@ hb_ft_get_glyph_extents (hb_font_t *font HB_UNUSED,
hb_glyph_extents_t *extents,
void *user_data HB_UNUSED)
{
- FT_Face ft_face = (FT_Face) font_data;
- int load_flags = FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING;
+ const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data;
+ FT_Face ft_face = ft_font->ft_face;
- if (unlikely (FT_Load_Glyph (ft_face, glyph, load_flags)))
+ if (unlikely (FT_Load_Glyph (ft_face, glyph, ft_font->load_flags)))
return false;
extents->x_bearing = ft_face->glyph->metrics.horiBearingX;
extents->y_bearing = ft_face->glyph->metrics.horiBearingY;
extents->width = ft_face->glyph->metrics.width;
extents->height = -ft_face->glyph->metrics.height;
+ if (font->x_scale < 0)
+ {
+ extents->x_bearing = -extents->x_bearing;
+ extents->width = -extents->width;
+ }
+ if (font->y_scale < 0)
+ {
+ extents->y_bearing = -extents->y_bearing;
+ extents->height = -extents->height;
+ }
return true;
}
@@ -226,10 +299,10 @@ hb_ft_get_glyph_contour_point (hb_font_t *font HB_UNUSED,
hb_position_t *y,
void *user_data HB_UNUSED)
{
- FT_Face ft_face = (FT_Face) font_data;
- int load_flags = FT_LOAD_DEFAULT;
+ const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data;
+ FT_Face ft_face = ft_font->ft_face;
- if (unlikely (FT_Load_Glyph (ft_face, glyph, load_flags)))
+ if (unlikely (FT_Load_Glyph (ft_face, glyph, ft_font->load_flags)))
return false;
if (unlikely (ft_face->glyph->format != FT_GLYPH_FORMAT_OUTLINE))
@@ -251,9 +324,9 @@ hb_ft_get_glyph_name (hb_font_t *font HB_UNUSED,
char *name, unsigned int size,
void *user_data HB_UNUSED)
{
- FT_Face ft_face = (FT_Face) font_data;
+ const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data;
- hb_bool_t ret = !FT_Get_Glyph_Name (ft_face, glyph, name, size);
+ hb_bool_t ret = !FT_Get_Glyph_Name (ft_font->ft_face, glyph, name, size);
if (ret && (size && !*name))
ret = false;
@@ -267,7 +340,8 @@ hb_ft_get_glyph_from_name (hb_font_t *font HB_UNUSED,
hb_codepoint_t *glyph,
void *user_data HB_UNUSED)
{
- FT_Face ft_face = (FT_Face) font_data;
+ const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data;
+ FT_Face ft_face = ft_font->ft_face;
if (len < 0)
*glyph = FT_Get_Name_Index (ft_face, (FT_String *) name);
@@ -293,22 +367,54 @@ hb_ft_get_glyph_from_name (hb_font_t *font HB_UNUSED,
}
-static hb_font_funcs_t *
-_hb_ft_get_font_funcs (void)
+static hb_font_funcs_t *static_ft_funcs = NULL;
+
+#ifdef HB_USE_ATEXIT
+static
+void free_static_ft_funcs (void)
{
- static const hb_font_funcs_t ft_ffuncs = {
- HB_OBJECT_HEADER_STATIC,
+ hb_font_funcs_destroy (static_ft_funcs);
+}
+#endif
- true, /* immutable */
+static void
+_hb_ft_font_set_funcs (hb_font_t *font, FT_Face ft_face, bool unref)
+{
+retry:
+ hb_font_funcs_t *funcs = (hb_font_funcs_t *) hb_atomic_ptr_get (&static_ft_funcs);
- {
-#define HB_FONT_FUNC_IMPLEMENT(name) hb_ft_get_##name,
- HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_FONT_FUNC_IMPLEMENT
+ if (unlikely (!funcs))
+ {
+ funcs = hb_font_funcs_create ();
+
+ hb_font_funcs_set_glyph_func (funcs, hb_ft_get_glyph, NULL, NULL);
+ hb_font_funcs_set_glyph_h_advance_func (funcs, hb_ft_get_glyph_h_advance, NULL, NULL);
+ hb_font_funcs_set_glyph_v_advance_func (funcs, hb_ft_get_glyph_v_advance, NULL, NULL);
+ //hb_font_funcs_set_glyph_h_origin_func (funcs, hb_ft_get_glyph_h_origin, NULL, NULL);
+ hb_font_funcs_set_glyph_v_origin_func (funcs, hb_ft_get_glyph_v_origin, NULL, NULL);
+ hb_font_funcs_set_glyph_h_kerning_func (funcs, hb_ft_get_glyph_h_kerning, NULL, NULL);
+ //hb_font_funcs_set_glyph_v_kerning_func (funcs, hb_ft_get_glyph_v_kerning, NULL, NULL);
+ hb_font_funcs_set_glyph_extents_func (funcs, hb_ft_get_glyph_extents, NULL, NULL);
+ hb_font_funcs_set_glyph_contour_point_func (funcs, hb_ft_get_glyph_contour_point, NULL, NULL);
+ hb_font_funcs_set_glyph_name_func (funcs, hb_ft_get_glyph_name, NULL, NULL);
+ hb_font_funcs_set_glyph_from_name_func (funcs, hb_ft_get_glyph_from_name, NULL, NULL);
+
+ hb_font_funcs_make_immutable (funcs);
+
+ if (!hb_atomic_ptr_cmpexch (&static_ft_funcs, NULL, funcs)) {
+ hb_font_funcs_destroy (funcs);
+ goto retry;
}
+
+#ifdef HB_USE_ATEXIT
+ atexit (free_static_ft_funcs); /* First person registers atexit() callback. */
+#endif
};
- return const_cast<hb_font_funcs_t *> (&ft_ffuncs);
+ hb_font_set_funcs (font,
+ funcs,
+ _hb_ft_font_create (ft_face, unref),
+ (hb_destroy_func_t) _hb_ft_font_destroy);
}
@@ -420,11 +526,6 @@ hb_ft_face_create_cached (FT_Face ft_face)
return hb_face_reference ((hb_face_t *) ft_face->generic.data);
}
-static void
-_do_nothing (void)
-{
-}
-
/**
* hb_ft_font_create:
@@ -446,9 +547,7 @@ hb_ft_font_create (FT_Face ft_face,
face = hb_ft_face_create (ft_face, destroy);
font = hb_font_create (face);
hb_face_destroy (face);
- hb_font_set_funcs (font,
- _hb_ft_get_font_funcs (),
- ft_face, (hb_destroy_func_t) _do_nothing);
+ _hb_ft_font_set_funcs (font, ft_face, false);
hb_font_set_scale (font,
(int) (((uint64_t) ft_face->size->metrics.x_scale * (uint64_t) ft_face->units_per_EM + (1<<15)) >> 16),
(int) (((uint64_t) ft_face->size->metrics.y_scale * (uint64_t) ft_face->units_per_EM + (1<<15)) >> 16));
@@ -562,18 +661,6 @@ hb_ft_font_set_funcs (hb_font_t *font)
ft_face->generic.data = blob;
ft_face->generic.finalizer = (FT_Generic_Finalizer) _release_blob;
- hb_font_set_funcs (font,
- _hb_ft_get_font_funcs (),
- ft_face,
- (hb_destroy_func_t) FT_Done_Face);
-}
-
-FT_Face
-hb_ft_font_get_face (hb_font_t *font)
-{
- if (font->destroy == (hb_destroy_func_t) FT_Done_Face ||
- font->destroy == (hb_destroy_func_t) _do_nothing)
- return (FT_Face) font->user_data;
-
- return NULL;
+ _hb_ft_font_set_funcs (font, ft_face, true);
+ hb_ft_font_set_load_flags (font, FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING);
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ft.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.h
index 92f4b361441..dc8ef855848 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ft.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.h
@@ -1,5 +1,6 @@
/*
* Copyright © 2009 Red Hat, Inc.
+ * Copyright © 2015 Google, Inc.
*
* This is part of HarfBuzz, a text shaping library.
*
@@ -22,6 +23,7 @@
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
*/
#ifndef HB_FT_H
@@ -57,7 +59,7 @@ HB_BEGIN_DECLS
* probably should use (the more recent) hb_ft_face_create_referenced()
* instead.
*/
-hb_face_t *
+HB_EXTERN hb_face_t *
hb_ft_face_create (FT_Face ft_face,
hb_destroy_func_t destroy);
@@ -69,7 +71,7 @@ hb_ft_face_create (FT_Face ft_face,
* Client is still responsible for making sure that ft-face is destroyed
* after hb-face is.
*/
-hb_face_t *
+HB_EXTERN hb_face_t *
hb_ft_face_create_cached (FT_Face ft_face);
/* This version is like hb_ft_face_create(), except that it calls
@@ -79,7 +81,7 @@ hb_ft_face_create_cached (FT_Face ft_face);
* This is the most convenient version to use. Use it unless you have
* very good reasons not to.
*/
-hb_face_t *
+HB_EXTERN hb_face_t *
hb_ft_face_create_referenced (FT_Face ft_face);
@@ -96,23 +98,28 @@ hb_ft_face_create_referenced (FT_Face ft_face);
/* See notes on hb_ft_face_create(). Same issues re lifecycle-management
* apply here. Use hb_ft_font_create_referenced() if you can. */
-hb_font_t *
+HB_EXTERN hb_font_t *
hb_ft_font_create (FT_Face ft_face,
hb_destroy_func_t destroy);
/* See notes on hb_ft_face_create_referenced() re lifecycle-management
* issues. */
-hb_font_t *
+HB_EXTERN hb_font_t *
hb_ft_font_create_referenced (FT_Face ft_face);
+HB_EXTERN FT_Face
+hb_ft_font_get_face (hb_font_t *font);
+
+HB_EXTERN void
+hb_ft_font_set_load_flags (hb_font_t *font, int load_flags);
+
+HB_EXTERN int
+hb_ft_font_get_load_flags (hb_font_t *font);
/* Makes an hb_font_t use FreeType internally to implement font functions. */
-void
+HB_EXTERN void
hb_ft_font_set_funcs (hb_font_t *font);
-FT_Face
-hb_ft_font_get_face (hb_font_t *font);
-
HB_END_DECLS
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-glib.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-glib.cc
index 7dbd83d2962..e203524754c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-glib.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-glib.cc
@@ -383,6 +383,8 @@ hb_glib_get_unicode_funcs (void)
}
/**
+ * hb_glib_blob_create:
+ *
* Since: 0.9.38
**/
hb_blob_t *
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-glib.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-glib.h
index 1a8f42ea529..12c3e3b3a89 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-glib.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-glib.h
@@ -36,17 +36,17 @@
HB_BEGIN_DECLS
-hb_script_t
+HB_EXTERN hb_script_t
hb_glib_script_to_script (GUnicodeScript script);
-GUnicodeScript
+HB_EXTERN GUnicodeScript
hb_glib_script_from_script (hb_script_t script);
-hb_unicode_funcs_t *
+HB_EXTERN hb_unicode_funcs_t *
hb_glib_get_unicode_funcs (void);
-hb_blob_t *
+HB_EXTERN hb_blob_t *
hb_glib_blob_create (GBytes *gbytes);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-gobject-enums.cc.tmpl b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-enums.cc.tmpl
index ca458a3846c..ca458a3846c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-gobject-enums.cc.tmpl
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-enums.cc.tmpl
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-gobject-enums.h.tmpl b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-enums.h.tmpl
index 6ecda06c2a6..e28510c2284 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-gobject-enums.h.tmpl
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-enums.h.tmpl
@@ -42,7 +42,7 @@ HB_BEGIN_DECLS
/*** END file-header ***/
/*** BEGIN value-header ***/
-GType @enum_name@_get_type (void) G_GNUC_CONST;
+HB_EXTERN GType @enum_name@_get_type (void) G_GNUC_CONST;
#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())
/*** END value-header ***/
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-gobject-structs.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.cc
index 6bd63368b65..6bd63368b65 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-gobject-structs.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-gobject-structs.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.h
index 0a0387dce31..0ea3b12cf16 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-gobject-structs.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.h
@@ -43,60 +43,60 @@ HB_BEGIN_DECLS
/**
* Since: 0.9.2
**/
-GType hb_gobject_blob_get_type (void);
+HB_EXTERN GType hb_gobject_blob_get_type (void);
#define HB_GOBJECT_TYPE_BLOB (hb_gobject_blob_get_type ())
/**
* Since: 0.9.2
**/
-GType hb_gobject_buffer_get_type (void);
+HB_EXTERN GType hb_gobject_buffer_get_type (void);
#define HB_GOBJECT_TYPE_BUFFER (hb_gobject_buffer_get_type ())
/**
* Since: 0.9.2
**/
-GType hb_gobject_face_get_type (void);
+HB_EXTERN GType hb_gobject_face_get_type (void);
#define HB_GOBJECT_TYPE_FACE (hb_gobject_face_get_type ())
/**
* Since: 0.9.2
**/
-GType hb_gobject_font_get_type (void);
+HB_EXTERN GType hb_gobject_font_get_type (void);
#define HB_GOBJECT_TYPE_FONT (hb_gobject_font_get_type ())
/**
* Since: 0.9.2
**/
-GType hb_gobject_font_funcs_get_type (void);
+HB_EXTERN GType hb_gobject_font_funcs_get_type (void);
#define HB_GOBJECT_TYPE_FONT_FUNCS (hb_gobject_font_funcs_get_type ())
-GType hb_gobject_set_get_type (void);
+HB_EXTERN GType hb_gobject_set_get_type (void);
#define HB_GOBJECT_TYPE_SET (hb_gobject_set_get_type ())
-GType hb_gobject_shape_plan_get_type (void);
+HB_EXTERN GType hb_gobject_shape_plan_get_type (void);
#define HB_GOBJECT_TYPE_SHAPE_PLAN (hb_gobject_shape_plan_get_type ())
/**
* Since: 0.9.2
**/
-GType hb_gobject_unicode_funcs_get_type (void);
+HB_EXTERN GType hb_gobject_unicode_funcs_get_type (void);
#define HB_GOBJECT_TYPE_UNICODE_FUNCS (hb_gobject_unicode_funcs_get_type ())
/* Value types */
-GType hb_gobject_feature_get_type (void);
+HB_EXTERN GType hb_gobject_feature_get_type (void);
#define HB_GOBJECT_TYPE_FEATURE (hb_gobject_feature_get_type ())
-GType hb_gobject_glyph_info_get_type (void);
+HB_EXTERN GType hb_gobject_glyph_info_get_type (void);
#define HB_GOBJECT_TYPE_GLYPH_INFO (hb_gobject_glyph_info_get_type ())
-GType hb_gobject_glyph_position_get_type (void);
+HB_EXTERN GType hb_gobject_glyph_position_get_type (void);
#define HB_GOBJECT_TYPE_GLYPH_POSITION (hb_gobject_glyph_position_get_type ())
-GType hb_gobject_segment_properties_get_type (void);
+HB_EXTERN GType hb_gobject_segment_properties_get_type (void);
#define HB_GOBJECT_TYPE_SEGMENT_PROPERTIES (hb_gobject_segment_properties_get_type ())
-GType hb_gobject_user_data_key_get_type (void);
+HB_EXTERN GType hb_gobject_user_data_key_get_type (void);
#define HB_GOBJECT_TYPE_USER_DATA_KEY (hb_gobject_user_data_key_get_type ())
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-gobject.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject.h
index ea1bd25df82..ea1bd25df82 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-gobject.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-graphite2.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc
index cd694c14065..f41093ae713 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-graphite2.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc
@@ -351,6 +351,7 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
}
buffer->len = glyph_count;
+ float yscale = font->y_scale / font->x_scale;
/* Positioning. */
if (!HB_DIRECTION_IS_BACKWARD(buffer->props.direction))
{
@@ -359,9 +360,9 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
is; pPos++, is = gr_slot_next_in_segment (is))
{
pPos->x_offset = gr_slot_origin_X (is) - curradvx;
- pPos->y_offset = gr_slot_origin_Y (is) - curradvy;
+ pPos->y_offset = gr_slot_origin_Y (is) * yscale - curradvy;
pPos->x_advance = gr_slot_advance_X (is, grface, grfont);
- pPos->y_advance = gr_slot_advance_Y (is, grface, grfont);
+ pPos->y_advance = gr_slot_advance_Y (is, grface, grfont) * yscale;
curradvx += pPos->x_advance;
curradvy += pPos->y_advance;
}
@@ -387,17 +388,17 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
for (tis = is, tinfo = info; tis && tinfo->cluster == currclus; tis = gr_slot_prev_in_segment (tis), tinfo--)
{
clusx += gr_slot_advance_X (tis, grface, grfont);
- clusy += gr_slot_advance_Y (tis, grface, grfont);
+ clusy += gr_slot_advance_Y (tis, grface, grfont) * yscale;
}
curradvx += clusx;
curradvy += clusy;
}
pPos->x_advance = gr_slot_advance_X (is, grface, grfont);
- pPos->y_advance = gr_slot_advance_Y (is, grface, grfont);
+ pPos->y_advance = gr_slot_advance_Y (is, grface, grfont) * yscale;
curradvx -= pPos->x_advance;
curradvy -= pPos->y_advance;
pPos->x_offset = gr_slot_origin_X (is) - curradvx;
- pPos->y_offset = gr_slot_origin_Y (is) - curradvy;
+ pPos->y_offset = gr_slot_origin_Y (is) * yscale - curradvy;
}
hb_buffer_reverse_clusters (buffer);
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-graphite2.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.h
index 3eae54acbd8..122c3e47636 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-graphite2.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.h
@@ -36,10 +36,10 @@ HB_BEGIN_DECLS
#define HB_GRAPHITE2_TAG_SILF HB_TAG('S','i','l','f')
-gr_face *
+HB_EXTERN gr_face *
hb_graphite2_face_get_gr_face (hb_face_t *face);
-gr_font *
+HB_EXTERN gr_font *
hb_graphite2_font_get_gr_font (hb_font_t *font);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-icu.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-icu.cc
index 24cec9d7266..24cec9d7266 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-icu.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-icu.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-icu.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-icu.h
index f2f35f0f2ce..2db6a7b6797 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-icu.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-icu.h
@@ -36,14 +36,14 @@
HB_BEGIN_DECLS
-hb_script_t
+HB_EXTERN hb_script_t
hb_icu_script_to_script (UScriptCode script);
-UScriptCode
+HB_EXTERN UScriptCode
hb_icu_script_from_script (hb_script_t script);
-hb_unicode_funcs_t *
+HB_EXTERN hb_unicode_funcs_t *
hb_icu_get_unicode_funcs (void);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-mutex-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-mutex-private.hh
index ed2703571c1..ed2703571c1 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-mutex-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-mutex-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-object-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-object-private.hh
index 6b73ff92d09..6b73ff92d09 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-object-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-object-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-open-file-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-file-private.hh
index 152230a0e5f..152230a0e5f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-open-file-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-file-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-open-type-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type-private.hh
index 79e70b8ccfc..5ad850bd95b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-open-type-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type-private.hh
@@ -154,6 +154,20 @@ ASSERT_STATIC (Type::min_size + 1 <= sizeof (_Null##Type))
#define Null(Type) Null<Type>()
+/*
+ * Dispatch
+ */
+
+template <typename Context, typename Return, unsigned int MaxDebugDepth>
+struct hb_dispatch_context_t
+{
+ static const unsigned int max_debug_depth = MaxDebugDepth;
+ typedef Return return_t;
+ template <typename T, typename F>
+ inline bool may_dispatch (const T *obj, const F *format) { return true; }
+ static return_t no_dispatch_return_value (void) { return Context::default_return_value (); }
+};
+
/*
* Sanitize
@@ -171,20 +185,26 @@ ASSERT_STATIC (Type::min_size + 1 <= sizeof (_Null##Type))
/* This limits sanitizing time on really broken fonts. */
#ifndef HB_SANITIZE_MAX_EDITS
-#define HB_SANITIZE_MAX_EDITS 100
+#define HB_SANITIZE_MAX_EDITS 8
#endif
-struct hb_sanitize_context_t
+struct hb_sanitize_context_t :
+ hb_dispatch_context_t<hb_sanitize_context_t, bool, HB_DEBUG_SANITIZE>
{
+ inline hb_sanitize_context_t (void) :
+ debug_depth (0),
+ start (NULL), end (NULL),
+ writable (false), edit_count (0),
+ blob (NULL) {}
+
inline const char *get_name (void) { return "SANITIZE"; }
- static const unsigned int max_debug_depth = HB_DEBUG_SANITIZE;
- typedef bool return_t;
template <typename T, typename F>
inline bool may_dispatch (const T *obj, const F *format)
{ return format->sanitize (this); }
template <typename T>
inline return_t dispatch (const T &obj) { return obj.sanitize (this); }
static return_t default_return_value (void) { return true; }
+ static return_t no_dispatch_return_value (void) { return false; }
bool stop_sublookup_iteration (const return_t r) const { return !r; }
inline void init (hb_blob_t *b)
@@ -295,7 +315,7 @@ template <typename Type>
struct Sanitizer
{
static hb_blob_t *sanitize (hb_blob_t *blob) {
- hb_sanitize_context_t c[1] = {{0, NULL, NULL, false, 0, NULL}};
+ hb_sanitize_context_t c[1];
bool sane;
/* TODO is_sane() stuff */
@@ -379,9 +399,9 @@ struct Sanitizer
struct hb_serialize_context_t
{
- inline hb_serialize_context_t (void *start, unsigned int size)
+ inline hb_serialize_context_t (void *start_, unsigned int size)
{
- this->start = (char *) start;
+ this->start = (char *) start_;
this->end = this->start + size;
this->ran_out_of_room = false;
@@ -475,10 +495,10 @@ struct hb_serialize_context_t
return reinterpret_cast<Type *> (&obj);
}
- inline void truncate (void *head)
+ inline void truncate (void *new_head)
{
- assert (this->start < head && head <= this->head);
- this->head = (char *) head;
+ assert (this->start < new_head && new_head <= this->head);
+ this->head = (char *) new_head;
}
unsigned int debug_depth;
@@ -900,7 +920,7 @@ struct ArrayOf
inline bool sanitize_shallow (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
- return_trace (c->check_struct (this) && c->check_array (this, Type::static_size, len));
+ return_trace (c->check_struct (this) && c->check_array (array, Type::static_size, len));
}
public:
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-cmap-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh
index c9161f0ef4c..c9161f0ef4c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-cmap-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-font.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc
index 9cde8389833..58586bfa48f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-font.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc
@@ -46,11 +46,9 @@ struct hb_ot_face_metrics_accelerator_t
hb_blob_t *blob;
inline void init (hb_face_t *face,
- hb_tag_t _hea_tag, hb_tag_t _mtx_tag,
- unsigned int default_advance_)
+ hb_tag_t _hea_tag, hb_tag_t _mtx_tag)
{
- this->default_advance = default_advance_;
- this->num_metrics = face->get_num_glyphs ();
+ this->default_advance = face->get_upem ();
hb_blob_t *_hea_blob = OT::Sanitizer<OT::_hea>::sanitize (face->reference_table (_hea_tag));
const OT::_hea *_hea = OT::Sanitizer<OT::_hea>::lock_instance (_hea_blob);
@@ -58,8 +56,16 @@ struct hb_ot_face_metrics_accelerator_t
hb_blob_destroy (_hea_blob);
this->blob = OT::Sanitizer<OT::_mtx>::sanitize (face->reference_table (_mtx_tag));
- if (unlikely (!this->num_advances ||
- 2 * (this->num_advances + this->num_metrics) < hb_blob_get_length (this->blob)))
+
+ /* Cap num_metrics() and num_advances() based on table length. */
+ unsigned int len = hb_blob_get_length (this->blob);
+ if (unlikely (this->num_advances * 4 > len))
+ this->num_advances = len / 4;
+ this->num_metrics = this->num_advances + (len - 4 * this->num_advances) / 2;
+
+ /* We MUST set num_metrics to zero if num_advances is zero.
+ * Our get_advance() depends on that. */
+ if (unlikely (!this->num_advances))
{
this->num_metrics = this->num_advances = 0;
hb_blob_destroy (this->blob);
@@ -238,19 +244,16 @@ struct hb_ot_font_t
static hb_ot_font_t *
-_hb_ot_font_create (hb_font_t *font)
+_hb_ot_font_create (hb_face_t *face)
{
hb_ot_font_t *ot_font = (hb_ot_font_t *) calloc (1, sizeof (hb_ot_font_t));
- hb_face_t *face = font->face;
if (unlikely (!ot_font))
return NULL;
- unsigned int upem = face->get_upem ();
-
ot_font->cmap.init (face);
- ot_font->h_metrics.init (face, HB_OT_TAG_hhea, HB_OT_TAG_hmtx, upem>>1);
- ot_font->v_metrics.init (face, HB_OT_TAG_vhea, HB_OT_TAG_vmtx, upem); /* TODO Can we do this lazily? */
+ ot_font->h_metrics.init (face, HB_OT_TAG_hhea, HB_OT_TAG_hmtx);
+ ot_font->v_metrics.init (face, HB_OT_TAG_vhea, HB_OT_TAG_vmtx); /* TODO Can we do this lazily? */
ot_font->glyf.init (face);
return ot_font;
@@ -262,6 +265,7 @@ _hb_ot_font_destroy (hb_ot_font_t *ot_font)
ot_font->cmap.fini ();
ot_font->h_metrics.fini ();
ot_font->v_metrics.fini ();
+ ot_font->glyf.fini ();
free (ot_font);
}
@@ -301,52 +305,6 @@ hb_ot_get_glyph_v_advance (hb_font_t *font HB_UNUSED,
}
static hb_bool_t
-hb_ot_get_glyph_h_origin (hb_font_t *font HB_UNUSED,
- void *font_data HB_UNUSED,
- hb_codepoint_t glyph HB_UNUSED,
- hb_position_t *x HB_UNUSED,
- hb_position_t *y HB_UNUSED,
- void *user_data HB_UNUSED)
-{
- /* We always work in the horizontal coordinates. */
- return true;
-}
-
-static hb_bool_t
-hb_ot_get_glyph_v_origin (hb_font_t *font HB_UNUSED,
- void *font_data,
- hb_codepoint_t glyph,
- hb_position_t *x,
- hb_position_t *y,
- void *user_data HB_UNUSED)
-{
- /* TODO */
- return false;
-}
-
-static hb_position_t
-hb_ot_get_glyph_h_kerning (hb_font_t *font,
- void *font_data,
- hb_codepoint_t left_glyph,
- hb_codepoint_t right_glyph,
- void *user_data HB_UNUSED)
-{
- /* TODO */
- return 0;
-}
-
-static hb_position_t
-hb_ot_get_glyph_v_kerning (hb_font_t *font HB_UNUSED,
- void *font_data HB_UNUSED,
- hb_codepoint_t top_glyph HB_UNUSED,
- hb_codepoint_t bottom_glyph HB_UNUSED,
- void *user_data HB_UNUSED)
-{
- /* OpenType doesn't have vertical-kerning other than GPOS. */
- return 0;
-}
-
-static hb_bool_t
hb_ot_get_glyph_extents (hb_font_t *font HB_UNUSED,
void *font_data,
hb_codepoint_t glyph,
@@ -362,68 +320,64 @@ hb_ot_get_glyph_extents (hb_font_t *font HB_UNUSED,
return ret;
}
-static hb_bool_t
-hb_ot_get_glyph_contour_point (hb_font_t *font HB_UNUSED,
- void *font_data,
- hb_codepoint_t glyph,
- unsigned int point_index,
- hb_position_t *x,
- hb_position_t *y,
- void *user_data HB_UNUSED)
-{
- /* TODO */
- return false;
-}
-static hb_bool_t
-hb_ot_get_glyph_name (hb_font_t *font HB_UNUSED,
- void *font_data,
- hb_codepoint_t glyph,
- char *name, unsigned int size,
- void *user_data HB_UNUSED)
-{
- /* TODO */
- return false;
-}
+static hb_font_funcs_t *static_ot_funcs = NULL;
-static hb_bool_t
-hb_ot_get_glyph_from_name (hb_font_t *font HB_UNUSED,
- void *font_data,
- const char *name, int len, /* -1 means nul-terminated */
- hb_codepoint_t *glyph,
- void *user_data HB_UNUSED)
+#ifdef HB_USE_ATEXIT
+static
+void free_static_ot_funcs (void)
{
- /* TODO */
- return false;
+ hb_font_funcs_destroy (static_ot_funcs);
}
-
+#endif
static hb_font_funcs_t *
_hb_ot_get_font_funcs (void)
{
- static const hb_font_funcs_t ot_ffuncs = {
- HB_OBJECT_HEADER_STATIC,
-
- true, /* immutable */
+retry:
+ hb_font_funcs_t *funcs = (hb_font_funcs_t *) hb_atomic_ptr_get (&static_ot_funcs);
- {
-#define HB_FONT_FUNC_IMPLEMENT(name) hb_ot_get_##name,
- HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_FONT_FUNC_IMPLEMENT
+ if (unlikely (!funcs))
+ {
+ funcs = hb_font_funcs_create ();
+
+ hb_font_funcs_set_glyph_func (funcs, hb_ot_get_glyph, NULL, NULL);
+ hb_font_funcs_set_glyph_h_advance_func (funcs, hb_ot_get_glyph_h_advance, NULL, NULL);
+ hb_font_funcs_set_glyph_v_advance_func (funcs, hb_ot_get_glyph_v_advance, NULL, NULL);
+ //hb_font_funcs_set_glyph_h_origin_func (funcs, hb_ot_get_glyph_h_origin, NULL, NULL);
+ //hb_font_funcs_set_glyph_v_origin_func (funcs, hb_ot_get_glyph_v_origin, NULL, NULL);
+ //hb_font_funcs_set_glyph_h_kerning_func (funcs, hb_ot_get_glyph_h_kerning, NULL, NULL); TODO
+ //hb_font_funcs_set_glyph_v_kerning_func (funcs, hb_ot_get_glyph_v_kerning, NULL, NULL);
+ hb_font_funcs_set_glyph_extents_func (funcs, hb_ot_get_glyph_extents, NULL, NULL);
+ //hb_font_funcs_set_glyph_contour_point_func (funcs, hb_ot_get_glyph_contour_point, NULL, NULL); TODO
+ //hb_font_funcs_set_glyph_name_func (funcs, hb_ot_get_glyph_name, NULL, NULL); TODO
+ //hb_font_funcs_set_glyph_from_name_func (funcs, hb_ot_get_glyph_from_name, NULL, NULL); TODO
+
+ hb_font_funcs_make_immutable (funcs);
+
+ if (!hb_atomic_ptr_cmpexch (&static_ot_funcs, NULL, funcs)) {
+ hb_font_funcs_destroy (funcs);
+ goto retry;
}
+
+#ifdef HB_USE_ATEXIT
+ atexit (free_static_ot_funcs); /* First person registers atexit() callback. */
+#endif
};
- return const_cast<hb_font_funcs_t *> (&ot_ffuncs);
+ return funcs;
}
/**
+ * hb_ot_font_set_funcs:
+ *
* Since: 0.9.28
**/
void
hb_ot_font_set_funcs (hb_font_t *font)
{
- hb_ot_font_t *ot_font = _hb_ot_font_create (font);
+ hb_ot_font_t *ot_font = _hb_ot_font_create (font->face);
if (unlikely (!ot_font))
return;
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-font.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.h
index b9947a16bc8..80eaa54b1ad 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-font.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.h
@@ -36,7 +36,7 @@
HB_BEGIN_DECLS
-void
+HB_EXTERN void
hb_ot_font_set_funcs (hb_font_t *font);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-glyf-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-glyf-table.hh
index 9e5af6d10df..9e5af6d10df 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-glyf-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-glyf-table.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-head-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-head-table.hh
index fc351cfb48e..fc351cfb48e 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-head-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-head-table.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-hhea-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hhea-table.hh
index 24114534a71..24114534a71 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-hhea-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hhea-table.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-hmtx-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hmtx-table.hh
index 49056e67691..49056e67691 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-hmtx-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hmtx-table.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-common-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common-private.hh
index 6f818cb1351..5b21f142766 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-common-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common-private.hh
@@ -34,6 +34,14 @@
#include "hb-set-private.hh"
+#ifndef HB_MAX_NESTING_LEVEL
+#define HB_MAX_NESTING_LEVEL 6
+#endif
+#ifndef HB_MAX_CONTEXT_LENGTH
+#define HB_MAX_CONTEXT_LENGTH 64
+#endif
+
+
namespace OT {
@@ -44,8 +52,6 @@ namespace OT {
#define NOT_COVERED ((unsigned int) -1)
-#define MAX_NESTING_LEVEL 8
-#define MAX_CONTEXT_LENGTH 64
@@ -573,6 +579,11 @@ struct LookupFlag : USHORT
DEFINE_SIZE_STATIC (2);
};
+} /* namespace OT */
+/* This has to be outside the namespace. */
+HB_MARK_AS_FLAG_T (OT::LookupFlag::Flags);
+namespace OT {
+
struct Lookup
{
inline unsigned int get_subtable_count (void) const { return subTable.len; }
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-gdef-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gdef-table.hh
index bc36436be78..bc36436be78 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-gdef-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gdef-table.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-gpos-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh
index 286253d705a..8bb91071df3 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-gpos-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh
@@ -426,6 +426,7 @@ struct MarkArray : ArrayOf<MarkRecord> /* Array of MarkRecords--in Coverage orde
o.x_offset = base_x - mark_x;
o.y_offset = base_y - mark_y;
o.attach_lookback() = buffer->idx - glyph_pos;
+ buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_GPOS_ATTACHMENT;
buffer->idx++;
return_trace (true);
@@ -548,7 +549,7 @@ struct SinglePos
inline typename context_t::return_t dispatch (context_t *c) const
{
TRACE_DISPATCH (this, u.format);
- if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->default_return_value ());
+ if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
switch (u.format) {
case 1: return_trace (c->dispatch (u.format1));
case 2: return_trace (c->dispatch (u.format2));
@@ -704,6 +705,8 @@ struct PairPosFormat1
{
TRACE_SANITIZE (this);
+ if (!c->check_struct (this)) return_trace (false);
+
unsigned int len1 = valueFormat1.get_len ();
unsigned int len2 = valueFormat2.get_len ();
PairSet::sanitize_closure_t closure = {
@@ -713,7 +716,7 @@ struct PairPosFormat1
1 + len1 + len2
};
- return_trace (c->check_struct (this) && coverage.sanitize (c, this) && pairSet.sanitize (c, this, &closure));
+ return_trace (coverage.sanitize (c, this) && pairSet.sanitize (c, this, &closure));
}
protected:
@@ -843,7 +846,7 @@ struct PairPos
inline typename context_t::return_t dispatch (context_t *c) const
{
TRACE_DISPATCH (this, u.format);
- if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->default_return_value ());
+ if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
switch (u.format) {
case 1: return_trace (c->dispatch (u.format1));
case 2: return_trace (c->dispatch (u.format2));
@@ -991,6 +994,7 @@ struct CursivePosFormat1
reverse_cursive_minor_offset (pos, child, c->direction, parent);
pos[child].cursive_chain() = parent - child;
+ buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_GPOS_CURSIVE;
if (likely (HB_DIRECTION_IS_HORIZONTAL (c->direction)))
pos[child].y_offset = y_offset;
else
@@ -1024,7 +1028,7 @@ struct CursivePos
inline typename context_t::return_t dispatch (context_t *c) const
{
TRACE_DISPATCH (this, u.format);
- if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->default_return_value ());
+ if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
switch (u.format) {
case 1: return_trace (c->dispatch (u.format1));
default:return_trace (c->default_return_value ());
@@ -1120,7 +1124,7 @@ struct MarkBasePos
inline typename context_t::return_t dispatch (context_t *c) const
{
TRACE_DISPATCH (this, u.format);
- if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->default_return_value ());
+ if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
switch (u.format) {
case 1: return_trace (c->dispatch (u.format1));
default:return_trace (c->default_return_value ());
@@ -1238,7 +1242,7 @@ struct MarkLigPos
inline typename context_t::return_t dispatch (context_t *c) const
{
TRACE_DISPATCH (this, u.format);
- if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->default_return_value ());
+ if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
switch (u.format) {
case 1: return_trace (c->dispatch (u.format1));
default:return_trace (c->default_return_value ());
@@ -1353,7 +1357,7 @@ struct MarkMarkPos
inline typename context_t::return_t dispatch (context_t *c) const
{
TRACE_DISPATCH (this, u.format);
- if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->default_return_value ());
+ if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
switch (u.format) {
case 1: return_trace (c->dispatch (u.format1));
default:return_trace (c->default_return_value ());
@@ -1404,8 +1408,7 @@ struct PosLookupSubTable
inline typename context_t::return_t dispatch (context_t *c, unsigned int lookup_type) const
{
TRACE_DISPATCH (this, lookup_type);
- /* The sub_format passed to may_dispatch is unnecessary but harmless. */
- if (unlikely (!c->may_dispatch (this, &u.sub_format))) return_trace (c->default_return_value ());
+ if (unlikely (!c->may_dispatch (this, &u.sub_format))) return_trace (c->no_dispatch_return_value ());
switch (lookup_type) {
case Single: return_trace (u.single.dispatch (c));
case Pair: return_trace (u.pair.dispatch (c));
@@ -1598,12 +1601,14 @@ GPOS::position_finish (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer)
hb_direction_t direction = buffer->props.direction;
/* Handle cursive connections */
- for (unsigned int i = 0; i < len; i++)
- fix_cursive_minor_offset (pos, i, direction);
+ if (buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_GPOS_CURSIVE)
+ for (unsigned int i = 0; i < len; i++)
+ fix_cursive_minor_offset (pos, i, direction);
/* Handle attachments */
- for (unsigned int i = 0; i < len; i++)
- fix_mark_attachment (pos, i, direction);
+ if (buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_GPOS_ATTACHMENT)
+ for (unsigned int i = 0; i < len; i++)
+ fix_mark_attachment (pos, i, direction);
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-gsub-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh
index c578254d4d2..459a1a3dd5c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-gsub-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh
@@ -225,7 +225,7 @@ struct SingleSubst
inline typename context_t::return_t dispatch (context_t *c) const
{
TRACE_DISPATCH (this, u.format);
- if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->default_return_value ());
+ if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
switch (u.format) {
case 1: return_trace (c->dispatch (u.format1));
case 2: return_trace (c->dispatch (u.format2));
@@ -418,7 +418,7 @@ struct MultipleSubst
inline typename context_t::return_t dispatch (context_t *c) const
{
TRACE_DISPATCH (this, u.format);
- if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->default_return_value ());
+ if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
switch (u.format) {
case 1: return_trace (c->dispatch (u.format1));
default:return_trace (c->default_return_value ());
@@ -562,7 +562,7 @@ struct AlternateSubst
inline typename context_t::return_t dispatch (context_t *c) const
{
TRACE_DISPATCH (this, u.format);
- if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->default_return_value ());
+ if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
switch (u.format) {
case 1: return_trace (c->dispatch (u.format1));
default:return_trace (c->default_return_value ());
@@ -630,7 +630,7 @@ struct Ligature
unsigned int total_component_count = 0;
unsigned int match_length = 0;
- unsigned int match_positions[MAX_CONTEXT_LENGTH];
+ unsigned int match_positions[HB_MAX_CONTEXT_LENGTH];
if (likely (!match_input (c, count,
&component[1],
@@ -878,7 +878,7 @@ struct LigatureSubst
inline typename context_t::return_t dispatch (context_t *c) const
{
TRACE_DISPATCH (this, u.format);
- if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->default_return_value ());
+ if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
switch (u.format) {
case 1: return_trace (c->dispatch (u.format1));
default:return_trace (c->default_return_value ());
@@ -970,7 +970,7 @@ struct ReverseChainSingleSubstFormat1
inline bool apply (hb_apply_context_t *c) const
{
TRACE_APPLY (this);
- if (unlikely (c->nesting_level_left != MAX_NESTING_LEVEL))
+ if (unlikely (c->nesting_level_left != HB_MAX_NESTING_LEVEL))
return_trace (false); /* No chaining to this type */
unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
@@ -1035,7 +1035,7 @@ struct ReverseChainSingleSubst
inline typename context_t::return_t dispatch (context_t *c) const
{
TRACE_DISPATCH (this, u.format);
- if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->default_return_value ());
+ if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
switch (u.format) {
case 1: return_trace (c->dispatch (u.format1));
default:return_trace (c->default_return_value ());
@@ -1074,8 +1074,7 @@ struct SubstLookupSubTable
inline typename context_t::return_t dispatch (context_t *c, unsigned int lookup_type) const
{
TRACE_DISPATCH (this, lookup_type);
- /* The sub_format passed to may_dispatch is unnecessary but harmless. */
- if (unlikely (!c->may_dispatch (this, &u.sub_format))) return_trace (c->default_return_value ());
+ if (unlikely (!c->may_dispatch (this, &u.sub_format))) return_trace (c->no_dispatch_return_value ());
switch (lookup_type) {
case Single: return_trace (u.single.dispatch (c));
case Multiple: return_trace (u.multiple.dispatch (c));
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-gsubgpos-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh
index 6cf1ffca7ef..2873d0f0977 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-gsubgpos-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh
@@ -46,14 +46,11 @@ namespace OT {
(&c->debug_depth, c->get_name (), this, HB_FUNC, \
"");
-struct hb_closure_context_t
+struct hb_closure_context_t :
+ hb_dispatch_context_t<hb_closure_context_t, hb_void_t, HB_DEBUG_CLOSURE>
{
inline const char *get_name (void) { return "CLOSURE"; }
- static const unsigned int max_debug_depth = HB_DEBUG_CLOSURE;
- typedef hb_void_t return_t;
typedef return_t (*recurse_func_t) (hb_closure_context_t *c, unsigned int lookup_index);
- template <typename T, typename F>
- inline bool may_dispatch (const T *obj, const F *format) { return true; }
template <typename T>
inline return_t dispatch (const T &obj) { obj.closure (this); return HB_VOID; }
static return_t default_return_value (void) { return HB_VOID; }
@@ -77,7 +74,7 @@ struct hb_closure_context_t
hb_closure_context_t (hb_face_t *face_,
hb_set_t *glyphs_,
- unsigned int nesting_level_left_ = MAX_NESTING_LEVEL) :
+ unsigned int nesting_level_left_ = HB_MAX_NESTING_LEVEL) :
face (face_),
glyphs (glyphs_),
recurse_func (NULL),
@@ -98,13 +95,10 @@ struct hb_closure_context_t
(&c->debug_depth, c->get_name (), this, HB_FUNC, \
"%d glyphs", c->len);
-struct hb_would_apply_context_t
+struct hb_would_apply_context_t :
+ hb_dispatch_context_t<hb_would_apply_context_t, bool, HB_DEBUG_WOULD_APPLY>
{
inline const char *get_name (void) { return "WOULD_APPLY"; }
- static const unsigned int max_debug_depth = HB_DEBUG_WOULD_APPLY;
- typedef bool return_t;
- template <typename T, typename F>
- inline bool may_dispatch (const T *obj, const F *format) { return true; }
template <typename T>
inline return_t dispatch (const T &obj) { return obj.would_apply (this); }
static return_t default_return_value (void) { return false; }
@@ -138,14 +132,11 @@ struct hb_would_apply_context_t
(&c->debug_depth, c->get_name (), this, HB_FUNC, \
"");
-struct hb_collect_glyphs_context_t
+struct hb_collect_glyphs_context_t :
+ hb_dispatch_context_t<hb_collect_glyphs_context_t, hb_void_t, HB_DEBUG_COLLECT_GLYPHS>
{
inline const char *get_name (void) { return "COLLECT_GLYPHS"; }
- static const unsigned int max_debug_depth = HB_DEBUG_COLLECT_GLYPHS;
- typedef hb_void_t return_t;
typedef return_t (*recurse_func_t) (hb_collect_glyphs_context_t *c, unsigned int lookup_index);
- template <typename T, typename F>
- inline bool may_dispatch (const T *obj, const F *format) { return true; }
template <typename T>
inline return_t dispatch (const T &obj) { obj.collect_glyphs (this); return HB_VOID; }
static return_t default_return_value (void) { return HB_VOID; }
@@ -205,7 +196,7 @@ struct hb_collect_glyphs_context_t
hb_set_t *glyphs_input, /* OUT. May be NULL */
hb_set_t *glyphs_after, /* OUT. May be NULL */
hb_set_t *glyphs_output, /* OUT. May be NULL */
- unsigned int nesting_level_left_ = MAX_NESTING_LEVEL) :
+ unsigned int nesting_level_left_ = HB_MAX_NESTING_LEVEL) :
face (face_),
before (glyphs_before ? glyphs_before : hb_set_get_empty ()),
input (glyphs_input ? glyphs_input : hb_set_get_empty ()),
@@ -232,14 +223,14 @@ struct hb_collect_glyphs_context_t
#define HB_DEBUG_GET_COVERAGE (HB_DEBUG+0)
#endif
+/* XXX Can we remove this? */
+
template <typename set_t>
-struct hb_add_coverage_context_t
+struct hb_add_coverage_context_t :
+ hb_dispatch_context_t<hb_add_coverage_context_t<set_t>, const Coverage &, HB_DEBUG_GET_COVERAGE>
{
inline const char *get_name (void) { return "GET_COVERAGE"; }
- static const unsigned int max_debug_depth = HB_DEBUG_GET_COVERAGE;
typedef const Coverage &return_t;
- template <typename T, typename F>
- inline bool may_dispatch (const T *obj, const F *format) { return true; }
template <typename T>
inline return_t dispatch (const T &obj) { return obj.get_coverage (); }
static return_t default_return_value (void) { return Null(Coverage); }
@@ -269,7 +260,8 @@ struct hb_add_coverage_context_t
"idx %d gid %u lookup %d", \
c->buffer->idx, c->buffer->cur().codepoint, (int) c->lookup_index);
-struct hb_apply_context_t
+struct hb_apply_context_t :
+ hb_dispatch_context_t<hb_apply_context_t, bool, HB_DEBUG_APPLY>
{
struct matcher_t
{
@@ -363,11 +355,11 @@ struct hb_apply_context_t
{
matcher.set_lookup_props (lookup_props);
}
- inline void set_match_func (matcher_t::match_func_t match_func,
- const void *match_data,
+ inline void set_match_func (matcher_t::match_func_t match_func_,
+ const void *match_data_,
const USHORT glyph_data[])
{
- matcher.set_match_func (match_func, match_data);
+ matcher.set_match_func (match_func_, match_data_);
match_glyph_data = glyph_data;
}
@@ -449,11 +441,7 @@ struct hb_apply_context_t
inline const char *get_name (void) { return "APPLY"; }
- static const unsigned int max_debug_depth = HB_DEBUG_APPLY;
- typedef bool return_t;
typedef return_t (*recurse_func_t) (hb_apply_context_t *c, unsigned int lookup_index);
- template <typename T, typename F>
- inline bool may_dispatch (const T *obj, const F *format) { return true; }
template <typename T>
inline return_t dispatch (const T &obj) { return obj.apply (this); }
static return_t default_return_value (void) { return false; }
@@ -495,7 +483,7 @@ struct hb_apply_context_t
lookup_mask (1),
auto_zwj (true),
recurse_func (NULL),
- nesting_level_left (MAX_NESTING_LEVEL),
+ nesting_level_left (HB_MAX_NESTING_LEVEL),
lookup_props (0),
gdef (*hb_ot_layout_from_face (face)->gdef),
has_glyph_classes (gdef.has_glyph_classes ()),
@@ -716,13 +704,13 @@ static inline bool match_input (hb_apply_context_t *c,
match_func_t match_func,
const void *match_data,
unsigned int *end_offset,
- unsigned int match_positions[MAX_CONTEXT_LENGTH],
+ unsigned int match_positions[HB_MAX_CONTEXT_LENGTH],
bool *p_is_mark_ligature = NULL,
unsigned int *p_total_component_count = NULL)
{
TRACE_APPLY (NULL);
- if (unlikely (count > MAX_CONTEXT_LENGTH)) return_trace (false);
+ if (unlikely (count > HB_MAX_CONTEXT_LENGTH)) return_trace (false);
hb_buffer_t *buffer = c->buffer;
@@ -796,7 +784,7 @@ static inline bool match_input (hb_apply_context_t *c,
}
static inline bool ligate_input (hb_apply_context_t *c,
unsigned int count, /* Including the first glyph */
- unsigned int match_positions[MAX_CONTEXT_LENGTH], /* Including the first glyph */
+ unsigned int match_positions[HB_MAX_CONTEXT_LENGTH], /* Including the first glyph */
unsigned int match_length,
hb_codepoint_t lig_glyph,
bool is_mark_ligature,
@@ -848,14 +836,13 @@ static inline bool ligate_input (hb_apply_context_t *c,
if (_hb_glyph_info_get_general_category (&buffer->cur()) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)
{
_hb_glyph_info_set_general_category (&buffer->cur(), HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER);
- _hb_glyph_info_set_modified_combining_class (&buffer->cur(), 0);
}
}
c->replace_glyph_with_ligature (lig_glyph, klass);
for (unsigned int i = 1; i < count; i++)
{
- while (buffer->idx < match_positions[i])
+ while (buffer->idx < match_positions[i] && !buffer->in_error)
{
if (!is_mark_ligature) {
unsigned int new_lig_comp = components_so_far - last_num_components +
@@ -956,7 +943,7 @@ static inline void recurse_lookups (context_t *c,
static inline bool apply_lookup (hb_apply_context_t *c,
unsigned int count, /* Including the first glyph */
- unsigned int match_positions[MAX_CONTEXT_LENGTH], /* Including the first glyph */
+ unsigned int match_positions[HB_MAX_CONTEXT_LENGTH], /* Including the first glyph */
unsigned int lookupCount,
const LookupRecord lookupRecord[], /* Array of LookupRecords--in design order */
unsigned int match_length)
@@ -984,6 +971,11 @@ static inline bool apply_lookup (hb_apply_context_t *c,
if (idx >= count)
continue;
+ /* Don't recurse to ourself at same position.
+ * Note that this test is too naive, it doesn't catch longer loops. */
+ if (idx == 0 && lookupRecord[i].lookupListIndex == c->lookup_index)
+ continue;
+
buffer->move_to (match_positions[idx]);
unsigned int orig_len = buffer->backtrack_len () + buffer->lookahead_len ();
@@ -1001,13 +993,13 @@ static inline bool apply_lookup (hb_apply_context_t *c,
/* end can't go back past the current match position.
* Note: this is only true because we do NOT allow MultipleSubst
* with zero sequence len. */
- end = MAX ((int) match_positions[idx] + 1, int (end) + delta);
+ end = MAX (MIN((int) match_positions[idx] + 1, (int) new_len), int (end) + delta);
unsigned int next = idx + 1; /* next now is the position after the recursed lookup. */
if (delta > 0)
{
- if (unlikely (delta + count > MAX_CONTEXT_LENGTH))
+ if (unlikely (delta + count > HB_MAX_CONTEXT_LENGTH))
break;
}
else
@@ -1106,7 +1098,7 @@ static inline bool context_apply_lookup (hb_apply_context_t *c,
ContextApplyLookupContext &lookup_context)
{
unsigned int match_length = 0;
- unsigned int match_positions[MAX_CONTEXT_LENGTH];
+ unsigned int match_positions[HB_MAX_CONTEXT_LENGTH];
return match_input (c,
inputCount, input,
lookup_context.funcs.match, lookup_context.match_data,
@@ -1517,7 +1509,7 @@ struct Context
inline typename context_t::return_t dispatch (context_t *c) const
{
TRACE_DISPATCH (this, u.format);
- if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->default_return_value ());
+ if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
switch (u.format) {
case 1: return_trace (c->dispatch (u.format1));
case 2: return_trace (c->dispatch (u.format2));
@@ -1633,7 +1625,7 @@ static inline bool chain_context_apply_lookup (hb_apply_context_t *c,
ChainContextApplyLookupContext &lookup_context)
{
unsigned int match_length = 0;
- unsigned int match_positions[MAX_CONTEXT_LENGTH];
+ unsigned int match_positions[HB_MAX_CONTEXT_LENGTH];
return match_input (c,
inputCount, input,
lookup_context.funcs.match, lookup_context.match_data[1],
@@ -2132,7 +2124,7 @@ struct ChainContext
inline typename context_t::return_t dispatch (context_t *c) const
{
TRACE_DISPATCH (this, u.format);
- if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->default_return_value ());
+ if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
switch (u.format) {
case 1: return_trace (c->dispatch (u.format1));
case 2: return_trace (c->dispatch (u.format2));
@@ -2168,7 +2160,7 @@ struct ExtensionFormat1
inline typename context_t::return_t dispatch (context_t *c) const
{
TRACE_DISPATCH (this, format);
- if (unlikely (!c->may_dispatch (this, this))) return_trace (c->default_return_value ());
+ if (unlikely (!c->may_dispatch (this, this))) return_trace (c->no_dispatch_return_value ());
return_trace (get_subtable<typename T::LookupSubTable> ().dispatch (c, get_type ()));
}
@@ -2213,7 +2205,7 @@ struct Extension
inline typename context_t::return_t dispatch (context_t *c) const
{
TRACE_DISPATCH (this, u.format);
- if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->default_return_value ());
+ if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
switch (u.format) {
case 1: return_trace (u.format1.dispatch (c));
default:return_trace (c->default_return_value ());
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-jstf-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-jstf-table.hh
index 7e199c2e14c..7e199c2e14c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-jstf-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-jstf-table.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh
index d168e27f534..45897ed5a81 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh
@@ -49,7 +49,7 @@ hb_ot_layout_table_find_feature (hb_face_t *face,
* GDEF
*/
-typedef enum
+enum hb_ot_layout_glyph_props_flags_t
{
/* The following three match LookupFlags::Ignore* numbers. */
HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH = 0x02u,
@@ -64,7 +64,8 @@ typedef enum
HB_OT_LAYOUT_GLYPH_PROPS_PRESERVE = HB_OT_LAYOUT_GLYPH_PROPS_SUBSTITUTED |
HB_OT_LAYOUT_GLYPH_PROPS_LIGATED |
HB_OT_LAYOUT_GLYPH_PROPS_MULTIPLIED
-} hb_ot_layout_glyph_class_mask_t;
+};
+HB_MARK_AS_FLAG_T (hb_ot_layout_glyph_props_flags_t);
/*
@@ -180,8 +181,7 @@ _hb_ot_layout_destroy (hb_ot_layout_t *layout);
*/
/* buffer var allocations, used during the entire shaping process */
-#define unicode_props0() var2.u8[0]
-#define unicode_props1() var2.u8[1]
+#define unicode_props() var2.u16[0]
/* buffer var allocations, used during the GSUB/GPOS processing */
#define glyph_props() var1.u16[0] /* GDEF glyph properties */
@@ -214,48 +214,123 @@ _next_syllable (hb_buffer_t *buffer, unsigned int start)
/* unicode_props */
-enum {
- MASK0_ZWJ = 0x20u,
- MASK0_ZWNJ = 0x40u,
- MASK0_IGNORABLE = 0x80u,
- MASK0_GEN_CAT = 0x1Fu
+/* Design:
+ * unicode_props() is a two-byte number. The low byte includes:
+ * - General_Category: 5 bits.
+ * - A bit each for:
+ * * Is it Default_Ignorable(); we have a modified Default_Ignorable().
+ * * Is it U+200D ZWJ?
+ * * Is it U+200C ZWNJ?
+ *
+ * The high-byte has different meanings, switched by the Gen-Cat:
+ * - For Mn,Mc,Me: the modified Combining_Class.
+ * - For Ws: index of which space character this is, if space fallback
+ * is needed, ie. we don't set this by default, only if asked to.
+ *
+ * If needed, we can use the ZWJ/ZWNJ to use the high byte as well,
+ * freeing two more bits.
+ */
+
+enum hb_unicode_props_flags_t {
+ UPROPS_MASK_ZWJ = 0x20u,
+ UPROPS_MASK_ZWNJ = 0x40u,
+ UPROPS_MASK_IGNORABLE = 0x80u,
+ UPROPS_MASK_GEN_CAT = 0x1Fu
};
+HB_MARK_AS_FLAG_T (hb_unicode_props_flags_t);
static inline void
-_hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_unicode_funcs_t *unicode)
+_hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_buffer_t *buffer)
{
- /* XXX This shouldn't be inlined, or at least not while is_default_ignorable() is inline. */
- info->unicode_props0() = ((unsigned int) unicode->general_category (info->codepoint)) |
- (unicode->is_default_ignorable (info->codepoint) ? MASK0_IGNORABLE : 0) |
- (info->codepoint == 0x200Cu ? MASK0_ZWNJ : 0) |
- (info->codepoint == 0x200Du ? MASK0_ZWJ : 0);
- info->unicode_props1() = unicode->modified_combining_class (info->codepoint);
+ hb_unicode_funcs_t *unicode = buffer->unicode;
+ unsigned int u = info->codepoint;
+ unsigned int gen_cat = (unsigned int) unicode->general_category (u);
+ unsigned int props = gen_cat;
+
+ if (u >= 0x80)
+ {
+ buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_NON_ASCII;
+ if (unlikely (unicode->is_default_ignorable (u)))
+ {
+ buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_DEFAULT_IGNORABLES;
+ props |= UPROPS_MASK_IGNORABLE;
+ if (u == 0x200Cu) props |= UPROPS_MASK_ZWNJ;
+ if (u == 0x200Du) props |= UPROPS_MASK_ZWJ;
+ }
+ else if (unlikely (HB_UNICODE_GENERAL_CATEGORY_IS_NON_ENCLOSING_MARK (gen_cat)))
+ {
+ /* Only Mn and Mc can have non-zero ccc:
+ * http://www.unicode.org/policies/stability_policy.html#Property_Value
+ * """
+ * Canonical_Combining_Class, General_Category
+ * All characters other than those with General_Category property values
+ * Spacing_Mark (Mc) and Nonspacing_Mark (Mn) have the Canonical_Combining_Class
+ * property value 0.
+ * 1.1.5+
+ * """
+ *
+ * Also, all Mn's that are Default_Ignorable, have ccc=0, hence
+ * the "else if".
+ */
+ props |= unicode->modified_combining_class (info->codepoint)<<8;
+ }
+ }
+
+ info->unicode_props() = props;
}
static inline void
_hb_glyph_info_set_general_category (hb_glyph_info_t *info,
hb_unicode_general_category_t gen_cat)
{
- info->unicode_props0() = (unsigned int) gen_cat | ((info->unicode_props0()) & ~MASK0_GEN_CAT);
+ /* Clears top-byte. */
+ info->unicode_props() = (unsigned int) gen_cat | (info->unicode_props() & (0xFF & ~UPROPS_MASK_GEN_CAT));
}
static inline hb_unicode_general_category_t
_hb_glyph_info_get_general_category (const hb_glyph_info_t *info)
{
- return (hb_unicode_general_category_t) (info->unicode_props0() & MASK0_GEN_CAT);
+ return (hb_unicode_general_category_t) (info->unicode_props() & UPROPS_MASK_GEN_CAT);
}
+static inline bool
+_hb_glyph_info_is_unicode_mark (const hb_glyph_info_t *info)
+{
+ return HB_UNICODE_GENERAL_CATEGORY_IS_MARK (info->unicode_props() & UPROPS_MASK_GEN_CAT);
+}
static inline void
_hb_glyph_info_set_modified_combining_class (hb_glyph_info_t *info,
unsigned int modified_class)
{
- info->unicode_props1() = modified_class;
+ if (unlikely (!_hb_glyph_info_is_unicode_mark (info)))
+ return;
+ info->unicode_props() = (modified_class<<8) | (info->unicode_props() & 0xFF);
}
-
static inline unsigned int
_hb_glyph_info_get_modified_combining_class (const hb_glyph_info_t *info)
{
- return info->unicode_props1();
+ return _hb_glyph_info_is_unicode_mark (info) ? info->unicode_props()>>8 : 0;
+}
+
+static inline bool
+_hb_glyph_info_is_unicode_space (const hb_glyph_info_t *info)
+{
+ return _hb_glyph_info_get_general_category (info) ==
+ HB_UNICODE_GENERAL_CATEGORY_SPACE_SEPARATOR;
+}
+static inline void
+_hb_glyph_info_set_unicode_space_fallback_type (hb_glyph_info_t *info, hb_unicode_funcs_t::space_t s)
+{
+ if (unlikely (!_hb_glyph_info_is_unicode_space (info)))
+ return;
+ info->unicode_props() = (((unsigned int) s)<<8) | (info->unicode_props() & 0xFF);
+}
+static inline hb_unicode_funcs_t::space_t
+_hb_glyph_info_get_unicode_space_fallback_type (const hb_glyph_info_t *info)
+{
+ return _hb_glyph_info_is_unicode_space (info) ?
+ (hb_unicode_funcs_t::space_t) (info->unicode_props()>>8) :
+ hb_unicode_funcs_t::NOT_SPACE;
}
static inline bool _hb_glyph_info_ligated (const hb_glyph_info_t *info);
@@ -263,25 +338,25 @@ static inline bool _hb_glyph_info_ligated (const hb_glyph_info_t *info);
static inline hb_bool_t
_hb_glyph_info_is_default_ignorable (const hb_glyph_info_t *info)
{
- return (info->unicode_props0() & MASK0_IGNORABLE) && !_hb_glyph_info_ligated (info);
+ return (info->unicode_props() & UPROPS_MASK_IGNORABLE) && !_hb_glyph_info_ligated (info);
}
static inline hb_bool_t
_hb_glyph_info_is_zwnj (const hb_glyph_info_t *info)
{
- return !!(info->unicode_props0() & MASK0_ZWNJ);
+ return !!(info->unicode_props() & UPROPS_MASK_ZWNJ);
}
static inline hb_bool_t
_hb_glyph_info_is_zwj (const hb_glyph_info_t *info)
{
- return !!(info->unicode_props0() & MASK0_ZWJ);
+ return !!(info->unicode_props() & UPROPS_MASK_ZWJ);
}
static inline void
_hb_glyph_info_flip_joiners (hb_glyph_info_t *info)
{
- info->unicode_props0() ^= MASK0_ZWNJ | MASK0_ZWJ;
+ info->unicode_props() ^= UPROPS_MASK_ZWNJ | UPROPS_MASK_ZWJ;
}
/* lig_props: aka lig_id / lig_comp
@@ -455,22 +530,19 @@ _hb_glyph_info_clear_substituted_and_ligated_and_multiplied (hb_glyph_info_t *in
static inline void
_hb_buffer_allocate_unicode_vars (hb_buffer_t *buffer)
{
- HB_BUFFER_ALLOCATE_VAR (buffer, unicode_props0);
- HB_BUFFER_ALLOCATE_VAR (buffer, unicode_props1);
+ HB_BUFFER_ALLOCATE_VAR (buffer, unicode_props);
}
static inline void
_hb_buffer_deallocate_unicode_vars (hb_buffer_t *buffer)
{
- HB_BUFFER_DEALLOCATE_VAR (buffer, unicode_props0);
- HB_BUFFER_DEALLOCATE_VAR (buffer, unicode_props1);
+ HB_BUFFER_DEALLOCATE_VAR (buffer, unicode_props);
}
static inline void
_hb_buffer_assert_unicode_vars (hb_buffer_t *buffer)
{
- HB_BUFFER_ASSERT_VAR (buffer, unicode_props0);
- HB_BUFFER_ASSERT_VAR (buffer, unicode_props1);
+ HB_BUFFER_ASSERT_VAR (buffer, unicode_props);
}
static inline void
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc
index 1a6fb15ee99..b0257f6b9b6 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc
@@ -28,6 +28,7 @@
* Google Author(s): Behdad Esfahbod
*/
+#include "hb-open-type-private.hh"
#include "hb-ot-layout-private.hh"
#include "hb-ot-layout-gdef-table.hh"
@@ -129,6 +130,8 @@ hb_ot_layout_has_glyph_classes (hb_face_t *face)
}
/**
+ * hb_ot_layout_get_glyph_class:
+ *
* Since: 0.9.7
**/
hb_ot_layout_glyph_class_t
@@ -139,6 +142,8 @@ hb_ot_layout_get_glyph_class (hb_face_t *face,
}
/**
+ * hb_ot_layout_get_glyphs_in_class:
+ *
* Since: 0.9.7
**/
void
@@ -364,6 +369,8 @@ hb_ot_layout_language_get_required_feature_index (hb_face_t *face,
}
/**
+ * hb_ot_layout_language_get_required_feature:
+ *
* Since: 0.9.30
**/
hb_bool_t
@@ -741,7 +748,7 @@ hb_ot_layout_lookup_would_substitute_fast (hb_face_t *face,
hb_bool_t zero_context)
{
if (unlikely (lookup_index >= hb_ot_layout_from_face (face)->gsub_lookup_count)) return false;
- OT::hb_would_apply_context_t c (face, glyphs, glyphs_length, zero_context);
+ OT::hb_would_apply_context_t c (face, glyphs, glyphs_length, (bool) zero_context);
const OT::SubstLookup& l = hb_ot_layout_from_face (face)->gsub->get_lookup (lookup_index);
@@ -889,7 +896,7 @@ apply_forward (OT::hb_apply_context_t *c,
{
bool ret = false;
hb_buffer_t *buffer = c->buffer;
- while (buffer->idx < buffer->len)
+ while (buffer->idx < buffer->len && !buffer->in_error)
{
if (accel.may_have (buffer->cur().codepoint) &&
(buffer->cur().mask & c->lookup_mask) &&
@@ -925,13 +932,10 @@ apply_backward (OT::hb_apply_context_t *c,
return ret;
}
-struct hb_apply_forward_context_t
+struct hb_apply_forward_context_t :
+ OT::hb_dispatch_context_t<hb_apply_forward_context_t, bool, HB_DEBUG_APPLY>
{
inline const char *get_name (void) { return "APPLY_FWD"; }
- static const unsigned int max_debug_depth = HB_DEBUG_APPLY;
- typedef bool return_t;
- template <typename T, typename F>
- inline bool may_dispatch (const T *obj, const F *format) { return true; }
template <typename T>
inline return_t dispatch (const T &obj) { return apply_forward (c, obj, accel); }
static return_t default_return_value (void) { return false; }
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.h
index 949678ac422..eb23d45b68a 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-layout.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.h
@@ -48,7 +48,7 @@ HB_BEGIN_DECLS
* GDEF
*/
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_ot_layout_has_glyph_classes (hb_face_t *face);
typedef enum {
@@ -59,11 +59,11 @@ typedef enum {
HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT = 4
} hb_ot_layout_glyph_class_t;
-hb_ot_layout_glyph_class_t
+HB_EXTERN hb_ot_layout_glyph_class_t
hb_ot_layout_get_glyph_class (hb_face_t *face,
hb_codepoint_t glyph);
-void
+HB_EXTERN void
hb_ot_layout_get_glyphs_in_class (hb_face_t *face,
hb_ot_layout_glyph_class_t klass,
hb_set_t *glyphs /* OUT */);
@@ -71,7 +71,7 @@ hb_ot_layout_get_glyphs_in_class (hb_face_t *face,
/* Not that useful. Provides list of attach points for a glyph that a
* client may want to cache */
-unsigned int
+HB_EXTERN unsigned int
hb_ot_layout_get_attach_points (hb_face_t *face,
hb_codepoint_t glyph,
unsigned int start_offset,
@@ -79,7 +79,7 @@ hb_ot_layout_get_attach_points (hb_face_t *face,
unsigned int *point_array /* OUT */);
/* Ligature caret positions */
-unsigned int
+HB_EXTERN unsigned int
hb_ot_layout_get_ligature_carets (hb_font_t *font,
hb_direction_t direction,
hb_codepoint_t glyph,
@@ -96,35 +96,35 @@ hb_ot_layout_get_ligature_carets (hb_font_t *font,
#define HB_OT_LAYOUT_NO_FEATURE_INDEX 0xFFFFu
#define HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX 0xFFFFu
-unsigned int
+HB_EXTERN unsigned int
hb_ot_layout_table_get_script_tags (hb_face_t *face,
hb_tag_t table_tag,
unsigned int start_offset,
unsigned int *script_count /* IN/OUT */,
hb_tag_t *script_tags /* OUT */);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_ot_layout_table_find_script (hb_face_t *face,
hb_tag_t table_tag,
hb_tag_t script_tag,
unsigned int *script_index);
/* Like find_script, but takes zero-terminated array of scripts to test */
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_ot_layout_table_choose_script (hb_face_t *face,
hb_tag_t table_tag,
const hb_tag_t *script_tags,
unsigned int *script_index,
hb_tag_t *chosen_script);
-unsigned int
+HB_EXTERN unsigned int
hb_ot_layout_table_get_feature_tags (hb_face_t *face,
hb_tag_t table_tag,
unsigned int start_offset,
unsigned int *feature_count /* IN/OUT */,
hb_tag_t *feature_tags /* OUT */);
-unsigned int
+HB_EXTERN unsigned int
hb_ot_layout_script_get_language_tags (hb_face_t *face,
hb_tag_t table_tag,
unsigned int script_index,
@@ -132,21 +132,21 @@ hb_ot_layout_script_get_language_tags (hb_face_t *face,
unsigned int *language_count /* IN/OUT */,
hb_tag_t *language_tags /* OUT */);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_ot_layout_script_find_language (hb_face_t *face,
hb_tag_t table_tag,
unsigned int script_index,
hb_tag_t language_tag,
unsigned int *language_index);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_ot_layout_language_get_required_feature_index (hb_face_t *face,
hb_tag_t table_tag,
unsigned int script_index,
unsigned int language_index,
unsigned int *feature_index);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_ot_layout_language_get_required_feature (hb_face_t *face,
hb_tag_t table_tag,
unsigned int script_index,
@@ -154,7 +154,7 @@ hb_ot_layout_language_get_required_feature (hb_face_t *face,
unsigned int *feature_index,
hb_tag_t *feature_tag);
-unsigned int
+HB_EXTERN unsigned int
hb_ot_layout_language_get_feature_indexes (hb_face_t *face,
hb_tag_t table_tag,
unsigned int script_index,
@@ -163,7 +163,7 @@ hb_ot_layout_language_get_feature_indexes (hb_face_t *face,
unsigned int *feature_count /* IN/OUT */,
unsigned int *feature_indexes /* OUT */);
-unsigned int
+HB_EXTERN unsigned int
hb_ot_layout_language_get_feature_tags (hb_face_t *face,
hb_tag_t table_tag,
unsigned int script_index,
@@ -172,7 +172,7 @@ hb_ot_layout_language_get_feature_tags (hb_face_t *face,
unsigned int *feature_count /* IN/OUT */,
hb_tag_t *feature_tags /* OUT */);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_ot_layout_language_find_feature (hb_face_t *face,
hb_tag_t table_tag,
unsigned int script_index,
@@ -180,7 +180,7 @@ hb_ot_layout_language_find_feature (hb_face_t *face,
hb_tag_t feature_tag,
unsigned int *feature_index);
-unsigned int
+HB_EXTERN unsigned int
hb_ot_layout_feature_get_lookups (hb_face_t *face,
hb_tag_t table_tag,
unsigned int feature_index,
@@ -188,12 +188,12 @@ hb_ot_layout_feature_get_lookups (hb_face_t *face,
unsigned int *lookup_count /* IN/OUT */,
unsigned int *lookup_indexes /* OUT */);
-unsigned int
+HB_EXTERN unsigned int
hb_ot_layout_table_get_lookup_count (hb_face_t *face,
hb_tag_t table_tag);
-void
+HB_EXTERN void
hb_ot_layout_collect_lookups (hb_face_t *face,
hb_tag_t table_tag,
const hb_tag_t *scripts,
@@ -201,7 +201,7 @@ hb_ot_layout_collect_lookups (hb_face_t *face,
const hb_tag_t *features,
hb_set_t *lookup_indexes /* OUT */);
-void
+HB_EXTERN void
hb_ot_layout_lookup_collect_glyphs (hb_face_t *face,
hb_tag_t table_tag,
unsigned int lookup_index,
@@ -228,7 +228,7 @@ typedef hb_bool_t
const hb_ot_layout_glyph_sequence_t *sequence,
void *user_data);
-void
+HB_EXTERN void
Xhb_ot_layout_lookup_enumerate_sequences (hb_face_t *face,
hb_tag_t table_tag,
unsigned int lookup_index,
@@ -241,17 +241,17 @@ Xhb_ot_layout_lookup_enumerate_sequences (hb_face_t *face,
* GSUB
*/
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_ot_layout_has_substitution (hb_face_t *face);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_ot_layout_lookup_would_substitute (hb_face_t *face,
unsigned int lookup_index,
const hb_codepoint_t *glyphs,
unsigned int glyphs_length,
hb_bool_t zero_context);
-void
+HB_EXTERN void
hb_ot_layout_lookup_substitute_closure (hb_face_t *face,
unsigned int lookup_index,
hb_set_t *glyphs
@@ -259,7 +259,7 @@ hb_ot_layout_lookup_substitute_closure (hb_face_t *face,
#ifdef HB_NOT_IMPLEMENTED
/* Note: You better have GDEF when using this API, or marks won't do much. */
-hb_bool_t
+HB_EXTERN hb_bool_t
Xhb_ot_layout_lookup_substitute (hb_font_t *font,
unsigned int lookup_index,
const hb_ot_layout_glyph_sequence_t *sequence,
@@ -274,12 +274,12 @@ Xhb_ot_layout_lookup_substitute (hb_font_t *font,
* GPOS
*/
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_ot_layout_has_positioning (hb_face_t *face);
#ifdef HB_NOT_IMPLEMENTED
/* Note: You better have GDEF when using this API, or marks won't do much. */
-hb_bool_t
+HB_EXTERN hb_bool_t
Xhb_ot_layout_lookup_position (hb_font_t *font,
unsigned int lookup_index,
const hb_ot_layout_glyph_sequence_t *sequence,
@@ -288,7 +288,7 @@ Xhb_ot_layout_lookup_position (hb_font_t *font,
/* Optical 'size' feature info. Returns true if found.
* http://www.microsoft.com/typography/otspec/features_pt.htm#size */
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_ot_layout_get_size_params (hb_face_t *face,
unsigned int *design_size, /* OUT. May be NULL */
unsigned int *subfamily_id, /* OUT. May be NULL */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-map-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map-private.hh
index f9538af1831..6f62c77de0b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-map-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map-private.hh
@@ -159,23 +159,9 @@ enum hb_ot_map_feature_flags_t {
F_MANUAL_ZWJ = 0x0004u, /* Don't skip over ZWJ when matching. */
F_GLOBAL_SEARCH = 0x0008u /* If feature not found in LangSys, look for it in global feature list and pick one. */
};
+HB_MARK_AS_FLAG_T (hb_ot_map_feature_flags_t);
/* Macro version for where const is desired. */
#define F_COMBINE(l,r) (hb_ot_map_feature_flags_t ((unsigned int) (l) | (unsigned int) (r)))
-static inline hb_ot_map_feature_flags_t
-operator | (hb_ot_map_feature_flags_t l, hb_ot_map_feature_flags_t r)
-{ return hb_ot_map_feature_flags_t ((unsigned int) l | (unsigned int) r); }
-static inline hb_ot_map_feature_flags_t
-operator & (hb_ot_map_feature_flags_t l, hb_ot_map_feature_flags_t r)
-{ return hb_ot_map_feature_flags_t ((unsigned int) l & (unsigned int) r); }
-static inline hb_ot_map_feature_flags_t
-operator ~ (hb_ot_map_feature_flags_t r)
-{ return hb_ot_map_feature_flags_t (~(unsigned int) r); }
-static inline hb_ot_map_feature_flags_t&
-operator |= (hb_ot_map_feature_flags_t &l, hb_ot_map_feature_flags_t r)
-{ l = l | r; return l; }
-static inline hb_ot_map_feature_flags_t&
-operator &= (hb_ot_map_feature_flags_t& l, hb_ot_map_feature_flags_t r)
-{ l = l & r; return l; }
struct hb_ot_map_builder_t
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-map.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc
index 95bd04ee8e2..7bdeddbe12b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-map.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc
@@ -89,7 +89,7 @@ hb_ot_map_builder_t::hb_ot_map_builder_t (hb_face_t *face_,
for (unsigned int table_index = 0; table_index < 2; table_index++) {
hb_tag_t table_tag = table_tags[table_index];
- found_script[table_index] = hb_ot_layout_table_choose_script (face, table_tag, script_tags, &script_index[table_index], &chosen_script[table_index]);
+ found_script[table_index] = (bool) hb_ot_layout_table_choose_script (face, table_tag, script_tags, &script_index[table_index], &chosen_script[table_index]);
hb_ot_layout_script_find_language (face, table_tag, script_index[table_index], language_tag, &language_index[table_index]);
}
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-maxp-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-maxp-table.hh
index 27105af1326..27105af1326 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-maxp-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-maxp-table.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-name-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name-table.hh
index 870f1233251..870f1233251 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-name-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name-table.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-arabic-fallback.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-fallback.hh
index d97d2852105..d97d2852105 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-arabic-fallback.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-fallback.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-arabic-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-private.hh
index fcedc7d7420..fcedc7d7420 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-arabic-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-arabic-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-table.hh
index 80d50443546..80d50443546 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-arabic-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-table.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-arabic-win1256.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-win1256.hh
index e70c48f427c..e70c48f427c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-arabic-win1256.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-win1256.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-arabic.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc
index cde02e0a567..50754771409 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-arabic.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc
@@ -28,9 +28,38 @@
#include "hb-ot-shape-private.hh"
+#ifndef HB_DEBUG_ARABIC
+#define HB_DEBUG_ARABIC (HB_DEBUG+0)
+#endif
+
+
/* buffer var allocations */
#define arabic_shaping_action() complex_var_u8_0() /* arabic shaping action */
+#define HB_BUFFER_SCRATCH_FLAG_ARABIC_HAS_STCH HB_BUFFER_SCRATCH_FLAG_COMPLEX0
+
+/* See:
+ * https://github.com/behdad/harfbuzz/commit/6e6f82b6f3dde0fc6c3c7d991d9ec6cfff57823d#commitcomment-14248516 */
+#define HB_ARABIC_GENERAL_CATEGORY_IS_WORD(gen_cat) \
+ (FLAG_SAFE (gen_cat) & \
+ (FLAG (HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED) | \
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_PRIVATE_USE) | \
+ /*FLAG (HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER) |*/ \
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER) | \
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER) | \
+ /*FLAG (HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER) |*/ \
+ /*FLAG (HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER) |*/ \
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) | \
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) | \
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) | \
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER) | \
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_LETTER_NUMBER) | \
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_OTHER_NUMBER) | \
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_CURRENCY_SYMBOL) | \
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL) | \
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_MATH_SYMBOL) | \
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_OTHER_SYMBOL)))
+
/*
* Joining types:
@@ -84,7 +113,7 @@ static const hb_tag_t arabic_features[] =
/* Same order as the feature array */
-enum {
+enum arabic_action_t {
ISOL,
FINA,
FIN2,
@@ -95,7 +124,11 @@ enum {
NONE,
- ARABIC_NUM_FEATURES = NONE
+ ARABIC_NUM_FEATURES = NONE,
+
+ /* We abuse the same byte for other things... */
+ STCH_FIXED,
+ STCH_REPEATING,
};
static const struct arabic_state_table_entry {
@@ -140,6 +173,11 @@ arabic_fallback_shape (const hb_ot_shape_plan_t *plan,
hb_buffer_t *buffer);
static void
+record_stch (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer);
+
+static void
collect_features_arabic (hb_ot_shape_planner_t *plan)
{
hb_ot_map_builder_t *map = &plan->map;
@@ -165,6 +203,9 @@ collect_features_arabic (hb_ot_shape_planner_t *plan)
map->add_gsub_pause (nuke_joiners);
+ map->add_global_bool_feature (HB_TAG('s','t','c','h'));
+ map->add_gsub_pause (record_stch);
+
map->add_global_bool_feature (HB_TAG('c','c','m','p'));
map->add_global_bool_feature (HB_TAG('l','o','c','l'));
@@ -208,8 +249,10 @@ struct arabic_shape_plan_t
* mask_array[NONE] == 0. */
hb_mask_t mask_array[ARABIC_NUM_FEATURES + 1];
- bool do_fallback;
arabic_fallback_plan_t *fallback_plan;
+
+ unsigned int do_fallback : 1;
+ unsigned int has_stch : 1;
};
void *
@@ -220,6 +263,7 @@ data_create_arabic (const hb_ot_shape_plan_t *plan)
return NULL;
arabic_plan->do_fallback = plan->props.script == HB_SCRIPT_ARABIC;
+ arabic_plan->has_stch = !!plan->map.get_1_mask (HB_TAG ('s','t','c','h'));
for (unsigned int i = 0; i < ARABIC_NUM_FEATURES; i++) {
arabic_plan->mask_array[i] = plan->map.get_1_mask (arabic_features[i]);
arabic_plan->do_fallback = arabic_plan->do_fallback &&
@@ -320,8 +364,6 @@ setup_masks_arabic_plan (const arabic_shape_plan_t *arabic_plan,
hb_glyph_info_t *info = buffer->info;
for (unsigned int i = 0; i < count; i++)
info[i].mask |= arabic_plan->mask_array[info[i].arabic_shaping_action()];
-
- HB_BUFFER_DEALLOCATE_VAR (buffer, arabic_shaping_action);
}
static void
@@ -371,6 +413,194 @@ retry:
arabic_fallback_plan_shape (fallback_plan, font, buffer);
}
+/*
+ * Stretch feature: "stch".
+ * See example here:
+ * https://www.microsoft.com/typography/OpenTypeDev/syriac/intro.htm
+ * We implement this in a generic way, such that the Arabic subtending
+ * marks can use it as well.
+ */
+
+static void
+record_stch (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer)
+{
+ const arabic_shape_plan_t *arabic_plan = (const arabic_shape_plan_t *) plan->data;
+ if (!arabic_plan->has_stch)
+ return;
+
+ /* 'stch' feature was just applied. Look for anything that multiplied,
+ * and record it for stch treatment later. Note that rtlm, frac, etc
+ * are applied before stch, but we assume that they didn't result in
+ * anything multiplying into 5 pieces, so it's safe-ish... */
+
+ unsigned int count = buffer->len;
+ hb_glyph_info_t *info = buffer->info;
+ for (unsigned int i = 0; i < count; i++)
+ if (unlikely (_hb_glyph_info_multiplied (&info[i])))
+ {
+ unsigned int comp = _hb_glyph_info_get_lig_comp (&info[i]);
+ info[i].arabic_shaping_action() = comp % 2 ? STCH_REPEATING : STCH_FIXED;
+ buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_ARABIC_HAS_STCH;
+ }
+}
+
+static void
+apply_stch (const hb_ot_shape_plan_t *plan,
+ hb_buffer_t *buffer,
+ hb_font_t *font)
+{
+ if (likely (!(buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_ARABIC_HAS_STCH)))
+ return;
+
+ /* The Arabic shaper currently always processes in RTL mode, so we should
+ * stretch / position the stretched pieces to the left / preceding glyphs. */
+
+ /* We do a two pass implementation:
+ * First pass calculates the exact number of extra glyphs we need,
+ * We then enlarge buffer to have that much room,
+ * Second pass applies the stretch, copying things to the end of buffer.
+ */
+
+ /* 30 = 2048 / 70.
+ * https://www.microsoft.com/typography/cursivescriptguidelines.mspx */
+ hb_position_t overlap = font->x_scale / 30;
+ DEBUG_MSG (ARABIC, NULL, "overlap for stretching is %d", overlap);
+ int sign = font->x_scale < 0 ? -1 : +1;
+ unsigned int extra_glyphs_needed = 0; // Set during MEASURE, used during CUT
+ typedef enum { MEASURE, CUT } step_t;
+
+ for (step_t step = MEASURE; step <= CUT; step = (step_t) (step + 1))
+ {
+ unsigned int count = buffer->len;
+ hb_glyph_info_t *info = buffer->info;
+ hb_glyph_position_t *pos = buffer->pos;
+ unsigned int new_len = count + extra_glyphs_needed; // write head during CUT
+ unsigned int j = new_len;
+ for (unsigned int i = count; i; i--)
+ {
+ if (!hb_in_range<unsigned> (info[i - 1].arabic_shaping_action(), STCH_FIXED, STCH_REPEATING))
+ {
+ if (step == CUT)
+ {
+ --j;
+ info[j] = info[i - 1];
+ pos[j] = pos[i - 1];
+ }
+ continue;
+ }
+
+ /* Yay, justification! */
+
+ hb_position_t w_total = 0; // Total to be filled
+ hb_position_t w_fixed = 0; // Sum of fixed tiles
+ hb_position_t w_repeating = 0; // Sum of repeating tiles
+ int n_fixed = 0;
+ int n_repeating = 0;
+
+ unsigned int end = i;
+ while (i &&
+ hb_in_range<unsigned> (info[i - 1].arabic_shaping_action(), STCH_FIXED, STCH_REPEATING))
+ {
+ i--;
+ hb_glyph_extents_t extents;
+ if (!font->get_glyph_extents (info[i].codepoint, &extents))
+ extents.width = 0;
+ extents.width -= overlap;
+ if (info[i].arabic_shaping_action() == STCH_FIXED)
+ {
+ w_fixed += extents.width;
+ n_fixed++;
+ }
+ else
+ {
+ w_repeating += extents.width;
+ n_repeating++;
+ }
+ }
+ unsigned int start = i;
+ unsigned int context = i;
+ while (context &&
+ !hb_in_range<unsigned> (info[context - 1].arabic_shaping_action(), STCH_FIXED, STCH_REPEATING) &&
+ (_hb_glyph_info_is_default_ignorable (&info[context - 1]) ||
+ HB_ARABIC_GENERAL_CATEGORY_IS_WORD (_hb_glyph_info_get_general_category (&info[context - 1]))))
+ {
+ context--;
+ w_total += pos[context].x_advance;
+ }
+ i++; // Don't touch i again.
+
+ DEBUG_MSG (ARABIC, NULL, "%s stretch at (%d,%d,%d)",
+ step == MEASURE ? "measuring" : "cutting", context, start, end);
+ DEBUG_MSG (ARABIC, NULL, "rest of word: count=%d width %d", start - context, w_total);
+ DEBUG_MSG (ARABIC, NULL, "fixed tiles: count=%d width=%d", n_fixed, w_fixed);
+ DEBUG_MSG (ARABIC, NULL, "repeating tiles: count=%d width=%d", n_repeating, w_repeating);
+
+ /* Number of additional times to repeat each repeating tile. */
+ int n_copies = 0;
+
+ hb_position_t w_remaining = w_total - w_fixed - overlap;
+ if (sign * w_remaining > sign * w_repeating && sign * w_repeating > 0)
+ n_copies = (sign * w_remaining + sign * w_repeating / 4) / (sign * w_repeating) - 1;
+
+ if (step == MEASURE)
+ {
+ extra_glyphs_needed += n_copies * n_repeating;
+ DEBUG_MSG (ARABIC, NULL, "will add extra %d copies of repeating tiles", n_copies);
+ }
+ else
+ {
+ hb_position_t x_offset = -overlap;
+ for (unsigned int k = end; k > start; k--)
+ {
+ hb_glyph_extents_t extents;
+ if (!font->get_glyph_extents (info[k - 1].codepoint, &extents))
+ extents.width = 0;
+ extents.width -= overlap;
+
+ unsigned int repeat = 1;
+ if (info[k - 1].arabic_shaping_action() == STCH_REPEATING)
+ repeat += n_copies;
+
+ DEBUG_MSG (ARABIC, NULL, "appending %d copies of glyph %d; j=%d",
+ repeat, info[k - 1].codepoint, j);
+ for (unsigned int n = 0; n < repeat; n++)
+ {
+ x_offset -= extents.width;
+ pos[k - 1].x_offset = x_offset;
+ /* Append copy. */
+ --j;
+ info[j] = info[k - 1];
+ pos[j] = pos[k - 1];
+ }
+ }
+ }
+ }
+
+ if (step == MEASURE)
+ {
+ if (unlikely (!buffer->ensure (count + extra_glyphs_needed)))
+ break;
+ }
+ else
+ {
+ assert (j == 0);
+ buffer->len = new_len;
+ }
+ }
+}
+
+
+static void
+postprocess_glyphs_arabic (const hb_ot_shape_plan_t *plan,
+ hb_buffer_t *buffer,
+ hb_font_t *font)
+{
+ apply_stch (plan, buffer, font);
+
+ HB_BUFFER_DEALLOCATE_VAR (buffer, arabic_shaping_action);
+}
const hb_ot_complex_shaper_t _hb_ot_complex_shaper_arabic =
{
@@ -379,7 +609,8 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_arabic =
NULL, /* override_features */
data_create_arabic,
data_destroy_arabic,
- NULL, /* preprocess_text_arabic */
+ NULL, /* preprocess_text */
+ postprocess_glyphs_arabic,
HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
NULL, /* decompose */
NULL, /* compose */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-default.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-default.cc
index f7f097eedaa..1e441fa5530 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-default.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-default.cc
@@ -35,6 +35,7 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_default =
NULL, /* data_create */
NULL, /* data_destroy */
NULL, /* preprocess_text */
+ NULL, /* postprocess_glyphs */
HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
NULL, /* decompose */
NULL, /* compose */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-hangul.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc
index 1fa79ce6d42..5f4d98b70c8 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-hangul.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc
@@ -188,7 +188,7 @@ preprocess_text_hangul (const hb_ot_shape_plan_t *plan,
*/
unsigned int count = buffer->len;
- for (buffer->idx = 0; buffer->idx < count;)
+ for (buffer->idx = 0; buffer->idx < count && !buffer->in_error;)
{
hb_codepoint_t u = buffer->cur().codepoint;
@@ -411,13 +411,14 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_hangul =
"hangul",
collect_features_hangul,
override_features_hangul,
- data_create_hangul, /* data_create */
- data_destroy_hangul, /* data_destroy */
+ data_create_hangul,
+ data_destroy_hangul,
preprocess_text_hangul,
+ NULL, /* postprocess_glyphs */
HB_OT_SHAPE_NORMALIZATION_MODE_NONE,
NULL, /* decompose */
NULL, /* compose */
- setup_masks_hangul, /* setup_masks */
+ setup_masks_hangul,
HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE,
false, /* fallback_position */
};
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-hebrew.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hebrew.cc
index c7b7a5eba6a..32159002e93 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-hebrew.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hebrew.cc
@@ -68,7 +68,7 @@ compose_hebrew (const hb_ot_shape_normalize_context_t *c,
0xFB4Au /* TAV */
};
- bool found = c->unicode->compose (a, b, ab);
+ bool found = (bool) c->unicode->compose (a, b, ab);
if (!found && !c->plan->has_mark)
{
@@ -163,6 +163,7 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_hebrew =
NULL, /* data_create */
NULL, /* data_destroy */
NULL, /* preprocess_text */
+ NULL, /* postprocess_glyphs */
HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
NULL, /* decompose */
compose_hebrew,
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-indic-machine.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-machine.hh
index f652d4fda73..f652d4fda73 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-indic-machine.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-machine.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-indic-machine.rl b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-machine.rl
index 694b235d1d1..694b235d1d1 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-indic-machine.rl
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-machine.rl
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-indic-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-private.hh
index 559ebe49867..559ebe49867 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-indic-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-indic-table.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-table.cc
index 2e159a12b00..2e159a12b00 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-indic-table.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-table.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-indic.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc
index 00526f3df4f..53548976a9c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-indic.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc
@@ -756,7 +756,7 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
{
default:
assert (false);
- /* fallthrough */
+ HB_FALLTHROUGH;
case BASE_POS_LAST:
{
@@ -1243,7 +1243,7 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
buffer->idx = 0;
unsigned int last_syllable = 0;
- while (buffer->idx < buffer->len)
+ while (buffer->idx < buffer->len && !buffer->in_error)
{
unsigned int syllable = buffer->cur().syllable();
syllable_type_t syllable_type = (syllable_type_t) (syllable & 0x0F);
@@ -1251,10 +1251,10 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
{
last_syllable = syllable;
- hb_glyph_info_t info = dottedcircle;
- info.cluster = buffer->cur().cluster;
- info.mask = buffer->cur().mask;
- info.syllable() = buffer->cur().syllable();
+ hb_glyph_info_t ginfo = dottedcircle;
+ ginfo.cluster = buffer->cur().cluster;
+ ginfo.mask = buffer->cur().mask;
+ ginfo.syllable() = buffer->cur().syllable();
/* TODO Set glyph_props? */
/* Insert dottedcircle after possible Repha. */
@@ -1263,7 +1263,7 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
buffer->cur().indic_category() == OT_Repha)
buffer->next_glyph ();
- buffer->output_info (info);
+ buffer->output_info (ginfo);
}
else
buffer->next_glyph ();
@@ -1631,8 +1631,8 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
if (new_pos > start && info[new_pos - 1].indic_category() == OT_M)
{
unsigned int old_pos = i;
- for (unsigned int i = base + 1; i < old_pos; i++)
- if (info[i].indic_category() == OT_M)
+ for (unsigned int j = base + 1; j < old_pos; j++)
+ if (info[j].indic_category() == OT_M)
{
new_pos--;
break;
@@ -1806,7 +1806,7 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c,
}
}
- return c->unicode->decompose (ab, a, b);
+ return (bool) c->unicode->decompose (ab, a, b);
}
static bool
@@ -1822,7 +1822,7 @@ compose_indic (const hb_ot_shape_normalize_context_t *c,
/* Composition-exclusion exceptions that we want to recompose. */
if (a == 0x09AFu && b == 0x09BCu) { *ab = 0x09DFu; return true; }
- return c->unicode->compose (a, b, ab);
+ return (bool) c->unicode->compose (a, b, ab);
}
@@ -1834,6 +1834,7 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_indic =
data_create_indic,
data_destroy_indic,
NULL, /* preprocess_text */
+ NULL, /* postprocess_glyphs */
HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT,
decompose_indic,
compose_indic,
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-myanmar-machine.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar-machine.hh
index 29fdf9a1aef..29fdf9a1aef 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-myanmar-machine.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar-machine.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-myanmar-machine.rl b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar-machine.rl
index 9649a916f02..9649a916f02 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-myanmar-machine.rl
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar-machine.rl
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-myanmar.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc
index 30a53c7e35d..00368d8e474 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-myanmar.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc
@@ -455,12 +455,12 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
{
last_syllable = syllable;
- hb_glyph_info_t info = dottedcircle;
- info.cluster = buffer->cur().cluster;
- info.mask = buffer->cur().mask;
- info.syllable() = buffer->cur().syllable();
+ hb_glyph_info_t ginfo = dottedcircle;
+ ginfo.cluster = buffer->cur().cluster;
+ ginfo.mask = buffer->cur().mask;
+ ginfo.syllable() = buffer->cur().syllable();
- buffer->output_info (info);
+ buffer->output_info (ginfo);
}
else
buffer->next_glyph ();
@@ -507,6 +507,7 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_myanmar_old =
NULL, /* data_create */
NULL, /* data_destroy */
NULL, /* preprocess_text */
+ NULL, /* postprocess_glyphs */
HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
NULL, /* decompose */
NULL, /* compose */
@@ -523,6 +524,7 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_myanmar =
NULL, /* data_create */
NULL, /* data_destroy */
NULL, /* preprocess_text */
+ NULL, /* postprocess_glyphs */
HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT,
NULL, /* decompose */
NULL, /* compose */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-private.hh
index 8d03dee51f1..80de4f316e4 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-private.hh
@@ -110,6 +110,15 @@ struct hb_ot_complex_shaper_t
hb_buffer_t *buffer,
hb_font_t *font);
+ /* postprocess_glyphs()
+ * Called during shape().
+ * Shapers can use to modify glyphs after shaping ends.
+ * May be NULL.
+ */
+ void (*postprocess_glyphs) (const hb_ot_shape_plan_t *plan,
+ hb_buffer_t *buffer,
+ hb_font_t *font);
+
hb_ot_shape_normalization_mode_t normalization_preference;
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-thai.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc
index d4ede209f4b..6556a325173 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-thai.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc
@@ -139,7 +139,7 @@ thai_pua_shape (hb_codepoint_t u, thai_action_t action, hb_font_t *font)
};
switch (action) {
- default: assert (false); /* Fallthrough */
+ default: assert (false); HB_FALLTHROUGH;
case NOP: return u;
case SD: pua_mappings = SD_mappings; break;
case SDL: pua_mappings = SDL_mappings; break;
@@ -315,7 +315,7 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan,
buffer->clear_output ();
unsigned int count = buffer->len;
- for (buffer->idx = 0; buffer->idx < count;)
+ for (buffer->idx = 0; buffer->idx < count && !buffer->in_error;)
{
hb_codepoint_t u = buffer->cur().codepoint;
if (likely (!IS_SARA_AM (u))) {
@@ -330,7 +330,7 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan,
if (unlikely (buffer->in_error))
return;
- /* Make Nikhahit be recognized as a mark when zeroing widths. */
+ /* Make Nikhahit be recognized as a ccc=0 mark when zeroing widths. */
unsigned int end = buffer->out_len;
_hb_glyph_info_set_general_category (&buffer->out_info[end - 2], HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK);
@@ -372,6 +372,7 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_thai =
NULL, /* data_create */
NULL, /* data_destroy */
preprocess_text_thai,
+ NULL, /* postprocess_glyphs */
HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
NULL, /* decompose */
NULL, /* compose */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-tibetan.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-tibetan.cc
index 01465a426f8..9f09287f620 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-tibetan.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-tibetan.cc
@@ -52,6 +52,7 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_tibetan =
NULL, /* data_create */
NULL, /* data_destroy */
NULL, /* preprocess_text */
+ NULL, /* postprocess_glyphs */
HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
NULL, /* decompose */
NULL, /* compose */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-use-machine.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.hh
index ced9d97f28f..ced9d97f28f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-use-machine.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-use-machine.rl b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.rl
index b8242bab1e7..b8242bab1e7 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-use-machine.rl
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.rl
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-use-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-private.hh
index a1437362119..a1437362119 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-use-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-use-table.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc
index 6cd1c5db75f..6cd1c5db75f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-use-table.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-use.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc
index 4b15deedd48..a1b63d5b05b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-complex-use.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc
@@ -490,11 +490,6 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
if (likely (!has_broken_syllables))
return;
-
- hb_codepoint_t dottedcircle_glyph;
- if (!font->get_glyph (0x25CCu, 0, &dottedcircle_glyph))
- return;
-
hb_glyph_info_t dottedcircle = {0};
if (!font->get_glyph (0x25CCu, 0, &dottedcircle.codepoint))
return;
@@ -503,9 +498,8 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
buffer->clear_output ();
buffer->idx = 0;
-
unsigned int last_syllable = 0;
- while (buffer->idx < buffer->len)
+ while (buffer->idx < buffer->len && !buffer->in_error)
{
unsigned int syllable = buffer->cur().syllable();
syllable_type_t syllable_type = (syllable_type_t) (syllable & 0x0F);
@@ -513,10 +507,10 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
{
last_syllable = syllable;
- hb_glyph_info_t info = dottedcircle;
- info.cluster = buffer->cur().cluster;
- info.mask = buffer->cur().mask;
- info.syllable() = buffer->cur().syllable();
+ hb_glyph_info_t ginfo = dottedcircle;
+ ginfo.cluster = buffer->cur().cluster;
+ ginfo.mask = buffer->cur().mask;
+ ginfo.syllable() = buffer->cur().syllable();
/* TODO Set glyph_props? */
/* Insert dottedcircle after possible Repha. */
@@ -525,7 +519,7 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
buffer->cur().use_category() == USE_R)
buffer->next_glyph ();
- buffer->output_info (info);
+ buffer->output_info (ginfo);
}
else
buffer->next_glyph ();
@@ -564,7 +558,7 @@ compose_use (const hb_ot_shape_normalize_context_t *c,
if (HB_UNICODE_GENERAL_CATEGORY_IS_MARK (c->unicode->general_category (a)))
return false;
- return c->unicode->compose (a, b, ab);
+ return (bool)c->unicode->compose (a, b, ab);
}
@@ -576,6 +570,7 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_use =
data_create_use,
data_destroy_use,
NULL, /* preprocess_text */
+ NULL, /* postprocess_glyphs */
HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT,
NULL, /* decompose */
compose_use,
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-fallback-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback-private.hh
index ec653513f1b..e134224df92 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-fallback-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback-private.hh
@@ -45,5 +45,9 @@ HB_INTERNAL void _hb_ot_shape_fallback_kern (const hb_ot_shape_plan_t *plan,
hb_font_t *font,
hb_buffer_t *buffer);
+HB_INTERNAL void _hb_ot_shape_fallback_spaces (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer);
+
#endif /* HB_OT_SHAPE_FALLBACK_PRIVATE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-fallback.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc
index 748372d01fe..c9cf737f486 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-fallback.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc
@@ -224,7 +224,7 @@ position_mark (const hb_ot_shape_plan_t *plan,
pos.x_offset += base_extents.x_bearing + base_extents.width - mark_extents.width / 2 - mark_extents.x_bearing;
break;
}
- /* Fall through */
+ HB_FALLTHROUGH;
default:
case HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW:
@@ -259,6 +259,7 @@ position_mark (const hb_ot_shape_plan_t *plan,
case HB_UNICODE_COMBINING_CLASS_BELOW_RIGHT:
/* Add gap, fall-through. */
base_extents.height -= y_gap;
+ HB_FALLTHROUGH;
case HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW_LEFT:
case HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW:
@@ -279,6 +280,7 @@ position_mark (const hb_ot_shape_plan_t *plan,
/* Add gap, fall-through. */
base_extents.y_bearing += y_gap;
base_extents.height -= y_gap;
+ HB_FALLTHROUGH;
case HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE:
case HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE_RIGHT:
@@ -482,3 +484,70 @@ _hb_ot_shape_fallback_kern (const hb_ot_shape_plan_t *plan,
idx = skippy_iter.idx;
}
}
+
+
+/* Adjusts width of various spaces. */
+void
+_hb_ot_shape_fallback_spaces (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer)
+{
+ if (!HB_DIRECTION_IS_HORIZONTAL (buffer->props.direction))
+ return;
+
+ hb_glyph_info_t *info = buffer->info;
+ hb_glyph_position_t *pos = buffer->pos;
+ unsigned int count = buffer->len;
+ for (unsigned int i = 0; i < count; i++)
+ if (_hb_glyph_info_is_unicode_space (&info[i]) && !_hb_glyph_info_ligated (&info[i]))
+ {
+ hb_unicode_funcs_t::space_t space_type = _hb_glyph_info_get_unicode_space_fallback_type (&info[i]);
+ hb_codepoint_t glyph;
+ typedef hb_unicode_funcs_t t;
+ switch (space_type)
+ {
+ case t::NOT_SPACE: /* Shouldn't happen. */
+ case t::SPACE:
+ break;
+
+ case t::SPACE_EM:
+ case t::SPACE_EM_2:
+ case t::SPACE_EM_3:
+ case t::SPACE_EM_4:
+ case t::SPACE_EM_5:
+ case t::SPACE_EM_6:
+ case t::SPACE_EM_16:
+ pos[i].x_advance = (font->x_scale + ((int) space_type)/2) / (int) space_type;
+ break;
+
+ case t::SPACE_4_EM_18:
+ pos[i].x_advance = font->x_scale * 4 / 18;
+ break;
+
+ case t::SPACE_FIGURE:
+ for (char u = '0'; u <= '9'; u++)
+ if (font->get_glyph (u, 0, &glyph))
+ {
+ pos[i].x_advance = font->get_glyph_h_advance (glyph);
+ break;
+ }
+ break;
+
+ case t::SPACE_PUNCTUATION:
+ if (font->get_glyph ('.', 0, &glyph))
+ pos[i].x_advance = font->get_glyph_h_advance (glyph);
+ else if (font->get_glyph (',', 0, &glyph))
+ pos[i].x_advance = font->get_glyph_h_advance (glyph);
+ break;
+
+ case t::SPACE_NARROW:
+ /* Half-space?
+ * Unicode doc http://www.unicode.org/charts/PDF/U2000.pdf says ~1/4 or 1/5 of EM.
+ * However, in my testing, many fonts have their regular space being about that
+ * size. To me, a percentage of the space width makes more sense. Half is as
+ * good as any. */
+ pos[i].x_advance /= 2;
+ break;
+ }
+ }
+}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-normalize-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize-private.hh
index c744e26451d..c744e26451d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-normalize-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-normalize.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize.cc
index a706461326a..3f00b8ee692 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-normalize.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize.cc
@@ -62,24 +62,12 @@
* with previous base, use that. This needs the itemizer to have this
* knowledge too. We need to provide assistance to the itemizer.
*
- * - When a font does not support a character but supports its decomposition,
- * well, use the decomposition (preferring the canonical decomposition, but
- * falling back to the compatibility decomposition if necessary). The
- * compatibility decomposition is really nice to have, for characters like
- * ellipsis, or various-sized space characters.
+ * - When a font does not support a character but supports its canonical
+ * decomposition, well, use the decomposition.
*
* - The complex shapers can customize the compose and decompose functions to
* offload some of their requirements to the normalizer. For example, the
* Indic shaper may want to disallow recomposing of two matras.
- *
- * - We try compatibility decomposition if decomposing through canonical
- * decomposition alone failed to find a sequence that the font supports.
- * We don't try compatibility decomposition recursively during the canonical
- * decomposition phase. This has minimal impact. There are only a handful
- * of Greek letter that have canonical decompositions that include characters
- * with compatibility decomposition. Those can be found using this command:
- *
- * egrep "`echo -n ';('; grep ';<' UnicodeData.txt | cut -d';' -f1 | tr '\n' '|'; echo ') '`" UnicodeData.txt
*/
static bool
@@ -88,7 +76,7 @@ decompose_unicode (const hb_ot_shape_normalize_context_t *c,
hb_codepoint_t *a,
hb_codepoint_t *b)
{
- return c->unicode->decompose (ab, a, b);
+ return (bool) c->unicode->decompose (ab, a, b);
}
static bool
@@ -97,7 +85,7 @@ compose_unicode (const hb_ot_shape_normalize_context_t *c,
hb_codepoint_t b,
hb_codepoint_t *ab)
{
- return c->unicode->compose (a, b, ab);
+ return (bool) c->unicode->compose (a, b, ab);
}
static inline void
@@ -110,8 +98,8 @@ static inline void
output_char (hb_buffer_t *buffer, hb_codepoint_t unichar, hb_codepoint_t glyph)
{
buffer->cur().glyph_index() = glyph;
- buffer->output_glyph (unichar);
- _hb_glyph_info_set_unicode_props (&buffer->prev(), buffer->unicode);
+ buffer->output_glyph (unichar); /* This is very confusing indeed. */
+ _hb_glyph_info_set_unicode_props (&buffer->prev(), buffer);
}
static inline void
@@ -139,7 +127,7 @@ decompose (const hb_ot_shape_normalize_context_t *c, bool shortest, hb_codepoint
(b && !font->get_glyph (b, 0, &b_glyph)))
return 0;
- bool has_a = font->get_glyph (a, 0, &a_glyph);
+ bool has_a = (bool) font->get_glyph (a, 0, &a_glyph);
if (shortest && has_a) {
/* Output a and b */
output_char (buffer, a, a_glyph);
@@ -171,28 +159,6 @@ decompose (const hb_ot_shape_normalize_context_t *c, bool shortest, hb_codepoint
return 0;
}
-/* Returns 0 if didn't decompose, number of resulting characters otherwise. */
-static inline unsigned int
-decompose_compatibility (const hb_ot_shape_normalize_context_t *c, hb_codepoint_t u)
-{
- unsigned int len, i;
- hb_codepoint_t decomposed[HB_UNICODE_MAX_DECOMPOSITION_LEN];
- hb_codepoint_t glyphs[HB_UNICODE_MAX_DECOMPOSITION_LEN];
-
- len = c->buffer->unicode->decompose_compatibility (u, decomposed);
- if (!len)
- return 0;
-
- for (i = 0; i < len; i++)
- if (!c->font->get_glyph (decomposed[i], 0, &glyphs[i]))
- return 0;
-
- for (i = 0; i < len; i++)
- output_char (c->buffer, decomposed[i], glyphs[i]);
-
- return len;
-}
-
static inline void
decompose_current_character (const hb_ot_shape_normalize_context_t *c, bool shortest)
{
@@ -200,17 +166,50 @@ decompose_current_character (const hb_ot_shape_normalize_context_t *c, bool shor
hb_codepoint_t u = buffer->cur().codepoint;
hb_codepoint_t glyph;
- /* Kind of a cute waterfall here... */
if (shortest && c->font->get_glyph (u, 0, &glyph))
+ {
next_char (buffer, glyph);
- else if (decompose (c, shortest, u))
+ return;
+ }
+
+ if (decompose (c, shortest, u))
+ {
skip_char (buffer);
- else if (!shortest && c->font->get_glyph (u, 0, &glyph))
+ return;
+ }
+
+ if (!shortest && c->font->get_glyph (u, 0, &glyph))
+ {
next_char (buffer, glyph);
- else if (decompose_compatibility (c, u))
- skip_char (buffer);
- else
- next_char (buffer, glyph); /* glyph is initialized in earlier branches. */
+ return;
+ }
+
+ if (_hb_glyph_info_is_unicode_space (&buffer->cur()))
+ {
+ hb_codepoint_t space_glyph;
+ hb_unicode_funcs_t::space_t space_type = buffer->unicode->space_fallback_type (u);
+ if (space_type != hb_unicode_funcs_t::NOT_SPACE && c->font->get_glyph (0x0020u, 0, &space_glyph))
+ {
+ _hb_glyph_info_set_unicode_space_fallback_type (&buffer->cur(), space_type);
+ next_char (buffer, space_glyph);
+ buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_SPACE_FALLBACK;
+ return;
+ }
+ }
+
+ if (u == 0x2011u)
+ {
+ /* U+2011 is the only sensible character that is a no-break version of another character
+ * and not a space. The space ones are handled already. Handle this lone one. */
+ hb_codepoint_t other_glyph;
+ if (c->font->get_glyph (0x2010u, 0, &other_glyph))
+ {
+ next_char (buffer, other_glyph);
+ return;
+ }
+ }
+
+ next_char (buffer, glyph); /* glyph is initialized in earlier branches. */
}
static inline void
@@ -219,7 +218,7 @@ handle_variation_selector_cluster (const hb_ot_shape_normalize_context_t *c, uns
/* TODO Currently if there's a variation-selector we give-up, it's just too hard. */
hb_buffer_t * const buffer = c->buffer;
hb_font_t * const font = c->font;
- for (; buffer->idx < end - 1;) {
+ for (; buffer->idx < end - 1 && !buffer->in_error;) {
if (unlikely (buffer->unicode->is_variation_selector (buffer->cur(+1).codepoint))) {
/* The next two lines are some ugly lines... But work. */
if (font->get_glyph (buffer->cur().codepoint, buffer->cur(+1).codepoint, &buffer->cur().glyph_index()))
@@ -255,13 +254,13 @@ static inline void
decompose_multi_char_cluster (const hb_ot_shape_normalize_context_t *c, unsigned int end, bool short_circuit)
{
hb_buffer_t * const buffer = c->buffer;
- for (unsigned int i = buffer->idx; i < end; i++)
+ for (unsigned int i = buffer->idx; i < end && !buffer->in_error; i++)
if (unlikely (buffer->unicode->is_variation_selector (buffer->info[i].codepoint))) {
handle_variation_selector_cluster (c, end, short_circuit);
return;
}
- while (buffer->idx < end)
+ while (buffer->idx < end && !buffer->in_error)
decompose_current_character (c, short_circuit);
}
@@ -290,6 +289,8 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan,
hb_buffer_t *buffer,
hb_font_t *font)
{
+ if (unlikely (!buffer->len)) return;
+
_hb_buffer_assert_unicode_vars (buffer);
hb_ot_shape_normalization_mode_t mode = plan->shaper->normalization_preference;
@@ -319,7 +320,7 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan,
buffer->clear_output ();
count = buffer->len;
- for (buffer->idx = 0; buffer->idx < count;)
+ for (buffer->idx = 0; buffer->idx < count && !buffer->in_error;)
{
unsigned int end;
for (end = buffer->idx + 1; end < count; end++)
@@ -369,7 +370,7 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan,
count = buffer->len;
unsigned int starter = 0;
buffer->next_glyph ();
- while (buffer->idx < count)
+ while (buffer->idx < count && !buffer->in_error)
{
hb_codepoint_t composed, glyph;
if (/* We don't try to compose a non-mark character with it's preceding starter.
@@ -398,7 +399,7 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan,
/* Modify starter and carry on. */
buffer->out_info[starter].codepoint = composed;
buffer->out_info[starter].glyph_index() = glyph;
- _hb_glyph_info_set_unicode_props (&buffer->out_info[starter], buffer->unicode);
+ _hb_glyph_info_set_unicode_props (&buffer->out_info[starter], buffer);
continue;
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-private.hh
index 54ac2c3cf7c..54ac2c3cf7c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc
index 40332d69f12..1d9783e33bf 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc
@@ -228,7 +228,7 @@ hb_set_unicode_props (hb_buffer_t *buffer)
unsigned int count = buffer->len;
hb_glyph_info_t *info = buffer->info;
for (unsigned int i = 0; i < count; i++)
- _hb_glyph_info_set_unicode_props (&info[i], buffer->unicode);
+ _hb_glyph_info_set_unicode_props (&info[i], buffer);
}
static void
@@ -245,7 +245,7 @@ hb_insert_dotted_circle (hb_buffer_t *buffer, hb_font_t *font)
hb_glyph_info_t dottedcircle = {0};
dottedcircle.codepoint = 0x25CCu;
- _hb_glyph_info_set_unicode_props (&dottedcircle, buffer->unicode);
+ _hb_glyph_info_set_unicode_props (&dottedcircle, buffer);
buffer->clear_output ();
@@ -254,7 +254,7 @@ hb_insert_dotted_circle (hb_buffer_t *buffer, hb_font_t *font)
info.cluster = buffer->cur().cluster;
info.mask = buffer->cur().mask;
buffer->output_info (info);
- while (buffer->idx < buffer->len)
+ while (buffer->idx < buffer->len && !buffer->in_error)
buffer->next_glyph ();
buffer->swap_buffers ();
@@ -263,7 +263,8 @@ hb_insert_dotted_circle (hb_buffer_t *buffer, hb_font_t *font)
static void
hb_form_clusters (hb_buffer_t *buffer)
{
- if (buffer->cluster_level != HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES)
+ if (!(buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_NON_ASCII) ||
+ buffer->cluster_level != HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES)
return;
/* Loop duplicated in hb_ensure_native_direction(). */
@@ -346,7 +347,8 @@ hb_ot_mirror_chars (hb_ot_shape_context_t *c)
static inline void
hb_ot_shape_setup_masks_fraction (hb_ot_shape_context_t *c)
{
- if (!c->plan->has_frac)
+ if (!(c->buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_NON_ASCII) ||
+ !c->plan->has_frac)
return;
hb_buffer_t *buffer = c->buffer;
@@ -416,7 +418,8 @@ hb_ot_zero_width_default_ignorables (hb_ot_shape_context_t *c)
{
hb_buffer_t *buffer = c->buffer;
- if (buffer->flags & HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES)
+ if (!(buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_DEFAULT_IGNORABLES) ||
+ (buffer->flags & HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES))
return;
unsigned int count = buffer->len;
@@ -433,7 +436,8 @@ hb_ot_hide_default_ignorables (hb_ot_shape_context_t *c)
{
hb_buffer_t *buffer = c->buffer;
- if (buffer->flags & HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES)
+ if (!(buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_DEFAULT_IGNORABLES) ||
+ (buffer->flags & HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES))
return;
unsigned int count = buffer->len;
@@ -525,7 +529,7 @@ hb_synthesize_glyph_classes (hb_ot_shape_context_t *c)
hb_glyph_info_t *info = c->buffer->info;
for (unsigned int i = 0; i < count; i++)
{
- hb_ot_layout_glyph_class_mask_t klass;
+ hb_ot_layout_glyph_props_flags_t klass;
/* Never mark default-ignorables as marks.
* They won't get in the way of lookups anyway,
@@ -549,9 +553,6 @@ hb_ot_substitute_default (hb_ot_shape_context_t *c)
{
hb_buffer_t *buffer = c->buffer;
- if (c->plan->shaper->preprocess_text)
- c->plan->shaper->preprocess_text (c->plan, buffer, c->font);
-
hb_ot_shape_initialize_masks (c);
hb_ot_mirror_chars (c);
@@ -576,7 +577,6 @@ hb_ot_substitute_complex (hb_ot_shape_context_t *c)
{
hb_buffer_t *buffer = c->buffer;
- _hb_buffer_allocate_gsubgpos_vars (buffer);
hb_ot_layout_substitute_start (c->font, buffer);
if (!hb_ot_layout_has_glyph_classes (c->face))
@@ -593,6 +593,9 @@ static inline void
hb_ot_substitute (hb_ot_shape_context_t *c)
{
hb_ot_substitute_default (c);
+
+ _hb_buffer_allocate_gsubgpos_vars (c->buffer);
+
hb_ot_substitute_complex (c);
}
@@ -615,6 +618,9 @@ zero_mark_width (hb_glyph_position_t *pos)
static inline void
zero_mark_widths_by_unicode (hb_buffer_t *buffer, bool adjust_offsets)
{
+ if (!(buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_NON_ASCII))
+ return;
+
unsigned int count = buffer->len;
hb_glyph_info_t *info = buffer->info;
for (unsigned int i = 0; i < count; i++)
@@ -629,6 +635,10 @@ zero_mark_widths_by_unicode (hb_buffer_t *buffer, bool adjust_offsets)
static inline void
zero_mark_widths_by_gdef (hb_buffer_t *buffer, bool adjust_offsets)
{
+ /* This one is a hack; Technically GDEF can mark ASCII glyphs as marks, but we don't listen. */
+ if (!(buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_NON_ASCII))
+ return;
+
unsigned int count = buffer->len;
hb_glyph_info_t *info = buffer->info;
for (unsigned int i = 0; i < count; i++)
@@ -647,18 +657,30 @@ hb_ot_position_default (hb_ot_shape_context_t *c)
unsigned int count = c->buffer->len;
hb_glyph_info_t *info = c->buffer->info;
hb_glyph_position_t *pos = c->buffer->pos;
- for (unsigned int i = 0; i < count; i++)
- {
- c->font->get_glyph_advance_for_direction (info[i].codepoint,
- direction,
- &pos[i].x_advance,
- &pos[i].y_advance);
- c->font->subtract_glyph_origin_for_direction (info[i].codepoint,
- direction,
- &pos[i].x_offset,
- &pos[i].y_offset);
+ if (HB_DIRECTION_IS_HORIZONTAL (direction))
+ {
+ for (unsigned int i = 0; i < count; i++)
+ pos[i].x_advance = c->font->get_glyph_h_advance (info[i].codepoint);
+ /* The nil glyph_h_origin() func returns 0, so no need to apply it. */
+ if (c->font->has_glyph_h_origin_func ())
+ for (unsigned int i = 0; i < count; i++)
+ c->font->subtract_glyph_h_origin (info[i].codepoint,
+ &pos[i].x_offset,
+ &pos[i].y_offset);
}
+ else
+ {
+ for (unsigned int i = 0; i < count; i++)
+ {
+ pos[i].y_advance = c->font->get_glyph_v_advance (info[i].codepoint);
+ c->font->subtract_glyph_v_origin (info[i].codepoint,
+ &pos[i].x_offset,
+ &pos[i].y_offset);
+ }
+ }
+ if (c->buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_SPACE_FALLBACK)
+ _hb_ot_shape_fallback_spaces (c->plan, c->font, c->buffer);
}
static inline bool
@@ -666,7 +688,7 @@ hb_ot_position_complex (hb_ot_shape_context_t *c)
{
bool ret = false;
unsigned int count = c->buffer->len;
- bool has_positioning = hb_ot_layout_has_positioning (c->face);
+ bool has_positioning = (bool) hb_ot_layout_has_positioning (c->face);
/* If the font has no GPOS, AND, no fallback positioning will
* happen, AND, direction is forward, then when zeroing mark
* widths, we shift the mark with it, such that the mark
@@ -703,23 +725,23 @@ hb_ot_position_complex (hb_ot_shape_context_t *c)
hb_glyph_info_t *info = c->buffer->info;
hb_glyph_position_t *pos = c->buffer->pos;
- /* Change glyph origin to what GPOS expects, apply GPOS, change it back. */
+ /* Change glyph origin to what GPOS expects (horizontal), apply GPOS, change it back. */
- for (unsigned int i = 0; i < count; i++) {
- c->font->add_glyph_origin_for_direction (info[i].codepoint,
- HB_DIRECTION_LTR,
- &pos[i].x_offset,
- &pos[i].y_offset);
- }
+ /* The nil glyph_h_origin() func returns 0, so no need to apply it. */
+ if (c->font->has_glyph_h_origin_func ())
+ for (unsigned int i = 0; i < count; i++)
+ c->font->add_glyph_h_origin (info[i].codepoint,
+ &pos[i].x_offset,
+ &pos[i].y_offset);
c->plan->position (c->font, c->buffer);
- for (unsigned int i = 0; i < count; i++) {
- c->font->subtract_glyph_origin_for_direction (info[i].codepoint,
- HB_DIRECTION_LTR,
- &pos[i].x_offset,
- &pos[i].y_offset);
- }
+ /* The nil glyph_h_origin() func returns 0, so no need to apply it. */
+ if (c->font->has_glyph_h_origin_func ())
+ for (unsigned int i = 0; i < count; i++)
+ c->font->subtract_glyph_h_origin (info[i].codepoint,
+ &pos[i].x_offset,
+ &pos[i].y_offset);
ret = true;
}
@@ -778,6 +800,12 @@ static void
hb_ot_shape_internal (hb_ot_shape_context_t *c)
{
c->buffer->deallocate_var_all ();
+ c->buffer->scratch_flags = HB_BUFFER_SCRATCH_FLAG_DEFAULT;
+ if (likely (!_hb_unsigned_int_mul_overflows (c->buffer->len, HB_BUFFER_MAX_EXPANSION_FACTOR)))
+ {
+ c->buffer->max_len = MAX (c->buffer->len * HB_BUFFER_MAX_EXPANSION_FACTOR,
+ (unsigned) HB_BUFFER_MAX_LEN_MIN);
+ }
/* Save the original direction, we use it later. */
c->target_direction = c->buffer->props.direction;
@@ -792,15 +820,22 @@ hb_ot_shape_internal (hb_ot_shape_context_t *c)
hb_ensure_native_direction (c->buffer);
+ if (c->plan->shaper->preprocess_text)
+ c->plan->shaper->preprocess_text (c->plan, c->buffer, c->font);
+
hb_ot_substitute (c);
hb_ot_position (c);
hb_ot_hide_default_ignorables (c);
+ if (c->plan->shaper->postprocess_glyphs)
+ c->plan->shaper->postprocess_glyphs (c->plan, c->buffer, c->font);
+
_hb_buffer_deallocate_unicode_vars (c->buffer);
c->buffer->props.direction = c->target_direction;
+ c->buffer->max_len = HB_BUFFER_MAX_LEN_DEFAULT;
c->buffer->deallocate_var_all ();
}
@@ -820,6 +855,8 @@ _hb_ot_shape (hb_shape_plan_t *shape_plan,
/**
+ * hb_ot_shape_plan_collect_lookups:
+ *
* Since: 0.9.7
**/
void
@@ -853,6 +890,8 @@ add_char (hb_font_t *font,
/**
+ * hb_ot_shape_glyphs_closure:
+ *
* Since: 0.9.2
**/
void
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.h
index 1402f54acc5..7b1bcc06378 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-shape.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.h
@@ -36,14 +36,14 @@
HB_BEGIN_DECLS
/* TODO port to shape-plan / set. */
-void
+HB_EXTERN void
hb_ot_shape_glyphs_closure (hb_font_t *font,
hb_buffer_t *buffer,
const hb_feature_t *features,
unsigned int num_features,
hb_set_t *glyphs);
-void
+HB_EXTERN void
hb_ot_shape_plan_collect_lookups (hb_shape_plan_t *shape_plan,
hb_tag_t table_tag,
hb_set_t *lookup_indexes /* OUT */);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-tag.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc
index a2e5728fcd8..a2e5728fcd8 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-tag.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-tag.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.h
index 1bf12ab3c09..54fb747f582 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot-tag.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.h
@@ -39,18 +39,18 @@ HB_BEGIN_DECLS
#define HB_OT_TAG_DEFAULT_SCRIPT HB_TAG ('D', 'F', 'L', 'T')
#define HB_OT_TAG_DEFAULT_LANGUAGE HB_TAG ('d', 'f', 'l', 't')
-void
+HB_EXTERN void
hb_ot_tags_from_script (hb_script_t script,
hb_tag_t *script_tag_1,
hb_tag_t *script_tag_2);
-hb_script_t
+HB_EXTERN hb_script_t
hb_ot_tag_to_script (hb_tag_t tag);
-hb_tag_t
+HB_EXTERN hb_tag_t
hb_ot_tag_from_language (hb_language_t language);
-hb_language_t
+HB_EXTERN hb_language_t
hb_ot_tag_to_language (hb_tag_t tag);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot.h
index 47c92a58e4b..47c92a58e4b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ot.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh
index 07550cb6eaa..5de1a2ba6d0 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh
@@ -54,6 +54,23 @@
#include <stdarg.h>
+/* Compile-time custom allocator support. */
+
+#if defined(hb_malloc_impl) \
+ && defined(hb_calloc_impl) \
+ && defined(hb_realloc_impl) \
+ && defined(hb_free_impl)
+extern "C" void* hb_malloc_impl(size_t size);
+extern "C" void* hb_calloc_impl(size_t nmemb, size_t size);
+extern "C" void* hb_realloc_impl(void *ptr, size_t size);
+extern "C" void hb_free_impl(void *ptr);
+#define malloc hb_malloc_impl
+#define calloc hb_calloc_impl
+#define realloc hb_realloc_impl
+#define free hb_free_impl
+#endif
+
+
/* Compiler attributes */
@@ -102,6 +119,36 @@
#define HB_FUNC __func__
#endif
+/*
+ * Borrowed from https://bugzilla.mozilla.org/show_bug.cgi?id=1215411
+ * HB_FALLTHROUGH is an annotation to suppress compiler warnings about switch
+ * cases that fall through without a break or return statement. HB_FALLTHROUGH
+ * is only needed on cases that have code:
+ *
+ * switch (foo) {
+ * case 1: // These cases have no code. No fallthrough annotations are needed.
+ * case 2:
+ * case 3:
+ * foo = 4; // This case has code, so a fallthrough annotation is needed:
+ * HB_FALLTHROUGH;
+ * default:
+ * return foo;
+ * }
+ */
+#if defined(__clang__) && __cplusplus >= 201103L
+ /* clang's fallthrough annotations are only available starting in C++11. */
+# define HB_FALLTHROUGH [[clang::fallthrough]]
+#elif defined(_MSC_VER)
+ /*
+ * MSVC's __fallthrough annotations are checked by /analyze (Code Analysis):
+ * https://msdn.microsoft.com/en-us/library/ms235402%28VS.80%29.aspx
+ */
+# include <sal.h>
+# define HB_FALLTHROUGH __fallthrough
+#else
+# define HB_FALLTHROUGH /* FALLTHROUGH */
+#endif
+
#if defined(_WIN32) || defined(__CYGWIN__)
/* We need Windows Vista for both Uniscribe backend and for
* MemoryBarrier. We don't support compiling on Windows XP,
@@ -132,6 +179,9 @@ static int errno = 0; /* Use something better? */
# endif
# if defined(_MSC_VER) && _MSC_VER < 1900
# define snprintf _snprintf
+# elif defined(_MSC_VER) && _MSC_VER >= 1900
+# /* Covers VC++ Error for strdup being a deprecated POSIX name and to instead use _strdup instead */
+# define strdup _strdup
# endif
#endif
@@ -193,9 +243,9 @@ static inline unsigned int ARRAY_LENGTH (const Type (&)[n]) { return n; }
#define _ASSERT_STATIC0(_line, _cond) _ASSERT_STATIC1 (_line, (_cond))
#define ASSERT_STATIC(_cond) _ASSERT_STATIC0 (__LINE__, (_cond))
-/* Note: C++ allows sizeof() of variable-lengh arrays. So, if _cond is not
- * constant, it still compiles (ouch!), but at least we'll get a -Wvla warning. */
-#define ASSERT_STATIC_EXPR_ZERO(_cond) (0 * sizeof (char[(_cond) ? 1 : -1]))
+template <unsigned int cond> class hb_assert_constant_t {};
+
+#define ASSERT_STATIC_EXPR_ZERO(_cond) (0 * (unsigned int) sizeof (hb_assert_constant_t<_cond>))
#define _PASTE1(a,b) a##b
#define PASTE(a,b) _PASTE1(a,b)
@@ -844,6 +894,29 @@ hb_in_ranges (T u, T lo1, T hi1, T lo2, T hi2, T lo3, T hi3)
}
+/* Enable bitwise ops on enums marked as flags_t */
+/* To my surprise, looks like the function resolver is happy to silently cast
+ * one enum to another... So this doesn't provide the type-checking that I
+ * originally had in mind... :(.
+ *
+ * For MSVC warnings, see: https://github.com/behdad/harfbuzz/pull/163
+ */
+#ifdef _MSC_VER
+# pragma warning(disable:4200)
+# pragma warning(disable:4800)
+#endif
+#define HB_MARK_AS_FLAG_T(T) \
+ extern "C++" { \
+ static inline T operator | (T l, T r) { return T ((unsigned) l | (unsigned) r); } \
+ static inline T operator & (T l, T r) { return T ((unsigned) l & (unsigned) r); } \
+ static inline T operator ^ (T l, T r) { return T ((unsigned) l ^ (unsigned) r); } \
+ static inline T operator ~ (T r) { return T (~(unsigned int) r); } \
+ static inline T& operator |= (T &l, T r) { l = l | r; return l; } \
+ static inline T& operator &= (T& l, T r) { l = l & r; return l; } \
+ static inline T& operator ^= (T& l, T r) { l = l ^ r; return l; } \
+ }
+
+
/* Useful for set-operations on small enums.
* For example, for testing "x ∈ {x1, x2, x3}" use:
* (FLAG_SAFE(x) & (FLAG(x1) | FLAG(x2) | FLAG(x3)))
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-set-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-private.hh
index 3c302b1daf6..3c302b1daf6 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-set-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-set.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc
index cb7fcdbf64c..cb7fcdbf64c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-set.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-set.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.h
index 29bf6556ab7..2164c1a6549 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-set.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.h
@@ -44,109 +44,109 @@ HB_BEGIN_DECLS
typedef struct hb_set_t hb_set_t;
-hb_set_t *
+HB_EXTERN hb_set_t *
hb_set_create (void);
-hb_set_t *
+HB_EXTERN hb_set_t *
hb_set_get_empty (void);
-hb_set_t *
+HB_EXTERN hb_set_t *
hb_set_reference (hb_set_t *set);
-void
+HB_EXTERN void
hb_set_destroy (hb_set_t *set);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_set_set_user_data (hb_set_t *set,
hb_user_data_key_t *key,
void * data,
hb_destroy_func_t destroy,
hb_bool_t replace);
-void *
+HB_EXTERN void *
hb_set_get_user_data (hb_set_t *set,
hb_user_data_key_t *key);
/* Returns false if allocation has failed before */
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_set_allocation_successful (const hb_set_t *set);
-void
+HB_EXTERN void
hb_set_clear (hb_set_t *set);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_set_is_empty (const hb_set_t *set);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_set_has (const hb_set_t *set,
hb_codepoint_t codepoint);
/* Right now limited to 16-bit integers. Eventually will do full codepoint range, sans -1
* which we will use as a sentinel. */
-void
+HB_EXTERN void
hb_set_add (hb_set_t *set,
hb_codepoint_t codepoint);
-void
+HB_EXTERN void
hb_set_add_range (hb_set_t *set,
hb_codepoint_t first,
hb_codepoint_t last);
-void
+HB_EXTERN void
hb_set_del (hb_set_t *set,
hb_codepoint_t codepoint);
-void
+HB_EXTERN void
hb_set_del_range (hb_set_t *set,
hb_codepoint_t first,
hb_codepoint_t last);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_set_is_equal (const hb_set_t *set,
const hb_set_t *other);
-void
+HB_EXTERN void
hb_set_set (hb_set_t *set,
const hb_set_t *other);
-void
+HB_EXTERN void
hb_set_union (hb_set_t *set,
const hb_set_t *other);
-void
+HB_EXTERN void
hb_set_intersect (hb_set_t *set,
const hb_set_t *other);
-void
+HB_EXTERN void
hb_set_subtract (hb_set_t *set,
const hb_set_t *other);
-void
+HB_EXTERN void
hb_set_symmetric_difference (hb_set_t *set,
const hb_set_t *other);
-void
+HB_EXTERN void
hb_set_invert (hb_set_t *set);
-unsigned int
+HB_EXTERN unsigned int
hb_set_get_population (const hb_set_t *set);
/* Returns -1 if set empty. */
-hb_codepoint_t
+HB_EXTERN hb_codepoint_t
hb_set_get_min (const hb_set_t *set);
/* Returns -1 if set empty. */
-hb_codepoint_t
+HB_EXTERN hb_codepoint_t
hb_set_get_max (const hb_set_t *set);
/* Pass -1 in to get started. */
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_set_next (const hb_set_t *set,
hb_codepoint_t *codepoint);
/* Pass -1 for first and last to get started. */
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_set_next_range (const hb_set_t *set,
hb_codepoint_t *first,
hb_codepoint_t *last);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shape-plan-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan-private.hh
index 607da5e7791..607da5e7791 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shape-plan-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shape-plan.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc
index d2f293d69de..56e2ea5c192 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shape-plan.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc
@@ -128,7 +128,7 @@ hb_shape_plan_create (hb_face_t *face,
face = hb_face_get_empty ();
if (unlikely (!props))
return hb_shape_plan_get_empty ();
- if (num_user_features && !(features = (hb_feature_t *) malloc (num_user_features * sizeof (hb_feature_t))))
+ if (num_user_features && !(features = (hb_feature_t *) calloc (num_user_features, sizeof (hb_feature_t))))
return hb_shape_plan_get_empty ();
if (!(shape_plan = hb_object_create<hb_shape_plan_t> ())) {
free (features);
@@ -293,8 +293,13 @@ hb_shape_plan_execute (hb_shape_plan_t *shape_plan,
num_features,
shape_plan->shaper_func);
- if (unlikely (hb_object_is_inert (shape_plan) ||
- hb_object_is_inert (buffer)))
+ if (unlikely (!buffer->len))
+ return true;
+
+ assert (!hb_object_is_inert (buffer));
+ assert (buffer->content_type == HB_BUFFER_CONTENT_TYPE_UNICODE);
+
+ if (unlikely (hb_object_is_inert (shape_plan)))
return false;
assert (shape_plan->face_unsafe == font->face);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shape-plan.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.h
index 8f54552f90b..aa5e0c7d6f5 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shape-plan.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.h
@@ -38,49 +38,49 @@ HB_BEGIN_DECLS
typedef struct hb_shape_plan_t hb_shape_plan_t;
-hb_shape_plan_t *
+HB_EXTERN hb_shape_plan_t *
hb_shape_plan_create (hb_face_t *face,
const hb_segment_properties_t *props,
const hb_feature_t *user_features,
unsigned int num_user_features,
const char * const *shaper_list);
-hb_shape_plan_t *
+HB_EXTERN hb_shape_plan_t *
hb_shape_plan_create_cached (hb_face_t *face,
const hb_segment_properties_t *props,
const hb_feature_t *user_features,
unsigned int num_user_features,
const char * const *shaper_list);
-hb_shape_plan_t *
+HB_EXTERN hb_shape_plan_t *
hb_shape_plan_get_empty (void);
-hb_shape_plan_t *
+HB_EXTERN hb_shape_plan_t *
hb_shape_plan_reference (hb_shape_plan_t *shape_plan);
-void
+HB_EXTERN void
hb_shape_plan_destroy (hb_shape_plan_t *shape_plan);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_shape_plan_set_user_data (hb_shape_plan_t *shape_plan,
hb_user_data_key_t *key,
void * data,
hb_destroy_func_t destroy,
hb_bool_t replace);
-void *
+HB_EXTERN void *
hb_shape_plan_get_user_data (hb_shape_plan_t *shape_plan,
hb_user_data_key_t *key);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_shape_plan_execute (hb_shape_plan_t *shape_plan,
hb_font_t *font,
hb_buffer_t *buffer,
const hb_feature_t *features,
unsigned int num_features);
-const char *
+HB_EXTERN const char *
hb_shape_plan_get_shaper (hb_shape_plan_t *shape_plan);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shape.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape.cc
index c06b9a46e87..8a985839891 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shape.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape.cc
@@ -371,11 +371,6 @@ hb_shape_full (hb_font_t *font,
unsigned int num_features,
const char * const *shaper_list)
{
- if (unlikely (!buffer->len))
- return true;
-
- assert (buffer->content_type == HB_BUFFER_CONTENT_TYPE_UNICODE);
-
hb_shape_plan_t *shape_plan = hb_shape_plan_create_cached (font->face, &buffer->props, features, num_features, shaper_list);
hb_bool_t res = hb_shape_plan_execute (shape_plan, font, buffer, features, num_features);
hb_shape_plan_destroy (shape_plan);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shape.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape.h
index b665509a0dd..53bb845bf48 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shape.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape.h
@@ -47,29 +47,29 @@ typedef struct hb_feature_t {
unsigned int end;
} hb_feature_t;
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_feature_from_string (const char *str, int len,
hb_feature_t *feature);
-void
+HB_EXTERN void
hb_feature_to_string (hb_feature_t *feature,
char *buf, unsigned int size);
-void
+HB_EXTERN void
hb_shape (hb_font_t *font,
hb_buffer_t *buffer,
const hb_feature_t *features,
unsigned int num_features);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_shape_full (hb_font_t *font,
hb_buffer_t *buffer,
const hb_feature_t *features,
unsigned int num_features,
const char * const *shaper_list);
-const char **
+HB_EXTERN const char **
hb_shape_list_shapers (void);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shaper-impl-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper-impl-private.hh
index 7844081e95b..7844081e95b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shaper-impl-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper-impl-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shaper-list.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper-list.hh
index 6c537d49215..6c537d49215 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shaper-list.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper-list.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shaper-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper-private.hh
index d1d1146dad2..d1d1146dad2 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shaper-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shaper.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper.cc
index 580b95c84b4..b25566d8a7c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-shaper.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper.cc
@@ -64,7 +64,7 @@ retry:
}
/* Not found; allocate one. */
- shapers = (hb_shaper_pair_t *) malloc (sizeof (all_shapers));
+ shapers = (hb_shaper_pair_t *) calloc (1, sizeof (all_shapers));
if (unlikely (!shapers)) {
(void) hb_atomic_ptr_cmpexch (&static_shapers, NULL, &all_shapers[0]);
return (const hb_shaper_pair_t *) all_shapers;
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ucdn.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc
index b4a58332445..b4a58332445 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-ucdn.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-unicode-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode-private.hh
index 968bca5567d..ecbec513cfa 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-unicode-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode-private.hh
@@ -199,6 +199,50 @@ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE
}
}
+ /* Space estimates based on:
+ * http://www.unicode.org/charts/PDF/U2000.pdf
+ * https://www.microsoft.com/typography/developers/fdsspec/spaces.aspx
+ */
+ enum space_t {
+ NOT_SPACE = 0,
+ SPACE_EM = 1,
+ SPACE_EM_2 = 2,
+ SPACE_EM_3 = 3,
+ SPACE_EM_4 = 4,
+ SPACE_EM_5 = 5,
+ SPACE_EM_6 = 6,
+ SPACE_EM_16 = 16,
+ SPACE_4_EM_18, /* 4/18th of an EM! */
+ SPACE,
+ SPACE_FIGURE,
+ SPACE_PUNCTUATION,
+ SPACE_NARROW,
+ };
+ static inline space_t
+ space_fallback_type (hb_codepoint_t u)
+ {
+ switch (u)
+ {
+ /* All GC=Zs chars that can use a fallback. */
+ default: return NOT_SPACE; /* Shouldn't happen. */
+ case 0x0020u: return SPACE; /* U+0020 SPACE */
+ case 0x00A0u: return SPACE; /* U+00A0 NO-BREAK SPACE */
+ case 0x2000u: return SPACE_EM_2; /* U+2000 EN QUAD */
+ case 0x2001u: return SPACE_EM; /* U+2001 EM QUAD */
+ case 0x2002u: return SPACE_EM_2; /* U+2002 EN SPACE */
+ case 0x2003u: return SPACE_EM; /* U+2003 EM SPACE */
+ case 0x2004u: return SPACE_EM_3; /* U+2004 THREE-PER-EM SPACE */
+ case 0x2005u: return SPACE_EM_4; /* U+2005 FOUR-PER-EM SPACE */
+ case 0x2006u: return SPACE_EM_6; /* U+2006 SIX-PER-EM SPACE */
+ case 0x2007u: return SPACE_FIGURE; /* U+2007 FIGURE SPACE */
+ case 0x2008u: return SPACE_PUNCTUATION; /* U+2008 PUNCTUATION SPACE */
+ case 0x2009u: return SPACE_EM_5; /* U+2009 THIN SPACE */
+ case 0x200Au: return SPACE_EM_16; /* U+200A HAIR SPACE */
+ case 0x202Fu: return SPACE_NARROW; /* U+202F NARROW NO-BREAK SPACE */
+ case 0x205Fu: return SPACE_4_EM_18; /* U+205F MEDIUM MATHEMATICAL SPACE */
+ case 0x3000u: return SPACE_EM; /* U+3000 IDEOGRAPHIC SPACE */
+ }
+ }
struct {
#define HB_UNICODE_FUNC_IMPLEMENT(name) hb_unicode_##name##_func_t name;
@@ -313,5 +357,9 @@ extern HB_INTERNAL const hb_unicode_funcs_t _hb_unicode_funcs_nil;
FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) | \
FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)))
+#define HB_UNICODE_GENERAL_CATEGORY_IS_NON_ENCLOSING_MARK(gen_cat) \
+ (FLAG_SAFE (gen_cat) & \
+ (FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) | \
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)))
#endif /* HB_UNICODE_PRIVATE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-unicode.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.cc
index 487d10b9395..487d10b9395 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-unicode.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-unicode.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.h
index 3a12e2f9a2e..33b68aa0d85 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-unicode.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.h
@@ -174,23 +174,23 @@ typedef struct hb_unicode_funcs_t hb_unicode_funcs_t;
/*
* just give me the best implementation you've got there.
*/
-hb_unicode_funcs_t *
+HB_EXTERN hb_unicode_funcs_t *
hb_unicode_funcs_get_default (void);
-hb_unicode_funcs_t *
+HB_EXTERN hb_unicode_funcs_t *
hb_unicode_funcs_create (hb_unicode_funcs_t *parent);
-hb_unicode_funcs_t *
+HB_EXTERN hb_unicode_funcs_t *
hb_unicode_funcs_get_empty (void);
-hb_unicode_funcs_t *
+HB_EXTERN hb_unicode_funcs_t *
hb_unicode_funcs_reference (hb_unicode_funcs_t *ufuncs);
-void
+HB_EXTERN void
hb_unicode_funcs_destroy (hb_unicode_funcs_t *ufuncs);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_unicode_funcs_set_user_data (hb_unicode_funcs_t *ufuncs,
hb_user_data_key_t *key,
void * data,
@@ -198,18 +198,18 @@ hb_unicode_funcs_set_user_data (hb_unicode_funcs_t *ufuncs,
hb_bool_t replace);
-void *
+HB_EXTERN void *
hb_unicode_funcs_get_user_data (hb_unicode_funcs_t *ufuncs,
hb_user_data_key_t *key);
-void
+HB_EXTERN void
hb_unicode_funcs_make_immutable (hb_unicode_funcs_t *ufuncs);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_unicode_funcs_is_immutable (hb_unicode_funcs_t *ufuncs);
-hb_unicode_funcs_t *
+HB_EXTERN hb_unicode_funcs_t *
hb_unicode_funcs_get_parent (hb_unicode_funcs_t *ufuncs);
@@ -285,7 +285,7 @@ typedef unsigned int (*hb_unicode_decompose_compatibility_func_t) (hb_unicode_
*
* Since: 0.9.2
**/
-void
+HB_EXTERN void
hb_unicode_funcs_set_combining_class_func (hb_unicode_funcs_t *ufuncs,
hb_unicode_combining_class_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -301,7 +301,7 @@ hb_unicode_funcs_set_combining_class_func (hb_unicode_funcs_t *ufuncs,
*
* Since: 0.9.2
**/
-void
+HB_EXTERN void
hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs,
hb_unicode_eastasian_width_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -317,7 +317,7 @@ hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs,
*
* Since: 0.9.2
**/
-void
+HB_EXTERN void
hb_unicode_funcs_set_general_category_func (hb_unicode_funcs_t *ufuncs,
hb_unicode_general_category_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -333,7 +333,7 @@ hb_unicode_funcs_set_general_category_func (hb_unicode_funcs_t *ufuncs,
*
* Since: 0.9.2
**/
-void
+HB_EXTERN void
hb_unicode_funcs_set_mirroring_func (hb_unicode_funcs_t *ufuncs,
hb_unicode_mirroring_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -349,7 +349,7 @@ hb_unicode_funcs_set_mirroring_func (hb_unicode_funcs_t *ufuncs,
*
* Since: 0.9.2
**/
-void
+HB_EXTERN void
hb_unicode_funcs_set_script_func (hb_unicode_funcs_t *ufuncs,
hb_unicode_script_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -365,7 +365,7 @@ hb_unicode_funcs_set_script_func (hb_unicode_funcs_t *ufuncs,
*
* Since: 0.9.2
**/
-void
+HB_EXTERN void
hb_unicode_funcs_set_compose_func (hb_unicode_funcs_t *ufuncs,
hb_unicode_compose_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -381,7 +381,7 @@ hb_unicode_funcs_set_compose_func (hb_unicode_funcs_t *ufuncs,
*
* Since: 0.9.2
**/
-void
+HB_EXTERN void
hb_unicode_funcs_set_decompose_func (hb_unicode_funcs_t *ufuncs,
hb_unicode_decompose_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -397,7 +397,7 @@ hb_unicode_funcs_set_decompose_func (hb_unicode_funcs_t *ufuncs,
*
* Since: 0.9.2
**/
-void
+HB_EXTERN void
hb_unicode_funcs_set_decompose_compatibility_func (hb_unicode_funcs_t *ufuncs,
hb_unicode_decompose_compatibility_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -407,42 +407,42 @@ hb_unicode_funcs_set_decompose_compatibility_func (hb_unicode_funcs_t *ufuncs,
/**
* Since: 0.9.2
**/
-hb_unicode_combining_class_t
+HB_EXTERN hb_unicode_combining_class_t
hb_unicode_combining_class (hb_unicode_funcs_t *ufuncs,
hb_codepoint_t unicode);
/**
* Since: 0.9.2
**/
-unsigned int
+HB_EXTERN unsigned int
hb_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs,
hb_codepoint_t unicode);
/**
* Since: 0.9.2
**/
-hb_unicode_general_category_t
+HB_EXTERN hb_unicode_general_category_t
hb_unicode_general_category (hb_unicode_funcs_t *ufuncs,
hb_codepoint_t unicode);
/**
* Since: 0.9.2
**/
-hb_codepoint_t
+HB_EXTERN hb_codepoint_t
hb_unicode_mirroring (hb_unicode_funcs_t *ufuncs,
hb_codepoint_t unicode);
/**
* Since: 0.9.2
**/
-hb_script_t
+HB_EXTERN hb_script_t
hb_unicode_script (hb_unicode_funcs_t *ufuncs,
hb_codepoint_t unicode);
/**
* Since: 0.9.2
**/
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_unicode_compose (hb_unicode_funcs_t *ufuncs,
hb_codepoint_t a,
hb_codepoint_t b,
@@ -451,7 +451,7 @@ hb_unicode_compose (hb_unicode_funcs_t *ufuncs,
/**
* Since: 0.9.2
**/
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_unicode_decompose (hb_unicode_funcs_t *ufuncs,
hb_codepoint_t ab,
hb_codepoint_t *a,
@@ -460,7 +460,7 @@ hb_unicode_decompose (hb_unicode_funcs_t *ufuncs,
/**
* Since: 0.9.2
**/
-unsigned int
+HB_EXTERN unsigned int
hb_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs,
hb_codepoint_t u,
hb_codepoint_t *decomposed);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-uniscribe.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-uniscribe.cc
index 01be0cc846b..01be0cc846b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-uniscribe.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-uniscribe.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-uniscribe.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-uniscribe.h
index 001ab38ea87..4e4ef9986a6 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-uniscribe.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-uniscribe.h
@@ -34,10 +34,10 @@
HB_BEGIN_DECLS
-LOGFONTW *
+HB_EXTERN LOGFONTW *
hb_uniscribe_font_get_logfontw (hb_font_t *font);
-HFONT
+HB_EXTERN HFONT
hb_uniscribe_font_get_hfont (hb_font_t *font);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-utf-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-utf-private.hh
index 14d3c2e369b..74cf5d66a29 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-utf-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-utf-private.hh
@@ -146,11 +146,11 @@ struct hb_utf16_t
return text;
}
- if (likely (hb_in_range (c, 0xD800u, 0xDBFFu)))
+ if (likely (c <= 0xDBFFu && text < end))
{
/* High-surrogate in c */
- hb_codepoint_t l;
- if (text < end && ((l = *text), likely (hb_in_range (l, 0xDC00u, 0xDFFFu))))
+ hb_codepoint_t l = *text;
+ if (likely (hb_in_range (l, 0xDC00u, 0xDFFFu)))
{
/* Low-surrogate in l */
*unicode = (c << 10) + l - ((0xD800u << 10) - 0x10000u + 0xDC00u);
@@ -170,8 +170,7 @@ struct hb_utf16_t
hb_codepoint_t *unicode,
hb_codepoint_t replacement)
{
- const uint16_t *end = text--;
- hb_codepoint_t c = *text;
+ hb_codepoint_t c = *--text;
if (likely (!hb_in_range (c, 0xD800u, 0xDFFFu)))
{
@@ -179,14 +178,22 @@ struct hb_utf16_t
return text;
}
- if (likely (start < text && hb_in_range (c, 0xDC00u, 0xDFFFu)))
- text--;
-
- if (likely (next (text, end, unicode, replacement) == end))
- return text;
+ if (likely (c >= 0xDC00u && start < text))
+ {
+ /* Low-surrogate in c */
+ hb_codepoint_t h = text[-1];
+ if (likely (hb_in_range (h, 0xD800u, 0xDBFFu)))
+ {
+ /* High-surrogate in h */
+ *unicode = (h << 10) + c - ((0xD800u << 10) - 0x10000u + 0xDC00u);
+ text--;
+ return text;
+ }
+ }
+ /* Lonely / out-of-order surrogate. */
*unicode = replacement;
- return end - 1;
+ return text;
}
@@ -211,14 +218,9 @@ struct hb_utf32_t
hb_codepoint_t *unicode,
hb_codepoint_t replacement)
{
- hb_codepoint_t c = *text++;
- if (validate && unlikely (c > 0x10FFFFu || hb_in_range (c, 0xD800u, 0xDFFFu)))
- goto error;
- *unicode = c;
- return text;
-
- error:
- *unicode = replacement;
+ hb_codepoint_t c = *unicode = *text++;
+ if (validate && unlikely (c >= 0xD800u && (c <= 0xDFFFu || c > 0x10FFFFu)))
+ *unicode = replacement;
return text;
}
@@ -228,8 +230,10 @@ struct hb_utf32_t
hb_codepoint_t *unicode,
hb_codepoint_t replacement)
{
- next (text - 1, text, unicode, replacement);
- return text - 1;
+ hb_codepoint_t c = *unicode = *--text;
+ if (validate && unlikely (c >= 0xD800u && (c <= 0xDFFFu || c > 0x10FFFFu)))
+ *unicode = replacement;
+ return text;
}
static inline unsigned int
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-version.h.in b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-version.h.in
index 2517160d18b..0ffd889b278 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-version.h.in
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-version.h.in
@@ -47,15 +47,15 @@ HB_BEGIN_DECLS
HB_VERSION_MAJOR*10000+HB_VERSION_MINOR*100+HB_VERSION_MICRO)
-void
+HB_EXTERN void
hb_version (unsigned int *major,
unsigned int *minor,
unsigned int *micro);
-const char *
+HB_EXTERN const char *
hb_version_string (void);
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_version_atleast (unsigned int major,
unsigned int minor,
unsigned int micro);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-warning.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-warning.cc
index 8f322bcb10d..8f322bcb10d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb-warning.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-warning.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb.h
index c5a938a3818..7402034f437 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/hb.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb.h
@@ -28,6 +28,10 @@
#define HB_H
#define HB_H_IN
+#ifndef HB_EXTERN
+#define HB_EXTERN extern
+#endif
+
#include "hb-blob.h"
#include "hb-buffer.h"
#include "hb-common.h"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/main.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/main.cc
index f9708cc948e..f9708cc948e 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/main.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/main.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/test-buffer-serialize.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-buffer-serialize.cc
index 18c46e9524b..18c46e9524b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/test-buffer-serialize.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-buffer-serialize.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/test-size-params.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-size-params.cc
index 35d9e3c8e25..35d9e3c8e25 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/test-size-params.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-size-params.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/test-would-substitute.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-would-substitute.cc
index 8ea87cdf397..8ea87cdf397 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/test-would-substitute.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-would-substitute.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/test.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/test.cc
index a8fe046f34c..a8fe046f34c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-1.0.4/src/test.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/test.cc
diff --git a/Build/source/libs/harfbuzz/version.ac b/Build/source/libs/harfbuzz/version.ac
index 3fc6ae61970..3a477952ae6 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.0.4])
+m4_define([harfbuzz_version], [1.1.2])