summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-09-11 04:13:36 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-09-11 04:13:36 +0000
commit683672628fe7bb6a6c5e71735942eb1b5fcae0a6 (patch)
treeb01fc67059d533445d1bc8826f03c5055af389c2
parentc9d2cebb0c8eac1a2f3f6aac9031c9957cf956aa (diff)
harfbuzz 1.9.0
git-svn-id: svn://tug.org/texlive/trunk@48641 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/libs/README2
-rw-r--r--Build/source/libs/harfbuzz/ChangeLog5
-rw-r--r--Build/source/libs/harfbuzz/Makefile.am79
-rw-r--r--Build/source/libs/harfbuzz/Makefile.in89
-rw-r--r--Build/source/libs/harfbuzz/TLpatches/ChangeLog5
-rw-r--r--Build/source/libs/harfbuzz/TLpatches/TL-Changes2
-rwxr-xr-xBuild/source/libs/harfbuzz/configure26
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog1217
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/NEWS19
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/configure.ac2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources81
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/check-includes.sh8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/dump-indic-data.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/dump-khmer-data.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/dump-myanmar-data.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/dump-use-data.cc2
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py2
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-ankr-table.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-bsln-table.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-common.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-common-private.hh)8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-feat-table.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-kerx-table.hh4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh6
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh6
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.cc25
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-private.hh)14
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-ltag-table.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic-private.hh)13
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.cc4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob-private.hh)12
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.rl2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.rl2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-private.hh)12
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc7
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-debug.hh4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-dsalgs.hh14
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc215
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.h33
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face-private.hh)12
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-fallback-shape.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc6
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh)12
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc11
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-glib.cc9
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-enums.cc.tmpl2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-icu.cc9
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-iter.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-iter-private.hh)8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-machinery.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-machinery-private.hh)175
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map-private.hh)8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-mutex.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-mutex-private.hh)8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-null.hh45
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-object.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-object-private.hh)14
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-file.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-file-private.hh)13
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type-private.hh)42
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh284
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-cbdt-table.hh4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-cpal-table.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-sbix-table.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-svg-table.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color.cc12
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-face.cc76
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-face.hh116
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc133
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-glyf-table.hh6
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hdmx-table.hh20
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-head-table.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hhea-table.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hmtx-table.hh6
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-kern-table.hh4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-base-table.hh4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common-private.hh)303
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gdef-table.hh51
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh203
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh417
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh)443
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-jstf-table.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc198
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh)151
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map-private.hh)8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math-table.hh4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math.cc8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-maxp-table.hh3
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name-table.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-table.hh3
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-unicode-ranges.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-macroman.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh5
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-fallback.hh5
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-win1256.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc6
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-private.hh)10
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-default.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hebrew.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-machine.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-machine.rl2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-table.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-private.hh)12
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer-machine.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer-machine.rl2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer-private.hh)10
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar-machine.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar-machine.rl2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar-private.hh)10
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-tibetan.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.rl2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-private.hh)10
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-private.hh)12
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback-private.hh)10
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize.cc6
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize-private.hh)8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc26
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-private.hh)12
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-avar-table.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-hvar-table.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-mvar-table.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var.cc12
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-digest.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-digest-private.hh)12
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-private.hh)20
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc10
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan-private.hh)10
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape.cc16
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper-impl.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper-impl-private.hh)16
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper.cc9
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper-private.hh)8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-static.cc8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-string-array.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-glyf.cc3
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-glyf.hh4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc48
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-private.hh)24
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc33
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh22
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc259
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h33
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.hh60
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc6
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.cc6
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.h8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode-private.hh)8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-uniscribe.cc6
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-utf.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-utf-private.hh)8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-vector.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-vector-private.hh)10
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-warning.cc6
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh)12
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/main.cc4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/test-buffer-serialize.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/test-size-params.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/test-unicode-ranges.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/test-would-substitute.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/test.cc2
-rw-r--r--Build/source/libs/harfbuzz/version.ac2
175 files changed, 4086 insertions, 1630 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README
index 8abfd4a15dd..334a0df72b8 100644
--- a/Build/source/libs/README
+++ b/Build/source/libs/README
@@ -25,7 +25,7 @@ graphite2 1.3.12 - checked 16aug18
http://sourceforge.net/projects/silgraphite/files/graphite2/
(requires C++11)
-harfbuzz 1.8.8 - checked 15aug18
+harfbuzz 1.9.0 - checked 11sep18
http://www.freedesktop.org/software/harfbuzz/release/
icu 61.1 - checked 29mar18
diff --git a/Build/source/libs/harfbuzz/ChangeLog b/Build/source/libs/harfbuzz/ChangeLog
index f6663a60671..48421da880d 100644
--- a/Build/source/libs/harfbuzz/ChangeLog
+++ b/Build/source/libs/harfbuzz/ChangeLog
@@ -1,3 +1,8 @@
+2018-09-11 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ Import harfbuzz-1.9.0.
+ * version.ac, Makefile.am: Adjusted.
+
2018-08-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
Import harfbuzz-1.8.8.
diff --git a/Build/source/libs/harfbuzz/Makefile.am b/Build/source/libs/harfbuzz/Makefile.am
index b850fa1f1b3..2242e91b854 100644
--- a/Build/source/libs/harfbuzz/Makefile.am
+++ b/Build/source/libs/harfbuzz/Makefile.am
@@ -31,30 +31,32 @@ AM_CPPFLAGS = -DHB_NO_MT -DHB_NO_UNICODE_FUNCS -DHAVE_FALLBACK=1 \
-I$(top_srcdir)/$(HARFBUZZ_SRC)
libharfbuzz_dependencies =
libharfbuzz_a_SOURCES = \
- @HARFBUZZ_TREE@/src/hb-atomic-private.hh \
- @HARFBUZZ_TREE@/src/hb-blob-private.hh \
+ @HARFBUZZ_TREE@/src/hb-atomic.hh \
+ @HARFBUZZ_TREE@/src/hb-blob.hh \
@HARFBUZZ_TREE@/src/hb-blob.cc \
- @HARFBUZZ_TREE@/src/hb-buffer-private.hh \
+ @HARFBUZZ_TREE@/src/hb-buffer.hh \
@HARFBUZZ_TREE@/src/hb-buffer-serialize.cc \
@HARFBUZZ_TREE@/src/hb-buffer.cc \
@HARFBUZZ_TREE@/src/hb-common.cc \
@HARFBUZZ_TREE@/src/hb-debug.hh \
@HARFBUZZ_TREE@/src/hb-dsalgs.hh \
- @HARFBUZZ_TREE@/src/hb-face-private.hh \
+ @HARFBUZZ_TREE@/src/hb-face.hh \
@HARFBUZZ_TREE@/src/hb-face.cc \
- @HARFBUZZ_TREE@/src/hb-font-private.hh \
+ @HARFBUZZ_TREE@/src/hb-font.hh \
@HARFBUZZ_TREE@/src/hb-font.cc \
- @HARFBUZZ_TREE@/src/hb-iter-private.hh \
- @HARFBUZZ_TREE@/src/hb-map-private.hh \
+ @HARFBUZZ_TREE@/src/hb-iter.hh \
+ @HARFBUZZ_TREE@/src/hb-map.hh \
@HARFBUZZ_TREE@/src/hb-map.cc \
- @HARFBUZZ_TREE@/src/hb-machinery-private.hh \
- @HARFBUZZ_TREE@/src/hb-mutex-private.hh \
+ @HARFBUZZ_TREE@/src/hb-machinery.hh \
+ @HARFBUZZ_TREE@/src/hb-mutex.hh \
@HARFBUZZ_TREE@/src/hb-null.hh \
- @HARFBUZZ_TREE@/src/hb-object-private.hh \
- @HARFBUZZ_TREE@/src/hb-open-file-private.hh \
- @HARFBUZZ_TREE@/src/hb-open-type-private.hh \
+ @HARFBUZZ_TREE@/src/hb-object.hh \
+ @HARFBUZZ_TREE@/src/hb-open-file.hh \
+ @HARFBUZZ_TREE@/src/hb-open-type.hh \
@HARFBUZZ_TREE@/src/hb-ot-color-cbdt-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-cmap-table.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-face.cc \
+ @HARFBUZZ_TREE@/src/hb-ot-face.hh \
@HARFBUZZ_TREE@/src/hb-ot-glyf-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-hdmx-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-head-table.hh \
@@ -68,87 +70,88 @@ libharfbuzz_a_SOURCES = \
@HARFBUZZ_TREE@/src/hb-ot-post-macroman.hh \
@HARFBUZZ_TREE@/src/hb-ot-post-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-tag.cc \
- @HARFBUZZ_TREE@/src/hb-private.hh \
- @HARFBUZZ_TREE@/src/hb-set-digest-private.hh \
- @HARFBUZZ_TREE@/src/hb-set-private.hh \
+ @HARFBUZZ_TREE@/src/hb-set-digest.hh \
+ @HARFBUZZ_TREE@/src/hb-set.hh \
@HARFBUZZ_TREE@/src/hb-set.cc \
@HARFBUZZ_TREE@/src/hb-shape.cc \
- @HARFBUZZ_TREE@/src/hb-shape-plan-private.hh \
+ @HARFBUZZ_TREE@/src/hb-shape-plan.hh \
@HARFBUZZ_TREE@/src/hb-shape-plan.cc \
@HARFBUZZ_TREE@/src/hb-shaper-list.hh \
- @HARFBUZZ_TREE@/src/hb-shaper-impl-private.hh \
- @HARFBUZZ_TREE@/src/hb-shaper-private.hh \
+ @HARFBUZZ_TREE@/src/hb-shaper-impl.hh \
+ @HARFBUZZ_TREE@/src/hb-shaper.hh \
@HARFBUZZ_TREE@/src/hb-shaper.cc \
@HARFBUZZ_TREE@/src/hb-static.cc \
@HARFBUZZ_TREE@/src/hb-string-array.hh \
- @HARFBUZZ_TREE@/src/hb-unicode-private.hh \
+ @HARFBUZZ_TREE@/src/hb-subset-input.hh \
+ @HARFBUZZ_TREE@/src/hb-subset.hh \
+ @HARFBUZZ_TREE@/src/hb-unicode.hh \
@HARFBUZZ_TREE@/src/hb-unicode.cc \
- @HARFBUZZ_TREE@/src/hb-vector-private.hh \
- @HARFBUZZ_TREE@/src/hb-utf-private.hh \
+ @HARFBUZZ_TREE@/src/hb-vector.hh \
+ @HARFBUZZ_TREE@/src/hb-utf.hh \
@HARFBUZZ_TREE@/src/hb-warning.cc \
@HARFBUZZ_TREE@/src/hb-buffer-deserialize-json.hh \
@HARFBUZZ_TREE@/src/hb-buffer-deserialize-text.hh \
- @HARFBUZZ_TREE@/src/hb-fallback-shape.cc
-
+ @HARFBUZZ_TREE@/src/hb-fallback-shape.cc \
+ @HARFBUZZ_TREE@/src/hb.hh
## native OpenType Layout backend
libharfbuzz_a_SOURCES += \
@HARFBUZZ_TREE@/src/hb-aat-layout.cc \
- @HARFBUZZ_TREE@/src/aat-layout-common-private.hh \
+ @HARFBUZZ_TREE@/src/hb-aat-layout-common.hh \
@HARFBUZZ_TREE@/src/hb-aat-layout-ankr-table.hh \
@HARFBUZZ_TREE@/src/hb-aat-layout-bsln-table.hh \
@HARFBUZZ_TREE@/src/hb-aat-layout-feat-table.hh \
@HARFBUZZ_TREE@/src/hb-aat-layout-kerx-table.hh \
@HARFBUZZ_TREE@/src/hb-aat-layout-morx-table.hh \
@HARFBUZZ_TREE@/src/hb-aat-layout-trak-table.hh \
- @HARFBUZZ_TREE@/src/hb-aat-layout-private.hh \
+ @HARFBUZZ_TREE@/src/hb-aat-layout.hh \
@HARFBUZZ_TREE@/src/hb-aat-ltag-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-font.cc \
@HARFBUZZ_TREE@/src/hb-ot-layout.cc \
@HARFBUZZ_TREE@/src/hb-ot-layout-base-table.hh \
- @HARFBUZZ_TREE@/src/hb-ot-layout-common-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-layout-common.hh \
@HARFBUZZ_TREE@/src/hb-ot-layout-gdef-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-layout-gpos-table.hh \
- @HARFBUZZ_TREE@/src/hb-ot-layout-gsubgpos-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-layout-gsubgpos.hh \
@HARFBUZZ_TREE@/src/hb-ot-layout-gsub-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-layout-jstf-table.hh \
- @HARFBUZZ_TREE@/src/hb-ot-layout-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-layout.hh \
@HARFBUZZ_TREE@/src/hb-ot-color.cc \
@HARFBUZZ_TREE@/src/hb-ot-color-colr-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-color-cpal-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-color-sbix-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-color-svg-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-map.cc \
- @HARFBUZZ_TREE@/src/hb-ot-map-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-map.hh \
@HARFBUZZ_TREE@/src/hb-ot-math.cc \
@HARFBUZZ_TREE@/src/hb-ot-math-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-arabic.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-arabic-fallback.hh \
- @HARFBUZZ_TREE@/src/hb-ot-shape-complex-arabic-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-arabic.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-arabic-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-arabic-win1256.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-default.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-hangul.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-hebrew.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic.cc \
- @HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic-table.cc \
- @HARFBUZZ_TREE@/src/hb-ot-shape-complex-khmer-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-khmer.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-khmer.cc \
- @HARFBUZZ_TREE@/src/hb-ot-shape-complex-myanmar-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-myanmar.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-myanmar.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-thai.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-tibetan.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-use.cc \
- @HARFBUZZ_TREE@/src/hb-ot-shape-complex-use-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-use-table.cc \
- @HARFBUZZ_TREE@/src/hb-ot-shape-complex-private.hh \
- @HARFBUZZ_TREE@/src/hb-ot-shape-normalize-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-use.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-normalize.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-normalize.cc \
- @HARFBUZZ_TREE@/src/hb-ot-shape-fallback-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-fallback.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-fallback.cc \
- @HARFBUZZ_TREE@/src/hb-ot-shape-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape.hh \
@HARFBUZZ_TREE@/src/hb-ot-var.cc \
@HARFBUZZ_TREE@/src/hb-ot-var-avar-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-var-fvar-table.hh \
diff --git a/Build/source/libs/harfbuzz/Makefile.in b/Build/source/libs/harfbuzz/Makefile.in
index 1263f1a8e49..287c4eddabf 100644
--- a/Build/source/libs/harfbuzz/Makefile.in
+++ b/Build/source/libs/harfbuzz/Makefile.in
@@ -127,6 +127,7 @@ am_libharfbuzz_a_OBJECTS = @HARFBUZZ_TREE@/src/hb-blob.$(OBJEXT) \
@HARFBUZZ_TREE@/src/hb-face.$(OBJEXT) \
@HARFBUZZ_TREE@/src/hb-font.$(OBJEXT) \
@HARFBUZZ_TREE@/src/hb-map.$(OBJEXT) \
+ @HARFBUZZ_TREE@/src/hb-ot-face.$(OBJEXT) \
@HARFBUZZ_TREE@/src/hb-ot-tag.$(OBJEXT) \
@HARFBUZZ_TREE@/src/hb-set.$(OBJEXT) \
@HARFBUZZ_TREE@/src/hb-shape.$(OBJEXT) \
@@ -197,6 +198,7 @@ am__depfiles_remade = ./$(DEPDIR)/hbtest-dummy.Po \
@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-icu.Po \
@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-map.Po \
@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-color.Po \
+ @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-face.Po \
@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-font.Po \
@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-layout.Po \
@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-map.Po \
@@ -696,30 +698,27 @@ AM_CPPFLAGS = -DHB_NO_MT -DHB_NO_UNICODE_FUNCS -DHAVE_FALLBACK=1 \
-I$(top_srcdir)/$(HARFBUZZ_SRC) $(ICU_INCLUDES) \
$(GRAPHITE2_INCLUDES)
libharfbuzz_dependencies = $(ICU_DEPEND) $(GRAPHITE2_DEPEND)
-libharfbuzz_a_SOURCES = @HARFBUZZ_TREE@/src/hb-atomic-private.hh \
- @HARFBUZZ_TREE@/src/hb-blob-private.hh \
- @HARFBUZZ_TREE@/src/hb-blob.cc \
- @HARFBUZZ_TREE@/src/hb-buffer-private.hh \
+libharfbuzz_a_SOURCES = @HARFBUZZ_TREE@/src/hb-atomic.hh \
+ @HARFBUZZ_TREE@/src/hb-blob.hh @HARFBUZZ_TREE@/src/hb-blob.cc \
+ @HARFBUZZ_TREE@/src/hb-buffer.hh \
@HARFBUZZ_TREE@/src/hb-buffer-serialize.cc \
@HARFBUZZ_TREE@/src/hb-buffer.cc \
@HARFBUZZ_TREE@/src/hb-common.cc \
@HARFBUZZ_TREE@/src/hb-debug.hh \
@HARFBUZZ_TREE@/src/hb-dsalgs.hh \
- @HARFBUZZ_TREE@/src/hb-face-private.hh \
- @HARFBUZZ_TREE@/src/hb-face.cc \
- @HARFBUZZ_TREE@/src/hb-font-private.hh \
- @HARFBUZZ_TREE@/src/hb-font.cc \
- @HARFBUZZ_TREE@/src/hb-iter-private.hh \
- @HARFBUZZ_TREE@/src/hb-map-private.hh \
+ @HARFBUZZ_TREE@/src/hb-face.hh @HARFBUZZ_TREE@/src/hb-face.cc \
+ @HARFBUZZ_TREE@/src/hb-font.hh @HARFBUZZ_TREE@/src/hb-font.cc \
+ @HARFBUZZ_TREE@/src/hb-iter.hh @HARFBUZZ_TREE@/src/hb-map.hh \
@HARFBUZZ_TREE@/src/hb-map.cc \
- @HARFBUZZ_TREE@/src/hb-machinery-private.hh \
- @HARFBUZZ_TREE@/src/hb-mutex-private.hh \
- @HARFBUZZ_TREE@/src/hb-null.hh \
- @HARFBUZZ_TREE@/src/hb-object-private.hh \
- @HARFBUZZ_TREE@/src/hb-open-file-private.hh \
- @HARFBUZZ_TREE@/src/hb-open-type-private.hh \
+ @HARFBUZZ_TREE@/src/hb-machinery.hh \
+ @HARFBUZZ_TREE@/src/hb-mutex.hh @HARFBUZZ_TREE@/src/hb-null.hh \
+ @HARFBUZZ_TREE@/src/hb-object.hh \
+ @HARFBUZZ_TREE@/src/hb-open-file.hh \
+ @HARFBUZZ_TREE@/src/hb-open-type.hh \
@HARFBUZZ_TREE@/src/hb-ot-color-cbdt-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-cmap-table.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-face.cc \
+ @HARFBUZZ_TREE@/src/hb-ot-face.hh \
@HARFBUZZ_TREE@/src/hb-ot-glyf-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-hdmx-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-head-table.hh \
@@ -733,82 +732,82 @@ libharfbuzz_a_SOURCES = @HARFBUZZ_TREE@/src/hb-atomic-private.hh \
@HARFBUZZ_TREE@/src/hb-ot-post-macroman.hh \
@HARFBUZZ_TREE@/src/hb-ot-post-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-tag.cc \
- @HARFBUZZ_TREE@/src/hb-private.hh \
- @HARFBUZZ_TREE@/src/hb-set-digest-private.hh \
- @HARFBUZZ_TREE@/src/hb-set-private.hh \
- @HARFBUZZ_TREE@/src/hb-set.cc @HARFBUZZ_TREE@/src/hb-shape.cc \
- @HARFBUZZ_TREE@/src/hb-shape-plan-private.hh \
+ @HARFBUZZ_TREE@/src/hb-set-digest.hh \
+ @HARFBUZZ_TREE@/src/hb-set.hh @HARFBUZZ_TREE@/src/hb-set.cc \
+ @HARFBUZZ_TREE@/src/hb-shape.cc \
+ @HARFBUZZ_TREE@/src/hb-shape-plan.hh \
@HARFBUZZ_TREE@/src/hb-shape-plan.cc \
@HARFBUZZ_TREE@/src/hb-shaper-list.hh \
- @HARFBUZZ_TREE@/src/hb-shaper-impl-private.hh \
- @HARFBUZZ_TREE@/src/hb-shaper-private.hh \
+ @HARFBUZZ_TREE@/src/hb-shaper-impl.hh \
+ @HARFBUZZ_TREE@/src/hb-shaper.hh \
@HARFBUZZ_TREE@/src/hb-shaper.cc \
@HARFBUZZ_TREE@/src/hb-static.cc \
@HARFBUZZ_TREE@/src/hb-string-array.hh \
- @HARFBUZZ_TREE@/src/hb-unicode-private.hh \
+ @HARFBUZZ_TREE@/src/hb-subset-input.hh \
+ @HARFBUZZ_TREE@/src/hb-subset.hh \
+ @HARFBUZZ_TREE@/src/hb-unicode.hh \
@HARFBUZZ_TREE@/src/hb-unicode.cc \
- @HARFBUZZ_TREE@/src/hb-vector-private.hh \
- @HARFBUZZ_TREE@/src/hb-utf-private.hh \
+ @HARFBUZZ_TREE@/src/hb-vector.hh @HARFBUZZ_TREE@/src/hb-utf.hh \
@HARFBUZZ_TREE@/src/hb-warning.cc \
@HARFBUZZ_TREE@/src/hb-buffer-deserialize-json.hh \
@HARFBUZZ_TREE@/src/hb-buffer-deserialize-text.hh \
@HARFBUZZ_TREE@/src/hb-fallback-shape.cc \
- @HARFBUZZ_TREE@/src/hb-aat-layout.cc \
- @HARFBUZZ_TREE@/src/aat-layout-common-private.hh \
+ @HARFBUZZ_TREE@/src/hb.hh @HARFBUZZ_TREE@/src/hb-aat-layout.cc \
+ @HARFBUZZ_TREE@/src/hb-aat-layout-common.hh \
@HARFBUZZ_TREE@/src/hb-aat-layout-ankr-table.hh \
@HARFBUZZ_TREE@/src/hb-aat-layout-bsln-table.hh \
@HARFBUZZ_TREE@/src/hb-aat-layout-feat-table.hh \
@HARFBUZZ_TREE@/src/hb-aat-layout-kerx-table.hh \
@HARFBUZZ_TREE@/src/hb-aat-layout-morx-table.hh \
@HARFBUZZ_TREE@/src/hb-aat-layout-trak-table.hh \
- @HARFBUZZ_TREE@/src/hb-aat-layout-private.hh \
+ @HARFBUZZ_TREE@/src/hb-aat-layout.hh \
@HARFBUZZ_TREE@/src/hb-aat-ltag-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-font.cc \
@HARFBUZZ_TREE@/src/hb-ot-layout.cc \
@HARFBUZZ_TREE@/src/hb-ot-layout-base-table.hh \
- @HARFBUZZ_TREE@/src/hb-ot-layout-common-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-layout-common.hh \
@HARFBUZZ_TREE@/src/hb-ot-layout-gdef-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-layout-gpos-table.hh \
- @HARFBUZZ_TREE@/src/hb-ot-layout-gsubgpos-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-layout-gsubgpos.hh \
@HARFBUZZ_TREE@/src/hb-ot-layout-gsub-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-layout-jstf-table.hh \
- @HARFBUZZ_TREE@/src/hb-ot-layout-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-layout.hh \
@HARFBUZZ_TREE@/src/hb-ot-color.cc \
@HARFBUZZ_TREE@/src/hb-ot-color-colr-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-color-cpal-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-color-sbix-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-color-svg-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-map.cc \
- @HARFBUZZ_TREE@/src/hb-ot-map-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-map.hh \
@HARFBUZZ_TREE@/src/hb-ot-math.cc \
@HARFBUZZ_TREE@/src/hb-ot-math-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-arabic.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-arabic-fallback.hh \
- @HARFBUZZ_TREE@/src/hb-ot-shape-complex-arabic-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-arabic.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-arabic-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-arabic-win1256.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-default.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-hangul.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-hebrew.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic.cc \
- @HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic-table.cc \
- @HARFBUZZ_TREE@/src/hb-ot-shape-complex-khmer-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-khmer.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-khmer.cc \
- @HARFBUZZ_TREE@/src/hb-ot-shape-complex-myanmar-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-myanmar.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-myanmar.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-thai.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-tibetan.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-use.cc \
- @HARFBUZZ_TREE@/src/hb-ot-shape-complex-use-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-use-table.cc \
- @HARFBUZZ_TREE@/src/hb-ot-shape-complex-private.hh \
- @HARFBUZZ_TREE@/src/hb-ot-shape-normalize-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-use.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-normalize.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-normalize.cc \
- @HARFBUZZ_TREE@/src/hb-ot-shape-fallback-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-fallback.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-fallback.cc \
- @HARFBUZZ_TREE@/src/hb-ot-shape-private.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape.hh \
@HARFBUZZ_TREE@/src/hb-ot-var.cc \
@HARFBUZZ_TREE@/src/hb-ot-var-avar-table.hh \
@HARFBUZZ_TREE@/src/hb-ot-var-fvar-table.hh \
@@ -926,6 +925,9 @@ clean-noinstLIBRARIES:
@HARFBUZZ_TREE@/src/hb-map.$(OBJEXT): \
@HARFBUZZ_TREE@/src/$(am__dirstamp) \
@HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp)
+@HARFBUZZ_TREE@/src/hb-ot-face.$(OBJEXT): \
+ @HARFBUZZ_TREE@/src/$(am__dirstamp) \
+ @HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp)
@HARFBUZZ_TREE@/src/hb-ot-tag.$(OBJEXT): \
@HARFBUZZ_TREE@/src/$(am__dirstamp) \
@HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp)
@@ -1056,6 +1058,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-icu.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-map.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-color.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-face.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-font.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-layout.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-map.Po@am__quote@ # am--include-marker
@@ -1689,6 +1692,7 @@ distclean: distclean-recursive
-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-icu.Po
-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-map.Po
-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-color.Po
+ -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-face.Po
-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-font.Po
-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-layout.Po
-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-map.Po
@@ -1778,6 +1782,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-icu.Po
-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-map.Po
-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-color.Po
+ -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-face.Po
-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-font.Po
-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-layout.Po
-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-map.Po
diff --git a/Build/source/libs/harfbuzz/TLpatches/ChangeLog b/Build/source/libs/harfbuzz/TLpatches/ChangeLog
index 34acd8fe52d..488f19d7882 100644
--- a/Build/source/libs/harfbuzz/TLpatches/ChangeLog
+++ b/Build/source/libs/harfbuzz/TLpatches/ChangeLog
@@ -1,3 +1,8 @@
+2018-09-11 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ Imported harfbuzz-1.9.0 source tree from:
+ http://www.freedesktop.org/software/harfbuzz/release/
+
2018-08-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
Imported harfbuzz-1.8.8 source tree from:
diff --git a/Build/source/libs/harfbuzz/TLpatches/TL-Changes b/Build/source/libs/harfbuzz/TLpatches/TL-Changes
index ed5f79ba8f6..dae72960cfe 100644
--- a/Build/source/libs/harfbuzz/TLpatches/TL-Changes
+++ b/Build/source/libs/harfbuzz/TLpatches/TL-Changes
@@ -1,4 +1,4 @@
-Changes applied to the harfbuzz-1.8.8/ tree as obtained from:
+Changes applied to the harfbuzz-1.9.0/ tree as obtained from:
http://www.freedesktop.org/software/harfbuzz/release/
Removed:
diff --git a/Build/source/libs/harfbuzz/configure b/Build/source/libs/harfbuzz/configure
index ce1b6cf0d6e..04479097c61 100755
--- a/Build/source/libs/harfbuzz/configure
+++ b/Build/source/libs/harfbuzz/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for harfbuzz (TeX Live) 1.8.8.
+# Generated by GNU Autoconf 2.69 for harfbuzz (TeX Live) 1.9.0.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='harfbuzz (TeX Live)'
PACKAGE_TARNAME='harfbuzz--tex-live-'
-PACKAGE_VERSION='1.8.8'
-PACKAGE_STRING='harfbuzz (TeX Live) 1.8.8'
+PACKAGE_VERSION='1.9.0'
+PACKAGE_STRING='harfbuzz (TeX Live) 1.9.0'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
@@ -1317,7 +1317,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures harfbuzz (TeX Live) 1.8.8 to adapt to many kinds of systems.
+\`configure' configures harfbuzz (TeX Live) 1.9.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1388,7 +1388,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of harfbuzz (TeX Live) 1.8.8:";;
+ short | recursive ) echo "Configuration of harfbuzz (TeX Live) 1.9.0:";;
esac
cat <<\_ACEOF
@@ -1495,7 +1495,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-harfbuzz (TeX Live) configure 1.8.8
+harfbuzz (TeX Live) configure 1.9.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2131,7 +2131,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by harfbuzz (TeX Live) $as_me 1.8.8, which was
+It was created by harfbuzz (TeX Live) $as_me 1.9.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -4054,7 +4054,7 @@ fi
# Define the identity of the package.
PACKAGE='harfbuzz--tex-live-'
- VERSION='1.8.8'
+ VERSION='1.9.0'
# Some tools Automake needs.
@@ -4247,9 +4247,9 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags
HB_VERSION_MAJOR=1
-HB_VERSION_MINOR=8
-HB_VERSION_MICRO=8
-HB_VERSION=1.8.8
+HB_VERSION_MINOR=9
+HB_VERSION_MICRO=0
+HB_VERSION=1.9.0
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -8140,7 +8140,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by harfbuzz (TeX Live) $as_me 1.8.8, which was
+This file was extended by harfbuzz (TeX Live) $as_me 1.9.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -8206,7 +8206,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-harfbuzz (TeX Live) config.status 1.8.8
+harfbuzz (TeX Live) config.status 1.9.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
index a9bca1bb51d..e0f47e8af90 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
@@ -1,3 +1,1220 @@
+commit 616fd34a69bb69bc35c7e4ea939e71c3ea2e92cb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 10 11:19:49 2018 +0200
+
+ [subset] Disable GSUB/GPOS subsetting for now
+
+ So I can get a release out. I haven't debugged those yet, and they
+ are producing bad tables.
+
+ src/hb-subset.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit d42f0e5809964136911cbbd845bc423a8dfd5e31
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 10 11:05:33 2018 +0200
+
+ [atomic] Fix pointer type passed to InterlockedExchangeAdd()
+
+ John Emmas reported on mailing list that build with MSVC is failing.
+ Not sure why bots don't catch it, but this should fix.
+
+ src/hb-atomic.hh | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+commit fda994e1d45c4d34601af7272f37ea257f92a3d8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Sep 7 15:02:57 2018 -0400
+
+ Use enum instead of "static const" in class scope
+
+ Technically, static const needs an out-of-class definition. Eg:
+
+ CXXLD libharfbuzz-subset.la
+ Undefined symbols for architecture x86_64:
+ "OT::FeatureVariationRecord::min_size", referenced from:
+ bool OT::GSUBGPOS::subset<OT::PosLookup>(hb_subset_context_t*)
+ constin libharfbuzz_subset_la-hb-subset.o
+ bool OT::GSUBGPOS::subset<OT::SubstLookup>(hb_subset_context_t*)
+ constin libharfbuzz_subset_la-hb-subset.o
+ "OT::Record<OT::LangSys>::min_size", referenced from:
+ OT::Script::subset(hb_subset_context_t*) constin
+ libharfbuzz_subset_la-hb-subset.o
+ "OT::IntType<unsigned short, 2u>::min_size", referenced from:
+ OT::Script::subset(hb_subset_context_t*) constin
+ libharfbuzz_subset_la-hb-subset.o
+ OT::RecordListOf<OT::Feature>::subset(hb_subset_context_t*)
+ const in libharfbuzz_subset_la-hb-subset.o
+ ld: symbol(s) not found for architecture x86_64
+ collect2: ld returned 1 exit status
+ make[4]: *** [libharfbuzz-subset.la] Error 1
+ make[3]: *** [all-recursive] Error 1
+ make[2]: *** [all] Error 2
+ make[1]: *** [all-recursive] Error 1
+ make: *** [all] Error 2
+ Exited with code 2
+
+ src/hb-buffer.hh | 2 +-
+ src/hb-machinery.hh | 8 ++++----
+ src/hb-open-file.hh | 2 +-
+ src/hb-open-type.hh | 2 +-
+ src/hb-ot-layout-common.hh | 2 +-
+ src/hb-ot-layout.cc | 4 ++--
+ src/hb-set-digest.hh | 4 ++--
+ src/hb-set.hh | 12 ++++++------
+ 8 files changed, 18 insertions(+), 18 deletions(-)
+
+commit ebe67137ab3559c2c6aaf53442ca223cb34df5af
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Sep 7 10:46:13 2018 -0400
+
+ Try fixing bots
+
+ src/hb-ot-layout-common.hh | 32 ++++++++++++++++++--------------
+ 1 file changed, 18 insertions(+), 14 deletions(-)
+
+commit 5f17dbc3025093308d2191a4abd2eec24db35c0e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Sep 7 10:24:22 2018 -0400
+
+ [subset] Fix div-by-zero
+
+ src/hb-subset.cc | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 21bf147054f6b5bd1c430c0e02a8c4058ed229a1
+Author: Garret Rieger <grieger@google.com>
+Date: Wed Sep 5 18:04:52 2018 -0700
+
+ [subset] Fix hdmx subsetted size calculation.
+
+ src/hb-ot-hdmx-table.hh | 14 ++++++++++----
+ test/api/fonts/Roboto-Regular.multihdmx.a.ttf | Bin 0 -> 2052 bytes
+ test/api/fonts/Roboto-Regular.multihdmx.abc.ttf | Bin 0 -> 2468 bytes
+ test/api/test-subset-hdmx.c | 20
+ ++++++++++++++++++++
+ 4 files changed, 30 insertions(+), 4 deletions(-)
+
+commit 1e6599f59680c81356b2e9ddddb61252490337a0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Sep 5 19:29:42 2018 -0700
+
+ Fix older compilers re '>>' at nested template declarations
+
+ src/hb-ot-layout-gsub-table.hh | 8 ++++----
+ src/hb-subset.cc | 2 +-
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+commit a1e5e07c735091e82d66ac56a4e27341f589369d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Sep 5 16:24:28 2018 -0700
+
+ [subset] Hook up GSUB/GPOS, but still disabled
+
+ They are still in the drop list.
+
+ src/hb-ot-hdmx-table.hh | 3 +-
+ src/hb-subset.cc | 75
+ +++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 77 insertions(+), 1 deletion(-)
+
+commit 0d160d5ff5158fd4190201becd652c8f28ef4430
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 3 20:50:11 2018 -0700
+
+ [subset] Implement subsetting of SingleSubst
+
+ src/hb-machinery.hh | 2 ++
+ src/hb-null.hh | 43 +++++++++++++++++++-----------
+ src/hb-ot-layout-gsub-table.hh | 59
+ +++++++++++++++++++++++++++++++++++-------
+ src/hb-vector.hh | 2 ++
+ 4 files changed, 81 insertions(+), 25 deletions(-)
+
+commit 3f00d0b0df14d69859b15568ff28a810d08f59ea
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 3 18:54:32 2018 -0700
+
+ [subset] Keep glyph set in plan
+
+ Should remove the vector version at some point...
+
+ src/hb-subset-plan.cc | 19 ++++++++++---------
+ src/hb-subset-plan.hh | 3 +--
+ 2 files changed, 11 insertions(+), 11 deletions(-)
+
+commit dc50493a8da05d6561242136d63cae836486c150
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 3 18:23:23 2018 -0700
+
+ [subset] Towards subsetting SingleSubstFormat1
+
+ Why does subset plan not have a hb_set_t of glyphs?
+
+ src/hb-machinery.hh | 10 +++++++++-
+ src/hb-ot-layout-gsub-table.hh | 12 +++++++++++-
+ 2 files changed, 20 insertions(+), 2 deletions(-)
+
+commit 339d3603b916cebf24ff86d9842b766261e1b262
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 3 17:33:34 2018 -0700
+
+ [subset] Wire up subset() call down to subtables
+
+ src/hb-ot-layout-common.hh | 36 +++++++++++++++++++++++
+ src/hb-ot-layout-gpos-table.hh | 67
+ +++++++++++++++++++++++++++++++++++++++---
+ src/hb-ot-layout-gsub-table.hh | 54 ++++++++++++++++++++++++++++------
+ src/hb-ot-layout-gsubgpos.hh | 42 ++++++++++++++++++++++++++
+ 4 files changed, 186 insertions(+), 13 deletions(-)
+
+commit 7b2ef551da0d53cd94106035b1f065a759cf3cd5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 3 17:16:09 2018 -0700
+
+ Templatize Lookup::sanitize()
+
+ src/hb-ot-layout-common.hh | 40
+ ++++++++++++++++++++++++++++------------
+ src/hb-ot-layout-gpos-table.hh | 7 ++-----
+ src/hb-ot-layout-gsub-table.hh | 25 +++----------------------
+ 3 files changed, 33 insertions(+), 39 deletions(-)
+
+commit 9c3747c5e50423e0a7202f249728d5c5b2b09073
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 3 16:53:03 2018 -0700
+
+ [subset] More
+
+ src/hb-ot-layout-gpos-table.hh | 10 +++++----
+ src/hb-ot-layout-gsub-table.hh | 48
+ +++++++++++++++++++++---------------------
+ src/hb-ot-layout-gsubgpos.hh | 22 +++++++++++++------
+ 3 files changed, 45 insertions(+), 35 deletions(-)
+
+commit 6d618522d63a94230ad708fc49c1c73927da0137
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 3 16:41:28 2018 -0700
+
+ Templatize GSUBGPOS::sanitize()
+
+ src/hb-ot-layout-gpos-table.hh | 6 +-----
+ src/hb-ot-layout-gsub-table.hh | 14 +++++---------
+ src/hb-ot-layout-gsubgpos.hh | 4 +++-
+ 3 files changed, 9 insertions(+), 15 deletions(-)
+
+commit 49c44b58f6c2536ea5f403c54a40cab41b905150
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 3 16:37:17 2018 -0700
+
+ [subset] Fix serialize_subset() calls
+
+ Ouch.
+
+ src/hb-open-type.hh | 2 +-
+ src/hb-ot-layout-common.hh | 6 +++---
+ src/hb-ot-layout-gsub-table.hh | 13 ++++++-------
+ src/hb-ot-layout-gsubgpos.hh | 6 +++---
+ 4 files changed, 13 insertions(+), 14 deletions(-)
+
+commit 7c9cfa2b4002c18585a26134ab987ceb7ebc97a2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Sep 2 19:47:50 2018 -0700
+
+ Add intersects() method to GSUB/GPOS lookups
+
+ src/hb-ot-layout-common.hh | 77 +++++++++--
+ src/hb-ot-layout-gpos-table.hh | 103 ++++++++++----
+ src/hb-ot-layout-gsub-table.hh | 205 +++++++++++++++++++--------
+ src/hb-ot-layout-gsubgpos.hh | 306
+ ++++++++++++++++++++++++++++++++---------
+ 4 files changed, 528 insertions(+), 163 deletions(-)
+
+commit 61ce62e55455bb0d6c9db3b076676ab18e51d449
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Sep 2 17:00:27 2018 -0700
+
+ [subset] Minor
+
+ Remove Lookup::subset().
+
+ src/hb-ot-layout-common.hh | 11 -----------
+ src/hb-ot-layout-gsubgpos.hh | 2 +-
+ 2 files changed, 1 insertion(+), 12 deletions(-)
+
+commit bfa72a9a72a15d977f503f12eef376a355679d76
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Sep 1 18:34:50 2018 -0700
+
+ [subset] Towards GSUB/GPOS subsetting
+
+ Add subset() call for GSUBGPOS struct and its dependencies.
+ Not hooked up anywhere.
+
+ src/hb-machinery.hh | 10 ++++--
+ src/hb-open-type.hh | 25 ++++++++++++-
+ src/hb-ot-layout-common.hh | 80
+ +++++++++++++++++++++++++++++++++++-------
+ src/hb-ot-layout-gdef-table.hh | 33 ++++++++++-------
+ src/hb-ot-layout-gsub-table.hh | 11 ++++--
+ src/hb-ot-layout-gsubgpos.hh | 19 ++++++++++
+ 6 files changed, 145 insertions(+), 33 deletions(-)
+
+commit 6803ed8674028a656957910381150ab28d75a5f8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 31 17:11:08 2018 -0700
+
+ [serialize] Add reset()
+
+ src/hb-machinery.hh | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit e58b190292f85c9676fe14cf63d2831d4d6e6bab
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 31 16:46:35 2018 -0700
+
+ [subset] De-templatize hb_subset_context_t
+
+ We're going to (finally) use virtual methods for
+ hb_serialize_context_t
+ customization, so don't need to carry a Serializer template variable
+ around... Simplifies code.
+
+ src/hb-machinery.hh | 2 +-
+ src/hb-ot-layout-gsub-table.hh | 5 ++---
+ src/hb-subset.hh | 7 +++----
+ 3 files changed, 6 insertions(+), 8 deletions(-)
+
+commit 22acd424ca77c16d28405021f06c5562497920ab
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 31 16:38:04 2018 -0700
+
+ [serialize] Add a couple small methods
+
+ src/hb-machinery.hh | 25 +++++++++++++++++--------
+ src/hb-open-file.hh | 3 +--
+ src/hb-ot-layout-gsub-table.hh | 1 +
+ 3 files changed, 19 insertions(+), 10 deletions(-)
+
+commit d1f29908c281b1685eea00b71bae934d9f1f20eb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 31 16:31:00 2018 -0700
+
+ [subset] Add hb_subset_context_t<>
+
+ src/hb-open-type.hh | 1 +
+ src/hb-ot-cmap-table.hh | 1 -
+ src/hb-ot-hdmx-table.hh | 1 -
+ src/hb-ot-hmtx-table.hh | 1 -
+ src/hb-ot-layout-gsub-table.hh | 9 +++++++++
+ src/hb-ot-maxp-table.hh | 1 -
+ src/hb-ot-os2-table.hh | 1 -
+ src/hb-ot-post-table.hh | 1 -
+ src/hb-subset.hh | 21 +++++++++++++++++++++
+ 9 files changed, 31 insertions(+), 6 deletions(-)
+
+commit aba0a945c5f8724cc7bd1a9b7f7b5df1c64b03f4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 31 13:25:19 2018 -0700
+
+ [subset] Add hb-subset-input.hh and make hb-subset.hh toplevel include
+
+ src/Makefile.sources | 1 +
+ src/hb-ot-cmap-table.hh | 2 +-
+ src/hb-ot-glyf-table.hh | 2 --
+ src/hb-ot-hdmx-table.hh | 2 +-
+ src/hb-ot-hmtx-table.hh | 2 +-
+ src/hb-ot-maxp-table.hh | 2 +-
+ src/hb-ot-os2-table.hh | 2 +-
+ src/hb-ot-post-table.hh | 2 +-
+ src/hb-subset-glyf.cc | 1 -
+ src/hb-subset-glyf.hh | 2 +-
+ src/hb-subset-input.hh | 57
+ +++++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-subset-plan.cc | 3 +--
+ src/hb-subset-plan.hh | 2 +-
+ src/hb-subset.cc | 3 +--
+ src/hb-subset.hh | 23 +++-----------------
+ 15 files changed, 71 insertions(+), 35 deletions(-)
+
+commit 18d01eac7f2870e2804ceed2c70a604a5dc6a320
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 31 13:00:57 2018 -0700
+
+ Minor
+
+ src/hb-ot-shape-complex-arabic-fallback.hh | 1 -
+ 1 file changed, 1 deletion(-)
+
+commit a23b892fe6cc4859a30edc7ffc003ab7624aa5f0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 29 18:28:39 2018 -0700
+
+ Shuffle
+
+ src/hb-machinery.hh | 62
+ +++++++++++++++++++++++++++--------------------------
+ 1 file changed, 32 insertions(+), 30 deletions(-)
+
+commit 93fe0faaee45b8fb646f7aa33620105c62193885
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 29 18:24:03 2018 -0700
+
+ [subset] Clean up hb_subset_input_t API
+
+ src/hb-subset-input.cc | 44
+ +++++++++++++++++++---------------------
+ src/hb-subset-plan.cc | 4 ++--
+ src/hb-subset-plan.hh | 10 ++++-----
+ src/hb-subset.cc | 2 +-
+ src/hb-subset.h | 14 +++++++++----
+ src/hb-subset.hh | 4 ++--
+ test/api/test-subset-glyf.c | 10 ++++-----
+ test/fuzzing/hb-subset-fuzzer.cc | 10 ++++-----
+ util/hb-subset.cc | 3 +--
+ 9 files changed, 52 insertions(+), 49 deletions(-)
+
+commit d237ce71810045ee400c52740cd8ab6e1113aada
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 29 18:13:07 2018 -0700
+
+ [subset] Bail if subsetting a table failed
+
+ src/hb-subset.cc | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+commit f39166f0c0c09fac7874fda6b0b0825f20768e3e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 29 18:09:55 2018 -0700
+
+ [subset] Remove unused hb_subset_profile_t
+
+ We might reintroduce it later, but for now remove, as it was unused.
+ Some things that should have been in this object (drop_hints, etc)
+ are already in hb_subset_input_t. So, for now, keep everything there.
+
+ src/hb-subset-plan.cc | 3 +--
+ src/hb-subset-plan.hh | 1 -
+ src/hb-subset.cc | 39
+ +++------------------------------------
+ src/hb-subset.h | 16 +---------------
+ test/api/hb-subset-test.h | 4 +---
+ test/api/test-subset-hdmx.c | 8 ++------
+ test/api/test-subset-hmtx.c | 4 +---
+ test/api/test-subset.c | 12 +++---------
+ test/fuzzing/hb-subset-fuzzer.cc | 5 +----
+ util/hb-subset.cc | 4 +---
+ 10 files changed, 14 insertions(+), 82 deletions(-)
+
+commit 2ccc322cf88a01248aa5df88a5073db3dfb40eea
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 29 16:38:04 2018 -0700
+
+ [ot-font] Clean up cmap with gid=0
+
+ Fixes https://github.com/harfbuzz/harfbuzz/issues/1145
+
+ src/hb-ot-cmap-table.hh | 25 +++++++++++++++----------
+ 1 file changed, 15 insertions(+), 10 deletions(-)
+
+commit 0c7b633f528bae4a0cf5ca816f75a0d84206b3fb
+Author: Ross Burton <ross@burtonini.com>
+Date: Wed Aug 29 22:37:39 2018 +0100
+
+ Delete pkg.m4
+
+ pkg.m4 is provided by pkg-config, which is a requirement to build,
+ and this copy is ancient. Delete it to avoid it being used instead
+ of the host copy.
+
+ m4/pkg.m4 | 157
+ --------------------------------------------------------------
+ 1 file changed, 157 deletions(-)
+
+commit fee0f41c6c1e50621d10b07802ca36a9b295b53d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 28 18:27:41 2018 -0700
+
+ Don't declare extern symbols as inline
+
+ clang -O3 was completely removing _get_gdef(), causing link
+ failure when needed from another compilation unit. Surprisingly,
+ "extern inline" didn't fix it.
+
+ src/hb-ot-layout.cc | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 967741e4c468ebf0a40f91934ed1923506099806
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 28 18:18:02 2018 -0700
+
+ Add explicit to hb_auto_t 1param constructors
+
+ src/hb-dsalgs.hh | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+commit c0a3f38f78362a183b30afd109dcebfca563d144
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 28 17:22:38 2018 -0700
+
+ Fix distcheck
+
+ src/Makefile.sources | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 2dde6c803a9e50c5bff74095187b0cb2e12eebdd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 28 11:02:00 2018 -0700
+
+ Explicitly pass reference in hb_auto_t constructor
+
+ Fixes clang bots as well as fuzzer issue.
+
+ src/hb-dsalgs.hh | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+commit a26806801005c28115ae9e48bdcf3bbbc1bcd767
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 26 15:18:46 2018 -0700
+
+ [ot-face] Remove tables_t. The face_data_t is what tables_t was
+
+ src/hb-aat-layout.cc | 4 ++--
+ src/hb-face.cc | 6 +++---
+ src/hb-ot-face.cc | 8 ++++----
+ src/hb-ot-face.hh | 28 ++++++++++++----------------
+ src/hb-ot-font.cc | 25 +++++++++++--------------
+ src/hb-ot-layout.cc | 36 ++++++++++++++++++------------------
+ src/hb-ot-math.cc | 4 ++--
+ src/hb-ot-var.cc | 4 ++--
+ 8 files changed, 54 insertions(+), 61 deletions(-)
+
+commit 3a0b3a29cc246d0b1e5989c9e8c1e6d544046dcc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 26 15:11:24 2018 -0700
+
+ Free up hb-ot-face.hh from includes
+
+ There might be a better way to do this, but I couldn't find...
+
+ src/hb-face.cc | 1 +
+ src/hb-ot-cmap-table.hh | 1 +
+ src/hb-ot-color-cbdt-table.hh | 2 ++
+ src/hb-ot-face.cc | 10 ++++++++++
+ src/hb-ot-face.hh | 15 ++-------------
+ src/hb-ot-font.cc | 7 +++++++
+ src/hb-ot-glyf-table.hh | 2 ++
+ src/hb-ot-hmtx-table.hh | 3 +++
+ src/hb-ot-kern-table.hh | 2 ++
+ src/hb-ot-layout-gdef-table.hh | 1 +
+ src/hb-ot-layout-gpos-table.hh | 2 ++
+ src/hb-ot-layout-gsub-table.hh | 1 +
+ src/hb-ot-post-table.hh | 2 ++
+ 13 files changed, 36 insertions(+), 13 deletions(-)
+
+commit a84309afc8817cd386e555af21dfcdc03388b329
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 26 09:33:01 2018 -0700
+
+ [face] Use saved cmap in collect_unicodes() APIs
+
+ src/hb-face.cc | 18 ++++++++----------
+ 1 file changed, 8 insertions(+), 10 deletions(-)
+
+commit c624e18a24311c66737dde4ce515aa1eca892b94
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 26 09:19:20 2018 -0700
+
+ [OT] Move code around
+
+ src/hb-ot-layout-gsub-table.hh | 18 ------------------
+ src/hb-ot-layout.cc | 23 +++++++++++++++++++++--
+ 2 files changed, 21 insertions(+), 20 deletions(-)
+
+commit 399909468204b76769857508e74f802d648ca0a5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 26 09:12:25 2018 -0700
+
+ [OT] Use relaxed ops for recursing into GSUB/GPOS lookups again
+
+ src/hb-ot-layout-gpos-table.hh | 4 ++--
+ src/hb-ot-layout-gsub-table.hh | 4 ++--
+ src/hb-ot-layout.cc | 12 ++++++++++--
+ src/hb-ot-layout.hh | 4 ++--
+ 4 files changed, 16 insertions(+), 8 deletions(-)
+
+commit d8c57e85d9981b4c7a11fae4f31100359574cf13
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 26 09:03:31 2018 -0700
+
+ [GDEF] Move code around
+
+ src/hb-ot-layout-gdef-table.hh | 118 +-----------------------------------
+ src/hb-ot-layout.cc | 134
+ ++++++++++++++++++++++++++++++++++++++---
+ src/hb-ot-layout.hh | 14 +----
+ 3 files changed, 128 insertions(+), 138 deletions(-)
+
+commit 453e0c60b1c87d2cd2527d6d2de673f65458a9fd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 26 01:30:52 2018 -0700
+
+ Add template keyword
+
+ I swear I have no idea why this is needed, but it is...
+
+ src/hb-ot-layout-gsubgpos.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit c44b0caf0d0cddb7228dcec0b9d25bb62f641abc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 26 01:29:30 2018 -0700
+
+ Fixup
+
+ src/hb-ot-layout-gpos-table.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 4096fbe487d90de04020e32e8487295ecd4d8836
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 26 01:25:54 2018 -0700
+
+ [ot-face] Port GDEF to unified table accelerator model as well
+
+ src/hb-ot-face.cc | 108 ----------------------------------
+ src/hb-ot-face.hh | 2 +-
+ src/hb-ot-layout-gdef-table.hh | 129
+ +++++++++++++++++++++++++++++++++++++++++
+ src/hb-ot-layout.cc | 14 ++++-
+ src/hb-ot-layout.hh | 5 +-
+ 5 files changed, 147 insertions(+), 111 deletions(-)
+
+commit b929100f8782816c2621715f6c007ecefc419d83
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 26 01:15:47 2018 -0700
+
+ [ot-face] Unify GSUB/GPOS accelerators in the table accelerator
+ framework
+
+ src/hb-aat-layout.cc | 4 +---
+ src/hb-ot-face.cc | 40
+ ++--------------------------------------
+ src/hb-ot-face.hh | 25 +++++++++++--------------
+ src/hb-ot-layout-gpos-table.hh | 2 +-
+ src/hb-ot-layout-gsub-table.hh | 6 +++---
+ src/hb-ot-layout-gsubgpos.hh | 24 +++++++++++++-----------
+ src/hb-ot-layout.cc | 33 +++++++++++++++++----------------
+ src/hb-ot-layout.hh | 17 +++++++++++++++++
+ src/hb-ot-shape.cc | 1 +
+ 9 files changed, 66 insertions(+), 86 deletions(-)
+
+commit 963413fc5454d92621ae83a8d9c9324e404b8166
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 26 00:47:55 2018 -0700
+
+ WIP
+
+ src/hb-ot-cmap-table.hh | 1 -
+ src/hb-ot-face.hh | 22 ----------------------
+ src/hb-ot-layout-gpos-table.hh | 2 ++
+ src/hb-ot-layout-gsub-table.hh | 2 ++
+ src/hb-ot-layout-gsubgpos.hh | 31 ++++++++++++++++++++++++++++++-
+ src/hb-ot-layout.hh | 18 +++++++++++++++++-
+ 6 files changed, 51 insertions(+), 25 deletions(-)
+
+commit e6cb9380651c753485f721bd3df523d03be41d91
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 26 00:21:29 2018 -0700
+
+ [ot-face] Unify accelerators and tables
+
+ src/hb-machinery.hh | 4 ++--
+ src/hb-ot-cmap-table.hh | 3 ++-
+ src/hb-ot-face.cc | 6 +++--
+ src/hb-ot-face.hh | 58
+ +++++++++++++------------------------------------
+ src/hb-ot-font.cc | 6 ++---
+ 5 files changed, 26 insertions(+), 51 deletions(-)
+
+commit 7f8b6fe67d64b41786edbf8650efb1c0deba573f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 26 00:07:12 2018 -0700
+
+ Minor
+
+ src/hb-ot-face.hh | 1 -
+ 1 file changed, 1 deletion(-)
+
+commit 59bca0d2cb6010bc237afb2255ccda3b8dd0585d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 26 00:06:12 2018 -0700
+
+ [ot-font] Rename
+
+ src/hb-ot-face.hh | 12 ++++++------
+ src/hb-ot-font.cc | 24 ++++++++++++------------
+ 2 files changed, 18 insertions(+), 18 deletions(-)
+
+commit 1c48a7ef06b82ef9ca013066d1fb3c6fda82aa0c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 23:54:06 2018 -0700
+
+ [ot-font] Cache tables on face, not font
+
+ src/hb-ot-cmap-table.hh | 1 +
+ src/hb-ot-face.cc | 2 ++
+ src/hb-ot-face.hh | 55 +++++++++++++++++++++++++++-----
+ src/hb-ot-font.cc | 75
+ ++++----------------------------------------
+ src/hb-ot-layout-gsubgpos.hh | 1 +
+ src/hb-ot-layout.hh | 1 -
+ 6 files changed, 58 insertions(+), 77 deletions(-)
+
+commit 71f8893eff56bff651e3df6288becc68ecea6cd1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 23:27:45 2018 -0700
+
+ [ot-font] Use init0
+
+ src/hb-ot-font.cc | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+commit f36ae6f8a82485bbf727f24dfd7da8f32002cad6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 23:19:34 2018 -0700
+
+ [ot-font] Make everything (cmap/metrics) lazy
+
+ src/hb-machinery.hh | 5 +++++
+ src/hb-ot-font.cc | 51
+ ++++++++++++++++++++++++++-------------------------
+ 2 files changed, 31 insertions(+), 25 deletions(-)
+
+commit 62fc54725a3863473829f3a3748c9336e4dc0787
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 23:15:52 2018 -0700
+
+ [ot-font] Fallback vertical advance to UPEM
+
+ Used to be ascent+descent. Whatever. This is more convenient for
+ upcoming changes.
+
+ src/hb-ot-font.cc | 2 +-
+ test/shaping/data/in-house/tests/vertical.tests | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit d950022c8ae3f85546272b38b187d6ed9f5ff16f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 23:06:37 2018 -0700
+
+ Add hb-ot-face.cc/hh
+
+ src/Makefile.sources | 2 +
+ src/hb-ot-face.cc | 206
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-ot-face.hh | 144 +++++++++++++++++++++++++++++++++++
+ src/hb-ot-layout.cc | 172 ------------------------------------------
+ src/hb-ot-layout.hh | 108 +--------------------------
+ src/hb-ot-math.cc | 2 +-
+ src/hb-ot-var.cc | 2 +-
+ 7 files changed, 355 insertions(+), 281 deletions(-)
+
+commit dae39c58fb63c2211e2842121bbe6d5b8b18651b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 22:44:39 2018 -0700
+
+ [face] Introduce character-map API
+
+ New API:
+ +hb_face_collect_unicodes
+ +hb_face_collect_variation_selectors
+ +hb_face_collect_variation_unicodes
+
+ docs/harfbuzz-sections.txt | 3 ++
+ src/hb-face.cc | 61
+ ++++++++++++++++++++++++-
+ src/hb-face.h | 19 ++++++++
+ src/hb-subset.cc | 53
+ ---------------------
+ src/hb-subset.h | 15 ------
+ test/api/test-subset-codepoints.c | 6 +--
+ test/fuzzing/hb-subset-get-codepoints-fuzzer.cc | 2 +-
+ 7 files changed, 86 insertions(+), 73 deletions(-)
+
+commit 66384db97c439a64d729f9206657d0b37ec0cb32
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 22:39:17 2018 -0700
+
+ Minor
+
+ src/hb-subset.hh | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit c77ae40852aabb1698da9e8d488f75bae2f4e734
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 22:36:36 2018 -0700
+
+ Rename hb-*private.hh to hb-*.hh
+
+ Sorry for the noise, downstream custom builders. Please adjust.
+
+ src/Makefile.sources | 75
+ +++++++++++-----------
+ src/check-includes.sh | 8 +--
+ src/dump-indic-data.cc | 2 +-
+ src/dump-khmer-data.cc | 2 +-
+ src/dump-myanmar-data.cc | 2 +-
+ src/dump-use-data.cc | 2 +-
+ src/gen-indic-table.py | 2 +-
+ src/gen-use-table.py | 2 +-
+ src/hb-aat-layout-ankr-table.hh | 2 +-
+ src/hb-aat-layout-bsln-table.hh | 2 +-
+ ...t-common-private.hh => hb-aat-layout-common.hh} | 8 +--
+ src/hb-aat-layout-feat-table.hh | 2 +-
+ src/hb-aat-layout-kerx-table.hh | 4 +-
+ src/hb-aat-layout-morx-table.hh | 6 +-
+ src/hb-aat-layout-trak-table.hh | 6 +-
+ src/hb-aat-layout.cc | 8 +--
+ src/{hb-aat-layout-private.hh => hb-aat-layout.hh} | 14 ++--
+ src/hb-aat-ltag-table.hh | 2 +-
+ src/{hb-atomic-private.hh => hb-atomic.hh} | 8 +--
+ src/hb-blob.cc | 4 +-
+ src/{hb-blob-private.hh => hb-blob.hh} | 8 +--
+ src/hb-buffer-deserialize-json.hh | 2 +-
+ src/hb-buffer-deserialize-json.rl | 2 +-
+ src/hb-buffer-deserialize-text.hh | 2 +-
+ src/hb-buffer-deserialize-text.rl | 2 +-
+ src/hb-buffer-serialize.cc | 2 +-
+ src/hb-buffer.cc | 4 +-
+ src/{hb-buffer-private.hh => hb-buffer.hh} | 10 +--
+ src/hb-common.cc | 4 +-
+ src/hb-coretext.cc | 4 +-
+ src/hb-debug.hh | 4 +-
+ src/hb-directwrite.cc | 4 +-
+ src/hb-dsalgs.hh | 2 +-
+ src/hb-face.cc | 8 +--
+ src/{hb-face-private.hh => hb-face.hh} | 12 ++--
+ src/hb-fallback-shape.cc | 2 +-
+ src/hb-font.cc | 6 +-
+ src/{hb-font-private.hh => hb-font.hh} | 12 ++--
+ src/hb-ft.cc | 6 +-
+ src/hb-glib.cc | 6 +-
+ src/hb-gobject-enums.cc.tmpl | 2 +-
+ src/hb-gobject-structs.cc | 2 +-
+ src/hb-graphite2.cc | 2 +-
+ src/hb-icu.cc | 6 +-
+ src/{hb-iter-private.hh => hb-iter.hh} | 8 +--
+ src/{hb-machinery-private.hh => hb-machinery.hh} | 12 ++--
+ src/hb-map.cc | 2 +-
+ src/{hb-map-private.hh => hb-map.hh} | 8 +--
+ src/{hb-mutex-private.hh => hb-mutex.hh} | 8 +--
+ src/hb-null.hh | 2 +-
+ src/{hb-object-private.hh => hb-object.hh} | 14 ++--
+ src/{hb-open-file-private.hh => hb-open-file.hh} | 8 +--
+ src/{hb-open-type-private.hh => hb-open-type.hh} | 14 ++--
+ src/hb-ot-cmap-table.hh | 4 +-
+ src/hb-ot-color-cbdt-table.hh | 2 +-
+ src/hb-ot-color-colr-table.hh | 2 +-
+ src/hb-ot-color-cpal-table.hh | 2 +-
+ src/hb-ot-color-sbix-table.hh | 2 +-
+ src/hb-ot-color-svg-table.hh | 2 +-
+ src/hb-ot-color.cc | 6 +-
+ src/hb-ot-font.cc | 6 +-
+ src/hb-ot-glyf-table.hh | 4 +-
+ src/hb-ot-hdmx-table.hh | 2 +-
+ src/hb-ot-head-table.hh | 2 +-
+ src/hb-ot-hhea-table.hh | 2 +-
+ src/hb-ot-hmtx-table.hh | 2 +-
+ src/hb-ot-kern-table.hh | 2 +-
+ src/hb-ot-layout-base-table.hh | 4 +-
+ ...ut-common-private.hh => hb-ot-layout-common.hh} | 14 ++--
+ src/hb-ot-layout-gdef-table.hh | 4 +-
+ src/hb-ot-layout-gpos-table.hh | 2 +-
+ src/hb-ot-layout-gsub-table.hh | 2 +-
+ ...subgpos-private.hh => hb-ot-layout-gsubgpos.hh} | 14 ++--
+ src/hb-ot-layout-jstf-table.hh | 2 +-
+ src/hb-ot-layout.cc | 8 +--
+ src/{hb-ot-layout-private.hh => hb-ot-layout.hh} | 16 ++---
+ src/hb-ot-map.cc | 4 +-
+ src/{hb-ot-map-private.hh => hb-ot-map.hh} | 8 +--
+ src/hb-ot-math-table.hh | 4 +-
+ src/hb-ot-math.cc | 4 +-
+ src/hb-ot-maxp-table.hh | 2 +-
+ src/hb-ot-name-table.hh | 2 +-
+ src/hb-ot-os2-table.hh | 2 +-
+ src/hb-ot-os2-unicode-ranges.hh | 2 +-
+ src/hb-ot-post-macroman.hh | 2 +-
+ src/hb-ot-post-table.hh | 2 +-
+ src/hb-ot-shape-complex-arabic-fallback.hh | 4 +-
+ src/hb-ot-shape-complex-arabic-win1256.hh | 2 +-
+ src/hb-ot-shape-complex-arabic.cc | 6 +-
+ ...ic-private.hh => hb-ot-shape-complex-arabic.hh} | 10 +--
+ src/hb-ot-shape-complex-default.cc | 2 +-
+ src/hb-ot-shape-complex-hangul.cc | 2 +-
+ src/hb-ot-shape-complex-hebrew.cc | 2 +-
+ src/hb-ot-shape-complex-indic-machine.hh | 2 +-
+ src/hb-ot-shape-complex-indic-machine.rl | 2 +-
+ src/hb-ot-shape-complex-indic-table.cc | 2 +-
+ src/hb-ot-shape-complex-indic.cc | 4 +-
+ ...dic-private.hh => hb-ot-shape-complex-indic.hh} | 12 ++--
+ src/hb-ot-shape-complex-khmer-machine.hh | 2 +-
+ src/hb-ot-shape-complex-khmer-machine.rl | 2 +-
+ src/hb-ot-shape-complex-khmer.cc | 4 +-
+ ...mer-private.hh => hb-ot-shape-complex-khmer.hh} | 10 +--
+ src/hb-ot-shape-complex-myanmar-machine.hh | 2 +-
+ src/hb-ot-shape-complex-myanmar-machine.rl | 2 +-
+ src/hb-ot-shape-complex-myanmar.cc | 2 +-
+ ...r-private.hh => hb-ot-shape-complex-myanmar.hh} | 10 +--
+ src/hb-ot-shape-complex-thai.cc | 2 +-
+ src/hb-ot-shape-complex-tibetan.cc | 2 +-
+ src/hb-ot-shape-complex-use-machine.hh | 2 +-
+ src/hb-ot-shape-complex-use-machine.rl | 2 +-
+ src/hb-ot-shape-complex-use-table.cc | 2 +-
+ src/hb-ot-shape-complex-use.cc | 4 +-
+ ...x-use-private.hh => hb-ot-shape-complex-use.hh} | 10 +--
+ ...e-complex-private.hh => hb-ot-shape-complex.hh} | 12 ++--
+ src/hb-ot-shape-fallback.cc | 4 +-
+ ...fallback-private.hh => hb-ot-shape-fallback.hh} | 10 +--
+ src/hb-ot-shape-normalize.cc | 6 +-
+ ...rmalize-private.hh => hb-ot-shape-normalize.hh} | 8 +--
+ src/hb-ot-shape.cc | 20 +++---
+ src/{hb-ot-shape-private.hh => hb-ot-shape.hh} | 12 ++--
+ src/hb-ot-tag.cc | 2 +-
+ src/hb-ot-var-avar-table.hh | 2 +-
+ src/hb-ot-var-fvar-table.hh | 2 +-
+ src/hb-ot-var-hvar-table.hh | 2 +-
+ src/hb-ot-var-mvar-table.hh | 2 +-
+ src/hb-ot-var.cc | 4 +-
+ src/{hb-set-digest-private.hh => hb-set-digest.hh} | 8 +--
+ src/hb-set.cc | 2 +-
+ src/{hb-set-private.hh => hb-set.hh} | 8 +--
+ src/hb-shape-plan.cc | 10 +--
+ src/{hb-shape-plan-private.hh => hb-shape-plan.hh} | 10 +--
+ src/hb-shape.cc | 12 ++--
+ ...hb-shaper-impl-private.hh => hb-shaper-impl.hh} | 16 ++---
+ src/hb-shaper.cc | 6 +-
+ src/{hb-shaper-private.hh => hb-shaper.hh} | 8 +--
+ src/hb-static.cc | 8 +--
+ src/hb-string-array.hh | 2 +-
+ src/hb-subset-glyf.cc | 2 +-
+ src/hb-subset-glyf.hh | 2 +-
+ src/hb-subset-input.cc | 4 +-
+ src/hb-subset-plan.cc | 6 +-
+ src/hb-subset-plan.hh | 6 +-
+ src/hb-subset.cc | 8 +--
+ src/{hb-subset-private.hh => hb-subset.hh} | 10 +--
+ src/hb-ucdn.cc | 6 +-
+ src/hb-unicode.cc | 6 +-
+ src/{hb-unicode-private.hh => hb-unicode.hh} | 8 +--
+ src/hb-uniscribe.cc | 6 +-
+ src/{hb-utf-private.hh => hb-utf.hh} | 8 +--
+ src/{hb-vector-private.hh => hb-vector.hh} | 8 +--
+ src/hb-warning.cc | 6 +-
+ src/{hb-private.hh => hb.hh} | 12 ++--
+ src/main.cc | 4 +-
+ src/test-buffer-serialize.cc | 2 +-
+ src/test-size-params.cc | 2 +-
+ src/test-unicode-ranges.cc | 2 +-
+ src/test-would-substitute.cc | 2 +-
+ src/test.cc | 2 +-
+ test/api/test-common.c | 1 -
+ util/Makefile.am | 4 +-
+ util/ansi-print.hh | 3 +-
+ util/hb-subset.cc | 2 +-
+ util/helper-cairo-ansi.hh | 2 +-
+ util/helper-cairo.hh | 2 +-
+ util/main-font-text.hh | 2 +-
+ util/options.hh | 2 +-
+ util/shape-consumer.hh | 2 +-
+ util/view-cairo.hh | 2 +-
+ 168 files changed, 452 insertions(+), 455 deletions(-)
+
+commit 82b12bcadd50c9e86bbe82623a1cbc0b4afdd237
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 22:07:17 2018 -0700
+
+ [unicode] Add HB_UNICODE_MAX
+
+ New API:
+ HB_UNICODE_MAX
+
+ docs/harfbuzz-sections.txt | 1 +
+ src/hb-ot-cmap-table.hh | 8 ++------
+ src/hb-unicode.h | 3 +++
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+commit b09a0336ca856a2b1040e7fabd5819b64749e308
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 22:04:39 2018 -0700
+
+ [cmap] More hb_auto_t<>(...)
+
+ src/hb-subset.cc | 12 +++---------
+ 1 file changed, 3 insertions(+), 9 deletions(-)
+
+commit 28634db07e6ecbdb7e59ed8f989212272a97de86
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 21:23:43 2018 -0700
+
+ [cmap] Fix skipping gid0 in Format4 collect_unicodes()
+
+ src/hb-ot-cmap-table.hh | 20 ++++++++++++++++++--
+ 1 file changed, 18 insertions(+), 2 deletions(-)
+
+commit acce1fa3ea9707d0883cd66397fd187d3268905c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 21:15:39 2018 -0700
+
+ Use new hb_auto_t<> constructor with Coverage::Iter
+
+ src/hb-ot-layout-common-private.hh | 65
+ ++++++++++++++++++++++++--------------
+ src/hb-ot-layout-gsub-table.hh | 30 ++++++------------
+ 2 files changed, 52 insertions(+), 43 deletions(-)
+
+commit ddea4d19cf6d64270e14418f02e7ff1f1b9458db
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 21:08:15 2018 -0700
+
+ Add 1-param passthrough constructor to hb_auto_t<>
+
+ And use.
+
+ src/hb-dsalgs.hh | 1 +
+ src/hb-ot-cmap-table.hh | 7 +++----
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+commit c8cfb702e96bf4e89495fcc56f965c88bfa77dca
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 16:14:32 2018 -0700
+
+ [cmap] Minor
+
+ src/hb-ot-cmap-table.hh | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+commit 1dcf5fb038e7c2d3d03a50c4cd9869a922f9adf7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 16:11:26 2018 -0700
+
+ [cmap Add hb_subset_collect_variation_unicodes()
+
+ To be moved to hb-face.h later.
+
+ src/hb-ot-cmap-table.hh | 59
+ +++++++++++++++++++++++++++++++++++++++++--------
+ src/hb-subset.cc | 25 ++++++++++++++++++++-
+ src/hb-subset.h | 10 +++++++--
+ 3 files changed, 82 insertions(+), 12 deletions(-)
+
+commit 4806b3800d77603c203e8bb2e88baeb2b3a14f05
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 15:56:07 2018 -0700
+
+ [cmap] Add hb_subset_collect_variation_selectors()
+
+ To be moved to hb-face later.
+
+ src/hb-ot-cmap-table.hh | 20 ++++++++++++++++----
+ src/hb-subset.cc | 30 ++++++++++++++++++++++++++----
+ src/hb-subset.h | 8 +++++++-
+ 3 files changed, 49 insertions(+), 9 deletions(-)
+
+commit 3336de24790ac1a12852ac2a3e2fff4d6bb19bc7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 15:41:25 2018 -0700
+
+ [cmap] Remove unused code
+
+ src/hb-ot-cmap-table.hh | 10 ----------
+ 1 file changed, 10 deletions(-)
+
+commit 1becabe06c0c58aaf69a9ba641508e77a60f3451
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 15:37:56 2018 -0700
+
+ [cmap] Use bsearch to find subtables
+
+ src/hb-ot-cmap-table.hh | 5 +----
+ test/shaping/data/in-house/tests/fuzzed.tests | 2 +-
+ 2 files changed, 2 insertions(+), 5 deletions(-)
+
+commit 02fe03e09a3258e07d2d6749990f6d31dd2a8525
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 15:33:05 2018 -0700
+
+ [cmap] Factor out find_best_subtable
+
+ src/hb-ot-cmap-table.hh | 52
+ +++++++++++++++++++++++++++++--------------------
+ 1 file changed, 31 insertions(+), 21 deletions(-)
+
+commit b41c43b4e112bfa38fef35694842f242c28a7da2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 15:25:03 2018 -0700
+
+ Minor
+
+ src/hb-ot-cmap-table.hh | 48
+ ++++++++++++++++++++++++++----------------------
+ 1 file changed, 26 insertions(+), 22 deletions(-)
+
+commit 7d382fa276f44b7b163e98d434cc79f958bf87fb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 09:35:45 2018 -0700
+
+ [cmap] Implement collect_unicodes() for Format0/6/10
+
+ src/hb-ot-cmap-table.hh | 23 +++++++++++++++++++----
+ 1 file changed, 19 insertions(+), 4 deletions(-)
+
+commit bd0e542525d41d9ebe51cbcab8151d65eb984b2e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 09:33:30 2018 -0700
+
+ [cmap] Simplify collect_unicodes()
+
+ Don't use accelerator (almost). Hooks up Format13 as well.
+
+ src/hb-ot-cmap-table.hh | 52
+ +++++++++++++++++++++++++++----------------------
+ 1 file changed, 29 insertions(+), 23 deletions(-)
+
+commit d60c465627d76fcfbeb37d6b8f9382f3b84ace6e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 08:47:06 2018 -0700
+
+ Rename get_all_codepoints() to collect_unicodes()
+
+ src/hb-ot-cmap-table.hh | 26
+ ++++++++++++-------------
+ src/hb-subset.cc | 6 +++---
+ src/hb-subset.h | 4 ++--
+ test/api/test-subset-codepoints.c | 18 ++++++++---------
+ test/fuzzing/hb-subset-get-codepoints-fuzzer.cc | 2 +-
+ 5 files changed, 28 insertions(+), 28 deletions(-)
+
+commit 531051b8b904cf4eb6a50bacebc11c2d85e40140
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 08:44:18 2018 -0700
+
+ [ot-font] Return char-not-found if mapped to gid 0
+
+ OpenType cmap table can use gid=0 to mean "not covered" to produce
+ more optimized cmap subtables. Return false from get_nominal_glyph()
+ for those. hb-ft already does this.
+
+ src/hb-ot-cmap-table.hh | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+commit aadb2a9188f143126392c0b0f139326dcf7f9c8d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 25 08:18:53 2018 -0700
+
+ Add face-builder
+
+ New API:
+ +hb_face_builder_create
+ +hb_face_builder_add_table
+
+ docs/harfbuzz-sections.txt | 5 +-
+ src/hb-face.cc | 149
+ +++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-face.h | 14 +++++
+ src/hb-subset-plan.cc | 2 +-
+ src/hb-subset-plan.hh | 2 +-
+ src/hb-subset-private.hh | 7 ---
+ src/hb-subset.cc | 129 ---------------------------------------
+ 7 files changed, 169 insertions(+), 139 deletions(-)
+
+commit 6cac9dc9ccb76945e9dfacafc169afad4a6e1e88
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 24 10:29:45 2018 -0700
+
+ [blob] Add as_bytes()
+
+ src/hb-blob-private.hh | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 29a9a0883877c598413de78cd0c61f07bc393b2c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 24 10:24:45 2018 -0700
+
+ [sanitize] Document how sanitize machinery works
+
+ src/hb-machinery-private.hh | 62
+ +++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 62 insertions(+)
+
+commit 142ac5a6be6088771e0ee4b135ba753c80036a9a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 24 10:07:49 2018 -0700
+
+ [serialize] Add copy_bytes() and copy_blob()
+
+ src/hb-dsalgs.hh | 3 +++
+ src/hb-machinery-private.hh | 21 ++++++++++++++++++++-
+ 2 files changed, 23 insertions(+), 1 deletion(-)
+
+commit 1c6b3693245d38103cab224d75262d45dc88c71c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 15 20:12:25 2018 -0700
+
+ [ot] Rename hb_ot_layout_t to hb_ot_face_data_t
+
+ src/hb-aat-layout.cc | 17 +-----
+ src/hb-ot-color.cc | 6 +--
+ src/hb-ot-layout-gpos-table.hh | 6 +--
+ src/hb-ot-layout-gsub-table.hh | 8 ++-
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ src/hb-ot-layout-private.hh | 12 ++---
+ src/hb-ot-layout.cc | 100
+ +++++++++++++++++------------------
+ src/hb-ot-math.cc | 2 +-
+ src/hb-ot-shape.cc | 5 +-
+ src/hb-ot-var.cc | 4 +-
+ 10 files changed, 71 insertions(+), 91 deletions(-)
+
+commit 22defe0965adddaa09eebc13df7fa6c64e2abba3
+Author: Emil A Eklund <eae@chromium.org>
+Date: Tue Aug 14 14:47:20 2018 -0700
+
+ Add guard around free_static_C_locale
+
+ Add HB_USE_ATEXIT guard around free_static_C_locale missed by previous
+ commit.
+
+ src/hb-common.cc | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 7112c6413ca7a1773847fe258145cc5162420953
+Author: Emil A Eklund <eae@chromium.org>
+Date: Tue Aug 14 13:50:24 2018 -0700
+
+ Guard free_static function definitions with macro
+
+ Add HB_USE_ATEXIT macros around free_static function definitions to
+ avoid unused function compiler warnings/errors.
+
+ src/hb-ft.cc | 5 ++++-
+ src/hb-glib.cc | 3 ++-
+ src/hb-icu.cc | 3 ++-
+ src/hb-ot-font.cc | 3 ++-
+ src/hb-shape.cc | 4 +++-
+ src/hb-shaper.cc | 3 ++-
+ 6 files changed, 15 insertions(+), 6 deletions(-)
+
+commit 63be5dcdde61275822d931b2924425478bc1dac1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 14 10:59:34 2018 -0700
+
+ 1.8.8
+
+ NEWS | 18 ++++++++++++++++++
+ configure.ac | 2 +-
+ src/hb-version.h | 4 ++--
+ 3 files changed, 21 insertions(+), 3 deletions(-)
+
commit c9a22fa124310c98c73b8d7b495ed354542a75de
Author: Behdad Esfahbod <behdad@behdad.org>
Date: Mon Aug 13 17:02:21 2018 -0700
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
index 3ae857ef329..c9af0f36853 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
@@ -1,3 +1,22 @@
+Overview of changes leading to 1.9.0
+Monday, September 10, 2018
+====================================
+- Added 'cmap' API to hb_face_t.
+- Face-builder API.
+- hb-ot-font re-creation should be much leaner now, as the
+ font tables it uses are cached on hb_face_t now.
+- Internal source header file name changes:
+ hb-*-private.hh is renamed to hb-*.hh.
+
+New API:
++HB_UNICODE_MAX
++hb_face_collect_unicodes()
++hb_face_collect_variation_selectors()
++hb_face_collect_variation_unicodes()
++hb_face_builder_create()
++hb_face_builder_add_table()
+
+
Overview of changes leading to 1.8.8
Tuesday, August 14, 2018
====================================
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac b/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
index 55cc12b3f40..1c698087132 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
@@ -1,6 +1,6 @@
AC_PREREQ([2.64])
AC_INIT([HarfBuzz],
- [1.8.8],
+ [1.9.0],
[https://github.com/harfbuzz/harfbuzz/issues/new],
[harfbuzz],
[http://harfbuzz.org/])
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources
index b981b0e264f..654255e20c7 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources
@@ -1,28 +1,28 @@
# Base and default-included sources and headers
HB_BASE_sources = \
- hb-atomic-private.hh \
- hb-blob-private.hh \
+ hb-atomic.hh \
+ hb-blob.hh \
hb-blob.cc \
- hb-buffer-private.hh \
+ hb-buffer.hh \
hb-buffer-serialize.cc \
hb-buffer.cc \
hb-common.cc \
hb-debug.hh \
hb-dsalgs.hh \
- hb-face-private.hh \
+ hb-face.hh \
hb-face.cc \
- hb-font-private.hh \
+ hb-font.hh \
hb-font.cc \
- hb-iter-private.hh \
- hb-map-private.hh \
+ hb-iter.hh \
+ hb-map.hh \
hb-map.cc \
- hb-machinery-private.hh \
- hb-mutex-private.hh \
+ hb-machinery.hh \
+ hb-mutex.hh \
hb-null.hh \
- hb-object-private.hh \
- hb-open-file-private.hh \
- hb-open-type-private.hh \
+ hb-object.hh \
+ hb-open-file.hh \
+ hb-open-type.hh \
hb-ot-color-cbdt-table.hh \
hb-ot-cmap-table.hh \
hb-ot-glyf-table.hh \
@@ -38,23 +38,23 @@ HB_BASE_sources = \
hb-ot-post-macroman.hh \
hb-ot-post-table.hh \
hb-ot-tag.cc \
- hb-private.hh \
- hb-set-digest-private.hh \
- hb-set-private.hh \
+ hb.hh \
+ hb-set-digest.hh \
+ hb-set.hh \
hb-set.cc \
hb-shape.cc \
- hb-shape-plan-private.hh \
+ hb-shape-plan.hh \
hb-shape-plan.cc \
hb-shaper-list.hh \
- hb-shaper-impl-private.hh \
- hb-shaper-private.hh \
+ hb-shaper-impl.hh \
+ hb-shaper.hh \
hb-shaper.cc \
hb-static.cc \
hb-string-array.hh \
- hb-unicode-private.hh \
+ hb-unicode.hh \
hb-unicode.cc \
- hb-vector-private.hh \
- hb-utf-private.hh \
+ hb-vector.hh \
+ hb-utf.hh \
hb-warning.cc \
$(NULL)
@@ -89,61 +89,63 @@ HB_FALLBACK_sources = \
HB_OT_sources = \
hb-aat-layout.cc \
- hb-aat-layout-common-private.hh \
+ hb-aat-layout-common.hh \
hb-aat-layout-ankr-table.hh \
hb-aat-layout-bsln-table.hh \
hb-aat-layout-feat-table.hh \
hb-aat-layout-kerx-table.hh \
hb-aat-layout-morx-table.hh \
hb-aat-layout-trak-table.hh \
- hb-aat-layout-private.hh \
+ hb-aat-layout.hh \
hb-aat-ltag-table.hh \
+ hb-ot-face.hh \
+ hb-ot-face.cc \
hb-ot-font.cc \
hb-ot-layout.cc \
hb-ot-layout-base-table.hh \
- hb-ot-layout-common-private.hh \
+ hb-ot-layout-common.hh \
hb-ot-layout-gdef-table.hh \
hb-ot-layout-gpos-table.hh \
- hb-ot-layout-gsubgpos-private.hh \
+ hb-ot-layout-gsubgpos.hh \
hb-ot-layout-gsub-table.hh \
hb-ot-layout-jstf-table.hh \
- hb-ot-layout-private.hh \
+ hb-ot-layout.hh \
hb-ot-color.cc \
hb-ot-color-colr-table.hh \
hb-ot-color-cpal-table.hh \
hb-ot-color-sbix-table.hh \
hb-ot-color-svg-table.hh \
hb-ot-map.cc \
- hb-ot-map-private.hh \
+ hb-ot-map.hh \
hb-ot-math.cc \
hb-ot-math-table.hh \
hb-ot-shape.cc \
hb-ot-shape-complex-arabic.cc \
hb-ot-shape-complex-arabic-fallback.hh \
- hb-ot-shape-complex-arabic-private.hh \
+ hb-ot-shape-complex-arabic.hh \
hb-ot-shape-complex-arabic-table.hh \
hb-ot-shape-complex-arabic-win1256.hh \
hb-ot-shape-complex-default.cc \
hb-ot-shape-complex-hangul.cc \
hb-ot-shape-complex-hebrew.cc \
hb-ot-shape-complex-indic.cc \
- hb-ot-shape-complex-indic-private.hh \
+ hb-ot-shape-complex-indic.hh \
hb-ot-shape-complex-indic-table.cc \
- hb-ot-shape-complex-khmer-private.hh \
+ hb-ot-shape-complex-khmer.hh \
hb-ot-shape-complex-khmer.cc \
- hb-ot-shape-complex-myanmar-private.hh \
+ hb-ot-shape-complex-myanmar.hh \
hb-ot-shape-complex-myanmar.cc \
hb-ot-shape-complex-thai.cc \
hb-ot-shape-complex-tibetan.cc \
hb-ot-shape-complex-use.cc \
- hb-ot-shape-complex-use-private.hh \
+ hb-ot-shape-complex-use.hh \
hb-ot-shape-complex-use-table.cc \
- hb-ot-shape-complex-private.hh \
- hb-ot-shape-normalize-private.hh \
+ hb-ot-shape-complex.hh \
+ hb-ot-shape-normalize.hh \
hb-ot-shape-normalize.cc \
- hb-ot-shape-fallback-private.hh \
+ hb-ot-shape-fallback.hh \
hb-ot-shape-fallback.cc \
- hb-ot-shape-private.hh \
+ hb-ot-shape.hh \
hb-ot-var.cc \
hb-ot-var-avar-table.hh \
hb-ot-var-fvar-table.hh \
@@ -207,16 +209,17 @@ HB_ICU_headers = hb-icu.h
HB_SUBSET_sources = \
hb-static.cc \
hb-subset.cc \
+ hb-subset.hh \
hb-subset-glyf.cc \
+ hb-subset-glyf.hh \
hb-subset-input.cc \
+ hb-subset-input.hh \
hb-subset-plan.cc \
+ hb-subset-plan.hh \
$(NULL)
HB_SUBSET_headers = \
hb-subset.h \
- hb-subset-glyf.hh \
- hb-subset-plan.hh \
- hb-subset-private.hh \
$(NULL)
HB_GOBJECT_DIST_sources = hb-gobject-structs.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/check-includes.sh b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-includes.sh
index fd565da53fb..f938f706cfd 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/check-includes.sh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-includes.sh
@@ -23,14 +23,14 @@ grep -v 'hb[.]h:' |
grep . >&2 && stat=1
-echo 'Checking that source files #include "hb-*private.hh" first (or none)'
+echo 'Checking that source files #include a private header first (or none)'
for x in $HBSOURCES; do
test -f "$srcdir/$x" -a ! -f "$x" && x="$srcdir/$x"
- grep '#.*\<include\>' "$x" /dev/null | grep -v 'include _' | head -n 1
+ grep '#.*\<include\>' "$x" /dev/null | head -n 1
done |
-grep -v '"hb-.*private[.]hh"' |
-grep -v 'hb-private[.]hh:' |
+grep -v '"hb-.*[.]hh"' |
+grep -v 'hb[.]hh' |
grep . >&2 && stat=1
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/dump-indic-data.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/dump-indic-data.cc
index d57413884be..a506889810b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/dump-indic-data.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/dump-indic-data.cc
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-ot-shape-complex-indic-private.hh"
+#include "hb-ot-shape-complex-indic.hh"
int
main (void)
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/dump-khmer-data.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/dump-khmer-data.cc
index 7dd09b2b5ca..12871fa850f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/dump-khmer-data.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/dump-khmer-data.cc
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-ot-shape-complex-khmer-private.hh"
+#include "hb-ot-shape-complex-khmer.hh"
int
main (void)
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/dump-myanmar-data.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/dump-myanmar-data.cc
index 2df9cd987f3..9f8b12ed229 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/dump-myanmar-data.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/dump-myanmar-data.cc
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-ot-shape-complex-myanmar-private.hh"
+#include "hb-ot-shape-complex-myanmar.hh"
int
main (void)
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/dump-use-data.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/dump-use-data.cc
index 0e64688f1e0..4a8b25842e1 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/dump-use-data.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/dump-use-data.cc
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-ot-shape-complex-use-private.hh"
+#include "hb-ot-shape-complex-use.hh"
int
main (void)
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py
index 6252664caae..e65b9814adf 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py
@@ -102,7 +102,7 @@ for h in headers:
print (" * %s" % (l.strip()))
print (" */")
print ()
-print ('#include "hb-ot-shape-complex-indic-private.hh"')
+print ('#include "hb-ot-shape-complex-indic.hh"')
print ()
# Shorten values
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
index c742ebacae4..a8724619a03 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
@@ -394,7 +394,7 @@ for h in headers:
print (" * %s" % (l.strip()))
print (" */")
print ()
-print ('#include "hb-ot-shape-complex-use-private.hh"')
+print ('#include "hb-ot-shape-complex-use.hh"')
print ()
total = 0
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-ankr-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-ankr-table.hh
index 3b7912b9df6..a197cec8112 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-ankr-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-ankr-table.hh
@@ -25,7 +25,7 @@
#ifndef HB_AAT_LAYOUT_ANKR_TABLE_HH
#define HB_AAT_LAYOUT_ANKR_TABLE_HH
-#include "hb-aat-layout-common-private.hh"
+#include "hb-aat-layout-common.hh"
/*
* ankr -- Anchor Point
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-bsln-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-bsln-table.hh
index df2bf5b43f0..b86408626f2 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-bsln-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-bsln-table.hh
@@ -25,7 +25,7 @@
#ifndef HB_AAT_LAYOUT_BSLN_TABLE_HH
#define HB_AAT_LAYOUT_BSLN_TABLE_HH
-#include "hb-aat-layout-common-private.hh"
+#include "hb-aat-layout-common.hh"
/*
* bsln -- Baseline
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-common-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-common.hh
index d7f35052d77..25f4fe14a75 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-common-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-common.hh
@@ -24,10 +24,10 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_AAT_LAYOUT_COMMON_PRIVATE_HH
-#define HB_AAT_LAYOUT_COMMON_PRIVATE_HH
+#ifndef HB_AAT_LAYOUT_COMMON_HH
+#define HB_AAT_LAYOUT_COMMON_HH
-#include "hb-aat-layout-private.hh"
+#include "hb-aat-layout.hh"
namespace AAT {
@@ -641,4 +641,4 @@ struct hb_aat_apply_context_t :
} /* namespace AAT */
-#endif /* HB_AAT_LAYOUT_COMMON_PRIVATE_HH */
+#endif /* HB_AAT_LAYOUT_COMMON_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-feat-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-feat-table.hh
index 3e070d79592..b7007631662 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-feat-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-feat-table.hh
@@ -25,7 +25,7 @@
#ifndef HB_AAT_LAYOUT_FEAT_TABLE_HH
#define HB_AAT_LAYOUT_FEAT_TABLE_HH
-#include "hb-aat-layout-common-private.hh"
+#include "hb-aat-layout-common.hh"
/*
* feat -- Feature Name
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-kerx-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-kerx-table.hh
index cc03d627862..615a8f8d4c3 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-kerx-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-kerx-table.hh
@@ -28,8 +28,8 @@
#ifndef HB_AAT_LAYOUT_KERX_TABLE_HH
#define HB_AAT_LAYOUT_KERX_TABLE_HH
-#include "hb-open-type-private.hh"
-#include "hb-aat-layout-common-private.hh"
+#include "hb-open-type.hh"
+#include "hb-aat-layout-common.hh"
#include "hb-aat-layout-ankr-table.hh"
/*
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh
index f25842457db..ef452e22b29 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh
@@ -27,9 +27,9 @@
#ifndef HB_AAT_LAYOUT_MORX_TABLE_HH
#define HB_AAT_LAYOUT_MORX_TABLE_HH
-#include "hb-open-type-private.hh"
-#include "hb-aat-layout-common-private.hh"
-#include "hb-ot-layout-common-private.hh"
+#include "hb-open-type.hh"
+#include "hb-aat-layout-common.hh"
+#include "hb-ot-layout-common.hh"
/*
* morx -- Extended Glyph Metamorphosis
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh
index f5dc558c3fe..c4bec2cab64 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh
@@ -28,9 +28,9 @@
#ifndef HB_AAT_LAYOUT_TRAK_TABLE_HH
#define HB_AAT_LAYOUT_TRAK_TABLE_HH
-#include "hb-aat-layout-common-private.hh"
-#include "hb-ot-layout-private.hh"
-#include "hb-open-type-private.hh"
+#include "hb-aat-layout-common.hh"
+#include "hb-ot-layout.hh"
+#include "hb-open-type.hh"
/*
* trak -- Tracking
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.cc
index 36d4037ad9b..a5e36a40a38 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.cc
@@ -24,12 +24,10 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
-#include "hb-ot-layout-private.hh"
-#include "hb-ot-layout-gsubgpos-private.hh"
-
-#include "hb-aat-layout-private.hh"
+#include "hb-ot-face.hh"
+#include "hb-aat-layout.hh"
#include "hb-aat-layout-ankr-table.hh"
#include "hb-aat-layout-bsln-table.hh" // Just so we compile it; unused otherwise.
#include "hb-aat-layout-feat-table.hh" // Just so we compile it; unused otherwise.
@@ -51,25 +49,12 @@ _get_morx (hb_face_t *face, hb_blob_t **blob = nullptr)
*blob = hb_blob_get_empty ();
return Null(AAT::morx);
}
- hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
- const AAT::morx& morx = *(layout->table.morx.get ());
+ const AAT::morx& morx = *(hb_ot_face_data (face)->morx.get ());
if (blob)
- *blob = layout->table.morx.get_blob ();
+ *blob = hb_ot_face_data (face)->morx.get_blob ();
return morx;
}
-// static inline void
-// _hb_aat_layout_create (hb_face_t *face)
-// {
-// hb_blob_t *morx_blob = hb_sanitize_context_t ().reference_table<AAT::morx> (face);
-// morx_blob->as<AAT::morx> ();
-
-// if (0)
-// {
-// morx_blob->as<AAT::Lookup<OT::GlyphID> > ()->get_value (1, face->get_num_glyphs ());
-// }
-// }
-
void
hb_aat_layout_substitute (hb_font_t *font, hb_buffer_t *buffer)
{
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.hh
index ce75c8e7192..ac9c535395a 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.hh
@@ -24,14 +24,14 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_AAT_LAYOUT_PRIVATE_HH
-#define HB_AAT_LAYOUT_PRIVATE_HH
+#ifndef HB_AAT_LAYOUT_HH
+#define HB_AAT_LAYOUT_HH
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-font-private.hh"
-#include "hb-buffer-private.hh"
-#include "hb-open-type-private.hh"
+#include "hb-font.hh"
+#include "hb-buffer.hh"
+#include "hb-open-type.hh"
HB_INTERNAL void
@@ -40,4 +40,4 @@ hb_aat_layout_substitute (hb_font_t *font, hb_buffer_t *buffer);
HB_INTERNAL void
hb_aat_layout_position (hb_font_t *font, hb_buffer_t *buffer);
-#endif /* HB_AAT_LAYOUT_PRIVATE_HH */
+#endif /* HB_AAT_LAYOUT_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-ltag-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-ltag-table.hh
index 15c4e89cbe5..e308ab28c37 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-ltag-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-ltag-table.hh
@@ -25,7 +25,7 @@
#ifndef HB_AAT_LTAG_TABLE_HH
#define HB_AAT_LTAG_TABLE_HH
-#include "hb-aat-layout-common-private.hh"
+#include "hb-aat-layout-common.hh"
/*
* ltag -- Language Tag
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic.hh
index 297c646986c..6e3672c18bc 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic.hh
@@ -29,10 +29,10 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_ATOMIC_PRIVATE_HH
-#define HB_ATOMIC_PRIVATE_HH
+#ifndef HB_ATOMIC_HH
+#define HB_ATOMIC_HH
-#include "hb-private.hh"
+#include "hb.hh"
/*
@@ -98,7 +98,7 @@ static inline void _hb_memory_barrier (void)
{
#if !defined(MemoryBarrier)
/* MinGW has a convoluted history of supporting MemoryBarrier. */
- long dummy = 0;
+ LONG dummy = 0;
InterlockedExchange (&dummy, 1);
#else
MemoryBarrier ();
@@ -106,7 +106,8 @@ static inline void _hb_memory_barrier (void)
}
#define _hb_memory_barrier() _hb_memory_barrier ()
-#define hb_atomic_int_impl_add(AI, V) InterlockedExchangeAdd ((unsigned *) (AI), (V))
+#define hb_atomic_int_impl_add(AI, V) InterlockedExchangeAdd ((LONG *) (AI), (V))
+static_assert ((sizeof (LONG) == sizeof (int)), "");
#define hb_atomic_ptr_impl_cmpexch(P,O,N) (InterlockedCompareExchangePointer ((void **) (P), (void *) (N), (void *) (O)) == (void *) (O))
@@ -278,4 +279,4 @@ struct hb_atomic_ptr_t
};
-#endif /* HB_ATOMIC_PRIVATE_HH */
+#endif /* HB_ATOMIC_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.cc
index 25c3e05aad1..a335df308a5 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.cc
@@ -30,8 +30,8 @@
#define _POSIX_C_SOURCE 200809L
#endif
-#include "hb-private.hh"
-#include "hb-blob-private.hh"
+#include "hb.hh"
+#include "hb-blob.hh"
#ifdef HAVE_SYS_MMAN_H
#ifdef HAVE_UNISTD_H
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.hh
index 49ad68ecec7..bee8c9794ad 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.hh
@@ -26,10 +26,10 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_BLOB_PRIVATE_HH
-#define HB_BLOB_PRIVATE_HH
+#ifndef HB_BLOB_HH
+#define HB_BLOB_HH
-#include "hb-private.hh"
+#include "hb.hh"
/*
@@ -62,6 +62,10 @@ struct hb_blob_t
{
return unlikely (!data) ? &Null(Type) : reinterpret_cast<const Type *> (data);
}
+ inline hb_bytes_t as_bytes (void) const
+ {
+ return hb_bytes_t (data, length);
+ }
public:
hb_object_header_t header;
@@ -79,4 +83,4 @@ struct hb_blob_t
DECLARE_NULL_INSTANCE (hb_blob_t);
-#endif /* HB_BLOB_PRIVATE_HH */
+#endif /* HB_BLOB_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.hh
index 380f3c5fca3..1f9e2e91db8 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.hh
@@ -29,7 +29,7 @@
#ifndef HB_BUFFER_DESERIALIZE_JSON_HH
#define HB_BUFFER_DESERIALIZE_JSON_HH
-#include "hb-private.hh"
+#include "hb.hh"
#line 36 "hb-buffer-deserialize-json.hh"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.rl b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.rl
index ec9bc7c9ae9..f3abb027b20 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.rl
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.rl
@@ -27,7 +27,7 @@
#ifndef HB_BUFFER_DESERIALIZE_JSON_HH
#define HB_BUFFER_DESERIALIZE_JSON_HH
-#include "hb-private.hh"
+#include "hb.hh"
%%{
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.hh
index 5bca369f8d2..67f0a1252f8 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.hh
@@ -29,7 +29,7 @@
#ifndef HB_BUFFER_DESERIALIZE_TEXT_HH
#define HB_BUFFER_DESERIALIZE_TEXT_HH
-#include "hb-private.hh"
+#include "hb.hh"
#line 36 "hb-buffer-deserialize-text.hh"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.rl b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.rl
index 1d90979a902..6268a6c5039 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.rl
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.rl
@@ -27,7 +27,7 @@
#ifndef HB_BUFFER_DESERIALIZE_TEXT_HH
#define HB_BUFFER_DESERIALIZE_TEXT_HH
-#include "hb-private.hh"
+#include "hb.hh"
%%{
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc
index 11471941de8..1b6d14731fd 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-buffer-private.hh"
+#include "hb-buffer.hh"
static const char *serialize_formats[] = {
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc
index eb7b01caafa..536ab5d5376 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc
@@ -27,8 +27,8 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-buffer-private.hh"
-#include "hb-utf-private.hh"
+#include "hb-buffer.hh"
+#include "hb-utf.hh"
/**
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.hh
index a6c4b696330..bcaf066c70b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.hh
@@ -27,11 +27,11 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_BUFFER_PRIVATE_HH
-#define HB_BUFFER_PRIVATE_HH
+#ifndef HB_BUFFER_HH
+#define HB_BUFFER_HH
-#include "hb-private.hh"
-#include "hb-unicode-private.hh"
+#include "hb.hh"
+#include "hb-unicode.hh"
#ifndef HB_BUFFER_MAX_LEN_FACTOR
@@ -119,7 +119,7 @@ struct hb_buffer_t
/* Text before / after the main buffer contents.
* Always in Unicode, and ordered outward.
* Index 0 is for "pre-context", 1 for "post-context". */
- static const unsigned int CONTEXT_LENGTH = 5;
+ enum { CONTEXT_LENGTH = 5 };
hb_codepoint_t context[2][CONTEXT_LENGTH];
unsigned int context_len[2];
@@ -386,4 +386,4 @@ _next_cluster (hb_buffer_t *buffer, unsigned int start)
#define HB_BUFFER_ASSERT_VAR(b, var) HB_BUFFER_XALLOCATE_VAR (b, assert_var, var ())
-#endif /* HB_BUFFER_PRIVATE_HH */
+#endif /* HB_BUFFER_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc
index 22dd52f49d8..ed3fed2a35c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc
@@ -26,9 +26,9 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-machinery-private.hh"
+#include "hb-machinery.hh"
#include <locale.h>
#ifdef HAVE_XLOCALE_H
@@ -731,8 +731,9 @@ parse_uint32 (const char **pp, const char *end, uint32_t *pv)
#ifdef USE_XLOCALE
-
+#ifdef HB_USE_ATEXIT
static void free_static_C_locale (void);
+#endif
static struct hb_C_locale_lazy_loader_t : hb_lazy_loader_t<hb_remove_ptr_t<HB_LOCALE_T>::value,
hb_C_locale_lazy_loader_t>
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc
index 1b916a53d34..a7ba85f8350 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc
@@ -28,8 +28,8 @@
#define HB_SHAPER coretext
-#include "hb-private.hh"
-#include "hb-shaper-impl-private.hh"
+#include "hb.hh"
+#include "hb-shaper-impl.hh"
#include "hb-coretext.h"
#include <math.h>
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-debug.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-debug.hh
index 9056ffca2b1..49663d215dc 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-debug.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-debug.hh
@@ -27,8 +27,8 @@
#ifndef HB_DEBUG_HH
#define HB_DEBUG_HH
-#include "hb-private.hh"
-#include "hb-atomic-private.hh"
+#include "hb.hh"
+#include "hb-atomic.hh"
#include "hb-dsalgs.hh"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc
index baad81884dc..35197c23865 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc
@@ -22,9 +22,9 @@
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
-#include "hb-private.hh"
+#include "hb.hh"
#define HB_SHAPER directwrite
-#include "hb-shaper-impl-private.hh"
+#include "hb-shaper-impl.hh"
#include <DWrite_1.h>
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-dsalgs.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-dsalgs.hh
index 8cbe6584b29..7e06ff17010 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-dsalgs.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-dsalgs.hh
@@ -27,7 +27,7 @@
#ifndef HB_DSALGS_HH
#define HB_DSALGS_HH
-#include "hb-private.hh"
+#include "hb.hh"
/* Void! For when we need a expression-type of void. */
@@ -492,6 +492,15 @@ template <typename Type>
struct hb_auto_t : Type
{
hb_auto_t (void) { Type::init (); }
+ /* Explicitly allow the following only for pointer and references,
+ * to avoid any accidental copies.
+ *
+ * Apparently if we template for all types, then gcc seems to
+ * capture a reference argument in the type, but clang doesn't,
+ * causing unwanted copies and bugs that come with it. Ideally
+ * we should use C++11-style rvalue reference &&t1. */
+ template <typename T1> explicit hb_auto_t (T1 *t1) { Type::init (t1); }
+ template <typename T1> explicit hb_auto_t (T1 &t1) { Type::init (t1); }
~hb_auto_t (void) { Type::fini (); }
private: /* Hide */
void init (void) {}
@@ -502,6 +511,9 @@ struct hb_bytes_t
{
inline hb_bytes_t (void) : bytes (nullptr), len (0) {}
inline hb_bytes_t (const char *bytes_, unsigned int len_) : bytes (bytes_), len (len_) {}
+ inline hb_bytes_t (const void *bytes_, unsigned int len_) : bytes ((const char *) bytes_), len (len_) {}
+
+ inline void free (void) { ::free ((void *) bytes); bytes = nullptr; len = 0; }
inline int cmp (const hb_bytes_t &a) const
{
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc
index 49f29d3fa87..92c34152335 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc
@@ -26,11 +26,13 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-face-private.hh"
-#include "hb-blob-private.hh"
-#include "hb-open-file-private.hh"
+#include "hb-face.hh"
+#include "hb-blob.hh"
+#include "hb-open-file.hh"
+#include "hb-ot-face.hh"
+#include "hb-ot-cmap-table.hh"
/**
@@ -512,3 +514,208 @@ hb_face_get_table_tags (const hb_face_t *face,
return ot_face.get_table_tags (start_offset, table_count, table_tags);
}
+
+
+/*
+ * Character set.
+ */
+
+
+/**
+ * hb_face_collect_unicodes:
+ * @face: font face.
+ * @out: set to add Unicode characters covered by @face to.
+ *
+ * Since: 1.9.0
+ */
+void
+hb_face_collect_unicodes (hb_face_t *face,
+ hb_set_t *out)
+{
+ if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return;
+ hb_ot_face_data (face)->cmap->collect_unicodes (out);
+}
+
+/**
+ * hb_face_collect_variation_selectors:
+ * @face: font face.
+ * @out: set to add Variation Selector characters covered by @face to.
+ *
+ *
+ *
+ * Since: 1.9.0
+ */
+void
+hb_face_collect_variation_selectors (hb_face_t *face,
+ hb_set_t *out)
+{
+ if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return;
+ hb_ot_face_data (face)->cmap->collect_variation_selectors (out);
+}
+
+/**
+ * hb_face_collect_variation_unicodes:
+ * @face: font face.
+ * @out: set to add Unicode characters for @variation_selector covered by @face to.
+ *
+ *
+ *
+ * Since: 1.9.0
+ */
+void
+hb_face_collect_variation_unicodes (hb_face_t *face,
+ hb_codepoint_t variation_selector,
+ hb_set_t *out)
+{
+ if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return;
+ hb_ot_face_data (face)->cmap->collect_variation_unicodes (variation_selector, out);
+}
+
+
+
+/*
+ * face-builder: A face that has add_table().
+ */
+
+struct hb_face_builder_data_t
+{
+ struct table_entry_t
+ {
+ inline int cmp (const hb_tag_t *t) const
+ {
+ if (*t < tag) return -1;
+ if (*t > tag) return -1;
+ return 0;
+ }
+
+ hb_tag_t tag;
+ hb_blob_t *blob;
+ };
+
+ hb_vector_t<table_entry_t, 32> tables;
+};
+
+static hb_face_builder_data_t *
+_hb_face_builder_data_create (void)
+{
+ hb_face_builder_data_t *data = (hb_face_builder_data_t *) calloc (1, sizeof (hb_face_builder_data_t));
+ if (unlikely (!data))
+ return nullptr;
+
+ data->tables.init ();
+
+ return data;
+}
+
+static void
+_hb_face_builder_data_destroy (void *user_data)
+{
+ hb_face_builder_data_t *data = (hb_face_builder_data_t *) user_data;
+
+ for (unsigned int i = 0; i < data->tables.len; i++)
+ hb_blob_destroy (data->tables[i].blob);
+
+ data->tables.fini ();
+
+ free (data);
+}
+
+static hb_blob_t *
+_hb_face_builder_data_reference_blob (hb_face_builder_data_t *data)
+{
+
+ unsigned int table_count = data->tables.len;
+ unsigned int face_length = table_count * 16 + 12;
+
+ for (unsigned int i = 0; i < table_count; i++)
+ face_length += hb_ceil_to_4 (hb_blob_get_length (data->tables.arrayZ[i].blob));
+
+ char *buf = (char *) malloc (face_length);
+ if (unlikely (!buf))
+ return nullptr;
+
+ hb_serialize_context_t c (buf, face_length);
+ OT::OpenTypeFontFile *f = c.start_serialize<OT::OpenTypeFontFile> ();
+
+ bool is_cff = data->tables.lsearch (HB_TAG ('C','F','F',' ')) || data->tables.lsearch (HB_TAG ('C','F','F','2'));
+ hb_tag_t sfnt_tag = is_cff ? OT::OpenTypeFontFile::CFFTag : OT::OpenTypeFontFile::TrueTypeTag;
+
+ Supplier<hb_tag_t> tags_supplier (&data->tables[0].tag, table_count, sizeof (data->tables[0]));
+ Supplier<hb_blob_t *> blobs_supplier (&data->tables[0].blob, table_count, sizeof (data->tables[0]));
+ bool ret = f->serialize_single (&c,
+ sfnt_tag,
+ tags_supplier,
+ blobs_supplier,
+ table_count);
+
+ c.end_serialize ();
+
+ if (unlikely (!ret))
+ {
+ free (buf);
+ return nullptr;
+ }
+
+ return hb_blob_create (buf, face_length, HB_MEMORY_MODE_WRITABLE, buf, free);
+}
+
+static hb_blob_t *
+_hb_face_builder_reference_table (hb_face_t *face, hb_tag_t tag, void *user_data)
+{
+ hb_face_builder_data_t *data = (hb_face_builder_data_t *) user_data;
+
+ if (!tag)
+ return _hb_face_builder_data_reference_blob (data);
+
+ hb_face_builder_data_t::table_entry_t *entry = data->tables.lsearch (tag);
+ if (entry)
+ return hb_blob_reference (entry->blob);
+
+ return nullptr;
+}
+
+
+/**
+ * hb_face_builder_create:
+ *
+ * Creates a #hb_face_t that can be used with hb_face_builder_add_table().
+ * After tables are added to the face, it can be compiled to a binary
+ * font file by calling hb_face_reference_blob().
+ *
+ * Return value: (transfer full) New face.
+ *
+ * Since: 1.9.0
+ **/
+hb_face_t *
+hb_face_builder_create (void)
+{
+ hb_face_builder_data_t *data = _hb_face_builder_data_create ();
+ if (unlikely (!data)) return hb_face_get_empty ();
+
+ return hb_face_create_for_tables (_hb_face_builder_reference_table,
+ data,
+ _hb_face_builder_data_destroy);
+}
+
+/**
+ * hb_face_builder_add_table:
+ *
+ * Add table for @tag with data provided by @blob to the face. @face must
+ * be created using hb_face_builder_create().
+ *
+ * Since: 1.9.0
+ **/
+hb_bool_t
+hb_face_builder_add_table (hb_face_t *face, hb_tag_t tag, hb_blob_t *blob)
+{
+ if (unlikely (face->destroy != (hb_destroy_func_t) _hb_face_builder_data_destroy))
+ return false;
+
+ hb_face_builder_data_t *data = (hb_face_builder_data_t *) face->user_data;
+ hb_face_builder_data_t::table_entry_t *entry = data->tables.push ();
+
+ entry->tag = tag;
+ entry->blob = hb_blob_reference (blob);
+
+ return true;
+}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.h
index 208092efc28..e8ff090d55f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.h
@@ -33,6 +33,7 @@
#include "hb-common.h"
#include "hb-blob.h"
+#include "hb-set.h"
HB_BEGIN_DECLS
@@ -120,6 +121,38 @@ hb_face_get_table_tags (const hb_face_t *face,
unsigned int *table_count, /* IN/OUT */
hb_tag_t *table_tags /* OUT */);
+
+/*
+ * Character set.
+ */
+
+HB_EXTERN void
+hb_face_collect_unicodes (hb_face_t *face,
+ hb_set_t *out);
+
+HB_EXTERN void
+hb_face_collect_variation_selectors (hb_face_t *face,
+ hb_set_t *out);
+
+HB_EXTERN void
+hb_face_collect_variation_unicodes (hb_face_t *face,
+ hb_codepoint_t variation_selector,
+ hb_set_t *out);
+
+
+/*
+ * Builder face.
+ */
+
+HB_EXTERN hb_face_t *
+hb_face_builder_create (void);
+
+HB_EXTERN hb_bool_t
+hb_face_builder_add_table (hb_face_t *face,
+ hb_tag_t tag,
+ hb_blob_t *blob);
+
+
HB_END_DECLS
#endif /* HB_FACE_H */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.hh
index 086ce6e96d1..f90453dbd1f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.hh
@@ -26,13 +26,13 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_FACE_PRIVATE_HH
-#define HB_FACE_PRIVATE_HH
+#ifndef HB_FACE_HH
+#define HB_FACE_HH
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-shaper-private.hh"
-#include "hb-shape-plan-private.hh"
+#include "hb-shaper.hh"
+#include "hb-shape-plan.hh"
/*
@@ -105,4 +105,4 @@ DECLARE_NULL_INSTANCE (hb_face_t);
#undef HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS
-#endif /* HB_FACE_PRIVATE_HH */
+#endif /* HB_FACE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-fallback-shape.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-fallback-shape.cc
index eff20f70c77..dc8536c8281 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-fallback-shape.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-fallback-shape.cc
@@ -25,7 +25,7 @@
*/
#define HB_SHAPER fallback
-#include "hb-shaper-impl-private.hh"
+#include "hb-shaper-impl.hh"
HB_SHAPER_DATA_ENSURE_DEFINE(fallback, face)
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc
index 857b8f57734..bc831dd53f2 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc
@@ -26,10 +26,10 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-font-private.hh"
-#include "hb-machinery-private.hh"
+#include "hb-font.hh"
+#include "hb-machinery.hh"
/*
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.hh
index d3a41380258..4c8d0aeec03 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.hh
@@ -26,13 +26,13 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_FONT_PRIVATE_HH
-#define HB_FONT_PRIVATE_HH
+#ifndef HB_FONT_HH
+#define HB_FONT_HH
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-face-private.hh"
-#include "hb-shaper-private.hh"
+#include "hb-face.hh"
+#include "hb-shaper.hh"
/*
@@ -601,4 +601,4 @@ DECLARE_NULL_INSTANCE (hb_font_t);
#undef HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS
-#endif /* HB_FONT_PRIVATE_HH */
+#endif /* HB_FONT_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc
index 01341b604a1..5d6abb29d16 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc
@@ -27,12 +27,12 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
+#include "hb.hh"
#include "hb-ft.h"
-#include "hb-font-private.hh"
-#include "hb-machinery-private.hh"
+#include "hb-font.hh"
+#include "hb-machinery.hh"
#include FT_ADVANCES_H
#include FT_MULTIPLE_MASTERS_H
@@ -417,7 +417,9 @@ hb_ft_get_font_h_extents (hb_font_t *font HB_UNUSED,
return true;
}
+#ifdef HB_USE_ATEXIT
static void free_static_ft_funcs (void);
+#endif
static struct hb_ft_font_funcs_lazy_loader_t : hb_font_funcs_lazy_loader_t<hb_ft_font_funcs_lazy_loader_t>
{
@@ -682,8 +684,9 @@ hb_ft_font_create_referenced (FT_Face ft_face)
return hb_ft_font_create (ft_face, _hb_ft_face_destroy);
}
-
+#ifdef HB_USE_ATEXIT
static void free_static_ft_library (void);
+#endif
static struct hb_ft_library_lazy_loader_t : hb_lazy_loader_t<hb_remove_ptr_t<FT_Library>::value,
hb_ft_library_lazy_loader_t>
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-glib.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-glib.cc
index 809b22f6b46..18f3a81db64 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-glib.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-glib.cc
@@ -26,12 +26,12 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
+#include "hb.hh"
#include "hb-glib.h"
-#include "hb-unicode-private.hh"
-#include "hb-machinery-private.hh"
+#include "hb-unicode.hh"
+#include "hb-machinery.hh"
#if !GLIB_CHECK_VERSION(2,29,14)
@@ -366,8 +366,9 @@ hb_glib_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs HB_UNUSED,
}
-
+#ifdef HB_USE_ATEXIT
static void free_static_glib_funcs (void);
+#endif
static struct hb_glib_unicode_funcs_lazy_loader_t : hb_unicode_funcs_lazy_loader_t<hb_glib_unicode_funcs_lazy_loader_t>
{
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-enums.cc.tmpl b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-enums.cc.tmpl
index ca458a3846c..e056df47891 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-enums.cc.tmpl
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-enums.cc.tmpl
@@ -25,7 +25,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
+#include "hb.hh"
/* g++ didn't like older gtype.h gcc-only code path. */
#include <glib.h>
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.cc
index 0c8e55733eb..1b87585832e 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.cc
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
+#include "hb.hh"
/* g++ didn't like older gtype.h gcc-only code path. */
#include <glib.h>
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc
index 1f42a36f35a..817278f309b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc
@@ -27,7 +27,7 @@
*/
#define HB_SHAPER graphite2
-#include "hb-shaper-impl-private.hh"
+#include "hb-shaper-impl.hh"
#include "hb-graphite2.h"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-icu.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-icu.cc
index 2e3ad367544..564f71fe2dc 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-icu.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-icu.cc
@@ -27,12 +27,12 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
+#include "hb.hh"
#include "hb-icu.h"
-#include "hb-unicode-private.hh"
-#include "hb-machinery-private.hh"
+#include "hb-unicode.hh"
+#include "hb-machinery.hh"
#include <unicode/uchar.h>
#include <unicode/unorm2.h>
@@ -343,8 +343,9 @@ hb_icu_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs HB_UNUSED,
return utf32_len;
}
-
+#ifdef HB_USE_ATEXIT
static void free_static_icu_funcs (void);
+#endif
static struct hb_icu_unicode_funcs_lazy_loader_t : hb_unicode_funcs_lazy_loader_t<hb_icu_unicode_funcs_lazy_loader_t>
{
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-iter-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-iter.hh
index 314133ade70..6fd6aed79a7 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-iter-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-iter.hh
@@ -24,10 +24,10 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_ITER_PRIVATE_HH
-#define HB_ITER_PRIVATE_HH
+#ifndef HB_ITER_HH
+#define HB_ITER_HH
-#include "hb-private.hh"
+#include "hb.hh"
/* Unified iterator object.
@@ -146,4 +146,4 @@ m (void)
}
}
-#endif /* HB_ITER_PRIVATE_HH */
+#endif /* HB_ITER_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-machinery-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-machinery.hh
index 99ef485a307..62f49072113 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-machinery-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-machinery.hh
@@ -26,13 +26,14 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_MACHINERY_PRIVATE_HH
-#define HB_MACHINERY_PRIVATE_HH
+#ifndef HB_MACHINERY_HH
+#define HB_MACHINERY_HH
-#include "hb-private.hh"
-#include "hb-blob-private.hh"
+#include "hb.hh"
+#include "hb-blob.hh"
-#include "hb-iter-private.hh"
+#include "hb-iter.hh"
+#include "hb-vector.hh"
/*
@@ -98,8 +99,8 @@ static inline Type& StructAfter(TObject &X)
#define DEFINE_SIZE_STATIC(size) \
DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size)); \
- static const unsigned int static_size = (size); \
- static const unsigned int min_size = (size); \
+ enum { static_size = (size) }; \
+ enum { min_size = (size) }; \
inline unsigned int get_size (void) const { return (size); }
#define DEFINE_SIZE_UNION(size, _member) \
@@ -111,9 +112,13 @@ static inline Type& StructAfter(TObject &X)
static const unsigned int min_size = (size)
#define DEFINE_SIZE_ARRAY(size, array) \
- DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + sizeof (array[0])); \
+ DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + VAR * sizeof (array[0])); \
DEFINE_COMPILES_ASSERTION ((void) array[0].static_size) \
- static const unsigned int min_size = (size)
+ enum { min_size = (size) }; \
+
+#define DEFINE_SIZE_ARRAY_SIZED(size, array) \
+ DEFINE_SIZE_ARRAY(size, array); \
+ inline unsigned int get_size (void) const { return (size - array[0].min_size + array.get_size ()); }
#define DEFINE_SIZE_ARRAY2(size, array1, array2) \
DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + sizeof (this->array1[0]) + sizeof (this->array2[0])); \
@@ -128,7 +133,7 @@ static inline Type& StructAfter(TObject &X)
template <typename Context, typename Return, unsigned int MaxDebugDepth>
struct hb_dispatch_context_t
{
- static const unsigned int max_debug_depth = MaxDebugDepth;
+ enum { 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; }
@@ -138,6 +143,68 @@ struct hb_dispatch_context_t
/*
* Sanitize
+ *
+ *
+ * === Introduction ===
+ *
+ * The sanitize machinery is at the core of our zero-cost font loading. We
+ * mmap() font file into memory and create a blob out of it. Font subtables
+ * are returned as a readonly sub-blob of the main font blob. These table
+ * blobs are then sanitized before use, to ensure invalid memory access does
+ * not happen. The toplevel sanitize API use is like, eg. to load the 'head'
+ * table:
+ *
+ * hb_blob_t *head_blob = hb_sanitize_context_t ().reference_table<OT::head> (face);
+ *
+ * The blob then can be converted to a head table struct with:
+ *
+ * const head *head_table = head_blob->as<head> ();
+ *
+ * What the reference_table does is, to call hb_face_reference_table() to load
+ * the table blob, sanitize it and return either the sanitized blob, or empty
+ * blob if sanitization failed. The blob->as() function returns the null
+ * object of its template type argument if the blob is empty. Otherwise, it
+ * just casts the blob contents to the desired type.
+ *
+ * Sanitizing a blob of data with a type T works as follows (with minor
+ * simplification):
+ *
+ * - Cast blob content to T*, call sanitize() method of it,
+ * - If sanitize succeeded, return blob.
+ * - Otherwise, if blob is not writable, try making it writable,
+ * or copy if cannot be made writable in-place,
+ * - Call sanitize() again. Return blob if sanitize succeeded.
+ * - Return empty blob otherwise.
+ *
+ *
+ * === The sanitize() contract ===
+ *
+ * The sanitize() method of each object type shall return true if it's safe to
+ * call other methods of the object, and false otherwise.
+ *
+ * Note that what sanitize() checks for might align with what the specification
+ * describes as valid table data, but does not have to be. In particular, we
+ * do NOT want to be pedantic and concern ourselves with validity checks that
+ * are irrelevant to our use of the table. On the contrary, we want to be
+ * lenient with error handling and accept invalid data to the extent that it
+ * does not impose extra burden on us.
+ *
+ * Based on the sanitize contract, one can see that what we check for depends
+ * on how we use the data in other table methods. Ie. if other table methods
+ * assume that offsets do NOT point out of the table data block, then that's
+ * something sanitize() must check for (GSUB/GPOS/GDEF/etc work this way). On
+ * the other hand, if other methods do such checks themselves, then sanitize()
+ * does not have to bother with them (glyf/local work this way). The choice
+ * depends on the table structure and sanitize() performance. For example, to
+ * check glyf/loca offsets in sanitize() would cost O(num-glyphs). We try hard
+ * to avoid such costs during font loading. By postponing such checks to the
+ * actual glyph loading, we reduce the sanitize cost to O(1) and total runtime
+ * cost to O(used-glyphs). As such, this is preferred.
+ *
+ * The same argument can be made re GSUB/GPOS/GDEF, but there, the table
+ * structure is so complicated that by checking all offsets at sanitize() time,
+ * we make the code much simpler in other methods, as offsets and referenced
+ * objectes do not need to be validated at each use site.
*/
/* This limits sanitizing time on really broken fonts. */
@@ -375,12 +442,19 @@ struct hb_serialize_context_t
{
this->start = (char *) start_;
this->end = this->start + size;
+ reset ();
+ }
+ inline void reset (void)
+ {
this->ran_out_of_room = false;
this->head = this->start;
this->debug_depth = 0;
}
+ inline bool err (bool e) { return this->ran_out_of_room = this->ran_out_of_room || e; }
+
+ /* To be called around main operation. */
template <typename Type>
inline Type *start_serialize (void)
{
@@ -391,7 +465,6 @@ struct hb_serialize_context_t
return start_embed<Type> ();
}
-
inline void end_serialize (void)
{
DEBUG_MSG_LEVEL (SERIALIZE, this->start, 0, -1,
@@ -401,15 +474,20 @@ struct hb_serialize_context_t
this->ran_out_of_room ? "RAN OUT OF ROOM" : "did not ran out of room");
}
+ inline unsigned int length (void) const { return this->head - this->start; }
+
+ inline void align (unsigned int alignment)
+ {
+ unsigned int l = length () % alignment;
+ if (l)
+ allocate_size<void> (alignment - l);
+ }
+
template <typename Type>
- inline Type *copy (void)
+ inline Type *start_embed (void) const
{
- assert (!this->ran_out_of_room);
- unsigned int len = this->head - this->start;
- void *p = malloc (len);
- if (p)
- memcpy (p, this->start, len);
- return reinterpret_cast<Type *> (p);
+ Type *ret = reinterpret_cast<Type *> (this->head);
+ return ret;
}
template <typename Type>
@@ -432,19 +510,12 @@ struct hb_serialize_context_t
}
template <typename Type>
- inline Type *start_embed (void)
- {
- Type *ret = reinterpret_cast<Type *> (this->head);
- return ret;
- }
-
- template <typename Type>
inline Type *embed (const Type &obj)
{
unsigned int size = obj.get_size ();
Type *ret = this->allocate_size<Type> (size);
if (unlikely (!ret)) return nullptr;
- memcpy (ret, obj, size);
+ memcpy (ret, &obj, size);
return ret;
}
@@ -466,6 +537,38 @@ struct hb_serialize_context_t
return reinterpret_cast<Type *> (&obj);
}
+ /* Output routines. */
+ template <typename Type>
+ inline Type *copy (void) const
+ {
+ assert (!this->ran_out_of_room);
+ unsigned int len = this->head - this->start;
+ void *p = malloc (len);
+ if (p)
+ memcpy (p, this->start, len);
+ return reinterpret_cast<Type *> (p);
+ }
+ inline hb_bytes_t copy_bytes (void) const
+ {
+ assert (!this->ran_out_of_room);
+ unsigned int len = this->head - this->start;
+ void *p = malloc (len);
+ if (p)
+ memcpy (p, this->start, len);
+ else
+ return hb_bytes_t ();
+ return hb_bytes_t (p, len);
+ }
+ inline hb_blob_t *copy_blob (void) const
+ {
+ assert (!this->ran_out_of_room);
+ return hb_blob_create (this->start,
+ this->head - this->start,
+ HB_MEMORY_MODE_DUPLICATE,
+ nullptr, nullptr);
+ }
+
+ public:
unsigned int debug_depth;
char *start, *end, *head;
bool ran_out_of_room;
@@ -479,12 +582,19 @@ struct hb_serialize_context_t
template <typename Type>
struct Supplier
{
- inline Supplier (const Type *array, unsigned int len_, unsigned int stride_=sizeof(Type))
+ inline Supplier (const Type *array, unsigned int len_, unsigned int stride_=sizeof (Type))
{
head = array;
len = len_;
stride = stride_;
}
+ inline Supplier (const hb_vector_t<Type> *v)
+ {
+ head = v->arrayZ;
+ len = v->len;
+ stride = sizeof (Type);
+ }
+
inline const Type operator [] (unsigned int i) const
{
if (unlikely (i >= len)) return Type ();
@@ -682,6 +792,10 @@ struct hb_lazy_loader_t : hb_data_wrapper_t<Data, WheresData>
}
return p;
}
+ inline Stored * get_stored_relaxed (void) const
+ {
+ return this->instance.get_relaxed ();
+ }
inline void set_stored (Stored *instance_)
{
@@ -695,6 +809,7 @@ struct hb_lazy_loader_t : hb_data_wrapper_t<Data, WheresData>
}
inline const Returned * get (void) const { return Funcs::convert (get_stored ()); }
+ inline const Returned * get_relaxed (void) const { return Funcs::convert (get_stored_relaxed ()); }
inline Returned * get_unconst (void) const { return const_cast<Returned *> (Funcs::convert (get_stored ())); }
/* To be possibly overloaded by subclasses. */
@@ -729,9 +844,9 @@ struct hb_lazy_loader_t : hb_data_wrapper_t<Data, WheresData>
/* Specializations. */
-template <unsigned int WheresFace, typename T>
+template <typename T, unsigned int WheresFace>
struct hb_face_lazy_loader_t : hb_lazy_loader_t<T,
- hb_face_lazy_loader_t<WheresFace, T>,
+ hb_face_lazy_loader_t<T, WheresFace>,
hb_face_t, WheresFace> {};
template <typename T, unsigned int WheresFace>
@@ -789,4 +904,4 @@ struct hb_unicode_funcs_lazy_loader_t : hb_lazy_loader_t<hb_unicode_funcs_t, Sub
};
-#endif /* HB_MACHINERY_PRIVATE_HH */
+#endif /* HB_MACHINERY_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map.cc
index 138a85612fc..225f37bc678 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map.cc
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-map-private.hh"
+#include "hb-map.hh"
/* Public API */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map.hh
index 00f089e8151..21898a7a677 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map.hh
@@ -24,10 +24,10 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_MAP_PRIVATE_HH
-#define HB_MAP_PRIVATE_HH
+#ifndef HB_MAP_HH
+#define HB_MAP_HH
-#include "hb-private.hh"
+#include "hb.hh"
template <typename T>
@@ -251,4 +251,4 @@ struct hb_map_t
};
-#endif /* HB_MAP_PRIVATE_HH */
+#endif /* HB_MAP_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-mutex-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-mutex.hh
index 14bde3103e1..d8cdf4b64ac 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-mutex-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-mutex.hh
@@ -29,10 +29,10 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_MUTEX_PRIVATE_HH
-#define HB_MUTEX_PRIVATE_HH
+#ifndef HB_MUTEX_HH
+#define HB_MUTEX_HH
-#include "hb-private.hh"
+#include "hb.hh"
/* mutex */
@@ -138,4 +138,4 @@ struct hb_mutex_t
};
-#endif /* HB_MUTEX_PRIVATE_HH */
+#endif /* HB_MUTEX_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-null.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-null.hh
index 91efee6443d..7128f0a94f3 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-null.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-null.hh
@@ -27,7 +27,7 @@
#ifndef HB_NULL_HH
#define HB_NULL_HH
-#include "hb-private.hh"
+#include "hb.hh"
/*
@@ -51,27 +51,40 @@ static inline Type const & Null (void) {
/* Specializaitons for arbitrary-content Null objects expressed in bytes. */
#define DECLARE_NULL_NAMESPACE_BYTES(Namespace, Type) \
-} /* Close namespace. */ \
-extern HB_INTERNAL const unsigned char _hb_Null_##Namespace##_##Type[Namespace::Type::min_size]; \
-template <> \
-/*static*/ inline const Namespace::Type& Null<Namespace::Type> (void) { \
- return *reinterpret_cast<const Namespace::Type *> (_hb_Null_##Namespace##_##Type); \
-} \
-namespace Namespace { \
-static_assert (true, "Just so we take semicolon after.")
+ } /* Close namespace. */ \
+ extern HB_INTERNAL const unsigned char _hb_Null_##Namespace##_##Type[Namespace::Type::min_size]; \
+ template <> \
+ /*static*/ inline const Namespace::Type& Null<Namespace::Type> (void) { \
+ return *reinterpret_cast<const Namespace::Type *> (_hb_Null_##Namespace##_##Type); \
+ } \
+ namespace Namespace { \
+ static_assert (true, "Just so we take semicolon after.")
#define DEFINE_NULL_NAMESPACE_BYTES(Namespace, Type) \
-const unsigned char _hb_Null_##Namespace##_##Type[Namespace::Type::min_size]
+ const unsigned char _hb_Null_##Namespace##_##Type[Namespace::Type::min_size]
/* Specializaitons for arbitrary-content Null objects expressed as struct initializer. */
#define DECLARE_NULL_INSTANCE(Type) \
-extern HB_INTERNAL const Type _hb_Null_##Type; \
-template <> \
-/*static*/ inline const Type& Null<Type> (void) { \
- return _hb_Null_##Type; \
-} \
+ extern HB_INTERNAL const Type _hb_Null_##Type; \
+ template <> \
+ /*static*/ inline const Type& Null<Type> (void) { \
+ return _hb_Null_##Type; \
+ } \
static_assert (true, "Just so we take semicolon after.")
#define DEFINE_NULL_INSTANCE(Type) \
-const Type _hb_Null_##Type
+ const Type _hb_Null_##Type
+
+/* Specializaiton to disallow Null objects. */
+#define DECLARE_NULL_DISALLOW(Type) \
+ template <> inline const Type& Null<Type> (void)
+#define DECLARE_NULL_NAMSPACE_DISALLOW(Namespace, Type) \
+ } /* Close namespace. */ \
+ template <> \
+ /*static*/ inline const Namespace::Type& Null<Namespace::Type> (void) { \
+ extern void *_hb_undefined; \
+ return *reinterpret_cast<const Namespace::Type *> (_hb_undefined); \
+ } \
+ namespace Namespace { \
+ static_assert (true, "Just so we take semicolon after.")
/* Global writable pool. Enlarge as necessary. */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-object-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-object.hh
index 4955a68dc3c..ca85af691d9 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-object-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-object.hh
@@ -29,13 +29,13 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_OBJECT_PRIVATE_HH
-#define HB_OBJECT_PRIVATE_HH
+#ifndef HB_OBJECT_HH
+#define HB_OBJECT_HH
-#include "hb-private.hh"
-#include "hb-atomic-private.hh"
-#include "hb-mutex-private.hh"
-#include "hb-vector-private.hh"
+#include "hb.hh"
+#include "hb-atomic.hh"
+#include "hb-mutex.hh"
+#include "hb-vector.hh"
/*
@@ -322,4 +322,4 @@ static inline void *hb_object_get_user_data (Type *obj,
}
-#endif /* HB_OBJECT_PRIVATE_HH */
+#endif /* HB_OBJECT_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-file-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-file.hh
index d47bff66e78..d3b748602ba 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-file-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-file.hh
@@ -26,10 +26,10 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_OPEN_FILE_PRIVATE_HH
-#define HB_OPEN_FILE_PRIVATE_HH
+#ifndef HB_OPEN_FILE_HH
+#define HB_OPEN_FILE_HH
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
#include "hb-ot-head-table.hh"
@@ -115,7 +115,7 @@ typedef struct OffsetTable
* table list. */
int i = tables.len < 64 ? tables.lsearch (t) : tables.bsearch (t);
if (table_index)
- *table_index = i == -1 ? Index::NOT_FOUND_INDEX : (unsigned int) i;
+ *table_index = i == -1 ? (unsigned) Index::NOT_FOUND_INDEX : (unsigned) i;
return i != -1;
}
inline const TableRecord& get_table_by_tag (hb_tag_t tag) const
@@ -161,8 +161,7 @@ typedef struct OffsetTable
memcpy (start, hb_blob_get_data (blob, nullptr), rec.length);
/* 4-byte allignment. */
- if (rec.length % 4)
- c->allocate_size<void> (4 - rec.length % 4);
+ c->align (4);
const char *end = (const char *) c->head;
if (tags[i] == HB_OT_TAG_head && end - start >= head::static_size)
@@ -565,4 +564,4 @@ struct OpenTypeFontFile
} /* namespace OT */
-#endif /* HB_OPEN_FILE_PRIVATE_HH */
+#endif /* HB_OPEN_FILE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh
index 5580565f118..ef18163fa56 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh
@@ -26,13 +26,14 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_OPEN_TYPE_PRIVATE_HH
-#define HB_OPEN_TYPE_PRIVATE_HH
+#ifndef HB_OPEN_TYPE_HH
+#define HB_OPEN_TYPE_HH
-#include "hb-private.hh"
-#include "hb-blob-private.hh"
-#include "hb-face-private.hh"
-#include "hb-machinery-private.hh"
+#include "hb.hh"
+#include "hb-blob.hh"
+#include "hb-face.hh"
+#include "hb-machinery.hh"
+#include "hb-subset.hh"
namespace OT {
@@ -149,7 +150,7 @@ typedef HBUINT16 NameID;
/* Script/language-system/feature index */
struct Index : HBUINT16 {
- static const unsigned int NOT_FOUND_INDEX = 0xFFFFu;
+ enum { NOT_FOUND_INDEX = 0xFFFFu };
};
DECLARE_NULL_NAMESPACE_BYTES (OT, Index);
@@ -246,6 +247,19 @@ struct OffsetTo : Offset<OffsetType>
return * (Type *) Offset<OffsetType>::serialize (c, base);
}
+ template <typename T>
+ inline void serialize_subset (hb_subset_context_t *c, const T &src, const void *base)
+ {
+ if (&src == &Null(T))
+ {
+ this->set (0);
+ return;
+ }
+ serialize (c->serializer, base);
+ if (!src.subset (c))
+ this->set (0);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c, const void *base) const
{
TRACE_SANITIZE (this);
@@ -404,7 +418,6 @@ struct ArrayOf
if (unlikely (!c->extend (*this))) return_trace (false);
return_trace (true);
}
-
inline bool serialize (hb_serialize_context_t *c,
Supplier<Type> &items,
unsigned int items_len)
@@ -505,6 +518,17 @@ struct OffsetListOf : OffsetArrayOf<Type>
return this+this->arrayZ[i];
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ struct OffsetListOf<Type> *out = c->serializer->embed (*this);
+ if (unlikely (!out)) return_trace (false);
+ unsigned int count = this->len;
+ for (unsigned int i = 0; i < count; i++)
+ out->arrayZ[i].serialize_subset (c, (*this)[i], out);
+ return_trace (true);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -646,4 +670,4 @@ struct BinSearchArrayOf : SortedArrayOf<Type, BinSearchHeader> {};
} /* namespace OT */
-#endif /* HB_OPEN_TYPE_PRIVATE_HH */
+#endif /* HB_OPEN_TYPE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh
index 67a9c7dd96b..e6876d12cf6 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh
@@ -27,9 +27,8 @@
#ifndef HB_OT_CMAP_TABLE_HH
#define HB_OT_CMAP_TABLE_HH
-#include "hb-open-type-private.hh"
-#include "hb-set-private.hh"
-#include "hb-subset-plan.hh"
+#include "hb-open-type.hh"
+#include "hb-set.hh"
/*
* cmap -- Character to Glyph Index Mapping
@@ -37,10 +36,6 @@
*/
#define HB_OT_TAG_cmap HB_TAG('c','m','a','p')
-#ifndef HB_MAX_UNICODE_CODEPOINT_VALUE
-#define HB_MAX_UNICODE_CODEPOINT_VALUE 0x10FFFF
-#endif
-
namespace OT {
@@ -54,6 +49,12 @@ struct CmapSubtableFormat0
*glyph = gid;
return true;
}
+ inline void collect_unicodes (hb_set_t *out) const
+ {
+ for (unsigned int i = 0; i < 256; i++)
+ if (glyphIdArray[i])
+ out->add (i);
+ }
inline bool sanitize (hb_sanitize_context_t *c) const
{
@@ -237,15 +238,14 @@ struct CmapSubtableFormat4
glyphIdArray = idRangeOffset + segCount;
glyphIdArrayLength = (subtable->length - 16 - 8 * segCount) / 2;
}
+ inline void fini (void) {}
- static inline bool get_glyph_func (const void *obj, hb_codepoint_t codepoint, hb_codepoint_t *glyph)
+ inline bool get_glyph (hb_codepoint_t codepoint, hb_codepoint_t *glyph) const
{
- const accelerator_t *thiz = (const accelerator_t *) obj;
-
/* Custom two-array bsearch. */
- int min = 0, max = (int) thiz->segCount - 1;
- const HBUINT16 *startCount = thiz->startCount;
- const HBUINT16 *endCount = thiz->endCount;
+ int min = 0, max = (int) this->segCount - 1;
+ const HBUINT16 *startCount = this->startCount;
+ const HBUINT16 *endCount = this->endCount;
unsigned int i;
while (min <= max)
{
@@ -264,33 +264,55 @@ struct CmapSubtableFormat4
found:
hb_codepoint_t gid;
- unsigned int rangeOffset = thiz->idRangeOffset[i];
+ unsigned int rangeOffset = this->idRangeOffset[i];
if (rangeOffset == 0)
- gid = codepoint + thiz->idDelta[i];
+ gid = codepoint + this->idDelta[i];
else
{
/* Somebody has been smoking... */
- unsigned int index = rangeOffset / 2 + (codepoint - thiz->startCount[i]) + i - thiz->segCount;
- if (unlikely (index >= thiz->glyphIdArrayLength))
+ unsigned int index = rangeOffset / 2 + (codepoint - this->startCount[i]) + i - this->segCount;
+ if (unlikely (index >= this->glyphIdArrayLength))
return false;
- gid = thiz->glyphIdArray[index];
+ gid = this->glyphIdArray[index];
if (unlikely (!gid))
return false;
- gid += thiz->idDelta[i];
+ gid += this->idDelta[i];
}
-
- *glyph = gid & 0xFFFFu;
+ gid &= 0xFFFFu;
+ if (!gid)
+ return false;
+ *glyph = gid;
return true;
}
-
- static inline void get_all_codepoints_func (const void *obj, hb_set_t *out)
+ static inline bool get_glyph_func (const void *obj, hb_codepoint_t codepoint, hb_codepoint_t *glyph)
{
- const accelerator_t *thiz = (const accelerator_t *) obj;
- for (unsigned int i = 0; i < thiz->segCount; i++)
+ return ((const accelerator_t *) obj)->get_glyph (codepoint, glyph);
+ }
+ inline void collect_unicodes (hb_set_t *out) const
+ {
+ unsigned int count = this->segCount;
+ if (count && this->startCount[count - 1] == 0xFFFFu)
+ count--; /* Skip sentinel segment. */
+ for (unsigned int i = 0; i < count; i++)
{
- if (thiz->startCount[i] != 0xFFFFu
- || thiz->endCount[i] != 0xFFFFu) // Skip the last segment (0xFFFF)
- hb_set_add_range (out, thiz->startCount[i], thiz->endCount[i]);
+ unsigned int rangeOffset = this->idRangeOffset[i];
+ if (rangeOffset == 0)
+ out->add_range (this->startCount[i], this->endCount[i]);
+ else
+ {
+ for (hb_codepoint_t codepoint = this->startCount[i];
+ codepoint <= this->endCount[i];
+ codepoint++)
+ {
+ unsigned int index = rangeOffset / 2 + (codepoint - this->startCount[i]) + i - this->segCount;
+ if (unlikely (index >= this->glyphIdArrayLength))
+ break;
+ hb_codepoint_t gid = this->glyphIdArray[index];
+ if (unlikely (!gid))
+ continue;
+ out->add (codepoint);
+ }
+ }
}
}
@@ -305,10 +327,14 @@ struct CmapSubtableFormat4
inline bool get_glyph (hb_codepoint_t codepoint, hb_codepoint_t *glyph) const
{
- accelerator_t accel;
- accel.init (this);
+ hb_auto_t<accelerator_t> accel (this);
return accel.get_glyph_func (&accel, codepoint, glyph);
}
+ inline void collect_unicodes (hb_set_t *out) const
+ {
+ hb_auto_t<accelerator_t> accel (this);
+ accel.collect_unicodes (out);
+ }
inline bool sanitize (hb_sanitize_context_t *c) const
{
@@ -383,7 +409,7 @@ struct CmapSubtableLongGroup
HBUINT32 startCharCode; /* First character code in this group. */
HBUINT32 endCharCode; /* Last character code in this group. */
HBUINT32 glyphID; /* Glyph index; interpretation depends on
- * subtable format. */
+ * subtable format. */
public:
DEFINE_SIZE_STATIC (12);
};
@@ -400,6 +426,14 @@ struct CmapSubtableTrimmed
*glyph = gid;
return true;
}
+ inline void collect_unicodes (hb_set_t *out) const
+ {
+ hb_codepoint_t start = startCharCode;
+ unsigned int count = glyphIdArray.len;
+ for (unsigned int i = 0; i < count; i++)
+ if (glyphIdArray[i])
+ out->add (start + i);
+ }
inline bool sanitize (hb_sanitize_context_t *c) const
{
@@ -432,18 +466,19 @@ struct CmapSubtableLongSegmented
int i = groups.bsearch (codepoint);
if (i == -1)
return false;
- *glyph = T::group_get_glyph (groups[i], codepoint);
+ hb_codepoint_t gid = T::group_get_glyph (groups[i], codepoint);
+ if (!gid)
+ return false;
+ *glyph = gid;
return true;
}
- inline void get_all_codepoints (hb_set_t *out) const
+ inline void collect_unicodes (hb_set_t *out) const
{
for (unsigned int i = 0; i < this->groups.len; i++) {
- hb_set_add_range (out,
- MIN ((unsigned int) this->groups[i].startCharCode,
- (unsigned int) HB_MAX_UNICODE_CODEPOINT_VALUE),
- MIN ((unsigned int) this->groups[i].endCharCode,
- (unsigned int) HB_MAX_UNICODE_CODEPOINT_VALUE));
+ out->add_range (this->groups[i].startCharCode,
+ MIN ((hb_codepoint_t) this->groups[i].endCharCode,
+ (hb_codepoint_t) HB_UNICODE_MAX));
}
}
@@ -574,13 +609,29 @@ struct UnicodeValueRange
}
HBUINT24 startUnicodeValue; /* First value in this range. */
- HBUINT8 additionalCount; /* Number of additional values in this
+ HBUINT8 additionalCount; /* Number of additional values in this
* range. */
public:
DEFINE_SIZE_STATIC (4);
};
-typedef SortedArrayOf<UnicodeValueRange, HBUINT32> DefaultUVS;
+struct DefaultUVS : SortedArrayOf<UnicodeValueRange, HBUINT32>
+{
+ inline void collect_unicodes (hb_set_t *out) const
+ {
+ unsigned int count = len;
+ for (unsigned int i = 0; i < count; i++)
+ {
+ hb_codepoint_t first = arrayZ[i].startUnicodeValue;
+ hb_codepoint_t last = MIN ((hb_codepoint_t) (first + arrayZ[i].additionalCount),
+ (hb_codepoint_t) HB_UNICODE_MAX);
+ out->add_range (first, last);
+ }
+ }
+
+ public:
+ DEFINE_SIZE_ARRAY (4, arrayZ);
+};
struct UVSMapping
{
@@ -601,7 +652,18 @@ struct UVSMapping
DEFINE_SIZE_STATIC (5);
};
-typedef SortedArrayOf<UVSMapping, HBUINT32> NonDefaultUVS;
+struct NonDefaultUVS : SortedArrayOf<UVSMapping, HBUINT32>
+{
+ inline void collect_unicodes (hb_set_t *out) const
+ {
+ unsigned int count = len;
+ for (unsigned int i = 0; i < count; i++)
+ out->add (arrayZ[i].glyphID);
+ }
+
+ public:
+ DEFINE_SIZE_ARRAY (4, arrayZ);
+};
struct VariationSelectorRecord
{
@@ -616,7 +678,7 @@ struct VariationSelectorRecord
return GLYPH_VARIANT_USE_DEFAULT;
const NonDefaultUVS &nonDefaults = base+nonDefaultUVS;
i = nonDefaults.bsearch (codepoint);
- if (i != -1)
+ if (i != -1 && nonDefaults[i].glyphID)
{
*glyph = nonDefaults[i].glyphID;
return GLYPH_VARIANT_FOUND;
@@ -624,6 +686,12 @@ struct VariationSelectorRecord
return GLYPH_VARIANT_NOT_FOUND;
}
+ inline void collect_unicodes (hb_set_t *out, const void *base) const
+ {
+ (base+defaultUVS).collect_unicodes (out);
+ (base+nonDefaultUVS).collect_unicodes (out);
+ }
+
inline int cmp (const hb_codepoint_t &variation_selector) const
{
return varSelector.cmp (variation_selector);
@@ -652,7 +720,19 @@ struct CmapSubtableFormat14
hb_codepoint_t variation_selector,
hb_codepoint_t *glyph) const
{
- return record[record.bsearch(variation_selector)].get_glyph (codepoint, glyph, this);
+ return record[record.bsearch (variation_selector)].get_glyph (codepoint, glyph, this);
+ }
+
+ inline void collect_variation_selectors (hb_set_t *out) const
+ {
+ unsigned int count = record.len;
+ for (unsigned int i = 0; i < count; i++)
+ out->add (record.arrayZ[i].varSelector);
+ }
+ inline void collect_variation_unicodes (hb_codepoint_t variation_selector,
+ hb_set_t *out) const
+ {
+ record[record.bsearch (variation_selector)].collect_unicodes (out, this);
}
inline bool sanitize (hb_sanitize_context_t *c) const
@@ -690,6 +770,19 @@ struct CmapSubtable
default: return false;
}
}
+ inline void collect_unicodes (hb_set_t *out) const
+ {
+ switch (u.format) {
+ case 0: u.format0 .collect_unicodes (out); return;
+ case 4: u.format4 .collect_unicodes (out); return;
+ case 6: u.format6 .collect_unicodes (out); return;
+ case 10: u.format10.collect_unicodes (out); return;
+ case 12: u.format12.collect_unicodes (out); return;
+ case 13: u.format13.collect_unicodes (out); return;
+ case 14:
+ default: return;
+ }
+ }
inline bool sanitize (hb_sanitize_context_t *c) const
{
@@ -754,7 +847,8 @@ struct cmap
{
static const hb_tag_t tableTag = HB_OT_TAG_cmap;
- struct subset_plan {
+ struct subset_plan
+ {
subset_plan(void)
{
format4_segments.init();
@@ -895,33 +989,44 @@ struct cmap
return result;
}
+ const CmapSubtable *find_best_subtable (bool *symbol = nullptr) const
+ {
+ if (symbol) *symbol = false;
+
+ const CmapSubtable *subtable;
+
+ /* 32-bit subtables. */
+ if ((subtable = this->find_subtable (3, 10))) return subtable;
+ if ((subtable = this->find_subtable (0, 6))) return subtable;
+ if ((subtable = this->find_subtable (0, 4))) return subtable;
+
+ /* 16-bit subtables. */
+ if ((subtable = this->find_subtable (3, 1))) return subtable;
+ if ((subtable = this->find_subtable (0, 3))) return subtable;
+ if ((subtable = this->find_subtable (0, 2))) return subtable;
+ if ((subtable = this->find_subtable (0, 1))) return subtable;
+ if ((subtable = this->find_subtable (0, 0))) return subtable;
+
+ /* Symbol subtable. */
+ if ((subtable = this->find_subtable (3, 0)))
+ {
+ if (symbol) *symbol = true;
+ return subtable;
+ }
+
+ /* Meh. */
+ return &Null(CmapSubtable);
+ }
+
struct accelerator_t
{
inline void init (hb_face_t *face)
{
this->blob = hb_sanitize_context_t().reference_table<cmap> (face);
const cmap *table = this->blob->as<cmap> ();
- const CmapSubtable *subtable = nullptr;
const CmapSubtableFormat14 *subtable_uvs = nullptr;
-
- bool symbol = false;
- /* 32-bit subtables. */
- if (!subtable) subtable = table->find_subtable (3, 10);
- if (!subtable) subtable = table->find_subtable (0, 6);
- if (!subtable) subtable = table->find_subtable (0, 4);
- /* 16-bit subtables. */
- if (!subtable) subtable = table->find_subtable (3, 1);
- if (!subtable) subtable = table->find_subtable (0, 3);
- if (!subtable) subtable = table->find_subtable (0, 2);
- if (!subtable) subtable = table->find_subtable (0, 1);
- if (!subtable) subtable = table->find_subtable (0, 0);
- if (!subtable)
- {
- subtable = table->find_subtable (3, 0);
- if (subtable) symbol = true;
- }
- /* Meh. */
- if (!subtable) subtable = &Null(CmapSubtable);
+ bool symbol;
+ subtable = table->find_best_subtable (&symbol);
/* UVS subtable. */
if (!subtable_uvs)
@@ -933,30 +1038,26 @@ struct cmap
/* Meh. */
if (!subtable_uvs) subtable_uvs = &Null(CmapSubtableFormat14);
- this->uvs_table = subtable_uvs;
+ this->subtable_uvs = subtable_uvs;
this->get_glyph_data = subtable;
if (unlikely (symbol))
{
this->get_glyph_func = get_glyph_from_symbol<CmapSubtable>;
- this->get_all_codepoints_func = null_get_all_codepoints_func;
} else {
switch (subtable->u.format) {
/* Accelerate format 4 and format 12. */
default:
this->get_glyph_func = get_glyph_from<CmapSubtable>;
- this->get_all_codepoints_func = null_get_all_codepoints_func;
break;
case 12:
this->get_glyph_func = get_glyph_from<CmapSubtableFormat12>;
- this->get_all_codepoints_func = get_all_codepoints_from<CmapSubtableFormat12>;
break;
case 4:
{
this->format4_accel.init (&subtable->u.format4);
this->get_glyph_data = &this->format4_accel;
this->get_glyph_func = this->format4_accel.get_glyph_func;
- this->get_all_codepoints_func = this->format4_accel.get_all_codepoints_func;
}
break;
}
@@ -978,9 +1079,9 @@ struct cmap
hb_codepoint_t variation_selector,
hb_codepoint_t *glyph) const
{
- switch (this->uvs_table->get_glyph_variant (unicode,
- variation_selector,
- glyph))
+ switch (this->subtable_uvs->get_glyph_variant (unicode,
+ variation_selector,
+ glyph))
{
case GLYPH_VARIANT_NOT_FOUND: return false;
case GLYPH_VARIANT_FOUND: return true;
@@ -990,22 +1091,24 @@ struct cmap
return get_nominal_glyph (unicode, glyph);
}
- inline void get_all_codepoints (hb_set_t *out) const
+ inline void collect_unicodes (hb_set_t *out) const
+ {
+ subtable->collect_unicodes (out);
+ }
+ inline void collect_variation_selectors (hb_set_t *out) const
+ {
+ subtable_uvs->collect_variation_selectors (out);
+ }
+ inline void collect_variation_unicodes (hb_codepoint_t variation_selector,
+ hb_set_t *out) const
{
- this->get_all_codepoints_func (get_glyph_data, out);
+ subtable_uvs->collect_variation_unicodes (variation_selector, out);
}
protected:
typedef bool (*hb_cmap_get_glyph_func_t) (const void *obj,
hb_codepoint_t codepoint,
hb_codepoint_t *glyph);
- typedef void (*hb_cmap_get_all_codepoints_func_t) (const void *obj,
- hb_set_t *out);
-
- static inline void null_get_all_codepoints_func (const void *obj, hb_set_t *out)
- {
- // NOOP
- }
template <typename Type>
static inline bool get_glyph_from (const void *obj,
@@ -1017,14 +1120,6 @@ struct cmap
}
template <typename Type>
- static inline void get_all_codepoints_from (const void *obj,
- hb_set_t *out)
- {
- const Type *typed_obj = (const Type *) obj;
- typed_obj->get_all_codepoints (out);
- }
-
- template <typename Type>
static inline bool get_glyph_from_symbol (const void *obj,
hb_codepoint_t codepoint,
hb_codepoint_t *glyph)
@@ -1047,13 +1142,14 @@ struct cmap
}
private:
+ const CmapSubtable *subtable;
+ const CmapSubtableFormat14 *subtable_uvs;
+
hb_cmap_get_glyph_func_t get_glyph_func;
const void *get_glyph_data;
- hb_cmap_get_all_codepoints_func_t get_all_codepoints_func;
CmapSubtableFormat4::accelerator_t format4_accel;
- const CmapSubtableFormat14 *uvs_table;
hb_blob_t *blob;
};
@@ -1066,10 +1162,7 @@ struct cmap
key.platformID.set (platform_id);
key.encodingID.set (encoding_id);
- /* Note: We can use bsearch, but since it has no performance
- * implications, we use lsearch and as such accept fonts with
- * unsorted subtable list. */
- int result = encodingRecord./*bsearch*/lsearch (key);
+ int result = encodingRecord.bsearch (key);
if (result == -1 || !encodingRecord[result].subtable)
return nullptr;
@@ -1084,6 +1177,7 @@ struct cmap
DEFINE_SIZE_ARRAY (4, encodingRecord);
};
+struct cmap_accelerator_t : cmap::accelerator_t {};
} /* namespace OT */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-cbdt-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-cbdt-table.hh
index 21c2f477366..8bedf2224a0 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-cbdt-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-cbdt-table.hh
@@ -27,7 +27,7 @@
#ifndef HB_OT_COLOR_CBDT_TABLE_HH
#define HB_OT_COLOR_CBDT_TABLE_HH
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
/*
* CBLC -- Color Bitmap Location
@@ -533,6 +533,8 @@ struct CBDT
DEFINE_SIZE_ARRAY(4, dataZ);
};
+struct CBDT_accelerator_t : CBDT::accelerator_t {};
+
} /* namespace OT */
#endif /* HB_OT_COLOR_CBDT_TABLE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh
index ce6702d2ad3..070226f18e2 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh
@@ -25,7 +25,7 @@
#ifndef HB_OT_COLOR_COLR_TABLE_HH
#define HB_OT_COLOR_COLR_TABLE_HH
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
/*
* COLR -- Color
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-cpal-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-cpal-table.hh
index 2c312748d3b..2c9fced093e 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-cpal-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-cpal-table.hh
@@ -28,7 +28,7 @@
#ifndef HB_OT_COLOR_CPAL_TABLE_HH
#define HB_OT_COLOR_CPAL_TABLE_HH
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
/*
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-sbix-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-sbix-table.hh
index 0461afa3298..1b643c77a59 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-sbix-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-sbix-table.hh
@@ -25,7 +25,7 @@
#ifndef HB_OT_COLOR_SBIX_TABLE_HH
#define HB_OT_COLOR_SBIX_TABLE_HH
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
/*
* sbix -- Standard Bitmap Graphics
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-svg-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-svg-table.hh
index 3976694f844..ad9162f7c7d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-svg-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-svg-table.hh
@@ -25,7 +25,7 @@
#ifndef HB_OT_COLOR_SVG_TABLE_HH
#define HB_OT_COLOR_SVG_TABLE_HH
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
/*
* SVG -- SVG (Scalable Vector Graphics)
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color.cc
index 86171c63353..7cdff380ef2 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color.cc
@@ -25,7 +25,7 @@
* Google Author(s): Sascha Brawer
*/
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
#include "hb-ot-color-colr-table.hh"
#include "hb-ot-color-cpal-table.hh"
#include "hb-ot.h"
@@ -33,8 +33,8 @@
#include <stdlib.h>
#include <string.h>
-#include "hb-ot-layout-private.hh"
-#include "hb-shaper-private.hh"
+#include "hb-ot-layout.hh"
+#include "hb-shaper.hh"
#if 0
HB_MARK_AS_FLAG_T (hb_ot_color_palette_flags_t)
@@ -45,16 +45,14 @@ static inline const OT::COLR&
_get_colr (hb_face_t *face)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::COLR);
- hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
- return *(layout->colr.get ());
+ return *(hb_ot_face_data (face)->colr.get ());
}
static inline const OT::CPAL&
_get_cpal (hb_face_t *face)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::CPAL);
- hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
- return *(layout->cpal.get ());
+ return *(hb_ot_face_data (face)->cpal.get ());
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-face.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-face.cc
new file mode 100644
index 00000000000..388a5972058
--- /dev/null
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-face.cc
@@ -0,0 +1,76 @@
+/*
+ * Copyright © 2018 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-ot-face.hh"
+
+#include "hb-ot-cmap-table.hh"
+#include "hb-ot-glyf-table.hh"
+#include "hb-ot-hmtx-table.hh"
+#include "hb-ot-kern-table.hh"
+#include "hb-ot-post-table.hh"
+#include "hb-ot-color-cbdt-table.hh"
+#include "hb-ot-layout-gdef-table.hh"
+#include "hb-ot-layout-gsub-table.hh"
+#include "hb-ot-layout-gpos-table.hh"
+
+
+void hb_ot_face_data_t::init0 (hb_face_t *face)
+{
+ this->face = face;
+#define HB_OT_LAYOUT_TABLE(Namespace, Type) Type.init0 ();
+#define HB_OT_LAYOUT_ACCELERATOR(Namespace, Type) HB_OT_LAYOUT_TABLE (Namespace, Type)
+ HB_OT_LAYOUT_TABLES
+#undef HB_OT_LAYOUT_ACCELERATOR
+#undef HB_OT_LAYOUT_TABLE
+}
+void hb_ot_face_data_t::fini (void)
+{
+#define HB_OT_LAYOUT_TABLE(Namespace, Type) Type.fini ();
+#define HB_OT_LAYOUT_ACCELERATOR(Namespace, Type) HB_OT_LAYOUT_TABLE (Namespace, Type)
+ HB_OT_LAYOUT_TABLES
+#undef HB_OT_LAYOUT_ACCELERATOR
+#undef HB_OT_LAYOUT_TABLE
+}
+
+hb_ot_face_data_t *
+_hb_ot_face_data_create (hb_face_t *face)
+{
+ hb_ot_face_data_t *data = (hb_ot_face_data_t *) calloc (1, sizeof (hb_ot_face_data_t));
+ if (unlikely (!data))
+ return nullptr;
+
+ data->init0 (face);
+
+ return data;
+}
+
+void
+_hb_ot_face_data_destroy (hb_ot_face_data_t *data)
+{
+ data->fini ();
+ free (data);
+}
+
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-face.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-face.hh
new file mode 100644
index 00000000000..5ac3538e44d
--- /dev/null
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-face.hh
@@ -0,0 +1,116 @@
+/*
+ * Copyright © 2007,2008,2009 Red Hat, Inc.
+ * Copyright © 2012,2013 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OT_FACE_HH
+#define HB_OT_FACE_HH
+
+#include "hb.hh"
+
+#include "hb-machinery.hh"
+
+
+#define hb_ot_face_data(face) ((hb_ot_face_data_t *) face->shaper_data.ot.get_relaxed ())
+
+
+/*
+ * hb_ot_face_data_t
+ */
+
+/* Most of these tables are NOT needed for shaping. But we need to hook them *somewhere*.
+ * This is as good as any place. */
+#define HB_OT_LAYOUT_TABLES \
+ /* OpenType shaping. */ \
+ HB_OT_LAYOUT_TABLE(OT, JSTF) \
+ HB_OT_LAYOUT_TABLE(OT, BASE) \
+ /* AAT shaping. */ \
+ HB_OT_LAYOUT_TABLE(AAT, morx) \
+ HB_OT_LAYOUT_TABLE(AAT, kerx) \
+ HB_OT_LAYOUT_TABLE(AAT, ankr) \
+ HB_OT_LAYOUT_TABLE(AAT, trak) \
+ /* OpenType variations. */ \
+ HB_OT_LAYOUT_TABLE(OT, fvar) \
+ HB_OT_LAYOUT_TABLE(OT, avar) \
+ HB_OT_LAYOUT_TABLE(OT, MVAR) \
+ /* OpenType math. */ \
+ HB_OT_LAYOUT_TABLE(OT, MATH) \
+ /* OpenType fundamentals. */ \
+ HB_OT_LAYOUT_ACCELERATOR(OT, GDEF) \
+ HB_OT_LAYOUT_ACCELERATOR(OT, GSUB) \
+ HB_OT_LAYOUT_ACCELERATOR(OT, GPOS) \
+ HB_OT_LAYOUT_ACCELERATOR(OT, cmap) \
+ HB_OT_LAYOUT_ACCELERATOR(OT, hmtx) \
+ HB_OT_LAYOUT_ACCELERATOR(OT, vmtx) \
+ HB_OT_LAYOUT_ACCELERATOR(OT, post) \
+ HB_OT_LAYOUT_ACCELERATOR(OT, kern) \
+ HB_OT_LAYOUT_ACCELERATOR(OT, glyf) \
+ HB_OT_LAYOUT_ACCELERATOR(OT, CBDT) \
+ /* */
+
+/* Declare tables. */
+#define HB_OT_LAYOUT_TABLE(Namespace, Type) namespace Namespace { struct Type; }
+#define HB_OT_LAYOUT_ACCELERATOR(Namespace, Type) HB_OT_LAYOUT_TABLE (Namespace, Type##_accelerator_t)
+HB_OT_LAYOUT_TABLES
+#undef HB_OT_LAYOUT_ACCELERATOR
+#undef HB_OT_LAYOUT_TABLE
+
+struct hb_ot_face_data_t
+{
+ HB_INTERNAL void init0 (hb_face_t *face);
+ HB_INTERNAL void fini (void);
+
+#define HB_OT_LAYOUT_TABLE_ORDER(Namespace, Type) \
+ HB_PASTE (ORDER_, HB_PASTE (Namespace, HB_PASTE (_, Type)))
+ enum order_t
+ {
+ ORDER_ZERO,
+#define HB_OT_LAYOUT_TABLE(Namespace, Type) HB_OT_LAYOUT_TABLE_ORDER (Namespace, Type),
+#define HB_OT_LAYOUT_ACCELERATOR(Namespace, Type) HB_OT_LAYOUT_TABLE (Namespace, Type)
+ HB_OT_LAYOUT_TABLES
+#undef HB_OT_LAYOUT_ACCELERATOR
+#undef HB_OT_LAYOUT_TABLE
+ };
+
+ hb_face_t *face; /* MUST be JUST before the lazy loaders. */
+#define HB_OT_LAYOUT_TABLE(Namespace, Type) \
+ hb_table_lazy_loader_t<Namespace::Type, HB_OT_LAYOUT_TABLE_ORDER (Namespace, Type)> Type;
+#define HB_OT_LAYOUT_ACCELERATOR(Namespace, Type) \
+ hb_face_lazy_loader_t<Namespace::Type##_accelerator_t, HB_OT_LAYOUT_TABLE_ORDER (Namespace, Type)> Type;
+ HB_OT_LAYOUT_TABLES
+#undef HB_OT_LAYOUT_ACCELERATOR
+#undef HB_OT_LAYOUT_TABLE
+};
+
+
+HB_INTERNAL hb_ot_face_data_t *
+_hb_ot_face_data_create (hb_face_t *face);
+
+HB_INTERNAL void
+_hb_ot_face_data_destroy (hb_ot_face_data_t *data);
+
+
+#endif /* HB_OT_FACE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc
index 9da8fc7d497..a4c5584fbd9 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc
@@ -24,84 +24,22 @@
* Google Author(s): Behdad Esfahbod, Roozbeh Pournader
*/
-#include "hb-private.hh"
+#include "hb.hh"
#include "hb-ot.h"
-#include "hb-font-private.hh"
-#include "hb-machinery-private.hh"
+#include "hb-font.hh"
+#include "hb-machinery.hh"
+#include "hb-ot-face.hh"
#include "hb-ot-cmap-table.hh"
-#include "hb-ot-glyf-table.hh"
#include "hb-ot-hmtx-table.hh"
#include "hb-ot-kern-table.hh"
#include "hb-ot-post-table.hh"
-
+#include "hb-ot-glyf-table.hh"
#include "hb-ot-color-cbdt-table.hh"
-struct hb_ot_font_t
-{
- inline void init (hb_face_t *face)
- {
- cmap.init (face);
- h_metrics.init (face);
- v_metrics.init (face, h_metrics.ascender - h_metrics.descender); /* TODO Can we do this lazily? */
-
- this->face = face;
- glyf.init ();
- cbdt.init ();
- post.init ();
- kern.init ();
- }
- inline void fini (void)
- {
- cmap.fini ();
- h_metrics.fini ();
- v_metrics.fini ();
-
- glyf.fini ();
- cbdt.fini ();
- post.fini ();
- kern.fini ();
- }
-
- OT::cmap::accelerator_t cmap;
- OT::hmtx::accelerator_t h_metrics;
- OT::vmtx::accelerator_t v_metrics;
-
- hb_face_t *face; /* MUST be JUST before the lazy loaders. */
- hb_face_lazy_loader_t<1, OT::glyf::accelerator_t> glyf;
- hb_face_lazy_loader_t<2, OT::CBDT::accelerator_t> cbdt;
- hb_face_lazy_loader_t<3, OT::post::accelerator_t> post;
- hb_face_lazy_loader_t<4, OT::kern::accelerator_t> kern;
-};
-
-
-static hb_ot_font_t *
-_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));
-
- if (unlikely (!ot_font))
- return nullptr;
-
- ot_font->init (face);
-
- return ot_font;
-}
-
-static void
-_hb_ot_font_destroy (void *data)
-{
- hb_ot_font_t *ot_font = (hb_ot_font_t *) data;
-
- ot_font->fini ();
-
- free (ot_font);
-}
-
-
static hb_bool_t
hb_ot_get_nominal_glyph (hb_font_t *font HB_UNUSED,
void *font_data,
@@ -110,8 +48,8 @@ hb_ot_get_nominal_glyph (hb_font_t *font HB_UNUSED,
void *user_data HB_UNUSED)
{
- const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data;
- return ot_font->cmap.get_nominal_glyph (unicode, glyph);
+ const hb_ot_face_data_t *ot_font = (const hb_ot_face_data_t *) font_data;
+ return ot_font->cmap.get_relaxed()->get_nominal_glyph (unicode, glyph);
}
static hb_bool_t
@@ -122,8 +60,8 @@ hb_ot_get_variation_glyph (hb_font_t *font HB_UNUSED,
hb_codepoint_t *glyph,
void *user_data HB_UNUSED)
{
- const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data;
- return ot_font->cmap.get_variation_glyph (unicode, variation_selector, glyph);
+ const hb_ot_face_data_t *ot_font = (const hb_ot_face_data_t *) font_data;
+ return ot_font->cmap.get_relaxed ()->get_variation_glyph (unicode, variation_selector, glyph);
}
static hb_position_t
@@ -132,8 +70,8 @@ hb_ot_get_glyph_h_advance (hb_font_t *font,
hb_codepoint_t glyph,
void *user_data HB_UNUSED)
{
- const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data;
- return font->em_scale_x (ot_font->h_metrics.get_advance (glyph, font));
+ const hb_ot_face_data_t *ot_font = (const hb_ot_face_data_t *) font_data;
+ return font->em_scale_x (ot_font->hmtx.get_relaxed ()->get_advance (glyph, font));
}
static hb_position_t
@@ -142,8 +80,8 @@ hb_ot_get_glyph_v_advance (hb_font_t *font,
hb_codepoint_t glyph,
void *user_data HB_UNUSED)
{
- const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data;
- return font->em_scale_y (-(int) ot_font->v_metrics.get_advance (glyph, font));
+ const hb_ot_face_data_t *ot_font = (const hb_ot_face_data_t *) font_data;
+ return font->em_scale_y (-(int) ot_font->vmtx.get_relaxed ()->get_advance (glyph, font));
}
static hb_position_t
@@ -153,7 +91,7 @@ hb_ot_get_glyph_h_kerning (hb_font_t *font,
hb_codepoint_t right_glyph,
void *user_data HB_UNUSED)
{
- const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data;
+ const hb_ot_face_data_t *ot_font = (const hb_ot_face_data_t *) font_data;
return font->em_scale_x (ot_font->kern->get_h_kerning (left_glyph, right_glyph));
}
@@ -164,10 +102,10 @@ hb_ot_get_glyph_extents (hb_font_t *font,
hb_glyph_extents_t *extents,
void *user_data HB_UNUSED)
{
- const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data;
+ const hb_ot_face_data_t *ot_font = (const hb_ot_face_data_t *) font_data;
bool ret = ot_font->glyf->get_extents (glyph, extents);
if (!ret)
- ret = ot_font->cbdt->get_extents (glyph, extents);
+ ret = ot_font->CBDT->get_extents (glyph, extents);
// TODO Hook up side-bearings variations.
extents->x_bearing = font->em_scale_x (extents->x_bearing);
extents->y_bearing = font->em_scale_y (extents->y_bearing);
@@ -183,7 +121,7 @@ hb_ot_get_glyph_name (hb_font_t *font HB_UNUSED,
char *name, unsigned int size,
void *user_data HB_UNUSED)
{
- const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data;
+ const hb_ot_face_data_t *ot_font = (const hb_ot_face_data_t *) font_data;
return ot_font->post->get_glyph_name (glyph, name, size);
}
@@ -194,7 +132,7 @@ hb_ot_get_glyph_from_name (hb_font_t *font HB_UNUSED,
hb_codepoint_t *glyph,
void *user_data HB_UNUSED)
{
- const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data;
+ const hb_ot_face_data_t *ot_font = (const hb_ot_face_data_t *) font_data;
return ot_font->post->get_glyph_from_name (name, len, glyph);
}
@@ -204,12 +142,12 @@ hb_ot_get_font_h_extents (hb_font_t *font,
hb_font_extents_t *metrics,
void *user_data HB_UNUSED)
{
- const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data;
- metrics->ascender = font->em_scale_y (ot_font->h_metrics.ascender);
- metrics->descender = font->em_scale_y (ot_font->h_metrics.descender);
- metrics->line_gap = font->em_scale_y (ot_font->h_metrics.line_gap);
+ const hb_ot_face_data_t *ot_font = (const hb_ot_face_data_t *) font_data;
+ metrics->ascender = font->em_scale_y (ot_font->hmtx.get_relaxed ()->ascender);
+ metrics->descender = font->em_scale_y (ot_font->hmtx.get_relaxed ()->descender);
+ metrics->line_gap = font->em_scale_y (ot_font->hmtx.get_relaxed ()->line_gap);
// TODO Hook up variations.
- return ot_font->h_metrics.has_font_extents;
+ return ot_font->hmtx.get_relaxed ()->has_font_extents;
}
static hb_bool_t
@@ -218,16 +156,17 @@ hb_ot_get_font_v_extents (hb_font_t *font,
hb_font_extents_t *metrics,
void *user_data HB_UNUSED)
{
- const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data;
- metrics->ascender = font->em_scale_x (ot_font->v_metrics.ascender);
- metrics->descender = font->em_scale_x (ot_font->v_metrics.descender);
- metrics->line_gap = font->em_scale_x (ot_font->v_metrics.line_gap);
+ const hb_ot_face_data_t *ot_font = (const hb_ot_face_data_t *) font_data;
+ metrics->ascender = font->em_scale_x (ot_font->vmtx.get_relaxed ()->ascender);
+ metrics->descender = font->em_scale_x (ot_font->vmtx.get_relaxed ()->descender);
+ metrics->line_gap = font->em_scale_x (ot_font->vmtx.get_relaxed ()->line_gap);
// TODO Hook up variations.
- return ot_font->v_metrics.has_font_extents;
+ return ot_font->vmtx.get_relaxed ()->has_font_extents;
}
-
+#ifdef HB_USE_ATEXIT
static void free_static_ot_funcs (void);
+#endif
static struct hb_ot_font_funcs_lazy_loader_t : hb_font_funcs_lazy_loader_t<hb_ot_font_funcs_lazy_loader_t>
{
@@ -283,12 +222,16 @@ _hb_ot_get_font_funcs (void)
void
hb_ot_font_set_funcs (hb_font_t *font)
{
- hb_ot_font_t *ot_font = _hb_ot_font_create (font->face);
- if (unlikely (!ot_font))
- return;
+ if (unlikely (!hb_ot_shaper_face_data_ensure (font->face))) return;
+ hb_ot_face_data_t *ot_font = hb_ot_face_data (font->face);
+
+ /* Load them lazies. We access them with get_relaxed() for performance. */
+ ot_font->cmap.get ();
+ ot_font->hmtx.get ();
+ ot_font->vmtx.get ();
hb_font_set_funcs (font,
_hb_ot_get_font_funcs (),
ot_font,
- _hb_ot_font_destroy);
+ nullptr);
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-glyf-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-glyf-table.hh
index bcf89e46247..7c20983603f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-glyf-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-glyf-table.hh
@@ -27,11 +27,9 @@
#ifndef HB_OT_GLYF_TABLE_HH
#define HB_OT_GLYF_TABLE_HH
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
#include "hb-ot-head-table.hh"
#include "hb-subset-glyf.hh"
-#include "hb-subset-plan.hh"
-#include "hb-subset-private.hh"
namespace OT {
@@ -490,6 +488,8 @@ struct glyf
DEFINE_SIZE_ARRAY (0, dataZ);
};
+struct glyf_accelerator_t : glyf::accelerator_t {};
+
} /* namespace OT */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hdmx-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hdmx-table.hh
index 0951871ce97..87dd6d01822 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hdmx-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hdmx-table.hh
@@ -27,8 +27,7 @@
#ifndef HB_OT_HDMX_TABLE_HH
#define HB_OT_HDMX_TABLE_HH
-#include "hb-open-type-private.hh"
-#include "hb-subset-plan.hh"
+#include "hb-open-type.hh"
/*
* hdmx -- Horizontal Device Metrics
@@ -89,8 +88,13 @@ struct DeviceRecord
{
TRACE_SERIALIZE (this);
- if (unlikely (!c->allocate_size<DeviceRecord> (get_size (subset_view.len()))))
+ unsigned int size = get_size (subset_view.len());
+ if (unlikely (!c->allocate_size<DeviceRecord> (size)))
+ {
+ DEBUG_MSG (SUBSET, nullptr, "Couldn't allocate enough space for DeviceRecord: %d.",
+ size);
return_trace (false);
+ }
this->pixel_size.set (subset_view.source_device_record->pixel_size);
this->max_width.set (subset_view.source_device_record->max_width);
@@ -161,14 +165,14 @@ struct hdmx
return_trace (true);
}
- static inline size_t get_subsetted_size (hb_subset_plan_t *plan)
+ static inline size_t get_subsetted_size (const hdmx *source_hdmx, hb_subset_plan_t *plan)
{
- return min_size + DeviceRecord::get_size (plan->glyphs.len);
+ return min_size + source_hdmx->num_records * DeviceRecord::get_size (plan->glyphs.len);
}
inline bool subset (hb_subset_plan_t *plan) const
{
- size_t dest_size = get_subsetted_size (plan);
+ size_t dest_size = get_subsetted_size (this, plan);
hdmx *dest = (hdmx *) malloc (dest_size);
if (unlikely (!dest))
{
@@ -178,8 +182,10 @@ struct hdmx
hb_serialize_context_t c (dest, dest_size);
hdmx *hdmx_prime = c.start_serialize<hdmx> ();
- if (!hdmx_prime || !hdmx_prime->serialize (&c, this, plan)) {
+ if (!hdmx_prime || !hdmx_prime->serialize (&c, this, plan))
+ {
free (dest);
+ DEBUG_MSG(SUBSET, nullptr, "Failed to serialize write new hdmx.");
return false;
}
c.end_serialize ();
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-head-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-head-table.hh
index fded120be28..602e365ce5d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-head-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-head-table.hh
@@ -29,7 +29,7 @@
#ifndef HB_OT_HEAD_TABLE_HH
#define HB_OT_HEAD_TABLE_HH
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
/*
* head -- Font Header
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hhea-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hhea-table.hh
index efb42b61616..3336cadd472 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hhea-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hhea-table.hh
@@ -27,7 +27,7 @@
#ifndef HB_OT_HHEA_TABLE_HH
#define HB_OT_HHEA_TABLE_HH
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
/*
* hhea -- Horizontal Header
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hmtx-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hmtx-table.hh
index 13fa9d6e092..3e4b3bdef5c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hmtx-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hmtx-table.hh
@@ -27,11 +27,10 @@
#ifndef HB_OT_HMTX_TABLE_HH
#define HB_OT_HMTX_TABLE_HH
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
#include "hb-ot-hhea-table.hh"
#include "hb-ot-os2-table.hh"
#include "hb-ot-var-hvar-table.hh"
-#include "hb-subset-plan.hh"
/*
* hmtx -- Horizontal Metrics
@@ -332,6 +331,9 @@ struct vmtx : hmtxvmtx<vmtx, vhea> {
static const hb_tag_t os2Tag = HB_TAG_NONE;
};
+struct hmtx_accelerator_t : hmtx::accelerator_t {};
+struct vmtx_accelerator_t : vmtx::accelerator_t {};
+
} /* namespace OT */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-kern-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-kern-table.hh
index b4d81095282..40f94be296f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-kern-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-kern-table.hh
@@ -27,7 +27,7 @@
#ifndef HB_OT_KERN_TABLE_HH
#define HB_OT_KERN_TABLE_HH
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
/*
* kern -- Kerning
@@ -390,6 +390,8 @@ struct kern
DEFINE_SIZE_UNION (2, major);
};
+struct kern_accelerator_t : kern::accelerator_t {};
+
} /* namespace OT */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-base-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-base-table.hh
index 96da07fb5cd..449e74550e9 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-base-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-base-table.hh
@@ -28,8 +28,8 @@
#ifndef HB_OT_LAYOUT_BASE_TABLE_HH
#define HB_OT_LAYOUT_BASE_TABLE_HH
-#include "hb-open-type-private.hh"
-#include "hb-ot-layout-common-private.hh"
+#include "hb-open-type.hh"
+#include "hb-ot-layout-common.hh"
namespace OT {
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common.hh
index 89d5eae494f..dd65f338494 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common.hh
@@ -26,13 +26,13 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_OT_LAYOUT_COMMON_PRIVATE_HH
-#define HB_OT_LAYOUT_COMMON_PRIVATE_HH
+#ifndef HB_OT_LAYOUT_COMMON_HH
+#define HB_OT_LAYOUT_COMMON_HH
-#include "hb-private.hh"
-#include "hb-ot-layout-private.hh"
-#include "hb-open-type-private.hh"
-#include "hb-set-private.hh"
+#include "hb.hh"
+#include "hb-ot-layout.hh"
+#include "hb-open-type.hh"
+#include "hb-set.hh"
#ifndef HB_MAX_NESTING_LEVEL
@@ -97,15 +97,14 @@ struct Record
};
template <typename Type>
-struct RecordArrayOf : SortedArrayOf<Record<Type> > {
+struct RecordArrayOf : SortedArrayOf<Record<Type> >
+{
+ inline const OffsetTo<Type>& get_offset (unsigned int i) const
+ { return (*this)[i].offset; }
+ inline OffsetTo<Type>& get_offset (unsigned int i)
+ { return (*this)[i].offset; }
inline const Tag& get_tag (unsigned int i) const
- {
- /* We cheat slightly and don't define separate Null objects
- * for Record types. Instead, we return the correct Null(Tag)
- * here. */
- if (unlikely (i >= this->len)) return Null(Tag);
- return (*this)[i].tag;
- }
+ { return (*this)[i].tag; }
inline unsigned int get_tags (unsigned int start_offset,
unsigned int *record_count /* IN/OUT */,
hb_tag_t *record_tags /* OUT */) const
@@ -136,7 +135,18 @@ template <typename Type>
struct RecordListOf : RecordArrayOf<Type>
{
inline const Type& operator [] (unsigned int i) const
- { return this+RecordArrayOf<Type>::operator [](i).offset; }
+ { return this+this->get_offset (i); }
+
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ struct RecordListOf<Type> *out = c->serializer->embed (*this);
+ if (unlikely (!out)) return_trace (false);
+ unsigned int count = this->len;
+ for (unsigned int i = 0; i < count; i++)
+ out->get_offset (i).serialize_subset (c, (*this)[i], out);
+ return_trace (true);
+ }
inline bool sanitize (hb_sanitize_context_t *c) const
{
@@ -158,9 +168,8 @@ struct RangeRecord
return_trace (c->check_struct (this));
}
- inline bool intersects (const hb_set_t *glyphs) const {
- return glyphs->intersects (start, end);
- }
+ inline bool intersects (const hb_set_t *glyphs) const
+ { return glyphs->intersects (start, end); }
template <typename set_t>
inline bool add_coverage (set_t *glyphs) const {
@@ -224,6 +233,12 @@ struct LangSys
return reqFeatureIndex;;
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ return_trace (c->serializer->embed (*this));
+ }
+
inline bool sanitize (hb_sanitize_context_t *c,
const Record<LangSys>::sanitize_closure_t * = nullptr) const
{
@@ -238,7 +253,7 @@ struct LangSys
* = 0xFFFFu */
IndexArray featureIndex; /* Array of indices into the FeatureList */
public:
- DEFINE_SIZE_ARRAY (6, featureIndex);
+ DEFINE_SIZE_ARRAY_SIZED (6, featureIndex);
};
DECLARE_NULL_NAMESPACE_BYTES (OT, LangSys);
@@ -263,6 +278,18 @@ struct Script
inline bool has_default_lang_sys (void) const { return defaultLangSys != 0; }
inline const LangSys& get_default_lang_sys (void) const { return this+defaultLangSys; }
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ struct Script *out = c->serializer->embed (*this);
+ if (unlikely (!out)) return_trace (false);
+ out->defaultLangSys.serialize_subset (c, this+defaultLangSys, out);
+ unsigned int count = langSys.len;
+ for (unsigned int i = 0; i < count; i++)
+ out->langSys.arrayZ[i].offset.serialize_subset (c, this+langSys[i].offset, out);
+ return_trace (true);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c,
const Record<Script>::sanitize_closure_t * = nullptr) const
{
@@ -278,7 +305,7 @@ struct Script
langSys; /* Array of LangSysRecords--listed
* alphabetically by LangSysTag */
public:
- DEFINE_SIZE_ARRAY (4, langSys);
+ DEFINE_SIZE_ARRAY_SIZED (4, langSys);
};
typedef RecordListOf<Script> ScriptList;
@@ -516,6 +543,15 @@ struct Feature
inline const FeatureParams &get_feature_params (void) const
{ return this+featureParams; }
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ struct Feature *out = c->serializer->embed (*this);
+ if (unlikely (!out)) return_trace (false);
+ out->featureParams.set (0); /* TODO(subset) FeatureParams. */
+ return_trace (true);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c,
const Record<Feature>::sanitize_closure_t *closure = nullptr) const
{
@@ -567,7 +603,7 @@ struct Feature
* if not required */
IndexArray lookupIndex; /* Array of LookupList indices */
public:
- DEFINE_SIZE_ARRAY (4, lookupIndex);
+ DEFINE_SIZE_ARRAY_SIZED (4, lookupIndex);
};
typedef RecordListOf<Feature> FeatureList;
@@ -598,16 +634,16 @@ struct Lookup
{
inline unsigned int get_subtable_count (void) const { return subTable.len; }
- template <typename SubTableType>
- inline const SubTableType& get_subtable (unsigned int i) const
- { return this+CastR<OffsetArrayOf<SubTableType> > (subTable)[i]; }
+ template <typename TSubTable>
+ inline const TSubTable& get_subtable (unsigned int i) const
+ { return this+CastR<OffsetArrayOf<TSubTable> > (subTable)[i]; }
- template <typename SubTableType>
- inline const OffsetArrayOf<SubTableType>& get_subtables (void) const
- { return CastR<OffsetArrayOf<SubTableType> > (subTable); }
- template <typename SubTableType>
- inline OffsetArrayOf<SubTableType>& get_subtables (void)
- { return CastR<OffsetArrayOf<SubTableType> > (subTable); }
+ template <typename TSubTable>
+ inline const OffsetArrayOf<TSubTable>& get_subtables (void) const
+ { return CastR<OffsetArrayOf<TSubTable> > (subTable); }
+ template <typename TSubTable>
+ inline OffsetArrayOf<TSubTable>& get_subtables (void)
+ { return CastR<OffsetArrayOf<TSubTable> > (subTable); }
inline unsigned int get_size (void) const
{
@@ -633,14 +669,14 @@ struct Lookup
return flag;
}
- template <typename SubTableType, typename context_t>
+ template <typename TSubTable, typename context_t>
inline typename context_t::return_t dispatch (context_t *c) const
{
unsigned int lookup_type = get_type ();
TRACE_DISPATCH (this, lookup_type);
unsigned int count = get_subtable_count ();
for (unsigned int i = 0; i < count; i++) {
- typename context_t::return_t r = get_subtable<SubTableType> (i).dispatch (c, lookup_type);
+ typename context_t::return_t r = get_subtable<TSubTable> (i).dispatch (c, lookup_type);
if (c->stop_sublookup_iteration (r))
return_trace (r);
}
@@ -666,16 +702,72 @@ struct Lookup
return_trace (true);
}
+ /* Older compileres need this to NOT be locally defined in a function. */
+ template <typename TSubTable>
+ struct SubTableSubsetWrapper
+ {
+ inline SubTableSubsetWrapper (const TSubTable &subtable_,
+ unsigned int lookup_type_) :
+ subtable (subtable_),
+ lookup_type (lookup_type_) {}
+
+ inline bool subset (hb_subset_context_t *c) const
+ { return subtable.dispatch (c, lookup_type); }
+
+ private:
+ const TSubTable &subtable;
+ unsigned int lookup_type;
+ };
+
+ template <typename TSubTable>
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ struct Lookup *out = c->serializer->embed (*this);
+ if (unlikely (!out)) return_trace (false);
+
+ /* Subset the actual subtables. */
+ /* TODO Drop empty ones, either by calling intersects() beforehand,
+ * or just dropping null offsets after. */
+ const OffsetArrayOf<TSubTable>& subtables = get_subtables<TSubTable> ();
+ OffsetArrayOf<TSubTable>& out_subtables = out->get_subtables<TSubTable> ();
+ unsigned int count = subTable.len;
+ for (unsigned int i = 0; i < count; i++)
+ {
+ SubTableSubsetWrapper<TSubTable> wrapper (this+subtables[i], get_type ());
+
+ out_subtables[i].serialize_subset (c, wrapper, out);
+ }
+
+ return_trace (true);
+ }
+
+ template <typename TSubTable>
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
- /* Real sanitize of the subtables is done by GSUB/GPOS/... */
if (!(c->check_struct (this) && subTable.sanitize (c))) return_trace (false);
if (lookupFlag & LookupFlag::UseMarkFilteringSet)
{
const HBUINT16 &markFilteringSet = StructAfter<HBUINT16> (subTable);
if (!markFilteringSet.sanitize (c)) return_trace (false);
}
+
+ if (unlikely (!dispatch<TSubTable> (c))) return_trace (false);
+
+ if (unlikely (get_type () == TSubTable::Extension))
+ {
+ /* The spec says all subtables of an Extension lookup should
+ * have the same type, which shall not be the Extension type
+ * itself (but we already checked for that).
+ * This is specially important if one has a reverse type! */
+ unsigned int type = get_subtable<TSubTable> (0).u.extension.get_type ();
+ unsigned int count = get_subtable_count ();
+ for (unsigned int i = 1; i < count; i++)
+ if (get_subtable<TSubTable> (i).u.extension.get_type () != type)
+ return_trace (false);
+ }
+ return_trace (true);
return_trace (true);
}
@@ -730,9 +822,17 @@ struct CoverageFormat1
return_trace (glyphArray.sanitize (c));
}
- inline bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const {
- return glyphs->has (glyphArray[index]);
+ inline bool intersects (const hb_set_t *glyphs) const
+ {
+ /* TODO Speed up, using hb_set_next() and bsearch()? */
+ unsigned int count = glyphArray.len;
+ for (unsigned int i = 0; i < count; i++)
+ if (glyphs->has (glyphArray[i]))
+ return true;
+ return false;
}
+ inline bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const
+ { return glyphs->has (glyphArray[index]); }
template <typename set_t>
inline bool add_coverage (set_t *glyphs) const {
@@ -743,6 +843,7 @@ struct CoverageFormat1
/* Older compilers need this to be public. */
struct Iter {
inline void init (const struct CoverageFormat1 &c_) { c = &c_; i = 0; };
+ inline void fini (void) {};
inline bool more (void) { return i < c->glyphArray.len; }
inline void next (void) { i++; }
inline hb_codepoint_t get_glyph (void) { return c->glyphArray[i]; }
@@ -819,7 +920,17 @@ struct CoverageFormat2
return_trace (rangeRecord.sanitize (c));
}
- inline bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const {
+ inline bool intersects (const hb_set_t *glyphs) const
+ {
+ /* TODO Speed up, using hb_set_next() and bsearch()? */
+ unsigned int count = rangeRecord.len;
+ for (unsigned int i = 0; i < count; i++)
+ if (rangeRecord[i].intersects (glyphs))
+ return true;
+ return false;
+ }
+ inline bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const
+ {
unsigned int i;
unsigned int count = rangeRecord.len;
for (i = 0; i < count; i++) {
@@ -859,6 +970,7 @@ struct CoverageFormat2
i = c->rangeRecord.len;
}
}
+ inline void fini (void) {};
inline bool more (void) { return i < c->rangeRecord.len; }
inline void next (void)
{
@@ -924,7 +1036,8 @@ struct Coverage
if (glyphs[i - 1] + 1 != glyphs[i])
num_ranges++;
u.format.set (num_glyphs * 2 < num_ranges * 3 ? 1 : 2);
- switch (u.format) {
+ switch (u.format)
+ {
case 1: return_trace (u.format1.serialize (c, glyphs, num_glyphs));
case 2: return_trace (u.format2.serialize (c, glyphs, num_glyphs));
default:return_trace (false);
@@ -935,25 +1048,27 @@ struct Coverage
{
TRACE_SANITIZE (this);
if (!u.format.sanitize (c)) return_trace (false);
- switch (u.format) {
+ switch (u.format)
+ {
case 1: return_trace (u.format1.sanitize (c));
case 2: return_trace (u.format2.sanitize (c));
default:return_trace (true);
}
}
- inline bool intersects (const hb_set_t *glyphs) const {
- /* TODO speed this up */
- Coverage::Iter iter;
- for (iter.init (*this); iter.more (); iter.next ()) {
- if (glyphs->has (iter.get_glyph ()))
- return true;
+ inline bool intersects (const hb_set_t *glyphs) const
+ {
+ switch (u.format)
+ {
+ case 1: return u.format1.intersects (glyphs);
+ case 2: return u.format2.intersects (glyphs);
+ default:return false;
}
- return false;
}
-
- inline bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const {
- switch (u.format) {
+ inline bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const
+ {
+ switch (u.format)
+ {
case 1: return u.format1.intersects_coverage (glyphs, index);
case 2: return u.format2.intersects_coverage (glyphs, index);
default:return false;
@@ -963,47 +1078,61 @@ struct Coverage
/* Might return false if array looks unsorted.
* Used for faster rejection of corrupt data. */
template <typename set_t>
- inline bool add_coverage (set_t *glyphs) const {
- switch (u.format) {
+ inline bool add_coverage (set_t *glyphs) const
+ {
+ switch (u.format)
+ {
case 1: return u.format1.add_coverage (glyphs);
case 2: return u.format2.add_coverage (glyphs);
default:return false;
}
}
- struct Iter {
+ struct Iter
+ {
Iter (void) : format (0), u () {};
- inline void init (const Coverage &c_) {
+ inline void init (const Coverage &c_)
+ {
format = c_.u.format;
- switch (format) {
+ switch (format)
+ {
case 1: u.format1.init (c_.u.format1); return;
case 2: u.format2.init (c_.u.format2); return;
- default: return;
+ default: return;
}
}
- inline bool more (void) {
- switch (format) {
+ inline void fini (void) {}
+ inline bool more (void)
+ {
+ switch (format)
+ {
case 1: return u.format1.more ();
case 2: return u.format2.more ();
default:return false;
}
}
- inline void next (void) {
- switch (format) {
+ inline void next (void)
+ {
+ switch (format)
+ {
case 1: u.format1.next (); break;
case 2: u.format2.next (); break;
- default: break;
+ default: break;
}
}
- inline hb_codepoint_t get_glyph (void) {
- switch (format) {
+ inline hb_codepoint_t get_glyph (void)
+ {
+ switch (format)
+ {
case 1: return u.format1.get_glyph ();
case 2: return u.format2.get_glyph ();
default:return 0;
}
}
- inline unsigned int get_coverage (void) {
- switch (format) {
+ inline unsigned int get_coverage (void)
+ {
+ switch (format)
+ {
case 1: return u.format1.get_coverage ();
case 2: return u.format2.get_coverage ();
default:return -1;
@@ -1085,6 +1214,17 @@ struct ClassDefFormat1
return true;
}
+ inline bool intersects (const hb_set_t *glyphs) const
+ {
+ /* TODO Speed up, using hb_set_next()? */
+ hb_codepoint_t start = startGlyph;
+ hb_codepoint_t end = startGlyph + classValue.len;
+ for (hb_codepoint_t iter = startGlyph - 1;
+ hb_set_next (glyphs, &iter) && iter < end;)
+ if (classValue[iter - start])
+ return true;
+ return false;
+ }
inline bool intersects_class (const hb_set_t *glyphs, unsigned int klass) const {
unsigned int count = classValue.len;
if (klass == 0)
@@ -1135,7 +1275,8 @@ struct ClassDefFormat2
}
template <typename set_t>
- inline bool add_coverage (set_t *glyphs) const {
+ inline bool add_coverage (set_t *glyphs) const
+ {
unsigned int count = rangeRecord.len;
for (unsigned int i = 0; i < count; i++)
if (rangeRecord[i].value)
@@ -1145,7 +1286,8 @@ struct ClassDefFormat2
}
template <typename set_t>
- inline bool add_class (set_t *glyphs, unsigned int klass) const {
+ inline bool add_class (set_t *glyphs, unsigned int klass) const
+ {
unsigned int count = rangeRecord.len;
for (unsigned int i = 0; i < count; i++)
{
@@ -1156,7 +1298,17 @@ struct ClassDefFormat2
return true;
}
- inline bool intersects_class (const hb_set_t *glyphs, unsigned int klass) const {
+ inline bool intersects (const hb_set_t *glyphs) const
+ {
+ /* TODO Speed up, using hb_set_next() and bsearch()? */
+ unsigned int count = rangeRecord.len;
+ for (unsigned int i = 0; i < count; i++)
+ if (rangeRecord[i].intersects (glyphs))
+ return true;
+ return false;
+ }
+ inline bool intersects_class (const hb_set_t *glyphs, unsigned int klass) const
+ {
unsigned int count = rangeRecord.len;
if (klass == 0)
{
@@ -1233,6 +1385,13 @@ struct ClassDef
}
}
+ inline bool intersects (const hb_set_t *glyphs) const {
+ switch (u.format) {
+ case 1: return u.format1.intersects (glyphs);
+ case 2: return u.format2.intersects (glyphs);
+ default:return false;
+ }
+ }
inline bool intersects_class (const hb_set_t *glyphs, unsigned int klass) const {
switch (u.format) {
case 1: return u.format1.intersects_class (glyphs, klass);
@@ -1584,7 +1743,7 @@ struct FeatureVariationRecord
struct FeatureVariations
{
- static const unsigned int NOT_FOUND_INDEX = 0xFFFFFFFFu;
+ enum { NOT_FOUND_INDEX = 0xFFFFFFFFu };
inline bool find_index (const int *coords, unsigned int coord_len,
unsigned int *index) const
@@ -1610,6 +1769,12 @@ struct FeatureVariations
return (this+record.substitutions).find_substitute (feature_index);
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ return_trace (c->serializer->embed (*this));
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -1623,7 +1788,7 @@ struct FeatureVariations
LArrayOf<FeatureVariationRecord>
varRecords;
public:
- DEFINE_SIZE_ARRAY (8, varRecords);
+ DEFINE_SIZE_ARRAY_SIZED (8, varRecords);
};
@@ -1803,4 +1968,4 @@ struct Device
} /* namespace OT */
-#endif /* HB_OT_LAYOUT_COMMON_PRIVATE_HH */
+#endif /* HB_OT_LAYOUT_COMMON_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gdef-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gdef-table.hh
index d2b41a8ef50..cad99a3d62e 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gdef-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gdef-table.hh
@@ -29,9 +29,9 @@
#ifndef HB_OT_LAYOUT_GDEF_TABLE_HH
#define HB_OT_LAYOUT_GDEF_TABLE_HH
-#include "hb-ot-layout-common-private.hh"
+#include "hb-ot-layout-common.hh"
-#include "hb-font-private.hh"
+#include "hb-font.hh"
namespace OT {
@@ -337,6 +337,7 @@ struct MarkGlyphSets
* https://docs.microsoft.com/en-us/typography/opentype/spec/gdef
*/
+
struct GDEF
{
static const hb_tag_t tableTag = HB_OT_TAG_GDEF;
@@ -386,19 +387,6 @@ struct GDEF
inline const VariationStore &get_var_store (void) const
{ return version.to_int () >= 0x00010003u ? this+varStore : Null(VariationStore); }
- inline bool sanitize (hb_sanitize_context_t *c) const
- {
- TRACE_SANITIZE (this);
- return_trace (version.sanitize (c) &&
- likely (version.major == 1) &&
- glyphClassDef.sanitize (c, this) &&
- attachList.sanitize (c, this) &&
- ligCaretList.sanitize (c, this) &&
- markAttachClassDef.sanitize (c, this) &&
- (version.to_int () < 0x00010002u || markGlyphSetsDef.sanitize (c, this)) &&
- (version.to_int () < 0x00010003u || varStore.sanitize (c, this)));
- }
-
/* glyph_props is a 16-bit integer where the lower 8-bit have bits representing
* glyph class and other bits, and high 8-bit gthe mark attachment type (if any).
* Not to be confused with lookup_props which is very similar. */
@@ -420,6 +408,38 @@ struct GDEF
}
}
+ struct accelerator_t
+ {
+ HB_INTERNAL inline void init (hb_face_t *face);
+
+ inline void fini (void)
+ {
+ hb_blob_destroy (this->blob);
+ }
+
+ hb_blob_t *blob;
+ const GDEF *table;
+ };
+
+ inline unsigned int get_size (void) const
+ {
+ return min_size +
+ (version.to_int () >= 0x00010002u ? markGlyphSetsDef.static_size : 0) +
+ (version.to_int () >= 0x00010003u ? varStore.static_size : 0);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (version.sanitize (c) &&
+ likely (version.major == 1) &&
+ glyphClassDef.sanitize (c, this) &&
+ attachList.sanitize (c, this) &&
+ ligCaretList.sanitize (c, this) &&
+ markAttachClassDef.sanitize (c, this) &&
+ (version.to_int () < 0x00010002u || markGlyphSetsDef.sanitize (c, this)) &&
+ (version.to_int () < 0x00010003u || varStore.sanitize (c, this)));
+ }
protected:
FixedVersion<>version; /* Version of the GDEF table--currently
@@ -454,6 +474,7 @@ struct GDEF
DEFINE_SIZE_MIN (12);
};
+struct GDEF_accelerator_t : GDEF::accelerator_t {};
} /* namespace OT */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh
index fe34a328b27..5847306d6e4 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh
@@ -29,7 +29,7 @@
#ifndef HB_OT_LAYOUT_GPOS_TABLE_HH
#define HB_OT_LAYOUT_GPOS_TABLE_HH
-#include "hb-ot-layout-gsubgpos-private.hh"
+#include "hb-ot-layout-gsubgpos.hh"
namespace OT {
@@ -459,6 +459,9 @@ struct MarkArray : ArrayOf<MarkRecord> /* Array of MarkRecords--in Coverage orde
struct SinglePosFormat1
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ { return (this+coverage).intersects (glyphs); }
+
inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
{
TRACE_COLLECT_GLYPHS (this);
@@ -466,9 +469,7 @@ struct SinglePosFormat1
}
inline const Coverage &get_coverage (void) const
- {
- return this+coverage;
- }
+ { return this+coverage; }
inline bool apply (hb_ot_apply_context_t *c) const
{
@@ -483,6 +484,13 @@ struct SinglePosFormat1
return_trace (true);
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ // TODO(subset)
+ return_trace (false);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -507,6 +515,9 @@ struct SinglePosFormat1
struct SinglePosFormat2
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ { return (this+coverage).intersects (glyphs); }
+
inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
{
TRACE_COLLECT_GLYPHS (this);
@@ -514,9 +525,7 @@ struct SinglePosFormat2
}
inline const Coverage &get_coverage (void) const
- {
- return this+coverage;
- }
+ { return this+coverage; }
inline bool apply (hb_ot_apply_context_t *c) const
{
@@ -535,6 +544,13 @@ struct SinglePosFormat2
return_trace (true);
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ // TODO(subset)
+ return_trace (false);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -598,6 +614,24 @@ struct PairSet
{
friend struct PairPosFormat1;
+ inline bool intersects (const hb_set_t *glyphs,
+ const ValueFormat *valueFormats) const
+ {
+ unsigned int len1 = valueFormats[0].get_len ();
+ unsigned int len2 = valueFormats[1].get_len ();
+ unsigned int record_size = HBUINT16::static_size * (1 + len1 + len2);
+
+ const PairValueRecord *record = CastP<PairValueRecord> (arrayZ);
+ unsigned int count = len;
+ for (unsigned int i = 0; i < count; i++)
+ {
+ if (glyphs->has (record->secondGlyph))
+ return true;
+ record = &StructAtOffset<const PairValueRecord> (record, record_size);
+ }
+ return false;
+ }
+
inline void collect_glyphs (hb_collect_glyphs_context_t *c,
const ValueFormat *valueFormats) const
{
@@ -652,7 +686,8 @@ struct PairSet
return_trace (false);
}
- struct sanitize_closure_t {
+ struct sanitize_closure_t
+ {
const void *base;
const ValueFormat *valueFormats;
unsigned int len1; /* valueFormats[0].get_len() */
@@ -681,6 +716,20 @@ struct PairSet
struct PairPosFormat1
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ {
+ unsigned int count = pairSet.len;
+ for (hb_auto_t<Coverage::Iter> iter (this+coverage); iter.more (); iter.next ())
+ {
+ if (unlikely (iter.get_coverage () >= count))
+ break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
+ if (glyphs->has (iter.get_glyph ()) &&
+ (this+pairSet[iter.get_coverage ()]).intersects (glyphs, valueFormat))
+ return true;
+ }
+ return false;
+ }
+
inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
{
TRACE_COLLECT_GLYPHS (this);
@@ -691,9 +740,7 @@ struct PairPosFormat1
}
inline const Coverage &get_coverage (void) const
- {
- return this+coverage;
- }
+ { return this+coverage; }
inline bool apply (hb_ot_apply_context_t *c) const
{
@@ -709,6 +756,13 @@ struct PairPosFormat1
return_trace ((this+pairSet[index]).apply (c, valueFormat, skippy_iter.idx));
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ // TODO(subset)
+ return_trace (false);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -717,7 +771,8 @@ struct PairPosFormat1
unsigned int len1 = valueFormat[0].get_len ();
unsigned int len2 = valueFormat[1].get_len ();
- PairSet::sanitize_closure_t closure = {
+ PairSet::sanitize_closure_t closure =
+ {
this,
valueFormat,
len1,
@@ -747,6 +802,12 @@ struct PairPosFormat1
struct PairPosFormat2
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ {
+ return (this+coverage).intersects (glyphs) &&
+ (this+classDef2).intersects (glyphs);
+ }
+
inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
{
TRACE_COLLECT_GLYPHS (this);
@@ -755,9 +816,7 @@ struct PairPosFormat2
}
inline const Coverage &get_coverage (void) const
- {
- return this+coverage;
- }
+ { return this+coverage; }
inline bool apply (hb_ot_apply_context_t *c) const
{
@@ -790,6 +849,13 @@ struct PairPosFormat2
return_trace (true);
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ // TODO(subset)
+ return_trace (false);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -889,6 +955,9 @@ reverse_cursive_minor_offset (hb_glyph_position_t *pos, unsigned int i, hb_direc
struct CursivePosFormat1
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ { return (this+coverage).intersects (glyphs); }
+
inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
{
TRACE_COLLECT_GLYPHS (this);
@@ -896,9 +965,7 @@ struct CursivePosFormat1
}
inline const Coverage &get_coverage (void) const
- {
- return this+coverage;
- }
+ { return this+coverage; }
inline bool apply (hb_ot_apply_context_t *c) const
{
@@ -1001,6 +1068,13 @@ struct CursivePosFormat1
return_trace (true);
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ // TODO(subset)
+ return_trace (false);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -1047,6 +1121,10 @@ typedef AnchorMatrix BaseArray; /* base-major--
struct MarkBasePosFormat1
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ { return (this+markCoverage).intersects (glyphs) &&
+ (this+baseCoverage).intersects (glyphs); }
+
inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
{
TRACE_COLLECT_GLYPHS (this);
@@ -1055,9 +1133,7 @@ struct MarkBasePosFormat1
}
inline const Coverage &get_coverage (void) const
- {
- return this+markCoverage;
- }
+ { return this+markCoverage; }
inline bool apply (hb_ot_apply_context_t *c) const
{
@@ -1099,6 +1175,13 @@ struct MarkBasePosFormat1
return_trace ((this+markArray).apply (c, mark_index, base_index, this+baseArray, classCount, skippy_iter.idx));
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ // TODO(subset)
+ return_trace (false);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -1161,6 +1244,10 @@ typedef OffsetListOf<LigatureAttach> LigatureArray;
struct MarkLigPosFormat1
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ { return (this+markCoverage).intersects (glyphs) &&
+ (this+ligatureCoverage).intersects (glyphs); }
+
inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
{
TRACE_COLLECT_GLYPHS (this);
@@ -1169,9 +1256,7 @@ struct MarkLigPosFormat1
}
inline const Coverage &get_coverage (void) const
- {
- return this+markCoverage;
- }
+ { return this+markCoverage; }
inline bool apply (hb_ot_apply_context_t *c) const
{
@@ -1216,6 +1301,13 @@ struct MarkLigPosFormat1
return_trace ((this+markArray).apply (c, mark_index, comp_index, lig_attach, classCount, j));
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ // TODO(subset)
+ return_trace (false);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -1274,6 +1366,10 @@ typedef AnchorMatrix Mark2Array; /* mark2-major--
struct MarkMarkPosFormat1
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ { return (this+mark1Coverage).intersects (glyphs) &&
+ (this+mark2Coverage).intersects (glyphs); }
+
inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
{
TRACE_COLLECT_GLYPHS (this);
@@ -1282,9 +1378,7 @@ struct MarkMarkPosFormat1
}
inline const Coverage &get_coverage (void) const
- {
- return this+mark1Coverage;
- }
+ { return this+mark1Coverage; }
inline bool apply (hb_ot_apply_context_t *c) const
{
@@ -1330,6 +1424,13 @@ struct MarkMarkPosFormat1
return_trace ((this+mark1Array).apply (c, mark1_index, mark2_index, this+mark2Array, classCount, j));
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ // TODO(subset)
+ return_trace (false);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -1388,7 +1489,7 @@ struct ChainContextPos : ChainContext {};
struct ExtensionPos : Extension<ExtensionPos>
{
- typedef struct PosLookupSubTable LookupSubTable;
+ typedef struct PosLookupSubTable SubTable;
};
@@ -1400,6 +1501,7 @@ struct ExtensionPos : Extension<ExtensionPos>
struct PosLookupSubTable
{
+ friend struct Lookup;
friend struct PosLookup;
enum Type {
@@ -1453,8 +1555,10 @@ struct PosLookupSubTable
struct PosLookup : Lookup
{
- inline const PosLookupSubTable& get_subtable (unsigned int i) const
- { return Lookup::get_subtable<PosLookupSubTable> (i); }
+ typedef struct PosLookupSubTable SubTable;
+
+ inline const SubTable& get_subtable (unsigned int i) const
+ { return Lookup::get_subtable<SubTable> (i); }
inline bool is_reverse (void) const
{
@@ -1467,6 +1571,12 @@ struct PosLookup : Lookup
return_trace (dispatch (c));
}
+ inline bool intersects (const hb_set_t *glyphs) const
+ {
+ hb_intersects_context_t c (glyphs);
+ return dispatch (&c);
+ }
+
inline hb_collect_glyphs_context_t::return_t collect_glyphs (hb_collect_glyphs_context_t *c) const
{
TRACE_COLLECT_GLYPHS (this);
@@ -1487,18 +1597,15 @@ struct PosLookup : Lookup
template <typename context_t>
inline typename context_t::return_t dispatch (context_t *c) const
- { return Lookup::dispatch<PosLookupSubTable> (c); }
+ { return Lookup::dispatch<SubTable> (c); }
+
+ inline bool subset (hb_subset_context_t *c) const
+ { return Lookup::subset<SubTable> (c); }
inline bool sanitize (hb_sanitize_context_t *c) const
- {
- TRACE_SANITIZE (this);
- if (unlikely (!Lookup::sanitize (c))) return_trace (false);
- return_trace (dispatch (c));
- }
+ { return Lookup::sanitize<SubTable> (c); }
};
-typedef OffsetListOf<PosLookup> PosLookupList;
-
/*
* GPOS -- Glyph Positioning
* https://docs.microsoft.com/en-us/typography/opentype/spec/gpos
@@ -1515,13 +1622,13 @@ struct GPOS : GSUBGPOS
static inline void position_finish_advances (hb_font_t *font, hb_buffer_t *buffer);
static inline void position_finish_offsets (hb_font_t *font, hb_buffer_t *buffer);
+ inline bool subset (hb_subset_context_t *c) const
+ { return GSUBGPOS::subset<PosLookup> (c); }
+
inline bool sanitize (hb_sanitize_context_t *c) const
- {
- TRACE_SANITIZE (this);
- if (unlikely (!GSUBGPOS::sanitize (c))) return_trace (false);
- const OffsetTo<PosLookupList> &list = CastR<OffsetTo<PosLookupList> > (lookupList);
- return_trace (list.sanitize (c, this));
- }
+ { return GSUBGPOS::sanitize<PosLookup> (c); }
+
+ typedef GSUBGPOS::accelerator_t<GPOS> accelerator_t;
};
@@ -1628,15 +1735,13 @@ GPOS::position_finish_offsets (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer)
template <typename context_t>
/*static*/ inline typename context_t::return_t PosLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index)
{
- const GPOS &gpos = *(hb_ot_layout_from_face (c->face)->table.GPOS);
- const PosLookup &l = gpos.get_lookup (lookup_index);
+ const PosLookup &l = _get_gpos_relaxed (c->face)->get_lookup (lookup_index);
return l.dispatch (c);
}
/*static*/ inline bool PosLookup::apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index)
{
- const GPOS &gpos = *(hb_ot_layout_from_face (c->face)->table.GPOS);
- const PosLookup &l = gpos.get_lookup (lookup_index);
+ const PosLookup &l = _get_gpos_relaxed (c->face).get_lookup (lookup_index);
unsigned int saved_lookup_props = c->lookup_props;
unsigned int saved_lookup_index = c->lookup_index;
c->set_lookup_index (lookup_index);
@@ -1647,6 +1752,8 @@ template <typename context_t>
return ret;
}
+struct GPOS_accelerator_t : GPOS::accelerator_t {};
+
#undef attach_chain
#undef attach_type
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh
index 1d5a02a021d..76a0ea6d329 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh
@@ -29,19 +29,26 @@
#ifndef HB_OT_LAYOUT_GSUB_TABLE_HH
#define HB_OT_LAYOUT_GSUB_TABLE_HH
-#include "hb-ot-layout-gsubgpos-private.hh"
+#include "hb-ot-layout-gsubgpos.hh"
namespace OT {
+static inline void SingleSubst_serialize (hb_serialize_context_t *c,
+ Supplier<GlyphID> &glyphs,
+ Supplier<GlyphID> &substitutes,
+ unsigned int num_glyphs);
+
struct SingleSubstFormat1
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ { return (this+coverage).intersects (glyphs); }
+
inline void closure (hb_closure_context_t *c) const
{
TRACE_CLOSURE (this);
- Coverage::Iter iter;
- for (iter.init (this+coverage); iter.more (); iter.next ())
+ for (hb_auto_t<Coverage::Iter> iter (this+coverage); iter.more (); iter.next ())
{
/* TODO Switch to range-based API to work around malicious fonts.
* https://github.com/harfbuzz/harfbuzz/issues/363 */
@@ -55,8 +62,7 @@ struct SingleSubstFormat1
{
TRACE_COLLECT_GLYPHS (this);
if (unlikely (!(this+coverage).add_coverage (c->input))) return;
- Coverage::Iter iter;
- for (iter.init (this+coverage); iter.more (); iter.next ())
+ for (hb_auto_t<Coverage::Iter> iter (this+coverage); iter.more (); iter.next ())
{
/* TODO Switch to range-based API to work around malicious fonts.
* https://github.com/harfbuzz/harfbuzz/issues/363 */
@@ -66,9 +72,7 @@ struct SingleSubstFormat1
}
inline const Coverage &get_coverage (void) const
- {
- return this+coverage;
- }
+ { return this+coverage; }
inline bool would_apply (hb_would_apply_context_t *c) const
{
@@ -103,6 +107,30 @@ struct SingleSubstFormat1
return_trace (true);
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ hb_auto_t<hb_vector_t<GlyphID> > from;
+ hb_auto_t<hb_vector_t<GlyphID> > to;
+ hb_codepoint_t delta = deltaGlyphID;
+ for (hb_auto_t<Coverage::Iter> iter (this+coverage); iter.more (); iter.next ())
+ {
+ if (!c->plan->glyphset->has (iter.get_glyph ()))
+ continue;
+ from.push ()->set (iter.get_glyph ());
+ to.push ()->set ((iter.get_glyph () + delta) & 0xFFFF);
+ }
+ c->serializer->err (from.in_error () || to.in_error ());
+
+ Supplier<GlyphID> from_supplier (&from);
+ Supplier<GlyphID> to_supplier (&to);
+ SingleSubst_serialize (c->serializer,
+ from_supplier,
+ to_supplier,
+ from.len);
+ return_trace (from.len);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -122,12 +150,14 @@ struct SingleSubstFormat1
struct SingleSubstFormat2
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ { return (this+coverage).intersects (glyphs); }
+
inline void closure (hb_closure_context_t *c) const
{
TRACE_CLOSURE (this);
- Coverage::Iter iter;
unsigned int count = substitute.len;
- for (iter.init (this+coverage); iter.more (); iter.next ())
+ for (hb_auto_t<Coverage::Iter> iter (this+coverage); iter.more (); iter.next ())
{
if (unlikely (iter.get_coverage () >= count))
break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
@@ -140,9 +170,8 @@ struct SingleSubstFormat2
{
TRACE_COLLECT_GLYPHS (this);
if (unlikely (!(this+coverage).add_coverage (c->input))) return;
- Coverage::Iter iter;
unsigned int count = substitute.len;
- for (iter.init (this+coverage); iter.more (); iter.next ())
+ for (hb_auto_t<Coverage::Iter> iter (this+coverage); iter.more (); iter.next ())
{
if (unlikely (iter.get_coverage () >= count))
break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
@@ -151,9 +180,7 @@ struct SingleSubstFormat2
}
inline const Coverage &get_coverage (void) const
- {
- return this+coverage;
- }
+ { return this+coverage; }
inline bool would_apply (hb_would_apply_context_t *c) const
{
@@ -164,14 +191,12 @@ struct SingleSubstFormat2
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
- hb_codepoint_t glyph_id = c->buffer->cur().codepoint;
- unsigned int index = (this+coverage).get_coverage (glyph_id);
+ unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
if (likely (index == NOT_COVERED)) return_trace (false);
if (unlikely (index >= substitute.len)) return_trace (false);
- glyph_id = substitute[index];
- c->replace_glyph (glyph_id);
+ c->replace_glyph (substitute[index]);
return_trace (true);
}
@@ -188,6 +213,29 @@ struct SingleSubstFormat2
return_trace (true);
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ hb_auto_t<hb_vector_t<GlyphID> > from;
+ hb_auto_t<hb_vector_t<GlyphID> > to;
+ for (hb_auto_t<Coverage::Iter> iter (this+coverage); iter.more (); iter.next ())
+ {
+ if (!c->plan->glyphset->has (iter.get_glyph ()))
+ continue;
+ from.push ()->set (iter.get_glyph ());
+ to.push ()->set (substitute[iter.get_coverage ()]);
+ }
+ c->serializer->err (from.in_error () || to.in_error ());
+
+ Supplier<GlyphID> from_supplier (&from);
+ Supplier<GlyphID> to_supplier (&to);
+ SingleSubst_serialize (c->serializer,
+ from_supplier,
+ to_supplier,
+ from.len);
+ return_trace (from.len);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -255,6 +303,17 @@ struct SingleSubst
} u;
};
+static inline void
+SingleSubst_serialize (hb_serialize_context_t *c,
+ Supplier<GlyphID> &glyphs,
+ Supplier<GlyphID> &substitutes,
+ unsigned int num_glyphs)
+{
+ c->start_embed<SingleSubst> ()->serialize (c,
+ glyphs,
+ substitutes,
+ num_glyphs);
+}
struct Sequence
{
@@ -329,12 +388,14 @@ struct Sequence
struct MultipleSubstFormat1
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ { return (this+coverage).intersects (glyphs); }
+
inline void closure (hb_closure_context_t *c) const
{
TRACE_CLOSURE (this);
- Coverage::Iter iter;
unsigned int count = sequence.len;
- for (iter.init (this+coverage); iter.more (); iter.next ())
+ for (hb_auto_t<Coverage::Iter> iter (this+coverage); iter.more (); iter.next ())
{
if (unlikely (iter.get_coverage () >= count))
break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
@@ -349,13 +410,11 @@ struct MultipleSubstFormat1
if (unlikely (!(this+coverage).add_coverage (c->input))) return;
unsigned int count = sequence.len;
for (unsigned int i = 0; i < count; i++)
- (this+sequence[i]).collect_glyphs (c);
+ (this+sequence[i]).collect_glyphs (c);
}
inline const Coverage &get_coverage (void) const
- {
- return this+coverage;
- }
+ { return this+coverage; }
inline bool would_apply (hb_would_apply_context_t *c) const
{
@@ -391,6 +450,13 @@ struct MultipleSubstFormat1
return_trace (true);
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ // TODO(subset)
+ return_trace (false);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -445,27 +511,82 @@ struct MultipleSubst
} u;
};
+struct AlternateSet
+{
+ inline void closure (hb_closure_context_t *c) const
+ {
+ TRACE_CLOSURE (this);
+ unsigned int count = alternates.len;
+ for (unsigned int i = 0; i < count; i++)
+ c->out->add (alternates[i]);
+ }
+
+ inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
+ {
+ TRACE_COLLECT_GLYPHS (this);
+ c->output->add_array (alternates.arrayZ, alternates.len);
+ }
+
+ inline bool apply (hb_ot_apply_context_t *c) const
+ {
+ TRACE_APPLY (this);
+ unsigned int count = alternates.len;
+
+ if (unlikely (!count)) return_trace (false);
+
+ hb_mask_t glyph_mask = c->buffer->cur().mask;
+ hb_mask_t lookup_mask = c->lookup_mask;
+
+ /* Note: This breaks badly if two features enabled this lookup together. */
+ unsigned int shift = hb_ctz (lookup_mask);
+ unsigned int alt_index = ((lookup_mask & glyph_mask) >> shift);
+
+ if (unlikely (alt_index > count || alt_index == 0)) return_trace (false);
+
+ c->replace_glyph (alternates[alt_index - 1]);
+
+ return_trace (true);
+ }
+
+ inline bool serialize (hb_serialize_context_t *c,
+ Supplier<GlyphID> &glyphs,
+ unsigned int num_glyphs)
+ {
+ TRACE_SERIALIZE (this);
+ if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!alternates.serialize (c, glyphs, num_glyphs))) return_trace (false);
+ return_trace (true);
+ }
-typedef ArrayOf<GlyphID> AlternateSet; /* Array of alternate GlyphIDs--in
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (alternates.sanitize (c));
+ }
+
+ protected:
+ ArrayOf<GlyphID>
+ alternates; /* Array of alternate GlyphIDs--in
* arbitrary order */
+ public:
+ DEFINE_SIZE_ARRAY (2, alternates);
+};
struct AlternateSubstFormat1
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ { return (this+coverage).intersects (glyphs); }
+
inline void closure (hb_closure_context_t *c) const
{
TRACE_CLOSURE (this);
- Coverage::Iter iter;
unsigned int count = alternateSet.len;
- for (iter.init (this+coverage); iter.more (); iter.next ())
+ for (hb_auto_t<Coverage::Iter> iter (this+coverage); iter.more (); iter.next ())
{
if (unlikely (iter.get_coverage () >= count))
break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
- if (c->glyphs->has (iter.get_glyph ())) {
- const AlternateSet &alt_set = this+alternateSet[iter.get_coverage ()];
- unsigned int count = alt_set.len;
- for (unsigned int i = 0; i < count; i++)
- c->out->add (alt_set[i]);
- }
+ if (c->glyphs->has (iter.get_glyph ()))
+ (this+alternateSet[iter.get_coverage ()]).closure (c);
}
}
@@ -473,21 +594,17 @@ struct AlternateSubstFormat1
{
TRACE_COLLECT_GLYPHS (this);
if (unlikely (!(this+coverage).add_coverage (c->input))) return;
- Coverage::Iter iter;
unsigned int count = alternateSet.len;
- for (iter.init (this+coverage); iter.more (); iter.next ())
+ for (hb_auto_t<Coverage::Iter> iter (this+coverage); iter.more (); iter.next ())
{
if (unlikely (iter.get_coverage () >= count))
break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
- const AlternateSet &alt_set = this+alternateSet[iter.get_coverage ()];
- c->output->add_array (alt_set.arrayZ, alt_set.len);
+ (this+alternateSet[iter.get_coverage ()]).collect_glyphs (c);
}
}
inline const Coverage &get_coverage (void) const
- {
- return this+coverage;
- }
+ { return this+coverage; }
inline bool would_apply (hb_would_apply_context_t *c) const
{
@@ -498,29 +615,11 @@ struct AlternateSubstFormat1
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
- hb_codepoint_t glyph_id = c->buffer->cur().codepoint;
- unsigned int index = (this+coverage).get_coverage (glyph_id);
+ unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
if (likely (index == NOT_COVERED)) return_trace (false);
- const AlternateSet &alt_set = this+alternateSet[index];
-
- if (unlikely (!alt_set.len)) return_trace (false);
-
- hb_mask_t glyph_mask = c->buffer->cur().mask;
- hb_mask_t lookup_mask = c->lookup_mask;
-
- /* Note: This breaks badly if two features enabled this lookup together. */
- unsigned int shift = hb_ctz (lookup_mask);
- unsigned int alt_index = ((lookup_mask & glyph_mask) >> shift);
-
- if (unlikely (alt_index > alt_set.len || alt_index == 0)) return_trace (false);
-
- glyph_id = alt_set[alt_index - 1];
-
- c->replace_glyph (glyph_id);
-
- return_trace (true);
+ return_trace ((this+alternateSet[index]).apply (c));
}
inline bool serialize (hb_serialize_context_t *c,
@@ -541,6 +640,13 @@ struct AlternateSubstFormat1
return_trace (true);
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ // TODO(subset)
+ return_trace (false);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -598,6 +704,15 @@ struct AlternateSubst
struct Ligature
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ {
+ unsigned int count = component.len;
+ for (unsigned int i = 1; i < count; i++)
+ if (!glyphs->has (component[i]))
+ return false;
+ return true;
+ }
+
inline void closure (hb_closure_context_t *c) const
{
TRACE_CLOSURE (this);
@@ -701,6 +816,15 @@ struct Ligature
struct LigatureSet
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ {
+ unsigned int num_ligs = ligature.len;
+ for (unsigned int i = 0; i < num_ligs; i++)
+ if ((this+ligature[i]).intersects (glyphs))
+ return true;
+ return false;
+ }
+
inline void closure (hb_closure_context_t *c) const
{
TRACE_CLOSURE (this);
@@ -778,12 +902,25 @@ struct LigatureSet
struct LigatureSubstFormat1
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ {
+ unsigned int count = ligatureSet.len;
+ for (hb_auto_t<Coverage::Iter> iter (this+coverage); iter.more (); iter.next ())
+ {
+ if (unlikely (iter.get_coverage () >= count))
+ break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
+ if (glyphs->has (iter.get_glyph ()) &&
+ (this+ligatureSet[iter.get_coverage ()]).intersects (glyphs))
+ return true;
+ }
+ return false;
+ }
+
inline void closure (hb_closure_context_t *c) const
{
TRACE_CLOSURE (this);
- Coverage::Iter iter;
unsigned int count = ligatureSet.len;
- for (iter.init (this+coverage); iter.more (); iter.next ())
+ for (hb_auto_t<Coverage::Iter> iter (this+coverage); iter.more (); iter.next ())
{
if (unlikely (iter.get_coverage () >= count))
break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
@@ -796,9 +933,8 @@ struct LigatureSubstFormat1
{
TRACE_COLLECT_GLYPHS (this);
if (unlikely (!(this+coverage).add_coverage (c->input))) return;
- Coverage::Iter iter;
unsigned int count = ligatureSet.len;
- for (iter.init (this+coverage); iter.more (); iter.next ())
+ for (hb_auto_t<Coverage::Iter> iter (this+coverage); iter.more (); iter.next ())
{
if (unlikely (iter.get_coverage () >= count))
break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
@@ -807,9 +943,7 @@ struct LigatureSubstFormat1
}
inline const Coverage &get_coverage (void) const
- {
- return this+coverage;
- }
+ { return this+coverage; }
inline bool would_apply (hb_would_apply_context_t *c) const
{
@@ -824,9 +958,8 @@ struct LigatureSubstFormat1
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
- hb_codepoint_t glyph_id = c->buffer->cur().codepoint;
- unsigned int index = (this+coverage).get_coverage (glyph_id);
+ unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
if (likely (index == NOT_COVERED)) return_trace (false);
const LigatureSet &lig_set = this+ligatureSet[index];
@@ -855,6 +988,13 @@ struct LigatureSubstFormat1
return_trace (true);
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ // TODO(subset)
+ return_trace (false);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -924,7 +1064,7 @@ struct ChainContextSubst : ChainContext {};
struct ExtensionSubst : Extension<ExtensionSubst>
{
- typedef struct SubstLookupSubTable LookupSubTable;
+ typedef struct SubstLookupSubTable SubTable;
inline bool is_reverse (void) const;
};
@@ -932,6 +1072,28 @@ struct ExtensionSubst : Extension<ExtensionSubst>
struct ReverseChainSingleSubstFormat1
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ {
+ if (!(this+coverage).intersects (glyphs))
+ return false;
+
+ const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
+
+ unsigned int count;
+
+ count = backtrack.len;
+ for (unsigned int i = 0; i < count; i++)
+ if (!(this+backtrack[i]).intersects (glyphs))
+ return false;
+
+ count = lookahead.len;
+ for (unsigned int i = 0; i < count; i++)
+ if (!(this+lookahead[i]).intersects (glyphs))
+ return false;
+
+ return true;
+ }
+
inline void closure (hb_closure_context_t *c) const
{
TRACE_CLOSURE (this);
@@ -950,9 +1112,8 @@ struct ReverseChainSingleSubstFormat1
return;
const ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID> > (lookahead);
- Coverage::Iter iter;
count = substitute.len;
- for (iter.init (this+coverage); iter.more (); iter.next ())
+ for (hb_auto_t<Coverage::Iter> iter (this+coverage); iter.more (); iter.next ())
{
if (unlikely (iter.get_coverage () >= count))
break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
@@ -983,9 +1144,7 @@ struct ReverseChainSingleSubstFormat1
}
inline const Coverage &get_coverage (void) const
- {
- return this+coverage;
- }
+ { return this+coverage; }
inline bool would_apply (hb_would_apply_context_t *c) const
{
@@ -1026,6 +1185,13 @@ struct ReverseChainSingleSubstFormat1
return_trace (false);
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ // TODO(subset)
+ return_trace (false);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -1045,7 +1211,7 @@ struct ReverseChainSingleSubstFormat1
* beginning of table */
OffsetArrayOf<Coverage>
backtrack; /* Array of coverage tables
- * in backtracking sequence, in glyph
+ * in backtracking sequence, in glyph
* sequence order */
OffsetArrayOf<Coverage>
lookaheadX; /* Array of coverage tables
@@ -1086,6 +1252,7 @@ struct ReverseChainSingleSubst
struct SubstLookupSubTable
{
+ friend struct Lookup;
friend struct SubstLookup;
enum Type {
@@ -1136,16 +1303,18 @@ struct SubstLookupSubTable
struct SubstLookup : Lookup
{
- inline const SubstLookupSubTable& get_subtable (unsigned int i) const
- { return Lookup::get_subtable<SubstLookupSubTable> (i); }
+ typedef SubstLookupSubTable SubTable;
+
+ inline const SubTable& get_subtable (unsigned int i) const
+ { return Lookup::get_subtable<SubTable> (i); }
inline static bool lookup_type_is_reverse (unsigned int lookup_type)
- { return lookup_type == SubstLookupSubTable::ReverseChainSingle; }
+ { return lookup_type == SubTable::ReverseChainSingle; }
inline bool is_reverse (void) const
{
unsigned int type = get_type ();
- if (unlikely (type == SubstLookupSubTable::Extension))
+ if (unlikely (type == SubTable::Extension))
return CastR<ExtensionSubst> (get_subtable(0)).is_reverse ();
return lookup_type_is_reverse (type);
}
@@ -1156,6 +1325,12 @@ struct SubstLookup : Lookup
return_trace (dispatch (c));
}
+ inline bool intersects (const hb_set_t *glyphs) const
+ {
+ hb_intersects_context_t c (glyphs);
+ return dispatch (&c);
+ }
+
inline hb_closure_context_t::return_t closure (hb_closure_context_t *c, unsigned int this_index) const
{
TRACE_CLOSURE (this);
@@ -1196,9 +1371,9 @@ struct SubstLookup : Lookup
static bool apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index);
- inline SubstLookupSubTable& serialize_subtable (hb_serialize_context_t *c,
- unsigned int i)
- { return get_subtables<SubstLookupSubTable> ()[i].serialize (c, this); }
+ inline SubTable& serialize_subtable (hb_serialize_context_t *c,
+ unsigned int i)
+ { return get_subtables<SubTable> ()[i].serialize (c, this); }
inline bool serialize_single (hb_serialize_context_t *c,
uint32_t lookup_props,
@@ -1207,7 +1382,7 @@ struct SubstLookup : Lookup
unsigned int num_glyphs)
{
TRACE_SERIALIZE (this);
- if (unlikely (!Lookup::serialize (c, SubstLookupSubTable::Single, lookup_props, 1))) return_trace (false);
+ if (unlikely (!Lookup::serialize (c, SubTable::Single, lookup_props, 1))) return_trace (false);
return_trace (serialize_subtable (c, 0).u.single.serialize (c, glyphs, substitutes, num_glyphs));
}
@@ -1219,7 +1394,7 @@ struct SubstLookup : Lookup
Supplier<GlyphID> &substitute_glyphs_list)
{
TRACE_SERIALIZE (this);
- if (unlikely (!Lookup::serialize (c, SubstLookupSubTable::Multiple, lookup_props, 1))) return_trace (false);
+ if (unlikely (!Lookup::serialize (c, SubTable::Multiple, lookup_props, 1))) return_trace (false);
return_trace (serialize_subtable (c, 0).u.multiple.serialize (c,
glyphs,
substitute_len_list,
@@ -1235,7 +1410,7 @@ struct SubstLookup : Lookup
Supplier<GlyphID> &alternate_glyphs_list)
{
TRACE_SERIALIZE (this);
- if (unlikely (!Lookup::serialize (c, SubstLookupSubTable::Alternate, lookup_props, 1))) return_trace (false);
+ if (unlikely (!Lookup::serialize (c, SubTable::Alternate, lookup_props, 1))) return_trace (false);
return_trace (serialize_subtable (c, 0).u.alternate.serialize (c,
glyphs,
alternate_len_list,
@@ -1253,7 +1428,7 @@ struct SubstLookup : Lookup
Supplier<GlyphID> &component_list /* Starting from second for each ligature */)
{
TRACE_SERIALIZE (this);
- if (unlikely (!Lookup::serialize (c, SubstLookupSubTable::Ligature, lookup_props, 1))) return_trace (false);
+ if (unlikely (!Lookup::serialize (c, SubTable::Ligature, lookup_props, 1))) return_trace (false);
return_trace (serialize_subtable (c, 0).u.ligature.serialize (c,
first_glyphs,
ligature_per_first_glyph_count_list,
@@ -1280,32 +1455,15 @@ struct SubstLookup : Lookup
template <typename context_t>
inline typename context_t::return_t dispatch (context_t *c) const
- { return Lookup::dispatch<SubstLookupSubTable> (c); }
+ { return Lookup::dispatch<SubTable> (c); }
- inline bool sanitize (hb_sanitize_context_t *c) const
- {
- TRACE_SANITIZE (this);
- if (unlikely (!Lookup::sanitize (c))) return_trace (false);
- if (unlikely (!dispatch (c))) return_trace (false);
+ inline bool subset (hb_subset_context_t *c) const
+ { return Lookup::subset<SubTable> (c); }
- if (unlikely (get_type () == SubstLookupSubTable::Extension))
- {
- /* The spec says all subtables of an Extension lookup should
- * have the same type, which shall not be the Extension type
- * itself (but we already checked for that).
- * This is specially important if one has a reverse type! */
- unsigned int type = get_subtable (0).u.extension.get_type ();
- unsigned int count = get_subtable_count ();
- for (unsigned int i = 1; i < count; i++)
- if (get_subtable (i).u.extension.get_type () != type)
- return_trace (false);
- }
- return_trace (true);
- }
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ { return Lookup::sanitize<SubTable> (c); }
};
-typedef OffsetListOf<SubstLookup> SubstLookupList;
-
/*
* GSUB -- Glyph Substitution
* https://docs.microsoft.com/en-us/typography/opentype/spec/gsub
@@ -1318,32 +1476,14 @@ struct GSUB : GSUBGPOS
inline const SubstLookup& get_lookup (unsigned int i) const
{ return CastR<SubstLookup> (GSUBGPOS::get_lookup (i)); }
- static inline void substitute_start (hb_font_t *font, hb_buffer_t *buffer);
+ inline bool subset (hb_subset_context_t *c) const
+ { return GSUBGPOS::subset<SubstLookup> (c); }
inline bool sanitize (hb_sanitize_context_t *c) const
- {
- TRACE_SANITIZE (this);
- if (unlikely (!GSUBGPOS::sanitize (c))) return_trace (false);
- const OffsetTo<SubstLookupList> &list = CastR<OffsetTo<SubstLookupList> > (lookupList);
- return_trace (list.sanitize (c, this));
- }
-};
-
-
-void
-GSUB::substitute_start (hb_font_t *font, hb_buffer_t *buffer)
-{
- _hb_buffer_assert_gsubgpos_vars (buffer);
+ { return GSUBGPOS::sanitize<SubstLookup> (c); }
- const GDEF &gdef = *hb_ot_layout_from_face (font->face)->table.GDEF;
- unsigned int count = buffer->len;
- for (unsigned int i = 0; i < count; i++)
- {
- _hb_glyph_info_set_glyph_props (&buffer->info[i], gdef.get_glyph_props (buffer->info[i].codepoint));
- _hb_glyph_info_clear_lig_props (&buffer->info[i]);
- buffer->info[i].syllable() = 0;
- }
-}
+ typedef GSUBGPOS::accelerator_t<GSUB> accelerator_t;
+};
/* Out-of-class implementation for methods recursing */
@@ -1351,23 +1491,21 @@ GSUB::substitute_start (hb_font_t *font, hb_buffer_t *buffer)
/*static*/ inline bool ExtensionSubst::is_reverse (void) const
{
unsigned int type = get_type ();
- if (unlikely (type == SubstLookupSubTable::Extension))
- return CastR<ExtensionSubst> (get_subtable<LookupSubTable>()).is_reverse ();
+ if (unlikely (type == SubTable::Extension))
+ return CastR<ExtensionSubst> (get_subtable<SubTable>()).is_reverse ();
return SubstLookup::lookup_type_is_reverse (type);
}
template <typename context_t>
/*static*/ inline typename context_t::return_t SubstLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index)
{
- const GSUB &gsub = *(hb_ot_layout_from_face (c->face)->table.GSUB);
- const SubstLookup &l = gsub.get_lookup (lookup_index);
+ const SubstLookup &l = _get_gsub_relaxed (c->face).get_lookup (lookup_index);
return l.dispatch (c);
}
/*static*/ inline bool SubstLookup::apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index)
{
- const GSUB &gsub = *(hb_ot_layout_from_face (c->face)->table.GSUB);
- const SubstLookup &l = gsub.get_lookup (lookup_index);
+ const SubstLookup &l = _get_gsub_relaxed (c->face).get_lookup (lookup_index);
unsigned int saved_lookup_props = c->lookup_props;
unsigned int saved_lookup_index = c->lookup_index;
c->set_lookup_index (lookup_index);
@@ -1378,6 +1516,7 @@ template <typename context_t>
return ret;
}
+struct GSUB_accelerator_t : GSUB::accelerator_t {};
} /* namespace OT */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos.hh
index 40a2fc4ccd3..315951a34f8 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos.hh
@@ -26,19 +26,37 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_OT_LAYOUT_GSUBGPOS_PRIVATE_HH
-#define HB_OT_LAYOUT_GSUBGPOS_PRIVATE_HH
-
-#include "hb-private.hh"
-#include "hb-buffer-private.hh"
-#include "hb-map-private.hh"
+#ifndef HB_OT_LAYOUT_GSUBGPOS_HH
+#define HB_OT_LAYOUT_GSUBGPOS_HH
+
+#include "hb.hh"
+#include "hb-buffer.hh"
+#include "hb-map.hh"
+#include "hb-set.hh"
+#include "hb-ot-layout-common.hh"
#include "hb-ot-layout-gdef-table.hh"
-#include "hb-set-private.hh"
namespace OT {
+struct hb_intersects_context_t :
+ hb_dispatch_context_t<hb_intersects_context_t, bool, 0>
+{
+ inline const char *get_name (void) { return "INTERSECTS"; }
+ template <typename T>
+ inline return_t dispatch (const T &obj) { return obj.intersects (this->glyphs); }
+ static return_t default_return_value (void) { return false; }
+ bool stop_sublookup_iteration (return_t r) const { return r; }
+
+ const hb_set_t *glyphs;
+ unsigned int debug_depth;
+
+ hb_intersects_context_t (const hb_set_t *glyphs_) :
+ glyphs (glyphs_),
+ debug_depth (0) {}
+};
+
struct hb_closure_context_t :
hb_dispatch_context_t<hb_closure_context_t, hb_void_t, HB_DEBUG_CLOSURE>
{
@@ -48,15 +66,14 @@ struct hb_closure_context_t :
inline return_t dispatch (const T &obj) { obj.closure (this); return HB_VOID; }
static return_t default_return_value (void) { return HB_VOID; }
bool stop_sublookup_iteration (return_t r HB_UNUSED) const { return false; }
- return_t recurse (unsigned int lookup_index)
+ void recurse (unsigned int lookup_index)
{
if (unlikely (nesting_level_left == 0 || !recurse_func))
- return default_return_value ();
+ return;
nesting_level_left--;
recurse_func (this, lookup_index);
nesting_level_left++;
- return HB_VOID;
}
bool should_visit_lookup (unsigned int lookup_index)
@@ -145,10 +162,10 @@ struct hb_collect_glyphs_context_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; }
bool stop_sublookup_iteration (return_t r HB_UNUSED) const { return false; }
- return_t recurse (unsigned int lookup_index)
+ void recurse (unsigned int lookup_index)
{
if (unlikely (nesting_level_left == 0 || !recurse_func))
- return default_return_value ();
+ return;
/* Note that GPOS sets recurse_func to nullptr already, so it doesn't get
* past the previous check. For GSUB, we only want to collect the output
@@ -161,11 +178,11 @@ struct hb_collect_glyphs_context_t :
*/
if (output == hb_set_get_empty ())
- return HB_VOID;
+ return;
/* Return if new lookup was recursed to before. */
if (recursed_lookups->has (lookup_index))
- return HB_VOID;
+ return;
hb_set_t *old_before = before;
hb_set_t *old_input = input;
@@ -182,7 +199,7 @@ struct hb_collect_glyphs_context_t :
recursed_lookups->add (lookup_index);
- return HB_VOID;
+ return;
}
hb_face_t *face;
@@ -207,24 +224,16 @@ struct hb_collect_glyphs_context_t :
after (glyphs_after ? glyphs_after : hb_set_get_empty ()),
output (glyphs_output ? glyphs_output : hb_set_get_empty ()),
recurse_func (nullptr),
- recursed_lookups (nullptr),
+ recursed_lookups (hb_set_create ()),
nesting_level_left (nesting_level_left_),
- debug_depth (0)
- {
- recursed_lookups = hb_set_create ();
- }
- ~hb_collect_glyphs_context_t (void)
- {
- hb_set_destroy (recursed_lookups);
- }
+ debug_depth (0) {}
+ ~hb_collect_glyphs_context_t (void) { hb_set_destroy (recursed_lookups); }
void set_recurse_func (recurse_func_t func) { recurse_func = func; }
};
-/* XXX Can we remove this? */
-
template <typename set_t>
struct hb_add_coverage_context_t :
hb_dispatch_context_t<hb_add_coverage_context_t<set_t>, const Coverage &, HB_DEBUG_GET_COVERAGE>
@@ -480,7 +489,7 @@ struct hb_ot_apply_context_t :
iter_input (), iter_context (),
font (font_), face (font->face), buffer (buffer_),
recurse_func (nullptr),
- gdef (*hb_ot_layout_from_face (face)->table.GDEF),
+ gdef (_get_gdef (face)),
var_store (gdef.get_var_store ()),
direction (buffer_->props.direction),
lookup_mask (1),
@@ -598,7 +607,7 @@ struct hb_ot_apply_context_t :
-typedef bool (*intersects_func_t) (hb_set_t *glyphs, const HBUINT16 &value, const void *data);
+typedef bool (*intersects_func_t) (const hb_set_t *glyphs, const HBUINT16 &value, const void *data);
typedef void (*collect_glyphs_func_t) (hb_set_t *glyphs, const HBUINT16 &value, const void *data);
typedef bool (*match_func_t) (hb_codepoint_t glyph_id, const HBUINT16 &value, const void *data);
@@ -616,29 +625,29 @@ struct ContextApplyFuncs
};
-static inline bool intersects_glyph (hb_set_t *glyphs, const HBUINT16 &value, const void *data HB_UNUSED)
+static inline bool intersects_glyph (const hb_set_t *glyphs, const HBUINT16 &value, const void *data HB_UNUSED)
{
return glyphs->has (value);
}
-static inline bool intersects_class (hb_set_t *glyphs, const HBUINT16 &value, const void *data)
+static inline bool intersects_class (const hb_set_t *glyphs, const HBUINT16 &value, const void *data)
{
const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data);
return class_def.intersects_class (glyphs, value);
}
-static inline bool intersects_coverage (hb_set_t *glyphs, const HBUINT16 &value, const void *data)
+static inline bool intersects_coverage (const hb_set_t *glyphs, const HBUINT16 &value, const void *data)
{
const OffsetTo<Coverage> &coverage = (const OffsetTo<Coverage>&)value;
return (data+coverage).intersects (glyphs);
}
-static inline bool intersects_array (hb_closure_context_t *c,
+static inline bool intersects_array (const hb_set_t *glyphs,
unsigned int count,
const HBUINT16 values[],
intersects_func_t intersects_func,
const void *intersects_data)
{
for (unsigned int i = 0; i < count; i++)
- if (likely (!intersects_func (c->glyphs, values[i], intersects_data)))
+ if (likely (!intersects_func (glyphs, values[i], intersects_data)))
return false;
return true;
}
@@ -987,7 +996,6 @@ struct LookupRecord
DEFINE_SIZE_STATIC (4);
};
-
template <typename context_t>
static inline void recurse_lookups (context_t *c,
unsigned int lookupCount,
@@ -1140,6 +1148,16 @@ struct ContextApplyLookupContext
const void *match_data;
};
+static inline bool context_intersects (const hb_set_t *glyphs,
+ unsigned int inputCount, /* Including the first glyph (not matched) */
+ const HBUINT16 input[], /* Array of input values--start with second glyph */
+ ContextClosureLookupContext &lookup_context)
+{
+ return intersects_array (glyphs,
+ inputCount ? inputCount - 1 : 0, input,
+ lookup_context.funcs.intersects, lookup_context.intersects_data);
+}
+
static inline void context_closure_lookup (hb_closure_context_t *c,
unsigned int inputCount, /* Including the first glyph (not matched) */
const HBUINT16 input[], /* Array of input values--start with second glyph */
@@ -1147,9 +1165,9 @@ static inline void context_closure_lookup (hb_closure_context_t *c,
const LookupRecord lookupRecord[],
ContextClosureLookupContext &lookup_context)
{
- if (intersects_array (c,
- inputCount ? inputCount - 1 : 0, input,
- lookup_context.funcs.intersects, lookup_context.intersects_data))
+ if (context_intersects (c->glyphs,
+ inputCount, input,
+ lookup_context))
recurse_lookups (c,
lookupCount, lookupRecord);
}
@@ -1201,6 +1219,13 @@ static inline bool context_apply_lookup (hb_ot_apply_context_t *c,
struct Rule
{
+ inline bool intersects (const hb_set_t *glyphs, ContextClosureLookupContext &lookup_context) const
+ {
+ return context_intersects (glyphs,
+ inputCount, inputZ,
+ lookup_context);
+ }
+
inline void closure (hb_closure_context_t *c, ContextClosureLookupContext &lookup_context) const
{
TRACE_CLOSURE (this);
@@ -1261,6 +1286,15 @@ struct Rule
struct RuleSet
{
+ inline bool intersects (const hb_set_t *glyphs, ContextClosureLookupContext &lookup_context) const
+ {
+ unsigned int num_rules = rule.len;
+ for (unsigned int i = 0; i < num_rules; i++)
+ if ((this+rule[i]).intersects (glyphs, lookup_context))
+ return true;
+ return false;
+ }
+
inline void closure (hb_closure_context_t *c, ContextClosureLookupContext &lookup_context) const
{
TRACE_CLOSURE (this);
@@ -1318,23 +1352,42 @@ struct RuleSet
struct ContextFormat1
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ {
+ struct ContextClosureLookupContext lookup_context = {
+ {intersects_glyph},
+ nullptr
+ };
+
+ unsigned int count = ruleSet.len;
+ for (hb_auto_t<Coverage::Iter> iter (this+coverage); iter.more (); iter.next ())
+ {
+ if (unlikely (iter.get_coverage () >= count))
+ break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
+ if (glyphs->has (iter.get_glyph ()) &&
+ (this+ruleSet[iter.get_coverage ()]).intersects (glyphs, lookup_context))
+ return true;
+ }
+ return false;
+ }
+
inline void closure (hb_closure_context_t *c) const
{
TRACE_CLOSURE (this);
- const Coverage &cov = (this+coverage);
-
struct ContextClosureLookupContext lookup_context = {
{intersects_glyph},
nullptr
};
unsigned int count = ruleSet.len;
- for (unsigned int i = 0; i < count; i++)
- if (cov.intersects_coverage (c->glyphs, i)) {
- const RuleSet &rule_set = this+ruleSet[i];
- rule_set.closure (c, lookup_context);
- }
+ for (hb_auto_t<Coverage::Iter> iter (this+coverage); iter.more (); iter.next ())
+ {
+ if (unlikely (iter.get_coverage () >= count))
+ break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
+ if (c->glyphs->has (iter.get_glyph ()))
+ (this+ruleSet[iter.get_coverage ()]).closure (c, lookup_context);
+ }
}
inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
@@ -1365,9 +1418,7 @@ struct ContextFormat1
}
inline const Coverage &get_coverage (void) const
- {
- return this+coverage;
- }
+ { return this+coverage; }
inline bool apply (hb_ot_apply_context_t *c) const
{
@@ -1384,6 +1435,13 @@ struct ContextFormat1
return_trace (rule_set.apply (c, lookup_context));
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ // TODO(subset)
+ return_trace (false);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -1405,6 +1463,27 @@ struct ContextFormat1
struct ContextFormat2
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ {
+ if (!(this+coverage).intersects (glyphs))
+ return false;
+
+ const ClassDef &class_def = this+classDef;
+
+ struct ContextClosureLookupContext lookup_context = {
+ {intersects_class},
+ &class_def
+ };
+
+ unsigned int count = ruleSet.len;
+ for (unsigned int i = 0; i < count; i++)
+ if (class_def.intersects_class (glyphs, i) &&
+ (this+ruleSet[i]).intersects (glyphs, lookup_context))
+ return true;
+
+ return false;
+ }
+
inline void closure (hb_closure_context_t *c) const
{
TRACE_CLOSURE (this);
@@ -1457,9 +1536,7 @@ struct ContextFormat2
}
inline const Coverage &get_coverage (void) const
- {
- return this+coverage;
- }
+ { return this+coverage; }
inline bool apply (hb_ot_apply_context_t *c) const
{
@@ -1477,6 +1554,13 @@ struct ContextFormat2
return_trace (rule_set.apply (c, lookup_context));
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ // TODO(subset)
+ return_trace (false);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -1501,6 +1585,20 @@ struct ContextFormat2
struct ContextFormat3
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ {
+ if (!(this+coverageZ[0]).intersects (glyphs))
+ return false;
+
+ struct ContextClosureLookupContext lookup_context = {
+ {intersects_coverage},
+ this
+ };
+ return context_intersects (glyphs,
+ glyphCount, (const HBUINT16 *) (coverageZ + 1),
+ lookup_context);
+ }
+
inline void closure (hb_closure_context_t *c) const
{
TRACE_CLOSURE (this);
@@ -1548,9 +1646,7 @@ struct ContextFormat3
}
inline const Coverage &get_coverage (void) const
- {
- return this+coverageZ[0];
- }
+ { return this+coverageZ[0]; }
inline bool apply (hb_ot_apply_context_t *c) const
{
@@ -1566,6 +1662,13 @@ struct ContextFormat3
return_trace (context_apply_lookup (c, glyphCount, (const HBUINT16 *) (coverageZ + 1), lookupCount, lookupRecord, lookup_context));
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ // TODO(subset)
+ return_trace (false);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -1638,6 +1741,26 @@ struct ChainContextApplyLookupContext
const void *match_data[3];
};
+static inline bool chain_context_intersects (const hb_set_t *glyphs,
+ unsigned int backtrackCount,
+ const HBUINT16 backtrack[],
+ unsigned int inputCount, /* Including the first glyph (not matched) */
+ const HBUINT16 input[], /* Array of input values--start with second glyph */
+ unsigned int lookaheadCount,
+ const HBUINT16 lookahead[],
+ ChainContextClosureLookupContext &lookup_context)
+{
+ return intersects_array (glyphs,
+ backtrackCount, backtrack,
+ lookup_context.funcs.intersects, lookup_context.intersects_data[0])
+ && intersects_array (glyphs,
+ inputCount ? inputCount - 1 : 0, input,
+ lookup_context.funcs.intersects, lookup_context.intersects_data[1])
+ && intersects_array (glyphs,
+ lookaheadCount, lookahead,
+ lookup_context.funcs.intersects, lookup_context.intersects_data[2]);
+}
+
static inline void chain_context_closure_lookup (hb_closure_context_t *c,
unsigned int backtrackCount,
const HBUINT16 backtrack[],
@@ -1649,15 +1772,11 @@ static inline void chain_context_closure_lookup (hb_closure_context_t *c,
const LookupRecord lookupRecord[],
ChainContextClosureLookupContext &lookup_context)
{
- if (intersects_array (c,
- backtrackCount, backtrack,
- lookup_context.funcs.intersects, lookup_context.intersects_data[0])
- && intersects_array (c,
- inputCount ? inputCount - 1 : 0, input,
- lookup_context.funcs.intersects, lookup_context.intersects_data[1])
- && intersects_array (c,
- lookaheadCount, lookahead,
- lookup_context.funcs.intersects, lookup_context.intersects_data[2]))
+ if (chain_context_intersects (c->glyphs,
+ backtrackCount, backtrack,
+ inputCount, input,
+ lookaheadCount, lookahead,
+ lookup_context))
recurse_lookups (c,
lookupCount, lookupRecord);
}
@@ -1737,6 +1856,17 @@ static inline bool chain_context_apply_lookup (hb_ot_apply_context_t *c,
struct ChainRule
{
+ inline bool intersects (const hb_set_t *glyphs, ChainContextClosureLookupContext &lookup_context) const
+ {
+ const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16> > (backtrack);
+ const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16> > (input);
+ return chain_context_intersects (glyphs,
+ backtrack.len, backtrack.arrayZ,
+ input.len, input.arrayZ,
+ lookahead.len, lookahead.arrayZ,
+ lookup_context);
+ }
+
inline void closure (hb_closure_context_t *c, ChainContextClosureLookupContext &lookup_context) const
{
TRACE_CLOSURE (this);
@@ -1823,6 +1953,14 @@ struct ChainRule
struct ChainRuleSet
{
+ inline bool intersects (const hb_set_t *glyphs, ChainContextClosureLookupContext &lookup_context) const
+ {
+ unsigned int num_rules = rule.len;
+ for (unsigned int i = 0; i < num_rules; i++)
+ if ((this+rule[i]).intersects (glyphs, lookup_context))
+ return true;
+ return false;
+ }
inline void closure (hb_closure_context_t *c, ChainContextClosureLookupContext &lookup_context) const
{
TRACE_CLOSURE (this);
@@ -1877,10 +2015,28 @@ struct ChainRuleSet
struct ChainContextFormat1
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ {
+ struct ChainContextClosureLookupContext lookup_context = {
+ {intersects_glyph},
+ {nullptr, nullptr, nullptr}
+ };
+
+ unsigned int count = ruleSet.len;
+ for (hb_auto_t<Coverage::Iter> iter (this+coverage); iter.more (); iter.next ())
+ {
+ if (unlikely (iter.get_coverage () >= count))
+ break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
+ if (glyphs->has (iter.get_glyph ()) &&
+ (this+ruleSet[iter.get_coverage ()]).intersects (glyphs, lookup_context))
+ return true;
+ }
+ return false;
+ }
+
inline void closure (hb_closure_context_t *c) const
{
TRACE_CLOSURE (this);
- const Coverage &cov = (this+coverage);
struct ChainContextClosureLookupContext lookup_context = {
{intersects_glyph},
@@ -1888,11 +2044,13 @@ struct ChainContextFormat1
};
unsigned int count = ruleSet.len;
- for (unsigned int i = 0; i < count; i++)
- if (cov.intersects_coverage (c->glyphs, i)) {
- const ChainRuleSet &rule_set = this+ruleSet[i];
- rule_set.closure (c, lookup_context);
- }
+ for (hb_auto_t<Coverage::Iter> iter (this+coverage); iter.more (); iter.next ())
+ {
+ if (unlikely (iter.get_coverage () >= count))
+ break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
+ if (c->glyphs->has (iter.get_glyph ()))
+ (this+ruleSet[iter.get_coverage ()]).closure (c, lookup_context);
+ }
}
inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
@@ -1923,9 +2081,7 @@ struct ChainContextFormat1
}
inline const Coverage &get_coverage (void) const
- {
- return this+coverage;
- }
+ { return this+coverage; }
inline bool apply (hb_ot_apply_context_t *c) const
{
@@ -1941,6 +2097,13 @@ struct ChainContextFormat1
return_trace (rule_set.apply (c, lookup_context));
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ // TODO(subset)
+ return_trace (false);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -1961,6 +2124,30 @@ struct ChainContextFormat1
struct ChainContextFormat2
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ {
+ if (!(this+coverage).intersects (glyphs))
+ return false;
+
+ const ClassDef &backtrack_class_def = this+backtrackClassDef;
+ const ClassDef &input_class_def = this+inputClassDef;
+ const ClassDef &lookahead_class_def = this+lookaheadClassDef;
+
+ struct ChainContextClosureLookupContext lookup_context = {
+ {intersects_class},
+ {&backtrack_class_def,
+ &input_class_def,
+ &lookahead_class_def}
+ };
+
+ unsigned int count = ruleSet.len;
+ for (unsigned int i = 0; i < count; i++)
+ if (input_class_def.intersects_class (glyphs, i) &&
+ (this+ruleSet[i]).intersects (glyphs, lookup_context))
+ return true;
+
+ return false;
+ }
inline void closure (hb_closure_context_t *c) const
{
TRACE_CLOSURE (this);
@@ -2027,9 +2214,7 @@ struct ChainContextFormat2
}
inline const Coverage &get_coverage (void) const
- {
- return this+coverage;
- }
+ { return this+coverage; }
inline bool apply (hb_ot_apply_context_t *c) const
{
@@ -2052,6 +2237,13 @@ struct ChainContextFormat2
return_trace (rule_set.apply (c, lookup_context));
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ // TODO(subset)
+ return_trace (false);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -2088,6 +2280,25 @@ struct ChainContextFormat2
struct ChainContextFormat3
{
+ inline bool intersects (const hb_set_t *glyphs) const
+ {
+ const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
+
+ if (!(this+input[0]).intersects (glyphs))
+ return false;
+
+ const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (input);
+ struct ChainContextClosureLookupContext lookup_context = {
+ {intersects_coverage},
+ {this, this, this}
+ };
+ return chain_context_intersects (glyphs,
+ backtrack.len, (const HBUINT16 *) backtrack.arrayZ,
+ input.len, (const HBUINT16 *) input.arrayZ + 1,
+ lookahead.len, (const HBUINT16 *) lookahead.arrayZ,
+ lookup_context);
+ }
+
inline void closure (hb_closure_context_t *c) const
{
TRACE_CLOSURE (this);
@@ -2176,6 +2387,13 @@ struct ChainContextFormat3
lookup.len, lookup.arrayZ, lookup_context));
}
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ // TODO(subset)
+ return_trace (false);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -2244,8 +2462,8 @@ struct ExtensionFormat1
inline const X& get_subtable (void) const
{
unsigned int offset = extensionOffset;
- if (unlikely (!offset)) return Null(typename T::LookupSubTable);
- return StructAtOffset<typename T::LookupSubTable> (this, offset);
+ if (unlikely (!offset)) return Null(typename T::SubTable);
+ return StructAtOffset<typename T::SubTable> (this, offset);
}
template <typename context_t>
@@ -2253,7 +2471,7 @@ struct ExtensionFormat1
{
TRACE_DISPATCH (this, format);
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 ()));
+ return_trace (get_subtable<typename T::SubTable> ().dispatch (c, get_type ()));
}
/* This is called from may_dispatch() above with hb_sanitize_context_t. */
@@ -2262,7 +2480,7 @@ struct ExtensionFormat1
TRACE_SANITIZE (this);
return_trace (c->check_struct (this) &&
extensionOffset != 0 &&
- extensionLookupType != T::LookupSubTable::Extension);
+ extensionLookupType != T::SubTable::Extension);
}
protected:
@@ -2290,8 +2508,8 @@ struct Extension
inline const X& get_subtable (void) const
{
switch (u.format) {
- case 1: return u.format1.template get_subtable<typename T::LookupSubTable> ();
- default:return Null(typename T::LookupSubTable);
+ case 1: return u.format1.template get_subtable<typename T::SubTable> ();
+ default:return Null(typename T::SubTable);
}
}
@@ -2370,17 +2588,78 @@ struct GSUBGPOS
return get_feature (feature_index);
}
+ template <typename TLookup>
+ inline bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ struct GSUBGPOS *out = c->serializer->embed (*this);
+ if (unlikely (!out)) return_trace (false);
+ out->scriptList.serialize_subset (c, this+scriptList, out);
+ out->featureList.serialize_subset (c, this+featureList, out);
+
+ typedef OffsetListOf<TLookup> TLookupList;
+ /* TODO Use intersects() to count how many subtables survive? */
+ CastR<OffsetTo<TLookupList> > (out->lookupList)
+ .serialize_subset (c,
+ this+CastR<const OffsetTo<TLookupList> > (lookupList),
+ out);
+
+ if (version.to_int () >= 0x00010001u)
+ out->featureVars.serialize_subset (c, this+featureVars, out);
+ return_trace (true);
+ }
+
+ inline unsigned int get_size (void) const
+ {
+ return min_size +
+ (version.to_int () >= 0x00010001u ? featureVars.static_size : 0);
+ }
+
+ template <typename TLookup>
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
+ typedef OffsetListOf<TLookup> TLookupList;
return_trace (version.sanitize (c) &&
likely (version.major == 1) &&
scriptList.sanitize (c, this) &&
featureList.sanitize (c, this) &&
- lookupList.sanitize (c, this) &&
+ CastR<OffsetTo<TLookupList> > (lookupList).sanitize (c, this) &&
(version.to_int () < 0x00010001u || featureVars.sanitize (c, this)));
}
+ template <typename T>
+ struct accelerator_t
+ {
+ inline void init (hb_face_t *face)
+ {
+ this->blob = hb_sanitize_context_t().reference_table<T> (face);
+ table = this->blob->template as<T> ();
+
+ this->lookup_count = table->get_lookup_count ();
+
+ this->accels = (hb_ot_layout_lookup_accelerator_t *) calloc (this->lookup_count, sizeof (hb_ot_layout_lookup_accelerator_t));
+ if (unlikely (!this->accels))
+ this->lookup_count = 0;
+
+ for (unsigned int i = 0; i < this->lookup_count; i++)
+ this->accels[i].init (table->get_lookup (i));
+ }
+
+ inline void fini (void)
+ {
+ for (unsigned int i = 0; i < this->lookup_count; i++)
+ this->accels[i].fini ();
+ free (this->accels);
+ hb_blob_destroy (this->blob);
+ }
+
+ hb_blob_t *blob;
+ const T *table;
+ unsigned int lookup_count;
+ hb_ot_layout_lookup_accelerator_t *accels;
+ };
+
protected:
FixedVersion<>version; /* Version of the GSUB/GPOS table--initially set
* to 0x00010000u */
@@ -2403,4 +2682,4 @@ struct GSUBGPOS
} /* namespace OT */
-#endif /* HB_OT_LAYOUT_GSUBGPOS_PRIVATE_HH */
+#endif /* HB_OT_LAYOUT_GSUBGPOS_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-jstf-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-jstf-table.hh
index 7fabdebb2ac..e718c319f0e 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-jstf-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-jstf-table.hh
@@ -27,7 +27,7 @@
#ifndef HB_OT_LAYOUT_JSTF_TABLE_HH
#define HB_OT_LAYOUT_JSTF_TABLE_HH
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
#include "hb-ot-layout-gpos-table.hh"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc
index 09ff0e6c0d7..a1220f4dd3b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc
@@ -28,10 +28,11 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-open-type-private.hh"
-#include "hb-ot-layout-private.hh"
-#include "hb-ot-map-private.hh"
-#include "hb-map-private.hh"
+#include "hb-open-type.hh"
+#include "hb-ot-layout.hh"
+#include "hb-ot-face.hh"
+#include "hb-ot-map.hh"
+#include "hb-map.hh"
#include "hb-ot-layout-gdef-table.hh"
#include "hb-ot-layout-gsub-table.hh"
@@ -47,6 +48,53 @@
#include "hb-ot-name-table.hh"
+// static inline const OT::BASE&
+// _get_base (hb_face_t *face)
+// {
+// if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::BASE);
+// hb_ot_face_data_t *data = hb_ot_face_data (face);
+// return *(data->base.get ());
+// }
+
+const OT::GDEF& _get_gdef (hb_face_t *face)
+{
+ if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::GDEF);
+ return *hb_ot_face_data (face)->GDEF->table;
+}
+static hb_blob_t * _get_gsub_blob (hb_face_t *face)
+{
+ if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return hb_blob_get_empty ();
+ return hb_ot_face_data (face)->GSUB->blob;
+}
+static inline const OT::GSUB& _get_gsub (hb_face_t *face)
+{
+ if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::GSUB);
+ return *hb_ot_face_data (face)->GSUB->table;
+}
+const OT::GSUB& _get_gsub_relaxed (hb_face_t *face)
+{
+ return *hb_ot_face_data (face)->GSUB.get_relaxed ()->table;
+}
+static hb_blob_t * _get_gpos_blob (hb_face_t *face)
+{
+ if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return hb_blob_get_empty ();
+ return hb_ot_face_data (face)->GPOS->blob;
+}
+static inline const OT::GPOS& _get_gpos (hb_face_t *face)
+{
+ if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::GPOS);
+ return *hb_ot_face_data (face)->GPOS->table;
+}
+const OT::GPOS& _get_gpos_relaxed (hb_face_t *face)
+{
+ return *hb_ot_face_data (face)->GPOS.get_relaxed ()->table;
+}
+
+
+/*
+ * GDEF
+ */
+
static bool
_hb_ot_blacklist_gdef (unsigned int gdef_len,
unsigned int gsub_len,
@@ -149,106 +197,39 @@ _hb_ot_blacklist_gdef (unsigned int gdef_len,
return false;
}
-void hb_ot_layout_t::tables_t::init0 (hb_face_t *face)
+inline void
+OT::GDEF::accelerator_t::init (hb_face_t *face)
{
- this->face = face;
-#define HB_OT_LAYOUT_TABLE(Namespace, Type) Type.init0 ();
- HB_OT_LAYOUT_TABLES
-#undef HB_OT_LAYOUT_TABLE
-}
-void hb_ot_layout_t::tables_t::fini (void)
-{
-#define HB_OT_LAYOUT_TABLE(Namespace, Type) Type.fini ();
- HB_OT_LAYOUT_TABLES
-#undef HB_OT_LAYOUT_TABLE
-}
+ this->blob = hb_sanitize_context_t().reference_table<GDEF> (face);
-hb_ot_layout_t *
-_hb_ot_layout_create (hb_face_t *face)
-{
- hb_ot_layout_t *layout = (hb_ot_layout_t *) calloc (1, sizeof (hb_ot_layout_t));
- if (unlikely (!layout))
- return nullptr;
-
- layout->table.init0 (face);
-
- const OT::GSUB &gsub = *layout->table.GSUB;
- const OT::GPOS &gpos = *layout->table.GPOS;
-
- if (unlikely (_hb_ot_blacklist_gdef (layout->table.GDEF.get_blob ()->length,
- layout->table.GSUB.get_blob ()->length,
- layout->table.GPOS.get_blob ()->length)))
- layout->table.GDEF.set_stored (hb_blob_get_empty ());
-
- unsigned int gsub_lookup_count = layout->gsub_lookup_count = gsub.get_lookup_count ();
- unsigned int gpos_lookup_count = layout->gpos_lookup_count = gpos.get_lookup_count ();
-
- layout->gsub_accels = (hb_ot_layout_lookup_accelerator_t *) calloc (gsub_lookup_count, sizeof (hb_ot_layout_lookup_accelerator_t));
- layout->gpos_accels = (hb_ot_layout_lookup_accelerator_t *) calloc (gpos_lookup_count, sizeof (hb_ot_layout_lookup_accelerator_t));
-
- if (unlikely ((gsub_lookup_count && !layout->gsub_accels) ||
- (gpos_lookup_count && !layout->gpos_accels)))
+ if (unlikely (_hb_ot_blacklist_gdef (this->blob->length,
+ _get_gsub_blob (face)->length,
+ _get_gpos_blob (face)->length)))
{
- _hb_ot_layout_destroy (layout);
- return nullptr;
+ hb_blob_destroy (this->blob);
+ this->blob = hb_blob_get_empty ();
}
- for (unsigned int i = 0; i < gsub_lookup_count; i++)
- layout->gsub_accels[i].init (gsub.get_lookup (i));
- for (unsigned int i = 0; i < gpos_lookup_count; i++)
- layout->gpos_accels[i].init (gpos.get_lookup (i));
-
- return layout;
+ table = this->blob->as<GDEF> ();
}
-void
-_hb_ot_layout_destroy (hb_ot_layout_t *layout)
+static void
+_hb_ot_layout_set_glyph_props (hb_font_t *font,
+ hb_buffer_t *buffer)
{
- if (layout->gsub_accels)
- for (unsigned int i = 0; i < layout->gsub_lookup_count; i++)
- layout->gsub_accels[i].fini ();
- if (layout->gpos_accels)
- for (unsigned int i = 0; i < layout->gpos_lookup_count; i++)
- layout->gpos_accels[i].fini ();
-
- free (layout->gsub_accels);
- free (layout->gpos_accels);
-
- layout->table.fini ();
-
- free (layout);
-}
-
-// static inline const OT::BASE&
-// _get_base (hb_face_t *face)
-// {
-// if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::BASE);
-// hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
-// return *(layout->base.get ());
-// }
+ _hb_buffer_assert_gsubgpos_vars (buffer);
-static inline const OT::GDEF&
-_get_gdef (hb_face_t *face)
-{
- if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::GDEF);
- return *hb_ot_layout_from_face (face)->table.GDEF;
-}
-static inline const OT::GSUB&
-_get_gsub (hb_face_t *face)
-{
- if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::GSUB);
- return *hb_ot_layout_from_face (face)->table.GSUB;
-}
-static inline const OT::GPOS&
-_get_gpos (hb_face_t *face)
-{
- if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::GPOS);
- return *hb_ot_layout_from_face (face)->table.GPOS;
+ const OT::GDEF &gdef = _get_gdef (font->face);
+ unsigned int count = buffer->len;
+ for (unsigned int i = 0; i < count; i++)
+ {
+ _hb_glyph_info_set_glyph_props (&buffer->info[i], gdef.get_glyph_props (buffer->info[i].codepoint));
+ _hb_glyph_info_clear_lig_props (&buffer->info[i]);
+ buffer->info[i].syllable() = 0;
+ }
}
-/*
- * GDEF
- */
+/* Public API */
hb_bool_t
hb_ot_layout_has_glyph_classes (hb_face_t *face)
@@ -633,11 +614,11 @@ hb_ot_layout_table_get_lookup_count (hb_face_t *face,
{
case HB_OT_TAG_GSUB:
{
- return hb_ot_layout_from_face (face)->gsub_lookup_count;
+ return hb_ot_face_data (face)->GSUB->lookup_count;
}
case HB_OT_TAG_GPOS:
{
- return hb_ot_layout_from_face (face)->gpos_lookup_count;
+ return hb_ot_face_data (face)->GPOS->lookup_count;
}
}
return 0;
@@ -851,13 +832,13 @@ hb_ot_layout_lookup_collect_glyphs (hb_face_t *face,
{
case HB_OT_TAG_GSUB:
{
- const OT::SubstLookup& l = hb_ot_layout_from_face (face)->table.GSUB->get_lookup (lookup_index);
+ const OT::SubstLookup& l = hb_ot_face_data (face)->GSUB->table->get_lookup (lookup_index);
l.collect_glyphs (&c);
return;
}
case HB_OT_TAG_GPOS:
{
- const OT::PosLookup& l = hb_ot_layout_from_face (face)->table.GPOS->get_lookup (lookup_index);
+ const OT::PosLookup& l = hb_ot_face_data (face)->GPOS->table->get_lookup (lookup_index);
l.collect_glyphs (&c);
return;
}
@@ -930,18 +911,19 @@ hb_ot_layout_lookup_would_substitute_fast (hb_face_t *face,
unsigned int glyphs_length,
hb_bool_t zero_context)
{
- if (unlikely (lookup_index >= hb_ot_layout_from_face (face)->gsub_lookup_count)) return false;
+ if (unlikely (lookup_index >= hb_ot_face_data (face)->GSUB->lookup_count)) return false;
OT::hb_would_apply_context_t c (face, glyphs, glyphs_length, (bool) zero_context);
- const OT::SubstLookup& l = hb_ot_layout_from_face (face)->table.GSUB->get_lookup (lookup_index);
+ const OT::SubstLookup& l = hb_ot_face_data (face)->GSUB->table->get_lookup (lookup_index);
- return l.would_apply (&c, &hb_ot_layout_from_face (face)->gsub_accels[lookup_index]);
+ return l.would_apply (&c, &hb_ot_face_data (face)->GSUB->accels[lookup_index]);
}
void
-hb_ot_layout_substitute_start (hb_font_t *font, hb_buffer_t *buffer)
+hb_ot_layout_substitute_start (hb_font_t *font,
+ hb_buffer_t *buffer)
{
- OT::GSUB::substitute_start (font, buffer);
+_hb_ot_layout_set_glyph_props (font, buffer);
}
/**
@@ -1086,13 +1068,13 @@ hb_ot_layout_get_size_params (hb_face_t *face,
struct GSUBProxy
{
- static const unsigned int table_index = 0;
+ enum { table_index = 0 };
static const bool inplace = false;
typedef OT::SubstLookup Lookup;
GSUBProxy (hb_face_t *face) :
- table (*hb_ot_layout_from_face (face)->table.GSUB),
- accels (hb_ot_layout_from_face (face)->gsub_accels) {}
+ table (*hb_ot_face_data (face)->GSUB->table),
+ accels (hb_ot_face_data (face)->GSUB->accels) {}
const OT::GSUB &table;
const hb_ot_layout_lookup_accelerator_t *accels;
@@ -1100,13 +1082,13 @@ struct GSUBProxy
struct GPOSProxy
{
- static const unsigned int table_index = 1;
+ enum { table_index = 1 };
static const bool inplace = true;
typedef OT::PosLookup Lookup;
GPOSProxy (hb_face_t *face) :
- table (*hb_ot_layout_from_face (face)->table.GPOS),
- accels (hb_ot_layout_from_face (face)->gpos_accels) {}
+ table (*hb_ot_face_data (face)->GPOS->table),
+ accels (hb_ot_face_data (face)->GPOS->accels) {}
const OT::GPOS &table;
const hb_ot_layout_lookup_accelerator_t *accels;
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.hh
index 612bc7fce38..84981391cb5 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.hh
@@ -26,15 +26,27 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_OT_LAYOUT_PRIVATE_HH
-#define HB_OT_LAYOUT_PRIVATE_HH
+#ifndef HB_OT_LAYOUT_HH
+#define HB_OT_LAYOUT_HH
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-font-private.hh"
-#include "hb-buffer-private.hh"
-#include "hb-set-digest-private.hh"
-#include "hb-open-type-private.hh"
+#include "hb-font.hh"
+#include "hb-buffer.hh"
+#include "hb-open-type.hh"
+#include "hb-set-digest.hh"
+
+
+namespace OT
+{
+ struct GDEF;
+ struct GSUB;
+ struct GPOS;
+}
+
+HB_INTERNAL const OT::GDEF& _get_gdef (hb_face_t *face);
+HB_INTERNAL const OT::GSUB& _get_gsub_relaxed (hb_face_t *face);
+HB_INTERNAL const OT::GPOS& _get_gpos_relaxed (hb_face_t *face);
/* Private API corresponding to hb-ot-layout.h: */
@@ -87,7 +99,22 @@ hb_ot_layout_substitute_start (hb_font_t *font,
hb_buffer_t *buffer);
-struct hb_ot_layout_lookup_accelerator_t;
+struct hb_ot_layout_lookup_accelerator_t
+{
+ template <typename TLookup>
+ inline void init (const TLookup &lookup)
+ {
+ digest.init ();
+ lookup.add_coverage (&digest);
+ }
+ inline void fini (void) {}
+
+ inline bool may_have (hb_codepoint_t g) const
+ { return digest.may_have (g); }
+
+ private:
+ hb_set_digest_t digest;
+};
namespace OT {
struct hb_ot_apply_context_t;
@@ -116,112 +143,6 @@ hb_ot_layout_position_finish_offsets (hb_font_t *font,
hb_buffer_t *buffer);
-
-/*
- * hb_ot_layout_t
- */
-
-struct hb_ot_layout_lookup_accelerator_t
-{
- template <typename TLookup>
- inline void init (const TLookup &lookup)
- {
- digest.init ();
- lookup.add_coverage (&digest);
- }
-
- inline void fini (void)
- {
- }
-
- inline bool may_have (hb_codepoint_t g) const {
- return digest.may_have (g);
- }
-
- private:
- hb_set_digest_t digest;
-};
-
-/* Most of these tables are NOT needed for shaping. But we need to hook them *somewhere*.
- * This is as good as any place. */
-#define HB_OT_LAYOUT_TABLES \
- /* OpenType shaping. */ \
- HB_OT_LAYOUT_TABLE(OT, GDEF) \
- HB_OT_LAYOUT_TABLE(OT, GSUB) \
- HB_OT_LAYOUT_TABLE(OT, GPOS) \
- HB_OT_LAYOUT_TABLE(OT, JSTF) \
- HB_OT_LAYOUT_TABLE(OT, BASE) \
- /* AAT shaping. */ \
- HB_OT_LAYOUT_TABLE(AAT, morx) \
- HB_OT_LAYOUT_TABLE(AAT, kerx) \
- HB_OT_LAYOUT_TABLE(AAT, ankr) \
- HB_OT_LAYOUT_TABLE(AAT, trak) \
- /* OpenType variations. */ \
- HB_OT_LAYOUT_TABLE(OT, fvar) \
- HB_OT_LAYOUT_TABLE(OT, avar) \
- HB_OT_LAYOUT_TABLE(OT, MVAR) \
- /* OpenType color. */ \
- HB_OT_LAYOUT_TABLE(OT, COLR) \
- HB_OT_LAYOUT_TABLE(OT, CPAL) \
- HB_OT_LAYOUT_TABLE(OT, CBDT) \
- HB_OT_LAYOUT_TABLE(OT, CBLC) \
- HB_OT_LAYOUT_TABLE(OT, sbix) \
- HB_OT_LAYOUT_TABLE(OT, svg) \
- /* OpenType math. */ \
- HB_OT_LAYOUT_TABLE(OT, MATH) \
- /* OpenType fundamentals. */ \
- HB_OT_LAYOUT_TABLE(OT, post) \
- /* */
-
-/* Declare tables. */
-#define HB_OT_LAYOUT_TABLE(Namespace, Type) namespace Namespace { struct Type; }
-HB_OT_LAYOUT_TABLES
-#undef HB_OT_LAYOUT_TABLE
-
-struct hb_ot_layout_t
-{
- unsigned int gsub_lookup_count;
- unsigned int gpos_lookup_count;
-
- hb_ot_layout_lookup_accelerator_t *gsub_accels;
- hb_ot_layout_lookup_accelerator_t *gpos_accels;
-
- /* Various non-shaping tables. */
- struct tables_t
- {
- HB_INTERNAL void init0 (hb_face_t *face);
- HB_INTERNAL void fini (void);
-
-#define HB_OT_LAYOUT_TABLE_ORDER(Namespace, Type) \
- HB_PASTE (ORDER_, HB_PASTE (Namespace, HB_PASTE (_, Type)))
- enum order_t
- {
- ORDER_ZERO,
-#define HB_OT_LAYOUT_TABLE(Namespace, Type) \
- HB_OT_LAYOUT_TABLE_ORDER (Namespace, Type),
- HB_OT_LAYOUT_TABLES
-#undef HB_OT_LAYOUT_TABLE
- };
-
- hb_face_t *face; /* MUST be JUST before the lazy loaders. */
-#define HB_OT_LAYOUT_TABLE(Namespace, Type) \
- hb_table_lazy_loader_t<struct Namespace::Type, HB_OT_LAYOUT_TABLE_ORDER (Namespace, Type)> Type;
- HB_OT_LAYOUT_TABLES
-#undef HB_OT_LAYOUT_TABLE
- } table;
-};
-
-
-HB_INTERNAL hb_ot_layout_t *
-_hb_ot_layout_create (hb_face_t *face);
-
-HB_INTERNAL void
-_hb_ot_layout_destroy (hb_ot_layout_t *layout);
-
-
-#define hb_ot_layout_from_face(face) ((hb_ot_layout_t *) face->shaper_data.ot.get_relaxed ())
-
-
/*
* Buffer var routines.
*/
@@ -701,4 +622,4 @@ _hb_buffer_assert_gsubgpos_vars (hb_buffer_t *buffer)
#undef lig_props
#undef glyph_props
-#endif /* HB_OT_LAYOUT_PRIVATE_HH */
+#endif /* HB_OT_LAYOUT_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc
index f26cac9b102..29f52dcc28d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc
@@ -26,9 +26,9 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-ot-map-private.hh"
+#include "hb-ot-map.hh"
-#include "hb-ot-layout-private.hh"
+#include "hb-ot-layout.hh"
void hb_ot_map_t::collect_lookups (unsigned int table_index, hb_set_t *lookups_out) const
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.hh
index 4aaf3283113..32a9e7e003d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.hh
@@ -26,10 +26,10 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_OT_MAP_PRIVATE_HH
-#define HB_OT_MAP_PRIVATE_HH
+#ifndef HB_OT_MAP_HH
+#define HB_OT_MAP_HH
-#include "hb-buffer-private.hh"
+#include "hb-buffer.hh"
struct hb_ot_shape_plan_t;
@@ -250,4 +250,4 @@ struct hb_ot_map_builder_t
-#endif /* HB_OT_MAP_PRIVATE_HH */
+#endif /* HB_OT_MAP_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math-table.hh
index 2dd714580d5..b7ca167b179 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math-table.hh
@@ -27,8 +27,8 @@
#ifndef HB_OT_MATH_TABLE_HH
#define HB_OT_MATH_TABLE_HH
-#include "hb-open-type-private.hh"
-#include "hb-ot-layout-common-private.hh"
+#include "hb-open-type.hh"
+#include "hb-ot-layout-common.hh"
#include "hb-ot-math.h"
namespace OT {
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math.cc
index 66ce207a799..c693f4807be 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math.cc
@@ -24,17 +24,17 @@
* Igalia Author(s): Frédéric Wang
*/
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
-#include "hb-ot-layout-private.hh"
+#include "hb-ot-face.hh"
#include "hb-ot-math-table.hh"
static inline const OT::MATH&
_get_math (hb_face_t *face)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::MATH);
- hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
- return *(layout->table.MATH.get ());
+ hb_ot_face_data_t * data = hb_ot_face_data (face);
+ return *(data->MATH.get ());
}
/*
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-maxp-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-maxp-table.hh
index 75aac4f44bb..efcf593e956 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-maxp-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-maxp-table.hh
@@ -27,8 +27,7 @@
#ifndef HB_OT_MAXP_TABLE_HH
#define HB_OT_MAXP_TABLE_HH
-#include "hb-open-type-private.hh"
-#include "hb-subset-plan.hh"
+#include "hb-open-type.hh"
namespace OT {
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name-table.hh
index bff85df27fd..a1de1193f00 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name-table.hh
@@ -27,7 +27,7 @@
#ifndef HB_OT_NAME_TABLE_HH
#define HB_OT_NAME_TABLE_HH
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
namespace OT {
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-table.hh
index 56bbab74118..f28858c592b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-table.hh
@@ -27,9 +27,8 @@
#ifndef HB_OT_OS2_TABLE_HH
#define HB_OT_OS2_TABLE_HH
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
#include "hb-ot-os2-unicode-ranges.hh"
-#include "hb-subset-plan.hh"
namespace OT {
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-unicode-ranges.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-unicode-ranges.hh
index cb1260784d5..42dfa490680 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-unicode-ranges.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-unicode-ranges.hh
@@ -27,7 +27,7 @@
#ifndef HB_OT_OS2_UNICODE_RANGES_HH
#define HB_OT_OS2_UNICODE_RANGES_HH
-#include "hb-private.hh"
+#include "hb.hh"
namespace OT {
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-macroman.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-macroman.hh
index dbbb97e5a9f..b4df8aaeeab 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-macroman.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-macroman.hh
@@ -27,7 +27,7 @@
#ifndef HB_OT_POST_MACROMAN_HH
#if 0 /* Make checks happy. */
#define HB_OT_POST_MACROMAN_HH
-#include "hb-private.hh"
+#include "hb.hh"
#endif
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh
index 4f08a51a2c1..d0265d056dd 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh
@@ -27,8 +27,7 @@
#ifndef HB_OT_POST_TABLE_HH
#define HB_OT_POST_TABLE_HH
-#include "hb-open-type-private.hh"
-#include "hb-subset-plan.hh"
+#include "hb-open-type.hh"
#define HB_STRING_ARRAY_NAME format1_names
#define HB_STRING_ARRAY_LIST "hb-ot-post-macroman.hh"
@@ -295,6 +294,8 @@ struct post
DEFINE_SIZE_STATIC (32);
};
+struct post_accelerator_t : post::accelerator_t {};
+
} /* namespace OT */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-fallback.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-fallback.hh
index a55511aa069..0ef60f64347 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-fallback.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-fallback.hh
@@ -27,9 +27,9 @@
#ifndef HB_OT_SHAPE_COMPLEX_ARABIC_FALLBACK_HH
#define HB_OT_SHAPE_COMPLEX_ARABIC_FALLBACK_HH
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-ot-shape-private.hh"
+#include "hb-ot-shape.hh"
#include "hb-ot-layout-gsub-table.hh"
@@ -173,7 +173,6 @@ arabic_fallback_synthesize_lookup_ligature (const hb_ot_shape_plan_t *plan HB_UN
ligatures_supplier,
component_count_supplier,
component_supplier);
-
c.end_serialize ();
/* TODO sanitize the results? */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-win1256.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-win1256.hh
index 54c6cdc24f1..b15e145f2f4 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-win1256.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-win1256.hh
@@ -313,7 +313,7 @@ OT_TABLE_END
* Include a second time to get the table data...
*/
#if 0
-#include "hb-private.hh" /* Make check-includes.sh happy. */
+#include "hb.hh" /* Make check-includes.sh happy. */
#endif
#ifdef OT_MEASURE
#include "hb-ot-shape-complex-arabic-win1256.hh"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc
index f4b397b932c..ebc1d3d5fd0 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc
@@ -24,9 +24,9 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
-#include "hb-ot-shape-complex-arabic-private.hh"
-#include "hb-ot-shape-private.hh"
+#include "hb.hh"
+#include "hb-ot-shape-complex-arabic.hh"
+#include "hb-ot-shape.hh"
/* buffer var allocations */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.hh
index fcedc7d7420..5bf6ff6338a 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.hh
@@ -26,12 +26,12 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_OT_SHAPE_COMPLEX_ARABIC_PRIVATE_HH
-#define HB_OT_SHAPE_COMPLEX_ARABIC_PRIVATE_HH
+#ifndef HB_OT_SHAPE_COMPLEX_ARABIC_HH
+#define HB_OT_SHAPE_COMPLEX_ARABIC_HH
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-ot-shape-complex-private.hh"
+#include "hb-ot-shape-complex.hh"
struct arabic_shape_plan_t;
@@ -47,4 +47,4 @@ setup_masks_arabic_plan (const arabic_shape_plan_t *arabic_plan,
hb_buffer_t *buffer,
hb_script_t script);
-#endif /* HB_OT_SHAPE_COMPLEX_ARABIC_PRIVATE_HH */
+#endif /* HB_OT_SHAPE_COMPLEX_ARABIC_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-default.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-default.cc
index 68a62a10d44..45d5f434673 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-default.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-default.cc
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-ot-shape-complex-private.hh"
+#include "hb-ot-shape-complex.hh"
const hb_ot_complex_shaper_t _hb_ot_complex_shaper_default =
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc
index 7420c5d181b..ea731114a88 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-ot-shape-complex-private.hh"
+#include "hb-ot-shape-complex.hh"
/* Hangul shaper */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hebrew.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hebrew.cc
index 34cf28b8e24..ba25258a33b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hebrew.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hebrew.cc
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-ot-shape-complex-private.hh"
+#include "hb-ot-shape-complex.hh"
static bool
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-machine.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-machine.hh
index 73f9d58719f..f67a525c5aa 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-machine.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-machine.hh
@@ -29,7 +29,7 @@
#ifndef HB_OT_SHAPE_COMPLEX_INDIC_MACHINE_HH
#define HB_OT_SHAPE_COMPLEX_INDIC_MACHINE_HH
-#include "hb-private.hh"
+#include "hb.hh"
#line 36 "hb-ot-shape-complex-indic-machine.hh"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-machine.rl b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-machine.rl
index 35e7ce9067c..d384a68c35e 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-machine.rl
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-machine.rl
@@ -27,7 +27,7 @@
#ifndef HB_OT_SHAPE_COMPLEX_INDIC_MACHINE_HH
#define HB_OT_SHAPE_COMPLEX_INDIC_MACHINE_HH
-#include "hb-private.hh"
+#include "hb.hh"
%%{
machine indic_syllable_machine;
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-table.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-table.cc
index 54291bc22d8..b7e4e7c7c0b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-table.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-table.cc
@@ -14,7 +14,7 @@
* # Date: 2017-10-16, 24:39:00 GMT [KW]
*/
-#include "hb-ot-shape-complex-indic-private.hh"
+#include "hb-ot-shape-complex-indic.hh"
#define ISC_A INDIC_SYLLABIC_CATEGORY_AVAGRAHA /* 16 chars; Avagraha */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc
index b52656f44c6..d4541bb18ab 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc
@@ -24,8 +24,8 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-ot-shape-complex-indic-private.hh"
-#include "hb-ot-layout-private.hh"
+#include "hb-ot-shape-complex-indic.hh"
+#include "hb-ot-layout.hh"
/*
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.hh
index bb7fff38414..9e597797c88 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.hh
@@ -24,14 +24,14 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_OT_SHAPE_COMPLEX_INDIC_PRIVATE_HH
-#define HB_OT_SHAPE_COMPLEX_INDIC_PRIVATE_HH
+#ifndef HB_OT_SHAPE_COMPLEX_INDIC_HH
+#define HB_OT_SHAPE_COMPLEX_INDIC_HH
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-ot-shape-complex-private.hh"
-#include "hb-ot-shape-private.hh" /* XXX Remove */
+#include "hb-ot-shape-complex.hh"
+#include "hb-ot-shape.hh" /* XXX Remove */
/* buffer var allocations */
@@ -400,4 +400,4 @@ set_indic_properties (hb_glyph_info_t &info)
}
-#endif /* HB_OT_SHAPE_COMPLEX_INDIC_PRIVATE_HH */
+#endif /* HB_OT_SHAPE_COMPLEX_INDIC_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer-machine.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer-machine.hh
index d001021561f..a7e1711eb09 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer-machine.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer-machine.hh
@@ -29,7 +29,7 @@
#ifndef HB_OT_SHAPE_COMPLEX_KHMER_MACHINE_HH
#define HB_OT_SHAPE_COMPLEX_KHMER_MACHINE_HH
-#include "hb-private.hh"
+#include "hb.hh"
#line 36 "hb-ot-shape-complex-khmer-machine.hh"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer-machine.rl b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer-machine.rl
index 54644d8aa6b..7c7951629cc 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer-machine.rl
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer-machine.rl
@@ -27,7 +27,7 @@
#ifndef HB_OT_SHAPE_COMPLEX_KHMER_MACHINE_HH
#define HB_OT_SHAPE_COMPLEX_KHMER_MACHINE_HH
-#include "hb-private.hh"
+#include "hb.hh"
%%{
machine khmer_syllable_machine;
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc
index 264515e86c4..0b5b50a972e 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc
@@ -24,8 +24,8 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-ot-shape-complex-khmer-private.hh"
-#include "hb-ot-layout-private.hh"
+#include "hb-ot-shape-complex-khmer.hh"
+#include "hb-ot-layout.hh"
/*
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.hh
index f90ef967440..3371c130216 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.hh
@@ -24,12 +24,12 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_OT_SHAPE_COMPLEX_KHMER_PRIVATE_HH
-#define HB_OT_SHAPE_COMPLEX_KHMER_PRIVATE_HH
+#ifndef HB_OT_SHAPE_COMPLEX_KHMER_HH
+#define HB_OT_SHAPE_COMPLEX_KHMER_HH
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-ot-shape-complex-indic-private.hh"
+#include "hb-ot-shape-complex-indic.hh"
/* buffer var allocations */
@@ -121,4 +121,4 @@ set_khmer_properties (hb_glyph_info_t &info)
}
-#endif /* HB_OT_SHAPE_COMPLEX_KHMER_PRIVATE_HH */
+#endif /* HB_OT_SHAPE_COMPLEX_KHMER_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar-machine.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar-machine.hh
index fb67dd42e64..7fa23517807 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar-machine.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar-machine.hh
@@ -29,7 +29,7 @@
#ifndef HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH
#define HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH
-#include "hb-private.hh"
+#include "hb.hh"
#line 36 "hb-ot-shape-complex-myanmar-machine.hh"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar-machine.rl b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar-machine.rl
index 0cd84fa1b88..62f51d1e9e8 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar-machine.rl
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar-machine.rl
@@ -27,7 +27,7 @@
#ifndef HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH
#define HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH
-#include "hb-private.hh"
+#include "hb.hh"
%%{
machine myanmar_syllable_machine;
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc
index e4214b87e3c..8466f8129d5 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-ot-shape-complex-myanmar-private.hh"
+#include "hb-ot-shape-complex-myanmar.hh"
/*
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.hh
index 14d011d67d8..7b6fd4837c7 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.hh
@@ -24,12 +24,12 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_OT_SHAPE_COMPLEX_MYANMAR_PRIVATE_HH
-#define HB_OT_SHAPE_COMPLEX_MYANMAR_PRIVATE_HH
+#ifndef HB_OT_SHAPE_COMPLEX_MYANMAR_HH
+#define HB_OT_SHAPE_COMPLEX_MYANMAR_HH
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-ot-shape-complex-indic-private.hh"
+#include "hb-ot-shape-complex-indic.hh"
/* buffer var allocations */
@@ -168,4 +168,4 @@ set_myanmar_properties (hb_glyph_info_t &info)
}
-#endif /* HB_OT_SHAPE_COMPLEX_MYANMAR_PRIVATE_HH */
+#endif /* HB_OT_SHAPE_COMPLEX_MYANMAR_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc
index 02d78ac04a5..1d18760e4da 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-ot-shape-complex-private.hh"
+#include "hb-ot-shape-complex.hh"
/* Thai / Lao shaper */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-tibetan.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-tibetan.cc
index eaac0bf689f..9982ebc29f0 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-tibetan.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-tibetan.cc
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-ot-shape-complex-private.hh"
+#include "hb-ot-shape-complex.hh"
static const hb_tag_t tibetan_features[] =
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.hh
index 0ec805afca5..77ca3aeb52a 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.hh
@@ -31,7 +31,7 @@
#ifndef HB_OT_SHAPE_COMPLEX_USE_MACHINE_HH
#define HB_OT_SHAPE_COMPLEX_USE_MACHINE_HH
-#include "hb-private.hh"
+#include "hb.hh"
#line 38 "hb-ot-shape-complex-use-machine.hh"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.rl b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.rl
index 7ec8a7fd172..a233b1200c1 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.rl
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.rl
@@ -29,7 +29,7 @@
#ifndef HB_OT_SHAPE_COMPLEX_USE_MACHINE_HH
#define HB_OT_SHAPE_COMPLEX_USE_MACHINE_HH
-#include "hb-private.hh"
+#include "hb.hh"
%%{
machine use_syllable_machine;
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc
index 9c796f05182..4862b7fe943 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc
@@ -15,7 +15,7 @@
* UnicodeData.txt does not have a header.
*/
-#include "hb-ot-shape-complex-use-private.hh"
+#include "hb-ot-shape-complex-use.hh"
#define B USE_B /* BASE */
#define CGJ USE_CGJ /* CGJ */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc
index f8e86c9d6e6..676b15b6e9c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc
@@ -26,8 +26,8 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-ot-shape-complex-use-private.hh"
-#include "hb-ot-shape-complex-arabic-private.hh"
+#include "hb-ot-shape-complex-use.hh"
+#include "hb-ot-shape-complex-arabic.hh"
/* buffer var allocations */
#define use_category() complex_var_u8_0()
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.hh
index b4bda8bb778..b8123e7914c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.hh
@@ -26,13 +26,13 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_OT_SHAPE_COMPLEX_USE_PRIVATE_HH
-#define HB_OT_SHAPE_COMPLEX_USE_PRIVATE_HH
+#ifndef HB_OT_SHAPE_COMPLEX_USE_HH
+#define HB_OT_SHAPE_COMPLEX_USE_HH
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-ot-shape-complex-private.hh"
+#include "hb-ot-shape-complex.hh"
#define USE_TABLE_ELEMENT_TYPE uint8_t
@@ -94,4 +94,4 @@ enum use_category_t {
HB_INTERNAL USE_TABLE_ELEMENT_TYPE
hb_use_get_category (hb_codepoint_t u);
-#endif /* HB_OT_SHAPE_COMPLEX_USE_PRIVATE_HH */
+#endif /* HB_OT_SHAPE_COMPLEX_USE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex.hh
index 37a4d918b1d..a48a38a2015 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex.hh
@@ -24,13 +24,13 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_OT_SHAPE_COMPLEX_PRIVATE_HH
-#define HB_OT_SHAPE_COMPLEX_PRIVATE_HH
+#ifndef HB_OT_SHAPE_COMPLEX_HH
+#define HB_OT_SHAPE_COMPLEX_HH
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-ot-shape-private.hh"
-#include "hb-ot-shape-normalize-private.hh"
+#include "hb-ot-shape.hh"
+#include "hb-ot-shape-normalize.hh"
@@ -390,4 +390,4 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner)
}
-#endif /* HB_OT_SHAPE_COMPLEX_PRIVATE_HH */
+#endif /* HB_OT_SHAPE_COMPLEX_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc
index fbf31ab249b..5f43023bec1 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc
@@ -24,8 +24,8 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-ot-shape-fallback-private.hh"
-#include "hb-ot-layout-gsubgpos-private.hh"
+#include "hb-ot-shape-fallback.hh"
+#include "hb-ot-layout-gsubgpos.hh"
static unsigned int
recategorize_combining_class (hb_codepoint_t u,
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.hh
index e134224df92..730e7f28068 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.hh
@@ -24,12 +24,12 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_OT_SHAPE_FALLBACK_PRIVATE_HH
-#define HB_OT_SHAPE_FALLBACK_PRIVATE_HH
+#ifndef HB_OT_SHAPE_FALLBACK_HH
+#define HB_OT_SHAPE_FALLBACK_HH
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-ot-shape-private.hh"
+#include "hb-ot-shape.hh"
HB_INTERNAL void _hb_ot_shape_fallback_position (const hb_ot_shape_plan_t *plan,
@@ -50,4 +50,4 @@ HB_INTERNAL void _hb_ot_shape_fallback_spaces (const hb_ot_shape_plan_t *plan,
hb_buffer_t *buffer);
-#endif /* HB_OT_SHAPE_FALLBACK_PRIVATE_HH */
+#endif /* HB_OT_SHAPE_FALLBACK_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize.cc
index 358450ee7f0..fd0b63aecd3 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize.cc
@@ -24,9 +24,9 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-ot-shape-normalize-private.hh"
-#include "hb-ot-shape-complex-private.hh"
-#include "hb-ot-shape-private.hh"
+#include "hb-ot-shape-normalize.hh"
+#include "hb-ot-shape-complex.hh"
+#include "hb-ot-shape.hh"
/*
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize.hh
index c744e26451d..4aea640b165 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize.hh
@@ -24,10 +24,10 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_OT_SHAPE_NORMALIZE_PRIVATE_HH
-#define HB_OT_SHAPE_NORMALIZE_PRIVATE_HH
+#ifndef HB_OT_SHAPE_NORMALIZE_HH
+#define HB_OT_SHAPE_NORMALIZE_HH
-#include "hb-private.hh"
+#include "hb.hh"
/* buffer var allocations, used during the normalization process */
@@ -66,4 +66,4 @@ struct hb_ot_shape_normalize_context_t
};
-#endif /* HB_OT_SHAPE_NORMALIZE_PRIVATE_HH */
+#endif /* HB_OT_SHAPE_NORMALIZE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc
index 71632b563c4..63102f6b0cf 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc
@@ -27,21 +27,21 @@
*/
#define HB_SHAPER ot
-#define hb_ot_face_data_t hb_ot_layout_t
#define hb_ot_shape_plan_data_t hb_ot_shape_plan_t
-#include "hb-shaper-impl-private.hh"
+#include "hb-shaper-impl.hh"
-#include "hb-ot-shape-private.hh"
-#include "hb-ot-shape-complex-private.hh"
-#include "hb-ot-shape-fallback-private.hh"
-#include "hb-ot-shape-normalize-private.hh"
+#include "hb-ot-shape.hh"
+#include "hb-ot-shape-complex.hh"
+#include "hb-ot-shape-fallback.hh"
+#include "hb-ot-shape-normalize.hh"
-#include "hb-ot-layout-private.hh"
-#include "hb-unicode-private.hh"
-#include "hb-set-private.hh"
+#include "hb-ot-face.hh"
+#include "hb-ot-layout.hh"
+#include "hb-unicode.hh"
+#include "hb-set.hh"
-#include "hb-ot-layout-gsubgpos-private.hh"
-#include "hb-aat-layout-private.hh"
+#include "hb-ot-layout-gsubgpos.hh"
+#include "hb-aat-layout.hh"
static hb_tag_t common_features[] = {
HB_TAG('c','c','m','p'),
@@ -135,13 +135,13 @@ HB_SHAPER_DATA_ENSURE_DEFINE(ot, face)
hb_ot_face_data_t *
_hb_ot_shaper_face_data_create (hb_face_t *face)
{
- return _hb_ot_layout_create (face);
+ return _hb_ot_face_data_create (face);
}
void
_hb_ot_shaper_face_data_destroy (hb_ot_face_data_t *data)
{
- _hb_ot_layout_destroy (data);
+ _hb_ot_face_data_destroy (data);
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.hh
index d6898263f24..b3a490a3723 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.hh
@@ -24,13 +24,13 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_OT_SHAPE_PRIVATE_HH
-#define HB_OT_SHAPE_PRIVATE_HH
+#ifndef HB_OT_SHAPE_HH
+#define HB_OT_SHAPE_HH
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-ot-map-private.hh"
-#include "hb-ot-layout-private.hh"
+#include "hb-ot-map.hh"
+#include "hb-ot-layout.hh"
@@ -109,4 +109,4 @@ struct hb_ot_shape_planner_t
};
-#endif /* HB_OT_SHAPE_PRIVATE_HH */
+#endif /* HB_OT_SHAPE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc
index 991d8e77ab8..283723e27d8 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc
@@ -26,7 +26,7 @@
* Google Author(s): Behdad Esfahbod, Roozbeh Pournader
*/
-#include "hb-private.hh"
+#include "hb.hh"
/* hb_script_t */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-avar-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-avar-table.hh
index ad063d32de8..8343018b32f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-avar-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-avar-table.hh
@@ -27,7 +27,7 @@
#ifndef HB_OT_VAR_AVAR_TABLE_HH
#define HB_OT_VAR_AVAR_TABLE_HH
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
/*
* avar -- Axis Variations
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh
index 101476ed322..afd29046e15 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh
@@ -27,7 +27,7 @@
#ifndef HB_OT_VAR_FVAR_TABLE_HH
#define HB_OT_VAR_FVAR_TABLE_HH
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
/*
* fvar -- Font Variations
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-hvar-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-hvar-table.hh
index 2b384db71a0..086e922fdc8 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-hvar-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-hvar-table.hh
@@ -27,7 +27,7 @@
#ifndef HB_OT_VAR_HVAR_TABLE_HH
#define HB_OT_VAR_HVAR_TABLE_HH
-#include "hb-ot-layout-common-private.hh"
+#include "hb-ot-layout-common.hh"
namespace OT {
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-mvar-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-mvar-table.hh
index dfde782f664..20dd2200c50 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-mvar-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-mvar-table.hh
@@ -27,7 +27,7 @@
#ifndef HB_OT_VAR_MVAR_TABLE_HH
#define HB_OT_VAR_MVAR_TABLE_HH
-#include "hb-ot-layout-common-private.hh"
+#include "hb-ot-layout-common.hh"
namespace OT {
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var.cc
index 6081ddfc389..472ee845224 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var.cc
@@ -24,9 +24,9 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
-#include "hb-ot-layout-private.hh"
+#include "hb-ot-face.hh"
#include "hb-ot-var-avar-table.hh"
#include "hb-ot-var-fvar-table.hh"
#include "hb-ot-var-mvar-table.hh"
@@ -40,15 +40,15 @@ static inline const OT::fvar&
_get_fvar (hb_face_t *face)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::fvar);
- hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
- return *(layout->table.fvar.get ());
+ hb_ot_face_data_t *layout = hb_ot_face_data (face);
+ return *(layout->fvar.get ());
}
static inline const OT::avar&
_get_avar (hb_face_t *face)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::avar);
- hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
- return *(layout->table.avar.get ());
+ hb_ot_face_data_t *layout = hb_ot_face_data (face);
+ return *(layout->avar.get ());
}
/**
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-digest-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-digest.hh
index e099a826414..0f9329f621c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-digest-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-digest.hh
@@ -24,10 +24,10 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_SET_DIGEST_PRIVATE_HH
-#define HB_SET_DIGEST_PRIVATE_HH
+#ifndef HB_SET_DIGEST_HH
+#define HB_SET_DIGEST_HH
-#include "hb-private.hh"
+#include "hb.hh"
/*
* The set digests here implement various "filters" that support
@@ -50,8 +50,8 @@ struct hb_set_digest_lowest_bits_t
{
ASSERT_POD ();
- static const unsigned int mask_bytes = sizeof (mask_t);
- static const unsigned int mask_bits = sizeof (mask_t) * 8;
+ enum { mask_bytes = sizeof (mask_t) };
+ enum { mask_bits = sizeof (mask_t) * 8 };
static const unsigned int num_bits = 0
+ (mask_bytes >= 1 ? 3 : 0)
+ (mask_bytes >= 2 ? 1 : 0)
@@ -176,4 +176,4 @@ typedef hb_set_digest_combiner_t
> hb_set_digest_t;
-#endif /* HB_SET_DIGEST_PRIVATE_HH */
+#endif /* HB_SET_DIGEST_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc
index 25027e6c216..09dc4b483af 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-set-private.hh"
+#include "hb-set.hh"
/* Public API */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.hh
index 032ddb1ee20..353403e9297 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.hh
@@ -24,10 +24,10 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_SET_PRIVATE_HH
-#define HB_SET_PRIVATE_HH
+#ifndef HB_SET_HH
+#define HB_SET_HH
-#include "hb-private.hh"
+#include "hb.hh"
/*
@@ -157,7 +157,7 @@ struct hb_set_t
}
typedef unsigned long long elt_t;
- static const unsigned int PAGE_BITS = 512;
+ enum { PAGE_BITS = 512 };
static_assert ((PAGE_BITS & ((PAGE_BITS) - 1)) == 0, "");
static inline unsigned int elt_get_min (const elt_t &elt) { return hb_ctz (elt); }
@@ -165,11 +165,11 @@ struct hb_set_t
typedef hb_vector_size_t<elt_t, PAGE_BITS / 8> vector_t;
- static const unsigned int ELT_BITS = sizeof (elt_t) * 8;
- static const unsigned int ELT_MASK = ELT_BITS - 1;
- static const unsigned int BITS = sizeof (vector_t) * 8;
- static const unsigned int MASK = BITS - 1;
- static_assert (PAGE_BITS == BITS, "");
+ enum { ELT_BITS = sizeof (elt_t) * 8 };
+ enum { ELT_MASK = ELT_BITS - 1 };
+ enum { BITS = sizeof (vector_t) * 8 };
+ enum { MASK = BITS - 1 };
+ static_assert ((unsigned) PAGE_BITS == (unsigned) BITS, "");
elt_t &elt (hb_codepoint_t g) { return v[(g & MASK) / ELT_BITS]; }
elt_t const &elt (hb_codepoint_t g) const { return v[(g & MASK) / ELT_BITS]; }
@@ -697,4 +697,4 @@ struct hb_set_t
};
-#endif /* HB_SET_PRIVATE_HH */
+#endif /* HB_SET_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc
index 0d61d9e1f2a..b0cf1e92d1d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc
@@ -24,11 +24,11 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
-#include "hb-shape-plan-private.hh"
-#include "hb-shaper-private.hh"
-#include "hb-font-private.hh"
-#include "hb-buffer-private.hh"
+#include "hb.hh"
+#include "hb-shape-plan.hh"
+#include "hb-shaper.hh"
+#include "hb-font.hh"
+#include "hb-buffer.hh"
static void
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.hh
index 7d020ff16be..bf82b912be0 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.hh
@@ -24,11 +24,11 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_SHAPE_PLAN_PRIVATE_HH
-#define HB_SHAPE_PLAN_PRIVATE_HH
+#ifndef HB_SHAPE_PLAN_HH
+#define HB_SHAPE_PLAN_HH
-#include "hb-private.hh"
-#include "hb-shaper-private.hh"
+#include "hb.hh"
+#include "hb-shaper.hh"
struct hb_shape_plan_t
@@ -64,4 +64,4 @@ DECLARE_NULL_INSTANCE (hb_shape_plan_t);
#undef HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS
-#endif /* HB_SHAPE_PLAN_PRIVATE_HH */
+#endif /* HB_SHAPE_PLAN_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape.cc
index 3c2e6c4a969..e8eeff5b354 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape.cc
@@ -26,13 +26,13 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-shaper-private.hh"
-#include "hb-shape-plan-private.hh"
-#include "hb-buffer-private.hh"
-#include "hb-font-private.hh"
-#include "hb-machinery-private.hh"
+#include "hb-shaper.hh"
+#include "hb-shape-plan.hh"
+#include "hb-buffer.hh"
+#include "hb-font.hh"
+#include "hb-machinery.hh"
/**
* SECTION:hb-shape
@@ -46,8 +46,10 @@
* contains the output glyphs and their positions.
**/
-
+#ifdef HB_USE_ATEXIT
static void free_static_shaper_list (void);
+#endif
+
static const char *nil_shaper_list[] = {nullptr};
static struct hb_shaper_list_lazy_loader_t : hb_lazy_loader_t<const char *,
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper-impl-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper-impl.hh
index 4a10279c794..d40cb085a23 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper-impl-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper-impl.hh
@@ -24,15 +24,15 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_SHAPER_IMPL_PRIVATE_HH
-#define HB_SHAPER_IMPL_PRIVATE_HH
+#ifndef HB_SHAPER_IMPL_HH
+#define HB_SHAPER_IMPL_HH
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-shaper-private.hh"
-#include "hb-shape-plan-private.hh"
-#include "hb-font-private.hh"
-#include "hb-buffer-private.hh"
+#include "hb-shaper.hh"
+#include "hb-shape-plan.hh"
+#include "hb-font.hh"
+#include "hb-buffer.hh"
#ifdef HB_SHAPER
@@ -40,4 +40,4 @@
#endif
-#endif /* HB_SHAPER_IMPL_PRIVATE_HH */
+#endif /* HB_SHAPER_IMPL_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper.cc
index e423f2557c5..52418c08234 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper.cc
@@ -24,9 +24,9 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
-#include "hb-shaper-private.hh"
-#include "hb-machinery-private.hh"
+#include "hb.hh"
+#include "hb-shaper.hh"
+#include "hb-machinery.hh"
static const hb_shaper_pair_t all_shapers[] = {
@@ -35,8 +35,9 @@ static const hb_shaper_pair_t all_shapers[] = {
#undef HB_SHAPER_IMPLEMENT
};
-
+#ifdef HB_USE_ATEXIT
static void free_static_shapers (void);
+#endif
static struct hb_shapers_lazy_loader_t : hb_lazy_loader_t<const hb_shaper_pair_t,
hb_shapers_lazy_loader_t>
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper.hh
index fb04bbc3cf5..361165e4f95 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shaper.hh
@@ -24,10 +24,10 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_SHAPER_PRIVATE_HH
-#define HB_SHAPER_PRIVATE_HH
+#ifndef HB_SHAPER_HH
+#define HB_SHAPER_HH
-#include "hb-private.hh"
+#include "hb.hh"
typedef hb_bool_t hb_shape_func_t (hb_shape_plan_t *shape_plan,
hb_font_t *font,
@@ -131,4 +131,4 @@ struct hb_shaper_data_t {
#define HB_SHAPERS_COUNT (sizeof (hb_shaper_data_t) / sizeof (void *))
-#endif /* HB_SHAPER_PRIVATE_HH */
+#endif /* HB_SHAPER_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-static.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-static.cc
index ddecbba1154..5112d77be0a 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-static.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-static.cc
@@ -24,12 +24,12 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-open-type-private.hh"
-#include "hb-ot-layout-common-private.hh"
+#include "hb-open-type.hh"
+#include "hb-ot-layout-common.hh"
-#include "hb-face-private.hh"
+#include "hb-face.hh"
#include "hb-ot-head-table.hh"
#include "hb-ot-maxp-table.hh"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-string-array.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-string-array.hh
index 679841c87d2..c4cf666d721 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-string-array.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-string-array.hh
@@ -29,7 +29,7 @@
#define HB_STRING_ARRAY_HH
#endif
-#include "hb-private.hh"
+#include "hb.hh"
/* Based on Bruno Haible's code in Appendix B of Ulrich Drepper's dsohowto.pdf:
* https://software.intel.com/sites/default/files/m/a/1/e/dsohowto.pdf */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-glyf.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-glyf.cc
index 36af3beae72..499380a9773 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-glyf.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-glyf.cc
@@ -24,11 +24,10 @@
* Google Author(s): Garret Rieger, Roderick Sheeter
*/
-#include "hb-open-type-private.hh"
+#include "hb-open-type.hh"
#include "hb-ot-glyf-table.hh"
#include "hb-set.h"
#include "hb-subset-glyf.hh"
-#include "hb-subset-plan.hh"
static bool
_calculate_glyf_and_loca_prime_size (const OT::glyf::accelerator_t &glyf,
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-glyf.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-glyf.hh
index 99b76db9bbe..3109ecb643a 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-glyf.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-glyf.hh
@@ -27,9 +27,9 @@
#ifndef HB_SUBSET_GLYF_HH
#define HB_SUBSET_GLYF_HH
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-subset-plan.hh"
+#include "hb-subset.hh"
HB_INTERNAL bool
hb_subset_glyf_and_loca (hb_subset_plan_t *plan,
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc
index 74470fd1fa5..d59b5bae03c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc
@@ -24,8 +24,8 @@
* Google Author(s): Garret Rieger, Rod Sheeter, Behdad Esfahbod
*/
-#include "hb-subset-private.hh"
-#include "hb-set-private.hh"
+#include "hb-subset.hh"
+#include "hb-set.hh"
/**
* hb_subset_input_create_or_fail:
@@ -44,7 +44,7 @@ hb_subset_input_create_or_fail (void)
input->unicodes = hb_set_create ();
input->glyphs = hb_set_create ();
- input->drop_ot_layout = true;
+ input->drop_layout = true;
return input;
}
@@ -106,30 +106,28 @@ hb_subset_input_glyph_set (hb_subset_input_t *subset_input)
return subset_input->glyphs;
}
-/**
- * hb_subset_input_drop_hints:
- * @subset_input: a subset_input.
- *
- * Since: 1.8.0
- **/
-HB_EXTERN hb_bool_t *
-hb_subset_input_drop_hints (hb_subset_input_t *subset_input)
+HB_EXTERN void
+hb_subset_input_set_drop_hints (hb_subset_input_t *subset_input,
+ hb_bool_t drop_hints)
{
- return &subset_input->drop_hints;
+ subset_input->drop_hints = drop_hints;
}
-/**
- * hb_subset_input_drop_ot_layout:
- * @subset_input: a subset_input.
- *
- * If enabled ot layout tables will be dropped as part of
- * the subsetting operation. Currently this defaults to
- * true.
- *
- * Since: REPLACEME
- **/
-HB_EXTERN hb_bool_t *
-hb_subset_input_drop_ot_layout (hb_subset_input_t *subset_input)
+HB_EXTERN hb_bool_t
+hb_subset_input_get_drop_hints (hb_subset_input_t *subset_input)
+{
+ return subset_input->drop_hints;
+}
+
+HB_EXTERN void
+hb_subset_input_set_drop_layout (hb_subset_input_t *subset_input,
+ hb_bool_t drop_layout)
+{
+ subset_input->drop_layout = drop_layout;
+}
+
+HB_EXTERN hb_bool_t
+hb_subset_input_get_drop_layout (hb_subset_input_t *subset_input)
{
- return &subset_input->drop_ot_layout;
+ return subset_input->drop_layout;
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.hh
index 6b2b207fff6..9fc86154e40 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.hh
@@ -24,27 +24,26 @@
* Google Author(s): Garret Rieger, Roderick Sheeter
*/
-#ifndef HB_SUBSET_PRIVATE_HH
-#define HB_SUBSET_PRIVATE_HH
+#ifndef HB_SUBSET_INPUT_HH
+#define HB_SUBSET_INPUT_HH
-#include "hb-private.hh"
+#include "hb.hh"
#include "hb-subset.h"
-#include "hb-font-private.hh"
+#include "hb-font.hh"
-typedef struct hb_subset_face_data_t hb_subset_face_data_t;
-
-struct hb_subset_input_t {
+struct hb_subset_input_t
+{
hb_object_header_t header;
ASSERT_POD ();
hb_set_t *unicodes;
hb_set_t *glyphs;
- hb_bool_t drop_hints;
- hb_bool_t drop_ot_layout;
+ bool drop_hints : 1;
+ bool drop_layout : 1;
/* TODO
*
* features
@@ -54,10 +53,5 @@ struct hb_subset_input_t {
*/
};
-HB_INTERNAL hb_face_t *
-hb_subset_face_create (void);
-
-HB_INTERNAL hb_bool_t
-hb_subset_face_add_table (hb_face_t *face, hb_tag_t tag, hb_blob_t *blob);
-#endif /* HB_SUBSET_PRIVATE_HH */
+#endif /* HB_SUBSET_INPUT_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc
index 12566827251..0570060399d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc
@@ -24,11 +24,10 @@
* Google Author(s): Garret Rieger, Roderick Sheeter
*/
-#include "hb-map-private.hh"
-#include "hb-subset-private.hh"
-#include "hb-set-private.hh"
-
#include "hb-subset-plan.hh"
+#include "hb-map.hh"
+#include "hb-set.hh"
+
#include "hb-ot-cmap-table.hh"
#include "hb-ot-glyf-table.hh"
@@ -69,7 +68,7 @@ _gsub_closure (hb_face_t *face, hb_set_t *gids_to_retain)
}
-static void
+static hb_set_t *
_populate_gids_to_retain (hb_face_t *face,
const hb_set_t *unicodes,
bool close_over_gsub,
@@ -118,9 +117,10 @@ _populate_gids_to_retain (hb_face_t *face,
while (all_gids_to_retain->next (&gid))
glyphs->push (gid);
- hb_set_destroy (all_gids_to_retain);
glyf.fini ();
cmap.fini ();
+
+ return all_gids_to_retain;
}
static void
@@ -135,7 +135,7 @@ _create_old_gid_to_new_gid_map (const hb_vector_t<hb_codepoint_t> &glyphs,
/**
* hb_subset_plan_create:
* Computes a plan for subsetting the supplied face according
- * to a provide profile and input. The plan describes
+ * to a provided input. The plan describes
* which tables and glyphs should be retained.
*
* Return value: New subset plan.
@@ -144,26 +144,24 @@ _create_old_gid_to_new_gid_map (const hb_vector_t<hb_codepoint_t> &glyphs,
**/
hb_subset_plan_t *
hb_subset_plan_create (hb_face_t *face,
- hb_subset_profile_t *profile,
hb_subset_input_t *input)
{
hb_subset_plan_t *plan = hb_object_create<hb_subset_plan_t> ();
plan->drop_hints = input->drop_hints;
- plan->drop_ot_layout = input->drop_ot_layout;
+ plan->drop_layout = input->drop_layout;
plan->unicodes = hb_set_create();
plan->glyphs.init();
plan->source = hb_face_reference (face);
- plan->dest = hb_subset_face_create ();
+ plan->dest = hb_face_builder_create ();
plan->codepoint_to_glyph = hb_map_create();
plan->glyph_map = hb_map_create();
-
- _populate_gids_to_retain (face,
- input->unicodes,
- !plan->drop_ot_layout,
- plan->unicodes,
- plan->codepoint_to_glyph,
- &plan->glyphs);
+ plan->glyphset = _populate_gids_to_retain (face,
+ input->unicodes,
+ !plan->drop_layout,
+ plan->unicodes,
+ plan->codepoint_to_glyph,
+ &plan->glyphs);
_create_old_gid_to_new_gid_map (plan->glyphs,
plan->glyph_map);
@@ -186,6 +184,7 @@ hb_subset_plan_destroy (hb_subset_plan_t *plan)
hb_face_destroy (plan->dest);
hb_map_destroy (plan->codepoint_to_glyph);
hb_map_destroy (plan->glyph_map);
+ hb_set_destroy (plan->glyphset);
free (plan);
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh
index 7501294d702..c2c484a5bef 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh
@@ -27,27 +27,26 @@
#ifndef HB_SUBSET_PLAN_HH
#define HB_SUBSET_PLAN_HH
-#include "hb-private.hh"
+#include "hb.hh"
#include "hb-subset.h"
-#include "hb-subset-private.hh"
+#include "hb-subset-input.hh"
-#include "hb-map-private.hh"
+#include "hb-map.hh"
struct hb_subset_plan_t
{
hb_object_header_t header;
ASSERT_POD ();
- hb_bool_t drop_hints;
- hb_bool_t drop_ot_layout;
+ bool drop_hints : 1;
+ bool drop_layout : 1;
// For each cp that we'd like to retain maps to the corresponding gid.
hb_set_t *unicodes;
- // This list contains the complete set of glyphs to retain and may contain
- // more glyphs then the lists above.
hb_vector_t<hb_codepoint_t> glyphs;
+ hb_set_t *glyphset;
hb_map_t *codepoint_to_glyph;
hb_map_t *glyph_map;
@@ -56,7 +55,7 @@ struct hb_subset_plan_t
hb_face_t *source;
hb_face_t *dest;
- inline hb_bool_t
+ inline bool
new_gid_for_codepoint (hb_codepoint_t codepoint,
hb_codepoint_t *new_gid) const
{
@@ -67,7 +66,7 @@ struct hb_subset_plan_t
return new_gid_for_old_gid (old_gid, new_gid);
}
- inline hb_bool_t
+ inline bool
new_gid_for_old_gid (hb_codepoint_t old_gid,
hb_codepoint_t *new_gid) const
{
@@ -79,7 +78,7 @@ struct hb_subset_plan_t
return true;
}
- inline hb_bool_t
+ inline bool
add_table (hb_tag_t tag,
hb_blob_t *contents)
{
@@ -89,7 +88,7 @@ struct hb_subset_plan_t
hb_blob_get_length (contents),
hb_blob_get_length (source_blob));
hb_blob_destroy (source_blob);
- return hb_subset_face_add_table(dest, tag, contents);
+ return hb_face_builder_add_table (dest, tag, contents);
}
};
@@ -97,7 +96,6 @@ typedef struct hb_subset_plan_t hb_subset_plan_t;
HB_INTERNAL hb_subset_plan_t *
hb_subset_plan_create (hb_face_t *face,
- hb_subset_profile_t *profile,
hb_subset_input_t *input);
HB_INTERNAL void
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc
index 411c6b861c7..b714f291a88 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc
@@ -24,14 +24,13 @@
* Google Author(s): Garret Rieger, Rod Sheeter, Behdad Esfahbod
*/
-#include "hb-private.hh"
-#include "hb-open-type-private.hh"
+#include "hb.hh"
+#include "hb-open-type.hh"
+#include "hb-subset.hh"
#include "hb-subset-glyf.hh"
-#include "hb-subset-private.hh"
-#include "hb-subset-plan.hh"
-#include "hb-open-file-private.hh"
+#include "hb-open-file.hh"
#include "hb-ot-cmap-table.hh"
#include "hb-ot-glyf-table.hh"
#include "hb-ot-hdmx-table.hh"
@@ -41,42 +40,26 @@
#include "hb-ot-maxp-table.hh"
#include "hb-ot-os2-table.hh"
#include "hb-ot-post-table.hh"
+#include "hb-ot-layout-gsub-table.hh"
+#include "hb-ot-layout-gpos-table.hh"
-struct hb_subset_profile_t {
- hb_object_header_t header;
- ASSERT_POD ();
-};
-
-/**
- * hb_subset_profile_create:
- *
- * Return value: New profile with default settings.
- *
- * Since: 1.8.0
- **/
-hb_subset_profile_t *
-hb_subset_profile_create ()
+static unsigned int
+_plan_estimate_subset_table_size (hb_subset_plan_t *plan,
+ unsigned int table_len)
{
- return hb_object_create<hb_subset_profile_t>();
-}
+ unsigned int src_glyphs = plan->source->get_num_glyphs ();
+ unsigned int dst_glyphs = plan->glyphset->get_population ();
-/**
- * hb_subset_profile_destroy:
- *
- * Since: 1.8.0
- **/
-void
-hb_subset_profile_destroy (hb_subset_profile_t *profile)
-{
- if (!hb_object_destroy (profile)) return;
+ if (unlikely (!src_glyphs))
+ return 512 + table_len;
- free (profile);
+ return 512 + (unsigned int) (table_len * sqrt ((double) dst_glyphs / src_glyphs));
}
template<typename TableType>
static bool
-_subset (hb_subset_plan_t *plan)
+_subset2 (hb_subset_plan_t *plan)
{
hb_blob_t *source_blob = hb_sanitize_context_t ().reference_table<TableType> (plan->source);
const TableType *table = source_blob->as<TableType> ();
@@ -85,145 +68,69 @@ _subset (hb_subset_plan_t *plan)
hb_bool_t result = false;
if (source_blob->data)
{
- result = table->subset(plan);
- } else {
- DEBUG_MSG(SUBSET, nullptr, "OT::%c%c%c%c::subset sanitize failed on source table.", HB_UNTAG(tag));
+ hb_auto_t<hb_vector_t<char> > buf;
+ unsigned int buf_size = _plan_estimate_subset_table_size (plan, source_blob->length);
+ DEBUG_MSG(SUBSET, nullptr, "OT::%c%c%c%c initial estimated table size: %u bytes.", HB_UNTAG(tag), buf_size);
+ if (unlikely (!buf.alloc (buf_size)))
+ {
+ DEBUG_MSG(SUBSET, nullptr, "OT::%c%c%c%c failed to allocate %u bytes.", HB_UNTAG(tag), buf_size);
+ return false;
+ }
+ retry:
+ hb_serialize_context_t serializer (buf.arrayZ, buf_size);
+ hb_subset_context_t c (plan, &serializer);
+ result = table->subset (&c);
+ if (serializer.ran_out_of_room)
+ {
+ buf_size += (buf_size >> 1) + 32;
+ DEBUG_MSG(SUBSET, nullptr, "OT::%c%c%c%c ran out of room; reallocating to %u bytes.", HB_UNTAG(tag), buf_size);
+ if (unlikely (!buf.alloc (buf_size)))
+ {
+ DEBUG_MSG(SUBSET, nullptr, "OT::%c%c%c%c failed to reallocate %u bytes.", HB_UNTAG(tag), buf_size);
+ return false;
+ }
+ goto retry;
+ }
+ if (result)
+ {
+ hb_blob_t *dest_blob = serializer.copy_blob ();
+ DEBUG_MSG(SUBSET, nullptr, "OT::%c%c%c%c final subset table size: %u bytes.", HB_UNTAG(tag), dest_blob->length);
+ result = c.plan->add_table (tag, dest_blob);
+ hb_blob_destroy (dest_blob);
+ }
+ else
+ {
+ DEBUG_MSG(SUBSET, nullptr, "OT::%c%c%c%c::subset table subsetted to empty.", HB_UNTAG(tag));
+ result = true;
+ }
}
+ else
+ DEBUG_MSG(SUBSET, nullptr, "OT::%c%c%c%c::subset sanitize failed on source table.", HB_UNTAG(tag));
hb_blob_destroy (source_blob);
DEBUG_MSG(SUBSET, nullptr, "OT::%c%c%c%c::subset %s", HB_UNTAG(tag), result ? "success" : "FAILED!");
return result;
}
-
-/*
- * A face that has add_table().
- */
-
-struct hb_subset_face_data_t
-{
- struct table_entry_t
- {
- inline int cmp (const hb_tag_t *t) const
- {
- if (*t < tag) return -1;
- if (*t > tag) return -1;
- return 0;
- }
-
- hb_tag_t tag;
- hb_blob_t *blob;
- };
-
- hb_vector_t<table_entry_t, 32> tables;
-};
-
-static hb_subset_face_data_t *
-_hb_subset_face_data_create (void)
-{
- hb_subset_face_data_t *data = (hb_subset_face_data_t *) calloc (1, sizeof (hb_subset_face_data_t));
- if (unlikely (!data))
- return nullptr;
-
- data->tables.init ();
-
- return data;
-}
-
-static void
-_hb_subset_face_data_destroy (void *user_data)
-{
- hb_subset_face_data_t *data = (hb_subset_face_data_t *) user_data;
-
- for (unsigned int i = 0; i < data->tables.len; i++)
- hb_blob_destroy (data->tables[i].blob);
-
- data->tables.fini ();
-
- free (data);
-}
-
-static hb_blob_t *
-_hb_subset_face_data_reference_blob (hb_subset_face_data_t *data)
-{
-
- unsigned int table_count = data->tables.len;
- unsigned int face_length = table_count * 16 + 12;
-
- for (unsigned int i = 0; i < table_count; i++)
- face_length += hb_ceil_to_4 (hb_blob_get_length (data->tables.arrayZ[i].blob));
-
- char *buf = (char *) malloc (face_length);
- if (unlikely (!buf))
- return nullptr;
-
- hb_serialize_context_t c (buf, face_length);
- OT::OpenTypeFontFile *f = c.start_serialize<OT::OpenTypeFontFile> ();
-
- bool is_cff = data->tables.lsearch (HB_TAG ('C','F','F',' ')) || data->tables.lsearch (HB_TAG ('C','F','F','2'));
- hb_tag_t sfnt_tag = is_cff ? OT::OpenTypeFontFile::CFFTag : OT::OpenTypeFontFile::TrueTypeTag;
-
- Supplier<hb_tag_t> tags_supplier (&data->tables[0].tag, table_count, sizeof (data->tables[0]));
- Supplier<hb_blob_t *> blobs_supplier (&data->tables[0].blob, table_count, sizeof (data->tables[0]));
- bool ret = f->serialize_single (&c,
- sfnt_tag,
- tags_supplier,
- blobs_supplier,
- table_count);
-
- c.end_serialize ();
-
- if (unlikely (!ret))
- {
- free (buf);
- return nullptr;
- }
-
- return hb_blob_create (buf, face_length, HB_MEMORY_MODE_WRITABLE, buf, free);
-}
-
-static hb_blob_t *
-_hb_subset_face_reference_table (hb_face_t *face, hb_tag_t tag, void *user_data)
+template<typename TableType>
+static bool
+_subset (hb_subset_plan_t *plan)
{
- hb_subset_face_data_t *data = (hb_subset_face_data_t *) user_data;
-
- if (!tag)
- return _hb_subset_face_data_reference_blob (data);
-
- hb_subset_face_data_t::table_entry_t *entry = data->tables.lsearch (tag);
- if (entry)
- return hb_blob_reference (entry->blob);
-
- return nullptr;
-}
+ hb_blob_t *source_blob = hb_sanitize_context_t ().reference_table<TableType> (plan->source);
+ const TableType *table = source_blob->as<TableType> ();
-/* TODO: Move this to hb-face.h and rename to hb_face_builder_create()
- * with hb_face_builder_add_table(). */
-hb_face_t *
-hb_subset_face_create (void)
-{
- hb_subset_face_data_t *data = _hb_subset_face_data_create ();
- if (unlikely (!data)) return hb_face_get_empty ();
+ hb_tag_t tag = TableType::tableTag;
+ hb_bool_t result = false;
+ if (source_blob->data)
+ result = table->subset (plan);
+ else
+ DEBUG_MSG(SUBSET, nullptr, "OT::%c%c%c%c::subset sanitize failed on source table.", HB_UNTAG(tag));
- return hb_face_create_for_tables (_hb_subset_face_reference_table,
- data,
- _hb_subset_face_data_destroy);
+ hb_blob_destroy (source_blob);
+ DEBUG_MSG(SUBSET, nullptr, "OT::%c%c%c%c::subset %s", HB_UNTAG(tag), result ? "success" : "FAILED!");
+ return result;
}
-hb_bool_t
-hb_subset_face_add_table (hb_face_t *face, hb_tag_t tag, hb_blob_t *blob)
-{
- if (unlikely (face->destroy != (hb_destroy_func_t) _hb_subset_face_data_destroy))
- return false;
-
- hb_subset_face_data_t *data = (hb_subset_face_data_t *) face->user_data;
- hb_subset_face_data_t::table_entry_t *entry = data->tables.push ();
-
- entry->tag = tag;
- entry->blob = hb_blob_reference (blob);
-
- return true;
-}
static bool
_subset_table (hb_subset_plan_t *plan,
@@ -270,6 +177,14 @@ _subset_table (hb_subset_plan_t *plan,
case HB_OT_TAG_post:
result = _subset<const OT::post> (plan);
break;
+
+ case HB_OT_TAG_GSUB:
+ //result = _subset2<const OT::GSUB> (plan);
+ break;
+ case HB_OT_TAG_GPOS:
+ //result = _subset2<const OT::GPOS> (plan);
+ break;
+
default:
hb_blob_t *source_table = hb_face_reference_table(plan->source, tag);
if (likely (source_table))
@@ -298,7 +213,7 @@ _should_drop_table(hb_subset_plan_t *plan, hb_tag_t tag)
case HB_TAG ('G', 'D', 'E', 'F'): /* temporary */
case HB_TAG ('G', 'P', 'O', 'S'): /* temporary */
case HB_TAG ('G', 'S', 'U', 'B'): /* temporary */
- return plan->drop_ot_layout;
+ return plan->drop_layout;
// Drop these tables below by default, list pulled
// from fontTools:
case HB_TAG ('B', 'A', 'S', 'E'):
@@ -327,19 +242,17 @@ _should_drop_table(hb_subset_plan_t *plan, hb_tag_t tag)
/**
* hb_subset:
* @source: font face data to be subset.
- * @profile: profile to use for the subsetting.
* @input: input to use for the subsetting.
*
- * Subsets a font according to provided profile and input.
+ * Subsets a font according to provided input.
**/
hb_face_t *
hb_subset (hb_face_t *source,
- hb_subset_profile_t *profile,
hb_subset_input_t *input)
{
- if (unlikely (!profile || !input || !source)) return hb_face_get_empty();
+ if (unlikely (!input || !source)) return hb_face_get_empty();
- hb_subset_plan_t *plan = hb_subset_plan_create (source, profile, input);
+ hb_subset_plan_t *plan = hb_subset_plan_create (source, input);
hb_tag_t table_tags[32];
unsigned int offset = 0, count;
@@ -358,23 +271,9 @@ hb_subset (hb_face_t *source,
success = success && _subset_table (plan, tag);
}
offset += count;
- } while (count == ARRAY_LENGTH (table_tags));
+ } while (success && count == ARRAY_LENGTH (table_tags));
hb_face_t *result = success ? hb_face_reference(plan->dest) : hb_face_get_empty();
hb_subset_plan_destroy (plan);
return result;
}
-
-/**
- * hb_subset_get_all_codepoints:
- * @source: font face data to load.
- * @out: set to add the all codepoints covered by font face, source.
- */
-void
-hb_subset_get_all_codepoints (hb_face_t *source, hb_set_t *out)
-{
- OT::cmap::accelerator_t cmap;
- cmap.init (source);
- cmap.get_all_codepoints (out);
- cmap.fini();
-}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h
index f6d2ae0a01b..8b07a45e923 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h
@@ -32,20 +32,6 @@
HB_BEGIN_DECLS
/*
- * hb_subset_profile_t
- * Things that change based on target environment, e.g. OS.
- * Threadsafe for multiple concurrent subset operations.
- */
-
-typedef struct hb_subset_profile_t hb_subset_profile_t;
-
-HB_EXTERN hb_subset_profile_t *
-hb_subset_profile_create (void);
-
-HB_EXTERN void
-hb_subset_profile_destroy (hb_subset_profile_t *profile);
-
-/*
* hb_subset_input_t
*
* Things that change based on the input. Characters to keep, etc.
@@ -68,21 +54,24 @@ hb_subset_input_unicode_set (hb_subset_input_t *subset_input);
HB_EXTERN hb_set_t *
hb_subset_input_glyph_set (hb_subset_input_t *subset_input);
-HB_EXTERN hb_bool_t *
-hb_subset_input_drop_hints (hb_subset_input_t *subset_input);
+HB_EXTERN void
+hb_subset_input_set_drop_hints (hb_subset_input_t *subset_input,
+ hb_bool_t drop_hints);
+HB_EXTERN hb_bool_t
+hb_subset_input_get_drop_hints (hb_subset_input_t *subset_input);
+
+HB_EXTERN void
+hb_subset_input_set_drop_layout (hb_subset_input_t *subset_input,
+ hb_bool_t drop_layout);
+HB_EXTERN hb_bool_t
+hb_subset_input_get_drop_layout (hb_subset_input_t *subset_input);
-HB_EXTERN hb_bool_t *
-hb_subset_input_drop_ot_layout (hb_subset_input_t *subset_input);
/* hb_subset() */
HB_EXTERN hb_face_t *
hb_subset (hb_face_t *source,
- hb_subset_profile_t *profile,
hb_subset_input_t *input);
-/* hb_subset_get_all_codepoints */
-HB_EXTERN void
-hb_subset_get_all_codepoints (hb_face_t *source, hb_set_t *out);
HB_END_DECLS
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.hh
new file mode 100644
index 00000000000..9cdd388d780
--- /dev/null
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.hh
@@ -0,0 +1,60 @@
+/*
+ * Copyright © 2018 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Garret Rieger, Roderick Sheeter
+ */
+
+#ifndef HB_SUBSET_HH
+#define HB_SUBSET_HH
+
+
+#include "hb.hh"
+
+#include "hb-subset.h"
+
+#include "hb-machinery.hh"
+#include "hb-subset-input.hh"
+#include "hb-subset-plan.hh"
+
+struct hb_subset_context_t :
+ hb_dispatch_context_t<hb_subset_context_t, bool, HB_DEBUG_SUBSET>
+{
+ inline const char *get_name (void) { return "SUBSET"; }
+ template <typename T>
+ inline bool dispatch (const T &obj) { return obj.subset (this); }
+ static bool default_return_value (void) { return true; }
+ bool stop_sublookup_iteration (bool r) const { return false; }
+
+ hb_subset_plan_t *plan;
+ hb_serialize_context_t *serializer;
+ unsigned int debug_depth;
+
+ hb_subset_context_t (hb_subset_plan_t *plan_,
+ hb_serialize_context_t *serializer_) :
+ plan (plan_),
+ serializer (serializer_),
+ debug_depth (0) {}
+};
+
+
+#endif /* HB_SUBSET_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc
index 56d13e7cd28..624c1eb4163 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc
@@ -14,10 +14,10 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-unicode-private.hh"
-#include "hb-machinery-private.hh"
+#include "hb-unicode.hh"
+#include "hb-machinery.hh"
#include "ucdn.h"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.cc
index 8cb41723398..bb1cd6821ee 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.cc
@@ -28,9 +28,9 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
+#include "hb.hh"
-#include "hb-unicode-private.hh"
+#include "hb-unicode.hh"
@@ -450,7 +450,7 @@ hb_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs,
}
-/* See hb-unicode-private.hh for details. */
+/* See hb-unicode.hh for details. */
const uint8_t
_hb_modified_combining_class[256] =
{
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.h
index 2657f481300..c8d87e4d1d2 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.h
@@ -40,6 +40,14 @@
HB_BEGIN_DECLS
+/**
+ * HB_UNICODE_MAX
+ *
+ * Since: 1.9.0
+ */
+#define HB_UNICODE_MAX 0x10FFFFu
+
+
/* hb_unicode_general_category_t */
/* Unicode Character Database property: General_Category (gc) */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.hh
index fb16ba437ed..e6bca5f08c8 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.hh
@@ -28,10 +28,10 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_UNICODE_PRIVATE_HH
-#define HB_UNICODE_PRIVATE_HH
+#ifndef HB_UNICODE_HH
+#define HB_UNICODE_HH
-#include "hb-private.hh"
+#include "hb.hh"
extern HB_INTERNAL const uint8_t _hb_modified_combining_class[256];
@@ -366,4 +366,4 @@ DECLARE_NULL_INSTANCE (hb_unicode_funcs_t);
FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) | \
FLAG (HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL)))
-#endif /* HB_UNICODE_PRIVATE_HH */
+#endif /* HB_UNICODE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-uniscribe.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-uniscribe.cc
index 11b7384fa77..4a77c8c1f41 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-uniscribe.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-uniscribe.cc
@@ -24,9 +24,9 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
+#include "hb.hh"
#define HB_SHAPER uniscribe
-#include "hb-shaper-impl-private.hh"
+#include "hb-shaper-impl.hh"
#include <windows.h>
#include <usp10.h>
@@ -34,7 +34,7 @@
#include "hb-uniscribe.h"
-#include "hb-open-file-private.hh"
+#include "hb-open-file.hh"
#include "hb-ot-name-table.hh"
#include "hb-ot-tag.h"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-utf-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-utf.hh
index 211eb4dc023..eccb632e489 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-utf-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-utf.hh
@@ -24,10 +24,10 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_UTF_PRIVATE_HH
-#define HB_UTF_PRIVATE_HH
+#ifndef HB_UTF_HH
+#define HB_UTF_HH
-#include "hb-private.hh"
+#include "hb.hh"
struct hb_utf8_t
@@ -279,4 +279,4 @@ struct hb_latin1_t
}
};
-#endif /* HB_UTF_PRIVATE_HH */
+#endif /* HB_UTF_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-vector-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-vector.hh
index 1ef20d43863..da548cbb12f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-vector-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-vector.hh
@@ -25,10 +25,10 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_VECTOR_PRIVATE_HH
-#define HB_VECTOR_PRIVATE_HH
+#ifndef HB_VECTOR_HH
+#define HB_VECTOR_HH
-#include "hb-private.hh"
+#include "hb.hh"
template <typename Type, unsigned int StaticSize=8>
@@ -72,6 +72,8 @@ struct hb_vector_t
return p;
}
+ inline bool in_error (void) const { return allocated == 0; }
+
/* Allocate for size but don't adjust len. */
inline bool alloc (unsigned int size)
{
@@ -235,4 +237,4 @@ struct hb_vector_t
};
-#endif /* HB_VECTOR_PRIVATE_HH */
+#endif /* HB_VECTOR_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-warning.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-warning.cc
index f7a87b5abf9..9fb41003808 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-warning.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-warning.cc
@@ -24,14 +24,14 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
+#include "hb.hh"
#if defined(HB_ATOMIC_INT_NIL)
#error "Could not find any system to define atomic_int macros, library WILL NOT be thread-safe"
-#error "Check hb-atomic-private.hh for possible resolutions."
+#error "Check hb-atomic.hh for possible resolutions."
#endif
#if defined(HB_MUTEX_IMPL_NIL)
#error "Could not find any system to define mutex macros, library WILL NOT be thread-safe"
-#error "Check hb-mutex-private.hh for possible resolutions."
+#error "Check hb-mutex.hh for possible resolutions."
#endif
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb.hh
index efe7bda9e38..557ae6b35d9 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb.hh
@@ -26,8 +26,8 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_PRIVATE_HH
-#define HB_PRIVATE_HH
+#ifndef HB_HH
+#define HB_HH
#define _GNU_SOURCE 1
@@ -470,11 +470,11 @@ _hb_memalign(void **memptr, size_t alignment, size_t size)
/* Headers we include for everyone. Keep sorted. They express dependency amongst
* themselves, but no other file should include them.*/
-#include "hb-atomic-private.hh"
+#include "hb-atomic.hh"
#include "hb-debug.hh"
#include "hb-dsalgs.hh"
-#include "hb-mutex-private.hh"
+#include "hb-mutex.hh"
#include "hb-null.hh"
-#include "hb-object-private.hh"
+#include "hb-object.hh"
-#endif /* HB_PRIVATE_HH */
+#endif /* HB_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/main.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/main.cc
index 98a1320bfb0..490b76e5b6d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/main.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/main.cc
@@ -25,9 +25,9 @@
*/
#include "hb-static.cc"
-#include "hb-open-file-private.hh"
+#include "hb-open-file.hh"
#include "hb-ot-layout-gdef-table.hh"
-#include "hb-ot-layout-gsubgpos-private.hh"
+#include "hb-ot-layout-gsubgpos.hh"
#ifdef HAVE_GLIB
#include <glib.h>
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/test-buffer-serialize.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-buffer-serialize.cc
index 39eb13da7f2..a91f4f7e938 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/test-buffer-serialize.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-buffer-serialize.cc
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
+#include "hb.hh"
#include "hb.h"
#include "hb-ot.h"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/test-size-params.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-size-params.cc
index 3c43852b3a0..e53a47d8df6 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/test-size-params.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-size-params.cc
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
+#include "hb.hh"
#include "hb.h"
#include "hb-ot.h"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/test-unicode-ranges.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-unicode-ranges.cc
index dbc5fa426de..1334ea030f9 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/test-unicode-ranges.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-unicode-ranges.cc
@@ -24,7 +24,7 @@
* Google Author(s): Garret Rieger
*/
-#include "hb-private.hh"
+#include "hb.hh"
#include "hb-ot-os2-unicode-ranges.hh"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/test-would-substitute.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-would-substitute.cc
index 1836d720cc2..268f7db9805 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/test-would-substitute.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-would-substitute.cc
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
+#include "hb.hh"
#include "hb.h"
#include "hb-ot.h"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/test.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/test.cc
index cf59e00ac87..f0eace8c435 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/test.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/test.cc
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.hh"
+#include "hb.hh"
#include "hb.h"
diff --git a/Build/source/libs/harfbuzz/version.ac b/Build/source/libs/harfbuzz/version.ac
index 46aa323f31e..8740f5b5802 100644
--- a/Build/source/libs/harfbuzz/version.ac
+++ b/Build/source/libs/harfbuzz/version.ac
@@ -8,4 +8,4 @@ dnl
dnl --------------------------------------------------------
dnl
dnl m4-include this file to define the current harfbuzz version
-m4_define([harfbuzz_version], [1.8.8])
+m4_define([harfbuzz_version], [1.9.0])