diff -Nru harfbuzz-0.9.11/Makefile.am harfbuzz-0.9.13/Makefile.am --- harfbuzz-0.9.11/Makefile.am 2012-12-21 16:54:41.000000000 +0000 +++ harfbuzz-0.9.13/Makefile.am 2013-02-07 04:45:12.000000000 +0000 @@ -21,6 +21,7 @@ $(srcdir)/autoscan.log \ $(srcdir)/compile \ $(srcdir)/config.guess \ + $(srcdir)/config.h.in \ $(srcdir)/config.sub \ $(srcdir)/configure.scan \ $(srcdir)/depcomp \ diff -Nru harfbuzz-0.9.11/Makefile.in harfbuzz-0.9.13/Makefile.in --- harfbuzz-0.9.11/Makefile.in 2013-01-10 15:05:21.000000000 +0000 +++ harfbuzz-0.9.13/Makefile.in 2013-02-25 22:51:03.000000000 +0000 @@ -317,6 +317,7 @@ $(srcdir)/autoscan.log \ $(srcdir)/compile \ $(srcdir)/config.guess \ + $(srcdir)/config.h.in \ $(srcdir)/config.sub \ $(srcdir)/configure.scan \ $(srcdir)/depcomp \ diff -Nru harfbuzz-0.9.11/NEWS harfbuzz-0.9.13/NEWS --- harfbuzz-0.9.11/NEWS 2013-01-10 15:05:05.000000000 +0000 +++ harfbuzz-0.9.13/NEWS 2013-02-25 22:50:43.000000000 +0000 @@ -1,3 +1,39 @@ +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 +===================================== + +- Build fixes for Sun compiler. +- Minor bug fix. + Overview of changes leading to 0.9.11 Thursday, January 10, 2013 ===================================== diff -Nru harfbuzz-0.9.11/TODO harfbuzz-0.9.13/TODO --- harfbuzz-0.9.11/TODO 2013-01-03 02:28:06.000000000 +0000 +++ harfbuzz-0.9.13/TODO 2013-02-15 14:33:04.000000000 +0000 @@ -7,8 +7,6 @@ - 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 @@ - 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 -Nru harfbuzz-0.9.11/autogen.sh harfbuzz-0.9.13/autogen.sh --- harfbuzz-0.9.11/autogen.sh 2012-09-25 01:49:50.000000000 +0000 +++ harfbuzz-0.9.13/autogen.sh 2013-02-07 04:43:04.000000000 +0000 @@ -7,6 +7,12 @@ 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 -Nru harfbuzz-0.9.11/config.h.in harfbuzz-0.9.13/config.h.in --- harfbuzz-0.9.11/config.h.in 2013-01-10 15:05:29.000000000 +0000 +++ harfbuzz-0.9.13/config.h.in 2013-02-25 22:51:11.000000000 +0000 @@ -51,9 +51,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the 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 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 -Nru harfbuzz-0.9.11/configure harfbuzz-0.9.13/configure --- harfbuzz-0.9.11/configure 2013-01-10 15:05:21.000000000 +0000 +++ harfbuzz-0.9.13/configure 2013-02-25 22:51:04.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for HarfBuzz 0.9.11. +# Generated by GNU Autoconf 2.68 for HarfBuzz 0.9.13. # # Report bugs to . # @@ -571,8 +571,8 @@ # Identity of this package. PACKAGE_NAME='HarfBuzz' PACKAGE_TARNAME='harfbuzz' -PACKAGE_VERSION='0.9.11' -PACKAGE_STRING='HarfBuzz 0.9.11' +PACKAGE_VERSION='0.9.13' +PACKAGE_STRING='HarfBuzz 0.9.13' PACKAGE_BUGREPORT='http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz' PACKAGE_URL='http://harfbuzz.org/' @@ -676,6 +676,8 @@ ax_pthread_config OS_WIN32_FALSE OS_WIN32_TRUE +HAVE_GCC_FALSE +HAVE_GCC_TRUE HB_LIBTOOL_VERSION_INFO HB_VERSION HB_VERSION_MICRO @@ -1388,7 +1390,7 @@ # 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 0.9.11 to adapt to many kinds of systems. +\`configure' configures HarfBuzz 0.9.13 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1458,7 +1460,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HarfBuzz 0.9.11:";; + short | recursive ) echo "Configuration of HarfBuzz 0.9.13:";; esac cat <<\_ACEOF @@ -1596,7 +1598,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HarfBuzz configure 0.9.11 +HarfBuzz configure 0.9.13 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2140,7 +2142,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HarfBuzz $as_me 0.9.11, which was +It was created by HarfBuzz $as_me 0.9.13, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2961,7 +2963,7 @@ # Define the identity of the package. PACKAGE='harfbuzz' - VERSION='0.9.11' + VERSION='0.9.13' # Some tools Automake needs. @@ -16131,8 +16133,8 @@ HB_VERSION_MAJOR=0 HB_VERSION_MINOR=9 -HB_VERSION_MICRO=11 -HB_VERSION=0.9.11 +HB_VERSION_MICRO=13 +HB_VERSION=0.9.13 @@ -16143,12 +16145,12 @@ -HB_LIBTOOL_VERSION_INFO=911:0:911 +HB_LIBTOOL_VERSION_INFO=913:0:913 # Functions and headers -for ac_func in atexit mprotect sysconf getpagesize mmap _setmode isatty +for ac_func in atexit mprotect sysconf getpagesize mmap isatty do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -16160,7 +16162,7 @@ fi done -for ac_header in unistd.h sys/mman.h io.h +for ac_header in unistd.h sys/mman.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -16204,6 +16206,15 @@ esac fi + if test "x$GCC" = "xyes"; then + HAVE_GCC_TRUE= + HAVE_GCC_FALSE='#' +else + HAVE_GCC_TRUE='#' + HAVE_GCC_FALSE= +fi + + hb_os_win32=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native Win32" >&5 $as_echo_n "checking for native Win32... " >&6; } @@ -17840,6 +17851,10 @@ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_GCC_TRUE}" && test -z "${HAVE_GCC_FALSE}"; then + as_fn_error $? "conditional \"HAVE_GCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${OS_WIN32_TRUE}" && test -z "${OS_WIN32_FALSE}"; then as_fn_error $? "conditional \"OS_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -18313,7 +18328,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HarfBuzz $as_me 0.9.11, which was +This file was extended by HarfBuzz $as_me 0.9.13, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18380,7 +18395,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -HarfBuzz config.status 0.9.11 +HarfBuzz config.status 0.9.13 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff -Nru harfbuzz-0.9.11/configure.ac harfbuzz-0.9.13/configure.ac --- harfbuzz-0.9.11/configure.ac 2013-01-10 15:05:14.000000000 +0000 +++ harfbuzz-0.9.13/configure.ac 2013-02-25 22:42:35.000000000 +0000 @@ -1,6 +1,6 @@ AC_PREREQ([2.64]) AC_INIT([HarfBuzz], - [0.9.11], + [0.9.13], [http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz], [harfbuzz], [http://harfbuzz.org/]) @@ -9,7 +9,7 @@ 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 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 @@ -88,6 +88,8 @@ esac fi +AM_CONDITIONAL(HAVE_GCC, test "x$GCC" = "xyes") + hb_os_win32=no AC_MSG_CHECKING([for native Win32]) case "$host" in diff -Nru harfbuzz-0.9.11/debian/changelog harfbuzz-0.9.13/debian/changelog --- harfbuzz-0.9.11/debian/changelog 2013-01-16 12:51:10.000000000 +0000 +++ harfbuzz-0.9.13/debian/changelog 2013-02-26 15:43:36.000000000 +0000 @@ -1,11 +1,22 @@ -harfbuzz (0.9.11-0ubuntu1~raring1) raring; urgency=low +harfbuzz (0.9.13-0ubuntu1~raring0) raring; urgency=medium * New upstream release - * debian/control: - - Drop libgraphite2-dev, while it isn't multiarched it will break - pango1.0/harfbuzz mutliarch support - -- Rico Tzschichholz Sun, 13 Jan 2013 09:42:02 +0100 + -- Rico Tzschichholz Tue, 26 Feb 2013 16:43:36 +0100 + +harfbuzz (0.9.12-1ubuntu1) raring; urgency=low + + * Build without graphite2, it's in universe + + -- Sebastien Bacher Tue, 19 Feb 2013 15:02:49 +0000 + +harfbuzz (0.9.12-1) experimental; urgency=low + + * New upstream release. + * debian/copyright: Update copyright years. + * debian/libharfbuzz0.symbols: Update symbols. + + -- أحمد المحمودي (Ahmed El-Mahmoudy) Sun, 20 Jan 2013 12:44:54 +0200 harfbuzz (0.9.10-1) experimental; urgency=low diff -Nru harfbuzz-0.9.11/debian/copyright harfbuzz-0.9.13/debian/copyright --- harfbuzz-0.9.11/debian/copyright 2013-01-13 08:42:02.000000000 +0000 +++ harfbuzz-0.9.13/debian/copyright 2013-02-26 15:43:36.000000000 +0000 @@ -15,7 +15,7 @@ License: MIT Files: debian/* -Copyright: 2012 أحمد المحمودي (Ahmed El-Mahmoudy) +Copyright: 2012-2013 أحمد المحمودي (Ahmed El-Mahmoudy) License: MIT License: MIT diff -Nru harfbuzz-0.9.11/src/Makefile.am harfbuzz-0.9.13/src/Makefile.am --- harfbuzz-0.9.11/src/Makefile.am 2012-12-19 01:39:27.000000000 +0000 +++ harfbuzz-0.9.13/src/Makefile.am 2013-02-12 16:33:42.000000000 +0000 @@ -63,6 +63,8 @@ hb-shape.h \ hb-shape-plan.h \ hb-unicode.h \ + $(NULL) +HBNODISTHEADERS = \ hb-version.h \ $(NULL) @@ -85,7 +87,11 @@ 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 \ @@ -198,22 +204,26 @@ if HAVE_ICU libharfbuzz_la_LINK = $(CXXLINK) $(libharfbuzz_la_LDFLAGS) else -# Use a C linker, not C++; Don't link to libstdc++ +# Use a C linker for GCC, not C++; Don't link to libstdc++ +if HAVE_GCC libharfbuzz_la_LINK = $(LINK) $(libharfbuzz_la_LDFLAGS) +else +libharfbuzz_la_LINK = $(CXXLINK) $(libharfbuzz_la_LDFLAGS) +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_.* \(' | \ @@ -234,9 +244,9 @@ 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 && \ @@ -246,8 +256,17 @@ .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 ) @@ -273,9 +292,8 @@ 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 @@ -293,7 +311,7 @@ srcdir="$(srcdir)" \ MAKE="$(MAKE) $(AM_MAKEFLAGS)" \ HBSOURCES="$(HBSOURCES)" \ - HBHEADERS="$(HBHEADERS)" \ + HBHEADERS="$(HBHEADERS) $(HBNODISTHEADERS)" \ $(NULL) #-include $(INTROSPECTION_MAKEFILE) @@ -307,7 +325,7 @@ #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 -Nru harfbuzz-0.9.11/src/Makefile.in harfbuzz-0.9.13/src/Makefile.in --- harfbuzz-0.9.11/src/Makefile.in 2013-01-10 15:05:21.000000000 +0000 +++ harfbuzz-0.9.13/src/Makefile.in 2013-02-25 22:51:03.000000000 +0000 @@ -56,7 +56,11 @@ @HAVE_OT_TRUE@ hb-ot-shape-complex-indic.cc \ @HAVE_OT_TRUE@ hb-ot-shape-complex-indic-machine.hh \ @HAVE_OT_TRUE@ hb-ot-shape-complex-indic-private.hh \ -@HAVE_OT_TRUE@ hb-ot-shape-complex-indic-table.hh \ +@HAVE_OT_TRUE@ hb-ot-shape-complex-indic-table.cc \ +@HAVE_OT_TRUE@ hb-ot-shape-complex-myanmar.cc \ +@HAVE_OT_TRUE@ hb-ot-shape-complex-myanmar-machine.hh \ +@HAVE_OT_TRUE@ hb-ot-shape-complex-sea.cc \ +@HAVE_OT_TRUE@ hb-ot-shape-complex-sea-machine.hh \ @HAVE_OT_TRUE@ hb-ot-shape-complex-thai.cc \ @HAVE_OT_TRUE@ hb-ot-shape-complex-private.hh \ @HAVE_OT_TRUE@ hb-ot-shape-normalize-private.hh \ @@ -206,17 +210,20 @@ hb-ot-shape-complex-default.cc 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-thai.cc \ - hb-ot-shape-complex-private.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 hb-ot-shape-normalize.cc \ hb-ot-shape-fallback-private.hh hb-ot-shape-fallback.cc \ hb-ot-shape-private.hh hb-glib.cc hb-gobject-structs.cc \ hb-icu.cc hb-ft.cc hb-graphite2.cc hb-uniscribe.cc \ hb-coretext.cc hb-old.cc hb-icu-le.cc hb-ucdn.cc hb.h \ hb-blob.h hb-buffer.h hb-common.h hb-font.h hb-set.h \ - hb-shape.h hb-shape-plan.h hb-unicode.h hb-version.h hb-ot.h \ - hb-ot-layout.h hb-ot-tag.h hb-glib.h hb-gobject.h hb-icu.h \ - hb-ft.h hb-graphite2.h hb-uniscribe.h hb-coretext.h + hb-shape.h hb-shape-plan.h hb-unicode.h hb-ot.h hb-ot-layout.h \ + hb-ot-tag.h hb-glib.h hb-gobject.h hb-icu.h hb-ft.h \ + hb-graphite2.h hb-uniscribe.h hb-coretext.h hb-version.h am__objects_1 = @HAVE_OT_TRUE@am__objects_2 = libharfbuzz_la-hb-ot-layout.lo \ @HAVE_OT_TRUE@ libharfbuzz_la-hb-ot-map.lo \ @@ -224,6 +231,9 @@ @HAVE_OT_TRUE@ libharfbuzz_la-hb-ot-shape-complex-arabic.lo \ @HAVE_OT_TRUE@ libharfbuzz_la-hb-ot-shape-complex-default.lo \ @HAVE_OT_TRUE@ libharfbuzz_la-hb-ot-shape-complex-indic.lo \ +@HAVE_OT_TRUE@ libharfbuzz_la-hb-ot-shape-complex-indic-table.lo \ +@HAVE_OT_TRUE@ libharfbuzz_la-hb-ot-shape-complex-myanmar.lo \ +@HAVE_OT_TRUE@ libharfbuzz_la-hb-ot-shape-complex-sea.lo \ @HAVE_OT_TRUE@ libharfbuzz_la-hb-ot-shape-complex-thai.lo \ @HAVE_OT_TRUE@ libharfbuzz_la-hb-ot-shape-normalize.lo \ @HAVE_OT_TRUE@ libharfbuzz_la-hb-ot-shape-fallback.lo \ @@ -254,10 +264,12 @@ am__objects_15 = $(am__objects_1) $(am__objects_14) $(am__objects_1) \ $(am__objects_1) $(am__objects_1) $(am__objects_1) \ $(am__objects_1) $(am__objects_1) $(am__objects_1) -am_libharfbuzz_la_OBJECTS = $(am__objects_13) $(am__objects_15) -@HAVE_GOBJECT_TRUE@am__objects_16 = \ +am__objects_16 = $(am__objects_1) +am_libharfbuzz_la_OBJECTS = $(am__objects_13) $(am__objects_15) \ + $(am__objects_16) +@HAVE_GOBJECT_TRUE@am__objects_17 = \ @HAVE_GOBJECT_TRUE@ libharfbuzz_la-hb-gobject-enums.lo -nodist_libharfbuzz_la_OBJECTS = $(am__objects_16) +nodist_libharfbuzz_la_OBJECTS = $(am__objects_17) libharfbuzz_la_OBJECTS = $(am_libharfbuzz_la_OBJECTS) \ $(nodist_libharfbuzz_la_OBJECTS) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) @@ -281,9 +293,8 @@ test_would_substitute_DEPENDENCIES = libharfbuzz.la \ $(am__DEPENDENCIES_10) $(am__DEPENDENCIES_1) am__dist_check_SCRIPTS_DIST = check-c-linkage-decls.sh \ - check-header-guards.sh check-exported-symbols.sh \ - check-includes.sh check-internal-symbols.sh check-libstdc++.sh \ - check-static-inits.sh + check-header-guards.sh check-includes.sh check-symbols.sh \ + check-libstdc++.sh check-static-inits.sh DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -341,9 +352,8 @@ ps-recursive uninstall-recursive am__pkginclude_HEADERS_DIST = hb.h hb-blob.h hb-buffer.h hb-common.h \ hb-font.h hb-set.h hb-shape.h hb-shape-plan.h hb-unicode.h \ - hb-version.h hb-ot.h hb-ot-layout.h hb-ot-tag.h hb-glib.h \ - hb-gobject.h hb-icu.h hb-ft.h hb-graphite2.h hb-uniscribe.h \ - hb-coretext.h + hb-ot.h hb-ot-layout.h hb-ot-tag.h hb-glib.h hb-gobject.h \ + hb-icu.h hb-ft.h hb-graphite2.h hb-uniscribe.h hb-coretext.h HEADERS = $(nodist_pkginclude_HEADERS) $(pkginclude_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive @@ -352,13 +362,25 @@ distdir ETAGS = etags CTAGS = ctags +# If stdout is a non-dumb tty, use colors. If test -t is not supported, +# then this fails; a conservative approach. Of course do not redirect +# stdout here, just stderr. am__tty_colors = \ -red=; grn=; lgn=; blu=; std= +red=; grn=; lgn=; blu=; std=; \ +test "X$(AM_COLOR_TESTS)" != Xno \ +&& test "X$$TERM" != Xdumb \ +&& { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \ +&& { \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + std=''; \ +} am__EXEEXT_1 = am__EXEEXT_2 = check-c-linkage-decls.sh check-header-guards.sh \ - check-exported-symbols.sh check-includes.sh \ - check-internal-symbols.sh $(am__EXEEXT_1) $(am__append_48) \ - $(am__append_49) + check-includes.sh check-symbols.sh $(am__EXEEXT_1) \ + $(am__append_48) $(am__append_49) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -540,9 +562,13 @@ NULL = SUBDIRS = $(am__append_36) $(am__append_40) $(am__append_44) DIST_SUBDIRS = hb-old hb-icu-le hb-ucdn -BUILT_SOURCES = $(am__append_13) +BUILT_SOURCES = $(am__append_13) hb-ot-shape-complex-indic-machine.hh \ + hb-ot-shape-complex-myanmar-machine.hh \ + hb-ot-shape-complex-sea-machine.hh $(NULL) EXTRA_DIST = $(am__append_14) $(GENERATORS) \ - hb-ot-shape-complex-indic-machine.rl + hb-ot-shape-complex-indic-machine.rl \ + hb-ot-shape-complex-myanmar-machine.rl \ + hb-ot-shape-complex-sea-machine.rl $(NULL) CLEANFILES = harfbuzz.def DISTCLEANFILES = $(am__append_15) MAINTAINERCLEANFILES = @@ -576,27 +602,32 @@ $(am__append_34) $(am__append_39) $(am__append_43) \ $(am__append_47) HBHEADERS = hb.h hb-blob.h hb-buffer.h hb-common.h hb-font.h hb-set.h \ - hb-shape.h hb-shape-plan.h hb-unicode.h hb-version.h $(NULL) \ + hb-shape.h hb-shape-plan.h hb-unicode.h $(NULL) \ $(am__append_2) $(am__append_8) $(am__append_12) \ $(am__append_19) $(am__append_23) $(am__append_27) \ $(am__append_31) $(am__append_35) +HBNODISTHEADERS = \ + hb-version.h \ + $(NULL) + @HAVE_GOBJECT_TRUE@nodist_HBSOURCES = hb-gobject-enums.cc # Put the library together @OS_WIN32_TRUE@export_symbols = -export-symbols harfbuzz.def @OS_WIN32_TRUE@harfbuzz_def_dependency = harfbuzz.def -# Use a C linker, not C++; Don't link to libstdc++ -@HAVE_ICU_FALSE@@OS_WIN32_FALSE@libharfbuzz_la_LINK = $(LINK) $(libharfbuzz_la_LDFLAGS) +@HAVE_GCC_FALSE@@HAVE_ICU_FALSE@@OS_WIN32_FALSE@libharfbuzz_la_LINK = $(CXXLINK) $(libharfbuzz_la_LDFLAGS) +# Use a C linker for GCC, not C++; Don't link to libstdc++ +@HAVE_GCC_TRUE@@HAVE_ICU_FALSE@@OS_WIN32_FALSE@libharfbuzz_la_LINK = $(LINK) $(libharfbuzz_la_LDFLAGS) @HAVE_ICU_TRUE@@OS_WIN32_FALSE@libharfbuzz_la_LINK = $(CXXLINK) $(libharfbuzz_la_LDFLAGS) @OS_WIN32_TRUE@libharfbuzz_la_LINK = $(CXXLINK) $(libharfbuzz_la_LDFLAGS) -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) GENERATORS = \ gen-arabic-table.py \ gen-indic-table.py \ @@ -615,14 +646,13 @@ test_size_params_CPPFLAGS = $(HBCFLAGS) 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 $(NULL) $(am__append_48) \ + check-includes.sh check-symbols.sh $(NULL) $(am__append_48) \ $(am__append_49) TESTS_ENVIRONMENT = \ srcdir="$(srcdir)" \ MAKE="$(MAKE) $(AM_MAKEFLAGS)" \ HBSOURCES="$(HBSOURCES)" \ - HBHEADERS="$(HBHEADERS)" \ + HBHEADERS="$(HBHEADERS) $(HBNODISTHEADERS)" \ $(NULL) all: $(BUILT_SOURCES) @@ -800,7 +830,10 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-ot-map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-arabic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-default.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-indic-table.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-indic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-myanmar.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-sea.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-thai.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-ot-shape-fallback.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-ot-shape-normalize.Plo@am__quote@ @@ -974,6 +1007,27 @@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libharfbuzz_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libharfbuzz_la-hb-ot-shape-complex-indic.lo `test -f 'hb-ot-shape-complex-indic.cc' || echo '$(srcdir)/'`hb-ot-shape-complex-indic.cc +libharfbuzz_la-hb-ot-shape-complex-indic-table.lo: hb-ot-shape-complex-indic-table.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libharfbuzz_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libharfbuzz_la-hb-ot-shape-complex-indic-table.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-indic-table.Tpo -c -o libharfbuzz_la-hb-ot-shape-complex-indic-table.lo `test -f 'hb-ot-shape-complex-indic-table.cc' || echo '$(srcdir)/'`hb-ot-shape-complex-indic-table.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-indic-table.Tpo $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-indic-table.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='hb-ot-shape-complex-indic-table.cc' object='libharfbuzz_la-hb-ot-shape-complex-indic-table.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libharfbuzz_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libharfbuzz_la-hb-ot-shape-complex-indic-table.lo `test -f 'hb-ot-shape-complex-indic-table.cc' || echo '$(srcdir)/'`hb-ot-shape-complex-indic-table.cc + +libharfbuzz_la-hb-ot-shape-complex-myanmar.lo: hb-ot-shape-complex-myanmar.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libharfbuzz_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libharfbuzz_la-hb-ot-shape-complex-myanmar.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-myanmar.Tpo -c -o libharfbuzz_la-hb-ot-shape-complex-myanmar.lo `test -f 'hb-ot-shape-complex-myanmar.cc' || echo '$(srcdir)/'`hb-ot-shape-complex-myanmar.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-myanmar.Tpo $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-myanmar.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='hb-ot-shape-complex-myanmar.cc' object='libharfbuzz_la-hb-ot-shape-complex-myanmar.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libharfbuzz_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libharfbuzz_la-hb-ot-shape-complex-myanmar.lo `test -f 'hb-ot-shape-complex-myanmar.cc' || echo '$(srcdir)/'`hb-ot-shape-complex-myanmar.cc + +libharfbuzz_la-hb-ot-shape-complex-sea.lo: hb-ot-shape-complex-sea.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libharfbuzz_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libharfbuzz_la-hb-ot-shape-complex-sea.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-sea.Tpo -c -o libharfbuzz_la-hb-ot-shape-complex-sea.lo `test -f 'hb-ot-shape-complex-sea.cc' || echo '$(srcdir)/'`hb-ot-shape-complex-sea.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-sea.Tpo $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-sea.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='hb-ot-shape-complex-sea.cc' object='libharfbuzz_la-hb-ot-shape-complex-sea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libharfbuzz_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libharfbuzz_la-hb-ot-shape-complex-sea.lo `test -f 'hb-ot-shape-complex-sea.cc' || echo '$(srcdir)/'`hb-ot-shape-complex-sea.cc + libharfbuzz_la-hb-ot-shape-complex-thai.lo: hb-ot-shape-complex-thai.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libharfbuzz_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libharfbuzz_la-hb-ot-shape-complex-thai.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-thai.Tpo -c -o libharfbuzz_la-hb-ot-shape-complex-thai.lo `test -f 'hb-ot-shape-complex-thai.cc' || echo '$(srcdir)/'`hb-ot-shape-complex-thai.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-thai.Tpo $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-thai.Plo @@ -1605,7 +1659,7 @@ @HAVE_GOBJECT_TRUE@hb-gobject-enums.cc: hb-gobject-enums.cc.tmpl $(HBHEADERS) @HAVE_GOBJECT_TRUE@ $(AM_V_GEN) $(GLIB_MKENUMS) --template $^ > "$@.tmp" && \ @HAVE_GOBJECT_TRUE@ mv "$@.tmp" "$@" || ( $(RM) "@.tmp" && false ) -harfbuzz.def: $(HBHEADERS) +harfbuzz.def: $(HBHEADERS) $(HBNODISTHEADERS) $(AM_V_GEN) (echo EXPORTS; \ (cat $^ || echo 'hb_ERROR ()' ) | \ $(EGREP) '^hb_.* \(' | \ @@ -1618,9 +1672,9 @@ 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 && \ @@ -1628,7 +1682,7 @@ ($(RM) hb-ot-shape-complex-arabic-table.hh.tmp; false) .PHONY: unicode-tables arabic-table indic-table -$(srcdir)/hb-ot-shape-complex-indic-machine.hh: hb-ot-shape-complex-indic-machine.rl +%.hh: %.rl $(AM_V_GEN)$(top_srcdir)/missing --run ragel -e -F1 -o "$@.tmp" "$<" && \ mv "$@.tmp" "$@" || ( $(RM) "$@.tmp" && false ) @@ -1643,7 +1697,7 @@ #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 -Nru harfbuzz-0.9.11/src/check-exported-symbols.sh harfbuzz-0.9.13/src/check-exported-symbols.sh --- harfbuzz-0.9.11/src/check-exported-symbols.sh 2012-12-19 18:00:13.000000000 +0000 +++ harfbuzz-0.9.13/src/check-exported-symbols.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -#!/bin/sh - -LC_ALL=C -export LC_ALL - -test -z "$srcdir" && srcdir=. -test -z "$MAKE" && MAKE=make -stat=0 - -if which nm 2>/dev/null >/dev/null; then - : -else - echo "check-exported-symbols.sh: 'nm' not found; skipping test" - exit 77 -fi - -defs="harfbuzz.def" -$MAKE $defs > /dev/null -tested=false -for def in $defs; do - lib=`echo "$def" | sed 's/[.]def$//;s@.*/@@'` - so=.libs/lib${lib}.so - 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 - # cheat: copy the last line from the def file! - tail -n1 "$def" - } | diff "$def" - >&2 || stat=1 - tested=true - fi -done -if ! $tested; then - echo "check-exported-symbols.sh: libharfbuzz shared library not found; skipping test" - exit 77 -fi - -exit $stat diff -Nru harfbuzz-0.9.11/src/check-internal-symbols.sh harfbuzz-0.9.13/src/check-internal-symbols.sh --- harfbuzz-0.9.11/src/check-internal-symbols.sh 2012-12-19 18:00:13.000000000 +0000 +++ harfbuzz-0.9.13/src/check-internal-symbols.sh 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru harfbuzz-0.9.11/src/check-symbols.sh harfbuzz-0.9.13/src/check-symbols.sh --- harfbuzz-0.9.11/src/check-symbols.sh 1970-01-01 00:00:00.000000000 +0000 +++ harfbuzz-0.9.13/src/check-symbols.sh 2013-02-14 15:59:57.000000000 +0000 @@ -0,0 +1,50 @@ +#!/bin/sh + +LC_ALL=C +export LC_ALL + +test -z "$srcdir" && srcdir=. +test -z "$MAKE" && MAKE=make +stat=0 + +if which nm 2>/dev/null >/dev/null; then + : +else + echo "check-symbols.sh: 'nm' not found; skipping test" + exit 77 +fi + +defs="harfbuzz.def" +$MAKE $defs > /dev/null +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 + 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 +if ! $tested; then + echo "check-exported-symbols.sh: libharfbuzz shared library not found; skipping test" + exit 77 +fi + +exit $stat diff -Nru harfbuzz-0.9.11/src/gen-indic-table.py harfbuzz-0.9.13/src/gen-indic-table.py --- harfbuzz-0.9.11/src/gen-indic-table.py 2012-04-10 19:34:23.000000000 +0000 +++ harfbuzz-0.9.13/src/gen-indic-table.py 2013-02-12 16:40:57.000000000 +0000 @@ -75,8 +75,7 @@ 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 @@ 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 @@ 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 -Nru harfbuzz-0.9.11/src/hb-atomic-private.hh harfbuzz-0.9.13/src/hb-atomic-private.hh --- harfbuzz-0.9.11/src/hb-atomic-private.hh 2013-01-10 07:16:29.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-atomic-private.hh 2013-02-14 15:59:57.000000000 +0000 @@ -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 @@ -104,11 +104,11 @@ #include #include -typedef unsigned int fc_atomic_int_t; -#define fc_atomic_int_add(AI, V) ( ({__machine_rw_barrier ();}), atomic_add_int_nv (&(AI), (V)) - (V)) +typedef unsigned int hb_atomic_int_t; +#define hb_atomic_int_add(AI, V) ( ({__machine_rw_barrier ();}), atomic_add_int_nv (&(AI), (V)) - (V)) -#define fc_atomic_ptr_get(P) ( ({__machine_rw_barrier ();}), (void *) *(P)) -#define fc_atomic_ptr_cmpexch(P,O,N) ( ({__machine_rw_barrier ();}), atomic_cas_ptr ((P), (O), (N)) == (void *) (O) ? FcTrue : FcFalse) +#define hb_atomic_ptr_get(P) ( ({__machine_rw_barrier ();}), (void *) *(P)) +#define hb_atomic_ptr_cmpexch(P,O,N) ( ({__machine_rw_barrier ();}), atomic_cas_ptr ((void **) (P), (void *) (O), (void *) (N)) == (void *) (O) ? true : false) #elif !defined(HB_NO_MT) diff -Nru harfbuzz-0.9.11/src/hb-blob.cc harfbuzz-0.9.13/src/hb-blob.cc --- harfbuzz-0.9.11/src/hb-blob.cc 2012-11-23 20:30:42.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-blob.cc 2013-02-25 21:55:20.000000000 +0000 @@ -24,6 +24,9 @@ * Red Hat Author(s): Behdad Esfahbod */ +/* http://www.oracle.com/technetwork/articles/servers-storage-dev/standardheaderfiles-453865.html */ +#define _POSIX_C_SOURCE 199309L + #include "hb-private.hh" #include "hb-blob.h" @@ -120,7 +123,7 @@ 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 -Nru harfbuzz-0.9.11/src/hb-blob.h harfbuzz-0.9.13/src/hb-blob.h --- harfbuzz-0.9.11/src/hb-blob.h 2012-11-23 20:30:42.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-blob.h 2013-02-25 22:03:49.000000000 +0000 @@ -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 @@ 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 -Nru harfbuzz-0.9.11/src/hb-common.cc harfbuzz-0.9.13/src/hb-common.cc --- harfbuzz-0.9.11/src/hb-common.cc 2012-12-03 22:35:11.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-common.cc 2013-02-24 22:21:26.000000000 +0000 @@ -36,6 +36,24 @@ #include +/* 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 @@ static hb_language_item_t *langs; -static +static inline void free_langs (void) { while (langs) { @@ -414,5 +432,3 @@ { return HB_VERSION_CHECK (major, minor, micro); } - - diff -Nru harfbuzz-0.9.11/src/hb-fallback-shape.cc harfbuzz-0.9.13/src/hb-fallback-shape.cc --- harfbuzz-0.9.11/src/hb-fallback-shape.cc 2012-12-05 23:49:11.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-fallback-shape.cc 2013-02-15 12:48:03.000000000 +0000 @@ -98,7 +98,6 @@ hb_codepoint_t space; font->get_glyph (' ', 0, &space); - buffer->guess_segment_properties (); buffer->clear_positions (); unsigned int count = buffer->len; diff -Nru harfbuzz-0.9.11/src/hb-ft.cc harfbuzz-0.9.13/src/hb-ft.cc --- harfbuzz-0.9.11/src/hb-ft.cc 2012-11-23 20:30:42.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ft.cc 2013-02-14 15:59:57.000000000 +0000 @@ -403,7 +403,7 @@ static FT_Library ft_library; -static +static inline void free_ft_library (void) { FT_Done_FreeType (ft_library); diff -Nru harfbuzz-0.9.11/src/hb-mutex-private.hh harfbuzz-0.9.13/src/hb-mutex-private.hh --- harfbuzz-0.9.11/src/hb-mutex-private.hh 2012-11-23 20:30:42.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-mutex-private.hh 2013-02-14 15:59:57.000000000 +0000 @@ -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 diff -Nru harfbuzz-0.9.11/src/hb-open-type-private.hh harfbuzz-0.9.13/src/hb-open-type-private.hh --- harfbuzz-0.9.11/src/hb-open-type-private.hh 2013-01-08 22:13:42.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-open-type-private.hh 2013-02-15 16:43:06.000000000 +0000 @@ -684,11 +684,6 @@ if (unlikely (!offset)) return Null(Type); return StructAtOffset (base, offset); } - inline Type& operator () (void *base) - { - unsigned int offset = *this; - return StructAtOffset (base, offset); - } inline Type& serialize (hb_serialize_context_t *c, void *base) { diff -Nru harfbuzz-0.9.11/src/hb-ot-layout-gpos-table.hh harfbuzz-0.9.13/src/hb-ot-layout-gpos-table.hh --- harfbuzz-0.9.11/src/hb-ot-layout-gpos-table.hh 2013-01-08 22:14:59.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-layout-gpos-table.hh 2013-02-15 11:42:35.000000000 +0000 @@ -596,6 +596,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ { return CastR (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 @@ } 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 @@ } 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 @@ /* 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 @@ 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 -Nru harfbuzz-0.9.11/src/hb-ot-layout-gsub-table.hh harfbuzz-0.9.13/src/hb-ot-layout-gsub-table.hh --- harfbuzz-0.9.11/src/hb-ot-layout-gsub-table.hh 2012-12-04 22:07:43.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-layout-gsub-table.hh 2013-02-15 16:43:41.000000000 +0000 @@ -272,7 +272,8 @@ 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 @@ ligate_input (c, count, &component[1], - ligGlyph, match_glyph, NULL, + ligGlyph, is_mark_ligature, total_component_count); @@ -1193,7 +1194,7 @@ 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 @@ { /* 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 @@ 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 -Nru harfbuzz-0.9.11/src/hb-ot-layout-gsubgpos-private.hh harfbuzz-0.9.13/src/hb-ot-layout-gsubgpos-private.hh --- harfbuzz-0.9.11/src/hb-ot-layout-gsubgpos-private.hh 2013-01-04 07:25:08.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-layout-gsubgpos-private.hh 2013-02-21 20:55:19.000000000 +0000 @@ -255,132 +255,268 @@ 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 (); } - - 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 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 + }; + + 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 @@ 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 @@ { 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 @@ * 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 @@ 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 @@ 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 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 @@ 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 @@ { 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 @@ { 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 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 @@ * 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 @@ 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 @@ 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 @@ 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 -Nru harfbuzz-0.9.11/src/hb-ot-layout-private.hh harfbuzz-0.9.13/src/hb-ot-layout-private.hh --- harfbuzz-0.9.11/src/hb-ot-layout-private.hh 2012-11-23 20:30:42.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-layout-private.hh 2013-02-21 20:55:49.000000000 +0000 @@ -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_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_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 -Nru harfbuzz-0.9.11/src/hb-ot-layout.cc harfbuzz-0.9.13/src/hb-ot-layout.cc --- harfbuzz-0.9.11/src/hb-ot-layout.cc 2013-01-03 06:07:11.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-layout.cc 2013-02-15 16:42:45.000000000 +0000 @@ -185,6 +185,8 @@ return g.get_script_tags (start_offset, script_count, script_tags); } +#define HB_OT_TAG_LATIN_SCRIPT HB_TAG ('l', 'a', 't', 'n') + hb_bool_t hb_ot_layout_table_find_script (hb_face_t *face, hb_tag_t table_tag, @@ -206,6 +208,11 @@ if (g.find_script_index (HB_OT_TAG_DEFAULT_LANGUAGE, script_index)) return false; + /* try with 'latn'; some old fonts put their features there even though + they're really trying to support Thai, for example :( */ + if (g.find_script_index (HB_OT_TAG_LATIN_SCRIPT, script_index)) + return false; + if (script_index) *script_index = HB_OT_LAYOUT_NO_SCRIPT_INDEX; return false; } @@ -246,7 +253,6 @@ /* try with 'latn'; some old fonts put their features there even though they're really trying to support Thai, for example :( */ -#define HB_OT_TAG_LATIN_SCRIPT HB_TAG ('l', 'a', 't', 'n') if (g.find_script_index (HB_OT_TAG_LATIN_SCRIPT, script_index)) { if (chosen_script) *chosen_script = HB_OT_TAG_LATIN_SCRIPT; @@ -660,11 +666,12 @@ 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); @@ -709,11 +716,12 @@ 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); @@ -721,9 +729,9 @@ } 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 -Nru harfbuzz-0.9.11/src/hb-ot-map-private.hh harfbuzz-0.9.13/src/hb-ot-map-private.hh --- harfbuzz-0.9.11/src/hb-ot-map-private.hh 2012-11-23 20:30:42.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-map-private.hh 2013-02-15 11:42:35.000000000 +0000 @@ -49,14 +49,16 @@ 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 @@ 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 @@ hb_prealloced_array_t 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 @@ 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 @@ 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 -Nru harfbuzz-0.9.11/src/hb-ot-map.cc harfbuzz-0.9.13/src/hb-ot-map.cc --- harfbuzz-0.9.11/src/hb-ot-map.cc 2012-11-23 20:30:42.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-map.cc 2013-02-15 12:38:20.000000000 +0000 @@ -33,7 +33,8 @@ 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 @@ return; lookup->mask = mask; lookup->index = lookup_indices[i]; + lookup->auto_joiners = auto_joiners; } offset += len; @@ -84,16 +86,16 @@ } } -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 @@ 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 @@ } 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ { 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 @@ 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 -Nru harfbuzz-0.9.11/src/hb-ot-shape-complex-arabic-fallback.hh harfbuzz-0.9.13/src/hb-ot-shape-complex-arabic-fallback.hh --- harfbuzz-0.9.11/src/hb-ot-shape-complex-arabic-fallback.hh 2012-12-06 00:01:57.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-complex-arabic-fallback.hh 2013-02-15 11:42:35.000000000 +0000 @@ -244,7 +244,7 @@ { 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 -Nru harfbuzz-0.9.11/src/hb-ot-shape-complex-arabic.cc harfbuzz-0.9.13/src/hb-ot-shape-complex-arabic.cc --- harfbuzz-0.9.11/src/hb-ot-shape-complex-arabic.cc 2012-12-06 00:03:06.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-complex-arabic.cc 2013-02-15 14:24:43.000000000 +0000 @@ -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 @@ if (unlikely (hb_in_range (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 @@ 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 @@ * 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 @@ NULL, /* decompose */ NULL, /* compose */ setup_masks_arabic, - true, /* zero_width_attached_marks */ + HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE, true, /* fallback_position */ }; diff -Nru harfbuzz-0.9.11/src/hb-ot-shape-complex-default.cc harfbuzz-0.9.13/src/hb-ot-shape-complex-default.cc --- harfbuzz-0.9.11/src/hb-ot-shape-complex-default.cc 2012-11-23 20:30:42.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-complex-default.cc 2013-02-15 11:42:32.000000000 +0000 @@ -68,7 +68,7 @@ } 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 @@ NULL, /* decompose */ compose_default, NULL, /* setup_masks */ - true, /* zero_width_attached_marks */ + HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE, true, /* fallback_position */ }; diff -Nru harfbuzz-0.9.11/src/hb-ot-shape-complex-indic-machine.hh harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-machine.hh --- harfbuzz-0.9.11/src/hb-ot-shape-complex-indic-machine.hh 2012-12-29 23:39:10.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-machine.hh 2013-02-15 11:44:33.000000000 +0000 @@ -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 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 @@ 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 @@ #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 @@ #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 @@ #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 -Nru harfbuzz-0.9.11/src/hb-ot-shape-complex-indic-machine.rl harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-machine.rl --- harfbuzz-0.9.11/src/hb-ot-shape-complex-indic-machine.rl 2012-12-29 23:39:10.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-machine.rl 2013-02-15 11:42:32.000000000 +0000 @@ -103,7 +103,7 @@ 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 -Nru harfbuzz-0.9.11/src/hb-ot-shape-complex-indic-private.hh harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-private.hh --- harfbuzz-0.9.11/src/hb-ot-shape-complex-indic-private.hh 2012-11-23 20:30:42.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-private.hh 2013-02-14 15:59:57.000000000 +0000 @@ -34,11 +34,6 @@ #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: @@ -102,7 +97,7 @@ 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_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, @@ -150,239 +145,7 @@ 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 (u, 0x0951, 0x0954))) - cat = OT_VD; - - if (unlikely (u == 0x17D1)) - cat = OT_X; - if (cat == OT_X && - unlikely (hb_in_range (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; -} - - +HB_INTERNAL INDIC_TABLE_ELEMENT_TYPE +hb_indic_get_categories (hb_codepoint_t u); #endif /* HB_OT_SHAPE_COMPLEX_INDIC_PRIVATE_HH */ diff -Nru harfbuzz-0.9.11/src/hb-ot-shape-complex-indic-table.cc harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-table.cc --- harfbuzz-0.9.11/src/hb-ot-shape-complex-indic-table.cc 1970-01-01 00:00:00.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-table.cc 2013-02-14 15:59:57.000000000 +0000 @@ -0,0 +1,869 @@ +/* == Start of generated table == */ +/* + * The following table is generated by running: + * + * ./gen-indic-table.py IndicSyllabicCategory.txt IndicMatraCategory.txt Blocks.txt + * + * on files with these headers: + * + * # IndicSyllabicCategory-6.2.0.txt + * # Date: 2012-05-15, 21:12:00 GMT [KW] + * # IndicMatraCategory-6.2.0.txt + * # Date: 2012-05-15, 21:10:00 GMT [KW] + * # Blocks-6.2.0.txt + * # Date: 2012-05-14, 22:42:00 GMT [KW, LI] + */ + +#include "hb-ot-shape-complex-indic-private.hh" + + +#define ISC_A INDIC_SYLLABIC_CATEGORY_AVAGRAHA /* 11 chars; Avagraha */ +#define ISC_Bi INDIC_SYLLABIC_CATEGORY_BINDU /* 34 chars; Bindu */ +#define ISC_C INDIC_SYLLABIC_CATEGORY_CONSONANT /* 123 chars; Consonant */ +#define ISC_CD INDIC_SYLLABIC_CATEGORY_CONSONANT_DEAD /* 2 chars; Consonant_Dead */ +#define ISC_CF INDIC_SYLLABIC_CATEGORY_CONSONANT_FINAL /* 17 chars; Consonant_Final */ +#define ISC_CHL INDIC_SYLLABIC_CATEGORY_CONSONANT_HEAD_LETTER /* 1 chars; Consonant_Head_Letter */ +#define ISC_CM INDIC_SYLLABIC_CATEGORY_CONSONANT_MEDIAL /* 12 chars; Consonant_Medial */ +#define ISC_CP INDIC_SYLLABIC_CATEGORY_CONSONANT_PLACEHOLDER /* 4 chars; Consonant_Placeholder */ +#define ISC_CR INDIC_SYLLABIC_CATEGORY_CONSONANT_REPHA /* 5 chars; Consonant_Repha */ +#define ISC_CS INDIC_SYLLABIC_CATEGORY_CONSONANT_SUBJOINED /* 10 chars; Consonant_Subjoined */ +#define ISC_ML INDIC_SYLLABIC_CATEGORY_MODIFYING_LETTER /* 1 chars; Modifying_Letter */ +#define ISC_N INDIC_SYLLABIC_CATEGORY_NUKTA /* 12 chars; Nukta */ +#define ISC_x INDIC_SYLLABIC_CATEGORY_OTHER /* 1 chars; Other */ +#define ISC_RS INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER /* 1 chars; Register_Shifter */ +#define ISC_TL INDIC_SYLLABIC_CATEGORY_TONE_LETTER /* 3 chars; Tone_Letter */ +#define ISC_TM INDIC_SYLLABIC_CATEGORY_TONE_MARK /* 16 chars; Tone_Mark */ +#define ISC_V INDIC_SYLLABIC_CATEGORY_VIRAMA /* 34 chars; Virama */ +#define ISC_Vs INDIC_SYLLABIC_CATEGORY_VISARGA /* 25 chars; Visarga */ +#define ISC_Vo INDIC_SYLLABIC_CATEGORY_VOWEL /* 5 chars; Vowel */ +#define ISC_M INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT /* 165 chars; Vowel_Dependent */ +#define ISC_VI INDIC_SYLLABIC_CATEGORY_VOWEL_INDEPENDENT /* 59 chars; Vowel_Independent */ + +#define IMC_B INDIC_MATRA_CATEGORY_BOTTOM /* 65 chars; Bottom */ +#define IMC_BR INDIC_MATRA_CATEGORY_BOTTOM_AND_RIGHT /* 2 chars; Bottom_And_Right */ +#define IMC_I INDIC_MATRA_CATEGORY_INVISIBLE /* 6 chars; Invisible */ +#define IMC_L INDIC_MATRA_CATEGORY_LEFT /* 30 chars; Left */ +#define IMC_LR INDIC_MATRA_CATEGORY_LEFT_AND_RIGHT /* 8 chars; Left_And_Right */ +#define IMC_x INDIC_MATRA_CATEGORY_NOT_APPLICABLE /* 1 chars; Not_Applicable */ +#define IMC_O INDIC_MATRA_CATEGORY_OVERSTRUCK /* 2 chars; Overstruck */ +#define IMC_R INDIC_MATRA_CATEGORY_RIGHT /* 75 chars; Right */ +#define IMC_T INDIC_MATRA_CATEGORY_TOP /* 83 chars; Top */ +#define IMC_TB INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM /* 6 chars; Top_And_Bottom */ +#define IMC_TBR INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM_AND_RIGHT /* 1 chars; Top_And_Bottom_And_Right */ +#define IMC_TL INDIC_MATRA_CATEGORY_TOP_AND_LEFT /* 4 chars; Top_And_Left */ +#define IMC_TLR INDIC_MATRA_CATEGORY_TOP_AND_LEFT_AND_RIGHT /* 2 chars; Top_And_Left_And_Right */ +#define IMC_TR INDIC_MATRA_CATEGORY_TOP_AND_RIGHT /* 8 chars; Top_And_Right */ +#define IMC_VOL INDIC_MATRA_CATEGORY_VISUAL_ORDER_LEFT /* 5 chars; Visual_Order_Left */ + +#define _(S,M) INDIC_COMBINE_CATEGORIES (ISC_##S, IMC_##M) + + +static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { + + +#define indic_offset_0x0900 0 + + + /* Devanagari (0900..097F) */ + + /* 0900 */ _(Bi,x), _(Bi,x), _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 0908 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 0910 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), + /* 0918 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0920 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0928 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0930 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0938 */ _(C,x), _(C,x), _(M,T), _(M,R), _(N,x), _(A,x), _(M,R), _(M,L), + /* 0940 */ _(M,R), _(M,B), _(M,B), _(M,B), _(M,B), _(M,T), _(M,T), _(M,T), + /* 0948 */ _(M,T), _(M,R), _(M,R), _(M,R), _(M,R), _(V,B), _(M,L), _(M,R), + /* 0950 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,T), _(M,B), _(M,B), + /* 0958 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0960 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0968 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0970 */ _(x,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 0978 */ _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + + /* Bengali (0980..09FF) */ + + /* 0980 */ _(x,x), _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), + /* 0988 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(x,x), _(VI,x), + /* 0990 */ _(VI,x), _(x,x), _(x,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), + /* 0998 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 09A0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 09A8 */ _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 09B0 */ _(C,x), _(x,x), _(C,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), + /* 09B8 */ _(C,x), _(C,x), _(x,x), _(x,x), _(N,x), _(A,x), _(M,R), _(M,L), + /* 09C0 */ _(M,R), _(M,B), _(M,B), _(M,B), _(M,B), _(x,x), _(x,x), _(M,L), + /* 09C8 */ _(M,L), _(x,x), _(x,x), _(M,LR), _(M,LR), _(V,B), _(CD,x), _(x,x), + /* 09D0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,R), + /* 09D8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), + /* 09E0 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), + /* 09E8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 09F0 */ _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 09F8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Gurmukhi (0A00..0A7F) */ + + /* 0A00 */ _(x,x), _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), + /* 0A08 */ _(VI,x), _(VI,x), _(VI,x), _(x,x), _(x,x), _(x,x), _(x,x), _(VI,x), + /* 0A10 */ _(VI,x), _(x,x), _(x,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), + /* 0A18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0A20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0A28 */ _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0A30 */ _(C,x), _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(x,x), + /* 0A38 */ _(C,x), _(C,x), _(x,x), _(x,x), _(N,x), _(x,x), _(M,R), _(M,L), + /* 0A40 */ _(M,R), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), _(M,T), + /* 0A48 */ _(M,T), _(x,x), _(x,x), _(M,T), _(M,T), _(V,B), _(x,x), _(x,x), + /* 0A50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0A58 */ _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(x,x), + /* 0A60 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0A68 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0A70 */ _(Bi,x), _(x,x), _(CP,x), _(CP,x), _(x,x), _(CM,x), _(x,x), _(x,x), + /* 0A78 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Gujarati (0A80..0AFF) */ + + /* 0A80 */ _(x,x), _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), + /* 0A88 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(VI,x), + /* 0A90 */ _(VI,x), _(VI,x), _(x,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), + /* 0A98 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0AA0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0AA8 */ _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0AB0 */ _(C,x), _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), + /* 0AB8 */ _(C,x), _(C,x), _(x,x), _(x,x), _(N,x), _(A,x), _(M,R), _(M,L), + /* 0AC0 */ _(M,R), _(M,B), _(M,B), _(M,B), _(M,B), _(M,T), _(x,x), _(M,T), + /* 0AC8 */ _(M,T), _(M,TR), _(x,x), _(M,R), _(M,R), _(V,B), _(x,x), _(x,x), + /* 0AD0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0AD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0AE0 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0AE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0AF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0AF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Oriya (0B00..0B7F) */ + + /* 0B00 */ _(x,x), _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), + /* 0B08 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(x,x), _(VI,x), + /* 0B10 */ _(VI,x), _(x,x), _(x,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), + /* 0B18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0B20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0B28 */ _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0B30 */ _(C,x), _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), + /* 0B38 */ _(C,x), _(C,x), _(x,x), _(x,x), _(N,x), _(A,x), _(M,R), _(M,T), + /* 0B40 */ _(M,R), _(M,B), _(M,B), _(M,B), _(M,B), _(x,x), _(x,x), _(M,L), + /* 0B48 */ _(M,TL), _(x,x), _(x,x), _(M,LR),_(M,TLR), _(V,B), _(x,x), _(x,x), + /* 0B50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,T), _(M,TR), + /* 0B58 */ _(x,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), + /* 0B60 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0B68 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0B70 */ _(x,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0B78 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Tamil (0B80..0BFF) */ + + /* 0B80 */ _(x,x), _(x,x), _(Bi,x), _(ML,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), + /* 0B88 */ _(VI,x), _(VI,x), _(VI,x), _(x,x), _(x,x), _(x,x), _(VI,x), _(VI,x), + /* 0B90 */ _(VI,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(x,x), _(x,x), + /* 0B98 */ _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), _(x,x), _(C,x), _(C,x), + /* 0BA0 */ _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), + /* 0BA8 */ _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), + /* 0BB0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0BB8 */ _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,R), _(M,R), + /* 0BC0 */ _(M,T), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(M,L), _(M,L), + /* 0BC8 */ _(M,L), _(x,x), _(M,LR), _(M,LR), _(M,LR), _(V,T), _(x,x), _(x,x), + /* 0BD0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,R), + /* 0BD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0BE0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0BE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0BF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0BF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Telugu (0C00..0C7F) */ + + /* 0C00 */ _(x,x), _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), + /* 0C08 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(VI,x), _(VI,x), + /* 0C10 */ _(VI,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), + /* 0C18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0C20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0C28 */ _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0C30 */ _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), + /* 0C38 */ _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(A,x), _(M,T), _(M,T), + /* 0C40 */ _(M,T), _(M,R), _(M,R), _(M,R), _(M,R), _(x,x), _(M,T), _(M,T), + /* 0C48 */ _(M,TB), _(x,x), _(M,T), _(M,T), _(M,T), _(V,T), _(x,x), _(x,x), + /* 0C50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,T), _(M,B), _(x,x), + /* 0C58 */ _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0C60 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0C68 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0C70 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0C78 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Kannada (0C80..0CFF) */ + + /* 0C80 */ _(x,x), _(x,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), + /* 0C88 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(VI,x), _(VI,x), + /* 0C90 */ _(VI,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), + /* 0C98 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0CA0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0CA8 */ _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0CB0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), + /* 0CB8 */ _(C,x), _(C,x), _(x,x), _(x,x), _(N,x), _(A,x), _(M,R), _(M,T), + /* 0CC0 */ _(M,TR), _(M,R), _(M,R), _(M,R), _(M,R), _(x,x), _(M,T), _(M,TR), + /* 0CC8 */ _(M,TR), _(x,x), _(M,TR), _(M,TR), _(M,T), _(V,T), _(x,x), _(x,x), + /* 0CD0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,R), _(M,R), _(x,x), + /* 0CD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(C,x), _(x,x), + /* 0CE0 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0CE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0CF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0CF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Malayalam (0D00..0D7F) */ + + /* 0D00 */ _(x,x), _(x,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), + /* 0D08 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(VI,x), _(VI,x), + /* 0D10 */ _(VI,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), + /* 0D18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0D20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0D28 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0D30 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0D38 */ _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(A,x), _(M,R), _(M,R), + /* 0D40 */ _(M,R), _(M,R), _(M,R), _(M,B), _(M,B), _(x,x), _(M,L), _(M,L), + /* 0D48 */ _(M,L), _(x,x), _(M,LR), _(M,LR), _(M,LR), _(V,T), _(CR,x), _(x,x), + /* 0D50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,R), + /* 0D58 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0D60 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0D68 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0D70 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0D78 */ _(x,x), _(x,x), _(CD,x), _(CD,x), _(CD,x), _(CD,x), _(CD,x), _(CD,x), + + /* Sinhala (0D80..0DFF) */ + + /* 0D80 */ _(x,x), _(x,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), + /* 0D88 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 0D90 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), + /* 0D98 */ _(x,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0DA0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0DA8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0DB0 */ _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0DB8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(x,x), _(x,x), + /* 0DC0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), + /* 0DC8 */ _(x,x), _(x,x), _(V,T), _(x,x), _(x,x), _(x,x), _(x,x), _(M,R), + /* 0DD0 */ _(M,R), _(M,R), _(M,T), _(M,T), _(M,B), _(x,x), _(M,B), _(x,x), + /* 0DD8 */ _(M,R), _(M,L), _(M,TL), _(M,L), _(M,LR), _(M,LR), _(M,LR), _(M,R), + /* 0DE0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0DE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0DF0 */ _(x,x), _(x,x), _(M,R), _(M,R), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0DF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Thai (0E00..0E7F) */ + + /* 0E00 */ _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0E08 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0E10 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0E18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0E20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0E28 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), + /* 0E30 */ _(M,R), _(M,T), _(M,R), _(M,R), _(M,T), _(M,T), _(M,T), _(M,T), + /* 0E38 */ _(M,B), _(M,B), _(V,B), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0E40 */_(M,VOL),_(M,VOL),_(M,VOL),_(M,VOL),_(M,VOL), _(M,R), _(x,x), _(M,T), + /* 0E48 */ _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(x,x), _(Bi,x), _(V,T), _(x,x), + /* 0E50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0E58 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0E60 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0E68 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0E70 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0E78 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Lao (0E80..0EFF) */ + + /* 0E80 */ _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), _(x,x), _(x,x), _(C,x), + /* 0E88 */ _(C,x), _(x,x), _(C,x), _(x,x), _(x,x), _(C,x), _(x,x), _(x,x), + /* 0E90 */ _(x,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0E98 */ _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0EA0 */ _(x,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(x,x), _(C,x), + /* 0EA8 */ _(x,x), _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(x,x), + /* 0EB0 */ _(M,R), _(M,T), _(M,R), _(M,R), _(M,T), _(M,T), _(M,T), _(M,T), + /* 0EB8 */ _(M,B), _(M,B), _(x,x), _(M,T), _(CM,x), _(CM,x), _(x,x), _(x,x), + /* 0EC0 */_(M,VOL),_(M,VOL),_(M,VOL),_(M,VOL),_(M,VOL), _(x,x), _(x,x), _(x,x), + /* 0EC8 */ _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(x,x), _(Bi,x), _(x,x), _(x,x), + /* 0ED0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0ED8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), _(x,x), _(x,x), + /* 0EE0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0EE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0EF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0EF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Tibetan (0F00..0FFF) */ + + /* 0F00 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0F08 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0F10 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0F18 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0F20 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0F28 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0F30 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0F38 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0F40 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0F48 */ _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0F50 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0F58 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0F60 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0F68 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), + /* 0F70 */ _(x,x), _(M,B), _(M,T), _(M,TB), _(M,B), _(M,B), _(M,TB), _(M,TB), + /* 0F78 */ _(M,TB), _(M,TB), _(M,T), _(M,T), _(M,T), _(M,T), _(Bi,x), _(Vs,x), + /* 0F80 */ _(M,T), _(M,TB), _(Bi,x), _(Bi,x), _(V,B), _(A,x), _(x,x), _(x,x), + /* 0F88 */_(CHL,x),_(CHL,x),_(CHL,x),_(CHL,x),_(CHL,x), _(CS,x), _(CS,x), _(CS,x), + /* 0F90 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), + /* 0F98 */ _(x,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), + /* 0FA0 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), + /* 0FA8 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), + /* 0FB0 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), + /* 0FB8 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(x,x), _(x,x), _(x,x), + /* 0FC0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0FC8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0FD0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0FD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0FE0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0FE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0FF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0FF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Myanmar (1000..109F) */ + + /* 1000 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1008 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1010 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1018 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1020 */ _(C,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 1028 */ _(VI,x), _(VI,x), _(VI,x), _(M,R), _(M,R), _(M,T), _(M,T), _(M,B), + /* 1030 */ _(M,B), _(M,L), _(M,T), _(M,T), _(M,T), _(M,T), _(Bi,x), _(TM,x), + /* 1038 */ _(Vs,x), _(V,I), _(V,T), _(CM,x), _(CM,x), _(CM,x), _(CM,x), _(C,x), + /* 1040 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1048 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1050 */ _(C,x), _(C,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(M,R), _(M,R), + /* 1058 */ _(M,B), _(M,B), _(C,x), _(C,x), _(C,x), _(C,x), _(CM,x), _(CM,x), + /* 1060 */ _(CM,x), _(C,x), _(M,R), _(TM,x), _(TM,x), _(C,x), _(C,x), _(M,R), + /* 1068 */ _(M,R), _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(C,x), _(C,x), + /* 1070 */ _(C,x), _(M,T), _(M,T), _(M,T), _(M,T), _(C,x), _(C,x), _(C,x), + /* 1078 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1080 */ _(C,x), _(C,x), _(CM,x), _(M,R), _(M,L), _(M,T), _(M,T), _(TM,x), + /* 1088 */ _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(C,x), _(TM,x), + /* 1090 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1098 */ _(x,x), _(x,x), _(TM,x), _(TM,x), _(M,R), _(M,T), _(x,x), _(x,x), + +#define indic_offset_0x1700 1952 + + + /* Tagalog (1700..171F) */ + + /* 1700 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1708 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), + /* 1710 */ _(C,x), _(C,x), _(M,T), _(M,B), _(V,B), _(x,x), _(x,x), _(x,x), + /* 1718 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Hanunoo (1720..173F) */ + + /* 1720 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1728 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1730 */ _(C,x), _(C,x), _(M,T), _(M,B), _(V,B), _(x,x), _(x,x), _(x,x), + /* 1738 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Buhid (1740..175F) */ + + /* 1740 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1748 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1750 */ _(C,x), _(C,x), _(M,T), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1758 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Tagbanwa (1760..177F) */ + + /* 1760 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1768 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), + /* 1770 */ _(C,x), _(x,x), _(M,T), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1778 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Khmer (1780..17FF) */ + + /* 1780 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1788 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1790 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1798 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 17A0 */ _(C,x), _(C,x), _(C,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 17A8 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 17B0 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(x,x), _(M,R), _(M,T), + /* 17B8 */ _(M,T), _(M,T), _(M,T), _(M,B), _(M,B), _(M,B), _(M,TL),_(M,TLR), + /* 17C0 */ _(M,LR), _(M,L), _(M,L), _(M,L), _(M,LR), _(M,LR), _(Bi,x), _(Vs,x), + /* 17C8 */ _(M,R), _(RS,x), _(RS,x), _(x,x), _(CR,x), _(x,x), _(x,x), _(x,x), + /* 17D0 */ _(x,x), _(V,T), _(V,I), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 17D8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(A,x), _(x,x), _(x,x), _(x,x), + /* 17E0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 17E8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 17F0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 17F8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + +#define indic_offset_0x1900 2208 + + + /* Limbu (1900..194F) */ + + /* 1900 */ _(CP,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1908 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1910 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1918 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), + /* 1920 */ _(M,T), _(M,T), _(M,B), _(M,R), _(M,R), _(M,TR), _(M,TR), _(M,T), + /* 1928 */ _(M,T), _(CS,x), _(CS,x), _(CS,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1930 */ _(CF,x), _(CF,x), _(Bi,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), + /* 1938 */ _(CF,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1940 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1948 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Tai Le (1950..197F) */ + + /* 1950 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1958 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1960 */ _(C,x), _(C,x), _(C,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), + /* 1968 */ _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(x,x), _(x,x), + /* 1970 */ _(TL,x), _(TL,x), _(TL,x), _(TL,x), _(TL,x), _(x,x), _(x,x), _(x,x), + /* 1978 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* New Tai Lue (1980..19DF) */ + + /* 1980 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1988 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1990 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1998 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 19A0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 19A8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 19B0 */ _(M,R), _(M,R), _(M,R), _(M,R), _(M,R), _(M,L), _(M,L), _(M,L), + /* 19B8 */ _(M,R), _(M,R), _(M,L), _(M,R), _(M,R), _(M,R), _(M,R), _(M,R), + /* 19C0 */ _(M,R), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), + /* 19C8 */ _(TM,x), _(TM,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 19D0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 19D8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* FILLER (19E0..19FF) */ + + /* 19E0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 19E8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 19F0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 19F8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Buginese (1A00..1A1F) */ + + /* 1A00 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1A08 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1A10 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(M,T), + /* 1A18 */ _(M,B), _(M,L), _(M,R), _(M,L), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Tai Tham (1A20..1AAF) */ + + /* 1A20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1A28 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1A30 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1A38 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1A40 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1A48 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(VI,x), _(VI,x), _(VI,x), + /* 1A50 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(CM,x), _(CM,x), _(CF,x), + /* 1A58 */ _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(x,x), + /* 1A60 */ _(V,I), _(M,R), _(M,T), _(M,R), _(M,R), _(M,T), _(M,T), _(M,T), + /* 1A68 */ _(M,T), _(M,B), _(M,B), _(M,T), _(M,B), _(M,R), _(M,L), _(M,L), + /* 1A70 */ _(M,L), _(M,L), _(M,L), _(M,T), _(M,T), _(TM,x), _(TM,x), _(TM,x), + /* 1A78 */ _(TM,x), _(TM,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1A80 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1A88 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1A90 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1A98 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1AA0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1AA8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + +#define indic_offset_0x1b00 2640 + + + /* Balinese (1B00..1B7F) */ + + /* 1B00 */ _(Bi,x), _(Bi,x), _(Bi,x), _(CR,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), + /* 1B08 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 1B10 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1B18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1B20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1B28 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1B30 */ _(C,x), _(C,x), _(C,x), _(C,x), _(N,x), _(M,R), _(M,T), _(M,T), + /* 1B38 */ _(M,B), _(M,B), _(M,B), _(M,BR), _(M,TB),_(M,TBR), _(M,L), _(M,L), + /* 1B40 */ _(M,LR), _(M,LR), _(M,T), _(M,TR), _(V,R), _(C,x), _(C,x), _(C,x), + /* 1B48 */ _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1B50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1B58 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1B60 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1B68 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1B70 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1B78 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Sundanese (1B80..1BBF) */ + + /* 1B80 */ _(Bi,x), _(CR,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 1B88 */ _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1B90 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1B98 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1BA0 */ _(C,x), _(CS,x), _(CS,x), _(CS,x), _(M,T), _(M,B), _(M,L), _(M,R), + /* 1BA8 */ _(M,T), _(M,T), _(V,R), _(V,x), _(CS,x), _(CS,x), _(C,x), _(C,x), + /* 1BB0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1BB8 */ _(x,x), _(x,x), _(A,x), _(C,x), _(C,x), _(C,x), _(CF,x), _(CF,x), + + /* Batak (1BC0..1BFF) */ + + /* 1BC0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1BC8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1BD0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1BD8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1BE0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(VI,x), _(VI,x), _(N,x), _(M,x), + /* 1BE8 */ _(M,x), _(M,x), _(M,x), _(M,x), _(M,x), _(M,x), _(M,x), _(M,x), + /* 1BF0 */ _(CF,x), _(CF,x), _(V,R), _(V,R), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1BF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Lepcha (1C00..1C4F) */ + + /* 1C00 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1C08 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1C10 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1C18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 1C20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(CS,x), _(CS,x), _(M,R), _(M,L), + /* 1C28 */ _(M,L), _(M,TL), _(M,R), _(M,R), _(M,B), _(CF,x), _(CF,x), _(CF,x), + /* 1C30 */ _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(Bi,x), _(Bi,x), _(x,x), _(N,x), + /* 1C38 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1C40 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1C48 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), _(C,x), + +#define indic_offset_0x1cd0 2976 + + + /* Vedic Extensions (1CD0..1CFF) */ + + /* 1CD0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1CD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1CE0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1CE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1CF0 */ _(x,x), _(x,x), _(Vs,x), _(Vs,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1CF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + +#define indic_offset_0xa800 3024 + + + /* Syloti Nagri (A800..A82F) */ + + /* A800 */ _(VI,x), _(VI,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), _(V,T), _(C,x), + /* A808 */ _(C,x), _(C,x), _(C,x), _(Bi,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A810 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A818 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A820 */ _(C,x), _(C,x), _(C,x), _(M,R), _(M,R), _(M,B), _(M,T), _(M,R), + /* A828 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* FILLER (A830..A83F) */ + + /* A830 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A838 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Phags-pa (A840..A87F) */ + + /* A840 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A848 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A850 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A858 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(Vo,x), _(Vo,x), + /* A860 */ _(Vo,x), _(Vo,x), _(C,x), _(C,x), _(C,x), _(C,x), _(Vo,x), _(CS,x), + /* A868 */ _(CS,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A870 */ _(C,x), _(CS,x), _(C,x), _(Bi,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A878 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Saurashtra (A880..A8DF) */ + + /* A880 */ _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* A888 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* A890 */ _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A898 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A8A0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A8A8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A8B0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(CF,x), _(M,R), _(M,R), _(M,R), + /* A8B8 */ _(M,R), _(M,R), _(M,R), _(M,R), _(M,R), _(M,R), _(M,R), _(M,R), + /* A8C0 */ _(M,R), _(M,R), _(M,R), _(M,R), _(V,B), _(x,x), _(x,x), _(x,x), + /* A8C8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A8D0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A8D8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* FILLER (A8E0..A8FF) */ + + /* A8E0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A8E8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A8F0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A8F8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Kayah Li (A900..A92F) */ + + /* A900 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A908 */ _(x,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A910 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A918 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A920 */ _(C,x), _(C,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), + /* A928 */ _(Vo,x), _(Vo,x), _(Vo,x), _(TM,x), _(TM,x), _(TM,x), _(x,x), _(x,x), + + /* Rejang (A930..A95F) */ + + /* A930 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A938 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A940 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(M,B), + /* A948 */ _(M,B), _(M,B), _(M,T), _(M,B), _(M,B), _(M,B), _(M,B), _(CF,x), + /* A950 */ _(CF,x), _(CF,x), _(CF,x), _(V,R), _(x,x), _(x,x), _(x,x), _(x,x), + /* A958 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* FILLER (A960..A97F) */ + + /* A960 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A968 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A970 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A978 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Javanese (A980..A9DF) */ + + /* A980 */ _(Bi,x), _(Bi,x), _(CR,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* A988 */ _(VI,x), _(C,x), _(C,x), _(C,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), + /* A990 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A998 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A9A0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A9A8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A9B0 */ _(C,x), _(C,x), _(C,x), _(N,x), _(M,R), _(M,R), _(M,T), _(M,T), + /* A9B8 */ _(M,B), _(M,B), _(M,L), _(M,L), _(M,T), _(CS,x), _(CM,x), _(CM,x), + /* A9C0 */ _(V,BR), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A9C8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A9D0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A9D8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* FILLER (A9E0..A9FF) */ + + /* A9E0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A9E8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A9F0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A9F8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Cham (AA00..AA5F) */ + + /* AA00 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), + /* AA08 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* AA10 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* AA18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* AA20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* AA28 */ _(C,x), _(M,T), _(M,T), _(M,T), _(M,T), _(M,B), _(M,T), _(M,L), + /* AA30 */ _(M,L), _(M,T), _(M,B), _(CM,x), _(CM,x), _(CM,x), _(CM,x), _(x,x), + /* AA38 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* AA40 */ _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), + /* AA48 */ _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(x,x), _(x,x), + /* AA50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* AA58 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Myanmar Extended-A (AA60..AA7F) */ + + /* AA60 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* AA68 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* AA70 */ _(x,x), _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* AA78 */ _(x,x), _(x,x), _(C,x), _(TM,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Tai Viet (AA80..AADF) */ + + /* AA80 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* AA88 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* AA90 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* AA98 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* AAA0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* AAA8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* AAB0 */ _(M,T), _(M,R), _(M,T), _(M,T), _(M,B),_(M,VOL),_(M,VOL), _(M,T), + /* AAB8 */ _(M,T),_(M,VOL), _(M,R),_(M,VOL),_(M,VOL), _(M,R), _(M,T), _(TM,x), + /* AAC0 */ _(TL,x), _(TM,x), _(TL,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* AAC8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* AAD0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* AAD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Meetei Mayek Extensions (AAE0..AAFF) */ + + /* AAE0 */ _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* AAE8 */ _(C,x), _(C,x), _(C,x), _(M,L), _(M,B), _(M,T), _(M,L), _(M,R), + /* AAF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(Vs,x), _(V,I), _(x,x), + /* AAF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + +#define indic_offset_0xabc0 3792 + + + /* Meetei Mayek (ABC0..ABFF) */ + + /* ABC0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* ABC8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(VI,x), _(VI,x), + /* ABD0 */ _(C,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* ABD8 */ _(C,x), _(C,x), _(C,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), + /* ABE0 */ _(CF,x), _(CF,x), _(CF,x), _(M,R), _(M,R), _(M,T), _(M,R), _(M,R), + /* ABE8 */ _(M,B), _(M,R), _(M,R), _(x,x), _(TM,x), _(V,B), _(x,x), _(x,x), + /* ABF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* ABF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + +#define indic_offset_0x10a00 3856 + + + /* Kharoshthi (10A00..10A5F) */ + + /* 10A00 */ _(C,x), _(M,O), _(M,B), _(M,B), _(x,x), _(M,T), _(M,O), _(x,x), + /* 10A08 */ _(x,x), _(x,x), _(x,x), _(x,x), _(M,B), _(x,x), _(Bi,x), _(Vs,x), + /* 10A10 */ _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), + /* 10A18 */ _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 10A20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 10A28 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 10A30 */ _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 10A38 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(V,I), + /* 10A40 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 10A48 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 10A50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 10A58 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + +#define indic_offset_0x11000 3952 + + + /* Brahmi (11000..1107F) */ + + /* 11000 */ _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), + /* 11008 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 11010 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11018 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11020 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11028 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11030 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11038 */ _(M,T), _(M,T), _(M,T), _(M,T), _(M,B), _(M,B), _(M,B), _(M,B), + /* 11040 */ _(M,B), _(M,B), _(M,T), _(M,T), _(M,T), _(M,T), _(V,T), _(x,x), + /* 11048 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 11050 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 11058 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 11060 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 11068 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 11070 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 11078 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Kaithi (11080..110CF) */ + + /* 11080 */ _(Bi,x), _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 11088 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), + /* 11090 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11098 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 110A0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 110A8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 110B0 */ _(M,R), _(M,L), _(M,R), _(M,B), _(M,B), _(M,T), _(M,T), _(M,R), + /* 110B8 */ _(M,R), _(V,B), _(N,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 110C0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 110C8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + +#define indic_offset_0x11100 4160 + + + /* Chakma (11100..1114F) */ + + /* 11100 */ _(Bi,x), _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), + /* 11108 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11110 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11118 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11120 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(M,T), + /* 11128 */ _(M,T), _(M,T), _(M,B), _(M,B), _(M,L), _(M,T), _(M,TB), _(M,TB), + /* 11130 */ _(M,T), _(M,B), _(M,B), _(V,I), _(V,T), _(x,x), _(x,x), _(x,x), + /* 11138 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 11140 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 11148 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + +#define indic_offset_0x11180 4240 + + + /* Sharada (11180..111DF) */ + + /* 11180 */ _(Bi,x), _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 11188 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 11190 */ _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11198 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 111A0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 111A8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 111B0 */ _(C,x), _(C,x), _(C,x), _(M,R), _(M,L), _(M,R), _(M,B), _(M,B), + /* 111B8 */ _(M,B), _(M,B), _(M,B), _(M,B), _(M,T), _(M,T), _(M,T), _(M,TR), + /* 111C0 */ _(V,R), _(A,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 111C8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 111D0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 111D8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + +#define indic_offset_0x11680 4336 + + + /* Takri (11680..116CF) */ + + /* 11680 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 11688 */ _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11690 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11698 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 116A0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 116A8 */ _(C,x), _(C,x), _(C,x), _(Bi,x), _(Vs,x), _(M,T), _(M,L), _(M,R), + /* 116B0 */ _(M,B), _(M,B), _(M,T), _(M,T), _(M,T), _(M,T), _(V,T), _(N,x), + /* 116B8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 116C0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 116C8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + +#define indic_offset_total 4416 + +}; /* Table occupancy: 60% */ + +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]; + if (0x1900 <= u && u <= 0x1AB0) return indic_table[u - 0x1900 + indic_offset_0x1900]; + if (0x1B00 <= u && u <= 0x1C50) return indic_table[u - 0x1B00 + indic_offset_0x1b00]; + if (0x1CD0 <= u && u <= 0x1D00) return indic_table[u - 0x1CD0 + indic_offset_0x1cd0]; + if (0xA800 <= u && u <= 0xAB00) return indic_table[u - 0xA800 + indic_offset_0xa800]; + if (0xABC0 <= u && u <= 0xAC00) return indic_table[u - 0xABC0 + indic_offset_0xabc0]; + if (0x10A00 <= u && u <= 0x10A60) return indic_table[u - 0x10A00 + indic_offset_0x10a00]; + if (0x11000 <= u && u <= 0x110D0) return indic_table[u - 0x11000 + indic_offset_0x11000]; + if (0x11100 <= u && u <= 0x11150) return indic_table[u - 0x11100 + indic_offset_0x11100]; + if (0x11180 <= u && u <= 0x111E0) return indic_table[u - 0x11180 + indic_offset_0x11180]; + if (0x11680 <= u && u <= 0x116D0) return indic_table[u - 0x11680 + indic_offset_0x11680]; + if (unlikely (u == 0x00A0)) return _(CP,x); + if (unlikely (u == 0x25CC)) return _(CP,x); + return _(x,x); +} + +#undef _ + +#undef ISC_A +#undef ISC_Bi +#undef ISC_C +#undef ISC_CD +#undef ISC_CF +#undef ISC_CHL +#undef ISC_CM +#undef ISC_CP +#undef ISC_CR +#undef ISC_CS +#undef ISC_ML +#undef ISC_N +#undef ISC_x +#undef ISC_RS +#undef ISC_TL +#undef ISC_TM +#undef ISC_V +#undef ISC_Vs +#undef ISC_Vo +#undef ISC_M +#undef ISC_VI + +#undef IMC_B +#undef IMC_BR +#undef IMC_I +#undef IMC_L +#undef IMC_LR +#undef IMC_x +#undef IMC_O +#undef IMC_R +#undef IMC_T +#undef IMC_TB +#undef IMC_TBR +#undef IMC_TL +#undef IMC_TLR +#undef IMC_TR +#undef IMC_VOL + +/* == End of generated table == */ diff -Nru harfbuzz-0.9.11/src/hb-ot-shape-complex-indic-table.hh harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-table.hh --- harfbuzz-0.9.11/src/hb-ot-shape-complex-indic-table.hh 2012-12-02 17:14:19.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-complex-indic-table.hh 1970-01-01 00:00:00.000000000 +0000 @@ -1,872 +0,0 @@ -/* == Start of generated table == */ -/* - * The following table is generated by running: - * - * ./gen-indic-table.py IndicSyllabicCategory.txt IndicMatraCategory.txt Blocks.txt - * - * on files with these headers: - * - * # IndicSyllabicCategory-6.2.0.txt - * # Date: 2012-05-15, 21:12:00 GMT [KW] - * # IndicMatraCategory-6.2.0.txt - * # Date: 2012-05-15, 21:10:00 GMT [KW] - * # Blocks-6.2.0.txt - * # 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 - - -#define ISC_A INDIC_SYLLABIC_CATEGORY_AVAGRAHA /* 11 chars; Avagraha */ -#define ISC_Bi INDIC_SYLLABIC_CATEGORY_BINDU /* 34 chars; Bindu */ -#define ISC_C INDIC_SYLLABIC_CATEGORY_CONSONANT /* 123 chars; Consonant */ -#define ISC_CD INDIC_SYLLABIC_CATEGORY_CONSONANT_DEAD /* 2 chars; Consonant_Dead */ -#define ISC_CF INDIC_SYLLABIC_CATEGORY_CONSONANT_FINAL /* 17 chars; Consonant_Final */ -#define ISC_CHL INDIC_SYLLABIC_CATEGORY_CONSONANT_HEAD_LETTER /* 1 chars; Consonant_Head_Letter */ -#define ISC_CM INDIC_SYLLABIC_CATEGORY_CONSONANT_MEDIAL /* 12 chars; Consonant_Medial */ -#define ISC_CP INDIC_SYLLABIC_CATEGORY_CONSONANT_PLACEHOLDER /* 4 chars; Consonant_Placeholder */ -#define ISC_CR INDIC_SYLLABIC_CATEGORY_CONSONANT_REPHA /* 5 chars; Consonant_Repha */ -#define ISC_CS INDIC_SYLLABIC_CATEGORY_CONSONANT_SUBJOINED /* 10 chars; Consonant_Subjoined */ -#define ISC_ML INDIC_SYLLABIC_CATEGORY_MODIFYING_LETTER /* 1 chars; Modifying_Letter */ -#define ISC_N INDIC_SYLLABIC_CATEGORY_NUKTA /* 12 chars; Nukta */ -#define ISC_x INDIC_SYLLABIC_CATEGORY_OTHER /* 1 chars; Other */ -#define ISC_RS INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER /* 1 chars; Register_Shifter */ -#define ISC_TL INDIC_SYLLABIC_CATEGORY_TONE_LETTER /* 3 chars; Tone_Letter */ -#define ISC_TM INDIC_SYLLABIC_CATEGORY_TONE_MARK /* 16 chars; Tone_Mark */ -#define ISC_V INDIC_SYLLABIC_CATEGORY_VIRAMA /* 34 chars; Virama */ -#define ISC_Vs INDIC_SYLLABIC_CATEGORY_VISARGA /* 25 chars; Visarga */ -#define ISC_Vo INDIC_SYLLABIC_CATEGORY_VOWEL /* 5 chars; Vowel */ -#define ISC_M INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT /* 165 chars; Vowel_Dependent */ -#define ISC_VI INDIC_SYLLABIC_CATEGORY_VOWEL_INDEPENDENT /* 59 chars; Vowel_Independent */ - -#define IMC_B INDIC_MATRA_CATEGORY_BOTTOM /* 65 chars; Bottom */ -#define IMC_BR INDIC_MATRA_CATEGORY_BOTTOM_AND_RIGHT /* 2 chars; Bottom_And_Right */ -#define IMC_I INDIC_MATRA_CATEGORY_INVISIBLE /* 6 chars; Invisible */ -#define IMC_L INDIC_MATRA_CATEGORY_LEFT /* 30 chars; Left */ -#define IMC_LR INDIC_MATRA_CATEGORY_LEFT_AND_RIGHT /* 8 chars; Left_And_Right */ -#define IMC_x INDIC_MATRA_CATEGORY_NOT_APPLICABLE /* 1 chars; Not_Applicable */ -#define IMC_O INDIC_MATRA_CATEGORY_OVERSTRUCK /* 2 chars; Overstruck */ -#define IMC_R INDIC_MATRA_CATEGORY_RIGHT /* 75 chars; Right */ -#define IMC_T INDIC_MATRA_CATEGORY_TOP /* 83 chars; Top */ -#define IMC_TB INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM /* 6 chars; Top_And_Bottom */ -#define IMC_TBR INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM_AND_RIGHT /* 1 chars; Top_And_Bottom_And_Right */ -#define IMC_TL INDIC_MATRA_CATEGORY_TOP_AND_LEFT /* 4 chars; Top_And_Left */ -#define IMC_TLR INDIC_MATRA_CATEGORY_TOP_AND_LEFT_AND_RIGHT /* 2 chars; Top_And_Left_And_Right */ -#define IMC_TR INDIC_MATRA_CATEGORY_TOP_AND_RIGHT /* 8 chars; Top_And_Right */ -#define IMC_VOL INDIC_MATRA_CATEGORY_VISUAL_ORDER_LEFT /* 5 chars; Visual_Order_Left */ - -#define _(S,M) INDIC_COMBINE_CATEGORIES (ISC_##S, IMC_##M) - - -static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { - - -#define indic_offset_0x0900 0 - - - /* Devanagari (0900..097F) */ - - /* 0900 */ _(Bi,x), _(Bi,x), _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), - /* 0908 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), - /* 0910 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), - /* 0918 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0920 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0928 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0930 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0938 */ _(C,x), _(C,x), _(M,T), _(M,R), _(N,x), _(A,x), _(M,R), _(M,L), - /* 0940 */ _(M,R), _(M,B), _(M,B), _(M,B), _(M,B), _(M,T), _(M,T), _(M,T), - /* 0948 */ _(M,T), _(M,R), _(M,R), _(M,R), _(M,R), _(V,B), _(M,L), _(M,R), - /* 0950 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,T), _(M,B), _(M,B), - /* 0958 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0960 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0968 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0970 */ _(x,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), - /* 0978 */ _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - - /* Bengali (0980..09FF) */ - - /* 0980 */ _(x,x), _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), - /* 0988 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(x,x), _(VI,x), - /* 0990 */ _(VI,x), _(x,x), _(x,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), - /* 0998 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 09A0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 09A8 */ _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 09B0 */ _(C,x), _(x,x), _(C,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), - /* 09B8 */ _(C,x), _(C,x), _(x,x), _(x,x), _(N,x), _(A,x), _(M,R), _(M,L), - /* 09C0 */ _(M,R), _(M,B), _(M,B), _(M,B), _(M,B), _(x,x), _(x,x), _(M,L), - /* 09C8 */ _(M,L), _(x,x), _(x,x), _(M,LR), _(M,LR), _(V,B), _(CD,x), _(x,x), - /* 09D0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,R), - /* 09D8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), - /* 09E0 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), - /* 09E8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 09F0 */ _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 09F8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Gurmukhi (0A00..0A7F) */ - - /* 0A00 */ _(x,x), _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), - /* 0A08 */ _(VI,x), _(VI,x), _(VI,x), _(x,x), _(x,x), _(x,x), _(x,x), _(VI,x), - /* 0A10 */ _(VI,x), _(x,x), _(x,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), - /* 0A18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0A20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0A28 */ _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0A30 */ _(C,x), _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(x,x), - /* 0A38 */ _(C,x), _(C,x), _(x,x), _(x,x), _(N,x), _(x,x), _(M,R), _(M,L), - /* 0A40 */ _(M,R), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), _(M,T), - /* 0A48 */ _(M,T), _(x,x), _(x,x), _(M,T), _(M,T), _(V,B), _(x,x), _(x,x), - /* 0A50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0A58 */ _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(x,x), - /* 0A60 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0A68 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0A70 */ _(Bi,x), _(x,x), _(CP,x), _(CP,x), _(x,x), _(CM,x), _(x,x), _(x,x), - /* 0A78 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Gujarati (0A80..0AFF) */ - - /* 0A80 */ _(x,x), _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), - /* 0A88 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(VI,x), - /* 0A90 */ _(VI,x), _(VI,x), _(x,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), - /* 0A98 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0AA0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0AA8 */ _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0AB0 */ _(C,x), _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), - /* 0AB8 */ _(C,x), _(C,x), _(x,x), _(x,x), _(N,x), _(A,x), _(M,R), _(M,L), - /* 0AC0 */ _(M,R), _(M,B), _(M,B), _(M,B), _(M,B), _(M,T), _(x,x), _(M,T), - /* 0AC8 */ _(M,T), _(M,TR), _(x,x), _(M,R), _(M,R), _(V,B), _(x,x), _(x,x), - /* 0AD0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0AD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0AE0 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0AE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0AF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0AF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Oriya (0B00..0B7F) */ - - /* 0B00 */ _(x,x), _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), - /* 0B08 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(x,x), _(VI,x), - /* 0B10 */ _(VI,x), _(x,x), _(x,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), - /* 0B18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0B20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0B28 */ _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0B30 */ _(C,x), _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), - /* 0B38 */ _(C,x), _(C,x), _(x,x), _(x,x), _(N,x), _(A,x), _(M,R), _(M,T), - /* 0B40 */ _(M,R), _(M,B), _(M,B), _(M,B), _(M,B), _(x,x), _(x,x), _(M,L), - /* 0B48 */ _(M,TL), _(x,x), _(x,x), _(M,LR),_(M,TLR), _(V,B), _(x,x), _(x,x), - /* 0B50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,T), _(M,TR), - /* 0B58 */ _(x,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), - /* 0B60 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0B68 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0B70 */ _(x,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0B78 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Tamil (0B80..0BFF) */ - - /* 0B80 */ _(x,x), _(x,x), _(Bi,x), _(ML,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), - /* 0B88 */ _(VI,x), _(VI,x), _(VI,x), _(x,x), _(x,x), _(x,x), _(VI,x), _(VI,x), - /* 0B90 */ _(VI,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(x,x), _(x,x), - /* 0B98 */ _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), _(x,x), _(C,x), _(C,x), - /* 0BA0 */ _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), - /* 0BA8 */ _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), - /* 0BB0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0BB8 */ _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,R), _(M,R), - /* 0BC0 */ _(M,T), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(M,L), _(M,L), - /* 0BC8 */ _(M,L), _(x,x), _(M,LR), _(M,LR), _(M,LR), _(V,T), _(x,x), _(x,x), - /* 0BD0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,R), - /* 0BD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0BE0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0BE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0BF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0BF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Telugu (0C00..0C7F) */ - - /* 0C00 */ _(x,x), _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), - /* 0C08 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(VI,x), _(VI,x), - /* 0C10 */ _(VI,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), - /* 0C18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0C20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0C28 */ _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0C30 */ _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), - /* 0C38 */ _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(A,x), _(M,T), _(M,T), - /* 0C40 */ _(M,T), _(M,R), _(M,R), _(M,R), _(M,R), _(x,x), _(M,T), _(M,T), - /* 0C48 */ _(M,TB), _(x,x), _(M,T), _(M,T), _(M,T), _(V,T), _(x,x), _(x,x), - /* 0C50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,T), _(M,B), _(x,x), - /* 0C58 */ _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0C60 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0C68 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0C70 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0C78 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Kannada (0C80..0CFF) */ - - /* 0C80 */ _(x,x), _(x,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), - /* 0C88 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(VI,x), _(VI,x), - /* 0C90 */ _(VI,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), - /* 0C98 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0CA0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0CA8 */ _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0CB0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), - /* 0CB8 */ _(C,x), _(C,x), _(x,x), _(x,x), _(N,x), _(A,x), _(M,R), _(M,T), - /* 0CC0 */ _(M,TR), _(M,R), _(M,R), _(M,R), _(M,R), _(x,x), _(M,T), _(M,TR), - /* 0CC8 */ _(M,TR), _(x,x), _(M,TR), _(M,TR), _(M,T), _(V,T), _(x,x), _(x,x), - /* 0CD0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,R), _(M,R), _(x,x), - /* 0CD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(C,x), _(x,x), - /* 0CE0 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0CE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0CF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0CF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Malayalam (0D00..0D7F) */ - - /* 0D00 */ _(x,x), _(x,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), - /* 0D08 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(VI,x), _(VI,x), - /* 0D10 */ _(VI,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), - /* 0D18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0D20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0D28 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0D30 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0D38 */ _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(A,x), _(M,R), _(M,R), - /* 0D40 */ _(M,R), _(M,R), _(M,R), _(M,B), _(M,B), _(x,x), _(M,L), _(M,L), - /* 0D48 */ _(M,L), _(x,x), _(M,LR), _(M,LR), _(M,LR), _(V,T), _(CR,x), _(x,x), - /* 0D50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,R), - /* 0D58 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0D60 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0D68 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0D70 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0D78 */ _(x,x), _(x,x), _(CD,x), _(CD,x), _(CD,x), _(CD,x), _(CD,x), _(CD,x), - - /* Sinhala (0D80..0DFF) */ - - /* 0D80 */ _(x,x), _(x,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), - /* 0D88 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), - /* 0D90 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), - /* 0D98 */ _(x,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0DA0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0DA8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0DB0 */ _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0DB8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(x,x), _(x,x), - /* 0DC0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), - /* 0DC8 */ _(x,x), _(x,x), _(V,T), _(x,x), _(x,x), _(x,x), _(x,x), _(M,R), - /* 0DD0 */ _(M,R), _(M,R), _(M,T), _(M,T), _(M,B), _(x,x), _(M,B), _(x,x), - /* 0DD8 */ _(M,R), _(M,L), _(M,TL), _(M,L), _(M,LR), _(M,LR), _(M,LR), _(M,R), - /* 0DE0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0DE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0DF0 */ _(x,x), _(x,x), _(M,R), _(M,R), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0DF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Thai (0E00..0E7F) */ - - /* 0E00 */ _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0E08 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0E10 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0E18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0E20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0E28 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), - /* 0E30 */ _(M,R), _(M,T), _(M,R), _(M,R), _(M,T), _(M,T), _(M,T), _(M,T), - /* 0E38 */ _(M,B), _(M,B), _(V,B), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0E40 */_(M,VOL),_(M,VOL),_(M,VOL),_(M,VOL),_(M,VOL), _(M,R), _(x,x), _(M,T), - /* 0E48 */ _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(x,x), _(Bi,x), _(V,T), _(x,x), - /* 0E50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0E58 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0E60 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0E68 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0E70 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0E78 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Lao (0E80..0EFF) */ - - /* 0E80 */ _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), _(x,x), _(x,x), _(C,x), - /* 0E88 */ _(C,x), _(x,x), _(C,x), _(x,x), _(x,x), _(C,x), _(x,x), _(x,x), - /* 0E90 */ _(x,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0E98 */ _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0EA0 */ _(x,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(x,x), _(C,x), - /* 0EA8 */ _(x,x), _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(x,x), - /* 0EB0 */ _(M,R), _(M,T), _(M,R), _(M,R), _(M,T), _(M,T), _(M,T), _(M,T), - /* 0EB8 */ _(M,B), _(M,B), _(x,x), _(M,T), _(CM,x), _(CM,x), _(x,x), _(x,x), - /* 0EC0 */_(M,VOL),_(M,VOL),_(M,VOL),_(M,VOL),_(M,VOL), _(x,x), _(x,x), _(x,x), - /* 0EC8 */ _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(x,x), _(Bi,x), _(x,x), _(x,x), - /* 0ED0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0ED8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), _(x,x), _(x,x), - /* 0EE0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0EE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0EF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0EF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Tibetan (0F00..0FFF) */ - - /* 0F00 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0F08 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0F10 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0F18 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0F20 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0F28 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0F30 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0F38 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0F40 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0F48 */ _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0F50 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0F58 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0F60 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0F68 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), - /* 0F70 */ _(x,x), _(M,B), _(M,T), _(M,TB), _(M,B), _(M,B), _(M,TB), _(M,TB), - /* 0F78 */ _(M,TB), _(M,TB), _(M,T), _(M,T), _(M,T), _(M,T), _(Bi,x), _(Vs,x), - /* 0F80 */ _(M,T), _(M,TB), _(Bi,x), _(Bi,x), _(V,B), _(A,x), _(x,x), _(x,x), - /* 0F88 */_(CHL,x),_(CHL,x),_(CHL,x),_(CHL,x),_(CHL,x), _(CS,x), _(CS,x), _(CS,x), - /* 0F90 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), - /* 0F98 */ _(x,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), - /* 0FA0 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), - /* 0FA8 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), - /* 0FB0 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), - /* 0FB8 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(x,x), _(x,x), _(x,x), - /* 0FC0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0FC8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0FD0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0FD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0FE0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0FE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0FF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0FF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Myanmar (1000..109F) */ - - /* 1000 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1008 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1010 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1018 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1020 */ _(C,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), - /* 1028 */ _(VI,x), _(VI,x), _(VI,x), _(M,R), _(M,R), _(M,T), _(M,T), _(M,B), - /* 1030 */ _(M,B), _(M,L), _(M,T), _(M,T), _(M,T), _(M,T), _(Bi,x), _(TM,x), - /* 1038 */ _(Vs,x), _(V,I), _(V,T), _(CM,x), _(CM,x), _(CM,x), _(CM,x), _(C,x), - /* 1040 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1048 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1050 */ _(C,x), _(C,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(M,R), _(M,R), - /* 1058 */ _(M,B), _(M,B), _(C,x), _(C,x), _(C,x), _(C,x), _(CM,x), _(CM,x), - /* 1060 */ _(CM,x), _(C,x), _(M,R), _(TM,x), _(TM,x), _(C,x), _(C,x), _(M,R), - /* 1068 */ _(M,R), _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(C,x), _(C,x), - /* 1070 */ _(C,x), _(M,T), _(M,T), _(M,T), _(M,T), _(C,x), _(C,x), _(C,x), - /* 1078 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1080 */ _(C,x), _(C,x), _(CM,x), _(M,R), _(M,L), _(M,T), _(M,T), _(TM,x), - /* 1088 */ _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(C,x), _(TM,x), - /* 1090 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1098 */ _(x,x), _(x,x), _(TM,x), _(TM,x), _(M,R), _(M,T), _(x,x), _(x,x), - -#define indic_offset_0x1700 1952 - - - /* Tagalog (1700..171F) */ - - /* 1700 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1708 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), - /* 1710 */ _(C,x), _(C,x), _(M,T), _(M,B), _(V,B), _(x,x), _(x,x), _(x,x), - /* 1718 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Hanunoo (1720..173F) */ - - /* 1720 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1728 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1730 */ _(C,x), _(C,x), _(M,T), _(M,B), _(V,B), _(x,x), _(x,x), _(x,x), - /* 1738 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Buhid (1740..175F) */ - - /* 1740 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1748 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1750 */ _(C,x), _(C,x), _(M,T), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1758 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Tagbanwa (1760..177F) */ - - /* 1760 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1768 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), - /* 1770 */ _(C,x), _(x,x), _(M,T), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1778 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Khmer (1780..17FF) */ - - /* 1780 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1788 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1790 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1798 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 17A0 */ _(C,x), _(C,x), _(C,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), - /* 17A8 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), - /* 17B0 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(x,x), _(M,R), _(M,T), - /* 17B8 */ _(M,T), _(M,T), _(M,T), _(M,B), _(M,B), _(M,B), _(M,TL),_(M,TLR), - /* 17C0 */ _(M,LR), _(M,L), _(M,L), _(M,L), _(M,LR), _(M,LR), _(Bi,x), _(Vs,x), - /* 17C8 */ _(M,R), _(RS,x), _(RS,x), _(x,x), _(CR,x), _(x,x), _(x,x), _(x,x), - /* 17D0 */ _(x,x), _(V,T), _(V,I), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 17D8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(A,x), _(x,x), _(x,x), _(x,x), - /* 17E0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 17E8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 17F0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 17F8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - -#define indic_offset_0x1900 2208 - - - /* Limbu (1900..194F) */ - - /* 1900 */ _(CP,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1908 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1910 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1918 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), - /* 1920 */ _(M,T), _(M,T), _(M,B), _(M,R), _(M,R), _(M,TR), _(M,TR), _(M,T), - /* 1928 */ _(M,T), _(CS,x), _(CS,x), _(CS,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1930 */ _(CF,x), _(CF,x), _(Bi,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), - /* 1938 */ _(CF,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1940 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1948 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Tai Le (1950..197F) */ - - /* 1950 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1958 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1960 */ _(C,x), _(C,x), _(C,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), - /* 1968 */ _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(x,x), _(x,x), - /* 1970 */ _(TL,x), _(TL,x), _(TL,x), _(TL,x), _(TL,x), _(x,x), _(x,x), _(x,x), - /* 1978 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* New Tai Lue (1980..19DF) */ - - /* 1980 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1988 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1990 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1998 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 19A0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 19A8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 19B0 */ _(M,R), _(M,R), _(M,R), _(M,R), _(M,R), _(M,L), _(M,L), _(M,L), - /* 19B8 */ _(M,R), _(M,R), _(M,L), _(M,R), _(M,R), _(M,R), _(M,R), _(M,R), - /* 19C0 */ _(M,R), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), - /* 19C8 */ _(TM,x), _(TM,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 19D0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 19D8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* FILLER (19E0..19FF) */ - - /* 19E0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 19E8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 19F0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 19F8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Buginese (1A00..1A1F) */ - - /* 1A00 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1A08 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1A10 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(M,T), - /* 1A18 */ _(M,B), _(M,L), _(M,R), _(M,L), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Tai Tham (1A20..1AAF) */ - - /* 1A20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1A28 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1A30 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1A38 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1A40 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1A48 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(VI,x), _(VI,x), _(VI,x), - /* 1A50 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(CM,x), _(CM,x), _(CF,x), - /* 1A58 */ _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(x,x), - /* 1A60 */ _(V,I), _(M,R), _(M,T), _(M,R), _(M,R), _(M,T), _(M,T), _(M,T), - /* 1A68 */ _(M,T), _(M,B), _(M,B), _(M,T), _(M,B), _(M,R), _(M,L), _(M,L), - /* 1A70 */ _(M,L), _(M,L), _(M,L), _(M,T), _(M,T), _(TM,x), _(TM,x), _(TM,x), - /* 1A78 */ _(TM,x), _(TM,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1A80 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1A88 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1A90 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1A98 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1AA0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1AA8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - -#define indic_offset_0x1b00 2640 - - - /* Balinese (1B00..1B7F) */ - - /* 1B00 */ _(Bi,x), _(Bi,x), _(Bi,x), _(CR,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), - /* 1B08 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), - /* 1B10 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1B18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1B20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1B28 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1B30 */ _(C,x), _(C,x), _(C,x), _(C,x), _(N,x), _(M,R), _(M,T), _(M,T), - /* 1B38 */ _(M,B), _(M,B), _(M,B), _(M,BR), _(M,TB),_(M,TBR), _(M,L), _(M,L), - /* 1B40 */ _(M,LR), _(M,LR), _(M,T), _(M,TR), _(V,R), _(C,x), _(C,x), _(C,x), - /* 1B48 */ _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1B50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1B58 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1B60 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1B68 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1B70 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1B78 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Sundanese (1B80..1BBF) */ - - /* 1B80 */ _(Bi,x), _(CR,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), - /* 1B88 */ _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1B90 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1B98 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1BA0 */ _(C,x), _(CS,x), _(CS,x), _(CS,x), _(M,T), _(M,B), _(M,L), _(M,R), - /* 1BA8 */ _(M,T), _(M,T), _(V,R), _(V,x), _(CS,x), _(CS,x), _(C,x), _(C,x), - /* 1BB0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1BB8 */ _(x,x), _(x,x), _(A,x), _(C,x), _(C,x), _(C,x), _(CF,x), _(CF,x), - - /* Batak (1BC0..1BFF) */ - - /* 1BC0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1BC8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1BD0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1BD8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1BE0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(VI,x), _(VI,x), _(N,x), _(M,x), - /* 1BE8 */ _(M,x), _(M,x), _(M,x), _(M,x), _(M,x), _(M,x), _(M,x), _(M,x), - /* 1BF0 */ _(CF,x), _(CF,x), _(V,R), _(V,R), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1BF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Lepcha (1C00..1C4F) */ - - /* 1C00 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1C08 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1C10 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1C18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1C20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(CS,x), _(CS,x), _(M,R), _(M,L), - /* 1C28 */ _(M,L), _(M,TL), _(M,R), _(M,R), _(M,B), _(CF,x), _(CF,x), _(CF,x), - /* 1C30 */ _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(Bi,x), _(Bi,x), _(x,x), _(N,x), - /* 1C38 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1C40 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1C48 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), _(C,x), - -#define indic_offset_0x1cd0 2976 - - - /* Vedic Extensions (1CD0..1CFF) */ - - /* 1CD0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1CD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1CE0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1CE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1CF0 */ _(x,x), _(x,x), _(Vs,x), _(Vs,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1CF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - -#define indic_offset_0xa800 3024 - - - /* Syloti Nagri (A800..A82F) */ - - /* A800 */ _(VI,x), _(VI,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), _(V,T), _(C,x), - /* A808 */ _(C,x), _(C,x), _(C,x), _(Bi,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A810 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A818 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A820 */ _(C,x), _(C,x), _(C,x), _(M,R), _(M,R), _(M,B), _(M,T), _(M,R), - /* A828 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* FILLER (A830..A83F) */ - - /* A830 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A838 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Phags-pa (A840..A87F) */ - - /* A840 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A848 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A850 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A858 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(Vo,x), _(Vo,x), - /* A860 */ _(Vo,x), _(Vo,x), _(C,x), _(C,x), _(C,x), _(C,x), _(Vo,x), _(CS,x), - /* A868 */ _(CS,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A870 */ _(C,x), _(CS,x), _(C,x), _(Bi,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A878 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Saurashtra (A880..A8DF) */ - - /* A880 */ _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), - /* A888 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), - /* A890 */ _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A898 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A8A0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A8A8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A8B0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(CF,x), _(M,R), _(M,R), _(M,R), - /* A8B8 */ _(M,R), _(M,R), _(M,R), _(M,R), _(M,R), _(M,R), _(M,R), _(M,R), - /* A8C0 */ _(M,R), _(M,R), _(M,R), _(M,R), _(V,B), _(x,x), _(x,x), _(x,x), - /* A8C8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A8D0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A8D8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* FILLER (A8E0..A8FF) */ - - /* A8E0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A8E8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A8F0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A8F8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Kayah Li (A900..A92F) */ - - /* A900 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A908 */ _(x,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A910 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A918 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A920 */ _(C,x), _(C,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), - /* A928 */ _(Vo,x), _(Vo,x), _(Vo,x), _(TM,x), _(TM,x), _(TM,x), _(x,x), _(x,x), - - /* Rejang (A930..A95F) */ - - /* A930 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A938 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A940 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(M,B), - /* A948 */ _(M,B), _(M,B), _(M,T), _(M,B), _(M,B), _(M,B), _(M,B), _(CF,x), - /* A950 */ _(CF,x), _(CF,x), _(CF,x), _(V,R), _(x,x), _(x,x), _(x,x), _(x,x), - /* A958 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* FILLER (A960..A97F) */ - - /* A960 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A968 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A970 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A978 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Javanese (A980..A9DF) */ - - /* A980 */ _(Bi,x), _(Bi,x), _(CR,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), - /* A988 */ _(VI,x), _(C,x), _(C,x), _(C,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), - /* A990 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A998 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A9A0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A9A8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* A9B0 */ _(C,x), _(C,x), _(C,x), _(N,x), _(M,R), _(M,R), _(M,T), _(M,T), - /* A9B8 */ _(M,B), _(M,B), _(M,L), _(M,L), _(M,T), _(CS,x), _(CM,x), _(CM,x), - /* A9C0 */ _(V,BR), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A9C8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A9D0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A9D8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* FILLER (A9E0..A9FF) */ - - /* A9E0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A9E8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A9F0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A9F8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Cham (AA00..AA5F) */ - - /* AA00 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), - /* AA08 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* AA10 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* AA18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* AA20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* AA28 */ _(C,x), _(M,T), _(M,T), _(M,T), _(M,T), _(M,B), _(M,T), _(M,L), - /* AA30 */ _(M,L), _(M,T), _(M,B), _(CM,x), _(CM,x), _(CM,x), _(CM,x), _(x,x), - /* AA38 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* AA40 */ _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), - /* AA48 */ _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(x,x), _(x,x), - /* AA50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* AA58 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Myanmar Extended-A (AA60..AA7F) */ - - /* AA60 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* AA68 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* AA70 */ _(x,x), _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* AA78 */ _(x,x), _(x,x), _(C,x), _(TM,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Tai Viet (AA80..AADF) */ - - /* AA80 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* AA88 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* AA90 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* AA98 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* AAA0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* AAA8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* AAB0 */ _(M,T), _(M,R), _(M,T), _(M,T), _(M,B),_(M,VOL),_(M,VOL), _(M,T), - /* AAB8 */ _(M,T),_(M,VOL), _(M,R),_(M,VOL),_(M,VOL), _(M,R), _(M,T), _(TM,x), - /* AAC0 */ _(TL,x), _(TM,x), _(TL,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* AAC8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* AAD0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* AAD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Meetei Mayek Extensions (AAE0..AAFF) */ - - /* AAE0 */ _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* AAE8 */ _(C,x), _(C,x), _(C,x), _(M,L), _(M,B), _(M,T), _(M,L), _(M,R), - /* AAF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(Vs,x), _(V,I), _(x,x), - /* AAF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - -#define indic_offset_0xabc0 3792 - - - /* Meetei Mayek (ABC0..ABFF) */ - - /* ABC0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* ABC8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(VI,x), _(VI,x), - /* ABD0 */ _(C,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* ABD8 */ _(C,x), _(C,x), _(C,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), - /* ABE0 */ _(CF,x), _(CF,x), _(CF,x), _(M,R), _(M,R), _(M,T), _(M,R), _(M,R), - /* ABE8 */ _(M,B), _(M,R), _(M,R), _(x,x), _(TM,x), _(V,B), _(x,x), _(x,x), - /* ABF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* ABF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - -#define indic_offset_0x10a00 3856 - - - /* Kharoshthi (10A00..10A5F) */ - - /* 10A00 */ _(C,x), _(M,O), _(M,B), _(M,B), _(x,x), _(M,T), _(M,O), _(x,x), - /* 10A08 */ _(x,x), _(x,x), _(x,x), _(x,x), _(M,B), _(x,x), _(Bi,x), _(Vs,x), - /* 10A10 */ _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), - /* 10A18 */ _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 10A20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 10A28 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 10A30 */ _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 10A38 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(V,I), - /* 10A40 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 10A48 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 10A50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 10A58 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - -#define indic_offset_0x11000 3952 - - - /* Brahmi (11000..1107F) */ - - /* 11000 */ _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), - /* 11008 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), - /* 11010 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 11018 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 11020 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 11028 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 11030 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 11038 */ _(M,T), _(M,T), _(M,T), _(M,T), _(M,B), _(M,B), _(M,B), _(M,B), - /* 11040 */ _(M,B), _(M,B), _(M,T), _(M,T), _(M,T), _(M,T), _(V,T), _(x,x), - /* 11048 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 11050 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 11058 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 11060 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 11068 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 11070 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 11078 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Kaithi (11080..110CF) */ - - /* 11080 */ _(Bi,x), _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), - /* 11088 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), - /* 11090 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 11098 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 110A0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 110A8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 110B0 */ _(M,R), _(M,L), _(M,R), _(M,B), _(M,B), _(M,T), _(M,T), _(M,R), - /* 110B8 */ _(M,R), _(V,B), _(N,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 110C0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 110C8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - -#define indic_offset_0x11100 4160 - - - /* Chakma (11100..1114F) */ - - /* 11100 */ _(Bi,x), _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), - /* 11108 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 11110 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 11118 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 11120 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(M,T), - /* 11128 */ _(M,T), _(M,T), _(M,B), _(M,B), _(M,L), _(M,T), _(M,TB), _(M,TB), - /* 11130 */ _(M,T), _(M,B), _(M,B), _(V,I), _(V,T), _(x,x), _(x,x), _(x,x), - /* 11138 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 11140 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 11148 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - -#define indic_offset_0x11180 4240 - - - /* Sharada (11180..111DF) */ - - /* 11180 */ _(Bi,x), _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), - /* 11188 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), - /* 11190 */ _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 11198 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 111A0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 111A8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 111B0 */ _(C,x), _(C,x), _(C,x), _(M,R), _(M,L), _(M,R), _(M,B), _(M,B), - /* 111B8 */ _(M,B), _(M,B), _(M,B), _(M,B), _(M,T), _(M,T), _(M,T), _(M,TR), - /* 111C0 */ _(V,R), _(A,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 111C8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 111D0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 111D8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - -#define indic_offset_0x11680 4336 - - - /* Takri (11680..116CF) */ - - /* 11680 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), - /* 11688 */ _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 11690 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 11698 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 116A0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 116A8 */ _(C,x), _(C,x), _(C,x), _(Bi,x), _(Vs,x), _(M,T), _(M,L), _(M,R), - /* 116B0 */ _(M,B), _(M,B), _(M,T), _(M,T), _(M,T), _(M,T), _(V,T), _(N,x), - /* 116B8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 116C0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 116C8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - -#define indic_offset_total 4416 - -}; /* Table occupancy: 60% */ - -static INDIC_TABLE_ELEMENT_TYPE -get_indic_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]; - if (0x1900 <= u && u <= 0x1AB0) return indic_table[u - 0x1900 + indic_offset_0x1900]; - if (0x1B00 <= u && u <= 0x1C50) return indic_table[u - 0x1B00 + indic_offset_0x1b00]; - if (0x1CD0 <= u && u <= 0x1D00) return indic_table[u - 0x1CD0 + indic_offset_0x1cd0]; - if (0xA800 <= u && u <= 0xAB00) return indic_table[u - 0xA800 + indic_offset_0xa800]; - if (0xABC0 <= u && u <= 0xAC00) return indic_table[u - 0xABC0 + indic_offset_0xabc0]; - if (0x10A00 <= u && u <= 0x10A60) return indic_table[u - 0x10A00 + indic_offset_0x10a00]; - if (0x11000 <= u && u <= 0x110D0) return indic_table[u - 0x11000 + indic_offset_0x11000]; - if (0x11100 <= u && u <= 0x11150) return indic_table[u - 0x11100 + indic_offset_0x11100]; - if (0x11180 <= u && u <= 0x111E0) return indic_table[u - 0x11180 + indic_offset_0x11180]; - if (0x11680 <= u && u <= 0x116D0) return indic_table[u - 0x11680 + indic_offset_0x11680]; - if (unlikely (u == 0x00A0)) return _(CP,x); - if (unlikely (u == 0x25CC)) return _(CP,x); - return _(x,x); -} - -#undef _ - -#undef ISC_A -#undef ISC_Bi -#undef ISC_C -#undef ISC_CD -#undef ISC_CF -#undef ISC_CHL -#undef ISC_CM -#undef ISC_CP -#undef ISC_CR -#undef ISC_CS -#undef ISC_ML -#undef ISC_N -#undef ISC_x -#undef ISC_RS -#undef ISC_TL -#undef ISC_TM -#undef ISC_V -#undef ISC_Vs -#undef ISC_Vo -#undef ISC_M -#undef ISC_VI - -#undef IMC_B -#undef IMC_BR -#undef IMC_I -#undef IMC_L -#undef IMC_LR -#undef IMC_x -#undef IMC_O -#undef IMC_R -#undef IMC_T -#undef IMC_TB -#undef IMC_TBR -#undef IMC_TL -#undef IMC_TLR -#undef IMC_TR -#undef IMC_VOL - -#endif /* HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH */ - -/* == End of generated table == */ diff -Nru harfbuzz-0.9.11/src/hb-ot-shape-complex-indic.cc harfbuzz-0.9.13/src/hb-ot-shape-complex-indic.cc --- harfbuzz-0.9.11/src/hb-ot-shape-complex-indic.cc 2013-01-09 00:08:21.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-complex-indic.cc 2013-02-15 11:42:35.000000000 +0000 @@ -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; +} + +/* 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 */ -union indic_options_union_t { - int i; - indic_options_t opts; + 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) { - indic_options_union_t u; - u.i = 0; - u.opts.initialized = 1; + 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. */ +} - char *c = getenv ("HB_OT_INDIC_OPTIONS"); - u.opts.uniscribe_bug_compatible = c && strstr (c, "uniscribe-bug-compatible"); +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; +} - return u; +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); } -static inline indic_options_t -indic_options (void) +#define JOINER_FLAGS (FLAG (OT_ZWJ) | FLAG (OT_ZWNJ)) +static inline bool +is_joiner (const hb_glyph_info_t &info) { - static indic_options_union_t options; + return is_one_of (info, JOINER_FLAGS); +} - if (unlikely (!options.i)) { - /* This is idempotent and threadsafe. */ - options = indic_options_init (); +/* 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 = 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 + */ + + + /* 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 (u, 0x0951, 0x0954))) + cat = OT_VD; + + if (unlikely (u == 0x17D1)) + cat = OT_X; + if (cat == OT_X && + unlikely (hb_in_range (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 @@ {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 @@ 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 @@ * 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 @@ RPHF, _RKRF, PREF, - HALF, BLWF, + HALF, ABVF, PSTF, CFAR, - _CJCT, _VATU, + _CJCT, INIT, _PRES, @@ -225,21 +419,21 @@ /* 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 @@ 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 @@ 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 @@ * 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 @@ 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 @@ 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 @@ /* 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ * 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 @@ 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 @@ } 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 @@ 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 @@ /* * 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 @@ 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 @@ decompose_indic, compose_indic, setup_masks_indic, - false, /* zero_width_attached_marks */ + HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE, false, /* fallback_position */ }; diff -Nru harfbuzz-0.9.11/src/hb-ot-shape-complex-myanmar-machine.hh harfbuzz-0.9.13/src/hb-ot-shape-complex-myanmar-machine.hh --- harfbuzz-0.9.11/src/hb-ot-shape-complex-myanmar-machine.hh 1970-01-01 00:00:00.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-complex-myanmar-machine.hh 2013-02-15 11:44:33.000000000 +0000 @@ -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 -Nru harfbuzz-0.9.11/src/hb-ot-shape-complex-myanmar-machine.rl harfbuzz-0.9.13/src/hb-ot-shape-complex-myanmar-machine.rl --- harfbuzz-0.9.11/src/hb-ot-shape-complex-myanmar-machine.rl 1970-01-01 00:00:00.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-complex-myanmar-machine.rl 2013-02-15 11:42:32.000000000 +0000 @@ -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 -Nru harfbuzz-0.9.11/src/hb-ot-shape-complex-myanmar.cc harfbuzz-0.9.13/src/hb-ot-shape-complex-myanmar.cc --- harfbuzz-0.9.11/src/hb-ot-shape-complex-myanmar.cc 1970-01-01 00:00:00.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-complex-myanmar.cc 2013-02-15 11:42:35.000000000 +0000 @@ -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 (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 -Nru harfbuzz-0.9.11/src/hb-ot-shape-complex-private.hh harfbuzz-0.9.13/src/hb-ot-shape-complex-private.hh --- harfbuzz-0.9.11/src/hb-ot-shape-complex-private.hh 2012-11-23 20:30:42.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-complex-private.hh 2013-02-14 15:59:57.000000000 +0000 @@ -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 @@ 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 @@ /* 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 @@ 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 @@ 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 -Nru harfbuzz-0.9.11/src/hb-ot-shape-complex-sea-machine.hh harfbuzz-0.9.13/src/hb-ot-shape-complex-sea-machine.hh --- harfbuzz-0.9.11/src/hb-ot-shape-complex-sea-machine.hh 1970-01-01 00:00:00.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-complex-sea-machine.hh 2013-02-17 17:10:18.000000000 +0000 @@ -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 -Nru harfbuzz-0.9.11/src/hb-ot-shape-complex-sea-machine.rl harfbuzz-0.9.13/src/hb-ot-shape-complex-sea-machine.rl --- harfbuzz-0.9.11/src/hb-ot-shape-complex-sea-machine.rl 1970-01-01 00:00:00.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-complex-sea-machine.rl 2013-02-17 17:09:08.000000000 +0000 @@ -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 -Nru harfbuzz-0.9.11/src/hb-ot-shape-complex-sea.cc harfbuzz-0.9.13/src/hb-ot-shape-complex-sea.cc --- harfbuzz-0.9.11/src/hb-ot-shape-complex-sea.cc 1970-01-01 00:00:00.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-complex-sea.cc 2013-02-17 17:10:52.000000000 +0000 @@ -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 -Nru harfbuzz-0.9.11/src/hb-ot-shape-complex-thai.cc harfbuzz-0.9.13/src/hb-ot-shape-complex-thai.cc --- harfbuzz-0.9.11/src/hb-ot-shape-complex-thai.cc 2012-12-05 23:57:42.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-complex-thai.cc 2013-02-14 15:59:57.000000000 +0000 @@ -373,6 +373,6 @@ NULL, /* decompose */ NULL, /* compose */ NULL, /* setup_masks */ - true, /* zero_width_attached_marks */ + HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE, false,/* fallback_position */ }; diff -Nru harfbuzz-0.9.11/src/hb-ot-shape-fallback-private.hh harfbuzz-0.9.13/src/hb-ot-shape-fallback-private.hh --- harfbuzz-0.9.11/src/hb-ot-shape-fallback-private.hh 2012-11-23 20:30:42.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-fallback-private.hh 2013-02-21 20:55:19.000000000 +0000 @@ -41,4 +41,9 @@ 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 -Nru harfbuzz-0.9.11/src/hb-ot-shape-fallback.cc harfbuzz-0.9.13/src/hb-ot-shape-fallback.cc --- harfbuzz-0.9.11/src/hb-ot-shape-fallback.cc 2012-12-05 23:58:22.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-fallback.cc 2013-02-21 20:55:49.000000000 +0000 @@ -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 @@ } 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 -Nru harfbuzz-0.9.11/src/hb-ot-shape-normalize.cc harfbuzz-0.9.13/src/hb-ot-shape-normalize.cc --- harfbuzz-0.9.11/src/hb-ot-shape-normalize.cc 2012-11-23 20:30:42.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-normalize.cc 2013-02-14 15:59:57.000000000 +0000 @@ -192,30 +192,23 @@ } /* 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 @@ } /* 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 @@ 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 @@ 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 @@ 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_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 -Nru harfbuzz-0.9.11/src/hb-ot-shape-private.hh harfbuzz-0.9.13/src/hb-ot-shape-private.hh --- harfbuzz-0.9.11/src/hb-ot-shape-private.hh 2012-11-23 20:30:42.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape-private.hh 2013-02-15 11:42:35.000000000 +0000 @@ -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 @@ }; - -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 -Nru harfbuzz-0.9.11/src/hb-ot-shape.cc harfbuzz-0.9.13/src/hb-ot-shape.cc --- harfbuzz-0.9.11/src/hb-ot-shape.cc 2012-12-18 18:29:29.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-ot-shape.cc 2013-02-21 20:55:19.000000000 +0000 @@ -83,12 +83,12 @@ 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 @@ 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_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 @@ 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 @@ 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 @@ ret = true; } - hb_ot_layout_position_finish (c->font, c->buffer, c->plan->shaper->zero_width_attached_marks); + /* 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; - return ret; -} + default: + case HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE: + case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF: + 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); + hb_ot_layout_position_finish (c->font, c->buffer); - 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; - } + return ret; } static inline void @@ -492,7 +508,7 @@ /* 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_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 -Nru harfbuzz-0.9.11/src/hb-private.hh harfbuzz-0.9.13/src/hb-private.hh --- harfbuzz-0.9.11/src/hb-private.hh 2012-12-11 20:54:04.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-private.hh 2013-02-14 15:59:57.000000000 +0000 @@ -854,4 +854,33 @@ } +/* 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 -Nru harfbuzz-0.9.11/src/hb-shape-plan.cc harfbuzz-0.9.13/src/hb-shape-plan.cc --- harfbuzz-0.9.11/src/hb-shape-plan.cc 2012-11-23 20:30:42.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-shape-plan.cc 2013-02-15 12:46:17.000000000 +0000 @@ -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 @@ 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 -Nru harfbuzz-0.9.11/src/hb-shape.cc harfbuzz-0.9.13/src/hb-shape.cc --- harfbuzz-0.9.11/src/hb-shape.cc 2012-12-10 00:30:18.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-shape.cc 2013-02-15 12:48:04.000000000 +0000 @@ -202,7 +202,7 @@ static const char **static_shaper_list; -static +static inline void free_static_shaper_list (void) { free (static_shaper_list); @@ -255,8 +255,6 @@ 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 -Nru harfbuzz-0.9.11/src/hb-shaper.cc harfbuzz-0.9.13/src/hb-shaper.cc --- harfbuzz-0.9.11/src/hb-shaper.cc 2012-11-23 20:30:42.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-shaper.cc 2013-02-14 15:59:57.000000000 +0000 @@ -40,7 +40,7 @@ static const hb_shaper_pair_t *static_shapers; -static +static inline void free_static_shapers (void) { if (unlikely (static_shapers != all_shapers)) diff -Nru harfbuzz-0.9.11/src/hb-unicode-private.hh harfbuzz-0.9.13/src/hb-unicode-private.hh --- harfbuzz-0.9.11/src/hb-unicode-private.hh 2012-11-23 20:30:42.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-unicode-private.hh 2013-02-14 15:59:57.000000000 +0000 @@ -107,6 +107,9 @@ 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 -Nru harfbuzz-0.9.11/src/hb-version.h harfbuzz-0.9.13/src/hb-version.h --- harfbuzz-0.9.11/src/hb-version.h 2013-01-10 15:05:28.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-version.h 2013-02-25 22:51:10.000000000 +0000 @@ -38,9 +38,9 @@ #define HB_VERSION_MAJOR 0 #define HB_VERSION_MINOR 9 -#define HB_VERSION_MICRO 11 +#define HB_VERSION_MICRO 13 -#define HB_VERSION_STRING "0.9.11" +#define HB_VERSION_STRING "0.9.13" #define HB_VERSION_CHECK(major,minor,micro) \ ((major)*10000+(minor)*100+(micro) >= \ diff -Nru harfbuzz-0.9.11/src/hb-warning.cc harfbuzz-0.9.13/src/hb-warning.cc --- harfbuzz-0.9.11/src/hb-warning.cc 2012-11-23 20:30:42.000000000 +0000 +++ harfbuzz-0.9.13/src/hb-warning.cc 2013-02-14 15:59:57.000000000 +0000 @@ -29,11 +29,38 @@ #if defined(HB_ATOMIC_INT_NIL) -#pragma message("Could not find any system to define atomic_int macros, library may NOT be thread-safe.") +#ifdef _MSC_VER +#pragma message("Could not find any system to define atomic_int macros, library may NOT be thread-safe") +#else +#warning "Could not find any system to define atomic_int macros, library may NOT be thread-safe" #endif +#endif + #if defined(HB_MUTEX_IMPL_NIL) -#pragma message("Could not find any system to define mutex macros, library may NOT be thread-safe.") +#ifdef _MSC_VER +#pragma message("Could not find any system to define mutex macros, library may NOT be thread-safe") +#else +#warning "Could not find any system to define mutex macros, library may NOT be thread-safe" +#endif #endif + #if defined(HB_ATOMIC_INT_NIL) || defined(HB_MUTEX_IMPL_NIL) -#pragma message("To suppress these warnings, define HB_NO_MT.") +#ifdef _MSC_VER +#pragma message("To suppress these warnings, define HB_NO_MT") +#else +#warning "To suppress these warnings, define HB_NO_MT" +#endif +#endif + + +#include "hb-unicode-private.hh" + +#if !defined(HB_NO_UNICODE_FUNCS) && defined(HB_UNICODE_FUNCS_NIL) +#ifdef _MSC_VER +#pragma message("Could not find any Unicode functions implementation, you have to provide your own") +#pragma message("To suppress this warnings, define HB_NO_UNICODE_FUNCS") +#else +#warning "Could not find any Unicode functions implementation, you have to provide your own" +#warning "To suppress this warning, define HB_NO_UNICODE_FUNCS" +#endif #endif diff -Nru harfbuzz-0.9.11/test/api/Makefile.am harfbuzz-0.9.13/test/api/Makefile.am --- harfbuzz-0.9.11/test/api/Makefile.am 2013-01-03 02:28:39.000000000 +0000 +++ harfbuzz-0.9.13/test/api/Makefile.am 2013-02-06 20:29:03.000000000 +0000 @@ -67,7 +67,7 @@ G_DEBUG=gc-friendly \ G_SLICE=always-malloc \ srcdir=$(srcdir) \ - $(ENV) + $(NULL) # check-tool: Run tests under $(TOOL) diff -Nru harfbuzz-0.9.11/test/api/Makefile.in harfbuzz-0.9.13/test/api/Makefile.in --- harfbuzz-0.9.11/test/api/Makefile.in 2013-01-10 15:05:21.000000000 +0000 +++ harfbuzz-0.9.13/test/api/Makefile.in 2013-02-25 22:51:03.000000000 +0000 @@ -207,8 +207,21 @@ test-version.c ETAGS = etags CTAGS = ctags +# If stdout is a non-dumb tty, use colors. If test -t is not supported, +# then this fails; a conservative approach. Of course do not redirect +# stdout here, just stderr. am__tty_colors = \ -red=; grn=; lgn=; blu=; std= +red=; grn=; lgn=; blu=; std=; \ +test "X$(AM_COLOR_TESTS)" != Xno \ +&& test "X$$TERM" != Xdumb \ +&& { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \ +&& { \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + std=''; \ +} DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -388,7 +401,7 @@ @HAVE_GLIB_TRUE@ G_DEBUG=gc-friendly \ @HAVE_GLIB_TRUE@ G_SLICE=always-malloc \ @HAVE_GLIB_TRUE@ srcdir=$(srcdir) \ -@HAVE_GLIB_TRUE@ $(ENV) +@HAVE_GLIB_TRUE@ $(NULL) # check-gtester: Run tests under gtester diff -Nru harfbuzz-0.9.11/test/api/test-blob.c harfbuzz-0.9.13/test/api/test-blob.c --- harfbuzz-0.9.11/test/api/test-blob.c 2012-06-08 02:41:32.000000000 +0000 +++ harfbuzz-0.9.13/test/api/test-blob.c 2013-02-25 23:18:47.000000000 +0000 @@ -262,16 +262,61 @@ test_blob_subblob (fixture_t *fixture, gconstpointer user_data) { hb_blob_t *b = fixture->blob; + hb_memory_mode_t mm = GPOINTER_TO_INT (user_data); + unsigned int len; + const char *data; + char *data_writable; + unsigned int i; - fixture->len -= 2; - fixture->data++; - fixture->blob = hb_blob_create_sub_blob (b, 1, fixture->len); + if (mm == HB_MEMORY_MODE_DUPLICATE) { + g_assert_cmpint (fixture->freed, ==, 1); + fixture->data = hb_blob_get_data (b, NULL); + } else { + g_assert_cmpint (fixture->freed, ==, 0); + } + fixture->blob = hb_blob_create_sub_blob (b, 1, fixture->len - 2); hb_blob_destroy (b); + b = fixture->blob; + + /* A sub-blob is always created READONLY. */ + + g_assert (b); + + len = hb_blob_get_length (b); + g_assert_cmpint (len, ==, fixture->len - 2); + + data = hb_blob_get_data (b, &len); + g_assert_cmpint (len, ==, fixture->len - 2); + g_assert (data == fixture->data + 1); + + data_writable = hb_blob_get_data_writable (b, &len); + g_assert_cmpint (len, ==, fixture->len - 2); + g_assert (data_writable); + if (mm == HB_MEMORY_MODE_READONLY) + g_assert (0 == memcmp (data_writable, fixture->data + 1, fixture->len - 2)); + g_assert (data_writable != data); + g_assert_cmpint (fixture->freed, ==, 1); + + data = hb_blob_get_data (b, &len); + g_assert_cmpint (len, ==, fixture->len - 2); + g_assert (data == data_writable); + + memset (data_writable, 0, fixture->len - 2); + + /* Now, make it immutable and watch get_data_writable() fail */ + + g_assert (!hb_blob_is_immutable (b)); + hb_blob_make_immutable (b); + g_assert (hb_blob_is_immutable (b)); - test_blob (fixture, user_data); + data_writable = hb_blob_get_data_writable (b, &len); + g_assert (!data_writable); + g_assert_cmpint (len, ==, 0); - fixture->data--; - fixture->len += 2; + data = hb_blob_get_data (b, &len); + g_assert_cmpint (len, ==, fixture->len - 2); + for (i = 0; i < len; i++) + g_assert ('\0' == data[i]); } diff -Nru harfbuzz-0.9.11/util/options.cc harfbuzz-0.9.13/util/options.cc --- harfbuzz-0.9.11/util/options.cc 2012-12-29 23:39:10.000000000 +0000 +++ harfbuzz-0.9.13/util/options.cc 2013-02-12 20:34:29.000000000 +0000 @@ -413,8 +413,8 @@ /* read it */ GString *gs = g_string_new (NULL); char buf[BUFSIZ]; -#ifdef HAVE__SETMODE - _setmode (fileno (stdin), _O_BINARY); +#if defined(_WIN32) || defined(__CYGWIN__) + setmode (fileno (stdin), _O_BINARY); #endif while (!feof (stdin)) { size_t ret = fread (buf, 1, sizeof (buf), stdin); @@ -557,8 +557,8 @@ if (output_file) fp = fopen (output_file, "wb"); else { -#ifdef HAVE__SETMODE - _setmode (fileno (stdout), _O_BINARY); +#if defined(_WIN32) || defined(__CYGWIN__) + setmode (fileno (stdout), _O_BINARY); #endif fp = stdout; } diff -Nru harfbuzz-0.9.11/util/options.hh harfbuzz-0.9.13/util/options.hh --- harfbuzz-0.9.11/util/options.hh 2013-01-07 22:46:24.000000000 +0000 +++ harfbuzz-0.9.13/util/options.hh 2013-02-15 12:50:05.000000000 +0000 @@ -43,8 +43,8 @@ #ifdef HAVE_UNISTD_H #include /* for isatty() */ #endif -#ifdef HAVE_IO_H -#include /* for _setmode() under Windows */ +#if defined(_WIN32) || defined(__CYGWIN__) +#include /* for setmode() under Windows */ #endif #include @@ -170,6 +170,7 @@ (bot ? HB_BUFFER_FLAG_BOT : 0) | (eot ? HB_BUFFER_FLAG_EOT : 0) | (preserve_default_ignorables ? HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES : 0))); + hb_buffer_guess_segment_properties (buffer); } void populate_buffer (hb_buffer_t *buffer, const char *text, int text_len,