summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/harfbuzz')
-rw-r--r--Build/source/libs/harfbuzz/ChangeLog5
-rw-r--r--Build/source/libs/harfbuzz/Makefile.am6
-rw-r--r--Build/source/libs/harfbuzz/Makefile.in25
-rwxr-xr-xBuild/source/libs/harfbuzz/configure34
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-internal-symbols.sh34
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-indic-private.hh388
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13-PATCHES/ChangeLog (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12-PATCHES/ChangeLog)5
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13-PATCHES/TL-Changes (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12-PATCHES/TL-Changes)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/AUTHORS (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/AUTHORS)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/Android.mk (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/Android.mk)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/ChangeLog (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/ChangeLog)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/Makefile.am (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/Makefile.am)1
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/NEWS (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/NEWS)29
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/README (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/README)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/THANKS (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/THANKS)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/TODO (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/TODO)4
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-0.9.13/autogen.sh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/autogen.sh)6
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/config.h.in (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/config.h.in)6
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/configure.ac (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/configure.ac)8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/harfbuzz.doap (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/harfbuzz.doap)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/harfbuzz.pc.in (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/harfbuzz.pc.in)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/Makefile.am (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/Makefile.am)40
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-0.9.13/src/check-c-linkage-decls.sh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-c-linkage-decls.sh)0
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-0.9.13/src/check-header-guards.sh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-header-guards.sh)0
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-0.9.13/src/check-includes.sh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-includes.sh)0
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-0.9.13/src/check-libstdc++.sh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-libstdc++.sh)0
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-0.9.13/src/check-static-inits.sh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-static-inits.sh)0
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-0.9.13/src/check-symbols.sh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-exported-symbols.sh)16
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-0.9.13/src/gen-arabic-table.py (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/gen-arabic-table.py)0
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-0.9.13/src/gen-indic-table.py (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/gen-indic-table.py)9
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-atomic-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-atomic-private.hh)2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-blob.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-blob.cc)2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-blob.h (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-blob.h)26
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-buffer-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-buffer-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-buffer.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-buffer.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-buffer.h (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-buffer.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-cache-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-cache-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-common.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-common.cc)22
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-common.h (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-common.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-coretext.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-coretext.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-coretext.h (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-coretext.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-fallback-shape.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-fallback-shape.cc)1
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-font-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-font-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-font.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-font.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-font.h (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-font.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ft.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ft.cc)2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ft.h (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ft.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-glib.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-glib.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-glib.h (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-glib.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-gobject-enums.cc.tmpl (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-gobject-enums.cc.tmpl)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-gobject-structs.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-gobject-structs.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-gobject.h (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-gobject.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-graphite2.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-graphite2.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-graphite2.h (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-graphite2.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-icu-le.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-icu-le.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-icu.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-icu.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-icu.h (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-icu.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-mutex-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-mutex-private.hh)2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-object-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-object-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-old.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-old.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-open-file-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-open-file-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-open-type-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-open-type-private.hh)5
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-head-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-head-table.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-hhea-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-hhea-table.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-hmtx-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-hmtx-table.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout-common-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout-common-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout-gdef-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout-gdef-table.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout-gpos-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout-gpos-table.hh)49
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout-gsub-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout-gsub-table.hh)13
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout-gsubgpos-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout-gsubgpos-private.hh)417
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout-private.hh)71
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout.cc)14
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout.h (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-map-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-map-private.hh)41
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-map.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-map.cc)59
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-maxp-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-maxp-table.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-name-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-name-table.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-arabic-fallback.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-arabic-fallback.hh)2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-arabic-table.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-arabic-table.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-arabic.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-arabic.cc)58
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-default.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-default.cc)4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-machine.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-indic-machine.hh)14
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-machine.rl (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-indic-machine.rl)2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-private.hh151
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-table.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-indic-table.hh)9
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-indic.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-indic.cc)384
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-myanmar-machine.hh391
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-myanmar-machine.rl125
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-myanmar.cc545
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-private.hh)48
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-sea-machine.hh224
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-sea-machine.rl102
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-sea.cc384
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-thai.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-thai.cc)2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-fallback-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-fallback-private.hh)5
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-fallback.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-fallback.cc)46
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-normalize-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-normalize-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-normalize.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-normalize.cc)39
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-private.hh)37
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape.cc)108
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-tag.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-tag.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-tag.h (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-tag.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot.h (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-private.hh)29
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-set-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-set-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-set.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-set.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-set.h (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-set.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shape-plan-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shape-plan-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shape-plan.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shape-plan.cc)8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shape-plan.h (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shape-plan.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shape.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shape.cc)4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shape.h (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shape.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shaper-impl-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shaper-impl-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shaper-list.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shaper-list.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shaper-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shaper-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shaper.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shaper.cc)2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-tt-font.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-tt-font.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ucdn.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ucdn.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-unicode-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-unicode-private.hh)3
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-unicode.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-unicode.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-unicode.h (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-unicode.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-uniscribe.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-uniscribe.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-uniscribe.h (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-uniscribe.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-utf-private.hh (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-utf-private.hh)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-version.h.in (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-version.h.in)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-warning.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-warning.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb.h (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb.h)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/main.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/main.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/test-size-params.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/test-size-params.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/test-would-substitute.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/test-would-substitute.cc)0
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/test.cc (renamed from Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/test.cc)0
-rw-r--r--Build/source/libs/harfbuzz/version.ac2
132 files changed, 3116 insertions, 954 deletions
diff --git a/Build/source/libs/harfbuzz/ChangeLog b/Build/source/libs/harfbuzz/ChangeLog
index aa11094714a..9ec350bbb1d 100644
--- a/Build/source/libs/harfbuzz/ChangeLog
+++ b/Build/source/libs/harfbuzz/ChangeLog
@@ -1,3 +1,8 @@
+2013-01-19 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Import harfbuzz-0.9.13.
+ * version.ac, Makefile.am: Adjust.
+
2013-01-29 Peter Breitenlohner <peb@mppmu.mpg.de>
* Makefile.am: Allow subdir-objects.
diff --git a/Build/source/libs/harfbuzz/Makefile.am b/Build/source/libs/harfbuzz/Makefile.am
index 5a708c7a8f7..462db90af56 100644
--- a/Build/source/libs/harfbuzz/Makefile.am
+++ b/Build/source/libs/harfbuzz/Makefile.am
@@ -89,7 +89,11 @@ libharfbuzz_a_SOURCES += \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic-machine.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic-private.hh \
- @HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic-table.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic-table.cc \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-myanmar.cc \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-myanmar-machine.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-sea.cc \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-sea-machine.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-thai.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-private.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-normalize-private.hh \
diff --git a/Build/source/libs/harfbuzz/Makefile.in b/Build/source/libs/harfbuzz/Makefile.in
index ce7ee406208..e479216cca8 100644
--- a/Build/source/libs/harfbuzz/Makefile.in
+++ b/Build/source/libs/harfbuzz/Makefile.in
@@ -54,7 +54,7 @@ subdir = .
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.h.in \
- $(top_srcdir)/harfbuzz-0.9.12/src/hb-version.h.in \
+ $(top_srcdir)/harfbuzz-0.9.13/src/hb-version.h.in \
$(top_srcdir)/../../build-aux/depcomp ChangeLog \
../../build-aux/config.guess ../../build-aux/config.sub \
../../build-aux/depcomp ../../build-aux/install-sh \
@@ -115,6 +115,9 @@ am_libharfbuzz_a_OBJECTS = @HARFBUZZ_TREE@/src/hb-blob.$(OBJEXT) \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-arabic.$(OBJEXT) \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-default.$(OBJEXT) \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic.$(OBJEXT) \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic-table.$(OBJEXT) \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-myanmar.$(OBJEXT) \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-sea.$(OBJEXT) \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-thai.$(OBJEXT) \
@HARFBUZZ_TREE@/src/hb-ot-shape-normalize.$(OBJEXT) \
@HARFBUZZ_TREE@/src/hb-ot-shape-fallback.$(OBJEXT) \
@@ -466,7 +469,11 @@ libharfbuzz_a_SOURCES = @HARFBUZZ_TREE@/src/hb-atomic-private.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic-machine.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic-private.hh \
- @HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic-table.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic-table.cc \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-myanmar.cc \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-myanmar-machine.hh \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-sea.cc \
+ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-sea-machine.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-thai.cc \
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-private.hh \
@HARFBUZZ_TREE@/src/hb-ot-shape-normalize-private.hh \
@@ -533,7 +540,7 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
distclean-hdr:
-rm -f config.h stamp-h1
-hb-version.h: $(top_builddir)/config.status $(top_srcdir)/harfbuzz-0.9.12/src/hb-version.h.in
+hb-version.h: $(top_builddir)/config.status $(top_srcdir)/harfbuzz-0.9.13/src/hb-version.h.in
cd $(top_builddir) && $(SHELL) ./config.status $@
clean-noinstLIBRARIES:
@@ -601,6 +608,15 @@ clean-noinstLIBRARIES:
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic.$(OBJEXT): \
@HARFBUZZ_TREE@/src/$(am__dirstamp) \
@HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp)
+@HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic-table.$(OBJEXT): \
+ @HARFBUZZ_TREE@/src/$(am__dirstamp) \
+ @HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp)
+@HARFBUZZ_TREE@/src/hb-ot-shape-complex-myanmar.$(OBJEXT): \
+ @HARFBUZZ_TREE@/src/$(am__dirstamp) \
+ @HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp)
+@HARFBUZZ_TREE@/src/hb-ot-shape-complex-sea.$(OBJEXT): \
+ @HARFBUZZ_TREE@/src/$(am__dirstamp) \
+ @HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp)
@HARFBUZZ_TREE@/src/hb-ot-shape-complex-thai.$(OBJEXT): \
@HARFBUZZ_TREE@/src/$(am__dirstamp) \
@HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp)
@@ -643,7 +659,10 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-map.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-shape-complex-arabic.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-shape-complex-default.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-shape-complex-indic-table.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-shape-complex-indic.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-shape-complex-myanmar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-shape-complex-sea.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-shape-complex-thai.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-shape-fallback.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-shape-normalize.Po@am__quote@
diff --git a/Build/source/libs/harfbuzz/configure b/Build/source/libs/harfbuzz/configure
index 44b4b83fa4b..55ba0fa7a4b 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 for TeX Live 0.9.12.
+# Generated by GNU Autoconf 2.69 for harfbuzz for TeX Live 0.9.13.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -590,12 +590,12 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='harfbuzz for TeX Live'
PACKAGE_TARNAME='harfbuzz-for-tex-live'
-PACKAGE_VERSION='0.9.12'
-PACKAGE_STRING='harfbuzz for TeX Live 0.9.12'
+PACKAGE_VERSION='0.9.13'
+PACKAGE_STRING='harfbuzz for TeX Live 0.9.13'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
-ac_unique_file="harfbuzz-0.9.12/harfbuzz.pc.in"
+ac_unique_file="harfbuzz-0.9.13/harfbuzz.pc.in"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
@@ -1360,7 +1360,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 for TeX Live 0.9.12 to adapt to many kinds of systems.
+\`configure' configures harfbuzz for TeX Live 0.9.13 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1431,7 +1431,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of harfbuzz for TeX Live 0.9.12:";;
+ short | recursive ) echo "Configuration of harfbuzz for TeX Live 0.9.13:";;
esac
cat <<\_ACEOF
@@ -1555,7 +1555,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-harfbuzz for TeX Live configure 0.9.12
+harfbuzz for TeX Live configure 0.9.13
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2045,7 +2045,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 for TeX Live $as_me 0.9.12, which was
+It was created by harfbuzz for TeX Live $as_me 0.9.13, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3909,7 +3909,7 @@ fi
# Define the identity of the package.
PACKAGE='harfbuzz-for-tex-live'
- VERSION='0.9.12'
+ VERSION='0.9.13'
cat >>confdefs.h <<_ACEOF
@@ -4065,8 +4065,8 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags
HB_VERSION_MAJOR=0
HB_VERSION_MINOR=9
-HB_VERSION_MICRO=12
-HB_VERSION=0.9.12
+HB_VERSION_MICRO=13
+HB_VERSION=0.9.13
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -16486,7 +16486,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-harfbuzz for TeX Live config.lt 0.9.12
+harfbuzz for TeX Live config.lt 0.9.13
configured by $0, generated by GNU Autoconf 2.69.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -18302,14 +18302,14 @@ $as_echo "#define HAVE_INTEL_ATOMIC_PRIMITIVES 1" >>confdefs.h
fi
-HARFBUZZ_TREE=harfbuzz-0.9.12
+HARFBUZZ_TREE=harfbuzz-0.9.13
if test -f $srcdir/$HARFBUZZ_TREE/src/hb-version.h; then
as_fn_error $? "Sorry, you must remove the file $HARFBUZZ_TREE/src/hb-version.h" "$LINENO" 5
fi
-ac_config_files="$ac_config_files Makefile include/Makefile hb-version.h:harfbuzz-0.9.12/src/hb-version.h.in"
+ac_config_files="$ac_config_files Makefile include/Makefile hb-version.h:harfbuzz-0.9.13/src/hb-version.h.in"
cat >confcache <<\_ACEOF
@@ -18858,7 +18858,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 for TeX Live $as_me 0.9.12, which was
+This file was extended by harfbuzz for TeX Live $as_me 0.9.13, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -18924,7 +18924,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 for TeX Live config.status 0.9.12
+harfbuzz for TeX Live config.status 0.9.13
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -19434,7 +19434,7 @@ do
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
- "hb-version.h") CONFIG_FILES="$CONFIG_FILES hb-version.h:harfbuzz-0.9.12/src/hb-version.h.in" ;;
+ "hb-version.h") CONFIG_FILES="$CONFIG_FILES hb-version.h:harfbuzz-0.9.13/src/hb-version.h.in" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-internal-symbols.sh b/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-internal-symbols.sh
deleted file mode 100755
index a8fdc537dd7..00000000000
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-internal-symbols.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-
-LC_ALL=C
-export LC_ALL
-
-test -z "$srcdir" && srcdir=.
-stat=0
-
-
-if which nm 2>/dev/null >/dev/null; then
- :
-else
- echo "check-internal-symbols.sh: 'nm' not found; skipping test"
- exit 77
-fi
-
-tested=false
-for suffix in .so; do
- so=`echo .libs/libharfbuzz$suffix`
- if test -f "$so"; then
- echo "Checking that we are not exposing internal symbols"
- if nm "$so" | grep ' [BCDGINRSTVW] ' | grep -v ' T _fini\>\| T _init\>\| T hb_\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>'; then
- echo "Ouch, internal symbols exposed"
- stat=1
- fi
- tested=true
- fi
-done
-if ! $tested; then
- echo "check-internal-symbols.sh: libharfbuzz shared library not found; skipping test"
- exit 77
-fi
-
-exit $stat
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-indic-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-indic-private.hh
deleted file mode 100644
index e36090e4837..00000000000
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-indic-private.hh
+++ /dev/null
@@ -1,388 +0,0 @@
-/*
- * Copyright © 2012 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
- */
-
-#ifndef HB_OT_SHAPE_COMPLEX_INDIC_PRIVATE_HH
-#define HB_OT_SHAPE_COMPLEX_INDIC_PRIVATE_HH
-
-#include "hb-private.hh"
-
-
-#include "hb-ot-shape-complex-private.hh"
-#include "hb-ot-shape-private.hh" /* XXX Remove */
-
-
-/* buffer var allocations */
-#define indic_category() complex_var_u8_0() /* indic_category_t */
-#define indic_position() complex_var_u8_1() /* indic_matra_category_t */
-
-
-#define INDIC_TABLE_ELEMENT_TYPE uint16_t
-
-/* Cateories used in the OpenType spec:
- * https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx
- */
-/* Note: This enum is duplicated in the -machine.rl source file.
- * Not sure how to avoid duplication. */
-enum indic_category_t {
- OT_X = 0,
- OT_C,
- OT_V,
- OT_N,
- OT_H,
- OT_ZWNJ,
- OT_ZWJ,
- OT_M,
- OT_SM,
- OT_VD,
- OT_A,
- OT_NBSP,
- OT_DOTTEDCIRCLE, /* Not in the spec, but special in Uniscribe. /Very very/ special! */
- OT_RS, /* Register Shifter, used in Khmer OT spec */
- OT_Coeng,
- OT_Repha,
- OT_Ra, /* Not explicitly listed in the OT spec, but used in the grammar. */
- OT_CM
-};
-
-/* Visual positions in a syllable from left to right. */
-enum indic_position_t {
- POS_START,
-
- POS_RA_TO_BECOME_REPH,
- POS_PRE_M,
- POS_PRE_C,
-
- POS_BASE_C,
- POS_AFTER_MAIN,
-
- POS_ABOVE_C,
-
- POS_BEFORE_SUB,
- POS_BELOW_C,
- POS_AFTER_SUB,
-
- POS_BEFORE_POST,
- POS_POST_C,
- POS_AFTER_POST,
-
- POS_FINAL_C,
- POS_SMVD,
-
- POS_END
-};
-
-/* Categories used in IndicSyllabicCategory.txt from UCD. */
-enum indic_syllabic_category_t {
- INDIC_SYLLABIC_CATEGORY_OTHER = OT_X,
-
- INDIC_SYLLABIC_CATEGORY_AVAGRAHA = OT_X,
- INDIC_SYLLABIC_CATEGORY_BINDU = OT_SM,
- INDIC_SYLLABIC_CATEGORY_CONSONANT = OT_C,
- INDIC_SYLLABIC_CATEGORY_CONSONANT_DEAD = OT_C,
- INDIC_SYLLABIC_CATEGORY_CONSONANT_FINAL = OT_C,
- INDIC_SYLLABIC_CATEGORY_CONSONANT_HEAD_LETTER = OT_C,
- INDIC_SYLLABIC_CATEGORY_CONSONANT_MEDIAL = OT_CM,
- INDIC_SYLLABIC_CATEGORY_CONSONANT_PLACEHOLDER = OT_NBSP,
- INDIC_SYLLABIC_CATEGORY_CONSONANT_SUBJOINED = OT_C,
- INDIC_SYLLABIC_CATEGORY_CONSONANT_REPHA = OT_Repha,
- INDIC_SYLLABIC_CATEGORY_MODIFYING_LETTER = OT_X,
- INDIC_SYLLABIC_CATEGORY_NUKTA = OT_N,
- INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER = OT_RS,
- INDIC_SYLLABIC_CATEGORY_TONE_LETTER = OT_X,
- INDIC_SYLLABIC_CATEGORY_TONE_MARK = OT_N,
- INDIC_SYLLABIC_CATEGORY_VIRAMA = OT_H,
- INDIC_SYLLABIC_CATEGORY_VISARGA = OT_SM,
- INDIC_SYLLABIC_CATEGORY_VOWEL = OT_V,
- INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT = OT_M,
- INDIC_SYLLABIC_CATEGORY_VOWEL_INDEPENDENT = OT_V
-};
-
-/* Categories used in IndicSMatraCategory.txt from UCD */
-enum indic_matra_category_t {
- INDIC_MATRA_CATEGORY_NOT_APPLICABLE = POS_END,
-
- INDIC_MATRA_CATEGORY_LEFT = POS_PRE_C,
- INDIC_MATRA_CATEGORY_TOP = POS_ABOVE_C,
- INDIC_MATRA_CATEGORY_BOTTOM = POS_BELOW_C,
- INDIC_MATRA_CATEGORY_RIGHT = POS_POST_C,
-
- /* These should resolve to the position of the last part of the split sequence. */
- INDIC_MATRA_CATEGORY_BOTTOM_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT,
- INDIC_MATRA_CATEGORY_LEFT_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT,
- INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM = INDIC_MATRA_CATEGORY_BOTTOM,
- INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT,
- INDIC_MATRA_CATEGORY_TOP_AND_LEFT = INDIC_MATRA_CATEGORY_TOP,
- INDIC_MATRA_CATEGORY_TOP_AND_LEFT_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT,
- INDIC_MATRA_CATEGORY_TOP_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT,
-
- INDIC_MATRA_CATEGORY_INVISIBLE = INDIC_MATRA_CATEGORY_NOT_APPLICABLE,
- INDIC_MATRA_CATEGORY_OVERSTRUCK = POS_AFTER_MAIN,
- INDIC_MATRA_CATEGORY_VISUAL_ORDER_LEFT = POS_PRE_M
-};
-
-/* Note: We use ASSERT_STATIC_EXPR_ZERO() instead of ASSERT_STATIC_EXPR() and the comma operation
- * because gcc fails to optimize the latter and fills the table in at runtime. */
-#define INDIC_COMBINE_CATEGORIES(S,M) \
- (ASSERT_STATIC_EXPR_ZERO (M == INDIC_MATRA_CATEGORY_NOT_APPLICABLE || (S == INDIC_SYLLABIC_CATEGORY_VIRAMA || S == INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT)) + \
- ASSERT_STATIC_EXPR_ZERO (S < 255 && M < 255) + \
- ((M << 8) | S))
-
-
-#include "hb-ot-shape-complex-indic-table.hh"
-
-
-#define IN_HALF_BLOCK(u, Base) (((u) & ~0x7F) == (Base))
-
-#define IS_DEVA(u) (IN_HALF_BLOCK (u, 0x0900))
-#define IS_BENG(u) (IN_HALF_BLOCK (u, 0x0980))
-#define IS_GURU(u) (IN_HALF_BLOCK (u, 0x0A00))
-#define IS_GUJR(u) (IN_HALF_BLOCK (u, 0x0A80))
-#define IS_ORYA(u) (IN_HALF_BLOCK (u, 0x0B00))
-#define IS_TAML(u) (IN_HALF_BLOCK (u, 0x0B80))
-#define IS_TELU(u) (IN_HALF_BLOCK (u, 0x0C00))
-#define IS_KNDA(u) (IN_HALF_BLOCK (u, 0x0C80))
-#define IS_MLYM(u) (IN_HALF_BLOCK (u, 0x0D00))
-#define IS_SINH(u) (IN_HALF_BLOCK (u, 0x0D80))
-#define IS_KHMR(u) (IN_HALF_BLOCK (u, 0x1780))
-
-
-#define MATRA_POS_LEFT(u) POS_PRE_M
-#define MATRA_POS_RIGHT(u) ( \
- IS_DEVA(u) ? POS_AFTER_SUB : \
- IS_BENG(u) ? POS_AFTER_POST : \
- IS_GURU(u) ? POS_AFTER_POST : \
- IS_GUJR(u) ? POS_AFTER_POST : \
- IS_ORYA(u) ? POS_AFTER_POST : \
- IS_TAML(u) ? POS_AFTER_POST : \
- IS_TELU(u) ? (u <= 0x0C42 ? POS_BEFORE_SUB : POS_AFTER_SUB) : \
- IS_KNDA(u) ? (u < 0x0CC3 || u > 0xCD6 ? POS_BEFORE_SUB : POS_AFTER_SUB) : \
- IS_MLYM(u) ? POS_AFTER_POST : \
- IS_SINH(u) ? POS_AFTER_SUB : \
- IS_KHMR(u) ? POS_AFTER_POST : \
- /*default*/ POS_AFTER_SUB \
- )
-#define MATRA_POS_TOP(u) ( /* BENG and MLYM don't have top matras. */ \
- IS_DEVA(u) ? POS_AFTER_SUB : \
- IS_GURU(u) ? POS_AFTER_POST : /* Deviate from spec */ \
- IS_GUJR(u) ? POS_AFTER_SUB : \
- IS_ORYA(u) ? POS_AFTER_MAIN : \
- IS_TAML(u) ? POS_AFTER_SUB : \
- IS_TELU(u) ? POS_BEFORE_SUB : \
- IS_KNDA(u) ? POS_BEFORE_SUB : \
- IS_SINH(u) ? POS_AFTER_SUB : \
- IS_KHMR(u) ? POS_AFTER_POST : \
- /*default*/ POS_AFTER_SUB \
- )
-#define MATRA_POS_BOTTOM(u) ( \
- IS_DEVA(u) ? POS_AFTER_SUB : \
- IS_BENG(u) ? POS_AFTER_SUB : \
- IS_GURU(u) ? POS_AFTER_POST : \
- IS_GUJR(u) ? POS_AFTER_POST : \
- IS_ORYA(u) ? POS_AFTER_SUB : \
- IS_TAML(u) ? POS_AFTER_POST : \
- IS_TELU(u) ? POS_BEFORE_SUB : \
- IS_KNDA(u) ? POS_BEFORE_SUB : \
- IS_MLYM(u) ? POS_AFTER_POST : \
- IS_SINH(u) ? POS_AFTER_SUB : \
- IS_KHMR(u) ? POS_AFTER_POST : \
- /*default*/ POS_AFTER_SUB \
- )
-
-
-static inline indic_position_t
-matra_position (hb_codepoint_t u, indic_position_t side)
-{
- switch ((int) side)
- {
- case POS_PRE_C: return MATRA_POS_LEFT (u);
- case POS_POST_C: return MATRA_POS_RIGHT (u);
- case POS_ABOVE_C: return MATRA_POS_TOP (u);
- case POS_BELOW_C: return MATRA_POS_BOTTOM (u);
- };
- return side;
-}
-
-
-
-/* XXX
- * This is a hack for now. We should move this data into the main Indic table.
- * Or completely remove it and just check in the tables.
- */
-static const hb_codepoint_t ra_chars[] = {
- 0x0930, /* Devanagari */
- 0x09B0, /* Bengali */
- 0x09F0, /* Bengali */
- 0x0A30, /* Gurmukhi */ /* No Reph */
- 0x0AB0, /* Gujarati */
- 0x0B30, /* Oriya */
- 0x0BB0, /* Tamil */ /* No Reph */
- 0x0C30, /* Telugu */ /* Reph formed only with ZWJ */
- 0x0CB0, /* Kannada */
- 0x0D30, /* Malayalam */ /* No Reph, Logical Repha */
-
- 0x0DBB, /* Sinhala */ /* Reph formed only with ZWJ */
-
- 0x179A, /* Khmer */ /* No Reph, Visual Repha */
-};
-
-static inline indic_position_t
-consonant_position (hb_codepoint_t u)
-{
- if ((u & ~0x007F) == 0x1780)
- return POS_BELOW_C; /* In Khmer coeng model, post and below forms should not be reordered. */
- return POS_BASE_C; /* Will recategorize later based on font lookups. */
-}
-
-static inline bool
-is_ra (hb_codepoint_t u)
-{
- for (unsigned int i = 0; i < ARRAY_LENGTH (ra_chars); i++)
- if (u == ra_chars[i])
- return true;
- return false;
-}
-
-
-static inline bool
-is_one_of (const hb_glyph_info_t &info, unsigned int flags)
-{
- /* If it ligated, all bets are off. */
- if (is_a_ligature (info)) return false;
- return !!(FLAG (info.indic_category()) & flags);
-}
-
-#define JOINER_FLAGS (FLAG (OT_ZWJ) | FLAG (OT_ZWNJ))
-static inline bool
-is_joiner (const hb_glyph_info_t &info)
-{
- return is_one_of (info, JOINER_FLAGS);
-}
-
-/* Note:
- *
- * We treat Vowels and placeholders as if they were consonants. This is safe because Vowels
- * cannot happen in a consonant syllable. The plus side however is, we can call the
- * consonant syllable logic from the vowel syllable function and get it all right! */
-#define CONSONANT_FLAGS (FLAG (OT_C) | FLAG (OT_CM) | FLAG (OT_Ra) | FLAG (OT_V) | FLAG (OT_NBSP) | FLAG (OT_DOTTEDCIRCLE))
-static inline bool
-is_consonant (const hb_glyph_info_t &info)
-{
- return is_one_of (info, CONSONANT_FLAGS);
-}
-
-#define HALANT_OR_COENG_FLAGS (FLAG (OT_H) | FLAG (OT_Coeng))
-static inline bool
-is_halant_or_coeng (const hb_glyph_info_t &info)
-{
- return is_one_of (info, HALANT_OR_COENG_FLAGS);
-}
-
-static inline void
-set_indic_properties (hb_glyph_info_t &info)
-{
- hb_codepoint_t u = info.codepoint;
- unsigned int type = get_indic_categories (u);
- indic_category_t cat = (indic_category_t) (type & 0x7F);
- indic_position_t pos = (indic_position_t) (type >> 8);
-
-
- /*
- * Re-assign category
- */
-
-
- /* The spec says U+0952 is OT_A. However, testing shows that Uniscribe
- * treats U+0951..U+0952 all as OT_VD.
- * TESTS:
- * U+092E,U+0947,U+0952
- * U+092E,U+0952,U+0947
- * U+092E,U+0947,U+0951
- * U+092E,U+0951,U+0947
- * */
- if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x0951, 0x0954)))
- cat = OT_VD;
-
- if (unlikely (u == 0x17D1))
- cat = OT_X;
- if (cat == OT_X &&
- unlikely (hb_in_range<hb_codepoint_t> (u, 0x17CB, 0x17D3))) /* Khmer Various signs */
- {
- /* These are like Top Matras. */
- cat = OT_M;
- pos = POS_ABOVE_C;
- }
- if (u == 0x17C6) /* Khmer Bindu doesn't like to be repositioned. */
- cat = OT_N;
-
- if (unlikely (u == 0x17D2)) cat = OT_Coeng; /* Khmer coeng */
- else if (unlikely (u == 0x200C)) cat = OT_ZWNJ;
- else if (unlikely (u == 0x200D)) cat = OT_ZWJ;
- else if (unlikely (u == 0x25CC)) cat = OT_DOTTEDCIRCLE;
- else if (unlikely (u == 0x0A71)) cat = OT_SM; /* GURMUKHI ADDAK. More like consonant medial. like 0A75. */
-
- if (cat == OT_Repha) {
- /* There are two kinds of characters marked as Repha:
- * - The ones that are GenCat=Mn are already positioned visually, ie. after base. (eg. Khmer)
- * - The ones that are GenCat=Lo is encoded logically, ie. beginning of syllable. (eg. Malayalam)
- *
- * We recategorize the first kind to look like a Nukta and attached to the base directly.
- */
- if (_hb_glyph_info_get_general_category (&info) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)
- cat = OT_N;
- }
-
-
-
- /*
- * Re-assign position.
- */
-
- if ((FLAG (cat) & CONSONANT_FLAGS))
- {
- pos = consonant_position (u);
- if (is_ra (u))
- cat = OT_Ra;
- }
- else if (cat == OT_M)
- {
- pos = matra_position (u, pos);
- }
- else if (cat == OT_SM || cat == OT_VD)
- {
- pos = POS_SMVD;
- }
-
- if (unlikely (u == 0x0B01)) pos = POS_BEFORE_SUB; /* Oriya Bindu is BeforeSub in the spec. */
-
-
-
- info.indic_category() = cat;
- info.indic_position() = pos;
-}
-
-
-
-#endif /* HB_OT_SHAPE_COMPLEX_INDIC_PRIVATE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12-PATCHES/ChangeLog b/Build/source/libs/harfbuzz/harfbuzz-0.9.13-PATCHES/ChangeLog
index 18ce662427d..cd9d27b1036 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12-PATCHES/ChangeLog
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13-PATCHES/ChangeLog
@@ -1,3 +1,8 @@
+2013-02-27 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Imported harfbuzz-0.9.13 source tree from:
+ http://www.freedesktop.org/software/harfbuzz/release/
+
2013-01-19 Peter Breitenlohner <peb@mppmu.mpg.de>
Imported harfbuzz-0.9.12 source tree from:
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12-PATCHES/TL-Changes b/Build/source/libs/harfbuzz/harfbuzz-0.9.13-PATCHES/TL-Changes
index b2c13fdd688..b2c13fdd688 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12-PATCHES/TL-Changes
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13-PATCHES/TL-Changes
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/AUTHORS b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/AUTHORS
index c611d7d4769..c611d7d4769 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/AUTHORS
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/AUTHORS
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/Android.mk b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/Android.mk
index 832d55e475a..832d55e475a 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/Android.mk
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/Android.mk
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/ChangeLog b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/ChangeLog
index 014604b9691..014604b9691 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/ChangeLog
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/ChangeLog
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/Makefile.am b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/Makefile.am
index d7181268797..0d9b17144ed 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/Makefile.am
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/Makefile.am
@@ -21,6 +21,7 @@ MAINTAINERCLEANFILES = \
$(srcdir)/autoscan.log \
$(srcdir)/compile \
$(srcdir)/config.guess \
+ $(srcdir)/config.h.in \
$(srcdir)/config.sub \
$(srcdir)/configure.scan \
$(srcdir)/depcomp \
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/NEWS b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/NEWS
index 7542e8e66ed..7e8d5bdada8 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/NEWS
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/NEWS
@@ -1,3 +1,32 @@
+Overview of changes leading to 0.9.13
+Thursday, February 25, 2013
+=====================================
+
+- Build fixes.
+- Ngapi HarfBuzz Hackfest in London (February 2013):
+ * Fixed all known Indic bugs,
+ * New Win8-style Myanmar shaper,
+ * New South-East Asian shaper for Tai Tham, Cham, and New Tai Lue,
+ * Smartly ignore Default_Ignorable characters (joiners, etc) wheb
+ matching GSUB/GPOS lookups,
+ * Fix 'Phags-Pa U+A872 shaping,
+ * Fix partial disabling of default-on features,
+ * Allow disabling of TrueType kerning.
+- Fix possible crasher with broken fonts with overlapping tables.
+- Removed generated files from git again. So, one needs ragel to
+ bootstrap from the git tree.
+
+API changes:
+- hb_shape() and related APIs now abort if buffer direction is
+ HB_DIRECTION_INVALID. Previously, hb_shape() was calling
+ hb_buffer_guess_segment_properties() on the buffer before
+ shaping. The heuristics in that function are fragile. If the
+ user really wants the old behvaior, they can call that function
+ right before calling hb_shape() to get the old behavior.
+- hb_blob_create_sub_blob() always creates sub-blob with
+ HB_MEMORY_MODE_READONLY. See comments for the reason.
+
+
Overview of changes leading to 0.9.12
Thursday, January 18, 2013
=====================================
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/README b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/README
index 74e739da52a..74e739da52a 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/README
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/README
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/THANKS b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/THANKS
index 940cfde5c39..940cfde5c39 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/THANKS
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/THANKS
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/TODO b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/TODO
index c93b33e62d7..31b44b84234 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/TODO
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/TODO
@@ -7,8 +7,6 @@ General fixes:
- Disable 'vert' if 'vrt2' is available (eg. Motoya fonts with arrow chars).
-- Fix TT 'kern' on/off and GPOS interaction (move kerning before GPOS).
-
- Implement 'rand' feature.
- mask propagation? (when ligation, "or" the masks).
@@ -20,8 +18,6 @@ General fixes:
- Misc features:
* init/medi/fina/isol for non-cursive scripts
- * vkna,hkna etc for kana, etc
- * smpl,trad for ZHS / ZHT
API issues to fix before 1.0:
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/autogen.sh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/autogen.sh
index 47640c3e490..833a6219c86 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/autogen.sh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/autogen.sh
@@ -7,6 +7,12 @@ test -n "$srcdir" || srcdir=.
olddir=`pwd`
cd $srcdir
+echo -n "checking for ragel... "
+which ragel || {
+ echo "You need to install ragel... See http://www.complang.org/ragel/"
+ exit 1
+}
+
echo -n "checking for pkg-config... "
which pkg-config || {
echo "*** No pkg-config found, please install it ***"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/config.h.in b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/config.h.in
index 4b5c99a7b4d..bba8fa30ac2 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/config.h.in
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/config.h.in
@@ -51,9 +51,6 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
-/* Define to 1 if you have the <io.h> header file. */
-#undef HAVE_IO_H
-
/* Define to 1 if you have the `isatty' function. */
#undef HAVE_ISATTY
@@ -117,9 +114,6 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define to 1 if you have the `_setmode' function. */
-#undef HAVE__SETMODE
-
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/configure.ac b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/configure.ac
index 202bef95f50..b4249cd5429 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/configure.ac
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/configure.ac
@@ -1,6 +1,6 @@
AC_PREREQ([2.64])
AC_INIT([HarfBuzz],
- [0.9.12],
+ [0.9.13],
[http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz],
[harfbuzz],
[http://harfbuzz.org/])
@@ -9,7 +9,7 @@ AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([harfbuzz.pc.in])
AC_CONFIG_HEADERS([config.h])
-AM_INIT_AUTOMAKE([1.11.1 gnits dist-bzip2 no-dist-gzip -Wall no-define])
+AM_INIT_AUTOMAKE([1.11.1 gnits dist-bzip2 no-dist-gzip -Wall no-define color-tests])
AM_SILENT_RULES([yes])
# Initialize libtool
@@ -55,8 +55,8 @@ dnl GOBJECT_INTROSPECTION_CHECK([0.9.0])
dnl GTK_DOC_CHECK([1.15],[--flavour no-tmpl])
# Functions and headers
-AC_CHECK_FUNCS(atexit mprotect sysconf getpagesize mmap _setmode isatty)
-AC_CHECK_HEADERS(unistd.h sys/mman.h io.h)
+AC_CHECK_FUNCS(atexit mprotect sysconf getpagesize mmap isatty)
+AC_CHECK_HEADERS(unistd.h sys/mman.h)
# Compiler flags
AC_CANONICAL_HOST
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/harfbuzz.doap b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/harfbuzz.doap
index d2896ebefa8..d2896ebefa8 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/harfbuzz.doap
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/harfbuzz.doap
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/harfbuzz.pc.in b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/harfbuzz.pc.in
index e92319e156c..e92319e156c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/harfbuzz.pc.in
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/harfbuzz.pc.in
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/Makefile.am b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/Makefile.am
index d72aa075945..3b0444e046c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/Makefile.am
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/Makefile.am
@@ -63,6 +63,8 @@ HBHEADERS = \
hb-shape.h \
hb-shape-plan.h \
hb-unicode.h \
+ $(NULL)
+HBNODISTHEADERS = \
hb-version.h \
$(NULL)
@@ -85,7 +87,11 @@ HBSOURCES += \
hb-ot-shape-complex-indic.cc \
hb-ot-shape-complex-indic-machine.hh \
hb-ot-shape-complex-indic-private.hh \
- hb-ot-shape-complex-indic-table.hh \
+ hb-ot-shape-complex-indic-table.cc \
+ hb-ot-shape-complex-myanmar.cc \
+ hb-ot-shape-complex-myanmar-machine.hh \
+ hb-ot-shape-complex-sea.cc \
+ hb-ot-shape-complex-sea-machine.hh \
hb-ot-shape-complex-thai.cc \
hb-ot-shape-complex-private.hh \
hb-ot-shape-normalize-private.hh \
@@ -207,17 +213,17 @@ endif
endif
endif
-libharfbuzz_la_SOURCES = $(HBSOURCES) $(HBHEADERS)
+libharfbuzz_la_SOURCES = $(HBSOURCES) $(HBHEADERS) $(HBNODISTHEADERS)
nodist_libharfbuzz_la_SOURCES = $(nodist_HBSOURCES)
libharfbuzz_la_CPPFLAGS = $(HBCFLAGS)
libharfbuzz_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HB_LIBTOOL_VERSION_INFO) $(export_symbols) -no-undefined
libharfbuzz_la_LIBADD = $(HBLIBS)
EXTRA_libharfbuzz_la_DEPENDENCIES = $(harfbuzz_def_dependency)
pkginclude_HEADERS = $(HBHEADERS)
-nodist_pkginclude_HEADERS = hb-version.h
+nodist_pkginclude_HEADERS = $(HBNODISTHEADERS)
CLEANFILES += harfbuzz.def
-harfbuzz.def: $(HBHEADERS)
+harfbuzz.def: $(HBHEADERS) $(HBNODISTHEADERS)
$(AM_V_GEN) (echo EXPORTS; \
(cat $^ || echo 'hb_ERROR ()' ) | \
$(EGREP) '^hb_.* \(' | \
@@ -238,9 +244,9 @@ EXTRA_DIST += $(GENERATORS)
unicode-tables: arabic-table indic-table
indic-table: gen-indic-table.py IndicSyllabicCategory.txt IndicMatraCategory.txt Blocks.txt
- $(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-indic-table.hh.tmp && \
- mv hb-ot-shape-complex-indic-table.hh.tmp $(srcdir)/hb-ot-shape-complex-indic-table.hh || \
- ($(RM) hb-ot-shape-complex-indic-table.hh.tmp; false)
+ $(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-indic-table.cc.tmp && \
+ mv hb-ot-shape-complex-indic-table.cc.tmp $(srcdir)/hb-ot-shape-complex-indic-table.cc || \
+ ($(RM) hb-ot-shape-complex-indic-table.cc.tmp; false)
arabic-table: gen-arabic-table.py ArabicShaping.txt UnicodeData.txt
$(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-arabic-table.hh.tmp && \
@@ -250,8 +256,17 @@ arabic-table: gen-arabic-table.py ArabicShaping.txt UnicodeData.txt
.PHONY: unicode-tables arabic-table indic-table
-EXTRA_DIST += hb-ot-shape-complex-indic-machine.rl
-$(srcdir)/hb-ot-shape-complex-indic-machine.hh: hb-ot-shape-complex-indic-machine.rl
+BUILT_SOURCES += \
+ hb-ot-shape-complex-indic-machine.hh \
+ hb-ot-shape-complex-myanmar-machine.hh \
+ hb-ot-shape-complex-sea-machine.hh \
+ $(NULL)
+EXTRA_DIST += \
+ hb-ot-shape-complex-indic-machine.rl \
+ hb-ot-shape-complex-myanmar-machine.rl \
+ hb-ot-shape-complex-sea-machine.rl \
+ $(NULL)
+%.hh: %.rl
$(AM_V_GEN)$(top_srcdir)/missing --run ragel -e -F1 -o "$@.tmp" "$<" && \
mv "$@.tmp" "$@" || ( $(RM) "$@.tmp" && false )
@@ -277,9 +292,8 @@ test_size_params_LDADD = libharfbuzz.la $(HBLIBS)
dist_check_SCRIPTS = \
check-c-linkage-decls.sh \
check-header-guards.sh \
- check-exported-symbols.sh \
check-includes.sh \
- check-internal-symbols.sh \
+ check-symbols.sh \
$(NULL)
if HAVE_ICU
@@ -297,7 +311,7 @@ TESTS_ENVIRONMENT = \
srcdir="$(srcdir)" \
MAKE="$(MAKE) $(AM_MAKEFLAGS)" \
HBSOURCES="$(HBSOURCES)" \
- HBHEADERS="$(HBHEADERS)" \
+ HBHEADERS="$(HBHEADERS) $(HBNODISTHEADERS)" \
$(NULL)
#-include $(INTROSPECTION_MAKEFILE)
@@ -311,7 +325,7 @@ TESTS_ENVIRONMENT = \
#hb_1_0_gir_INCLUDES = GObject-2.0
#hb_1_0_gir_CFLAGS = $(INCLUDES) $(HBCFLAGS) -DHB_H -DHB_H_IN -DHB_OT_H -DHB_OT_H_IN
#hb_1_0_gir_LIBS = libharfbuzz.la
-#hb_1_0_gir_FILES = $(HBHEADERS)
+#hb_1_0_gir_FILES = $(HBHEADERS) $(HBNODISTHEADERS)
#
#girdir = $(datadir)/gir-1.0
#gir_DATA = $(INTROSPECTION_GIRS)
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-c-linkage-decls.sh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/check-c-linkage-decls.sh
index 44cdfa0f23c..44cdfa0f23c 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-c-linkage-decls.sh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/check-c-linkage-decls.sh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-header-guards.sh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/check-header-guards.sh
index af9fa7fc24e..af9fa7fc24e 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-header-guards.sh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/check-header-guards.sh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-includes.sh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/check-includes.sh
index 79323a74fb2..79323a74fb2 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-includes.sh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/check-includes.sh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-libstdc++.sh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/check-libstdc++.sh
index e7e0e295e1a..e7e0e295e1a 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-libstdc++.sh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/check-libstdc++.sh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-static-inits.sh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/check-static-inits.sh
index bb0a7ff630d..bb0a7ff630d 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-static-inits.sh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/check-static-inits.sh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-exported-symbols.sh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/check-symbols.sh
index 6f0bf7fd823..4c03c137406 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/check-exported-symbols.sh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/check-symbols.sh
@@ -10,7 +10,7 @@ stat=0
if which nm 2>/dev/null >/dev/null; then
:
else
- echo "check-exported-symbols.sh: 'nm' not found; skipping test"
+ echo "check-symbols.sh: 'nm' not found; skipping test"
exit 77
fi
@@ -20,15 +20,25 @@ tested=false
for def in $defs; do
lib=`echo "$def" | sed 's/[.]def$//;s@.*/@@'`
so=.libs/lib${lib}.so
+
+ EXPORTED_SYMBOLS="`nm "$so" | grep ' [BCDGINRSTVW] ' | grep -v ' T _fini\>\| T _init\>\| _fdata\>\| _ftext\>\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>' | cut -d' ' -f3`"
+
if test -f "$so"; then
+
echo "Checking that $so has the same symbol list as $def"
{
echo EXPORTS
- nm "$so" | grep ' [BCDGINRSTVW] ' | grep -v ' T _fini\>\| T _init\>\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>' | cut -d' ' -f3
- stat=1
+ echo "$EXPORTED_SYMBOLS"
# cheat: copy the last line from the def file!
tail -n1 "$def"
} | diff "$def" - >&2 || stat=1
+
+ echo "Checking that we are not exposing internal symbols"
+ if echo "$EXPORTED_SYMBOLS" | grep -v 'hb_'; then
+ echo "Ouch, internal symbols exposed"
+ stat=1
+ fi
+
tested=true
fi
done
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/gen-arabic-table.py b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/gen-arabic-table.py
index da5a4fcbf5c..da5a4fcbf5c 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/gen-arabic-table.py
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/gen-arabic-table.py
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/gen-indic-table.py b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/gen-indic-table.py
index 94aa2ab0728..9ed3fd6d34d 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/gen-indic-table.py
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/gen-indic-table.py
@@ -75,8 +75,7 @@ for h in headers:
print " * %s" % (l.strip())
print " */"
print
-print "#ifndef HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH"
-print "#define HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH"
+print '#include "hb-ot-shape-complex-indic-private.hh"'
print
# Shorten values
@@ -182,8 +181,8 @@ print
occupancy = used * 100. / total
print "}; /* Table occupancy: %d%% */" % occupancy
print
-print "static INDIC_TABLE_ELEMENT_TYPE"
-print "get_indic_categories (hb_codepoint_t u)"
+print "INDIC_TABLE_ELEMENT_TYPE"
+print "hb_indic_get_categories (hb_codepoint_t u)"
print "{"
for (start,end) in zip (starts, ends):
offset = "indic_offset_0x%04x" % start
@@ -202,8 +201,6 @@ for i in range (2):
print "#undef %s_%s" % \
(what_short[i], short[i][v])
print
-print "#endif /* HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH */"
-print
print "/* == End of generated table == */"
# Maintain at least 30% occupancy in the table */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-atomic-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-atomic-private.hh
index b909bc8ef47..bb10fe1d577 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-atomic-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-atomic-private.hh
@@ -42,7 +42,7 @@
#if 0
-#elif !defined(HB_NO_MT) && defined(_MSC_VER) || defined(__MINGW32__)
+#elif !defined(HB_NO_MT) && (defined(_WIN32) || defined(__CYGWIN__))
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-blob.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-blob.cc
index 3ca50fbb187..dfd134b7762 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-blob.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-blob.cc
@@ -123,7 +123,7 @@ hb_blob_create_sub_blob (hb_blob_t *parent,
blob = hb_blob_create (parent->data + offset,
MIN (length, parent->length - offset),
- parent->mode,
+ HB_MEMORY_MODE_READONLY,
hb_blob_reference (parent),
(hb_destroy_func_t) hb_blob_destroy);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-blob.h b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-blob.h
index 1a93baa46dc..d3d0f41b11c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-blob.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-blob.h
@@ -36,6 +36,26 @@
HB_BEGIN_DECLS
+/*
+ * Note re various memory-modes:
+ *
+ * - In no case shall the HarfBuzz client modify memory
+ * that is passed to HarfBuzz in a blob. If there is
+ * any such possibility, MODE_DUPLICATE should be used
+ * such that HarfBuzz makes a copy immediately,
+ *
+ * - Use MODE_READONLY otherse, unless you really really
+ * really know what you are doing,
+ *
+ * - MODE_WRITABLE is appropriate if you relaly made a
+ * copy of data solely for the purpose of passing to
+ * HarfBuzz and doing that just once (no reuse!),
+ *
+ * - If the font is mmap()ed, it's ok to use
+ * READONLY_MAY_MAKE_WRITABLE, however, there were
+ * design problems with that mode, so HarfBuzz do not
+ * really use it anymore. If not sure, use MODE_READONLY.
+ */
typedef enum {
HB_MEMORY_MODE_DUPLICATE,
HB_MEMORY_MODE_READONLY,
@@ -52,6 +72,12 @@ hb_blob_create (const char *data,
void *user_data,
hb_destroy_func_t destroy);
+/* Always creates with MEMORY_MODE_READONLY.
+ * Even if the parent blob is writable, we don't
+ * want the user of the sub-blob to be able to
+ * modify the parent data as that data may be
+ * shared among multiple sub-blobs.
+ */
hb_blob_t *
hb_blob_create_sub_blob (hb_blob_t *parent,
unsigned int offset,
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-buffer-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-buffer-private.hh
index 13cf4bb0e9b..13cf4bb0e9b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-buffer-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-buffer-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-buffer.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-buffer.cc
index c7860e9bc30..c7860e9bc30 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-buffer.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-buffer.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-buffer.h b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-buffer.h
index 5386e360add..5386e360add 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-buffer.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-buffer.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-cache-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-cache-private.hh
index 19b70b7e395..19b70b7e395 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-cache-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-cache-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-common.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-common.cc
index 9422555cfbc..540d252cd73 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-common.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-common.cc
@@ -36,6 +36,24 @@
#include <locale.h>
+/* hb_options_t */
+
+hb_options_union_t _hb_options;
+
+void
+_hb_options_init (void)
+{
+ hb_options_union_t u;
+ u.i = 0;
+ u.opts.initialized = 1;
+
+ char *c = getenv ("HB_OPTIONS");
+ u.opts.uniscribe_bug_compatible = c && strstr (c, "uniscribe-bug-compatible");
+
+ /* This is idempotent and threadsafe. */
+ _hb_options = u;
+}
+
/* hb_tag_t */
@@ -177,7 +195,7 @@ struct hb_language_item_t {
static hb_language_item_t *langs;
-static
+static inline
void free_langs (void)
{
while (langs) {
@@ -414,5 +432,3 @@ hb_version_check (unsigned int major,
{
return HB_VERSION_CHECK (major, minor, micro);
}
-
-
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-common.h b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-common.h
index cc221d33be9..cc221d33be9 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-common.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-common.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-coretext.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-coretext.cc
index 8f94795928c..8f94795928c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-coretext.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-coretext.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-coretext.h b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-coretext.h
index c4954fa1b2c..c4954fa1b2c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-coretext.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-coretext.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-fallback-shape.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-fallback-shape.cc
index bdc8a80c4bd..1a1fcfbda1e 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-fallback-shape.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-fallback-shape.cc
@@ -98,7 +98,6 @@ _hb_fallback_shape (hb_shape_plan_t *shape_plan HB_UNUSED,
hb_codepoint_t space;
font->get_glyph (' ', 0, &space);
- buffer->guess_segment_properties ();
buffer->clear_positions ();
unsigned int count = buffer->len;
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-font-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-font-private.hh
index 48fbb0ee549..48fbb0ee549 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-font-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-font-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-font.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-font.cc
index b59fdebaea7..b59fdebaea7 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-font.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-font.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-font.h b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-font.h
index 88d489551e8..88d489551e8 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-font.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-font.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ft.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ft.cc
index 6198185e9e4..1e87c1cb324 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ft.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ft.cc
@@ -403,7 +403,7 @@ hb_ft_font_create (FT_Face ft_face,
static FT_Library ft_library;
-static
+static inline
void free_ft_library (void)
{
FT_Done_FreeType (ft_library);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ft.h b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ft.h
index 696251e143f..696251e143f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ft.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ft.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-glib.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-glib.cc
index 676e6601628..676e6601628 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-glib.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-glib.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-glib.h b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-glib.h
index 63a9d3366c5..63a9d3366c5 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-glib.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-glib.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-gobject-enums.cc.tmpl b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-gobject-enums.cc.tmpl
index 05abd898d4f..05abd898d4f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-gobject-enums.cc.tmpl
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-gobject-enums.cc.tmpl
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-gobject-structs.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-gobject-structs.cc
index cec48542275..cec48542275 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-gobject-structs.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-gobject-structs.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-gobject.h b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-gobject.h
index 4f23fdd385d..4f23fdd385d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-gobject.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-gobject.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-graphite2.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-graphite2.cc
index 16ef9a4dabe..16ef9a4dabe 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-graphite2.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-graphite2.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-graphite2.h b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-graphite2.h
index bea68f939b4..bea68f939b4 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-graphite2.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-graphite2.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-icu-le.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-icu-le.cc
index c05d330b957..c05d330b957 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-icu-le.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-icu-le.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-icu.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-icu.cc
index c177be2c4b2..c177be2c4b2 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-icu.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-icu.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-icu.h b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-icu.h
index f2f35f0f2ce..f2f35f0f2ce 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-icu.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-icu.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-mutex-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-mutex-private.hh
index 5b3a17e9174..0fb21c2e86e 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-mutex-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-mutex-private.hh
@@ -42,7 +42,7 @@
#if 0
-#elif !defined(HB_NO_MT) && defined(_MSC_VER) || defined(__MINGW32__)
+#elif !defined(HB_NO_MT) && (defined(_WIN32) || defined(__CYGWIN__))
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-object-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-object-private.hh
index 8a9ae34dbee..8a9ae34dbee 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-object-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-object-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-old.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-old.cc
index a7ea8ed9bbe..a7ea8ed9bbe 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-old.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-old.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-open-file-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-open-file-private.hh
index 250504ae20b..250504ae20b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-open-file-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-open-file-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-open-type-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-open-type-private.hh
index 90f28364019..090f3fc4786 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-open-type-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-open-type-private.hh
@@ -684,11 +684,6 @@ struct GenericOffsetTo : OffsetType
if (unlikely (!offset)) return Null(Type);
return StructAtOffset<Type> (base, offset);
}
- inline Type& operator () (void *base)
- {
- unsigned int offset = *this;
- return StructAtOffset<Type> (base, offset);
- }
inline Type& serialize (hb_serialize_context_t *c, void *base)
{
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-head-table.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-head-table.hh
index 3a9451295de..3a9451295de 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-head-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-head-table.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-hhea-table.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-hhea-table.hh
index 2b89c4e0208..2b89c4e0208 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-hhea-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-hhea-table.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-hmtx-table.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-hmtx-table.hh
index b94337d0be7..b94337d0be7 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-hmtx-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-hmtx-table.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout-common-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout-common-private.hh
index e6018db1243..e6018db1243 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout-common-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout-common-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout-gdef-table.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout-gdef-table.hh
index ff2d09c51f0..ff2d09c51f0 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout-gdef-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout-gdef-table.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout-gpos-table.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout-gpos-table.hh
index 3e436946b8b..44f1c641d16 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout-gpos-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout-gpos-table.hh
@@ -596,6 +596,7 @@ struct PairSet
unsigned int count = len;
for (unsigned int i = 0; i < count; i++)
{
+ /* TODO bsearch */
if (c->buffer->info[pos].codepoint == record->secondGlyph)
{
valueFormats[0].apply_value (c->font, c->direction, this,
@@ -658,7 +659,7 @@ struct PairPosFormat1
inline bool apply (hb_apply_context_t *c) const
{
TRACE_APPLY (this);
- hb_apply_context_t::mark_skipping_forward_iterator_t skippy_iter (c, c->buffer->idx, 1);
+ hb_apply_context_t::skipping_forward_iterator_t skippy_iter (c, c->buffer->idx, 1);
if (skippy_iter.has_no_chance ()) return TRACE_RETURN (false);
unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
@@ -730,7 +731,7 @@ struct PairPosFormat2
inline bool apply (hb_apply_context_t *c) const
{
TRACE_APPLY (this);
- hb_apply_context_t::mark_skipping_forward_iterator_t skippy_iter (c, c->buffer->idx, 1);
+ hb_apply_context_t::skipping_forward_iterator_t skippy_iter (c, c->buffer->idx, 1);
if (skippy_iter.has_no_chance ()) return TRACE_RETURN (false);
unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
@@ -878,9 +879,9 @@ struct CursivePosFormat1
TRACE_APPLY (this);
/* We don't handle mark glyphs here. */
- if (c->property & HB_OT_LAYOUT_GLYPH_PROPS_MARK) return TRACE_RETURN (false);
+ if (c->buffer->cur().glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_MARK) return TRACE_RETURN (false);
- hb_apply_context_t::mark_skipping_forward_iterator_t skippy_iter (c, c->buffer->idx, 1);
+ hb_apply_context_t::skipping_forward_iterator_t skippy_iter (c, c->buffer->idx, 1);
if (skippy_iter.has_no_chance ()) return TRACE_RETURN (false);
const EntryExitRecord &this_record = entryExitRecord[(this+coverage).get_coverage (c->buffer->cur().codepoint)];
@@ -1028,17 +1029,17 @@ struct MarkBasePosFormat1
if (likely (mark_index == NOT_COVERED)) return TRACE_RETURN (false);
/* now we search backwards for a non-mark glyph */
- unsigned int property;
- hb_apply_context_t::mark_skipping_backward_iterator_t skippy_iter (c, c->buffer->idx, 1);
+ hb_apply_context_t::skipping_backward_iterator_t skippy_iter (c, c->buffer->idx, 1);
+ skippy_iter.set_lookup_props (LookupFlag::IgnoreMarks);
do {
- if (!skippy_iter.prev (&property, LookupFlag::IgnoreMarks)) return TRACE_RETURN (false);
+ if (!skippy_iter.prev ()) return TRACE_RETURN (false);
/* We only want to attach to the first of a MultipleSubst sequence. Reject others. */
if (0 == get_lig_comp (c->buffer->info[skippy_iter.idx])) break;
skippy_iter.reject ();
} while (1);
/* The following assertion is too strong, so we've disabled it. */
- if (!(property & HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH)) {/*return TRACE_RETURN (false);*/}
+ if (!(c->buffer->info[skippy_iter.idx].glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH)) {/*return TRACE_RETURN (false);*/}
unsigned int base_index = (this+baseCoverage).get_coverage (c->buffer->info[skippy_iter.idx].codepoint);
if (base_index == NOT_COVERED) return TRACE_RETURN (false);
@@ -1132,12 +1133,12 @@ struct MarkLigPosFormat1
if (likely (mark_index == NOT_COVERED)) return TRACE_RETURN (false);
/* now we search backwards for a non-mark glyph */
- unsigned int property;
- hb_apply_context_t::mark_skipping_backward_iterator_t skippy_iter (c, c->buffer->idx, 1);
- if (!skippy_iter.prev (&property, LookupFlag::IgnoreMarks)) return TRACE_RETURN (false);
+ hb_apply_context_t::skipping_backward_iterator_t skippy_iter (c, c->buffer->idx, 1);
+ skippy_iter.set_lookup_props (LookupFlag::IgnoreMarks);
+ if (!skippy_iter.prev ()) return TRACE_RETURN (false);
/* The following assertion is too strong, so we've disabled it. */
- if (!(property & HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE)) {/*return TRACE_RETURN (false);*/}
+ if (!(c->buffer->info[skippy_iter.idx].glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE)) {/*return TRACE_RETURN (false);*/}
unsigned int j = skippy_iter.idx;
unsigned int lig_index = (this+ligatureCoverage).get_coverage (c->buffer->info[j].codepoint);
@@ -1248,11 +1249,11 @@ struct MarkMarkPosFormat1
if (likely (mark1_index == NOT_COVERED)) return TRACE_RETURN (false);
/* now we search backwards for a suitable mark glyph until a non-mark glyph */
- unsigned int property;
- hb_apply_context_t::mark_skipping_backward_iterator_t skippy_iter (c, c->buffer->idx, 1);
- if (!skippy_iter.prev (&property)) return TRACE_RETURN (false);
+ hb_apply_context_t::skipping_backward_iterator_t skippy_iter (c, c->buffer->idx, 1);
+ skippy_iter.set_lookup_props (c->lookup_props & ~LookupFlag::IgnoreFlags);
+ if (!skippy_iter.prev ()) return TRACE_RETURN (false);
- if (!(property & HB_OT_LAYOUT_GLYPH_PROPS_MARK)) return TRACE_RETURN (false);
+ if (!(c->buffer->info[skippy_iter.idx].glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_MARK)) { return TRACE_RETURN (false); }
unsigned int j = skippy_iter.idx;
@@ -1474,7 +1475,7 @@ struct PosLookup : Lookup
inline bool apply_once (hb_apply_context_t *c) const
{
TRACE_APPLY (this);
- if (!c->check_glyph_property (&c->buffer->cur(), c->lookup_props, &c->property))
+ if (!c->check_glyph_property (&c->buffer->cur(), c->lookup_props))
return TRACE_RETURN (false);
return TRACE_RETURN (process (c));
}
@@ -1528,7 +1529,7 @@ struct GPOS : GSUBGPOS
{ return CastR<PosLookup> (GSUBGPOS::get_lookup (i)); }
static inline void position_start (hb_font_t *font, hb_buffer_t *buffer);
- static inline void position_finish (hb_font_t *font, hb_buffer_t *buffer, hb_bool_t zero_width_attahced_marks);
+ static inline void position_finish (hb_font_t *font, hb_buffer_t *buffer);
inline bool sanitize (hb_sanitize_context_t *c) {
TRACE_SANITIZE (this);
@@ -1561,17 +1562,13 @@ fix_cursive_minor_offset (hb_glyph_position_t *pos, unsigned int i, hb_direction
}
static void
-fix_mark_attachment (hb_glyph_position_t *pos, unsigned int i, hb_direction_t direction, hb_bool_t zero_width_attached_marks)
+fix_mark_attachment (hb_glyph_position_t *pos, unsigned int i, hb_direction_t direction)
{
if (likely (!(pos[i].attach_lookback())))
return;
unsigned int j = i - pos[i].attach_lookback();
- if (zero_width_attached_marks) {
- pos[i].x_advance = 0;
- pos[i].y_advance = 0;
- }
pos[i].x_offset += pos[j].x_offset;
pos[i].y_offset += pos[j].y_offset;
@@ -1598,7 +1595,7 @@ GPOS::position_start (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer)
}
void
-GPOS::position_finish (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer, hb_bool_t zero_width_attached_marks)
+GPOS::position_finish (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer)
{
unsigned int len;
hb_glyph_position_t *pos = hb_buffer_get_glyph_positions (buffer, &len);
@@ -1610,7 +1607,7 @@ GPOS::position_finish (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer, hb_bool_t
/* Handle attachments */
for (unsigned int i = 0; i < len; i++)
- fix_mark_attachment (pos, i, direction, zero_width_attached_marks);
+ fix_mark_attachment (pos, i, direction);
HB_BUFFER_DEALLOCATE_VAR (buffer, syllable);
HB_BUFFER_DEALLOCATE_VAR (buffer, lig_props);
@@ -1633,11 +1630,9 @@ inline bool PosLookup::apply_recurse_func (hb_apply_context_t *c, unsigned int l
const GPOS &gpos = *(hb_ot_layout_from_face (c->face)->gpos);
const PosLookup &l = gpos.get_lookup (lookup_index);
unsigned int saved_lookup_props = c->lookup_props;
- unsigned int saved_property = c->property;
c->set_lookup (l);
bool ret = l.apply_once (c);
c->lookup_props = saved_lookup_props;
- c->property = saved_property;
return ret;
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout-gsub-table.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout-gsub-table.hh
index 2642acbbb5c..065d0f17f70 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout-gsub-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout-gsub-table.hh
@@ -272,7 +272,8 @@ struct Sequence
TRACE_APPLY (this);
if (unlikely (!substitute.len)) return TRACE_RETURN (false);
- unsigned int klass = c->property & HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE ? HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH : 0;
+ unsigned int klass = c->buffer->cur().glyph_props() &
+ HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE ? HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH : 0;
unsigned int count = substitute.len;
for (unsigned int i = 0; i < count; i++) {
set_lig_props_for_component (c->buffer->cur(), i);
@@ -637,9 +638,9 @@ struct Ligature
ligate_input (c,
count,
&component[1],
- ligGlyph,
match_glyph,
NULL,
+ ligGlyph,
is_mark_ligature,
total_component_count);
@@ -1193,7 +1194,7 @@ struct SubstLookup : Lookup
inline bool apply_once (hb_apply_context_t *c) const
{
TRACE_APPLY (this);
- if (!c->check_glyph_property (&c->buffer->cur(), c->lookup_props, &c->property))
+ if (!c->check_glyph_property (&c->buffer->cur(), c->lookup_props))
return TRACE_RETURN (false);
return TRACE_RETURN (process (c));
}
@@ -1315,9 +1316,7 @@ struct SubstLookup : Lookup
{
/* The spec says all subtables of an Extension lookup should
* have the same type. This is specially important if one has
- * a reverse type!
- *
- * We just check that they are all either forward, or reverse. */
+ * 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++)
@@ -1399,11 +1398,9 @@ inline bool SubstLookup::apply_recurse_func (hb_apply_context_t *c, unsigned int
const GSUB &gsub = *(hb_ot_layout_from_face (c->face)->gsub);
const SubstLookup &l = gsub.get_lookup (lookup_index);
unsigned int saved_lookup_props = c->lookup_props;
- unsigned int saved_property = c->property;
c->set_lookup (l);
bool ret = l.apply_once (c);
c->lookup_props = saved_lookup_props;
- c->property = saved_property;
return ret;
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout-gsubgpos-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout-gsubgpos-private.hh
index 0b000051f74..23fbdf48932 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout-gsubgpos-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout-gsubgpos-private.hh
@@ -255,132 +255,268 @@ struct hb_apply_context_t
return ret;
}
+ unsigned int table_index; /* GSUB/GPOS */
hb_font_t *font;
hb_face_t *face;
hb_buffer_t *buffer;
hb_direction_t direction;
hb_mask_t lookup_mask;
+ bool auto_joiners;
recurse_func_t recurse_func;
unsigned int nesting_level_left;
unsigned int lookup_props;
- unsigned int property; /* propety of first glyph */
const GDEF &gdef;
bool has_glyph_classes;
unsigned int debug_depth;
- hb_apply_context_t (hb_font_t *font_,
+ hb_apply_context_t (unsigned int table_index_,
+ hb_font_t *font_,
hb_buffer_t *buffer_,
- hb_mask_t lookup_mask_) :
+ hb_mask_t lookup_mask_,
+ bool auto_joiners_) :
+ table_index (table_index_),
font (font_), face (font->face), buffer (buffer_),
direction (buffer_->props.direction),
lookup_mask (lookup_mask_),
+ auto_joiners (auto_joiners_),
recurse_func (NULL),
nesting_level_left (MAX_NESTING_LEVEL),
- lookup_props (0), property (0),
+ lookup_props (0),
gdef (*hb_ot_layout_from_face (face)->gdef),
has_glyph_classes (gdef.has_glyph_classes ()),
debug_depth (0) {}
- void set_recurse_func (recurse_func_t func) { recurse_func = func; }
- void set_lookup_props (unsigned int lookup_props_) { lookup_props = lookup_props_; }
- void set_lookup (const Lookup &l) { lookup_props = l.get_props (); }
+ inline void set_recurse_func (recurse_func_t func) { recurse_func = func; }
+ inline void set_lookup_props (unsigned int lookup_props_) { lookup_props = lookup_props_; }
+ inline void set_lookup (const Lookup &l) { lookup_props = l.get_props (); }
+
+ struct matcher_t
+ {
+ inline matcher_t (void) :
+ lookup_props (0),
+ ignore_zwnj (false),
+ ignore_zwj (false),
+ mask (-1),
+#define arg1(arg) (arg) /* Remove the macro to see why it's needed! */
+ syllable arg1(0),
+#undef arg1
+ match_func (NULL),
+ match_data (NULL) {};
+
+ typedef bool (*match_func_t) (hb_codepoint_t glyph_id, const USHORT &value, const void *data);
+
+ inline void set_ignore_zwnj (bool ignore_zwnj_) { ignore_zwnj = ignore_zwnj_; }
+ inline void set_ignore_zwj (bool ignore_zwj_) { ignore_zwj = ignore_zwj_; }
+ inline void set_lookup_props (unsigned int lookup_props_) { lookup_props = lookup_props_; }
+ inline void set_mask (hb_mask_t mask_) { mask = mask_; }
+ inline void set_syllable (uint8_t syllable_) { syllable = syllable_; }
+ inline void set_match_func (match_func_t match_func_,
+ const void *match_data_)
+ { match_func = match_func_; match_data = match_data_; }
+
+ enum may_match_t {
+ MATCH_NO,
+ MATCH_YES,
+ MATCH_MAYBE
+ };
- struct mark_skipping_forward_iterator_t
- {
- inline mark_skipping_forward_iterator_t (hb_apply_context_t *c_,
- unsigned int start_index_,
- unsigned int num_items_,
- bool context_match = false)
+ inline may_match_t may_match (const hb_glyph_info_t &info,
+ const USHORT *glyph_data) const
{
- c = c_;
- idx = start_index_;
- num_items = num_items_;
- mask = context_match ? -1 : c->lookup_mask;
- syllable = context_match ? 0 : c->buffer->cur().syllable ();
- end = c->buffer->len;
+ if (!(info.mask & mask) ||
+ (syllable && syllable != info.syllable ()))
+ return MATCH_NO;
+
+ if (match_func)
+ return match_func (info.codepoint, *glyph_data, match_data) ? MATCH_YES : MATCH_NO;
+
+ return MATCH_MAYBE;
+ }
+
+ enum may_skip_t {
+ SKIP_NO,
+ SKIP_YES,
+ SKIP_MAYBE
+ };
+
+ inline may_skip_t
+ may_skip (const hb_apply_context_t *c,
+ const hb_glyph_info_t &info) const
+ {
+ unsigned int property;
+
+ property = info.glyph_props();
+
+ if (!c->match_properties (info.codepoint, property, lookup_props))
+ return SKIP_YES;
+
+ if (unlikely (_hb_glyph_info_is_default_ignorable (&info) &&
+ (ignore_zwnj || !_hb_glyph_info_is_zwnj (&info)) &&
+ (ignore_zwj || !_hb_glyph_info_is_zwj (&info)) &&
+ !is_a_ligature (info)))
+ return SKIP_MAYBE;
+
+ return SKIP_NO;
}
- inline bool has_no_chance (void) const
+
+ protected:
+ unsigned int lookup_props;
+ bool ignore_zwnj;
+ bool ignore_zwj;
+ hb_mask_t mask;
+ uint8_t syllable;
+ match_func_t match_func;
+ const void *match_data;
+ };
+
+ struct skipping_forward_iterator_t
+ {
+ inline skipping_forward_iterator_t (hb_apply_context_t *c_,
+ unsigned int start_index_,
+ unsigned int num_items_,
+ bool context_match = false) :
+ idx (start_index_),
+ c (c_),
+ match_glyph_data (NULL),
+ num_items (num_items_),
+ end (c->buffer->len)
{
- return unlikely (num_items && idx + num_items >= end);
+ matcher.set_lookup_props (c->lookup_props);
+ if (c->auto_joiners)
+ {
+ /* Ignore ZWNJ if we are matching GSUB context, or matching GPOS. */
+ matcher.set_ignore_zwnj (context_match || c->table_index == 1);
+ matcher.set_ignore_zwj (true);
+ }
+ if (!context_match)
+ {
+ matcher.set_mask (c->lookup_mask);
+ }
+ matcher.set_syllable (start_index_ == c->buffer->idx ? c->buffer->cur().syllable () : 0);
}
- inline void reject (void)
+ inline void set_lookup_props (unsigned int lookup_props) { matcher.set_lookup_props (lookup_props); }
+ inline void set_syllable (unsigned int syllable) { matcher.set_syllable (syllable); }
+ inline void set_match_func (matcher_t::match_func_t match_func,
+ const void *match_data,
+ const USHORT glyph_data[])
{
- num_items++;
+ matcher.set_match_func (match_func, match_data);
+ match_glyph_data = glyph_data;
}
- inline bool next (unsigned int *property_out,
- unsigned int lookup_props)
+
+ inline bool has_no_chance (void) const { return unlikely (num_items && idx + num_items >= end); }
+ inline void reject (void) { num_items++; match_glyph_data--; }
+ inline bool next (void)
{
assert (num_items > 0);
- do
+ while (!has_no_chance ())
{
- if (has_no_chance ())
- return false;
idx++;
- } while (c->should_skip_mark (&c->buffer->info[idx], lookup_props, property_out));
- num_items--;
- return (c->buffer->info[idx].mask & mask) && (!syllable || syllable == c->buffer->info[idx].syllable ());
- }
- inline bool next (unsigned int *property_out = NULL)
- {
- return next (property_out, c->lookup_props);
+ const hb_glyph_info_t &info = c->buffer->info[idx];
+
+ matcher_t::may_skip_t skip = matcher.may_skip (c, info);
+ if (unlikely (skip == matcher_t::SKIP_YES))
+ continue;
+
+ matcher_t::may_match_t match = matcher.may_match (info, match_glyph_data);
+ if (match == matcher_t::MATCH_YES ||
+ (match == matcher_t::MATCH_MAYBE &&
+ skip == matcher_t::SKIP_NO))
+ {
+ num_items--;
+ match_glyph_data++;
+ return true;
+ }
+
+ if (skip == matcher_t::SKIP_NO)
+ return false;
+ }
+ return false;
}
unsigned int idx;
protected:
hb_apply_context_t *c;
+ matcher_t matcher;
+ const USHORT *match_glyph_data;
+
unsigned int num_items;
- hb_mask_t mask;
- uint8_t syllable;
unsigned int end;
};
- struct mark_skipping_backward_iterator_t
+ struct skipping_backward_iterator_t
{
- inline mark_skipping_backward_iterator_t (hb_apply_context_t *c_,
- unsigned int start_index_,
- unsigned int num_items_,
- hb_mask_t mask_ = 0,
- bool match_syllable_ = true)
- {
- c = c_;
- idx = start_index_;
- num_items = num_items_;
- mask = mask_ ? mask_ : c->lookup_mask;
- syllable = match_syllable_ ? c->buffer->cur().syllable () : 0;
- }
- inline bool has_no_chance (void) const
+ inline skipping_backward_iterator_t (hb_apply_context_t *c_,
+ unsigned int start_index_,
+ unsigned int num_items_,
+ bool context_match = false) :
+ idx (start_index_),
+ c (c_),
+ match_glyph_data (NULL),
+ num_items (num_items_)
{
- return unlikely (idx < num_items);
+ matcher.set_lookup_props (c->lookup_props);
+ if (c->auto_joiners)
+ {
+ /* Ignore ZWNJ if we are matching GSUB context, or matching GPOS. */
+ matcher.set_ignore_zwnj (context_match || c->table_index == 1);
+ matcher.set_ignore_zwj (true);
+ }
+ if (!context_match)
+ {
+ matcher.set_mask (c->lookup_mask);
+ }
+ matcher.set_syllable (start_index_ == c->buffer->idx ? c->buffer->cur().syllable () : 0);
}
- inline void reject (void)
+ inline void set_lookup_props (unsigned int lookup_props) { matcher.set_lookup_props (lookup_props); }
+ inline void set_syllable (unsigned int syllable) { matcher.set_syllable (syllable); }
+ inline void set_match_func (matcher_t::match_func_t match_func,
+ const void *match_data,
+ const USHORT glyph_data[])
{
- num_items++;
+ matcher.set_match_func (match_func, match_data);
+ match_glyph_data = glyph_data;
}
- inline bool prev (unsigned int *property_out,
- unsigned int lookup_props)
+
+ inline bool has_no_chance (void) const { return unlikely (idx < num_items); }
+ inline void reject (void) { num_items++; }
+ inline bool prev (void)
{
assert (num_items > 0);
- do
+ while (!has_no_chance ())
{
- if (has_no_chance ())
- return false;
idx--;
- } while (c->should_skip_mark (&c->buffer->out_info[idx], lookup_props, property_out));
- num_items--;
- return (c->buffer->out_info[idx].mask & mask) && (!syllable || syllable == c->buffer->out_info[idx].syllable ());
- }
- inline bool prev (unsigned int *property_out = NULL)
- {
- return prev (property_out, c->lookup_props);
+ const hb_glyph_info_t &info = c->buffer->out_info[idx];
+
+ matcher_t::may_skip_t skip = matcher.may_skip (c, info);
+
+ if (unlikely (skip == matcher_t::SKIP_YES))
+ continue;
+
+ matcher_t::may_match_t match = matcher.may_match (info, match_glyph_data);
+ if (match == matcher_t::MATCH_YES ||
+ (match == matcher_t::MATCH_MAYBE &&
+ skip == matcher_t::SKIP_NO))
+ {
+ num_items--;
+ match_glyph_data++;
+ return true;
+ }
+
+ if (skip == matcher_t::SKIP_NO)
+ return false;
+ }
+ return false;
}
unsigned int idx;
protected:
hb_apply_context_t *c;
+ matcher_t matcher;
+ const USHORT *match_glyph_data;
+
unsigned int num_items;
- hb_mask_t mask;
- uint8_t syllable;
};
inline bool
@@ -423,42 +559,15 @@ struct hb_apply_context_t
inline bool
check_glyph_property (hb_glyph_info_t *info,
- unsigned int lookup_props,
- unsigned int *property_out) const
+ unsigned int lookup_props) const
{
unsigned int property;
property = info->glyph_props();
- *property_out = property;
return match_properties (info->codepoint, property, lookup_props);
}
- inline bool
- should_skip_mark (hb_glyph_info_t *info,
- unsigned int lookup_props,
- unsigned int *property_out) const
- {
- unsigned int property;
-
- property = info->glyph_props();
- if (property_out)
- *property_out = property;
-
- /* If it's a mark, skip it if we don't accept it. */
- if (unlikely (property & HB_OT_LAYOUT_GLYPH_PROPS_MARK))
- return !match_properties (info->codepoint, property, lookup_props);
-
- /* If not a mark, don't skip. */
- return false;
- }
-
-
- inline bool should_mark_skip_current_glyph (void) const
- {
- return should_skip_mark (&buffer->cur(), lookup_props, NULL);
- }
-
inline void set_class (hb_codepoint_t glyph_index, unsigned int class_guess) const
{
if (likely (has_glyph_classes))
@@ -602,7 +711,8 @@ static inline bool match_input (hb_apply_context_t *c,
{
TRACE_APPLY (NULL);
- hb_apply_context_t::mark_skipping_forward_iterator_t skippy_iter (c, c->buffer->idx, count - 1);
+ hb_apply_context_t::skipping_forward_iterator_t skippy_iter (c, c->buffer->idx, count - 1);
+ skippy_iter.set_match_func (match_func, match_data, input);
if (skippy_iter.has_no_chance ()) return TRACE_RETURN (false);
/*
@@ -623,7 +733,7 @@ static inline bool match_input (hb_apply_context_t *c,
* ligate with a conjunct...)
*/
- bool is_mark_ligature = !!(c->property & HB_OT_LAYOUT_GLYPH_PROPS_MARK);
+ bool is_mark_ligature = !!(c->buffer->cur().glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_MARK);
unsigned int total_component_count = 0;
total_component_count += get_lig_num_comps (c->buffer->cur());
@@ -633,11 +743,7 @@ static inline bool match_input (hb_apply_context_t *c,
for (unsigned int i = 1; i < count; i++)
{
- unsigned int property;
-
- if (!skippy_iter.next (&property)) return TRACE_RETURN (false);
-
- if (likely (!match_func (c->buffer->info[skippy_iter.idx].codepoint, input[i - 1], match_data))) return TRACE_RETURN (false);
+ if (!skippy_iter.next ()) return TRACE_RETURN (false);
unsigned int this_lig_id = get_lig_id (c->buffer->info[skippy_iter.idx]);
unsigned int this_lig_comp = get_lig_comp (c->buffer->info[skippy_iter.idx]);
@@ -656,7 +762,7 @@ static inline bool match_input (hb_apply_context_t *c,
return TRACE_RETURN (false);
}
- is_mark_ligature = is_mark_ligature && (property & HB_OT_LAYOUT_GLYPH_PROPS_MARK);
+ is_mark_ligature = is_mark_ligature && (c->buffer->info[skippy_iter.idx].glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_MARK);
total_component_count += get_lig_num_comps (c->buffer->info[skippy_iter.idx]);
}
@@ -673,13 +779,17 @@ static inline bool match_input (hb_apply_context_t *c,
}
static inline void ligate_input (hb_apply_context_t *c,
unsigned int count, /* Including the first glyph (not matched) */
- const USHORT input[] HB_UNUSED, /* Array of input values--start with second glyph */
+ const USHORT input[], /* Array of input values--start with second glyph */
+ match_func_t match_func,
+ const void *match_data,
hb_codepoint_t lig_glyph,
- match_func_t match_func HB_UNUSED,
- const void *match_data HB_UNUSED,
bool is_mark_ligature,
unsigned int total_component_count)
{
+ hb_apply_context_t::skipping_forward_iterator_t skippy_iter (c, c->buffer->idx, count - 1);
+ skippy_iter.set_match_func (match_func, match_data, input);
+ if (skippy_iter.has_no_chance ()) return;
+
/*
* - If it *is* a mark ligature, we don't allocate a new ligature id, and leave
* the ligature to keep its old ligature id. This will allow it to attach to
@@ -720,7 +830,9 @@ static inline void ligate_input (hb_apply_context_t *c,
for (unsigned int i = 1; i < count; i++)
{
- while (c->should_mark_skip_current_glyph ())
+ if (!skippy_iter.next ()) return;
+
+ while (c->buffer->idx < skippy_iter.idx)
{
if (!is_mark_ligature) {
unsigned int new_lig_comp = components_so_far - last_num_components +
@@ -759,19 +871,14 @@ static inline bool match_backtrack (hb_apply_context_t *c,
{
TRACE_APPLY (NULL);
- hb_apply_context_t::mark_skipping_backward_iterator_t skippy_iter (c, c->buffer->backtrack_len (), count, true);
- if (skippy_iter.has_no_chance ())
- return TRACE_RETURN (false);
+ hb_apply_context_t::skipping_backward_iterator_t skippy_iter (c, c->buffer->backtrack_len (), count, true);
+ skippy_iter.set_match_func (match_func, match_data, backtrack);
+ if (skippy_iter.has_no_chance ()) return TRACE_RETURN (false);
for (unsigned int i = 0; i < count; i++)
- {
if (!skippy_iter.prev ())
return TRACE_RETURN (false);
- if (likely (!match_func (c->buffer->out_info[skippy_iter.idx].codepoint, backtrack[i], match_data)))
- return TRACE_RETURN (false);
- }
-
return TRACE_RETURN (true);
}
@@ -784,19 +891,14 @@ static inline bool match_lookahead (hb_apply_context_t *c,
{
TRACE_APPLY (NULL);
- hb_apply_context_t::mark_skipping_forward_iterator_t skippy_iter (c, c->buffer->idx + offset - 1, count, true);
- if (skippy_iter.has_no_chance ())
- return TRACE_RETURN (false);
+ hb_apply_context_t::skipping_forward_iterator_t skippy_iter (c, c->buffer->idx + offset - 1, count, true);
+ skippy_iter.set_match_func (match_func, match_data, lookahead);
+ if (skippy_iter.has_no_chance ()) return TRACE_RETURN (false);
for (unsigned int i = 0; i < count; i++)
- {
if (!skippy_iter.next ())
return TRACE_RETURN (false);
- if (likely (!match_func (c->buffer->info[skippy_iter.idx].codepoint, lookahead[i], match_data)))
- return TRACE_RETURN (false);
- }
-
return TRACE_RETURN (true);
}
@@ -829,6 +931,9 @@ static inline void recurse_lookups (context_t *c,
static inline bool apply_lookup (hb_apply_context_t *c,
unsigned int count, /* Including the first glyph */
+ const USHORT input[], /* Array of input values--start with second glyph */
+ match_func_t match_func,
+ const void *match_data,
unsigned int lookupCount,
const LookupRecord lookupRecord[] /* Array of LookupRecords--in design order */)
{
@@ -845,17 +950,46 @@ static inline bool apply_lookup (hb_apply_context_t *c,
* and we jump out of it. Not entirely disastrous. So we don't check
* for reverse lookup here.
*/
- for (unsigned int i = 0; i < count; /* NOP */)
+
+ hb_apply_context_t::skipping_forward_iterator_t skippy_iter (c, c->buffer->idx, count - 1);
+ skippy_iter.set_match_func (match_func, match_data, input);
+ uint8_t syllable = c->buffer->cur().syllable();
+
+ unsigned int i = 0;
+ if (lookupCount && 0 == lookupRecord->sequenceIndex)
{
- if (unlikely (c->buffer->idx == end))
- return TRACE_RETURN (true);
- while (c->should_mark_skip_current_glyph ())
+ unsigned int old_pos = c->buffer->idx;
+
+ /* Apply a lookup */
+ bool done = c->recurse (lookupRecord->lookupListIndex);
+
+ lookupRecord++;
+ lookupCount--;
+ /* Err, this is wrong if the lookup jumped over some glyphs */
+ i += c->buffer->idx - old_pos;
+
+ if (!done)
+ goto not_applied;
+ else
{
- /* No lookup applied for this index */
- c->buffer->next_glyph ();
- if (unlikely (c->buffer->idx == end))
- return TRACE_RETURN (true);
+ /* Reinitialize iterator. */
+ hb_apply_context_t::skipping_forward_iterator_t tmp (c, c->buffer->idx - 1, count - i);
+ tmp.set_syllable (syllable);
+ skippy_iter = tmp;
}
+ }
+ else
+ {
+ not_applied:
+ /* No lookup applied for this index */
+ c->buffer->next_glyph ();
+ i++;
+ }
+ while (i < count)
+ {
+ if (!skippy_iter.next ()) return TRACE_RETURN (true);
+ while (c->buffer->idx < skippy_iter.idx)
+ c->buffer->next_glyph ();
if (lookupCount && i == lookupRecord->sequenceIndex)
{
@@ -868,15 +1002,20 @@ static inline bool apply_lookup (hb_apply_context_t *c,
lookupCount--;
/* Err, this is wrong if the lookup jumped over some glyphs */
i += c->buffer->idx - old_pos;
- if (unlikely (c->buffer->idx == end))
- return TRACE_RETURN (true);
if (!done)
- goto not_applied;
+ goto not_applied2;
+ else
+ {
+ /* Reinitialize iterator. */
+ hb_apply_context_t::skipping_forward_iterator_t tmp (c, c->buffer->idx - 1, count - i);
+ tmp.set_syllable (syllable);
+ skippy_iter = tmp;
+ }
}
else
{
- not_applied:
+ not_applied2:
/* No lookup applied for this index */
c->buffer->next_glyph ();
i++;
@@ -958,7 +1097,8 @@ static inline bool context_apply_lookup (hb_apply_context_t *c,
inputCount, input,
lookup_context.funcs.match, lookup_context.match_data)
&& apply_lookup (c,
- inputCount,
+ inputCount, input,
+ lookup_context.funcs.match, lookup_context.match_data,
lookupCount, lookupRecord);
}
@@ -1494,7 +1634,8 @@ static inline bool chain_context_apply_lookup (hb_apply_context_t *c,
lookup_context.funcs.match, lookup_context.match_data[2],
lookahead_offset)
&& apply_lookup (c,
- inputCount,
+ inputCount, input,
+ lookup_context.funcs.match, lookup_context.match_data[1],
lookupCount, lookupRecord);
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout-private.hh
index 49093de8a1e..d826108c11b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout-private.hh
@@ -43,6 +43,58 @@
#define syllable() var1.u8[2] /* GSUB/GPOS shaping boundaries */
#define lig_props() var1.u8[3] /* GSUB/GPOS ligature tracking */
+/* buffer var allocations, used during the entire shaping process */
+#define unicode_props0() var2.u8[0]
+#define unicode_props1() var2.u8[1]
+
+
+inline void
+_hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_unicode_funcs_t *unicode)
+{
+ info->unicode_props0() = ((unsigned int) unicode->general_category (info->codepoint)) |
+ (unicode->is_default_ignorable (info->codepoint) ? 0x80 : 0) |
+ (info->codepoint == 0x200C ? 0x40 : 0) |
+ (info->codepoint == 0x200D ? 0x20 : 0);
+ info->unicode_props1() = unicode->modified_combining_class (info->codepoint);
+}
+
+inline hb_unicode_general_category_t
+_hb_glyph_info_get_general_category (const hb_glyph_info_t *info)
+{
+ return (hb_unicode_general_category_t) (info->unicode_props0() & 0x1F);
+}
+
+inline void
+_hb_glyph_info_set_modified_combining_class (hb_glyph_info_t *info, unsigned int modified_class)
+{
+ info->unicode_props1() = modified_class;
+}
+
+inline unsigned int
+_hb_glyph_info_get_modified_combining_class (const hb_glyph_info_t *info)
+{
+ return info->unicode_props1();
+}
+
+inline hb_bool_t
+_hb_glyph_info_is_default_ignorable (const hb_glyph_info_t *info)
+{
+ return !!(info->unicode_props0() & 0x80);
+}
+
+inline hb_bool_t
+_hb_glyph_info_is_zwnj (const hb_glyph_info_t *info)
+{
+ return !!(info->unicode_props0() & 0x40);
+}
+
+inline hb_bool_t
+_hb_glyph_info_is_zwj (const hb_glyph_info_t *info)
+{
+ return !!(info->unicode_props0() & 0x20);
+}
+
+
#define hb_ot_layout_from_face(face) ((hb_ot_layout_t *) face->shaper_data.ot)
/*
@@ -50,11 +102,11 @@
*/
typedef enum {
- HB_OT_LAYOUT_GLYPH_PROPS_UNCLASSIFIED = 0x0001,
- HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH = 0x0002,
- HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE = 0x0004,
- HB_OT_LAYOUT_GLYPH_PROPS_MARK = 0x0008,
- HB_OT_LAYOUT_GLYPH_PROPS_COMPONENT = 0x0010
+ HB_OT_LAYOUT_GLYPH_PROPS_UNCLASSIFIED = 1 << HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED,
+ HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH = 1 << HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH,
+ HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE = 1 << HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE,
+ HB_OT_LAYOUT_GLYPH_PROPS_MARK = 1 << HB_OT_LAYOUT_GLYPH_CLASS_MARK,
+ HB_OT_LAYOUT_GLYPH_PROPS_COMPONENT = 1 << HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT
} hb_ot_layout_glyph_class_mask_t;
@@ -154,7 +206,8 @@ HB_INTERNAL hb_bool_t
hb_ot_layout_substitute_lookup (hb_font_t *font,
hb_buffer_t *buffer,
unsigned int lookup_index,
- hb_mask_t mask);
+ hb_mask_t mask,
+ hb_bool_t auto_joiners);
/* Should be called after all the substitute_lookup's are done */
HB_INTERNAL void
@@ -171,13 +224,13 @@ HB_INTERNAL hb_bool_t
hb_ot_layout_position_lookup (hb_font_t *font,
hb_buffer_t *buffer,
unsigned int lookup_index,
- hb_mask_t mask);
+ hb_mask_t mask,
+ hb_bool_t auto_joiners);
/* Should be called after all the position_lookup's are done */
HB_INTERNAL void
hb_ot_layout_position_finish (hb_font_t *font,
- hb_buffer_t *buffer,
- hb_bool_t zero_width_attached_marks);
+ hb_buffer_t *buffer);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout.cc
index 3ff6fc8c3d6..0349b328d26 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout.cc
@@ -666,11 +666,12 @@ hb_bool_t
hb_ot_layout_substitute_lookup (hb_font_t *font,
hb_buffer_t *buffer,
unsigned int lookup_index,
- hb_mask_t mask)
+ hb_mask_t mask,
+ hb_bool_t auto_joiners)
{
if (unlikely (lookup_index >= hb_ot_layout_from_face (font->face)->gsub_lookup_count)) return false;
- OT::hb_apply_context_t c (font, buffer, mask);
+ OT::hb_apply_context_t c (0, font, buffer, mask, auto_joiners);
const OT::SubstLookup& l = hb_ot_layout_from_face (font->face)->gsub->get_lookup (lookup_index);
@@ -715,11 +716,12 @@ hb_bool_t
hb_ot_layout_position_lookup (hb_font_t *font,
hb_buffer_t *buffer,
unsigned int lookup_index,
- hb_mask_t mask)
+ hb_mask_t mask,
+ hb_bool_t auto_joiners)
{
if (unlikely (lookup_index >= hb_ot_layout_from_face (font->face)->gpos_lookup_count)) return false;
- OT::hb_apply_context_t c (font, buffer, mask);
+ OT::hb_apply_context_t c (1, font, buffer, mask, auto_joiners);
const OT::PosLookup& l = hb_ot_layout_from_face (font->face)->gpos->get_lookup (lookup_index);
@@ -727,9 +729,9 @@ hb_ot_layout_position_lookup (hb_font_t *font,
}
void
-hb_ot_layout_position_finish (hb_font_t *font, hb_buffer_t *buffer, hb_bool_t zero_width_attached_marks)
+hb_ot_layout_position_finish (hb_font_t *font, hb_buffer_t *buffer)
{
- OT::GPOS::position_finish (font, buffer, zero_width_attached_marks);
+ OT::GPOS::position_finish (font, buffer);
}
hb_bool_t
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout.h b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout.h
index 134f1a6c164..134f1a6c164 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-layout.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-layout.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-map-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-map-private.hh
index b140207aa97..942e9f4aa6f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-map-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-map-private.hh
@@ -49,14 +49,16 @@ struct hb_ot_map_t
unsigned int shift;
hb_mask_t mask;
hb_mask_t _1_mask; /* mask for value=1, for quick access */
- hb_bool_t needs_fallback;
+ unsigned int needs_fallback : 1;
+ unsigned int auto_joiners : 1;
static int cmp (const feature_map_t *a, const feature_map_t *b)
{ return a->tag < b->tag ? -1 : a->tag > b->tag ? 1 : 0; }
};
struct lookup_map_t {
- unsigned int index;
+ unsigned short index;
+ unsigned short auto_joiners : 1;
hb_mask_t mask;
static int cmp (const lookup_map_t *a, const lookup_map_t *b)
@@ -136,7 +138,8 @@ struct hb_ot_map_t
HB_INTERNAL void add_lookups (hb_face_t *face,
unsigned int table_index,
unsigned int feature_index,
- hb_mask_t mask);
+ hb_mask_t mask,
+ bool auto_joiners);
hb_mask_t global_mask;
@@ -145,6 +148,28 @@ struct hb_ot_map_t
hb_prealloced_array_t<pause_map_t, 1> pauses[2]; /* GSUB/GPOS */
};
+enum hb_ot_map_feature_flags_t {
+ F_NONE = 0x0000,
+ F_GLOBAL = 0x0001,
+ F_HAS_FALLBACK = 0x0002,
+ F_MANUAL_JOINERS = 0x0004
+};
+inline hb_ot_map_feature_flags_t
+operator | (hb_ot_map_feature_flags_t l, hb_ot_map_feature_flags_t r)
+{ return hb_ot_map_feature_flags_t ((unsigned int) l | (unsigned int) r); }
+inline hb_ot_map_feature_flags_t
+operator & (hb_ot_map_feature_flags_t l, hb_ot_map_feature_flags_t r)
+{ return hb_ot_map_feature_flags_t ((unsigned int) l & (unsigned int) r); }
+inline hb_ot_map_feature_flags_t
+operator ~ (hb_ot_map_feature_flags_t r)
+{ return hb_ot_map_feature_flags_t (~(unsigned int) r); }
+inline hb_ot_map_feature_flags_t&
+operator |= (hb_ot_map_feature_flags_t &l, hb_ot_map_feature_flags_t r)
+{ l = l | r; return l; }
+inline hb_ot_map_feature_flags_t&
+operator &= (hb_ot_map_feature_flags_t& l, hb_ot_map_feature_flags_t r)
+{ l = l & r; return l; }
+
struct hb_ot_map_builder_t
{
@@ -153,10 +178,11 @@ struct hb_ot_map_builder_t
HB_INTERNAL hb_ot_map_builder_t (hb_face_t *face_,
const hb_segment_properties_t *props_);
- HB_INTERNAL void add_feature (hb_tag_t tag, unsigned int value, bool global, bool has_fallback = false);
+ HB_INTERNAL void add_feature (hb_tag_t tag, unsigned int value,
+ hb_ot_map_feature_flags_t flags);
- inline void add_bool_feature (hb_tag_t tag, bool global = true, bool has_fallback = false)
- { add_feature (tag, 1, global, has_fallback); }
+ inline void add_global_bool_feature (hb_tag_t tag)
+ { add_feature (tag, 1, F_GLOBAL); }
inline void add_gsub_pause (hb_ot_map_t::pause_func_t pause_func)
{ add_pause (0, pause_func); }
@@ -177,8 +203,7 @@ struct hb_ot_map_builder_t
hb_tag_t tag;
unsigned int seq; /* sequence#, used for stable sorting only */
unsigned int max_value;
- bool global; /* whether the feature applies value to every glyph in the buffer */
- bool has_fallback; /* whether to allocate bits even if feature not found */
+ hb_ot_map_feature_flags_t flags;
unsigned int default_value; /* for non-global features, what should the unset glyphs take */
unsigned int stage[2]; /* GSUB/GPOS */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-map.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-map.cc
index 62f7904b2f9..28a43a4dd2f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-map.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-map.cc
@@ -33,7 +33,8 @@ void
hb_ot_map_t::add_lookups (hb_face_t *face,
unsigned int table_index,
unsigned int feature_index,
- hb_mask_t mask)
+ hb_mask_t mask,
+ bool auto_joiners)
{
unsigned int lookup_indices[32];
unsigned int offset, len;
@@ -53,6 +54,7 @@ hb_ot_map_t::add_lookups (hb_face_t *face,
return;
lookup->mask = mask;
lookup->index = lookup_indices[i];
+ lookup->auto_joiners = auto_joiners;
}
offset += len;
@@ -84,16 +86,16 @@ hb_ot_map_builder_t::hb_ot_map_builder_t (hb_face_t *face_,
}
}
-void hb_ot_map_builder_t::add_feature (hb_tag_t tag, unsigned int value, bool global, bool has_fallback)
+void hb_ot_map_builder_t::add_feature (hb_tag_t tag, unsigned int value,
+ hb_ot_map_feature_flags_t flags)
{
feature_info_t *info = feature_infos.push();
if (unlikely (!info)) return;
info->tag = tag;
info->seq = feature_infos.len;
info->max_value = value;
- info->global = global;
- info->has_fallback = has_fallback;
- info->default_value = global ? value : 0;
+ info->flags = flags;
+ info->default_value = (flags & F_GLOBAL) ? value : 0;
info->stage[0] = current_stage[0];
info->stage[1] = current_stage[1];
}
@@ -108,7 +110,10 @@ void hb_ot_map_t::substitute (const hb_ot_shape_plan_t *plan, hb_font_t *font, h
for (unsigned int pause_index = 0; pause_index < pauses[table_index].len; pause_index++) {
const pause_map_t *pause = &pauses[table_index][pause_index];
for (; i < pause->num_lookups; i++)
- hb_ot_layout_substitute_lookup (font, buffer, lookups[table_index][i].index, lookups[table_index][i].mask);
+ hb_ot_layout_substitute_lookup (font, buffer,
+ lookups[table_index][i].index,
+ lookups[table_index][i].mask,
+ lookups[table_index][i].auto_joiners);
buffer->clear_output ();
@@ -117,7 +122,9 @@ void hb_ot_map_t::substitute (const hb_ot_shape_plan_t *plan, hb_font_t *font, h
}
for (; i < lookups[table_index].len; i++)
- hb_ot_layout_substitute_lookup (font, buffer, lookups[table_index][i].index, lookups[table_index][i].mask);
+ hb_ot_layout_substitute_lookup (font, buffer, lookups[table_index][i].index,
+ lookups[table_index][i].mask,
+ lookups[table_index][i].auto_joiners);
}
void hb_ot_map_t::position (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) const
@@ -128,14 +135,18 @@ void hb_ot_map_t::position (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_
for (unsigned int pause_index = 0; pause_index < pauses[table_index].len; pause_index++) {
const pause_map_t *pause = &pauses[table_index][pause_index];
for (; i < pause->num_lookups; i++)
- hb_ot_layout_position_lookup (font, buffer, lookups[table_index][i].index, lookups[table_index][i].mask);
+ hb_ot_layout_position_lookup (font, buffer, lookups[table_index][i].index,
+ lookups[table_index][i].mask,
+ lookups[table_index][i].auto_joiners);
if (pause->callback)
pause->callback (plan, font, buffer);
}
for (; i < lookups[table_index].len; i++)
- hb_ot_layout_position_lookup (font, buffer, lookups[table_index][i].index, lookups[table_index][i].mask);
+ hb_ot_layout_position_lookup (font, buffer, lookups[table_index][i].index,
+ lookups[table_index][i].mask,
+ lookups[table_index][i].auto_joiners);
}
void hb_ot_map_t::collect_lookups (unsigned int table_index, hb_set_t *lookups_out) const
@@ -176,18 +187,18 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m)
if (feature_infos[i].tag != feature_infos[j].tag)
feature_infos[++j] = feature_infos[i];
else {
- if (feature_infos[i].global) {
- feature_infos[j].global = true;
+ if (feature_infos[i].flags & F_GLOBAL) {
+ feature_infos[j].flags |= F_GLOBAL;
feature_infos[j].max_value = feature_infos[i].max_value;
feature_infos[j].default_value = feature_infos[i].default_value;
} else {
- feature_infos[j].global = false;
+ feature_infos[j].flags &= ~F_GLOBAL;
feature_infos[j].max_value = MAX (feature_infos[j].max_value, feature_infos[i].max_value);
+ /* Inherit default_value from j */
}
- feature_infos[j].has_fallback = feature_infos[j].has_fallback || feature_infos[i].has_fallback;
+ feature_infos[j].flags |= (feature_infos[i].flags & F_HAS_FALLBACK);
feature_infos[j].stage[0] = MIN (feature_infos[j].stage[0], feature_infos[i].stage[0]);
feature_infos[j].stage[1] = MIN (feature_infos[j].stage[1], feature_infos[i].stage[1]);
- /* Inherit default_value from j */
}
feature_infos.shrink (j + 1);
}
@@ -200,7 +211,7 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m)
unsigned int bits_needed;
- if (info->global && info->max_value == 1)
+ if ((info->flags & F_GLOBAL) && info->max_value == 1)
/* Uses the global bit */
bits_needed = 0;
else
@@ -219,7 +230,7 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m)
language_index[table_index],
info->tag,
&feature_index[table_index]);
- if (!found && !info->has_fallback)
+ if (!found && !(info->flags & F_HAS_FALLBACK))
continue;
@@ -232,7 +243,8 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m)
map->index[1] = feature_index[1];
map->stage[0] = info->stage[0];
map->stage[1] = info->stage[1];
- if (info->global && info->max_value == 1) {
+ map->auto_joiners = !(info->flags & F_MANUAL_JOINERS);
+ if ((info->flags & F_GLOBAL) && info->max_value == 1) {
/* Uses the global bit */
map->shift = 0;
map->mask = 1;
@@ -240,8 +252,7 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m)
map->shift = next_bit;
map->mask = (1 << (next_bit + bits_needed)) - (1 << next_bit);
next_bit += bits_needed;
- if (info->global)
- m.global_mask |= (info->default_value << map->shift) & map->mask;
+ m.global_mask |= (info->default_value << map->shift) & map->mask;
}
map->_1_mask = (1 << map->shift) & map->mask;
map->needs_fallback = !found;
@@ -264,7 +275,7 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m)
script_index[table_index],
language_index[table_index],
&required_feature_index))
- m.add_lookups (face, table_index, required_feature_index, 1);
+ m.add_lookups (face, table_index, required_feature_index, 1, true);
unsigned int pause_index = 0;
unsigned int last_num_lookups = 0;
@@ -272,7 +283,10 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m)
{
for (unsigned i = 0; i < m.features.len; i++)
if (m.features[i].stage[table_index] == stage)
- m.add_lookups (face, table_index, m.features[i].index[table_index], m.features[i].mask);
+ m.add_lookups (face, table_index,
+ m.features[i].index[table_index],
+ m.features[i].mask,
+ m.features[i].auto_joiners);
/* Sort lookups and merge duplicates */
if (last_num_lookups < m.lookups[table_index].len)
@@ -284,7 +298,10 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m)
if (m.lookups[table_index][i].index != m.lookups[table_index][j].index)
m.lookups[table_index][++j] = m.lookups[table_index][i];
else
+ {
m.lookups[table_index][j].mask |= m.lookups[table_index][i].mask;
+ m.lookups[table_index][j].auto_joiners &= m.lookups[table_index][i].auto_joiners;
+ }
m.lookups[table_index].shrink (j + 1);
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-maxp-table.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-maxp-table.hh
index 0ce3ebcc2a6..0ce3ebcc2a6 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-maxp-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-maxp-table.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-name-table.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-name-table.hh
index 75a1b94ea31..75a1b94ea31 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-name-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-name-table.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-arabic-fallback.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-arabic-fallback.hh
index 4fcd0a2fd94..6f8e9510fe3 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-arabic-fallback.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-arabic-fallback.hh
@@ -244,7 +244,7 @@ arabic_fallback_plan_shape (arabic_fallback_plan_t *fallback_plan,
{
for (unsigned int i = 0; i < ARABIC_NUM_FALLBACK_FEATURES; i++)
if (fallback_plan->lookup_array[i]) {
- OT::hb_apply_context_t c (font, buffer, fallback_plan->mask_array[i]);
+ OT::hb_apply_context_t c (0, font, buffer, fallback_plan->mask_array[i], true/*auto_joiners*/);
fallback_plan->lookup_array[i]->apply_string (&c, &fallback_plan->digest_array[i]);
}
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-arabic-table.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-arabic-table.hh
index 730a275bf0a..730a275bf0a 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-arabic-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-arabic-table.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-arabic.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-arabic.cc
index 35356fe97d3..18b3d02dc00 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-arabic.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-arabic.cc
@@ -37,17 +37,16 @@
*/
enum {
JOINING_TYPE_U = 0,
- JOINING_TYPE_R = 1,
- JOINING_TYPE_D = 2,
+ JOINING_TYPE_L = 1,
+ JOINING_TYPE_R = 2,
+ JOINING_TYPE_D = 3,
JOINING_TYPE_C = JOINING_TYPE_D,
- JOINING_GROUP_ALAPH = 3,
- JOINING_GROUP_DALATH_RISH = 4,
- NUM_STATE_MACHINE_COLS = 5,
+ JOINING_GROUP_ALAPH = 4,
+ JOINING_GROUP_DALATH_RISH = 5,
+ NUM_STATE_MACHINE_COLS = 6,
- /* We deliberately don't have a JOINING_TYPE_L since that's unused in Unicode. */
-
- JOINING_TYPE_T = 6,
- JOINING_TYPE_X = 7 /* means: use general-category to choose between U or T. */
+ JOINING_TYPE_T = 7,
+ JOINING_TYPE_X = 8 /* means: use general-category to choose between U or T. */
};
/*
@@ -81,8 +80,7 @@ static unsigned int get_joining_type (hb_codepoint_t u, hb_unicode_general_categ
if (unlikely (hb_in_range<hb_codepoint_t> (u, 0xA840, 0xA872)))
{
if (unlikely (u == 0xA872))
- /* XXX Looks like this should be TYPE_L, but we don't support that yet! */
- return JOINING_TYPE_R;
+ return JOINING_TYPE_L;
return JOINING_TYPE_D;
}
@@ -133,28 +131,28 @@ static const struct arabic_state_table_entry {
uint16_t next_state;
} arabic_state_table[][NUM_STATE_MACHINE_COLS] =
{
- /* jt_U, jt_R, jt_D, jg_ALAPH, jg_DALATH_RISH */
+ /* jt_U, jt_L, jt_R, jt_D, jg_ALAPH, jg_DALATH_RISH */
/* State 0: prev was U, not willing to join. */
- { {NONE,NONE,0}, {NONE,ISOL,1}, {NONE,ISOL,2}, {NONE,ISOL,1}, {NONE,ISOL,6}, },
+ { {NONE,NONE,0}, {NONE,ISOL,2}, {NONE,ISOL,1}, {NONE,ISOL,2}, {NONE,ISOL,1}, {NONE,ISOL,6}, },
/* State 1: prev was R or ISOL/ALAPH, not willing to join. */
- { {NONE,NONE,0}, {NONE,ISOL,1}, {NONE,ISOL,2}, {NONE,FIN2,5}, {NONE,ISOL,6}, },
+ { {NONE,NONE,0}, {NONE,ISOL,2}, {NONE,ISOL,1}, {NONE,ISOL,2}, {NONE,FIN2,5}, {NONE,ISOL,6}, },
- /* State 2: prev was D/ISOL, willing to join. */
- { {NONE,NONE,0}, {INIT,FINA,1}, {INIT,FINA,3}, {INIT,FINA,4}, {INIT,FINA,6}, },
+ /* State 2: prev was D/L in ISOL form, willing to join. */
+ { {NONE,NONE,0}, {NONE,ISOL,2}, {INIT,FINA,1}, {INIT,FINA,3}, {INIT,FINA,4}, {INIT,FINA,6}, },
- /* State 3: prev was D/FINA, willing to join. */
- { {NONE,NONE,0}, {MEDI,FINA,1}, {MEDI,FINA,3}, {MEDI,FINA,4}, {MEDI,FINA,6}, },
+ /* State 3: prev was D in FINA form, willing to join. */
+ { {NONE,NONE,0}, {NONE,ISOL,2}, {MEDI,FINA,1}, {MEDI,FINA,3}, {MEDI,FINA,4}, {MEDI,FINA,6}, },
/* State 4: prev was FINA ALAPH, not willing to join. */
- { {NONE,NONE,0}, {MED2,ISOL,1}, {MED2,ISOL,2}, {MED2,FIN2,5}, {MED2,ISOL,6}, },
+ { {NONE,NONE,0}, {NONE,ISOL,2}, {MED2,ISOL,1}, {MED2,ISOL,2}, {MED2,FIN2,5}, {MED2,ISOL,6}, },
/* State 5: prev was FIN2/FIN3 ALAPH, not willing to join. */
- { {NONE,NONE,0}, {ISOL,ISOL,1}, {ISOL,ISOL,2}, {ISOL,FIN2,5}, {ISOL,ISOL,6}, },
+ { {NONE,NONE,0}, {NONE,ISOL,2}, {ISOL,ISOL,1}, {ISOL,ISOL,2}, {ISOL,FIN2,5}, {ISOL,ISOL,6}, },
/* State 6: prev was DALATH/RISH, not willing to join. */
- { {NONE,NONE,0}, {NONE,ISOL,1}, {NONE,ISOL,2}, {NONE,FIN3,5}, {NONE,ISOL,6}, }
+ { {NONE,NONE,0}, {NONE,ISOL,2}, {NONE,ISOL,1}, {NONE,ISOL,2}, {NONE,FIN3,5}, {NONE,ISOL,6}, }
};
@@ -178,25 +176,25 @@ collect_features_arabic (hb_ot_shape_planner_t *plan)
* TODO: Add test cases for these two.
*/
- map->add_bool_feature (HB_TAG('c','c','m','p'));
- map->add_bool_feature (HB_TAG('l','o','c','l'));
+ map->add_global_bool_feature (HB_TAG('c','c','m','p'));
+ map->add_global_bool_feature (HB_TAG('l','o','c','l'));
map->add_gsub_pause (NULL);
for (unsigned int i = 0; i < ARABIC_NUM_FEATURES; i++)
- map->add_bool_feature (arabic_features[i], false, i < 4); /* The first four features have fallback. */
+ map->add_feature (arabic_features[i], 1, i < 4 ? F_HAS_FALLBACK : F_NONE); /* The first four features have fallback. */
map->add_gsub_pause (NULL);
- map->add_bool_feature (HB_TAG('r','l','i','g'), true, true);
+ map->add_feature (HB_TAG('r','l','i','g'), 1, F_GLOBAL|F_HAS_FALLBACK);
map->add_gsub_pause (arabic_fallback_shape);
- map->add_bool_feature (HB_TAG('c','a','l','t'));
+ map->add_global_bool_feature (HB_TAG('c','a','l','t'));
map->add_gsub_pause (NULL);
- map->add_bool_feature (HB_TAG('c','s','w','h'));
- map->add_bool_feature (HB_TAG('d','l','i','g'));
- map->add_bool_feature (HB_TAG('m','s','e','t'));
+ map->add_global_bool_feature (HB_TAG('c','s','w','h'));
+ map->add_global_bool_feature (HB_TAG('d','l','i','g'));
+ map->add_global_bool_feature (HB_TAG('m','s','e','t'));
}
#include "hb-ot-shape-complex-arabic-fallback.hh"
@@ -354,6 +352,6 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_arabic =
NULL, /* decompose */
NULL, /* compose */
setup_masks_arabic,
- true, /* zero_width_attached_marks */
+ HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE,
true, /* fallback_position */
};
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-default.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-default.cc
index 5340293db50..fad57f65e4a 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-default.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-default.cc
@@ -68,7 +68,7 @@ collect_features_default (hb_ot_shape_planner_t *plan)
}
for (; script_features && *script_features; script_features++)
- plan->map.add_bool_feature (*script_features);
+ plan->map.add_global_bool_feature (*script_features);
}
static hb_ot_shape_normalization_mode_t
@@ -221,6 +221,6 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_default =
NULL, /* decompose */
compose_default,
NULL, /* setup_masks */
- true, /* zero_width_attached_marks */
+ HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE,
true, /* fallback_position */
};
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-indic-machine.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-machine.hh
index ed40b968bcb..9bae3a3b8c3 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-indic-machine.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-machine.hh
@@ -32,7 +32,7 @@
#include "hb-private.hh"
-#line 36 "../../src/hb-ot-shape-complex-indic-machine.hh.tmp"
+#line 36 "hb-ot-shape-complex-indic-machine.hh.tmp"
static const unsigned char _indic_syllable_machine_trans_keys[] = {
1u, 16u, 13u, 13u, 5u, 7u, 5u, 7u, 7u, 7u, 5u, 7u, 5u, 7u, 7u, 7u,
5u, 7u, 5u, 7u, 7u, 7u, 5u, 7u, 5u, 7u, 7u, 7u, 4u, 4u, 6u, 6u,
@@ -1265,11 +1265,11 @@ static const int indic_syllable_machine_en_main = 170;
static void
find_syllables (hb_buffer_t *buffer)
{
- unsigned int p, pe, eof, ts HB_UNUSED, te, act;
+ unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED;
int cs;
hb_glyph_info_t *info = buffer->info;
-#line 1273 "../../src/hb-ot-shape-complex-indic-machine.hh.tmp"
+#line 1273 "hb-ot-shape-complex-indic-machine.hh.tmp"
{
cs = indic_syllable_machine_start;
ts = 0;
@@ -1286,7 +1286,7 @@ find_syllables (hb_buffer_t *buffer)
unsigned int last = 0;
unsigned int syllable_serial = 1;
-#line 1290 "../../src/hb-ot-shape-complex-indic-machine.hh.tmp"
+#line 1290 "hb-ot-shape-complex-indic-machine.hh.tmp"
{
int _slen;
int _trans;
@@ -1300,7 +1300,7 @@ _resume:
#line 1 "NONE"
{ts = p;}
break;
-#line 1304 "../../src/hb-ot-shape-complex-indic-machine.hh.tmp"
+#line 1304 "hb-ot-shape-complex-indic-machine.hh.tmp"
}
_keys = _indic_syllable_machine_trans_keys + (cs<<1);
@@ -1411,7 +1411,7 @@ _eof_trans:
#line 87 "../../src/hb-ot-shape-complex-indic-machine.rl"
{act = 5;}
break;
-#line 1415 "../../src/hb-ot-shape-complex-indic-machine.hh.tmp"
+#line 1415 "hb-ot-shape-complex-indic-machine.hh.tmp"
}
_again:
@@ -1420,7 +1420,7 @@ _again:
#line 1 "NONE"
{ts = 0;}
break;
-#line 1424 "../../src/hb-ot-shape-complex-indic-machine.hh.tmp"
+#line 1424 "hb-ot-shape-complex-indic-machine.hh.tmp"
}
if ( ++p != pe )
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-indic-machine.rl b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-machine.rl
index 11115c9cda4..f9f07d801d9 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-indic-machine.rl
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-machine.rl
@@ -103,7 +103,7 @@ main := |*
static void
find_syllables (hb_buffer_t *buffer)
{
- unsigned int p, pe, eof, ts HB_UNUSED, te, act;
+ unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED;
int cs;
hb_glyph_info_t *info = buffer->info;
%%{
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-private.hh
new file mode 100644
index 00000000000..39268b14533
--- /dev/null
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-private.hh
@@ -0,0 +1,151 @@
+/*
+ * Copyright © 2012 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
+ */
+
+#ifndef HB_OT_SHAPE_COMPLEX_INDIC_PRIVATE_HH
+#define HB_OT_SHAPE_COMPLEX_INDIC_PRIVATE_HH
+
+#include "hb-private.hh"
+
+
+#include "hb-ot-shape-complex-private.hh"
+#include "hb-ot-shape-private.hh" /* XXX Remove */
+
+
+#define INDIC_TABLE_ELEMENT_TYPE uint16_t
+
+/* Cateories used in the OpenType spec:
+ * https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx
+ */
+/* Note: This enum is duplicated in the -machine.rl source file.
+ * Not sure how to avoid duplication. */
+enum indic_category_t {
+ OT_X = 0,
+ OT_C,
+ OT_V,
+ OT_N,
+ OT_H,
+ OT_ZWNJ,
+ OT_ZWJ,
+ OT_M,
+ OT_SM,
+ OT_VD,
+ OT_A,
+ OT_NBSP,
+ OT_DOTTEDCIRCLE, /* Not in the spec, but special in Uniscribe. /Very very/ special! */
+ OT_RS, /* Register Shifter, used in Khmer OT spec */
+ OT_Coeng,
+ OT_Repha,
+ OT_Ra, /* Not explicitly listed in the OT spec, but used in the grammar. */
+ OT_CM
+};
+
+/* Visual positions in a syllable from left to right. */
+enum indic_position_t {
+ POS_START,
+
+ POS_RA_TO_BECOME_REPH,
+ POS_PRE_M,
+ POS_PRE_C,
+
+ POS_BASE_C,
+ POS_AFTER_MAIN,
+
+ POS_ABOVE_C,
+
+ POS_BEFORE_SUB,
+ POS_BELOW_C,
+ POS_AFTER_SUB,
+
+ POS_BEFORE_POST,
+ POS_POST_C,
+ POS_AFTER_POST,
+
+ POS_FINAL_C,
+ POS_SMVD,
+
+ POS_END
+};
+
+/* Categories used in IndicSyllabicCategory.txt from UCD. */
+enum indic_syllabic_category_t {
+ INDIC_SYLLABIC_CATEGORY_OTHER = OT_X,
+
+ INDIC_SYLLABIC_CATEGORY_AVAGRAHA = OT_X,
+ INDIC_SYLLABIC_CATEGORY_BINDU = OT_SM,
+ INDIC_SYLLABIC_CATEGORY_CONSONANT = OT_C,
+ INDIC_SYLLABIC_CATEGORY_CONSONANT_DEAD = OT_C,
+ INDIC_SYLLABIC_CATEGORY_CONSONANT_FINAL = OT_CM,
+ INDIC_SYLLABIC_CATEGORY_CONSONANT_HEAD_LETTER = OT_C,
+ INDIC_SYLLABIC_CATEGORY_CONSONANT_MEDIAL = OT_CM,
+ INDIC_SYLLABIC_CATEGORY_CONSONANT_PLACEHOLDER = OT_NBSP,
+ INDIC_SYLLABIC_CATEGORY_CONSONANT_SUBJOINED = OT_C,
+ INDIC_SYLLABIC_CATEGORY_CONSONANT_REPHA = OT_Repha,
+ INDIC_SYLLABIC_CATEGORY_MODIFYING_LETTER = OT_X,
+ INDIC_SYLLABIC_CATEGORY_NUKTA = OT_N,
+ INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER = OT_RS,
+ INDIC_SYLLABIC_CATEGORY_TONE_LETTER = OT_X,
+ INDIC_SYLLABIC_CATEGORY_TONE_MARK = OT_N,
+ INDIC_SYLLABIC_CATEGORY_VIRAMA = OT_H,
+ INDIC_SYLLABIC_CATEGORY_VISARGA = OT_SM,
+ INDIC_SYLLABIC_CATEGORY_VOWEL = OT_V,
+ INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT = OT_M,
+ INDIC_SYLLABIC_CATEGORY_VOWEL_INDEPENDENT = OT_V
+};
+
+/* Categories used in IndicSMatraCategory.txt from UCD */
+enum indic_matra_category_t {
+ INDIC_MATRA_CATEGORY_NOT_APPLICABLE = POS_END,
+
+ INDIC_MATRA_CATEGORY_LEFT = POS_PRE_C,
+ INDIC_MATRA_CATEGORY_TOP = POS_ABOVE_C,
+ INDIC_MATRA_CATEGORY_BOTTOM = POS_BELOW_C,
+ INDIC_MATRA_CATEGORY_RIGHT = POS_POST_C,
+
+ /* These should resolve to the position of the last part of the split sequence. */
+ INDIC_MATRA_CATEGORY_BOTTOM_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT,
+ INDIC_MATRA_CATEGORY_LEFT_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT,
+ INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM = INDIC_MATRA_CATEGORY_BOTTOM,
+ INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT,
+ INDIC_MATRA_CATEGORY_TOP_AND_LEFT = INDIC_MATRA_CATEGORY_TOP,
+ INDIC_MATRA_CATEGORY_TOP_AND_LEFT_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT,
+ INDIC_MATRA_CATEGORY_TOP_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT,
+
+ INDIC_MATRA_CATEGORY_INVISIBLE = INDIC_MATRA_CATEGORY_NOT_APPLICABLE,
+ INDIC_MATRA_CATEGORY_OVERSTRUCK = POS_AFTER_MAIN,
+ INDIC_MATRA_CATEGORY_VISUAL_ORDER_LEFT = POS_PRE_M
+};
+
+/* Note: We use ASSERT_STATIC_EXPR_ZERO() instead of ASSERT_STATIC_EXPR() and the comma operation
+ * because gcc fails to optimize the latter and fills the table in at runtime. */
+#define INDIC_COMBINE_CATEGORIES(S,M) \
+ (ASSERT_STATIC_EXPR_ZERO (M == INDIC_MATRA_CATEGORY_NOT_APPLICABLE || (S == INDIC_SYLLABIC_CATEGORY_VIRAMA || S == INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT)) + \
+ ASSERT_STATIC_EXPR_ZERO (S < 255 && M < 255) + \
+ ((M << 8) | S))
+
+HB_INTERNAL INDIC_TABLE_ELEMENT_TYPE
+hb_indic_get_categories (hb_codepoint_t u);
+
+#endif /* HB_OT_SHAPE_COMPLEX_INDIC_PRIVATE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-indic-table.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-table.cc
index 70765b6d6f4..18a022bc507 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-indic-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-table.cc
@@ -14,8 +14,7 @@
* # Date: 2012-05-14, 22:42:00 GMT [KW, LI]
*/
-#ifndef HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH
-#define HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH
+#include "hb-ot-shape-complex-indic-private.hh"
#define ISC_A INDIC_SYLLABIC_CATEGORY_AVAGRAHA /* 11 chars; Avagraha */
@@ -807,8 +806,8 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = {
}; /* Table occupancy: 60% */
-static INDIC_TABLE_ELEMENT_TYPE
-get_indic_categories (hb_codepoint_t u)
+INDIC_TABLE_ELEMENT_TYPE
+hb_indic_get_categories (hb_codepoint_t u)
{
if (0x0900 <= u && u <= 0x10A0) return indic_table[u - 0x0900 + indic_offset_0x0900];
if (0x1700 <= u && u <= 0x1800) return indic_table[u - 0x1700 + indic_offset_0x1700];
@@ -867,6 +866,4 @@ get_indic_categories (hb_codepoint_t u)
#undef IMC_TR
#undef IMC_VOL
-#endif /* HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH */
-
/* == End of generated table == */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-indic.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-indic.cc
index 5afede0c1b5..0beddc81989 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-indic.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-indic.cc
@@ -27,49 +27,245 @@
#include "hb-ot-shape-complex-indic-private.hh"
#include "hb-ot-layout-private.hh"
+/* buffer var allocations */
+#define indic_category() complex_var_u8_0() /* indic_category_t */
+#define indic_position() complex_var_u8_1() /* indic_position_t */
+
/*
- * Global Indic shaper options.
+ * Indic shaper.
*/
-struct indic_options_t
+
+#define IN_HALF_BLOCK(u, Base) (((u) & ~0x7F) == (Base))
+
+#define IS_DEVA(u) (IN_HALF_BLOCK (u, 0x0900))
+#define IS_BENG(u) (IN_HALF_BLOCK (u, 0x0980))
+#define IS_GURU(u) (IN_HALF_BLOCK (u, 0x0A00))
+#define IS_GUJR(u) (IN_HALF_BLOCK (u, 0x0A80))
+#define IS_ORYA(u) (IN_HALF_BLOCK (u, 0x0B00))
+#define IS_TAML(u) (IN_HALF_BLOCK (u, 0x0B80))
+#define IS_TELU(u) (IN_HALF_BLOCK (u, 0x0C00))
+#define IS_KNDA(u) (IN_HALF_BLOCK (u, 0x0C80))
+#define IS_MLYM(u) (IN_HALF_BLOCK (u, 0x0D00))
+#define IS_SINH(u) (IN_HALF_BLOCK (u, 0x0D80))
+#define IS_KHMR(u) (IN_HALF_BLOCK (u, 0x1780))
+
+
+#define MATRA_POS_LEFT(u) POS_PRE_M
+#define MATRA_POS_RIGHT(u) ( \
+ IS_DEVA(u) ? POS_AFTER_SUB : \
+ IS_BENG(u) ? POS_AFTER_POST : \
+ IS_GURU(u) ? POS_AFTER_POST : \
+ IS_GUJR(u) ? POS_AFTER_POST : \
+ IS_ORYA(u) ? POS_AFTER_POST : \
+ IS_TAML(u) ? POS_AFTER_POST : \
+ IS_TELU(u) ? (u <= 0x0C42 ? POS_BEFORE_SUB : POS_AFTER_SUB) : \
+ IS_KNDA(u) ? (u < 0x0CC3 || u > 0xCD6 ? POS_BEFORE_SUB : POS_AFTER_SUB) : \
+ IS_MLYM(u) ? POS_AFTER_POST : \
+ IS_SINH(u) ? POS_AFTER_SUB : \
+ IS_KHMR(u) ? POS_AFTER_POST : \
+ /*default*/ POS_AFTER_SUB \
+ )
+#define MATRA_POS_TOP(u) ( /* BENG and MLYM don't have top matras. */ \
+ IS_DEVA(u) ? POS_AFTER_SUB : \
+ IS_GURU(u) ? POS_AFTER_POST : /* Deviate from spec */ \
+ IS_GUJR(u) ? POS_AFTER_SUB : \
+ IS_ORYA(u) ? POS_AFTER_MAIN : \
+ IS_TAML(u) ? POS_AFTER_SUB : \
+ IS_TELU(u) ? POS_BEFORE_SUB : \
+ IS_KNDA(u) ? POS_BEFORE_SUB : \
+ IS_SINH(u) ? POS_AFTER_SUB : \
+ IS_KHMR(u) ? POS_AFTER_POST : \
+ /*default*/ POS_AFTER_SUB \
+ )
+#define MATRA_POS_BOTTOM(u) ( \
+ IS_DEVA(u) ? POS_AFTER_SUB : \
+ IS_BENG(u) ? POS_AFTER_SUB : \
+ IS_GURU(u) ? POS_AFTER_POST : \
+ IS_GUJR(u) ? POS_AFTER_POST : \
+ IS_ORYA(u) ? POS_AFTER_SUB : \
+ IS_TAML(u) ? POS_AFTER_POST : \
+ IS_TELU(u) ? POS_BEFORE_SUB : \
+ IS_KNDA(u) ? POS_BEFORE_SUB : \
+ IS_MLYM(u) ? POS_AFTER_POST : \
+ IS_SINH(u) ? POS_AFTER_SUB : \
+ IS_KHMR(u) ? POS_AFTER_POST : \
+ /*default*/ POS_AFTER_SUB \
+ )
+
+static inline indic_position_t
+matra_position (hb_codepoint_t u, indic_position_t side)
{
- int initialized : 1;
- int uniscribe_bug_compatible : 1;
-};
+ switch ((int) side)
+ {
+ case POS_PRE_C: return MATRA_POS_LEFT (u);
+ case POS_POST_C: return MATRA_POS_RIGHT (u);
+ case POS_ABOVE_C: return MATRA_POS_TOP (u);
+ case POS_BELOW_C: return MATRA_POS_BOTTOM (u);
+ };
+ return side;
+}
-union indic_options_union_t {
- int i;
- indic_options_t opts;
+/* XXX
+ * This is a hack for now. We should move this data into the main Indic table.
+ * Or completely remove it and just check in the tables.
+ */
+static const hb_codepoint_t ra_chars[] = {
+ 0x0930, /* Devanagari */
+ 0x09B0, /* Bengali */
+ 0x09F0, /* Bengali */
+ 0x0A30, /* Gurmukhi */ /* No Reph */
+ 0x0AB0, /* Gujarati */
+ 0x0B30, /* Oriya */
+ 0x0BB0, /* Tamil */ /* No Reph */
+ 0x0C30, /* Telugu */ /* Reph formed only with ZWJ */
+ 0x0CB0, /* Kannada */
+ 0x0D30, /* Malayalam */ /* No Reph, Logical Repha */
+
+ 0x0DBB, /* Sinhala */ /* Reph formed only with ZWJ */
+
+ 0x179A, /* Khmer */ /* No Reph, Visual Repha */
};
-ASSERT_STATIC (sizeof (int) == sizeof (indic_options_union_t));
-static indic_options_union_t
-indic_options_init (void)
+static inline indic_position_t
+consonant_position (hb_codepoint_t u)
+{
+ if ((u & ~0x007F) == 0x1780)
+ return POS_BELOW_C; /* In Khmer coeng model, post and below forms should not be reordered. */
+ return POS_BASE_C; /* Will recategorize later based on font lookups. */
+}
+
+static inline bool
+is_ra (hb_codepoint_t u)
+{
+ for (unsigned int i = 0; i < ARRAY_LENGTH (ra_chars); i++)
+ if (u == ra_chars[i])
+ return true;
+ return false;
+}
+
+static inline bool
+is_one_of (const hb_glyph_info_t &info, unsigned int flags)
{
- indic_options_union_t u;
- u.i = 0;
- u.opts.initialized = 1;
+ /* If it ligated, all bets are off. */
+ if (is_a_ligature (info)) return false;
+ return !!(FLAG (info.indic_category()) & flags);
+}
+
+#define JOINER_FLAGS (FLAG (OT_ZWJ) | FLAG (OT_ZWNJ))
+static inline bool
+is_joiner (const hb_glyph_info_t &info)
+{
+ return is_one_of (info, JOINER_FLAGS);
+}
- char *c = getenv ("HB_OT_INDIC_OPTIONS");
- u.opts.uniscribe_bug_compatible = c && strstr (c, "uniscribe-bug-compatible");
+/* Note:
+ *
+ * We treat Vowels and placeholders as if they were consonants. This is safe because Vowels
+ * cannot happen in a consonant syllable. The plus side however is, we can call the
+ * consonant syllable logic from the vowel syllable function and get it all right! */
+#define CONSONANT_FLAGS (FLAG (OT_C) | FLAG (OT_CM) | FLAG (OT_Ra) | FLAG (OT_V) | FLAG (OT_NBSP) | FLAG (OT_DOTTEDCIRCLE))
+static inline bool
+is_consonant (const hb_glyph_info_t &info)
+{
+ return is_one_of (info, CONSONANT_FLAGS);
+}
- return u;
+#define HALANT_OR_COENG_FLAGS (FLAG (OT_H) | FLAG (OT_Coeng))
+static inline bool
+is_halant_or_coeng (const hb_glyph_info_t &info)
+{
+ return is_one_of (info, HALANT_OR_COENG_FLAGS);
}
-static inline indic_options_t
-indic_options (void)
+static inline void
+set_indic_properties (hb_glyph_info_t &info)
{
- static indic_options_union_t options;
+ hb_codepoint_t u = info.codepoint;
+ unsigned int type = hb_indic_get_categories (u);
+ indic_category_t cat = (indic_category_t) (type & 0x7F);
+ indic_position_t pos = (indic_position_t) (type >> 8);
+
+
+ /*
+ * Re-assign category
+ */
- if (unlikely (!options.i)) {
- /* This is idempotent and threadsafe. */
- options = indic_options_init ();
+
+ /* The spec says U+0952 is OT_A. However, testing shows that Uniscribe
+ * treats U+0951..U+0952 all as OT_VD.
+ * TESTS:
+ * U+092E,U+0947,U+0952
+ * U+092E,U+0952,U+0947
+ * U+092E,U+0947,U+0951
+ * U+092E,U+0951,U+0947
+ * */
+ if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x0951, 0x0954)))
+ cat = OT_VD;
+
+ if (unlikely (u == 0x17D1))
+ cat = OT_X;
+ if (cat == OT_X &&
+ unlikely (hb_in_range<hb_codepoint_t> (u, 0x17CB, 0x17D3))) /* Khmer Various signs */
+ {
+ /* These are like Top Matras. */
+ cat = OT_M;
+ pos = POS_ABOVE_C;
+ }
+ if (u == 0x17C6) /* Khmer Bindu doesn't like to be repositioned. */
+ cat = OT_N;
+
+ if (unlikely (u == 0x17D2)) cat = OT_Coeng; /* Khmer coeng */
+ else if (unlikely (u == 0x200C)) cat = OT_ZWNJ;
+ else if (unlikely (u == 0x200D)) cat = OT_ZWJ;
+ else if (unlikely (u == 0x25CC)) cat = OT_DOTTEDCIRCLE;
+ else if (unlikely (u == 0x0A71)) cat = OT_SM; /* GURMUKHI ADDAK. More like consonant medial. like 0A75. */
+
+ if (cat == OT_Repha) {
+ /* There are two kinds of characters marked as Repha:
+ * - The ones that are GenCat=Mn are already positioned visually, ie. after base. (eg. Khmer)
+ * - The ones that are GenCat=Lo is encoded logically, ie. beginning of syllable. (eg. Malayalam)
+ *
+ * We recategorize the first kind to look like a Nukta and attached to the base directly.
+ */
+ if (_hb_glyph_info_get_general_category (&info) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)
+ cat = OT_N;
}
- return options.opts;
+
+
+ /*
+ * Re-assign position.
+ */
+
+ if ((FLAG (cat) & CONSONANT_FLAGS))
+ {
+ pos = consonant_position (u);
+ if (is_ra (u))
+ cat = OT_Ra;
+ }
+ else if (cat == OT_M)
+ {
+ pos = matra_position (u, pos);
+ }
+ else if (cat == OT_SM || cat == OT_VD)
+ {
+ pos = POS_SMVD;
+ }
+
+ if (unlikely (u == 0x0B01)) pos = POS_BEFORE_SUB; /* Oriya Bindu is BeforeSub in the spec. */
+
+
+
+ info.indic_category() = cat;
+ info.indic_position() = pos;
}
+/*
+ * Things above this line should ideally be moved to the Indic table itself.
+ */
+
/*
* Indic configurations. Note that we do not want to keep every single script-specific
@@ -123,8 +319,6 @@ static const indic_config_t indic_configs[] =
{HB_SCRIPT_MALAYALAM, true, 0x0D4D,BASE_POS_LAST, REPH_POS_AFTER_MAIN, REPH_MODE_LOG_REPHA},
{HB_SCRIPT_SINHALA, false,0x0DCA,BASE_POS_FIRST,REPH_POS_AFTER_MAIN, REPH_MODE_EXPLICIT},
{HB_SCRIPT_KHMER, false,0x17D2,BASE_POS_FIRST,REPH_POS_DEFAULT, REPH_MODE_VIS_REPHA},
- /* Myanmar does not have the "old_indic" behavior, even though it has a "new" tag. */
- {HB_SCRIPT_MYANMAR, false,0x1039,BASE_POS_LAST, REPH_POS_DEFAULT, REPH_MODE_EXPLICIT},
};
@@ -135,7 +329,7 @@ static const indic_config_t indic_configs[] =
struct feature_list_t {
hb_tag_t tag;
- hb_bool_t is_global;
+ hb_ot_map_feature_flags_t flags;
};
static const feature_list_t
@@ -145,32 +339,32 @@ indic_features[] =
* Basic features.
* These features are applied in order, one at a time, after initial_reordering.
*/
- {HB_TAG('n','u','k','t'), true},
- {HB_TAG('a','k','h','n'), true},
- {HB_TAG('r','p','h','f'), false},
- {HB_TAG('r','k','r','f'), true},
- {HB_TAG('p','r','e','f'), false},
- {HB_TAG('h','a','l','f'), false},
- {HB_TAG('b','l','w','f'), false},
- {HB_TAG('a','b','v','f'), false},
- {HB_TAG('p','s','t','f'), false},
- {HB_TAG('c','f','a','r'), false},
- {HB_TAG('c','j','c','t'), true},
- {HB_TAG('v','a','t','u'), true},
+ {HB_TAG('n','u','k','t'), F_MANUAL_JOINERS | F_GLOBAL},
+ {HB_TAG('a','k','h','n'), F_MANUAL_JOINERS | F_GLOBAL},
+ {HB_TAG('r','p','h','f'), F_MANUAL_JOINERS},
+ {HB_TAG('r','k','r','f'), F_MANUAL_JOINERS | F_GLOBAL},
+ {HB_TAG('p','r','e','f'), F_MANUAL_JOINERS},
+ {HB_TAG('b','l','w','f'), F_MANUAL_JOINERS},
+ {HB_TAG('h','a','l','f'), F_MANUAL_JOINERS},
+ {HB_TAG('a','b','v','f'), F_MANUAL_JOINERS},
+ {HB_TAG('p','s','t','f'), F_MANUAL_JOINERS},
+ {HB_TAG('c','f','a','r'), F_MANUAL_JOINERS},
+ {HB_TAG('v','a','t','u'), F_MANUAL_JOINERS | F_GLOBAL},
+ {HB_TAG('c','j','c','t'), F_MANUAL_JOINERS | F_GLOBAL},
/*
* Other features.
* These features are applied all at once, after final_reordering.
*/
- {HB_TAG('i','n','i','t'), false},
- {HB_TAG('p','r','e','s'), true},
- {HB_TAG('a','b','v','s'), true},
- {HB_TAG('b','l','w','s'), true},
- {HB_TAG('p','s','t','s'), true},
- {HB_TAG('h','a','l','n'), true},
+ {HB_TAG('i','n','i','t'), F_NONE},
+ {HB_TAG('p','r','e','s'), F_GLOBAL},
+ {HB_TAG('a','b','v','s'), F_GLOBAL},
+ {HB_TAG('b','l','w','s'), F_GLOBAL},
+ {HB_TAG('p','s','t','s'), F_GLOBAL},
+ {HB_TAG('h','a','l','n'), F_GLOBAL},
/* Positioning features, though we don't care about the types. */
- {HB_TAG('d','i','s','t'), true},
- {HB_TAG('a','b','v','m'), true},
- {HB_TAG('b','l','w','m'), true},
+ {HB_TAG('d','i','s','t'), F_GLOBAL},
+ {HB_TAG('a','b','v','m'), F_GLOBAL},
+ {HB_TAG('b','l','w','m'), F_GLOBAL},
};
/*
@@ -182,13 +376,13 @@ enum {
RPHF,
_RKRF,
PREF,
- HALF,
BLWF,
+ HALF,
ABVF,
PSTF,
CFAR,
- _CJCT,
_VATU,
+ _CJCT,
INIT,
_PRES,
@@ -225,21 +419,21 @@ collect_features_indic (hb_ot_shape_planner_t *plan)
/* Do this before any lookups have been applied. */
map->add_gsub_pause (setup_syllables);
- map->add_bool_feature (HB_TAG('l','o','c','l'));
+ map->add_global_bool_feature (HB_TAG('l','o','c','l'));
/* The Indic specs do not require ccmp, but we apply it here since if
* there is a use of it, it's typically at the beginning. */
- map->add_bool_feature (HB_TAG('c','c','m','p'));
+ map->add_global_bool_feature (HB_TAG('c','c','m','p'));
unsigned int i = 0;
map->add_gsub_pause (initial_reordering);
for (; i < INDIC_BASIC_FEATURES; i++) {
- map->add_bool_feature (indic_features[i].tag, indic_features[i].is_global);
+ map->add_feature (indic_features[i].tag, 1, indic_features[i].flags);
map->add_gsub_pause (NULL);
}
map->add_gsub_pause (final_reordering);
for (; i < INDIC_NUM_FEATURES; i++) {
- map->add_bool_feature (indic_features[i].tag, indic_features[i].is_global);
+ map->add_feature (indic_features[i].tag, 1, indic_features[i].flags);
}
}
@@ -247,10 +441,10 @@ static void
override_features_indic (hb_ot_shape_planner_t *plan)
{
/* Uniscribe does not apply 'kern'. */
- if (indic_options ().uniscribe_bug_compatible)
- plan->map.add_feature (HB_TAG('k','e','r','n'), 0, true);
+ if (hb_options ().uniscribe_bug_compatible)
+ plan->map.add_feature (HB_TAG('k','e','r','n'), 0, F_GLOBAL);
- plan->map.add_feature (HB_TAG('l','i','g','a'), 0, true);
+ plan->map.add_feature (HB_TAG('l','i','g','a'), 0, F_GLOBAL);
}
@@ -338,7 +532,8 @@ data_create_indic (const hb_ot_shape_plan_t *plan)
indic_plan->pstf.init (&plan->map, HB_TAG('p','s','t','f'));
for (unsigned int i = 0; i < ARRAY_LENGTH (indic_plan->mask_array); i++)
- indic_plan->mask_array[i] = indic_features[i].is_global ? 0 : plan->map.get_1_mask (indic_features[i].tag);
+ indic_plan->mask_array[i] = (indic_features[i].flags & F_GLOBAL) ?
+ 0 : plan->map.get_1_mask (indic_features[i].tag);
return indic_plan;
}
@@ -577,15 +772,12 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
* base consonants.
*
* Only do this for unforced Reph. (ie. not for Ra,H,ZWJ. */
- if (has_reph && base == start && start - limit <= 2) {
+ if (has_reph && base == start && limit - base <= 2) {
/* Have no other consonant, so Reph is not formed and Ra becomes base. */
has_reph = false;
}
}
- if (base < end)
- info[base].indic_position() = POS_BASE_C;
-
/* 2. Decompose and reorder Matras:
*
@@ -746,6 +938,38 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
info[i].mask |= mask;
}
+ if (indic_plan->is_old_spec &&
+ buffer->props.script == HB_SCRIPT_DEVANAGARI)
+ {
+ /* Old-spec eye-lash Ra needs special handling. From the
+ * spec:
+ *
+ * "The feature 'below-base form' is applied to consonants
+ * having below-base forms and following the base consonant.
+ * The exception is vattu, which may appear below half forms
+ * as well as below the base glyph. The feature 'below-base
+ * form' will be applied to all such occurrences of Ra as well."
+ *
+ * Test case: U+0924,U+094D,U+0930,U+094d,U+0915
+ * with Sanskrit 2003 font.
+ *
+ * However, note that Ra,Halant,ZWJ is the correct way to
+ * request eyelash form of Ra, so we wouldbn't inhibit it
+ * in that sequence.
+ *
+ * Test case: U+0924,U+094D,U+0930,U+094d,U+200D,U+0915
+ */
+ for (unsigned int i = start; i + 1 < base; i++)
+ if (info[i ].indic_category() == OT_Ra &&
+ info[i+1].indic_category() == OT_H &&
+ (i + 2 == base ||
+ info[i+2].indic_category() != OT_ZWJ))
+ {
+ info[i ].mask |= indic_plan->mask_array[BLWF];
+ info[i+1].mask |= indic_plan->mask_array[BLWF];
+ }
+ }
+
if (indic_plan->mask_array[PREF] && base + 2 < end)
{
/* Find a Halant,Ra sequence and mark it for pre-base reordering processing. */
@@ -779,8 +1003,9 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
do {
j--;
- /* A ZWJ disables CJCT, however, it's mere presence is enough
- * to disable ligation. No explicit action needed. */
+ /* ZWJ/ZWNJ should disable CJCT. They do that by simply
+ * being there, since we don't skip them for the CJCT
+ * feature (ie. F_MANUAL_JOINERS) */
/* A ZWNJ disables HALF. */
if (non_joiner)
@@ -810,7 +1035,7 @@ initial_reordering_standalone_cluster (const hb_ot_shape_plan_t *plan,
/* We treat NBSP/dotted-circle as if they are consonants, so we should just chain.
* Only if not in compatibility mode that is... */
- if (indic_options ().uniscribe_bug_compatible)
+ if (hb_options ().uniscribe_bug_compatible)
{
/* For dotted-circle, this is what Uniscribe does:
* If dotted-circle is the last glyph, it just does nothing.
@@ -963,6 +1188,13 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
base--;
break;
}
+ if (base == end && start < base &&
+ info[base - 1].indic_category() != OT_ZWJ)
+ base--;
+ while (start < base &&
+ (info[base].indic_category() == OT_H ||
+ info[base].indic_category() == OT_N))
+ base--;
/* o Reorder matras:
@@ -1014,6 +1246,8 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
hb_glyph_info_t tmp = info[old_pos];
memmove (&info[old_pos], &info[old_pos + 1], (new_pos - old_pos) * sizeof (info[0]));
info[new_pos] = tmp;
+ if (old_pos < base && base <= new_pos) /* Shouldn't actually happen. */
+ base--;
new_pos--;
}
buffer->merge_clusters (new_pos, MIN (end, base + 1));
@@ -1072,7 +1306,8 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
while (new_reph_pos < base && !is_halant_or_coeng (info[new_reph_pos]))
new_reph_pos++;
- if (new_reph_pos < base && is_halant_or_coeng (info[new_reph_pos])) {
+ if (new_reph_pos < base && is_halant_or_coeng (info[new_reph_pos]))
+ {
/* ->If ZWJ or ZWNJ are following this halant, position is moved after it. */
if (new_reph_pos + 1 < base && is_joiner (info[new_reph_pos + 1]))
new_reph_pos++;
@@ -1124,7 +1359,8 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
while (new_reph_pos < base && !is_halant_or_coeng (info[new_reph_pos]))
new_reph_pos++;
- if (new_reph_pos < base && is_halant_or_coeng (info[new_reph_pos])) {
+ if (new_reph_pos < base && is_halant_or_coeng (info[new_reph_pos]))
+ {
/* ->If ZWJ or ZWNJ are following this halant, position is moved after it. */
if (new_reph_pos + 1 < base && is_joiner (info[new_reph_pos + 1]))
new_reph_pos++;
@@ -1146,7 +1382,7 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
* Uniscribe doesn't do this.
* TEST: U+0930,U+094D,U+0915,U+094B,U+094D
*/
- if (!indic_options ().uniscribe_bug_compatible &&
+ if (!hb_options ().uniscribe_bug_compatible &&
unlikely (is_halant_or_coeng (info[new_reph_pos]))) {
for (unsigned int i = base + 1; i < new_reph_pos; i++)
if (info[i].indic_category() == OT_M) {
@@ -1166,6 +1402,8 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
hb_glyph_info_t reph = info[start];
memmove (&info[start], &info[start + 1], (new_reph_pos - start) * sizeof (info[0]));
info[new_reph_pos] = reph;
+ if (start < base && base <= new_reph_pos)
+ base--;
}
}
@@ -1221,9 +1459,11 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
}
if (new_pos > start && is_halant_or_coeng (info[new_pos - 1]))
+ {
/* -> If ZWJ or ZWNJ follow this halant, position is moved after it. */
if (new_pos < end && is_joiner (info[new_pos]))
new_pos++;
+ }
{
unsigned int old_pos = i;
@@ -1231,6 +1471,8 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
hb_glyph_info_t tmp = info[old_pos];
memmove (&info[new_pos + 1], &info[new_pos], (old_pos - new_pos) * sizeof (info[0]));
info[new_pos] = tmp;
+ if (new_pos <= base && base < old_pos)
+ base++;
}
}
@@ -1250,7 +1492,7 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
/*
* Finish off the clusters and go home!
*/
- if (indic_options ().uniscribe_bug_compatible)
+ if (hb_options ().uniscribe_bug_compatible)
{
/* Uniscribe merges the entire cluster.
* This means, half forms are submerged into the main consonants cluster.
@@ -1366,7 +1608,7 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c,
hb_codepoint_t glyph;
- if (indic_options ().uniscribe_bug_compatible ||
+ if (hb_options ().uniscribe_bug_compatible ||
(c->font->get_glyph (ab, 0, &glyph) &&
indic_plan->pstf.would_substitute (&glyph, 1, true, c->font->face)))
{
@@ -1409,6 +1651,6 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_indic =
decompose_indic,
compose_indic,
setup_masks_indic,
- false, /* zero_width_attached_marks */
+ HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE,
false, /* fallback_position */
};
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-myanmar-machine.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-myanmar-machine.hh
new file mode 100644
index 00000000000..797bfc5bea0
--- /dev/null
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-myanmar-machine.hh
@@ -0,0 +1,391 @@
+
+#line 1 "../../src/hb-ot-shape-complex-myanmar-machine.rl"
+/*
+ * Copyright © 2011,2012 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
+ */
+
+#ifndef HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH
+#define HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH
+
+#include "hb-private.hh"
+
+
+#line 36 "hb-ot-shape-complex-myanmar-machine.hh.tmp"
+static const unsigned char _myanmar_syllable_machine_trans_keys[] = {
+ 1u, 30u, 3u, 30u, 5u, 29u, 5u, 8u, 5u, 29u, 3u, 25u, 5u, 25u, 5u, 25u,
+ 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 1u, 16u, 3u, 29u, 3u, 29u, 3u, 29u,
+ 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 5u, 29u, 5u, 8u,
+ 5u, 29u, 3u, 25u, 5u, 25u, 5u, 25u, 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u,
+ 3u, 30u, 3u, 29u, 1u, 30u, 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u,
+ 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 0
+};
+
+static const char _myanmar_syllable_machine_key_spans[] = {
+ 30, 28, 25, 4, 25, 23, 21, 21,
+ 27, 27, 27, 27, 16, 27, 27, 27,
+ 27, 27, 27, 27, 27, 27, 25, 4,
+ 25, 23, 21, 21, 27, 27, 27, 27,
+ 28, 27, 30, 27, 27, 27, 27, 27,
+ 27, 27, 27, 27
+};
+
+static const short _myanmar_syllable_machine_index_offsets[] = {
+ 0, 31, 60, 86, 91, 117, 141, 163,
+ 185, 213, 241, 269, 297, 314, 342, 370,
+ 398, 426, 454, 482, 510, 538, 566, 592,
+ 597, 623, 647, 669, 691, 719, 747, 775,
+ 803, 832, 860, 891, 919, 947, 975, 1003,
+ 1031, 1059, 1087, 1115
+};
+
+static const char _myanmar_syllable_machine_indicies[] = {
+ 1, 1, 2, 3, 4, 4, 0, 5,
+ 0, 6, 0, 1, 0, 0, 0, 7,
+ 0, 8, 1, 0, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 0, 20,
+ 21, 22, 22, 19, 23, 19, 24, 19,
+ 19, 19, 19, 19, 19, 19, 25, 19,
+ 19, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 19, 22, 22, 19, 23,
+ 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 36, 19, 19, 19, 19, 19, 19,
+ 30, 19, 19, 19, 34, 19, 22, 22,
+ 19, 23, 19, 22, 22, 19, 23, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 30,
+ 19, 19, 19, 34, 19, 37, 19, 22,
+ 22, 19, 23, 19, 30, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 30, 19, 22, 22, 19,
+ 23, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 38, 19, 19, 19, 19, 19,
+ 19, 30, 19, 22, 22, 19, 23, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 30,
+ 19, 20, 19, 22, 22, 19, 23, 19,
+ 24, 19, 19, 19, 19, 19, 19, 19,
+ 39, 19, 19, 39, 19, 19, 19, 30,
+ 40, 19, 19, 34, 19, 20, 19, 22,
+ 22, 19, 23, 19, 24, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 30, 19, 19, 19, 34,
+ 19, 20, 19, 22, 22, 19, 23, 19,
+ 24, 19, 19, 19, 19, 19, 19, 19,
+ 39, 19, 19, 19, 19, 19, 19, 30,
+ 40, 19, 19, 34, 19, 20, 19, 22,
+ 22, 19, 23, 19, 24, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 30, 40, 19, 19, 34,
+ 19, 1, 1, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19,
+ 1, 19, 20, 19, 22, 22, 19, 23,
+ 19, 24, 19, 19, 19, 19, 19, 19,
+ 19, 25, 19, 19, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 19, 20, 19,
+ 22, 22, 19, 23, 19, 24, 19, 19,
+ 19, 19, 19, 19, 19, 33, 19, 19,
+ 19, 19, 19, 19, 30, 31, 32, 33,
+ 34, 19, 20, 19, 22, 22, 19, 23,
+ 19, 24, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19,
+ 30, 31, 32, 33, 34, 19, 20, 19,
+ 22, 22, 19, 23, 19, 24, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 30, 31, 32, 19,
+ 34, 19, 20, 19, 22, 22, 19, 23,
+ 19, 24, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19,
+ 30, 19, 32, 19, 34, 19, 20, 19,
+ 22, 22, 19, 23, 19, 24, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19,
+ 26, 19, 28, 19, 30, 31, 32, 33,
+ 34, 19, 20, 19, 22, 22, 19, 23,
+ 19, 24, 19, 19, 19, 19, 19, 19,
+ 19, 33, 19, 19, 26, 19, 19, 19,
+ 30, 31, 32, 33, 34, 19, 20, 19,
+ 22, 22, 19, 23, 19, 24, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19,
+ 26, 27, 28, 19, 30, 31, 32, 33,
+ 34, 19, 20, 21, 22, 22, 19, 23,
+ 19, 24, 19, 19, 19, 19, 19, 19,
+ 19, 25, 19, 19, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 19, 3, 3,
+ 41, 5, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 42, 41, 41, 41, 41,
+ 41, 41, 13, 41, 41, 41, 17, 41,
+ 3, 3, 41, 5, 41, 3, 3, 41,
+ 5, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 13, 41, 41, 41, 17, 41, 43,
+ 41, 3, 3, 41, 5, 41, 13, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 13, 41, 3,
+ 3, 41, 5, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 44, 41, 41, 41,
+ 41, 41, 41, 13, 41, 3, 3, 41,
+ 5, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 13, 41, 2, 41, 3, 3, 41,
+ 5, 41, 6, 41, 41, 41, 41, 41,
+ 41, 41, 45, 41, 41, 45, 41, 41,
+ 41, 13, 46, 41, 41, 17, 41, 2,
+ 41, 3, 3, 41, 5, 41, 6, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 13, 41, 41,
+ 41, 17, 41, 2, 41, 3, 3, 41,
+ 5, 41, 6, 41, 41, 41, 41, 41,
+ 41, 41, 45, 41, 41, 41, 41, 41,
+ 41, 13, 46, 41, 41, 17, 41, 2,
+ 41, 3, 3, 41, 5, 41, 6, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 13, 46, 41,
+ 41, 17, 41, 20, 21, 22, 22, 19,
+ 23, 19, 24, 19, 19, 19, 19, 19,
+ 19, 19, 47, 19, 19, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 19,
+ 20, 48, 22, 22, 19, 23, 19, 24,
+ 19, 19, 19, 19, 19, 19, 19, 25,
+ 19, 19, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 19, 1, 1, 2, 3,
+ 3, 3, 41, 5, 41, 6, 41, 1,
+ 41, 41, 41, 1, 41, 8, 1, 41,
+ 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 41, 2, 41, 3, 3, 41,
+ 5, 41, 6, 41, 41, 41, 41, 41,
+ 41, 41, 8, 41, 41, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 41, 2,
+ 41, 3, 3, 41, 5, 41, 6, 41,
+ 41, 41, 41, 41, 41, 41, 16, 41,
+ 41, 41, 41, 41, 41, 13, 14, 15,
+ 16, 17, 41, 2, 41, 3, 3, 41,
+ 5, 41, 6, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 13, 14, 15, 16, 17, 41, 2,
+ 41, 3, 3, 41, 5, 41, 6, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 13, 14, 15,
+ 41, 17, 41, 2, 41, 3, 3, 41,
+ 5, 41, 6, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 13, 41, 15, 41, 17, 41, 2,
+ 41, 3, 3, 41, 5, 41, 6, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 9, 41, 11, 41, 13, 14, 15,
+ 16, 17, 41, 2, 41, 3, 3, 41,
+ 5, 41, 6, 41, 41, 41, 41, 41,
+ 41, 41, 16, 41, 41, 9, 41, 41,
+ 41, 13, 14, 15, 16, 17, 41, 2,
+ 41, 3, 3, 41, 5, 41, 6, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 9, 10, 11, 41, 13, 14, 15,
+ 16, 17, 41, 2, 3, 3, 3, 41,
+ 5, 41, 6, 41, 41, 41, 41, 41,
+ 41, 41, 8, 41, 41, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 41, 0
+};
+
+static const char _myanmar_syllable_machine_trans_targs[] = {
+ 0, 1, 22, 0, 0, 23, 29, 32,
+ 35, 36, 40, 41, 42, 25, 38, 39,
+ 37, 28, 43, 0, 2, 12, 0, 3,
+ 9, 13, 14, 18, 19, 20, 5, 16,
+ 17, 15, 8, 21, 4, 6, 7, 10,
+ 11, 0, 24, 26, 27, 30, 31, 33,
+ 34
+};
+
+static const char _myanmar_syllable_machine_trans_actions[] = {
+ 3, 0, 0, 4, 5, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 6, 0, 0, 7, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 8, 0, 0, 0, 0, 0, 0,
+ 0
+};
+
+static const char _myanmar_syllable_machine_to_state_actions[] = {
+ 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0
+};
+
+static const char _myanmar_syllable_machine_from_state_actions[] = {
+ 2, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0
+};
+
+static const short _myanmar_syllable_machine_eof_trans[] = {
+ 0, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42,
+ 20, 20, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42
+};
+
+static const int myanmar_syllable_machine_start = 0;
+static const int myanmar_syllable_machine_first_final = 0;
+static const int myanmar_syllable_machine_error = -1;
+
+static const int myanmar_syllable_machine_en_main = 0;
+
+
+#line 36 "../../src/hb-ot-shape-complex-myanmar-machine.rl"
+
+
+
+#line 90 "../../src/hb-ot-shape-complex-myanmar-machine.rl"
+
+
+#define found_syllable(syllable_type) \
+ HB_STMT_START { \
+ if (0) fprintf (stderr, "syllable %d..%d %s\n", last, p+1, #syllable_type); \
+ for (unsigned int i = last; i < p+1; i++) \
+ info[i].syllable() = (syllable_serial << 4) | syllable_type; \
+ last = p+1; \
+ syllable_serial++; \
+ if (unlikely (syllable_serial == 16)) syllable_serial = 1; \
+ } HB_STMT_END
+
+static void
+find_syllables (hb_buffer_t *buffer)
+{
+ unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED;
+ int cs;
+ hb_glyph_info_t *info = buffer->info;
+
+#line 288 "hb-ot-shape-complex-myanmar-machine.hh.tmp"
+ {
+ cs = myanmar_syllable_machine_start;
+ ts = 0;
+ te = 0;
+ act = 0;
+ }
+
+#line 111 "../../src/hb-ot-shape-complex-myanmar-machine.rl"
+
+
+ p = 0;
+ pe = eof = buffer->len;
+
+ unsigned int last = 0;
+ unsigned int syllable_serial = 1;
+
+#line 305 "hb-ot-shape-complex-myanmar-machine.hh.tmp"
+ {
+ int _slen;
+ int _trans;
+ const unsigned char *_keys;
+ const char *_inds;
+ if ( p == pe )
+ goto _test_eof;
+_resume:
+ switch ( _myanmar_syllable_machine_from_state_actions[cs] ) {
+ case 2:
+#line 1 "NONE"
+ {ts = p;}
+ break;
+#line 319 "hb-ot-shape-complex-myanmar-machine.hh.tmp"
+ }
+
+ _keys = _myanmar_syllable_machine_trans_keys + (cs<<1);
+ _inds = _myanmar_syllable_machine_indicies + _myanmar_syllable_machine_index_offsets[cs];
+
+ _slen = _myanmar_syllable_machine_key_spans[cs];
+ _trans = _inds[ _slen > 0 && _keys[0] <=( info[p].myanmar_category()) &&
+ ( info[p].myanmar_category()) <= _keys[1] ?
+ ( info[p].myanmar_category()) - _keys[0] : _slen ];
+
+_eof_trans:
+ cs = _myanmar_syllable_machine_trans_targs[_trans];
+
+ if ( _myanmar_syllable_machine_trans_actions[_trans] == 0 )
+ goto _again;
+
+ switch ( _myanmar_syllable_machine_trans_actions[_trans] ) {
+ case 7:
+#line 83 "../../src/hb-ot-shape-complex-myanmar-machine.rl"
+ {te = p+1;{ found_syllable (consonant_syllable); }}
+ break;
+ case 5:
+#line 84 "../../src/hb-ot-shape-complex-myanmar-machine.rl"
+ {te = p+1;{ found_syllable (non_myanmar_cluster); }}
+ break;
+ case 4:
+#line 85 "../../src/hb-ot-shape-complex-myanmar-machine.rl"
+ {te = p+1;{ found_syllable (broken_cluster); }}
+ break;
+ case 3:
+#line 86 "../../src/hb-ot-shape-complex-myanmar-machine.rl"
+ {te = p+1;{ found_syllable (non_myanmar_cluster); }}
+ break;
+ case 6:
+#line 83 "../../src/hb-ot-shape-complex-myanmar-machine.rl"
+ {te = p;p--;{ found_syllable (consonant_syllable); }}
+ break;
+ case 8:
+#line 85 "../../src/hb-ot-shape-complex-myanmar-machine.rl"
+ {te = p;p--;{ found_syllable (broken_cluster); }}
+ break;
+#line 361 "hb-ot-shape-complex-myanmar-machine.hh.tmp"
+ }
+
+_again:
+ switch ( _myanmar_syllable_machine_to_state_actions[cs] ) {
+ case 1:
+#line 1 "NONE"
+ {ts = 0;}
+ break;
+#line 370 "hb-ot-shape-complex-myanmar-machine.hh.tmp"
+ }
+
+ if ( ++p != pe )
+ goto _resume;
+ _test_eof: {}
+ if ( p == eof )
+ {
+ if ( _myanmar_syllable_machine_eof_trans[cs] > 0 ) {
+ _trans = _myanmar_syllable_machine_eof_trans[cs] - 1;
+ goto _eof_trans;
+ }
+ }
+
+ }
+
+#line 120 "../../src/hb-ot-shape-complex-myanmar-machine.rl"
+
+}
+
+#undef found_syllable
+
+#endif /* HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-myanmar-machine.rl b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-myanmar-machine.rl
new file mode 100644
index 00000000000..51d42dd64ab
--- /dev/null
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-myanmar-machine.rl
@@ -0,0 +1,125 @@
+/*
+ * Copyright © 2011,2012 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
+ */
+
+#ifndef HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH
+#define HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH
+
+#include "hb-private.hh"
+
+%%{
+ machine myanmar_syllable_machine;
+ alphtype unsigned char;
+ write data;
+}%%
+
+%%{
+
+# Same order as enum myanmar_category_t. Not sure how to avoid duplication.
+A = 10;
+As = 18;
+C = 1;
+D = 19;
+D0 = 20;
+DB = 3;
+GB = 12;
+H = 4;
+IV = 2;
+MH = 21;
+MR = 22;
+MW = 23;
+MY = 24;
+PT = 25;
+V = 8;
+VAbv = 26;
+VBlw = 27;
+VPre = 28;
+VPst = 29;
+VS = 30;
+ZWJ = 6;
+ZWNJ = 5;
+Ra = 16;
+
+j = ZWJ|ZWNJ; # Joiners
+k = (Ra As H); # Kinzi
+
+c = C|Ra; # is_consonant
+
+medial_group = MY? MR? ((MW MH? | MH) As?)?;
+main_vowel_group = VPre* VAbv* VBlw* A* (DB As?)?;
+post_vowel_group = VPst MH? As* VAbv* A* (DB As?)?;
+pwo_tone_group = PT A* (DB As?)?;
+
+complex_syllable_tail = As* medial_group main_vowel_group post_vowel_group* pwo_tone_group* V* j?;
+syllable_tail = (H | complex_syllable_tail);
+
+consonant_syllable = k? (c|IV|D|GB).VS? (H (c|IV).VS?)* syllable_tail;
+broken_cluster = k? VS? syllable_tail;
+other = any;
+
+main := |*
+ consonant_syllable => { found_syllable (consonant_syllable); };
+ j => { found_syllable (non_myanmar_cluster); };
+ broken_cluster => { found_syllable (broken_cluster); };
+ other => { found_syllable (non_myanmar_cluster); };
+*|;
+
+
+}%%
+
+#define found_syllable(syllable_type) \
+ HB_STMT_START { \
+ if (0) fprintf (stderr, "syllable %d..%d %s\n", last, p+1, #syllable_type); \
+ for (unsigned int i = last; i < p+1; i++) \
+ info[i].syllable() = (syllable_serial << 4) | syllable_type; \
+ last = p+1; \
+ syllable_serial++; \
+ if (unlikely (syllable_serial == 16)) syllable_serial = 1; \
+ } HB_STMT_END
+
+static void
+find_syllables (hb_buffer_t *buffer)
+{
+ unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED;
+ int cs;
+ hb_glyph_info_t *info = buffer->info;
+ %%{
+ write init;
+ getkey info[p].myanmar_category();
+ }%%
+
+ p = 0;
+ pe = eof = buffer->len;
+
+ unsigned int last = 0;
+ unsigned int syllable_serial = 1;
+ %%{
+ write exec;
+ }%%
+}
+
+#undef found_syllable
+
+#endif /* HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-myanmar.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-myanmar.cc
new file mode 100644
index 00000000000..8491047b712
--- /dev/null
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-myanmar.cc
@@ -0,0 +1,545 @@
+/*
+ * Copyright © 2011,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.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-ot-shape-complex-indic-private.hh"
+
+/* buffer var allocations */
+#define myanmar_category() complex_var_u8_0() /* myanmar_category_t */
+#define myanmar_position() complex_var_u8_1() /* myanmar_position_t */
+
+
+/*
+ * Myanmar shaper.
+ */
+
+static const hb_tag_t
+basic_features[] =
+{
+ /*
+ * Basic features.
+ * These features are applied in order, one at a time, after initial_reordering.
+ */
+ HB_TAG('r','p','h','f'),
+ HB_TAG('p','r','e','f'),
+ HB_TAG('b','l','w','f'),
+ HB_TAG('p','s','t','f'),
+};
+static const hb_tag_t
+other_features[] =
+{
+ /*
+ * Other features.
+ * These features are applied all at once, after final_reordering.
+ */
+ HB_TAG('p','r','e','s'),
+ HB_TAG('a','b','v','s'),
+ HB_TAG('b','l','w','s'),
+ HB_TAG('p','s','t','s'),
+ /* Positioning features, though we don't care about the types. */
+ HB_TAG('d','i','s','t'),
+};
+
+static void
+setup_syllables (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer);
+static void
+initial_reordering (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer);
+static void
+final_reordering (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer);
+
+static void
+collect_features_myanmar (hb_ot_shape_planner_t *plan)
+{
+ hb_ot_map_builder_t *map = &plan->map;
+
+ /* Do this before any lookups have been applied. */
+ map->add_gsub_pause (setup_syllables);
+
+ map->add_global_bool_feature (HB_TAG('l','o','c','l'));
+ /* The Indic specs do not require ccmp, but we apply it here since if
+ * there is a use of it, it's typically at the beginning. */
+ map->add_global_bool_feature (HB_TAG('c','c','m','p'));
+
+
+ map->add_gsub_pause (initial_reordering);
+ for (unsigned int i = 0; i < ARRAY_LENGTH (basic_features); i++)
+ {
+ map->add_feature (basic_features[i], 1, F_GLOBAL | F_MANUAL_JOINERS);
+ map->add_gsub_pause (NULL);
+ }
+ map->add_gsub_pause (final_reordering);
+ for (unsigned int i = 0; i < ARRAY_LENGTH (other_features); i++)
+ map->add_feature (other_features[i], 1, F_GLOBAL);
+}
+
+static void
+override_features_myanmar (hb_ot_shape_planner_t *plan)
+{
+ plan->map.add_feature (HB_TAG('l','i','g','a'), 0, F_GLOBAL);
+
+ /*
+ * Note:
+ *
+ * Spec says 'mark' is used, and the mmrtext.ttf font from
+ * Windows 8 has lookups for it. But testing suggests that
+ * Windows 8 Uniscribe is NOT applying it. It *is* applying
+ * 'mkmk' however.
+ */
+ if (hb_options ().uniscribe_bug_compatible)
+ plan->map.add_feature (HB_TAG('m','a','r','k'), 0, F_GLOBAL);
+}
+
+
+enum syllable_type_t {
+ consonant_syllable,
+ broken_cluster,
+ non_myanmar_cluster,
+};
+
+#include "hb-ot-shape-complex-myanmar-machine.hh"
+
+
+/* Note: This enum is duplicated in the -machine.rl source file.
+ * Not sure how to avoid duplication. */
+enum myanmar_category_t {
+ OT_As = 18, /* Asat */
+ OT_D = 19, /* Digits except zero */
+ OT_D0 = 20, /* Digit zero */
+ OT_DB = OT_N, /* Dot below */
+ OT_GB = OT_DOTTEDCIRCLE,
+ OT_MH = 21, /* Various consonant medial types */
+ OT_MR = 22, /* Various consonant medial types */
+ OT_MW = 23, /* Various consonant medial types */
+ OT_MY = 24, /* Various consonant medial types */
+ OT_PT = 25, /* Pwo and other tones */
+ OT_VAbv = 26,
+ OT_VBlw = 27,
+ OT_VPre = 28,
+ OT_VPst = 29,
+ OT_VS = 30 /* Variation selectors */
+};
+
+
+static inline bool
+is_one_of (const hb_glyph_info_t &info, unsigned int flags)
+{
+ /* If it ligated, all bets are off. */
+ if (is_a_ligature (info)) return false;
+ return !!(FLAG (info.myanmar_category()) & flags);
+}
+
+/* Note:
+ *
+ * We treat Vowels and placeholders as if they were consonants. This is safe because Vowels
+ * cannot happen in a consonant syllable. The plus side however is, we can call the
+ * consonant syllable logic from the vowel syllable function and get it all right! */
+#define CONSONANT_FLAGS (FLAG (OT_C) | FLAG (OT_CM) | FLAG (OT_Ra) | FLAG (OT_V) | FLAG (OT_NBSP) | FLAG (OT_GB))
+static inline bool
+is_consonant (const hb_glyph_info_t &info)
+{
+ return is_one_of (info, CONSONANT_FLAGS);
+}
+
+
+static inline void
+set_myanmar_properties (hb_glyph_info_t &info)
+{
+ hb_codepoint_t u = info.codepoint;
+ unsigned int type = hb_indic_get_categories (u);
+ indic_category_t cat = (indic_category_t) (type & 0x7F);
+ indic_position_t pos = (indic_position_t) (type >> 8);
+
+ /* Myanmar
+ * http://www.microsoft.com/typography/OpenTypeDev/myanmar/intro.htm#analyze
+ */
+ if (unlikely (hb_in_range<hb_codepoint_t> (u, 0xFE00, 0xFE0F)))
+ cat = (indic_category_t) OT_VS;
+ else if (unlikely (u == 0x200C)) cat = (indic_category_t) OT_ZWNJ;
+ else if (unlikely (u == 0x200D)) cat = (indic_category_t) OT_ZWJ;
+
+ switch (u)
+ {
+ case 0x002D: case 0x00A0: case 0x00D7: case 0x2012:
+ case 0x2013: case 0x2014: case 0x2015: case 0x2022:
+ case 0x25CC: case 0x25FB: case 0x25FC: case 0x25FD:
+ case 0x25FE:
+ cat = (indic_category_t) OT_GB;
+ break;
+
+ case 0x1004: case 0x101B: case 0x105A:
+ cat = (indic_category_t) OT_Ra;
+ break;
+
+ case 0x1032: case 0x1036:
+ cat = (indic_category_t) OT_A;
+ break;
+
+ case 0x103A:
+ cat = (indic_category_t) OT_As;
+ break;
+
+ case 0x1041: case 0x1042: case 0x1043: case 0x1044:
+ case 0x1045: case 0x1046: case 0x1047: case 0x1048:
+ case 0x1049: case 0x1090: case 0x1091: case 0x1092:
+ case 0x1093: case 0x1094: case 0x1095: case 0x1096:
+ case 0x1097: case 0x1098: case 0x1099:
+ cat = (indic_category_t) OT_D;
+ break;
+
+ case 0x1040:
+ cat = (indic_category_t) OT_D; /* XXX The spec says D0, but Uniscribe doesn't seem to do. */
+ break;
+
+ case 0x103E: case 0x1060:
+ cat = (indic_category_t) OT_MH;
+ break;
+
+ case 0x103C:
+ cat = (indic_category_t) OT_MR;
+ break;
+
+ case 0x103D: case 0x1082:
+ cat = (indic_category_t) OT_MW;
+ break;
+
+ case 0x103B: case 0x105E: case 0x105F:
+ cat = (indic_category_t) OT_MY;
+ break;
+
+ case 0x1063: case 0x1064: case 0x1069: case 0x106A:
+ case 0x106B: case 0x106C: case 0x106D: case 0xAA7B:
+ cat = (indic_category_t) OT_PT;
+ break;
+
+ case 0x1038: case 0x1087: case 0x1088: case 0x1089:
+ case 0x108A: case 0x108B: case 0x108C: case 0x108D:
+ case 0x108F: case 0x109A: case 0x109B: case 0x109C:
+ cat = (indic_category_t) OT_SM;
+ break;
+ }
+
+ if (cat == OT_M)
+ {
+ switch ((int) pos)
+ {
+ case POS_PRE_C: cat = (indic_category_t) OT_VPre;
+ pos = POS_PRE_M; break;
+ case POS_ABOVE_C: cat = (indic_category_t) OT_VAbv; break;
+ case POS_BELOW_C: cat = (indic_category_t) OT_VBlw; break;
+ case POS_POST_C: cat = (indic_category_t) OT_VPst; break;
+ }
+ }
+
+ info.myanmar_category() = (myanmar_category_t) cat;
+ info.myanmar_position() = pos;
+}
+
+
+
+static void
+setup_masks_myanmar (const hb_ot_shape_plan_t *plan HB_UNUSED,
+ hb_buffer_t *buffer,
+ hb_font_t *font HB_UNUSED)
+{
+ HB_BUFFER_ALLOCATE_VAR (buffer, myanmar_category);
+ HB_BUFFER_ALLOCATE_VAR (buffer, myanmar_position);
+
+ /* We cannot setup masks here. We save information about characters
+ * and setup masks later on in a pause-callback. */
+
+ unsigned int count = buffer->len;
+ for (unsigned int i = 0; i < count; i++)
+ set_myanmar_properties (buffer->info[i]);
+}
+
+static void
+setup_syllables (const hb_ot_shape_plan_t *plan HB_UNUSED,
+ hb_font_t *font HB_UNUSED,
+ hb_buffer_t *buffer)
+{
+ find_syllables (buffer);
+}
+
+static int
+compare_myanmar_order (const hb_glyph_info_t *pa, const hb_glyph_info_t *pb)
+{
+ int a = pa->myanmar_position();
+ int b = pb->myanmar_position();
+
+ return a < b ? -1 : a == b ? 0 : +1;
+}
+
+
+/* Rules from:
+ * http://www.microsoft.com/typography/OpenTypeDev/myanmar/intro.htm */
+
+static void
+initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
+ hb_face_t *face,
+ hb_buffer_t *buffer,
+ unsigned int start, unsigned int end)
+{
+ hb_glyph_info_t *info = buffer->info;
+
+ unsigned int base = end;
+ bool has_reph = false;
+
+ {
+ unsigned int limit = start;
+ if (start + 3 <= end &&
+ info[start ].myanmar_category() == OT_Ra &&
+ info[start+1].myanmar_category() == OT_As &&
+ info[start+2].myanmar_category() == OT_H)
+ {
+ limit += 3;
+ base = start;
+ has_reph = true;
+ }
+
+ {
+ if (!has_reph)
+ base = limit;
+
+ for (unsigned int i = limit; i < end; i++)
+ if (is_consonant (info[i]))
+ {
+ base = i;
+ break;
+ }
+ }
+ }
+
+ /* Reorder! */
+ {
+ unsigned int i = start;
+ for (; i < start + (has_reph ? 3 : 0); i++)
+ info[i].myanmar_position() = POS_AFTER_MAIN;
+ for (; i < base; i++)
+ info[i].myanmar_position() = POS_PRE_C;
+ if (i < end)
+ {
+ info[i].myanmar_position() = POS_BASE_C;
+ i++;
+ }
+ indic_position_t pos = POS_AFTER_MAIN;
+ /* The following loop may be ugly, but it implements all of
+ * Myanmar reordering! */
+ for (; i < end; i++)
+ {
+ if (info[i].myanmar_category() == OT_MR) /* Pre-base reordering */
+ {
+ info[i].myanmar_position() = POS_PRE_C;
+ continue;
+ }
+ if (info[i].myanmar_position() < POS_BASE_C) /* Left matra */
+ {
+ continue;
+ }
+
+ if (pos == POS_AFTER_MAIN && info[i].myanmar_category() == OT_VBlw)
+ {
+ pos = POS_BELOW_C;
+ info[i].myanmar_position() = pos;
+ continue;
+ }
+
+ if (pos == POS_BELOW_C && info[i].myanmar_category() == OT_A)
+ {
+ info[i].myanmar_position() = POS_BEFORE_SUB;
+ continue;
+ }
+ if (pos == POS_BELOW_C && info[i].myanmar_category() == OT_VBlw)
+ {
+ info[i].myanmar_position() = pos;
+ continue;
+ }
+ if (pos == POS_BELOW_C && info[i].myanmar_category() != OT_A)
+ {
+ pos = POS_AFTER_SUB;
+ info[i].myanmar_position() = pos;
+ continue;
+ }
+ info[i].myanmar_position() = pos;
+ }
+ }
+
+ buffer->merge_clusters (start, end);
+ /* Sit tight, rock 'n roll! */
+ hb_bubble_sort (info + start, end - start, compare_myanmar_order);
+}
+
+static void
+initial_reordering_broken_cluster (const hb_ot_shape_plan_t *plan,
+ hb_face_t *face,
+ hb_buffer_t *buffer,
+ unsigned int start, unsigned int end)
+{
+ /* We already inserted dotted-circles, so just call the consonant_syllable. */
+ initial_reordering_consonant_syllable (plan, face, buffer, start, end);
+}
+
+static void
+initial_reordering_non_myanmar_cluster (const hb_ot_shape_plan_t *plan HB_UNUSED,
+ hb_face_t *face HB_UNUSED,
+ hb_buffer_t *buffer HB_UNUSED,
+ unsigned int start HB_UNUSED, unsigned int end HB_UNUSED)
+{
+ /* Nothing to do right now. If we ever switch to using the output
+ * buffer in the reordering process, we'd need to next_glyph() here. */
+}
+
+
+static void
+initial_reordering_syllable (const hb_ot_shape_plan_t *plan,
+ hb_face_t *face,
+ hb_buffer_t *buffer,
+ unsigned int start, unsigned int end)
+{
+ syllable_type_t syllable_type = (syllable_type_t) (buffer->info[start].syllable() & 0x0F);
+ switch (syllable_type) {
+ case consonant_syllable: initial_reordering_consonant_syllable (plan, face, buffer, start, end); return;
+ case broken_cluster: initial_reordering_broken_cluster (plan, face, buffer, start, end); return;
+ case non_myanmar_cluster: initial_reordering_non_myanmar_cluster (plan, face, buffer, start, end); return;
+ }
+}
+
+static inline void
+insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
+ hb_font_t *font,
+ hb_buffer_t *buffer)
+{
+ /* Note: This loop is extra overhead, but should not be measurable. */
+ bool has_broken_syllables = false;
+ unsigned int count = buffer->len;
+ for (unsigned int i = 0; i < count; i++)
+ if ((buffer->info[i].syllable() & 0x0F) == broken_cluster) {
+ has_broken_syllables = true;
+ break;
+ }
+ if (likely (!has_broken_syllables))
+ return;
+
+
+ hb_codepoint_t dottedcircle_glyph;
+ if (!font->get_glyph (0x25CC, 0, &dottedcircle_glyph))
+ return;
+
+ hb_glyph_info_t dottedcircle = {0};
+ dottedcircle.codepoint = 0x25CC;
+ set_myanmar_properties (dottedcircle);
+ dottedcircle.codepoint = dottedcircle_glyph;
+
+ buffer->clear_output ();
+
+ buffer->idx = 0;
+ unsigned int last_syllable = 0;
+ while (buffer->idx < buffer->len)
+ {
+ unsigned int syllable = buffer->cur().syllable();
+ syllable_type_t syllable_type = (syllable_type_t) (syllable & 0x0F);
+ if (unlikely (last_syllable != syllable && syllable_type == broken_cluster))
+ {
+ last_syllable = syllable;
+
+ hb_glyph_info_t info = dottedcircle;
+ info.cluster = buffer->cur().cluster;
+ info.mask = buffer->cur().mask;
+ info.syllable() = buffer->cur().syllable();
+
+ buffer->output_info (info);
+ }
+ else
+ buffer->next_glyph ();
+ }
+
+ buffer->swap_buffers ();
+}
+
+static void
+initial_reordering (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer)
+{
+ insert_dotted_circles (plan, font, buffer);
+
+ hb_glyph_info_t *info = buffer->info;
+ unsigned int count = buffer->len;
+ if (unlikely (!count)) return;
+ unsigned int last = 0;
+ unsigned int last_syllable = info[0].syllable();
+ for (unsigned int i = 1; i < count; i++)
+ if (last_syllable != info[i].syllable()) {
+ initial_reordering_syllable (plan, font->face, buffer, last, i);
+ last = i;
+ last_syllable = info[last].syllable();
+ }
+ initial_reordering_syllable (plan, font->face, buffer, last, count);
+}
+
+static void
+final_reordering (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font HB_UNUSED,
+ hb_buffer_t *buffer)
+{
+ hb_glyph_info_t *info = buffer->info;
+ unsigned int count = buffer->len;
+
+ /* Zero syllables now... */
+ for (unsigned int i = 0; i < count; i++)
+ info[i].syllable() = 0;
+
+ HB_BUFFER_DEALLOCATE_VAR (buffer, myanmar_category);
+ HB_BUFFER_DEALLOCATE_VAR (buffer, myanmar_position);
+}
+
+
+static hb_ot_shape_normalization_mode_t
+normalization_preference_myanmar (const hb_segment_properties_t *props HB_UNUSED)
+{
+ return HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT;
+}
+
+
+const hb_ot_complex_shaper_t _hb_ot_complex_shaper_myanmar =
+{
+ "myanmar",
+ collect_features_myanmar,
+ override_features_myanmar,
+ NULL, /* data_create */
+ NULL, /* data_destroy */
+ NULL, /* preprocess_text */
+ normalization_preference_myanmar,
+ NULL, /* decompose */
+ NULL, /* compose */
+ setup_masks_myanmar,
+ HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF,
+ false, /* fallback_position */
+};
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-private.hh
index 26871c2fc09..3c9922dc905 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-private.hh
@@ -39,12 +39,20 @@
#define complex_var_u8_1() var2.u8[3]
+enum hb_ot_shape_zero_width_marks_type_t {
+ HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE,
+ HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE,
+ HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF
+};
+
/* Master OT shaper list */
#define HB_COMPLEX_SHAPERS_IMPLEMENT_SHAPERS \
HB_COMPLEX_SHAPER_IMPLEMENT (default) /* should be first */ \
HB_COMPLEX_SHAPER_IMPLEMENT (arabic) \
HB_COMPLEX_SHAPER_IMPLEMENT (indic) \
+ HB_COMPLEX_SHAPER_IMPLEMENT (myanmar) \
+ HB_COMPLEX_SHAPER_IMPLEMENT (sea) \
HB_COMPLEX_SHAPER_IMPLEMENT (thai) \
/* ^--- Add new shapers here */
@@ -130,7 +138,8 @@ struct hb_ot_complex_shaper_t
hb_buffer_t *buffer,
hb_font_t *font);
- bool zero_width_attached_marks;
+ hb_ot_shape_zero_width_marks_type_t zero_width_marks;
+
bool fallback_position;
};
@@ -254,13 +263,11 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner)
/* Unicode-4.1 additions */
case HB_SCRIPT_BUGINESE:
- case HB_SCRIPT_NEW_TAI_LUE:
/* Unicode-5.0 additions */
case HB_SCRIPT_BALINESE:
/* Unicode-5.1 additions */
- case HB_SCRIPT_CHAM:
case HB_SCRIPT_LEPCHA:
case HB_SCRIPT_REJANG:
case HB_SCRIPT_SUNDANESE:
@@ -269,19 +276,22 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner)
case HB_SCRIPT_JAVANESE:
case HB_SCRIPT_KAITHI:
case HB_SCRIPT_MEETEI_MAYEK:
- case HB_SCRIPT_TAI_THAM:
+ /* Unicode-6.0 additions */
/* Unicode-6.1 additions */
case HB_SCRIPT_CHAKMA:
case HB_SCRIPT_SHARADA:
case HB_SCRIPT_TAKRI:
- /* Only use Indic shaper if the font has Indic tables. */
- if (planner->map.found_script[0])
- return &_hb_ot_complex_shaper_indic;
- else
+ /* If the designer designed the font for the 'DFLT' script,
+ * use the default shaper. Otherwise, use the Indic shaper.
+ * Note that for some simple scripts, there may not be *any*
+ * GSUB/GPOS needed, so there may be no scripts found! */
+ if (planner->map.chosen_script[0] == HB_TAG ('D','F','L','T'))
return &_hb_ot_complex_shaper_default;
+ else
+ return &_hb_ot_complex_shaper_indic;
case HB_SCRIPT_KHMER:
/* A number of Khmer fonts in the wild don't have a 'pref' feature,
@@ -300,12 +310,30 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner)
return &_hb_ot_complex_shaper_default;
case HB_SCRIPT_MYANMAR:
- /* For Myanmar, we only want to use the Indic shaper if the "new" script
+ /* For Myanmar, we only want to use the Myanmar shaper if the "new" script
* tag is found. For "old" script tag we want to use the default shaper. */
if (planner->map.chosen_script[0] == HB_TAG ('m','y','m','2'))
- return &_hb_ot_complex_shaper_indic;
+ return &_hb_ot_complex_shaper_myanmar;
else
return &_hb_ot_complex_shaper_default;
+
+ /* Unicode-4.1 additions */
+ case HB_SCRIPT_NEW_TAI_LUE:
+
+ /* Unicode-5.1 additions */
+ case HB_SCRIPT_CHAM:
+
+ /* Unicode-5.2 additions */
+ case HB_SCRIPT_TAI_THAM:
+
+ /* If the designer designed the font for the 'DFLT' script,
+ * use the default shaper. Otherwise, use the Indic shaper.
+ * Note that for some simple scripts, there may not be *any*
+ * GSUB/GPOS needed, so there may be no scripts found! */
+ if (planner->map.chosen_script[0] == HB_TAG ('D','F','L','T'))
+ return &_hb_ot_complex_shaper_default;
+ else
+ return &_hb_ot_complex_shaper_sea;
}
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-sea-machine.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-sea-machine.hh
new file mode 100644
index 00000000000..86b7ae7d5ca
--- /dev/null
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-sea-machine.hh
@@ -0,0 +1,224 @@
+
+#line 1 "../../src/hb-ot-shape-complex-sea-machine.rl"
+/*
+ * Copyright © 2011,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.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OT_SHAPE_COMPLEX_SEA_MACHINE_HH
+#define HB_OT_SHAPE_COMPLEX_SEA_MACHINE_HH
+
+#include "hb-private.hh"
+
+
+#line 36 "hb-ot-shape-complex-sea-machine.hh.tmp"
+static const unsigned char _sea_syllable_machine_trans_keys[] = {
+ 1u, 1u, 1u, 1u, 1u, 29u, 3u, 29u, 3u, 29u, 1u, 1u, 0
+};
+
+static const char _sea_syllable_machine_key_spans[] = {
+ 1, 1, 29, 27, 27, 1
+};
+
+static const char _sea_syllable_machine_index_offsets[] = {
+ 0, 2, 4, 34, 62, 90
+};
+
+static const char _sea_syllable_machine_indicies[] = {
+ 1, 0, 3, 2, 1, 1, 3, 5,
+ 4, 4, 4, 4, 4, 3, 4, 1,
+ 4, 4, 4, 4, 3, 4, 4, 4,
+ 4, 3, 4, 4, 4, 3, 3, 3,
+ 3, 4, 1, 7, 6, 6, 6, 6,
+ 6, 1, 6, 6, 6, 6, 6, 6,
+ 1, 6, 6, 6, 6, 1, 6, 6,
+ 6, 1, 1, 1, 1, 6, 3, 9,
+ 8, 8, 8, 8, 8, 3, 8, 8,
+ 8, 8, 8, 8, 3, 8, 8, 8,
+ 8, 3, 8, 8, 8, 3, 3, 3,
+ 3, 8, 3, 10, 0
+};
+
+static const char _sea_syllable_machine_trans_targs[] = {
+ 2, 3, 2, 4, 2, 5, 2, 0,
+ 2, 1, 2
+};
+
+static const char _sea_syllable_machine_trans_actions[] = {
+ 1, 2, 3, 2, 6, 0, 7, 0,
+ 8, 0, 9
+};
+
+static const char _sea_syllable_machine_to_state_actions[] = {
+ 0, 0, 4, 0, 0, 0
+};
+
+static const char _sea_syllable_machine_from_state_actions[] = {
+ 0, 0, 5, 0, 0, 0
+};
+
+static const char _sea_syllable_machine_eof_trans[] = {
+ 1, 3, 0, 7, 9, 11
+};
+
+static const int sea_syllable_machine_start = 2;
+static const int sea_syllable_machine_first_final = 2;
+static const int sea_syllable_machine_error = -1;
+
+static const int sea_syllable_machine_en_main = 2;
+
+
+#line 36 "../../src/hb-ot-shape-complex-sea-machine.rl"
+
+
+
+#line 67 "../../src/hb-ot-shape-complex-sea-machine.rl"
+
+
+#define found_syllable(syllable_type) \
+ HB_STMT_START { \
+ if (0) fprintf (stderr, "syllable %d..%d %s\n", last, p+1, #syllable_type); \
+ for (unsigned int i = last; i < p+1; i++) \
+ info[i].syllable() = (syllable_serial << 4) | syllable_type; \
+ last = p+1; \
+ syllable_serial++; \
+ if (unlikely (syllable_serial == 16)) syllable_serial = 1; \
+ } HB_STMT_END
+
+static void
+find_syllables (hb_buffer_t *buffer)
+{
+ unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED;
+ int cs;
+ hb_glyph_info_t *info = buffer->info;
+
+#line 117 "hb-ot-shape-complex-sea-machine.hh.tmp"
+ {
+ cs = sea_syllable_machine_start;
+ ts = 0;
+ te = 0;
+ act = 0;
+ }
+
+#line 88 "../../src/hb-ot-shape-complex-sea-machine.rl"
+
+
+ p = 0;
+ pe = eof = buffer->len;
+
+ unsigned int last = 0;
+ unsigned int syllable_serial = 1;
+
+#line 134 "hb-ot-shape-complex-sea-machine.hh.tmp"
+ {
+ int _slen;
+ int _trans;
+ const unsigned char *_keys;
+ const char *_inds;
+ if ( p == pe )
+ goto _test_eof;
+_resume:
+ switch ( _sea_syllable_machine_from_state_actions[cs] ) {
+ case 5:
+#line 1 "NONE"
+ {ts = p;}
+ break;
+#line 148 "hb-ot-shape-complex-sea-machine.hh.tmp"
+ }
+
+ _keys = _sea_syllable_machine_trans_keys + (cs<<1);
+ _inds = _sea_syllable_machine_indicies + _sea_syllable_machine_index_offsets[cs];
+
+ _slen = _sea_syllable_machine_key_spans[cs];
+ _trans = _inds[ _slen > 0 && _keys[0] <=( info[p].sea_category()) &&
+ ( info[p].sea_category()) <= _keys[1] ?
+ ( info[p].sea_category()) - _keys[0] : _slen ];
+
+_eof_trans:
+ cs = _sea_syllable_machine_trans_targs[_trans];
+
+ if ( _sea_syllable_machine_trans_actions[_trans] == 0 )
+ goto _again;
+
+ switch ( _sea_syllable_machine_trans_actions[_trans] ) {
+ case 2:
+#line 1 "NONE"
+ {te = p+1;}
+ break;
+ case 6:
+#line 63 "../../src/hb-ot-shape-complex-sea-machine.rl"
+ {te = p+1;{ found_syllable (non_sea_cluster); }}
+ break;
+ case 7:
+#line 61 "../../src/hb-ot-shape-complex-sea-machine.rl"
+ {te = p;p--;{ found_syllable (consonant_syllable); }}
+ break;
+ case 8:
+#line 62 "../../src/hb-ot-shape-complex-sea-machine.rl"
+ {te = p;p--;{ found_syllable (broken_cluster); }}
+ break;
+ case 9:
+#line 63 "../../src/hb-ot-shape-complex-sea-machine.rl"
+ {te = p;p--;{ found_syllable (non_sea_cluster); }}
+ break;
+ case 1:
+#line 61 "../../src/hb-ot-shape-complex-sea-machine.rl"
+ {{p = ((te))-1;}{ found_syllable (consonant_syllable); }}
+ break;
+ case 3:
+#line 62 "../../src/hb-ot-shape-complex-sea-machine.rl"
+ {{p = ((te))-1;}{ found_syllable (broken_cluster); }}
+ break;
+#line 194 "hb-ot-shape-complex-sea-machine.hh.tmp"
+ }
+
+_again:
+ switch ( _sea_syllable_machine_to_state_actions[cs] ) {
+ case 4:
+#line 1 "NONE"
+ {ts = 0;}
+ break;
+#line 203 "hb-ot-shape-complex-sea-machine.hh.tmp"
+ }
+
+ if ( ++p != pe )
+ goto _resume;
+ _test_eof: {}
+ if ( p == eof )
+ {
+ if ( _sea_syllable_machine_eof_trans[cs] > 0 ) {
+ _trans = _sea_syllable_machine_eof_trans[cs] - 1;
+ goto _eof_trans;
+ }
+ }
+
+ }
+
+#line 97 "../../src/hb-ot-shape-complex-sea-machine.rl"
+
+}
+
+#undef found_syllable
+
+#endif /* HB_OT_SHAPE_COMPLEX_SEA_MACHINE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-sea-machine.rl b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-sea-machine.rl
new file mode 100644
index 00000000000..46140fc4d5f
--- /dev/null
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-sea-machine.rl
@@ -0,0 +1,102 @@
+/*
+ * Copyright © 2011,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.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OT_SHAPE_COMPLEX_SEA_MACHINE_HH
+#define HB_OT_SHAPE_COMPLEX_SEA_MACHINE_HH
+
+#include "hb-private.hh"
+
+%%{
+ machine sea_syllable_machine;
+ alphtype unsigned char;
+ write data;
+}%%
+
+%%{
+
+# Same order as enum sea_category_t. Not sure how to avoid duplication.
+C = 1;
+GB = 12; # Generic Base
+H = 4; # Halant
+IV = 2; # Independent Vowel
+MR = 22; # Medial Ra
+CM = 17; # Consonant Medial
+VAbv = 26;
+VBlw = 27;
+VPre = 28;
+VPst = 29;
+T = 3; # Tone Marks
+A = 10; # Anusvara
+
+syllable_tail = (VPre|VAbv|VBlw|VPst|H.C|CM|MR|T|A)*;
+
+consonant_syllable = (C|IV|GB) syllable_tail;
+broken_cluster = syllable_tail;
+other = any;
+
+main := |*
+ consonant_syllable => { found_syllable (consonant_syllable); };
+ broken_cluster => { found_syllable (broken_cluster); };
+ other => { found_syllable (non_sea_cluster); };
+*|;
+
+
+}%%
+
+#define found_syllable(syllable_type) \
+ HB_STMT_START { \
+ if (0) fprintf (stderr, "syllable %d..%d %s\n", last, p+1, #syllable_type); \
+ for (unsigned int i = last; i < p+1; i++) \
+ info[i].syllable() = (syllable_serial << 4) | syllable_type; \
+ last = p+1; \
+ syllable_serial++; \
+ if (unlikely (syllable_serial == 16)) syllable_serial = 1; \
+ } HB_STMT_END
+
+static void
+find_syllables (hb_buffer_t *buffer)
+{
+ unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED;
+ int cs;
+ hb_glyph_info_t *info = buffer->info;
+ %%{
+ write init;
+ getkey info[p].sea_category();
+ }%%
+
+ p = 0;
+ pe = eof = buffer->len;
+
+ unsigned int last = 0;
+ unsigned int syllable_serial = 1;
+ %%{
+ write exec;
+ }%%
+}
+
+#undef found_syllable
+
+#endif /* HB_OT_SHAPE_COMPLEX_SEA_MACHINE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-sea.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-sea.cc
new file mode 100644
index 00000000000..94386588f70
--- /dev/null
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-sea.cc
@@ -0,0 +1,384 @@
+/*
+ * Copyright © 2011,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.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-ot-shape-complex-indic-private.hh"
+
+/* buffer var allocations */
+#define sea_category() complex_var_u8_0() /* indic_category_t */
+#define sea_position() complex_var_u8_1() /* indic_position_t */
+
+
+/*
+ * South-East Asian shaper.
+ * Loosely based on the Myanmar spec / shaper.
+ * There is no OpenType spec for this.
+ */
+
+static const hb_tag_t
+basic_features[] =
+{
+ /*
+ * Basic features.
+ * These features are applied in order, one at a time, after initial_reordering.
+ */
+ HB_TAG('p','r','e','f'),
+ HB_TAG('a','b','v','f'),
+ HB_TAG('b','l','w','f'),
+ HB_TAG('p','s','t','f'),
+};
+static const hb_tag_t
+other_features[] =
+{
+ /*
+ * Other features.
+ * These features are applied all at once, after final_reordering.
+ */
+ HB_TAG('p','r','e','s'),
+ HB_TAG('a','b','v','s'),
+ HB_TAG('b','l','w','s'),
+ HB_TAG('p','s','t','s'),
+ /* Positioning features, though we don't care about the types. */
+ HB_TAG('d','i','s','t'),
+};
+
+static void
+setup_syllables (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer);
+static void
+initial_reordering (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer);
+static void
+final_reordering (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer);
+
+static void
+collect_features_sea (hb_ot_shape_planner_t *plan)
+{
+ hb_ot_map_builder_t *map = &plan->map;
+
+ /* Do this before any lookups have been applied. */
+ map->add_gsub_pause (setup_syllables);
+
+ map->add_global_bool_feature (HB_TAG('l','o','c','l'));
+ /* The Indic specs do not require ccmp, but we apply it here since if
+ * there is a use of it, it's typically at the beginning. */
+ map->add_global_bool_feature (HB_TAG('c','c','m','p'));
+
+ map->add_gsub_pause (initial_reordering);
+ for (unsigned int i = 0; i < ARRAY_LENGTH (basic_features); i++)
+ {
+ map->add_feature (basic_features[i], 1, F_GLOBAL | F_MANUAL_JOINERS);
+ map->add_gsub_pause (NULL);
+ }
+ map->add_gsub_pause (final_reordering);
+ for (unsigned int i = 0; i < ARRAY_LENGTH (other_features); i++)
+ map->add_feature (other_features[i], 1, F_GLOBAL);
+}
+
+static void
+override_features_sea (hb_ot_shape_planner_t *plan)
+{
+ plan->map.add_feature (HB_TAG('l','i','g','a'), 0, F_GLOBAL);
+}
+
+
+enum syllable_type_t {
+ consonant_syllable,
+ broken_cluster,
+ non_sea_cluster,
+};
+
+#include "hb-ot-shape-complex-sea-machine.hh"
+
+
+/* Note: This enum is duplicated in the -machine.rl source file.
+ * Not sure how to avoid duplication. */
+enum sea_category_t {
+// OT_C = 1,
+ OT_GB = 12, /* Generic Base XXX DOTTED CIRCLE only for now */
+// OT_H = 4, /* Halant */
+ OT_IV = 2, /* Independent Vowel */
+ OT_MR = 22, /* Medial Ra */
+// OT_CM = 17, /* Consonant Medial */
+ OT_VAbv = 26,
+ OT_VBlw = 27,
+ OT_VPre = 28,
+ OT_VPst = 29,
+ OT_T = 3, /* Tone Marks */
+// OT_A = 10, /* Anusvara */
+};
+
+static inline void
+set_sea_properties (hb_glyph_info_t &info)
+{
+ hb_codepoint_t u = info.codepoint;
+ unsigned int type = hb_indic_get_categories (u);
+ indic_category_t cat = (indic_category_t) (type & 0x7F);
+ indic_position_t pos = (indic_position_t) (type >> 8);
+
+ /* Medial Ra */
+ if (u == 0x1A55 || u == 0xAA34)
+ cat = (indic_category_t) OT_MR;
+
+ if (cat == OT_M)
+ {
+ switch ((int) pos)
+ {
+ case POS_PRE_C: cat = (indic_category_t) OT_VPre; break;
+ case POS_ABOVE_C: cat = (indic_category_t) OT_VAbv; break;
+ case POS_BELOW_C: cat = (indic_category_t) OT_VBlw; break;
+ case POS_POST_C: cat = (indic_category_t) OT_VPst; break;
+ }
+ }
+
+ info.sea_category() = (sea_category_t) cat;
+ info.sea_position() = pos;
+}
+
+
+static void
+setup_masks_sea (const hb_ot_shape_plan_t *plan HB_UNUSED,
+ hb_buffer_t *buffer,
+ hb_font_t *font HB_UNUSED)
+{
+ HB_BUFFER_ALLOCATE_VAR (buffer, sea_category);
+ HB_BUFFER_ALLOCATE_VAR (buffer, sea_position);
+
+ /* We cannot setup masks here. We save information about characters
+ * and setup masks later on in a pause-callback. */
+
+ unsigned int count = buffer->len;
+ for (unsigned int i = 0; i < count; i++)
+ set_sea_properties (buffer->info[i]);
+}
+
+static void
+setup_syllables (const hb_ot_shape_plan_t *plan HB_UNUSED,
+ hb_font_t *font HB_UNUSED,
+ hb_buffer_t *buffer)
+{
+ find_syllables (buffer);
+}
+
+static int
+compare_sea_order (const hb_glyph_info_t *pa, const hb_glyph_info_t *pb)
+{
+ int a = pa->sea_position();
+ int b = pb->sea_position();
+
+ return a < b ? -1 : a == b ? 0 : +1;
+}
+
+
+static void
+initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
+ hb_face_t *face,
+ hb_buffer_t *buffer,
+ unsigned int start, unsigned int end)
+{
+ hb_glyph_info_t *info = buffer->info;
+ unsigned int base = start;
+
+ /* Reorder! */
+ unsigned int i = start;
+ for (; i < base; i++)
+ info[i].sea_position() = POS_PRE_C;
+ if (i < end)
+ {
+ info[i].sea_position() = POS_BASE_C;
+ i++;
+ }
+ for (; i < end; i++)
+ {
+ if (info[i].sea_category() == OT_MR) /* Pre-base reordering */
+ {
+ info[i].sea_position() = POS_PRE_C;
+ continue;
+ }
+ if (info[i].sea_category() == OT_VPre) /* Left matra */
+ {
+ info[i].sea_position() = POS_PRE_M;
+ continue;
+ }
+
+ info[i].sea_position() = POS_AFTER_MAIN;
+ }
+
+ buffer->merge_clusters (start, end);
+ /* Sit tight, rock 'n roll! */
+ hb_bubble_sort (info + start, end - start, compare_sea_order);
+}
+
+static void
+initial_reordering_broken_cluster (const hb_ot_shape_plan_t *plan,
+ hb_face_t *face,
+ hb_buffer_t *buffer,
+ unsigned int start, unsigned int end)
+{
+ /* We already inserted dotted-circles, so just call the consonant_syllable. */
+ initial_reordering_consonant_syllable (plan, face, buffer, start, end);
+}
+
+static void
+initial_reordering_non_sea_cluster (const hb_ot_shape_plan_t *plan HB_UNUSED,
+ hb_face_t *face HB_UNUSED,
+ hb_buffer_t *buffer HB_UNUSED,
+ unsigned int start HB_UNUSED, unsigned int end HB_UNUSED)
+{
+ /* Nothing to do right now. If we ever switch to using the output
+ * buffer in the reordering process, we'd need to next_glyph() here. */
+}
+
+
+static void
+initial_reordering_syllable (const hb_ot_shape_plan_t *plan,
+ hb_face_t *face,
+ hb_buffer_t *buffer,
+ unsigned int start, unsigned int end)
+{
+ syllable_type_t syllable_type = (syllable_type_t) (buffer->info[start].syllable() & 0x0F);
+ switch (syllable_type) {
+ case consonant_syllable: initial_reordering_consonant_syllable (plan, face, buffer, start, end); return;
+ case broken_cluster: initial_reordering_broken_cluster (plan, face, buffer, start, end); return;
+ case non_sea_cluster: initial_reordering_non_sea_cluster (plan, face, buffer, start, end); return;
+ }
+}
+
+static inline void
+insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
+ hb_font_t *font,
+ hb_buffer_t *buffer)
+{
+ /* Note: This loop is extra overhead, but should not be measurable. */
+ bool has_broken_syllables = false;
+ unsigned int count = buffer->len;
+ for (unsigned int i = 0; i < count; i++)
+ if ((buffer->info[i].syllable() & 0x0F) == broken_cluster) {
+ has_broken_syllables = true;
+ break;
+ }
+ if (likely (!has_broken_syllables))
+ return;
+
+
+ hb_codepoint_t dottedcircle_glyph;
+ if (!font->get_glyph (0x25CC, 0, &dottedcircle_glyph))
+ return;
+
+ hb_glyph_info_t dottedcircle = {0};
+ dottedcircle.codepoint = 0x25CC;
+ set_sea_properties (dottedcircle);
+ dottedcircle.codepoint = dottedcircle_glyph;
+
+ buffer->clear_output ();
+
+ buffer->idx = 0;
+ unsigned int last_syllable = 0;
+ while (buffer->idx < buffer->len)
+ {
+ unsigned int syllable = buffer->cur().syllable();
+ syllable_type_t syllable_type = (syllable_type_t) (syllable & 0x0F);
+ if (unlikely (last_syllable != syllable && syllable_type == broken_cluster))
+ {
+ last_syllable = syllable;
+
+ hb_glyph_info_t info = dottedcircle;
+ info.cluster = buffer->cur().cluster;
+ info.mask = buffer->cur().mask;
+ info.syllable() = buffer->cur().syllable();
+
+ buffer->output_info (info);
+ }
+ else
+ buffer->next_glyph ();
+ }
+
+ buffer->swap_buffers ();
+}
+
+static void
+initial_reordering (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer)
+{
+ insert_dotted_circles (plan, font, buffer);
+
+ hb_glyph_info_t *info = buffer->info;
+ unsigned int count = buffer->len;
+ if (unlikely (!count)) return;
+ unsigned int last = 0;
+ unsigned int last_syllable = info[0].syllable();
+ for (unsigned int i = 1; i < count; i++)
+ if (last_syllable != info[i].syllable()) {
+ initial_reordering_syllable (plan, font->face, buffer, last, i);
+ last = i;
+ last_syllable = info[last].syllable();
+ }
+ initial_reordering_syllable (plan, font->face, buffer, last, count);
+}
+
+static void
+final_reordering (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font HB_UNUSED,
+ hb_buffer_t *buffer)
+{
+ hb_glyph_info_t *info = buffer->info;
+ unsigned int count = buffer->len;
+
+ /* Zero syllables now... */
+ for (unsigned int i = 0; i < count; i++)
+ info[i].syllable() = 0;
+
+ HB_BUFFER_DEALLOCATE_VAR (buffer, sea_category);
+ HB_BUFFER_DEALLOCATE_VAR (buffer, sea_position);
+}
+
+
+static hb_ot_shape_normalization_mode_t
+normalization_preference_sea (const hb_segment_properties_t *props HB_UNUSED)
+{
+ return HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT;
+}
+
+
+const hb_ot_complex_shaper_t _hb_ot_complex_shaper_sea =
+{
+ "sea",
+ collect_features_sea,
+ override_features_sea,
+ NULL, /* data_create */
+ NULL, /* data_destroy */
+ NULL, /* preprocess_text */
+ normalization_preference_sea,
+ NULL, /* decompose */
+ NULL, /* compose */
+ setup_masks_sea,
+ HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE,
+ false, /* fallback_position */
+};
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-thai.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-thai.cc
index 24d476a0ba3..5cbb6e391c2 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-complex-thai.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-complex-thai.cc
@@ -373,6 +373,6 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_thai =
NULL, /* decompose */
NULL, /* compose */
NULL, /* setup_masks */
- true, /* zero_width_attached_marks */
+ HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE,
false,/* fallback_position */
};
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-fallback-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-fallback-private.hh
index 5e9cb061780..ec653513f1b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-fallback-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-fallback-private.hh
@@ -41,4 +41,9 @@ HB_INTERNAL void _hb_ot_shape_fallback_position_recategorize_marks (const hb_ot_
hb_buffer_t *buffer);
+HB_INTERNAL void _hb_ot_shape_fallback_kern (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer);
+
+
#endif /* HB_OT_SHAPE_FALLBACK_PRIVATE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-fallback.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-fallback.cc
index 6f3426e6b49..afe0f392cc7 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-fallback.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-fallback.cc
@@ -25,6 +25,7 @@
*/
#include "hb-ot-shape-fallback-private.hh"
+#include "hb-ot-layout-gsubgpos-private.hh"
static unsigned int
recategorize_combining_class (hb_codepoint_t u,
@@ -407,3 +408,48 @@ _hb_ot_shape_fallback_position (const hb_ot_shape_plan_t *plan,
}
position_cluster (plan, font, buffer, start, count);
}
+
+
+/* Performs old-style TrueType kerning. */
+void
+_hb_ot_shape_fallback_kern (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer)
+{
+ unsigned int count = buffer->len;
+ hb_mask_t kern_mask = plan->map.get_1_mask (HB_DIRECTION_IS_HORIZONTAL (buffer->props.direction) ?
+ HB_TAG ('k','e','r','n') : HB_TAG ('v','k','r','n'));
+
+ OT::hb_apply_context_t c (1, font, buffer, kern_mask, true/*auto_joiners*/);
+ c.set_lookup_props (OT::LookupFlag::IgnoreMarks);
+
+ for (buffer->idx = 0; buffer->idx < count;)
+ {
+ OT::hb_apply_context_t::skipping_forward_iterator_t skippy_iter (&c, buffer->idx, 1);
+ if (!skippy_iter.next ())
+ {
+ buffer->idx++;
+ continue;
+ }
+
+ hb_position_t x_kern, y_kern, kern1, kern2;
+ font->get_glyph_kerning_for_direction (buffer->info[buffer->idx].codepoint,
+ buffer->info[skippy_iter.idx].codepoint,
+ buffer->props.direction,
+ &x_kern, &y_kern);
+
+ kern1 = x_kern >> 1;
+ kern2 = x_kern - kern1;
+ buffer->pos[buffer->idx].x_advance += kern1;
+ buffer->pos[skippy_iter.idx].x_advance += kern2;
+ buffer->pos[skippy_iter.idx].x_offset += kern2;
+
+ kern1 = y_kern >> 1;
+ kern2 = y_kern - kern1;
+ buffer->pos[buffer->idx].y_advance += kern1;
+ buffer->pos[skippy_iter.idx].y_advance += kern2;
+ buffer->pos[skippy_iter.idx].y_offset += kern2;
+
+ buffer->idx = skippy_iter.idx;
+ }
+}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-normalize-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-normalize-private.hh
index 8112f03aee9..8112f03aee9 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-normalize-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-normalize-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-normalize.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-normalize.cc
index c5325e42b53..344c0ff8497 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-normalize.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-normalize.cc
@@ -192,30 +192,23 @@ decompose_compatibility (const hb_ot_shape_normalize_context_t *c, hb_codepoint_
}
/* Returns true if recomposition may be benefitial. */
-static inline bool
+static inline void
decompose_current_character (const hb_ot_shape_normalize_context_t *c, bool shortest)
{
hb_buffer_t * const buffer = c->buffer;
hb_codepoint_t glyph;
- unsigned int len = 1;
/* Kind of a cute waterfall here... */
if (shortest && c->font->get_glyph (buffer->cur().codepoint, 0, &glyph))
next_char (buffer, glyph);
- else if ((len = decompose (c, shortest, buffer->cur().codepoint)))
+ else if (decompose (c, shortest, buffer->cur().codepoint))
skip_char (buffer);
else if (!shortest && c->font->get_glyph (buffer->cur().codepoint, 0, &glyph))
next_char (buffer, glyph);
- else if ((len = decompose_compatibility (c, buffer->cur().codepoint)))
+ else if (decompose_compatibility (c, buffer->cur().codepoint))
skip_char (buffer);
else
next_char (buffer, glyph); /* glyph is initialized in earlier branches. */
-
- /*
- * A recomposition would only be useful if we decomposed into at least three
- * characters...
- */
- return len > 2;
}
static inline void
@@ -239,7 +232,7 @@ handle_variation_selector_cluster (const hb_ot_shape_normalize_context_t *c, uns
}
/* Returns true if recomposition may be benefitial. */
-static inline bool
+static inline void
decompose_multi_char_cluster (const hb_ot_shape_normalize_context_t *c, unsigned int end)
{
hb_buffer_t * const buffer = c->buffer;
@@ -247,23 +240,20 @@ decompose_multi_char_cluster (const hb_ot_shape_normalize_context_t *c, unsigned
for (unsigned int i = buffer->idx; i < end; i++)
if (unlikely (buffer->unicode->is_variation_selector (buffer->info[i].codepoint))) {
handle_variation_selector_cluster (c, end);
- return false;
+ return;
}
while (buffer->idx < end)
decompose_current_character (c, false);
- /* We can be smarter here and only return true if there are at least two ccc!=0 marks.
- * But does not matter. */
- return true;
}
-static inline bool
+static inline void
decompose_cluster (const hb_ot_shape_normalize_context_t *c, bool short_circuit, unsigned int end)
{
if (likely (c->buffer->idx + 1 == end))
- return decompose_current_character (c, short_circuit);
+ decompose_current_character (c, short_circuit);
else
- return decompose_multi_char_cluster (c, end);
+ decompose_multi_char_cluster (c, end);
}
@@ -296,7 +286,6 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan,
bool short_circuit = mode != HB_OT_SHAPE_NORMALIZATION_MODE_DECOMPOSED &&
mode != HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT;
- bool can_use_recompose = false;
unsigned int count;
/* We do a fairly straightforward yet custom normalization process in three
@@ -317,15 +306,11 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan,
if (buffer->cur().cluster != buffer->info[end].cluster)
break;
- can_use_recompose = decompose_cluster (&c, short_circuit, end) || can_use_recompose;
+ decompose_cluster (&c, short_circuit, end);
}
buffer->swap_buffers ();
- if (mode != HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_FULL && !can_use_recompose)
- return; /* Done! */
-
-
/* Second round, reorder (inplace) */
count = buffer->len;
@@ -369,9 +354,11 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan,
{
hb_codepoint_t composed, glyph;
if (/* If mode is NOT COMPOSED_FULL (ie. it's COMPOSED_DIACRITICS), we don't try to
- * compose a CCC=0 character with it's preceding starter. */
+ * compose a non-mark character with it's preceding starter. This is just an
+ * optimization to avoid trying to compose every two neighboring glyphs in most
+ * scripts. */
(mode == HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_FULL ||
- _hb_glyph_info_get_modified_combining_class (&buffer->cur()) != 0) &&
+ HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&buffer->cur()))) &&
/* If there's anything between the starter and this char, they should have CCC
* smaller than this character's. */
(starter == buffer->out_len - 1 ||
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-private.hh
index 23e80b7bdfa..9599f8e722c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape-private.hh
@@ -33,10 +33,6 @@
-/* buffer var allocations, used during the entire shaping process */
-#define unicode_props0() var2.u8[0]
-#define unicode_props1() var2.u8[1]
-
struct hb_ot_shape_plan_t
@@ -89,37 +85,4 @@ struct hb_ot_shape_planner_t
};
-
-inline void
-_hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_unicode_funcs_t *unicode)
-{
- info->unicode_props0() = ((unsigned int) unicode->general_category (info->codepoint)) |
- (unicode->is_default_ignorable (info->codepoint) ? 0x80 : 0);
- info->unicode_props1() = unicode->modified_combining_class (info->codepoint);
-}
-
-inline hb_unicode_general_category_t
-_hb_glyph_info_get_general_category (const hb_glyph_info_t *info)
-{
- return (hb_unicode_general_category_t) (info->unicode_props0() & 0x7F);
-}
-
-inline void
-_hb_glyph_info_set_modified_combining_class (hb_glyph_info_t *info, unsigned int modified_class)
-{
- info->unicode_props1() = modified_class;
-}
-
-inline unsigned int
-_hb_glyph_info_get_modified_combining_class (const hb_glyph_info_t *info)
-{
- return info->unicode_props1();
-}
-
-inline hb_bool_t
-_hb_glyph_info_is_default_ignorable (const hb_glyph_info_t *info)
-{
- return !!(info->unicode_props0() & 0x80);
-}
-
#endif /* HB_OT_SHAPE_PRIVATE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape.cc
index 96461d7079e..f65861f959f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-shape.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-shape.cc
@@ -83,12 +83,12 @@ hb_ot_shape_collect_features (hb_ot_shape_planner_t *planner,
switch (props->direction) {
case HB_DIRECTION_LTR:
- map->add_bool_feature (HB_TAG ('l','t','r','a'));
- map->add_bool_feature (HB_TAG ('l','t','r','m'));
+ map->add_global_bool_feature (HB_TAG ('l','t','r','a'));
+ map->add_global_bool_feature (HB_TAG ('l','t','r','m'));
break;
case HB_DIRECTION_RTL:
- map->add_bool_feature (HB_TAG ('r','t','l','a'));
- map->add_bool_feature (HB_TAG ('r','t','l','m'), false);
+ map->add_global_bool_feature (HB_TAG ('r','t','l','a'));
+ map->add_feature (HB_TAG ('r','t','l','m'), 1, F_NONE);
break;
case HB_DIRECTION_TTB:
case HB_DIRECTION_BTT:
@@ -97,30 +97,31 @@ hb_ot_shape_collect_features (hb_ot_shape_planner_t *planner,
break;
}
-#define ADD_FEATURES(array) \
- HB_STMT_START { \
- for (unsigned int i = 0; i < ARRAY_LENGTH (array); i++) \
- map->add_bool_feature (array[i]); \
- } HB_STMT_END
-
if (planner->shaper->collect_features)
planner->shaper->collect_features (planner);
- ADD_FEATURES (common_features);
+ for (unsigned int i = 0; i < ARRAY_LENGTH (common_features); i++)
+ map->add_global_bool_feature (common_features[i]);
if (HB_DIRECTION_IS_HORIZONTAL (props->direction))
- ADD_FEATURES (horizontal_features);
+ for (unsigned int i = 0; i < ARRAY_LENGTH (horizontal_features); i++)
+ map->add_feature (horizontal_features[i], 1, F_GLOBAL |
+ (horizontal_features[i] == HB_TAG('k','e','r','n') ?
+ F_HAS_FALLBACK : F_NONE));
else
- ADD_FEATURES (vertical_features);
+ for (unsigned int i = 0; i < ARRAY_LENGTH (vertical_features); i++)
+ map->add_feature (vertical_features[i], 1, F_GLOBAL |
+ (vertical_features[i] == HB_TAG('v','k','r','n') ?
+ F_HAS_FALLBACK : F_NONE));
if (planner->shaper->override_features)
planner->shaper->override_features (planner);
-#undef ADD_FEATURES
-
for (unsigned int i = 0; i < num_user_features; i++) {
const hb_feature_t *feature = &user_features[i];
- map->add_feature (feature->tag, feature->value, (feature->start == 0 && feature->end == (unsigned int) -1));
+ map->add_feature (feature->tag, feature->value,
+ (feature->start == 0 && feature->end == (unsigned int) -1) ?
+ F_GLOBAL : F_NONE);
}
}
@@ -405,7 +406,8 @@ hb_ot_position_default (hb_ot_shape_context_t *c)
hb_ot_layout_position_start (c->font, c->buffer);
unsigned int count = c->buffer->len;
- for (unsigned int i = 0; i < count; i++) {
+ for (unsigned int i = 0; i < count; i++)
+ {
c->font->get_glyph_advance_for_direction (c->buffer->info[i].codepoint,
c->buffer->props.direction,
&c->buffer->pos[i].x_advance,
@@ -414,6 +416,26 @@ hb_ot_position_default (hb_ot_shape_context_t *c)
c->buffer->props.direction,
&c->buffer->pos[i].x_offset,
&c->buffer->pos[i].y_offset);
+
+ }
+
+ /* Zero'ing mark widths by GDEF (as used in Myanmar spec) happens
+ * *before* GPOS. */
+ switch (c->plan->shaper->zero_width_marks)
+ {
+ case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF:
+ for (unsigned int i = 0; i < count; i++)
+ if ((c->buffer->info[i].glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_MARK))
+ {
+ c->buffer->pos[i].x_advance = 0;
+ c->buffer->pos[i].y_advance = 0;
+ }
+ break;
+
+ default:
+ case HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE:
+ case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE:
+ break;
}
}
@@ -421,12 +443,12 @@ static inline bool
hb_ot_position_complex (hb_ot_shape_context_t *c)
{
bool ret = false;
+ unsigned int count = c->buffer->len;
if (hb_ot_layout_has_positioning (c->face))
{
/* Change glyph origin to what GPOS expects, apply GPOS, change it back. */
- unsigned int count = c->buffer->len;
for (unsigned int i = 0; i < count; i++) {
c->font->add_glyph_origin_for_direction (c->buffer->info[i].codepoint,
HB_DIRECTION_LTR,
@@ -446,34 +468,28 @@ hb_ot_position_complex (hb_ot_shape_context_t *c)
ret = true;
}
- hb_ot_layout_position_finish (c->font, c->buffer, c->plan->shaper->zero_width_attached_marks);
-
- return ret;
-}
+ /* Zero'ing mark widths by Unicode happens
+ * *after* GPOS. */
+ switch (c->plan->shaper->zero_width_marks)
+ {
+ case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE:
+ for (unsigned int i = 0; i < count; i++)
+ if (_hb_glyph_info_get_general_category (&c->buffer->info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)
+ {
+ c->buffer->pos[i].x_advance = 0;
+ c->buffer->pos[i].y_advance = 0;
+ }
+ break;
-static inline void
-hb_ot_truetype_kern (hb_ot_shape_context_t *c)
-{
- /* TODO Check for kern=0 */
- unsigned int count = c->buffer->len;
- for (unsigned int i = 1; i < count; i++) {
- hb_position_t x_kern, y_kern, kern1, kern2;
- c->font->get_glyph_kerning_for_direction (c->buffer->info[i - 1].codepoint, c->buffer->info[i].codepoint,
- c->buffer->props.direction,
- &x_kern, &y_kern);
-
- kern1 = x_kern >> 1;
- kern2 = x_kern - kern1;
- c->buffer->pos[i - 1].x_advance += kern1;
- c->buffer->pos[i].x_advance += kern2;
- c->buffer->pos[i].x_offset += kern2;
-
- kern1 = y_kern >> 1;
- kern2 = y_kern - kern1;
- c->buffer->pos[i - 1].y_advance += kern1;
- c->buffer->pos[i].y_advance += kern2;
- c->buffer->pos[i].y_offset += kern2;
+ default:
+ case HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE:
+ case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF:
+ break;
}
+
+ hb_ot_layout_position_finish (c->font, c->buffer);
+
+ return ret;
}
static inline void
@@ -492,7 +508,7 @@ hb_ot_position (hb_ot_shape_context_t *c)
/* Visual fallback goes here. */
if (fallback)
- hb_ot_truetype_kern (c);
+ _hb_ot_shape_fallback_kern (c->plan, c->font, c->buffer);
}
@@ -611,8 +627,6 @@ hb_ot_shape_glyphs_closure (hb_font_t *font,
{
hb_ot_shape_plan_t plan;
- buffer->guess_segment_properties ();
-
const char *shapers[] = {"ot", NULL};
hb_shape_plan_t *shape_plan = hb_shape_plan_create_cached (font->face, &buffer->props,
features, num_features, shapers);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-tag.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-tag.cc
index 91ebec76ee3..91ebec76ee3 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-tag.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-tag.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-tag.h b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-tag.h
index 1bf12ab3c09..1bf12ab3c09 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot-tag.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot-tag.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot.h b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot.h
index 80739063991..80739063991 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ot.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ot.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-private.hh
index be0d505f7b5..15e4f5f6920 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-private.hh
@@ -854,4 +854,33 @@ hb_codepoint_parse (const char *s, unsigned int len, int base, hb_codepoint_t *o
}
+/* Global runtime options. */
+
+struct hb_options_t
+{
+ int initialized : 1;
+ int uniscribe_bug_compatible : 1;
+};
+
+union hb_options_union_t {
+ int i;
+ hb_options_t opts;
+};
+ASSERT_STATIC (sizeof (int) == sizeof (hb_options_union_t));
+
+HB_INTERNAL void
+_hb_options_init (void);
+
+extern HB_INTERNAL hb_options_union_t _hb_options;
+
+static inline hb_options_t
+hb_options (void)
+{
+ if (unlikely (!_hb_options.i))
+ _hb_options_init ();
+
+ return _hb_options.opts;
+}
+
+
#endif /* HB_PRIVATE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-set-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-set-private.hh
index 5e30a7e3616..5e30a7e3616 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-set-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-set-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-set.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-set.cc
index 5f427a5d8e0..5f427a5d8e0 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-set.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-set.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-set.h b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-set.h
index 291e24974e6..291e24974e6 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-set.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-set.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shape-plan-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shape-plan-private.hh
index dd014e38d01..dd014e38d01 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shape-plan-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shape-plan-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shape-plan.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shape-plan.cc
index 22a226f3a6c..a6d2d262100 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shape-plan.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shape-plan.cc
@@ -27,6 +27,7 @@
#include "hb-shape-plan-private.hh"
#include "hb-shaper-private.hh"
#include "hb-font-private.hh"
+#include "hb-buffer-private.hh"
#define HB_SHAPER_IMPLEMENT(shaper) \
HB_SHAPER_DATA_ENSURE_DECLARE(shaper, face) \
@@ -178,9 +179,14 @@ hb_shape_plan_execute (hb_shape_plan_t *shape_plan,
const hb_feature_t *features,
unsigned int num_features)
{
- if (unlikely (shape_plan->face != font->face))
+ if (unlikely (hb_object_is_inert (shape_plan) ||
+ hb_object_is_inert (font) ||
+ hb_object_is_inert (buffer)))
return false;
+ assert (shape_plan->face == font->face);
+ assert (hb_segment_properties_equal (&shape_plan->props, &buffer->props));
+
#define HB_SHAPER_EXECUTE(shaper) \
HB_STMT_START { \
return HB_SHAPER_DATA (shaper, shape_plan) && \
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shape-plan.h b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shape-plan.h
index 8f54552f90b..8f54552f90b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shape-plan.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shape-plan.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shape.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shape.cc
index 389ce3e34b1..7d748d7d3c8 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shape.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shape.cc
@@ -202,7 +202,7 @@ hb_feature_to_string (hb_feature_t *feature,
static const char **static_shaper_list;
-static
+static inline
void free_static_shaper_list (void)
{
free (static_shaper_list);
@@ -255,8 +255,6 @@ hb_shape_full (hb_font_t *font,
assert (buffer->content_type == HB_BUFFER_CONTENT_TYPE_UNICODE);
- buffer->guess_segment_properties ();
-
hb_shape_plan_t *shape_plan = hb_shape_plan_create_cached (font->face, &buffer->props, features, num_features, shaper_list);
hb_bool_t res = hb_shape_plan_execute (shape_plan, font, buffer, features, num_features);
hb_shape_plan_destroy (shape_plan);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shape.h b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shape.h
index 10a35cb517e..10a35cb517e 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shape.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shape.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shaper-impl-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shaper-impl-private.hh
index 7844081e95b..7844081e95b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shaper-impl-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shaper-impl-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shaper-list.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shaper-list.hh
index b9c029e58f1..b9c029e58f1 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shaper-list.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shaper-list.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shaper-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shaper-private.hh
index 29c4493943d..29c4493943d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shaper-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shaper-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shaper.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shaper.cc
index 1c1aed9034a..44f718aa702 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-shaper.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-shaper.cc
@@ -40,7 +40,7 @@ static const hb_shaper_pair_t all_shapers[] = {
static const hb_shaper_pair_t *static_shapers;
-static
+static inline
void free_static_shapers (void)
{
if (unlikely (static_shapers != all_shapers))
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-tt-font.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-tt-font.cc
index c503a404380..c503a404380 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-tt-font.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-tt-font.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ucdn.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ucdn.cc
index 61e6ad36229..61e6ad36229 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-ucdn.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-ucdn.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-unicode-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-unicode-private.hh
index 7be4b04da6b..724c6f94ed9 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-unicode-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-unicode-private.hh
@@ -107,6 +107,9 @@ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE
unsigned int
modified_combining_class (hb_codepoint_t unicode)
{
+ /* XXX This hack belongs to the Myanmar shaper. */
+ if (unicode == 0x1037) unicode = 0x103A;
+
return _hb_modified_combining_class[combining_class (unicode)];
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-unicode.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-unicode.cc
index 0a3907eec8c..0a3907eec8c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-unicode.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-unicode.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-unicode.h b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-unicode.h
index 2e10d98a3b3..2e10d98a3b3 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-unicode.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-unicode.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-uniscribe.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-uniscribe.cc
index 2f01c28778f..2f01c28778f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-uniscribe.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-uniscribe.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-uniscribe.h b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-uniscribe.h
index 51887c8794b..51887c8794b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-uniscribe.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-uniscribe.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-utf-private.hh b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-utf-private.hh
index b9a6519d28e..b9a6519d28e 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-utf-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-utf-private.hh
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-version.h.in b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-version.h.in
index 43634f91ce8..43634f91ce8 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-version.h.in
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-version.h.in
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-warning.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-warning.cc
index 4f1f65f5a21..4f1f65f5a21 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb-warning.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb-warning.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb.h b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb.h
index 52c479cc2e5..52c479cc2e5 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/hb.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/hb.h
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/main.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/main.cc
index b362744e213..b362744e213 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/main.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/main.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/test-size-params.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/test-size-params.cc
index 947b5669a14..947b5669a14 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/test-size-params.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/test-size-params.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/test-would-substitute.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/test-would-substitute.cc
index 4731e265607..4731e265607 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/test-would-substitute.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/test-would-substitute.cc
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/test.cc b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/test.cc
index 22108b86b7a..22108b86b7a 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-0.9.12/src/test.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.13/src/test.cc
diff --git a/Build/source/libs/harfbuzz/version.ac b/Build/source/libs/harfbuzz/version.ac
index f89555646c1..72db834324a 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], [0.9.12])
+m4_define([harfbuzz_version], [0.9.13])