summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-11-05 08:15:19 -0800
committerAnas Nashif <anas.nashif@intel.com>2012-11-05 08:15:19 -0800
commitbbb5fd4f2e0d0c8cbdd407a39e58de3b40971c52 (patch)
treea971310548746273e1e9c73cd903fa199181977f
downloadharfbuzz-bbb5fd4f2e0d0c8cbdd407a39e58de3b40971c52.tar.gz
harfbuzz-bbb5fd4f2e0d0c8cbdd407a39e58de3b40971c52.tar.bz2
harfbuzz-bbb5fd4f2e0d0c8cbdd407a39e58de3b40971c52.zip
Imported Upstream version 0.9.3upstream/0.9.3
-rw-r--r--AUTHORS8
-rw-r--r--COPYING34
-rw-r--r--ChangeLog31363
-rw-r--r--INSTALL365
-rw-r--r--Makefile.am78
-rw-r--r--Makefile.in881
-rw-r--r--NEWS414
-rw-r--r--README7
-rw-r--r--THANKS7
-rw-r--r--TODO101
-rw-r--r--aclocal.m49137
-rwxr-xr-xautogen.sh33
-rwxr-xr-xcompile143
-rwxr-xr-xconfig.guess1533
-rw-r--r--config.h.in144
-rwxr-xr-xconfig.sub1693
-rwxr-xr-xconfigure18935
-rw-r--r--configure.ac238
-rwxr-xr-xdepcomp630
-rw-r--r--harfbuzz.doap24
-rw-r--r--harfbuzz.pc.in11
-rwxr-xr-xinstall-sh520
-rwxr-xr-xltmain.sh8413
-rwxr-xr-xmissing376
-rw-r--r--src/Makefile.am285
-rw-r--r--src/Makefile.in1604
-rwxr-xr-xsrc/check-c-linkage-decls.sh28
-rwxr-xr-xsrc/check-exported-symbols.sh40
-rwxr-xr-xsrc/check-header-guards.sh25
-rwxr-xr-xsrc/check-includes.sh42
-rwxr-xr-xsrc/check-internal-symbols.sh34
-rwxr-xr-xsrc/check-libstdc++.sh34
-rwxr-xr-xsrc/check-static-inits.sh39
-rwxr-xr-xsrc/gen-arabic-table.py197
-rwxr-xr-xsrc/gen-indic-table.py211
-rw-r--r--src/hb-atomic-private.hh113
-rw-r--r--src/hb-blob.cc325
-rw-r--r--src/hb-blob.h101
-rw-r--r--src/hb-buffer-private.hh203
-rw-r--r--src/hb-buffer.cc968
-rw-r--r--src/hb-buffer.h211
-rw-r--r--src/hb-cache-private.hh74
-rw-r--r--src/hb-common.cc417
-rw-r--r--src/hb-common.h313
-rw-r--r--src/hb-coretext.cc357
-rw-r--r--src/hb-coretext.h43
-rw-r--r--src/hb-fallback-shape.cc129
-rw-r--r--src/hb-font-private.hh460
-rw-r--r--src/hb-font.cc981
-rw-r--r--src/hb-font.h447
-rw-r--r--src/hb-ft.cc493
-rw-r--r--src/hb-ft.h62
-rw-r--r--src/hb-glib.cc384
-rw-r--r--src/hb-glib.h52
-rw-r--r--src/hb-gobject-enums.cc.tmpl74
-rw-r--r--src/hb-gobject-structs.cc63
-rw-r--r--src/hb-gobject.h69
-rw-r--r--src/hb-graphite2.cc337
-rw-r--r--src/hb-graphite2.h40
-rw-r--r--src/hb-icu.cc372
-rw-r--r--src/hb-icu.h52
-rw-r--r--src/hb-mutex-private.hh150
-rw-r--r--src/hb-object-private.hh251
-rw-r--r--src/hb-old.cc407
-rw-r--r--src/hb-old/COPYING24
-rw-r--r--src/hb-old/Makefile.am56
-rw-r--r--src/hb-old/Makefile.in764
-rw-r--r--src/hb-old/README7
-rw-r--r--src/hb-old/harfbuzz-arabic.c1150
-rw-r--r--src/hb-old/harfbuzz-buffer-private.h107
-rw-r--r--src/hb-old/harfbuzz-buffer.c383
-rw-r--r--src/hb-old/harfbuzz-buffer.h102
-rw-r--r--src/hb-old/harfbuzz-external.h106
-rw-r--r--src/hb-old/harfbuzz-gdef-private.h135
-rw-r--r--src/hb-old/harfbuzz-gdef.c1163
-rw-r--r--src/hb-old/harfbuzz-gdef.h140
-rw-r--r--src/hb-old/harfbuzz-global.h125
-rw-r--r--src/hb-old/harfbuzz-gpos-private.h729
-rw-r--r--src/hb-old/harfbuzz-gpos.c6094
-rw-r--r--src/hb-old/harfbuzz-gpos.h155
-rw-r--r--src/hb-old/harfbuzz-greek.c447
-rw-r--r--src/hb-old/harfbuzz-gsub-private.h483
-rw-r--r--src/hb-old/harfbuzz-gsub.c4329
-rw-r--r--src/hb-old/harfbuzz-gsub.h148
-rw-r--r--src/hb-old/harfbuzz-hangul.c268
-rw-r--r--src/hb-old/harfbuzz-hebrew.c187
-rw-r--r--src/hb-old/harfbuzz-impl.c84
-rw-r--r--src/hb-old/harfbuzz-impl.h135
-rw-r--r--src/hb-old/harfbuzz-indic.cpp1868
-rw-r--r--src/hb-old/harfbuzz-khmer.c642
-rw-r--r--src/hb-old/harfbuzz-myanmar.c511
-rw-r--r--src/hb-old/harfbuzz-open-private.h102
-rw-r--r--src/hb-old/harfbuzz-open.c1433
-rw-r--r--src/hb-old/harfbuzz-open.h288
-rw-r--r--src/hb-old/harfbuzz-shaper-private.h159
-rw-r--r--src/hb-old/harfbuzz-shaper.cpp994
-rw-r--r--src/hb-old/harfbuzz-shaper.h264
-rw-r--r--src/hb-old/harfbuzz-stream-private.h81
-rw-r--r--src/hb-old/harfbuzz-stream.c114
-rw-r--r--src/hb-old/harfbuzz-stream.h51
-rw-r--r--src/hb-old/harfbuzz-tibetan.c249
-rw-r--r--src/hb-old/harfbuzz.h38
-rw-r--r--src/hb-open-file-private.hh257
-rw-r--r--src/hb-open-type-private.hh718
-rw-r--r--src/hb-ot-head-table.hh145
-rw-r--r--src/hb-ot-hhea-table.hh92
-rw-r--r--src/hb-ot-hmtx-table.hh86
-rw-r--r--src/hb-ot-layout-common-private.hh767
-rw-r--r--src/hb-ot-layout-gdef-table.hh425
-rw-r--r--src/hb-ot-layout-gpos-table.hh1717
-rw-r--r--src/hb-ot-layout-gsub-table.hh1414
-rw-r--r--src/hb-ot-layout-gsubgpos-private.hh1684
-rw-r--r--src/hb-ot-layout-private.hh213
-rw-r--r--src/hb-ot-layout.cc486
-rw-r--r--src/hb-ot-layout.h193
-rw-r--r--src/hb-ot-map-private.hh198
-rw-r--r--src/hb-ot-map.cc301
-rw-r--r--src/hb-ot-maxp-table.hh65
-rw-r--r--src/hb-ot-name-table.hh128
-rw-r--r--src/hb-ot-shape-complex-arabic-table.hh942
-rw-r--r--src/hb-ot-shape-complex-arabic.cc352
-rw-r--r--src/hb-ot-shape-complex-indic-machine.hh884
-rw-r--r--src/hb-ot-shape-complex-indic-machine.rl122
-rw-r--r--src/hb-ot-shape-complex-indic-private.hh387
-rw-r--r--src/hb-ot-shape-complex-indic-table.hh872
-rw-r--r--src/hb-ot-shape-complex-indic.cc1141
-rw-r--r--src/hb-ot-shape-complex-misc.cc208
-rw-r--r--src/hb-ot-shape-complex-private.hh264
-rw-r--r--src/hb-ot-shape-fallback-private.hh39
-rw-r--r--src/hb-ot-shape-fallback.cc326
-rw-r--r--src/hb-ot-shape-normalize-private.hh50
-rw-r--r--src/hb-ot-shape-normalize.cc550
-rw-r--r--src/hb-ot-shape-private.hh110
-rw-r--r--src/hb-ot-shape.cc596
-rw-r--r--src/hb-ot-tag.cc710
-rw-r--r--src/hb-ot-tag.h59
-rw-r--r--src/hb-ot.h48
-rw-r--r--src/hb-private.hh812
-rw-r--r--src/hb-set-private.hh276
-rw-r--r--src/hb-set.cc191
-rw-r--r--src/hb-set.h132
-rw-r--r--src/hb-shape-plan-private.hh60
-rw-r--r--src/hb-shape-plan.cc285
-rw-r--r--src/hb-shape-plan.h75
-rw-r--r--src/hb-shape.cc103
-rw-r--r--src/hb-shape.h68
-rw-r--r--src/hb-shaper-impl-private.hh43
-rw-r--r--src/hb-shaper-list.hh50
-rw-r--r--src/hb-shaper-private.hh108
-rw-r--r--src/hb-shaper.cc109
-rw-r--r--src/hb-tt-font.cc79
-rw-r--r--src/hb-unicode-private.hh271
-rw-r--r--src/hb-unicode.cc432
-rw-r--r--src/hb-unicode.h357
-rw-r--r--src/hb-uniscribe.cc478
-rw-r--r--src/hb-uniscribe.h49
-rw-r--r--src/hb-version.h66
-rw-r--r--src/hb-version.h.in66
-rw-r--r--src/hb-warning.cc39
-rw-r--r--src/hb.h44
-rw-r--r--src/indic.cc51
-rw-r--r--src/main.cc195
-rw-r--r--src/test-would-substitute.cc103
-rw-r--r--test/Makefile.am5
-rw-r--r--test/Makefile.in593
-rw-r--r--test/api/Makefile.am125
-rw-r--r--test/api/Makefile.in914
-rw-r--r--test/api/hb-test.h268
-rw-r--r--test/api/test-blob.c301
-rw-r--r--test/api/test-buffer.c783
-rw-r--r--test/api/test-c.c58
-rw-r--r--test/api/test-common.c225
-rw-r--r--test/api/test-cplusplus.cc30
-rw-r--r--test/api/test-font.c502
-rw-r--r--test/api/test-object.c367
-rw-r--r--test/api/test-ot-tag.c241
-rw-r--r--test/api/test-shape.c165
-rw-r--r--test/api/test-unicode.c937
-rw-r--r--test/api/test-version.c80
-rw-r--r--test/shaping/Makefile.am35
-rw-r--r--test/shaping/Makefile.in408
-rwxr-xr-xtest/shaping/hb-diff10
-rwxr-xr-xtest/shaping/hb-diff-colorize7
-rwxr-xr-xtest/shaping/hb-diff-filter-failures5
-rwxr-xr-xtest/shaping/hb-diff-ngrams5
-rwxr-xr-xtest/shaping/hb-diff-stat5
-rwxr-xr-xtest/shaping/hb-manifest-read5
-rwxr-xr-xtest/shaping/hb-manifest-update5
-rwxr-xr-xtest/shaping/hb-unicode-decode5
-rwxr-xr-xtest/shaping/hb-unicode-encode5
-rwxr-xr-xtest/shaping/hb-unicode-prettyname6
-rw-r--r--test/shaping/hb_test_tools.py516
-rw-r--r--util/Makefile.am74
-rw-r--r--util/Makefile.in710
-rw-r--r--util/ansi-print.cc413
-rw-r--r--util/ansi-print.hh39
-rw-r--r--util/hb-ot-shape-closure.cc112
-rw-r--r--util/hb-shape.cc97
-rw-r--r--util/hb-view.cc37
-rw-r--r--util/helper-cairo-ansi.cc102
-rw-r--r--util/helper-cairo-ansi.hh39
-rw-r--r--util/helper-cairo.cc453
-rw-r--r--util/helper-cairo.hh81
-rw-r--r--util/main-font-text.hh80
-rw-r--r--util/options.cc830
-rw-r--r--util/options.hh373
-rw-r--r--util/shape-consumer.hh82
-rw-r--r--util/view-cairo.cc126
-rw-r--r--util/view-cairo.hh99
209 files changed, 141139 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..c611d7d
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,8 @@
+Behdad Esfahbod
+Simon Hausmann
+Martin Hosken
+Jonathan Kew
+Lars Knoll
+Werner Lemberg
+Owen Taylor
+David Turner
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..f6748da
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,34 @@
+HarfBuzz is licensed under the so-called "Old MIT" license. Details follow.
+
+Copyright © 2010,2011,2012 Google, Inc.
+Copyright © 2012 Mozilla Foundation
+Copyright © 2011 Codethink Limited
+Copyright © 2008,2010 Nokia Corporation and/or its subsidiary(-ies)
+Copyright © 2009 Keith Stribley
+Copyright © 2009 Martin Hosken and SIL International
+Copyright © 2007 Chris Wilson
+Copyright © 2006 Behdad Esfahbod
+Copyright © 2005 David Turner
+Copyright © 2004,2007,2008,2009,2010 Red Hat, Inc.
+Copyright © 1998-2004 David Turner and Werner Lemberg
+
+For full copyright notices consult the individual files in the package.
+
+
+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.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..6fd88f4
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,31363 @@
+commit 2f1747ed7d28148807ad07eb8e22db3ab5c54966
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 16 11:46:46 2012 -0400
+
+ Add comment
+
+ src/hb-ot-shape-complex-arabic.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit bd08d5d126aa878d1dbf7bfd4b1a764c170cd9ad
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 16 11:35:50 2012 -0400
+
+ [OT] Fix Arabic shaper OOB access
+
+ https://bugzilla.mozilla.org/show_bug.cgi?id=782908
+
+ src/hb-ot-shape-complex-arabic.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b161bfc4f6f2db0edea780b95b798ff7b559cf33
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 16 08:09:44 2012 -0400
+
+ [configure] Cleanup check for ICU
+
+ Check for upstream-provided 'icu-uc' pkgconfig package.
+
+ configure.ac | 21 +--------------------
+ 1 files changed, 1 insertions(+), 20 deletions(-)
+
+commit daf0731865f91da960446928667d4095bde471ea
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 16 07:32:59 2012 -0400
+
+ [ICU] Fix includes
+
+ As reported by Steven Loomis, including uversion.h works everywhere.
+
+ src/hb-icu.cc | 6 ------
+ 1 files changed, 0 insertions(+), 6 deletions(-)
+
+commit a67ba9c0fe6798a3500af9f4acee8d678f5144ee
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 15 18:52:17 2012 -0400
+
+ Whitespace
+
+ src/hb-old/Makefile.am | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 9fe76051f7003d6b6a10486c5595bf1a4dbf5fe6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 15 17:24:28 2012 -0400
+
+ [NEWS] Fix date
+
+ Oops!
+
+ NEWS | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 45c1383cc7315f89c23c0ed388b99e87224884e7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 14 09:33:18 2012 -0400
+
+ Minor
+
+ src/hb-coretext.cc | 8 ++++----
+ src/hb-fallback-shape.cc | 8 ++++----
+ src/hb-graphite2.cc | 8 ++++----
+ src/hb-uniscribe.cc | 8 ++++----
+ 4 files changed, 16 insertions(+), 16 deletions(-)
+
+commit 4ac4c6f2e12ddc8bf5e750671321458218b6e0c8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 13 10:52:52 2012 -0400
+
+ Fix ICU build with older ICUs
+
+ src/hb-icu.cc | 7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 883cbf5ed79d2b60191f803a5ee3f3e4496f3441
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 12 17:11:27 2012 -0400
+
+ Minor
+
+ contrib/README | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit b7a4d37d0b162f2222b65d09b9271b8c636086f8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 11 21:32:23 2012 -0400
+
+ minor
+
+ configure.ac | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit d5045a5f4017631a4660f985fe451c5a64c42ca0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 11 21:26:25 2012 -0400
+
+ [ICU] Use new normalizer2 compose/decompose API
+
+ It's considerably faster than the fallback implementation we had
+ previously!
+
+ src/hb-buffer.cc | 9 ++---
+ src/hb-glib.cc | 26 ++++++---------
+ src/hb-icu.cc | 75
+ ++++++++++++++++++++++++++++++++++++---------
+ src/hb-unicode-private.hh | 13 +------
+ src/hb-unicode.cc | 35 ++++++++++++++++++++-
+ src/hb-warning.cc | 8 -----
+ 6 files changed, 110 insertions(+), 56 deletions(-)
+
+commit 2b73a1f112c489c2553743c08dc03cd89f60cb2d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 11 19:17:54 2012 -0400
+
+ Add TODO
+
+ TODO | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 9f9f04c2229227bb0712166e824157bbbf5cef80
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 11 18:34:13 2012 -0400
+
+ [OT] Unbreak Thai shaping and fallback Arabic shaping
+
+ The merger of normalizer and glyph-mapping broke shapers that
+ modified text stream. Unbreak them by adding a new preprocess_text
+ shaping stage that happens before normalizing/cmap and disallow
+ setup_mask modification of actual text.
+
+ src/hb-ot-shape-complex-arabic.cc | 42
+ ++++++++++++++++++++++++++---------
+ src/hb-ot-shape-complex-indic.cc | 1 +
+ src/hb-ot-shape-complex-misc.cc | 12 ++++++----
+ src/hb-ot-shape-complex-private.hh | 15 ++++++++++--
+ src/hb-ot-shape.cc | 3 ++
+ 5 files changed, 54 insertions(+), 19 deletions(-)
+
+commit e9f28a38f54b98fa59f9159ccaaa3be6027e1378
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 11 18:20:28 2012 -0400
+
+ [OT] Add shape_plan to Arabic shaper
+
+ src/hb-ot-shape-complex-arabic.cc | 82
+ ++++++++++++++++++++++++-------------
+ 1 files changed, 53 insertions(+), 29 deletions(-)
+
+commit 344cc56698a8c84c4c1a05a71d829e5171aa3a60
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 11 17:36:23 2012 -0400
+
+ Add TODO
+
+ TODO | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit daf13afb0801740dcc7900c4af190e24b80a05c0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 10 16:38:44 2012 -0400
+
+ [OT] Implement fallback mark positioning for "double" combining marks
+
+ src/hb-ot-shape-fallback.cc | 9 ++++++++-
+ 1 files changed, 8 insertions(+), 1 deletions(-)
+
+commit d345313104d9e3c8a8533ccdebd74e0648d0bee3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 10 16:34:04 2012 -0400
+
+ [OT] Fix fallback mark positioning with left-to-right text
+
+ Ouch!
+
+ src/hb-ot-shape-fallback.cc | 13 +++++++++++--
+ 1 files changed, 11 insertions(+), 2 deletions(-)
+
+commit e297ee4acd6f9d950f8542fc6ad71fd580b69284
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 10 14:49:37 2012 -0400
+
+ Bump version to 0.9.2
+
+ A *real* release this time, with NEWS, ChangeLog, etc.
+
+ AUTHORS | 8 +++
+ COPYING | 9 +++-
+ Makefile.am | 13 +++---
+ NEWS | 136
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ THANKS | 7 +++
+ configure.ac | 4 +-
+ 6 files changed, 165 insertions(+), 12 deletions(-)
+
+commit 6efe1200b97cefe019857b0b5951a4a87deeb02b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 10 13:49:32 2012 -0400
+
+ Bump version to 0.9.1
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 206ab6057303273590a3d005660e075bdcee0f5f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 10 09:06:30 2012 -0400
+
+ [test] Move around
+
+ .../in-tree/shaper-arabic/script-arabic/MANIFEST | 2 +-
+ .../shaper-arabic/script-arabic/crulp/MANIFEST | 1 -
+ .../script-arabic/crulp/ligatures/2grams.txt | 601 --
+ .../script-arabic/crulp/ligatures/3grams.txt | 3415 -----------
+ .../script-arabic/crulp/ligatures/4grams.txt | 6316
+ --------------------
+ .../script-arabic/crulp/ligatures/5grams.txt | 5029
+ ----------------
+ .../script-arabic/crulp/ligatures/6grams.txt | 1542 -----
+ .../script-arabic/crulp/ligatures/7grams.txt | 354 --
+ .../script-arabic/crulp/ligatures/8grams.txt | 26 -
+ .../script-arabic/crulp/ligatures/LICENSE | 3 -
+ .../script-arabic/crulp/ligatures/MANIFEST | 7 -
+ .../script-arabic/crulp/ligatures/README | 16 -
+ .../script-arabic/crulp/ligatures/SOURCES | 4 -
+ .../script-arabic/language-urdu/MANIFEST | 1 +
+ .../script-arabic/language-urdu/crulp/MANIFEST | 1 +
+ .../language-urdu/crulp/ligatures/2grams.txt | 601 ++
+ .../language-urdu/crulp/ligatures/3grams.txt | 3415 +++++++++++
+ .../language-urdu/crulp/ligatures/4grams.txt | 6316
+ ++++++++++++++++++++
+ .../language-urdu/crulp/ligatures/5grams.txt | 5029
+ ++++++++++++++++
+ .../language-urdu/crulp/ligatures/6grams.txt | 1542 +++++
+ .../language-urdu/crulp/ligatures/7grams.txt | 354 ++
+ .../language-urdu/crulp/ligatures/8grams.txt | 26 +
+ .../language-urdu/crulp/ligatures/LICENSE | 3 +
+ .../language-urdu/crulp/ligatures/MANIFEST | 7 +
+ .../language-urdu/crulp/ligatures/README | 16 +
+ .../language-urdu/crulp/ligatures/SOURCES | 4 +
+ 26 files changed, 17316 insertions(+), 17315 deletions(-)
+
+commit 7a484c601e0958533eb85a6902296733c39537fe
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 10 09:05:29 2012 -0400
+
+ [test] Add Urdu ligature sequences from CRULP
+
+ .../in-tree/shaper-arabic/script-arabic/MANIFEST | 1 +
+ .../shaper-arabic/script-arabic/crulp/MANIFEST | 1 +
+ .../script-arabic/crulp/ligatures/2grams.txt | 601 ++
+ .../script-arabic/crulp/ligatures/3grams.txt | 3415 +++++++++++
+ .../script-arabic/crulp/ligatures/4grams.txt | 6316
+ ++++++++++++++++++++
+ .../script-arabic/crulp/ligatures/5grams.txt | 5029
+ ++++++++++++++++
+ .../script-arabic/crulp/ligatures/6grams.txt | 1542 +++++
+ .../script-arabic/crulp/ligatures/7grams.txt | 354 ++
+ .../script-arabic/crulp/ligatures/8grams.txt | 26 +
+ .../script-arabic/crulp/ligatures/LICENSE | 3 +
+ .../script-arabic/crulp/ligatures/MANIFEST | 7 +
+ .../script-arabic/crulp/ligatures/README | 16 +
+ .../script-arabic/crulp/ligatures/SOURCES | 4 +
+ 13 files changed, 17315 insertions(+), 0 deletions(-)
+
+commit f4cb4762986a28634fa7de9b706f9d37859b881e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 10 03:51:44 2012 -0400
+
+ [OT] Slightly adjust normalizer
+
+ The change is very subtle. If we have a single-char cluster that
+ decomposes to three or more characters, then try recomposition, in
+ case the farther mark may compose with the base.
+
+ src/hb-ot-shape-normalize.cc | 81
+ ++++++++++++++++++++++++++++--------------
+ 1 files changed, 54 insertions(+), 27 deletions(-)
+
+commit 07d682806349aee81f53114778ce0beb23909ed7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 10 03:28:50 2012 -0400
+
+ Minor
+
+ src/hb-ot-shape-normalize.cc | 25 ++++++++-----------------
+ src/hb-ot-shape.cc | 2 +-
+ 2 files changed, 9 insertions(+), 18 deletions(-)
+
+commit b00321ea78793d9b3592b5173a9800e6322424fe
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 9 22:33:32 2012 -0400
+
+ [OT] Avoid calling get_glyph() twice
+
+ Essentially move the glyph mapping to normalization process.
+ The effect on Devanagari is small (but observable). Should be more
+ observable in simple text, like ASCII.
+
+ src/hb-ot-shape-normalize-private.hh | 2 +
+ src/hb-ot-shape-normalize.cc | 76
+ ++++++++++++++++++++++++----------
+ src/hb-ot-shape.cc | 44 +++++++++----------
+ 3 files changed, 77 insertions(+), 45 deletions(-)
+
+commit 12c0875eafa4bd92db650e5acca046d99594d1e6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 9 22:00:53 2012 -0400
+
+ [OT] Remove redundant check
+
+ src/hb-ot-shape.cc | 5 +----
+ 1 files changed, 1 insertions(+), 4 deletions(-)
+
+commit 5c60b70c89b4e0a6512d9fd1ab5394dd76feb742
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 9 21:58:07 2012 -0400
+
+ [OT] More code shuffling around
+
+ Preparing for merging map_glyphs() and normalize().
+
+ src/hb-ot-shape.cc | 167
+ +++++++++++++++++++++++++++-------------------------
+ 1 files changed, 86 insertions(+), 81 deletions(-)
+
+commit cd0c6e148f6d078b364370cb2f808b793b921be2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 9 21:48:55 2012 -0400
+
+ Shuffle buffer variable allocations around
+
+ To room for more allocations, coming.
+
+ src/hb-ot-layout-private.hh | 6 +++---
+ src/hb-ot-shape-complex-arabic.cc | 2 +-
+ src/hb-ot-shape-complex-indic-private.hh | 4 ++--
+ src/hb-ot-shape-complex-private.hh | 5 ++---
+ src/hb-ot-shape-private.hh | 4 ++--
+ 5 files changed, 10 insertions(+), 11 deletions(-)
+
+commit 8d1eef3f32fb539de2a72804fa3834acc18daab5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 9 21:31:52 2012 -0400
+
+ Minor
+
+ src/hb-ot-shape-normalize.cc | 50
+ ++++++++++++++++++++++++++----------------
+ 1 files changed, 31 insertions(+), 19 deletions(-)
+
+commit 56c9e7c004e802ddcb8c704346026f1d7a812f9f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 9 21:12:30 2012 -0400
+
+ Fill out combining class resetting for fallback shaping
+ Thai/Lao/Tibetan
+
+ src/hb-ot-shape-fallback.cc | 38 +++++++++++++++++++++++++++++++++++++-
+ src/hb-unicode-private.hh | 7 ++++---
+ src/hb-unicode.cc | 2 +-
+ 3 files changed, 42 insertions(+), 5 deletions(-)
+
+commit a321e1d51e0e7fa02738410e8d6e77c841bc6b13
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 9 18:30:34 2012 -0400
+
+ Revert "Reject lookups with no subTable"
+
+ This reverts commit 30ec9002d84e8b49290e782e6192069821ffa942.
+
+ See previous commit.
+
+ src/hb-ot-layout-common-private.hh | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 2eaf482b371034ce6ebfaedee98049b036fd3493
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 9 18:30:05 2012 -0400
+
+ Revert "[GSUB/GPOS] Reject Context/ChainContext lookups with zero
+ input"
+
+ This reverts commit 0981068b75710397f08e0d2d776a0a2ea68d7117.
+
+ I was confused. Even if we access coverage[0] unconditionally,
+ we don't
+ need bound checks since the array machinary already handles that.
+
+ src/hb-ot-layout-gsubgpos-private.hh | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit a02d86484be870615297abfc7be9f94645434762
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 8 18:04:29 2012 -0400
+
+ Add check-exported-symbols.sh
+
+ And misc linking fixes.
+
+ src/Makefile.am | 1 +
+ src/check-exported-symbols.sh | 40
+ ++++++++++++++++++++++++++++++++++++++
+ src/check-internal-symbols.sh | 2 +-
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ src/hb-ot-shape.cc | 6 ++--
+ 5 files changed, 46 insertions(+), 5 deletions(-)
+
+commit 4c8ac4f47e95d2b266b2f64e75c55af8233b6b91
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 8 17:44:19 2012 -0400
+
+ Misc minor fixes
+
+ src/check-internal-symbols.sh | 10 +--
+ src/hb-font-private.hh | 29 +++++++-
+ src/hb-font.cc | 63 +++++++---------
+ src/hb-font.h | 2 +-
+ src/hb-graphite2.cc | 4 +-
+ src/hb-old.cc | 2 +-
+ src/hb-ot-layout.cc | 6 +-
+ src/hb-ot-shape-fallback.cc | 10 +--
+ src/hb-ot-shape.cc | 2 +-
+ src/hb-shape-plan.cc | 2 +-
+ src/hb-shape-plan.h | 2 +-
+ src/hb-tt-font.cc | 166
+ +----------------------------------------
+ 12 files changed, 72 insertions(+), 226 deletions(-)
+
+commit 560d68af8168d1baff607b9616a3590af70fe9ec
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 8 17:16:01 2012 -0400
+
+ Use a export-file for Windows builds
+
+ Apparently even that doesn't make check-internal-symbols.sh happy with
+ mingw32. Going to disable that for DLLs again, but hopefully the
+ export-file is doing *something*.
+
+ configure.ac | 14 +++++++++++++-
+ src/Makefile.am | 22 +++++++++++++++++++++-
+ src/hb-buffer.h | 4 ++--
+ 3 files changed, 36 insertions(+), 4 deletions(-)
+
+commit f8751cf8e0a16125d63a88da65fdbfa76a19453f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 8 17:15:44 2012 -0400
+
+ [hb-old] speed-up build
+
+ src/hb-old/harfbuzz-external.h | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 5f4c52867ce67faa15f5d26b59c18c8d068e9261
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 8 16:53:37 2012 -0400
+
+ Minor
+
+ src/hb-ot-layout.h | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit fe2b8a7777ab1c84980424ede713cb0d6701f987
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 8 15:27:14 2012 -0400
+
+ Minor
+
+ TODO | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 7e7d245b332306949a19c628bacd920717434769
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 8 15:23:48 2012 -0400
+
+ Make default_language threadsafe
+
+ src/hb-common.cc | 15 +++++----------
+ 1 files changed, 5 insertions(+), 10 deletions(-)
+
+commit 06b192c458010c847362d809673209c87ea29949
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 8 15:23:45 2012 -0400
+
+ Minor
+
+ src/hb-common.h | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 37191ede7583fdb864db32a8f4d90956657926c7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 8 14:59:09 2012 -0400
+
+ Minor
+
+ src/hb-common.h | 4 ++--
+ src/hb-icu.h | 1 -
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+commit 6d9a329a8a0f11f4b175e407de59c55924de1ef6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 8 14:48:41 2012 -0400
+
+ Adjust a couple source checks
+
+ src/check-internal-symbols.sh | 4 ++--
+ src/check-static-inits.sh | 10 ++++++++--
+ 2 files changed, 10 insertions(+), 4 deletions(-)
+
+commit 9c929abdcfef44c0193a2917b20981df37ade21c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 8 14:33:37 2012 -0400
+
+ Minor renaming
+
+ src/Makefile.am | 4 +-
+ src/hb-ot-shape-fallback-private.hh | 39 ++++
+ src/hb-ot-shape-fallback.cc | 276
+ ++++++++++++++++++++++++++
+ src/hb-ot-shape-position-fallback-private.hh | 39 ----
+ src/hb-ot-shape-position-fallback.cc | 276
+ --------------------------
+ src/hb-ot-shape.cc | 4 +-
+ 6 files changed, 319 insertions(+), 319 deletions(-)
+
+commit 801298b590effd768607bb532dc83c73ba65d16b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 8 14:26:36 2012 -0400
+
+ Fix cast
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=53233
+
+ src/hb-buffer-private.hh | 10 ++++++----
+ src/hb-shape-plan.cc | 4 ++--
+ 2 files changed, 8 insertions(+), 6 deletions(-)
+
+commit 21756934a15e31dc243e2b6d80adec5752477652
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 8 01:20:45 2012 -0400
+
+ [OT] Implement fallback positioning
+
+ Implemented for Arabic, Hebrew, and generic marks.
+ Activated if no GPOS table present.
+
+ src/hb-font.h | 3 +-
+ src/hb-ft.cc | 3 +-
+ src/hb-old.cc | 2 +-
+ src/hb-ot-shape-position-fallback.cc | 237
+ +++++++++++++++++++++++++++++++++-
+ src/hb-unicode-private.hh | 81 ++++++++++++
+ src/hb-unicode.cc | 107 ++++++----------
+ 6 files changed, 356 insertions(+), 77 deletions(-)
+
+commit fb56e7628362a73e20f7f0b49fe31e802dc01f4f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 7 23:44:47 2012 -0400
+
+ [hb-old] Fix warnings
+
+ src/hb-old/harfbuzz-shaper.cpp | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit affaf8a0e5aa38e5820455f789eebf916e02eb7b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 7 22:41:38 2012 -0400
+
+ [OT] Start adding fallback positioning
+
+ Used when there is no GPOS.
+
+ src/Makefile.am | 2 +
+ src/hb-ot-shape-position-fallback-private.hh | 39 +++++++++++++++++++++
+ src/hb-ot-shape-position-fallback.cc | 47
+ ++++++++++++++++++++++++++
+ src/hb-ot-shape.cc | 23 +++----------
+ 4 files changed, 93 insertions(+), 18 deletions(-)
+
+commit 7e4920fd1577987bf6804f67765e22a84983e057
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 7 22:32:23 2012 -0400
+
+ Minor
+
+ src/hb-ot-shape.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 472f229a63f0d1bb21b02179ef430b7698df8f12
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 7 22:25:24 2012 -0400
+
+ [GSUB] Generalize would_apply()
+
+ Fixes logic also, where before we were always matching if
+ glyphs_len==1
+ and a ligature started with the glyph.
+
+ src/hb-ot-layout-gsub-table.hh | 26 +++++++++++++++++++----
+ src/hb-ot-layout-gsubgpos-private.hh | 37
+ ++++++++++++++++-----------------
+ src/hb-ot-layout.cc | 3 +-
+ 3 files changed, 40 insertions(+), 26 deletions(-)
+
+commit 6f3a300138f659020c21c3e08b7981c78df5f332
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 7 22:13:25 2012 -0400
+
+ Add hb_font_glyph_from/to_string
+
+ src/hb-font-private.hh | 43
+ ++++++++++++++++++++++++++++++++++++++++++
+ src/hb-font.cc | 24 +++++++++++++++++++---
+ src/hb-font.h | 11 ++++++++++
+ src/hb-private.hh | 16 +++++++++++++++
+ src/test-would-substitute.cc | 11 +++++++++-
+ util/options.cc | 2 +-
+ 6 files changed, 101 insertions(+), 6 deletions(-)
+
+commit eb56f6ae96260c5b4bcd4e1dfb7ab733a230f3a8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 7 21:44:25 2012 -0400
+
+ Minor
+
+ src/hb-mutex-private.hh | 1 +
+ src/hb-uniscribe.cc | 1 +
+ src/hb-uniscribe.h | 2 ++
+ 3 files changed, 4 insertions(+), 0 deletions(-)
+
+commit f4e48adcdd4315ce09e755f87a0f801d88194f42
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 7 21:12:49 2012 -0400
+
+ [OT] Apply 'rclt' feature in horizontal mode
+
+ 'rclt' is "Required Contextual Forms" being proposed by Microsoft.
+ It's like 'calt', but supposedly always on. We apply 'calt' anyway,
+ and now apply this too.
+
+ src/hb-ot-shape.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit b1914b8bd08ecdea79930dda7e3bb2ae9e6134a1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 7 16:57:48 2012 -0400
+
+ Fix warnings
+
+ src/hb-icu.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 0f8881d6bbf6cd59938315eeff9b71cfc736aa4e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 7 16:57:02 2012 -0400
+
+ More refactoring
+
+ src/hb-ot-shape-normalize.cc | 161
+ ++++++++++++++++++++++++++++++++++++++++-
+ src/hb-unicode-private.hh | 164
+ +-----------------------------------------
+ 2 files changed, 162 insertions(+), 163 deletions(-)
+
+commit 428dfcab6634ff264570a0a5d715efb8048c3db5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 7 16:51:48 2012 -0400
+
+ Minor refactoring
+
+ src/hb-ot-shape-normalize.cc | 27 +++++++++++++++++++++++----
+ 1 files changed, 23 insertions(+), 4 deletions(-)
+
+commit 61f41849af6ff9edf8b55cf9610066d1bfb4a8df
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 7 16:45:27 2012 -0400
+
+ Add Hebrew presentation forms shaping
+
+ Lifted from https://bugzilla.mozilla.org/show_bug.cgi?id=728866
+
+ src/hb-unicode-private.hh | 121
+ ++++++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 120 insertions(+), 1 deletions(-)
+
+commit 32d71dc13317b322e2c5de00d767b2cb15fddd8b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 7 14:11:16 2012 -0400
+
+ [Graphite] Minor
+
+ src/hb-graphite2.cc | 60
+ +++++++++++++++++++++++---------------------------
+ 1 files changed, 28 insertions(+), 32 deletions(-)
+
+commit 030ac5022e8a43b9329c26e72527bafc582ef44b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 7 13:01:12 2012 -0400
+
+ Remove enum trailing comma
+
+ ...again.
+
+ src/hb-ot-shape-normalize-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 368b4e7649f9bc8c6bebf7c7ff03c9b9ec425a25
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 6 23:06:04 2012 -0400
+
+ Minor
+
+ src/hb-font.cc | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit ade7459ea7c75b4f33f7cfa43dd5bdfa0c18d6d5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 6 19:42:47 2012 -0700
+
+ [util] Fix leaks
+
+ src/hb-graphite2.cc | 18 ++++++++++++++----
+ util/options.cc | 2 +-
+ util/options.hh | 2 +-
+ 3 files changed, 16 insertions(+), 6 deletions(-)
+
+commit 2fef993460dcfd94c92ab35413bdde18ad2b0ceb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 6 19:35:04 2012 -0700
+
+ [Graphite] Fix graphite2 backend with RTL text
+
+ Patch from Martin Hosken.
+
+ src/hb-graphite2.cc | 33 ++++++++++++++++++---------------
+ 1 files changed, 18 insertions(+), 15 deletions(-)
+
+commit e4992e13e19877a73ea05fc1d31005a262c685ad
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 6 19:25:39 2012 -0700
+
+ [Graphite] Port graphite2 backend to new shaper infrastructure
+
+ src/hb-graphite2.cc | 234
+ ++++++++++++++++++++++--------------------------
+ src/hb-graphite2.h | 2 +-
+ src/hb-shaper-list.hh | 2 +-
+ 3 files changed, 109 insertions(+), 129 deletions(-)
+
+commit 66591ececfba9791de06c814f5f30131e95e5fd2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 6 17:07:19 2012 -0700
+
+ Remove unnecessary lifecycle bits
+
+ We already set recount to INVALID when destroying.
+ This block was not necessary.
+
+ src/hb-font.cc | 3 ---
+ 1 files changed, 0 insertions(+), 3 deletions(-)
+
+commit e3320ecc1b5a7eaccc7c9370b2d1b76850f054be
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 6 11:44:10 2012 -0700
+
+ Fix compiler warnings
+
+ configure.ac | 12 +++++++++---
+ 1 files changed, 9 insertions(+), 3 deletions(-)
+
+commit 167b625d988b74572d6b2f646c285b666b650d49
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 5 21:16:26 2012 -0700
+
+ [Indic] Minor, move 'blwf' after 'half'
+
+ We don't apply them together anyway. Should not make any difference
+ right now.
+
+ src/hb-ot-shape-complex-indic.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 048e3b596fb7fccd3fb5f48de98b6b67788f774a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 4 18:04:57 2012 -0700
+
+ Speed up hb_set_digest_lowest_bits_t calcs
+
+ src/hb-set-private.hh | 10 +++++++---
+ 1 files changed, 7 insertions(+), 3 deletions(-)
+
+commit 3d1b66a35e1ab3be19335705f310b278d76d66d2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 4 17:42:28 2012 -0700
+
+ Speed up hb_set_digest_common_bits_t calcs
+
+ src/hb-set-private.hh | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit bdc48a879a1900138d8caaa8d90fb9fe1e768d1d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 4 17:08:38 2012 -0700
+
+ Enlarge glyph_name buffer
+
+ Lohit Devanagari has a glyph named:
+ u0924_u094D.half_u0930_u094D.blwf.vatu
+
+ util/options.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 25326c2359b0a3e25222b94acd142bc36eff78a4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 4 16:43:18 2012 -0700
+
+ Rewrite ARRAY_LENGTH as a template function
+
+ Such it wouldn't apply to pointers accidentally.
+
+ src/hb-ot-shape-complex-arabic-table.hh | 4 ++--
+ src/hb-private.hh | 9 ++++++---
+ 2 files changed, 8 insertions(+), 5 deletions(-)
+
+commit 8ba8042821e4581fe4e87419e58c823520441205
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 3 18:54:54 2012 -0700
+
+ [Indic] Fix consonant position font lookup logic
+
+ Oops. I broken this badly and the test suite did not notice. That
+ worries me. Have to investigate.
+
+ src/hb-ot-shape-complex-indic.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit abd0c05f1f7f0546593bb2f1c4d59db12cb32e46
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 3 18:45:05 2012 -0700
+
+ Minor
+
+ src/test-would-substitute.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 46ee108ef80f5d4675899862698a8c34d8fcfab5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 3 18:21:13 2012 -0700
+
+ Fix leak
+
+ src/hb-shape-plan.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 71baea0062da4d7f143d62da38492a0813814e49
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 3 17:40:07 2012 -0700
+
+ [OT] Use general-category, not GDEF class, to decide to zero mark
+ advances
+
+ At this point, the GDEF glyph synthesis looks pointless. Not that I
+ have many fonts without GDEF lying around.
+
+ As for mark advance zeroing when GPOS not available, that also
+ is being
+ replaced by proper fallback mark positioning soon.
+
+ src/hb-ot-shape.cc | 7 ++-----
+ 1 files changed, 2 insertions(+), 5 deletions(-)
+
+commit 3a7e137a68ec8f723dc3afa89c918ca2df7ff6bf
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 3 17:23:40 2012 -0700
+
+ Dn't use gint
+
+ src/hb-glib.cc | 4 ++--
+ src/hb-icu.cc | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 11b0e20ba42bf0b17133c3e1087732802bb4f230
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 14:21:40 2012 -0400
+
+ [Indic] Add per-script configuration tables
+
+ This concludes the Indic shape_plan work. May do for Arabic also...
+
+ src/hb-ot-shape-complex-indic-private.hh | 16 +-
+ src/hb-ot-shape-complex-indic.cc | 309
+ +++++++++++++++---------------
+ 2 files changed, 159 insertions(+), 166 deletions(-)
+
+commit 85fc6c483f6d734febbe39270e84701a651f01f1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 12:21:44 2012 -0400
+
+ [Indic] Move more stuff to the shape_plan
+
+ Almost done. Need to add per-script static tables.
+
+ src/hb-ot-shape-complex-indic-machine.rl | 4 +-
+ src/hb-ot-shape-complex-indic.cc | 216
+ ++++++++++++++++--------------
+ 2 files changed, 116 insertions(+), 104 deletions(-)
+
+commit 914ffaa40fcca020f65bacdd709421e9047afd83
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 11:03:39 2012 -0400
+
+ [Indic] Move more repeated work into shape_plan
+
+ src/hb-ot-shape-complex-indic.cc | 63
+ +++++++++++++++++++++++++------------
+ 1 files changed, 42 insertions(+), 21 deletions(-)
+
+commit a8c6da90f4c6e8d27a3a1b758a55476776d9f750
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 10:46:34 2012 -0400
+
+ [OT] Add per-complex-shaper shape_plan data
+
+ Hookup some Indic data to it. More to come.
+
+ src/hb-ot-shape-complex-arabic.cc | 2 +
+ src/hb-ot-shape-complex-indic.cc | 128
+ +++++++++++++++++++++---------------
+ src/hb-ot-shape-complex-misc.cc | 4 +
+ src/hb-ot-shape-complex-private.hh | 16 ++++-
+ src/hb-ot-shape-private.hh | 1 +
+ src/hb-ot-shape.cc | 23 +++++--
+ 6 files changed, 113 insertions(+), 61 deletions(-)
+
+commit 8bb5deba9630d35878eb6edb4643ecfabf99f15f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 10:07:58 2012 -0400
+
+ [OT] Pipe shape_plan down to pause_callbacks
+
+ src/hb-ot-map-private.hh | 8 ++--
+ src/hb-ot-map.cc | 11 +++---
+ src/hb-ot-shape-complex-indic-machine.rl | 4 +-
+ src/hb-ot-shape-complex-indic.cc | 50
+ ++++++++++++++---------------
+ src/hb-ot-shape-private.hh | 6 +++
+ src/hb-ot-shape.cc | 28 +++++++++-------
+ 6 files changed, 57 insertions(+), 50 deletions(-)
+
+commit 3e38c0f2886c38d2f0a9d80a97a36edf2479d2c7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 09:44:18 2012 -0400
+
+ More massaging
+
+ src/hb-ot-map-private.hh | 20 ++++++++------------
+ src/hb-ot-map.cc | 17 ++++++++---------
+ src/hb-ot-shape-complex-arabic.cc | 8 ++++----
+ src/hb-ot-shape-complex-indic.cc | 18 +++++++-----------
+ 4 files changed, 27 insertions(+), 36 deletions(-)
+
+commit 16c6a27b4bffc19026944c7bea9cf0a3a8ff1d8f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 09:38:28 2012 -0400
+
+ [OT] Port complex_shaper to planner/plan
+
+ src/hb-ot-shape-complex-arabic.cc | 17 ++++++++---------
+ src/hb-ot-shape-complex-indic.cc | 19 ++++++++-----------
+ src/hb-ot-shape-complex-misc.cc | 20 ++++++++------------
+ src/hb-ot-shape-complex-private.hh | 32
+ +++++++++++---------------------
+ src/hb-ot-shape-private.hh | 14 +++++++++++---
+ src/hb-ot-shape.cc | 9 +++++----
+ 6 files changed, 51 insertions(+), 60 deletions(-)
+
+commit 5393e3a62ba09fd7bcf3767b36225c8f49badb9d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 09:24:35 2012 -0400
+
+ [OT] Minor refactoring
+
+ src/hb-ot-map.cc | 4 ----
+ src/hb-ot-shape-private.hh | 26 ++++++++++++++++++++++++++
+ src/hb-ot-shape.cc | 26 ++------------------------
+ src/hb-shape-plan.cc | 2 ++
+ src/hb-shape.cc | 2 --
+ 5 files changed, 30 insertions(+), 30 deletions(-)
+
+commit 24eacf17c801c66a2d466e8ae02b73f501a26b25
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 08:42:11 2012 -0400
+
+ [Indic] Move consonant-position-setting into initial_reordering()
+
+ src/hb-ot-shape-complex-indic.cc | 65
+ ++++++++++++++++++++-----------------
+ 1 files changed, 35 insertions(+), 30 deletions(-)
+
+commit afbcc24be01a64bdb5c05c63880269145fa1d3c8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 08:36:40 2012 -0400
+
+ [GSUB] Wire the font, not just the face, down to substitute()
+
+ We need the font for glyph lookup during GSUB pauses in Indic shaper.
+ Could perhaps be avoided, but at this point, we don't mean to support
+ separate substitute()/position() entry points (anymore), so there is
+ no point in not providing the font to GSUB.
+
+ src/hb-ot-layout-gsub-table.hh | 13 +++++--------
+ src/hb-ot-layout-gsubgpos-private.hh | 7 ++-----
+ src/hb-ot-layout-private.hh | 6 +++---
+ src/hb-ot-layout.cc | 18 +++++++++---------
+ src/hb-ot-map-private.hh | 15 ++++++---------
+ src/hb-ot-map.cc | 8 ++++----
+ src/hb-ot-shape-complex-indic.cc | 8 ++++----
+ src/hb-ot-shape.cc | 6 +++---
+ 8 files changed, 36 insertions(+), 45 deletions(-)
+
+commit b0e6a26a10ccca70ebc88a9e158a89ccfab0add5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 08:11:14 2012 -0400
+
+ [OT] Hide some API
+
+ It was impossible to meaningfully use them from the outside these
+ days.
+
+ src/hb-ot-layout-private.hh | 40
+ ++++++++++++++++++++++++++++++++--------
+ src/hb-ot-layout.cc | 20 --------------------
+ src/hb-ot-layout.h | 34 ----------------------------------
+ src/hb-ot-map.cc | 8 ++++----
+ 4 files changed, 36 insertions(+), 66 deletions(-)
+
+commit 305246744ed178f116e01498b7f9d1af6950ca30
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 08:08:04 2012 -0400
+
+ Minor
+
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 8ef3d53255ae9fbb0e46c22909e50009d1e7eeb0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 07:53:18 2012 -0400
+
+ [Indic] More refactoring of consonant position peeking in the font
+
+ To be moved to initial_reordering next...
+
+ src/hb-ot-shape-complex-indic.cc | 59
+ ++++++++++++++++++++++++++-----------
+ 1 files changed, 41 insertions(+), 18 deletions(-)
+
+commit 3eb6f81fd3f1e56679eec10d08f5e2303121753f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 07:37:46 2012 -0400
+
+ [Indic] Refactor
+
+ Move all the logic that needs to eventually move into the indic table
+ into hb-ot-shape-complex-indic-private.hh.
+
+ src/hb-ot-shape-complex-indic-private.hh | 210
+ +++++++++++++++++++++++++++
+ src/hb-ot-shape-complex-indic.cc | 227
+ +----------------------------
+ 2 files changed, 218 insertions(+), 219 deletions(-)
+
+commit 3614ba242fc7d338761acdda365a134706035b6d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 07:13:55 2012 -0400
+
+ [Indic] Rename
+
+ src/hb-ot-shape-complex-indic.cc | 40
+ +++++++++++++++++++------------------
+ 1 files changed, 21 insertions(+), 19 deletions(-)
+
+commit 610e5e8f713bb2a68939b72cb2b801a7aaede4f9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 05:27:46 2012 -0400
+
+ [Indic] Streamline feature would_apply()
+
+ Comes with some 10% speedup for Devanagari even!
+
+ src/hb-ot-map-private.hh | 85
+ +++++++++++++++++++++++--------------
+ src/hb-ot-map.cc | 18 ++++----
+ src/hb-ot-shape-complex-indic.cc | 85
+ +++++++++++++++++++++----------------
+ 3 files changed, 110 insertions(+), 78 deletions(-)
+
+commit 1d002048d5afcd45abbb09fdf0419f13b2e2265c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 05:01:11 2012 -0400
+
+ [Indic] Minor
+
+ src/hb-ot-shape-complex-indic-private.hh | 16 -------
+ src/hb-ot-shape-complex-indic.cc | 64
+ ++++++++++++++++++++----------
+ 2 files changed, 43 insertions(+), 37 deletions(-)
+
+commit 6f7611375521c6d285a9aa763f2ea5cb44cd0d39
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 04:00:31 2012 -0400
+
+ [GSUB/GPOS] Check array size before accessing digests
+
+ src/hb-ot-layout-private.hh | 3 +++
+ src/hb-ot-layout.cc | 32 ++++++++++++++++----------------
+ 2 files changed, 19 insertions(+), 16 deletions(-)
+
+commit 22148b8c4af3ed296d96e969cdd47bac97b32307
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 03:51:51 2012 -0400
+
+ Use Coverage digests in would_apply
+
+ src/hb-ot-layout-gsub-table.hh | 1 +
+ src/hb-ot-layout-gsubgpos-private.hh | 6 +++++-
+ src/hb-ot-layout.cc | 4 ++--
+ 3 files changed, 8 insertions(+), 3 deletions(-)
+
+commit 6c459c8fef85bc44f45d7b58c28a34abfb2c33fc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 2 03:45:53 2012 -0400
+
+ Minor
+
+ src/hb-ot-layout-gpos-table.hh | 2 +-
+ src/hb-ot-layout-gsub-table.hh | 4 ++--
+ src/hb-ot-layout-gsubgpos-private.hh | 4 ++--
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+commit e2b8d75fa6e847ecf5c040f4e1e16a565c5d8aaf
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 1 22:17:48 2012 -0400
+
+ Use wider set digests on 64-bit archs
+
+ src/hb-set-private.hh | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 0120ce9679aab3ac936aeb18f6709529eef000a4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 1 21:56:35 2012 -0400
+
+ [GSUB/GPOS] Remove unused get_coverage() methods
+
+ src/hb-ot-layout-gpos-table.hh | 11 -----------
+ src/hb-ot-layout-gsub-table.hh | 11 -----------
+ 2 files changed, 0 insertions(+), 22 deletions(-)
+
+commit 1336ecdf8e4e9879b96b26ecfbf5c9ba6c49e2b9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 1 21:46:36 2012 -0400
+
+ [GSUB/GPOS] Use Coverage digests as gatekeeper
+
+ Gives me a good 10% speedup for the Devanagari test case. Less so
+ for less lookup-intensive tests.
+
+ For the Devanagari test case, the false positive rate of the GSUB
+ digest
+ is 4%.
+
+ src/hb-ot-layout-gpos-table.hh | 30 ++++++++--------------------
+ src/hb-ot-layout-gsub-table.hh | 35
+ +++++++++++----------------------
+ src/hb-ot-layout-gsubgpos-private.hh | 8 +++++-
+ src/hb-ot-layout-private.hh | 4 +++
+ src/hb-ot-layout.cc | 29 ++++++++++++++++++++++++---
+ 5 files changed, 56 insertions(+), 50 deletions(-)
+
+commit a878c58a8fc1500986d713b2bcedfeb90a0087b0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 1 21:18:54 2012 -0400
+
+ [GSUB/GPOS] Add add_coverage()
+
+ src/hb-ot-layout-gpos-table.hh | 18 ++++++++++++++++++
+ src/hb-ot-layout-gsub-table.hh | 18 ++++++++++++++++++
+ 2 files changed, 36 insertions(+), 0 deletions(-)
+
+commit 60a3035ac5ec8227e4cc0e6708732bb139c9e0b8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 1 21:06:27 2012 -0400
+
+ Add hb_set_digest_t
+
+ Implement two set digests, and one that combines the two.
+
+ src/hb-set-private.hh | 95
+ +++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 95 insertions(+), 0 deletions(-)
+
+commit c8accf1dd2d92cc4f714393eb0ea46f69bb182a6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 1 21:05:57 2012 -0400
+
+ [OT] Templatize Coverage::add_coverage()
+
+ src/hb-ot-layout-common-private.hh | 12 ++++++++----
+ 1 files changed, 8 insertions(+), 4 deletions(-)
+
+commit 8fbfda920e0b3bb4ab7afb732826026964b79be9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 1 19:03:46 2012 -0400
+
+ Inline font getters
+
+ src/hb-fallback-shape.cc | 21 ++--
+ src/hb-font-private.hh | 204
+ +++++++++++++++++++++++++++++++++++++
+ src/hb-font.cc | 129 ++++--------------------
+ src/hb-graphite2.cc | 6 +-
+ src/hb-old.cc | 10 +-
+ src/hb-ot-layout-gdef-table.hh | 2 +-
+ src/hb-ot-layout-gpos-table.hh | 2 +-
+ src/hb-ot-shape-complex-arabic.cc | 4 +-
+ src/hb-ot-shape-complex-indic.cc | 6 +-
+ src/hb-ot-shape-normalize.cc | 12 +-
+ src/hb-ot-shape.cc | 47 ++++-----
+ 11 files changed, 277 insertions(+), 166 deletions(-)
+
+commit 6adf417bc15d4524e280b284e3accd1ae647662e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 1 18:07:42 2012 -0400
+
+ Use a lookup table for modified_combining_class
+
+ src/hb-unicode-private.hh | 10 ++-
+ src/hb-unicode.cc | 213
+ +++++++++++++++++++++++++++++++--------------
+ src/hb-unicode.h | 4 +
+ 3 files changed, 157 insertions(+), 70 deletions(-)
+
+commit 208f70f0553d73d2908b21b9552298029482a8b9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 1 17:13:10 2012 -0400
+
+ Inline Unicode callbacks internally
+
+ src/hb-buffer.cc | 2 +-
+ src/hb-fallback-shape.cc | 2 +-
+ src/hb-old.cc | 2 +-
+ src/hb-ot-shape-complex-misc.cc | 2 +-
+ src/hb-ot-shape-normalize.cc | 13 ++---
+ src/hb-ot-shape-private.hh | 6 +-
+ src/hb-ot-shape.cc | 4 +-
+ src/hb-unicode-private.hh | 112
+ +++++++++++++++++++-------------------
+ src/hb-unicode.cc | 5 +-
+ 9 files changed, 73 insertions(+), 75 deletions(-)
+
+commit 7470315a3e782aa6192bbe64f7a3944266fb1521
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 1 17:01:59 2012 -0400
+
+ Move unicode accessors around
+
+ src/hb-unicode-private.hh | 73
+ ++++++++++++++++++++++++++++++++++++++++++++-
+ src/hb-unicode.cc | 65 ++++------------------------------------
+ 2 files changed, 78 insertions(+), 60 deletions(-)
+
+commit 21fdcee00125b6e1c09f0bed3064d16ccd3a7a5d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 1 16:23:44 2012 -0400
+
+ Add hb_unicode_combining_class_t
+
+ src/hb-common.h | 38 +-------------
+ src/hb-glib.cc | 4 +-
+ src/hb-icu.cc | 4 +-
+ src/hb-unicode-private.hh | 2 +-
+ src/hb-unicode.cc | 11 ++--
+ src/hb-unicode.h | 124
+ ++++++++++++++++++++++++++++++++++++++++++++-
+ 6 files changed, 134 insertions(+), 49 deletions(-)
+
+commit 84186a64004e5dcd2ce98b564d0e0a09aa5d68b2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 1 13:32:39 2012 -0400
+
+ Add commentary on the compatibility decomposition in the normalizer
+
+ src/hb-ot-shape-normalize.cc | 18 +++++++++++++++---
+ 1 files changed, 15 insertions(+), 3 deletions(-)
+
+commit 0834d952017a04c6f4599e574cb75ecf3ca27d3b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 1 00:21:09 2012 -0400
+
+ [hb-old] Adjust mark positioning parameters
+
+ Fallback mark positioning works now... With hb-ft and hb-view /
+ hb-shape at least.
+
+ src/hb-old.cc | 10 +++++-----
+ src/hb-old/harfbuzz-shaper.cpp | 1 +
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+commit 4ca743dfb8e09f9fa525061c7f1144d55f72effb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 1 00:03:41 2012 -0400
+
+ [old] Implement fontMetrics
+
+ src/hb-old.cc | 11 ++++++++++-
+ 1 files changed, 10 insertions(+), 1 deletions(-)
+
+commit 1e7d860613032e40a3f90e2caa2ee5ac44ab8c8c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 31 23:41:06 2012 -0400
+
+ [GPOS] Adjust mark advance-width zeroing logic
+
+ If there is no GPOS, zero mark advances.
+
+ If there *is* GPOS and the shaper requests so, zero mark advances for
+ attached marks.
+
+ Fixes regression with Tibetan, where the font has GPOS, and marks a
+ glyph as mark where it shouldn't get zero advance.
+
+ src/hb-ot-layout-gpos-table.hh | 14 ++++++++------
+ src/hb-ot-layout.cc | 4 ++--
+ src/hb-ot-layout.h | 3 ++-
+ src/hb-ot-shape-complex-arabic.cc | 2 +-
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ src/hb-ot-shape-complex-misc.cc | 4 ++--
+ src/hb-ot-shape-complex-private.hh | 2 +-
+ src/hb-ot-shape.cc | 6 ++----
+ 8 files changed, 19 insertions(+), 18 deletions(-)
+
+commit a8842e4a448efb30f3f2f3c628d6dc4824829726
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 31 23:10:11 2012 -0400
+
+ Remove some TODO items
+
+ TODO | 27 ---------------------------
+ src/hb-shape.cc | 2 ++
+ 2 files changed, 2 insertions(+), 27 deletions(-)
+
+commit 2bc3b9a616cedbc56ff4a915f9e3439ff3a6bf13
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 31 23:08:25 2012 -0400
+
+ [OT] Zero mark advances if the shaper desires so
+
+ Enabled for all shapers except for Indic.
+
+ src/hb-ot-shape-complex-arabic.cc | 1 +
+ src/hb-ot-shape-complex-indic.cc | 1 +
+ src/hb-ot-shape-complex-misc.cc | 2 ++
+ src/hb-ot-shape-complex-private.hh | 2 ++
+ src/hb-ot-shape.cc | 15 +++++++++++++++
+ 5 files changed, 21 insertions(+), 0 deletions(-)
+
+commit 5fecd8b0355894ceda14b3d3c654f20c3d5e77f4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 31 22:48:38 2012 -0400
+
+ [OT] Synthesize glyph classes
+
+ TODO | 2 --
+ src/hb-ot-shape.cc | 20 ++++++++++++++++++--
+ 2 files changed, 18 insertions(+), 4 deletions(-)
+
+commit 03b09214c073ce37eeb8af5218942c85b2d393df
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 31 22:43:58 2012 -0400
+
+ [GSUB] Minor
+
+ src/hb-ot-layout-gsub-table.hh | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit f0fc1df8fc949739b68d55948741016081b69c3a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 31 22:43:32 2012 -0400
+
+ [hb-old] Implement getGlyphMetrics()
+
+ Still working on it.
+
+ src/hb-old.cc | 13 ++++++++++++-
+ 1 files changed, 12 insertions(+), 1 deletions(-)
+
+commit 378d279bbf692195c4654e312dae854ab3be04cf
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 31 21:36:16 2012 -0400
+
+ Implement Unicode compatibility decompositions
+
+ Based on patch from Philip Withnall.
+ https://bugs.freedesktop.org/show_bug.cgi?id=41095
+
+ src/hb-glib.cc | 30 +++++++++++++++++++++++
+ src/hb-icu.cc | 36 +++++++++++++++++++++++++++-
+ src/hb-ot-shape-normalize.cc | 53
+ +++++++++++++++++++++++++++--------------
+ src/hb-unicode-private.hh | 1 +
+ src/hb-unicode.cc | 27 ++++++++++++++++++++-
+ src/hb-unicode.h | 37 ++++++++++++++++++++++++++++-
+ test/api/hb-test.h | 1 +
+ test/api/test-unicode.c | 50
+ +++++++++++++++++++++++++++++++++++++++
+ 8 files changed, 214 insertions(+), 21 deletions(-)
+
+commit 321ec29cc270e7e66a529696b70b2caac553c95f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 31 21:10:16 2012 -0400
+
+ Remove unused function
+
+ src/hb-ot-shape-complex-indic.cc | 7 -------
+ 1 files changed, 0 insertions(+), 7 deletions(-)
+
+commit 69cc492dc120847ed00cae65ec958593ebf550c5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 31 14:51:36 2012 -0400
+
+ [buffer] Minor
+
+ src/hb-buffer-private.hh | 3 ++-
+ src/hb-buffer.cc | 24 ++++++++++++------------
+ 2 files changed, 14 insertions(+), 13 deletions(-)
+
+commit 693918ef8541014a5ef7dfb91c6ea0ae36d9c368
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 21:08:51 2012 -0400
+
+ [OT] Streamline complex shaper enumeration
+
+ Add a shaper class struct.
+
+ src/hb-ot-shape-complex-arabic.cc | 37 +++----
+ src/hb-ot-shape-complex-indic.cc | 47 ++++++---
+ src/hb-ot-shape-complex-misc.cc | 67 ++++++--------
+ src/hb-ot-shape-complex-private.hh | 179
+ ++++++++++------------------------
+ src/hb-ot-shape-normalize-private.hh | 4 +-
+ src/hb-ot-shape-private.hh | 2 +-
+ src/hb-ot-shape.cc | 16 ++-
+ 7 files changed, 143 insertions(+), 209 deletions(-)
+
+commit c2e42c3db691515f3a458eb4c71fe1e6439d5620
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 19:54:50 2012 -0400
+
+ Minor
+
+ src/hb-ot-layout-gpos-table.hh | 2 +-
+ src/hb-ot-layout-gsub-table.hh | 4 ++--
+ src/hb-ot-layout-gsubgpos-private.hh | 8 ++++----
+ src/hb-ot-layout-private.hh | 4 ++--
+ 4 files changed, 9 insertions(+), 9 deletions(-)
+
+commit 03f67bc012f42131b36083a23efc78e1b04b828c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 19:47:53 2012 -0400
+
+ More refactoring glyph class access
+
+ src/hb-ot-layout-gpos-table.hh | 2 +-
+ src/hb-ot-layout-gsub-table.hh | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 154
+ ++++++++++++++++------------------
+ 3 files changed, 76 insertions(+), 82 deletions(-)
+
+commit 300c7307eb7943ba7416b672345506be1e27c6ba
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 19:37:44 2012 -0400
+
+ [OT] Don't crash if no GDEF available
+
+ src/hb-ot-layout-gsubgpos-private.hh | 8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+commit 3dcbdc2125c04c173f29f04922fc031929893f4e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 19:31:17 2012 -0400
+
+ Minor
+
+ src/hb-ot-layout.cc | 15 +++++----------
+ 1 files changed, 5 insertions(+), 10 deletions(-)
+
+commit 05bd1b63426e07d1df7a1b40bf845dc94ab995a8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 19:30:01 2012 -0400
+
+ [GSUB/GPOS] Move glyph props matching around
+
+ src/hb-ot-layout-gpos-table.hh | 11 ++--
+ src/hb-ot-layout-gsub-table.hh | 18 ++++--
+ src/hb-ot-layout-gsubgpos-private.hh | 99
+ ++++++++++++++++++++++++++++----
+ src/hb-ot-layout-private.hh | 12 ----
+ src/hb-ot-layout.cc | 104
+ +++-------------------------------
+ src/hb-ot-layout.h | 12 +++-
+ src/hb-ot-shape.cc | 10 ++--
+ 7 files changed, 127 insertions(+), 139 deletions(-)
+
+commit 2fca1426ca06cabbe8f027f2dc9dee9c27560c76
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 18:46:41 2012 -0400
+
+ [GSUB] Don't erase glyph classes if GDEF does not have glyph classes
+
+ src/hb-ot-layout-gsubgpos-private.hh | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit fd42257f8c45ff8e036e1c3eb1a788a101be7ead
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 18:40:27 2012 -0400
+
+ Minor
+
+ src/hb-ot-layout.cc | 29 +++++------------------------
+ 1 files changed, 5 insertions(+), 24 deletions(-)
+
+commit 7fbbf86efe675e4c038dfc5985c24bbc544620cd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 18:36:42 2012 -0400
+
+ [GSUB] Minor
+
+ src/hb-ot-layout-gsub-table.hh | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 6 ++++++
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 713914d3203109a8e9213f5a1d3b384730703ce9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 17:54:38 2012 -0400
+
+ [Uniscribe] Clean up a bit
+
+ src/hb-uniscribe.cc | 17 +++++------------
+ 1 files changed, 5 insertions(+), 12 deletions(-)
+
+commit 301168dae77a63ee25adfb26ce2b54a708f83791
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 17:48:04 2012 -0400
+
+ [CoreText] Port to shape_plan infrastructure
+
+ src/hb-coretext.cc | 161
+ ++++++++++++++++++++++++++--------------------------
+ 1 files changed, 80 insertions(+), 81 deletions(-)
+
+commit 6cdfd14bb19d60ac3d6b20ff611408432254f273
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 17:22:17 2012 -0400
+
+ Fix build on Mac
+
+ src/hb-ot-layout-gsub-table.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 7e34601dededd521bcef15111e39293df3d0d13d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 14:53:41 2012 -0400
+
+ Unbreak Hangul jamo composition
+
+ When we removed the separate Hangul shaper, the specific normalization
+ preference of Hangul was lost. Fix that. Also, the Thai shaper was
+ copied from Hangul, so had the fully-composed normalization behavior,
+ which was unnecessary. So, fix that too.
+
+ src/hb-ot-shape-complex-arabic.cc | 2 +-
+ src/hb-ot-shape-complex-indic.cc | 4 +---
+ src/hb-ot-shape-complex-misc.cc | 12 +++++++++---
+ src/hb-ot-shape-complex-private.hh | 9 ++++-----
+ src/hb-ot-shape.cc | 4 +++-
+ 5 files changed, 18 insertions(+), 13 deletions(-)
+
+commit 7afb14407e59dfeaa79c33aca1ffa60e7982e349
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 13:54:46 2012 -0400
+
+ [Indic] Recategorize Telugu length marks
+
+ Fixes 8 more Telugu tests. Failures at 15 (0.00154548%).
+
+ src/hb-unicode.cc | 8 ++++++++
+ src/indic.cc | 11 ++++++++---
+ 2 files changed, 16 insertions(+), 3 deletions(-)
+
+commit 70b3dc327232b20051b36397aa2b196ab8c62397
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 12:40:18 2012 -0400
+
+ Add Hebrew test
+
+ .../script-hebrew/misc/diacritics.txt | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit f2377155e35c15919af4d7db21b6edc6783146b6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 10:50:57 2012 -0400
+
+ [hb-old] Fix misc leaks
+
+ Backport (forward-port?!) from upstream:
+
+ commit 3ab7b37bdebf0f8773493a1fee910b151c4de30f
+ Author: Behdad Esfahbod <behdad@behdad.org>
+ Date: Mon Jul 30 10:50:22 2012 -0400
+
+ Fix misc leaks
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=31992
+ https://bugs.freedesktop.org/show_bug.cgi?id=31993
+ https://bugs.freedesktop.org/show_bug.cgi?id=31994
+ https://bugs.freedesktop.org/show_bug.cgi?id=31995
+
+ src/hb-old/harfbuzz-arabic.c | 12 +++++++++---
+ src/hb-old/harfbuzz-gpos.c | 6 +++---
+ src/hb-old/harfbuzz-gsub.c | 6 +++---
+ src/hb-old/harfbuzz-tibetan.c | 1 +
+ 4 files changed, 16 insertions(+), 9 deletions(-)
+
+commit 3f4764bb56bb7e42ba8859f1905810bd2f998838
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 10:06:42 2012 -0400
+
+ Don't lock user_data set during destruction if empty
+
+ src/hb-private.hh | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 4ba647eecf0f70917ac4229af1f2dd3c62fcb7d5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 09:53:06 2012 -0400
+
+ Fix leak
+
+ src/hb-ot-shape.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit f860366456d9e59b139a940da6d89c3c4fb9e96e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 02:38:39 2012 -0400
+
+ [OT] Gain back some lost speed
+
+ src/hb-ot-layout-private.hh | 27 +++++++++++++++-
+ src/hb-ot-layout.cc | 63
+ ++++++++++++++++++++++++++++++++---
+ src/hb-ot-map-private.hh | 26 +++------------
+ src/hb-ot-map.cc | 35 ++++++++++++++------
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ src/hb-ot-shape-complex-private.hh | 5 ---
+ 6 files changed, 114 insertions(+), 44 deletions(-)
+
+commit 11f4c87d01924cac43bf40044f67838440e19e42
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 02:36:46 2012 -0400
+
+ [OT] Remove hb_ot_layout_ensure()
+
+ I didn't like it from the beginning.
+
+ src/hb-ot-layout.cc | 9 +++++----
+ src/hb-ot-layout.h | 5 -----
+ 2 files changed, 5 insertions(+), 9 deletions(-)
+
+commit 578e42182b9b9cf15b4c5426fae36e224160cbd7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 02:35:07 2012 -0400
+
+ Minor
+
+ src/hb-ot-layout-private.hh | 2 --
+ src/hb-ot-layout.cc | 1 -
+ 2 files changed, 0 insertions(+), 3 deletions(-)
+
+commit a973b5ce86051e8ef0d20df362db1a50488842ab
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 01:46:34 2012 -0400
+
+ [GSUB] Further adjustments to mark-attachment vs ligation interaction
+
+ The d1d69ec52e75a78575b620a1c456d528b6078170 change broke Kannada
+ badly,
+ since it was ligating consonants, pushing matra out, and then ligating
+ with the matra. Adjust for that. See comments.
+
+ src/hb-ot-layout-gsub-table.hh | 11 ++++++++---
+ .../indic/script-kannada/misc/misc.txt | 1 +
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+commit 0aef425e25e2c58445157057f17ef18f695c5240
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 00:55:15 2012 -0400
+
+ [GSUB] Minor
+
+ src/hb-ot-layout-gpos-table.hh | 15 ++++++---------
+ 1 files changed, 6 insertions(+), 9 deletions(-)
+
+commit d1d69ec52e75a78575b620a1c456d528b6078170
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 00:51:47 2012 -0400
+
+ [GSUB] Don't ligate glyphs attached to different components of
+ ligatures
+
+ This concludes the mark-attachment vs ligating interaction fixes
+ (for now).
+
+ src/hb-ot-layout-gsub-table.hh | 24 ++++++++++++++++++++++++
+ 1 files changed, 24 insertions(+), 0 deletions(-)
+
+commit 4751dec8be05883483fd5f6b474ebd22583ae566
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 00:42:07 2012 -0400
+
+ Minor
+
+ src/hb-ot-layout-private.hh | 20 ++++++++++----------
+ 1 files changed, 10 insertions(+), 10 deletions(-)
+
+commit f24bcfbed1f3b4f4f6311246bd870f73ad6ba750
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 00:39:00 2012 -0400
+
+ Minor
+
+ src/hb-ot-layout-gsub-table.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit fe20c0f84f5ff518dc471bf22ac5a83ef079eb69
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 30 00:00:59 2012 -0400
+
+ [GSUB] Fix mark component stuff when ligatures form ligatures!
+
+ See comments.
+
+ Fixes https://bugzilla.gnome.org/show_bug.cgi?id=437633
+
+ src/hb-ot-layout-gsub-table.hh | 117
+ ++++++++++++++++++++++------------
+ src/hb-ot-layout-gsubgpos-private.hh | 8 --
+ src/hb-ot-layout-private.hh | 8 +--
+ 3 files changed, 79 insertions(+), 54 deletions(-)
+
+commit 2ec3ba46a3c24469096e901750e38f6ee555479a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 29 22:02:24 2012 -0400
+
+ [GSUB/GPOS] Minor
+
+ Start squeezing more out of lig_id/lig_comp.
+
+ src/hb-ot-layout-gsub-table.hh | 6 +++---
+ src/hb-ot-layout-private.hh | 35 +++++++++++++++++++++++++++++++----
+ 2 files changed, 34 insertions(+), 7 deletions(-)
+
+commit ef6e9cec3399e4f63f4b662abd77cf6d4683e8a3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 29 21:35:22 2012 -0400
+
+ Fixup bb0e4ba3e9c5a407fc5d73c914e429d24d336380
+
+ src/hb-shape-plan.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit cb3d34063154bf164c61eeba41c6166b0bd304fb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 29 20:37:38 2012 -0400
+
+ [GSUB] Don't set new lig_id on mark ligatures
+
+ If two marks form a ligature, retain their previous lig_id, such that
+ the mark ligature can attach to ligature components...
+
+ Fixes https://bugzilla.gnome.org/show_bug.cgi?id=676343
+
+ In fact, I noticed that we should not let ligatures form between
+ glyphs
+ coming from different components of a previous ligature. For example,
+ if the sequence is: LAM,SHADDA,LAM,FATHA,HEH, the LAM,LAM,HEH form a
+ ligature, putting SHADDA and FATHA next to eachother. However,
+ it would
+ be wrong to ligate them. Uniscribe has this bug also.
+
+ src/hb-ot-layout-gsub-table.hh | 18 ++++++++++++++----
+ 1 files changed, 14 insertions(+), 4 deletions(-)
+
+commit 97a201becf936f62046914b568e5763e27ee936e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 29 20:31:36 2012 -0400
+
+ Add Arabic tests for mark ligature component attachments
+
+ .../script-arabic/misc/diacritics/MANIFEST | 1 +
+ .../misc/diacritics/ligature-components.txt | 18
+ ++++++++++++++++++
+ 2 files changed, 19 insertions(+), 0 deletions(-)
+
+commit a15b70a81a609f024083cb04f9819483f4d5cab7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 29 20:09:22 2012 -0400
+
+ [hb-old] Fix cluster formation in RTL
+
+ Unlike Uniscribe, hb-old returns glyphs in logical order, so the logic
+ does not need to duplicated for RTL.
+
+ src/hb-old.cc | 12 +++---------
+ 1 files changed, 3 insertions(+), 9 deletions(-)
+
+commit 8a7e70ef65952fc16b8c1d5f1126c94d9d81e755
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 29 19:56:54 2012 -0400
+
+ [Minor]
+
+ src/test.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit bb0e4ba3e9c5a407fc5d73c914e429d24d336380
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 29 17:34:14 2012 -0400
+
+ Minor
+
+ src/hb-shape-plan.cc | 2 +-
+ src/test-would-substitute.cc | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit a00ad60bc0fe74bf0e11d73da563239f3392f351
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 28 21:16:08 2012 -0400
+
+ [Uniscribe] Remove hb_uniscribe_font_ensure()
+
+ Wasn't a huge fan of putting the burden on the user. Just remove
+ it and
+ do what we've got to do transparently.
+
+ src/hb-uniscribe.cc | 6 +++++-
+ src/hb-uniscribe.h | 4 ----
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 5d874d566fe5d2cc4cfaf02c79b663d8a626ca1e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 28 21:05:25 2012 -0400
+
+ [GPOS] Fix mark-to-mark positioning when one of the marks is
+ a ligature
+
+ This commit: a3313e54008167e415b72c780ca7b9cda958d07e broke
+ MarkMarkPos
+ when one of the marks itself is a ligature. That regressed 26 Tibetan
+ tests (up from zero!). Fix that. Tibetan back to zero.
+
+ src/hb-ot-layout-gpos-table.hh | 27
+ ++++++++++++++-----
+ src/hb-ot-layout-private.hh | 5 ++-
+ test/shaping/texts/in-tree/shaper-indic/MANIFEST | 1 +
+ .../indic/script-sinhala/misc/MANIFEST | 1 +
+ .../in-tree/shaper-indic/south-asian/MANIFEST | 1 +
+ .../south-asian/script-tibetan/MANIFEST | 1 +
+ .../south-asian/script-tibetan/misc/MANIFEST | 1 +
+ .../south-asian/script-tibetan/misc/misc.txt | 1 +
+ 8 files changed, 29 insertions(+), 9 deletions(-)
+
+commit 338fe662b50f9309bf0050dd99becb644874195b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 28 18:53:01 2012 -0400
+
+ [GSUB] Minor
+
+ src/hb-ot-layout-gsub-table.hh | 33 ++++++++++++++++-----------------
+ 1 files changed, 16 insertions(+), 17 deletions(-)
+
+commit e6f7479fe34fb4a7cada61d84c2ed70d1fd565c8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 28 18:34:58 2012 -0400
+
+ [GSUB] Simplify would-apply
+
+ src/hb-ot-layout-gsub-table.hh | 71
+ +++-------------------------------
+ src/hb-ot-layout-gsubgpos-private.hh | 24 ++---------
+ 2 files changed, 11 insertions(+), 84 deletions(-)
+
+commit dadede012e4841f9fcb70d514fdc752f3ea4663d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 28 18:03:20 2012 -0400
+
+ Minor
+
+ src/hb-ot-layout-common-private.hh | 7 +++----
+ src/hb-ot-layout-gpos-table.hh | 2 +-
+ src/hb-ot-layout-gsub-table.hh | 2 +-
+ 3 files changed, 5 insertions(+), 6 deletions(-)
+
+commit 0b99429ead05ae32b3c210cb499af401b02770a9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 28 17:31:01 2012 -0400
+
+ [GSUB/GPOS] Add get_coverage() and use it to speed up main loop
+
+ And use it to speed up the hotspot by checking coverage directly in
+ the main loop, not 10 functions deep in.
+
+ Gives me a solid 20% boost with Indic test suite. Less so for less
+ lookup-intensive scenarios.
+
+ Remove the "fast_path" hack from before.
+
+ src/hb-ot-layout-gpos-table.hh | 179
+ +++++++++++++++++++++++++++++----
+ src/hb-ot-layout-gsub-table.hh | 166
+ ++++++++++++++++++++++++++------
+ src/hb-ot-layout-gsubgpos-private.hh | 26 +++++
+ 3 files changed, 321 insertions(+), 50 deletions(-)
+
+commit 30ec9002d84e8b49290e782e6192069821ffa942
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 28 17:25:20 2012 -0400
+
+ Reject lookups with no subTable
+
+ src/hb-ot-layout-common-private.hh | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 0981068b75710397f08e0d2d776a0a2ea68d7117
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 28 17:01:59 2012 -0400
+
+ [GSUB/GPOS] Reject Context/ChainContext lookups with zero input
+
+ src/hb-ot-layout-gsubgpos-private.hh | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 2f87cebe1062c7007021ebd05c1664e60da80825
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 27 04:02:38 2012 -0400
+
+ Implement shape_plan caching
+
+ Should give us some performance boost.
+
+ TODO | 4 ++
+ src/hb-buffer-private.hh | 30 ++++++++++++++
+ src/hb-font-private.hh | 6 +++
+ src/hb-font.cc | 15 ++++++-
+ src/hb-shape-plan.cc | 100
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-shape-plan.h | 7 +++
+ src/hb-shape.cc | 2 +-
+ 7 files changed, 162 insertions(+), 2 deletions(-)
+
+commit e9eb9503e97044222f843daacfa47e26e51312b7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 27 03:16:22 2012 -0400
+
+ Add default_shaper_list to shape_plan
+
+ src/hb-shape-plan-private.hh | 1 +
+ src/hb-shape-plan.cc | 2 ++
+ 2 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 3b7c4e270694ed962e2a2839e44f2a59c26b326c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 27 03:12:23 2012 -0400
+
+ Don't fail choosing shaper on planning failure
+
+ Shapers have a chance to reject a font in face shaper_data creation.
+ No need to allow failing during planning.
+
+ src/hb-shape-plan.cc | 17 ++++++-----------
+ 1 files changed, 6 insertions(+), 11 deletions(-)
+
+commit cfe9882610489e1b917e09a74dfbf6bbba2e4a57
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 27 03:06:30 2012 -0400
+
+ Add hb_ot_layout_ensure() and hb_uniscribe_font_ensure()
+
+ src/hb-ot-layout.cc | 7 +++++++
+ src/hb-ot-layout.h | 6 ++++++
+ src/hb-shape-plan.cc | 22 ++--------------------
+ src/hb-shaper-private.hh | 18 ++++++++++++++++++
+ src/hb-uniscribe.cc | 11 +++++++++++
+ src/hb-uniscribe.h | 4 ++++
+ 6 files changed, 48 insertions(+), 20 deletions(-)
+
+commit c5b668fb9239c912d2448280a7176e331ebc9181
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 27 02:49:39 2012 -0400
+
+ Choose one shaper per plan
+
+ src/hb-shape-plan-private.hh | 2 +-
+ src/hb-shape-plan.cc | 19 +++++++++----------
+ 2 files changed, 10 insertions(+), 11 deletions(-)
+
+commit e82061e8db922f0ddbefd5a184ee2f9f967b9a05
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 27 02:29:32 2012 -0400
+
+ Move ot shaper completely to shape_plan
+
+ src/hb-ot-shape-private.hh | 6 --
+ src/hb-ot-shape.cc | 181
+ ++++++++++++++++++++------------------------
+ src/hb-uniscribe.cc | 2 +-
+ 3 files changed, 84 insertions(+), 105 deletions(-)
+
+commit ea278d3895fe0c92801d692cd71d8d9f1de7c048
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 27 02:12:28 2012 -0400
+
+ Partially switch ot shaper to shape_plan
+
+ src/hb-buffer-private.hh | 1 +
+ src/hb-buffer.cc | 1 -
+ src/hb-font-private.hh | 2 --
+ src/hb-font.cc | 22 ++++++++++++++--------
+ src/hb-ot-layout-gpos-table.hh | 2 +-
+ src/hb-ot-layout-gsub-table.hh | 4 ++--
+ src/hb-ot-layout-private.hh | 1 +
+ src/hb-ot-layout.cc | 9 ++++++---
+ src/hb-ot-shape.cc | 3 ++-
+ src/hb-shape-plan.cc | 11 +++++++++++
+ src/hb-shaper-private.hh | 3 ++-
+ 11 files changed, 40 insertions(+), 19 deletions(-)
+
+commit b6b7ba1313bf686e6ed567183466104c90504a67
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 27 01:26:11 2012 -0400
+
+ Switch old and uniscribe backends to shape_plan
+
+ src/hb-old.cc | 80 ++-----------------------
+ src/hb-shape.cc | 5 ++
+ src/hb-shaper-impl-private.hh | 3 +-
+ src/hb-shaper-private.hh | 4 -
+ src/hb-uniscribe.cc | 130
+ ++++++++++++-----------------------------
+ 5 files changed, 48 insertions(+), 174 deletions(-)
+
+commit c32c096a429da3e64896cf42ff5ab8c775d3c2ec
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 27 01:13:53 2012 -0400
+
+ Switch to shape_plan
+
+ Not optimized yet. Eats babies. And no shaper uses the shape_plan.
+
+ src/hb-shape-plan.cc | 37 +++++++++++++++++++++++++++++++++++--
+ src/hb-shape-plan.h | 8 ++++++++
+ src/hb-shape.cc | 27 ++++-----------------------
+ 3 files changed, 47 insertions(+), 25 deletions(-)
+
+commit 5b95c148cc485f79fd7018bc4520b4cb5f728a18
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 26 23:46:53 2012 -0400
+
+ Start implementing shape_plan
+
+ src/hb-fallback-shape.cc | 4 ++-
+ src/hb-font-private.hh | 4 ++
+ src/hb-old.cc | 4 ++-
+ src/hb-ot-shape.cc | 4 ++-
+ src/hb-shape-plan-private.hh | 7 ++++
+ src/hb-shape-plan.cc | 76
+ ++++++++++++++++++++++++++++++++++++++++-
+ src/hb-shape.cc | 4 ++
+ src/hb-shaper-private.hh | 4 +-
+ src/hb-uniscribe.cc | 4 ++-
+ 9 files changed, 103 insertions(+), 8 deletions(-)
+
+commit bd26b4d21f59312805d294f46f15182adbcc47da
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 26 22:05:39 2012 -0400
+
+ Minor
+
+ src/Makefile.am | 1 +
+ src/hb-fallback-shape.cc | 3 +-
+ src/hb-old.cc | 3 +-
+ src/hb-ot-shape.cc | 3 +-
+ src/hb-shape-plan-private.hh | 2 +-
+ src/hb-shape-plan.cc | 2 +
+ src/hb-shape.cc | 98
+ ++++----------------------------------
+ src/hb-shaper-private.hh | 16 +++++-
+ src/hb-shaper.cc | 109
+ ++++++++++++++++++++++++++++++++++++++++++
+ src/hb-uniscribe.cc | 3 +-
+ 10 files changed, 145 insertions(+), 95 deletions(-)
+
+commit 027857d0412477fb4427dcb8a8c45287c272e143
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 26 17:34:25 2012 -0400
+
+ Start adding a unified shaper access infrastructure
+
+ Add global shape_plan. Unused so far.
+
+ src/Makefile.am | 15 ++-
+ src/hb-coretext-private.hh | 42 ---------
+ src/hb-coretext.cc | 6 +-
+ src/hb-fallback-shape-private.hh | 41 ---------
+ src/hb-fallback-shape.cc | 62 ++++++++++++-
+ src/hb-font-private.hh | 12 +++
+ src/hb-font.cc | 15 +++-
+ src/hb-graphite2-private.hh | 42 ---------
+ src/hb-old-private.hh | 40 --------
+ src/hb-old.cc | 109 +++++++++++++++++-----
+ src/hb-ot-shape-private.hh | 8 --
+ src/hb-ot-shape.cc | 60 ++++++++++++-
+ src/hb-shape-plan-private.hh | 52 +++++++++++
+ src/hb-shape-plan.cc | 85 +++++++++++++++++
+ src/hb-shape-plan.h | 60 ++++++++++++
+ src/hb-shape.cc | 48 +---------
+ src/hb-shaper-impl-private.hh | 44 +++++++++
+ src/hb-shaper-list.hh | 50 ++++++++++
+ src/hb-shaper-private.hh | 81 +++++++++++++++++
+ src/hb-uniscribe-private.hh | 42 ---------
+ src/hb-uniscribe.cc | 186
+ ++++++++++++++++++++++++--------------
+ 21 files changed, 735 insertions(+), 365 deletions(-)
+
+commit fa2dfcd560444d8c54b6349ee106134d3536f79b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 26 16:06:16 2012 -0400
+
+ Fix visibility warnings with MinGW32
+
+ src/hb-old/harfbuzz-global.h | 17 +++++++++++------
+ src/hb-old/harfbuzz-impl.h | 6 +++++-
+ 2 files changed, 16 insertions(+), 7 deletions(-)
+
+commit ac2085d4b391b0a72473ecac3dd6c22efe66833f
+Author: Jonathan Kew <jfkthame@gmail.com>
+Date: Thu Jul 26 15:58:45 2012 -0400
+
+ [CoreText] Ensure cluster indices in output buffer are non-decreasing.
+
+ Does not provide Uniscribe-compatible results, but should at least
+ avoid
+ breaking hb-view due to out-of-order cluster values.
+
+ For RTL runs, ensure cluster values are non-increasing (instead of
+ non-decreasing).
+
+ src/hb-coretext.cc | 37 +++++++++++++++++++++++++++++++++++++
+ 1 files changed, 37 insertions(+), 0 deletions(-)
+
+commit 441d3bb7de311d54b9f0a5210344f9a96e97e153
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 26 12:01:12 2012 -0400
+
+ Minor
+
+ src/hb-coretext.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 2e7f223054d310695bdb3498b2b2b5d17b6cce78
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 25 19:30:15 2012 -0400
+
+ [hb-old] Fix Arabic cursive positioning
+
+ Backporting from upstream:
+
+ commit b847f24ce855d24f6822bcd9c0006905e81b94d8
+ Author: Behdad Esfahbod <behdad@behdad.org>
+ Date: Wed Jul 25 19:29:16 2012 -0400
+
+ [arabic] Fix Arabic cursive positioning
+
+ This was clearly broken in testing. Who knows... Fixes for me.
+ Test with a Nastaleeq font, or with Arabic Typesetting.
+
+ Backporting from Chromium.
+
+ src/hb-old/harfbuzz-shaper.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9550a8c4e8b4e28be60d38c27d59253846ff9569
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 25 19:22:57 2012 -0400
+
+ [hb-old] Fixup not-enough-space handling
+
+ src/hb-old.cc | 15 ++++++++-------
+ 1 files changed, 8 insertions(+), 7 deletions(-)
+
+commit 91e721ea8693205f4f738bca97a5055ee75cf463
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 25 19:20:34 2012 -0400
+
+ [hb-old] Fix clusters
+
+ Unlike its "documentation", hb-old's log_clusters are, well, indeed
+ logical, not visual. Fixup. Adapted / copied from hb-uniscribe.
+
+ src/hb-old.cc | 51
+ ++++++++++++++++++++++++++++++++---------
+ src/hb-old/harfbuzz-shaper.h | 1 +
+ src/hb-uniscribe.cc | 5 ++-
+ 3 files changed, 44 insertions(+), 13 deletions(-)
+
+commit a3313e54008167e415b72c780ca7b9cda958d07e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 25 18:37:51 2012 -0400
+
+ [GPOS] Fix MarkMarkPos applied to results of MultipleSubst
+
+ This was broken as a result of
+ 7b84c536c10ab90ed96a033d88e9ad232d46c5b8.
+ As Khaled reported, MarkMark positioning was broken with glyphs
+ resulting from a MultipleSubst. Fixed. Test with the ALLAH character
+ in Amiri.
+
+ src/hb-ot-layout-gpos-table.hh | 10 +++++-----
+ src/hb-ot-layout-private.hh | 23 +++++++++++++++++++++--
+ 2 files changed, 26 insertions(+), 7 deletions(-)
+
+commit 35bdab3cf1f0836807160e3ce93766c321b32e8c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 25 11:59:52 2012 -0400
+
+ Minor
+
+ src/hb-unicode-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 8fe4c7405b922cf0f936a46a9baedf4885b05254
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 21:05:12 2012 -0400
+
+ [hb-old] Add HarfBuzz.old shaper
+
+ Choose using shaper name "old".
+
+ configure.ac | 8 +
+ src/Makefile.am | 14 +-
+ src/hb-old-private.hh | 40 +++
+ src/hb-old.cc | 369 +++++++++++++++++++++++
+ src/hb-old/.gitignore | 7 -
+ src/hb-old/Makefile.am | 2 +
+ src/hb-old/Makefile.in | 762
+ ------------------------------------------------
+ src/hb-shape.cc | 8 +-
+ 8 files changed, 436 insertions(+), 774 deletions(-)
+
+commit 5e1987005eb1b9af7a4d3d9f90c5768d8cc80015
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 19:53:55 2012 -0400
+
+ [hb-old] Define Unicode funcs in terms of new HarfBuzz
+
+ src/hb-old/Makefile.am | 4 +
+ src/hb-old/Makefile.in | 182
+ +++++++++++++++++++++++++++++++++++-----
+ src/hb-old/harfbuzz-external.h | 100 +++++++++++++---------
+ 3 files changed, 224 insertions(+), 62 deletions(-)
+
+commit 4a31166b2853c1ec052844140e114158f47c2355
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 19:49:48 2012 -0400
+
+ [hb-old] Shovel out the line-breaking / word-segmentation stuff
+
+ src/hb-old/Makefile.am | 10 +-
+ src/hb-old/Makefile.in | 13 +-
+ src/hb-old/harfbuzz-external.h | 66 ------
+ src/hb-old/harfbuzz-indic.cpp | 26 ---
+ src/hb-old/harfbuzz-khmer.c | 25 --
+ src/hb-old/harfbuzz-myanmar.c | 28 ---
+ src/hb-old/harfbuzz-shaper-private.h | 12 -
+ src/hb-old/harfbuzz-shaper.cpp | 403
+ +++-------------------------------
+ src/hb-old/harfbuzz-shaper.h | 31 ---
+ src/hb-old/harfbuzz-thai.c | 111 ----------
+ src/hb-old/harfbuzz-tibetan.c | 26 ---
+ src/hb-old/harfbuzz.c | 32 ---
+ 12 files changed, 33 insertions(+), 750 deletions(-)
+
+commit 0bcbe88cf313117f739b98a11dbe698b75784e9d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 19:38:24 2012 -0400
+
+ [hb-old] Add visibility attributes
+
+ src/hb-old/harfbuzz-global.h | 10 ++++++----
+ src/hb-old/harfbuzz-impl.h | 2 +-
+ 2 files changed, 7 insertions(+), 5 deletions(-)
+
+commit 6a9d43c3178c920672a84382ca3797e3c478b2b0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 19:21:22 2012 -0400
+
+ [hb-old] Remove unused header file
+
+ src/hb-old/harfbuzz-shape.h | 199
+ -------------------------------------------
+ 1 files changed, 0 insertions(+), 199 deletions(-)
+
+commit fb47209c5b3aa992faf18d1a3f78b9d7682cf62f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 19:20:19 2012 -0400
+
+ [hb-old] Rename hb_buffer_* to HB_Buffer_*
+
+ src/hb-old/harfbuzz-buffer.c | 22 +++++++++++-----------
+ src/hb-old/harfbuzz-buffer.h | 8 ++++----
+ src/hb-old/harfbuzz-shaper.cpp | 8 ++++----
+ 3 files changed, 19 insertions(+), 19 deletions(-)
+
+commit 1512a7357513b72e2a07dda706a176bb23d694e9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 19:16:56 2012 -0400
+
+ [hb-old] Start adding HarfBuzz-old as a new backend
+
+ configure.ac | 1 +
+ src/Makefile.am | 5 +
+ src/hb-old/.gitignore | 7 +
+ src/hb-old/COPYING | 24 +
+ src/hb-old/Makefile.am | 56 +
+ src/hb-old/Makefile.in | 631 ++++
+ src/hb-old/README | 7 +
+ src/hb-old/harfbuzz-arabic.c | 1144 +++++++
+ src/hb-old/harfbuzz-buffer-private.h | 107 +
+ src/hb-old/harfbuzz-buffer.c | 383 +++
+ src/hb-old/harfbuzz-buffer.h | 102 +
+ src/hb-old/harfbuzz-external.h | 151 +
+ src/hb-old/harfbuzz-gdef-private.h | 135 +
+ src/hb-old/harfbuzz-gdef.c | 1163 +++++++
+ src/hb-old/harfbuzz-gdef.h | 140 +
+ src/hb-old/harfbuzz-global.h | 118 +
+ src/hb-old/harfbuzz-gpos-private.h | 729 ++++
+ src/hb-old/harfbuzz-gpos.c | 6094
+ ++++++++++++++++++++++++++++++++++
+ src/hb-old/harfbuzz-gpos.h | 155 +
+ src/hb-old/harfbuzz-greek.c | 447 +++
+ src/hb-old/harfbuzz-gsub-private.h | 483 +++
+ src/hb-old/harfbuzz-gsub.c | 4329 ++++++++++++++++++++++++
+ src/hb-old/harfbuzz-gsub.h | 148 +
+ src/hb-old/harfbuzz-hangul.c | 268 ++
+ src/hb-old/harfbuzz-hebrew.c | 187 ++
+ src/hb-old/harfbuzz-impl.c | 84 +
+ src/hb-old/harfbuzz-impl.h | 131 +
+ src/hb-old/harfbuzz-indic.cpp | 1894 +++++++++++
+ src/hb-old/harfbuzz-khmer.c | 667 ++++
+ src/hb-old/harfbuzz-myanmar.c | 539 +++
+ src/hb-old/harfbuzz-open-private.h | 102 +
+ src/hb-old/harfbuzz-open.c | 1433 ++++++++
+ src/hb-old/harfbuzz-open.h | 288 ++
+ src/hb-old/harfbuzz-shape.h | 199 ++
+ src/hb-old/harfbuzz-shaper-all.cpp | 37 +
+ src/hb-old/harfbuzz-shaper-private.h | 171 +
+ src/hb-old/harfbuzz-shaper.cpp | 1338 ++++++++
+ src/hb-old/harfbuzz-shaper.h | 294 ++
+ src/hb-old/harfbuzz-stream-private.h | 81 +
+ src/hb-old/harfbuzz-stream.c | 114 +
+ src/hb-old/harfbuzz-stream.h | 51 +
+ src/hb-old/harfbuzz-thai.c | 111 +
+ src/hb-old/harfbuzz-tibetan.c | 274 ++
+ src/hb-old/harfbuzz.c | 32 +
+ src/hb-old/harfbuzz.h | 38 +
+ 45 files changed, 24892 insertions(+), 0 deletions(-)
+
+commit 478fd0529b868b22905a9dedf331ac7cc9721723
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 17:09:01 2012 -0400
+
+ Minor
+
+ src/hb-unicode-private.hh | 27 ++++++++++++++-------------
+ 1 files changed, 14 insertions(+), 13 deletions(-)
+
+commit 8979a7f6f2b44ade4c0198a31ae08561b35ce009
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 17:03:55 2012 -0400
+
+ [Mongolian] Remove Mongolian Vowel Separator at the end of shaping
+
+ Results match Uniscribe now.
+
+ src/hb-unicode-private.hh | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit aa6d849838d5231465ae1a25a4dd5ea1e9380ff9
+Author: Jonathan Kew <jfkthame@gmail.com>
+Date: Tue Jul 24 15:52:32 2012 -0400
+
+ [CoreText] Add basic Core Text backend for comparison with our
+ native shaping
+
+ Does not attempt to handle clusters in a Uniscribe- or
+ HarfBuzz-compatible way;
+ just returns the original string indexes that CT maintains. These
+ may even be
+ out-of-order in the case of reordrant glyphs.
+
+ configure.ac | 12 ++
+ src/Makefile.am | 7 +
+ src/hb-coretext-private.hh | 42 ++++++
+ src/hb-coretext.cc | 323
+ ++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-coretext.h | 43 ++++++
+ src/hb-shape.cc | 6 +
+ 6 files changed, 433 insertions(+), 0 deletions(-)
+
+commit ec8d2494694275dfbbac2dd0d33ca2894b0463d6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 15:40:37 2012 -0400
+
+ Make data members of various OpenType structs protected instead
+ of private
+
+ Should fix warnings generated when building with
+ -Wunused-private-field.
+ Based on patch from Jonathan Kew.
+
+ src/hb-open-file-private.hh | 8 +++---
+ src/hb-ot-head-table.hh | 2 +-
+ src/hb-ot-hhea-table.hh | 2 +-
+ src/hb-ot-hmtx-table.hh | 2 +-
+ src/hb-ot-layout-common-private.hh | 14 +++++----
+ src/hb-ot-layout-gdef-table.hh | 20 +++++++-------
+ src/hb-ot-layout-gpos-table.hh | 48
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-table.hh | 30 ++++++++++----------
+ src/hb-ot-layout-gsubgpos-private.hh | 32 +++++++++++-----------
+ src/hb-ot-maxp-table.hh | 2 +-
+ src/hb-ot-name-table.hh | 2 +-
+ 11 files changed, 82 insertions(+), 80 deletions(-)
+
+commit 97aa0b738a33b73a3f9763dd2950f2dd39f596ed
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 15:02:34 2012 -0400
+
+ Minor const correctness shuffling
+
+ src/hb-shape.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 6411e74caf23af7b0545f1fe54d19a1c8da895e8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 13:48:49 2012 -0400
+
+ [Indic] Reposition Gurmukhi top matras to after post
+
+ The font is forming a post-base consonant in some samples, and
+ Uniscribe
+ positions top matra on the post-base. Do the same.
+
+ Gurmukhi failures down from 59 to 41 (0.0674242%).
+
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ .../indic/script-gurmukhi/misc/misc.txt | 1 +
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+commit c3f769ba09df319fa69d04f68c57444f95eceee6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 13:26:32 2012 -0400
+
+ [Indic] Ignore Uniscribe output containing two zero-width space glyphs
+
+ Uniscribe is buggy and sometimes /eats/ a mark next to a non-joiner.
+ Most of Malayalam failures where actually hitting this bug.
+
+ Ignore test output with two zero-width space glyphs. This is a hack
+ until we build up the test suite infrastructure better.
+
+ Bengali went down by 9, Devanagari by 2, Kannada by 130, Malayalm down
+ from 1197 to 307, Sinhala down by 16, Telugu down by 26. New stats:
+
+ BENGALI: 353996 out of 354285 tests passed. 289 failed (0.0815727%)
+ DEVANAGARI: 693573 out of 693628 tests passed. 55 failed (0.00792932%)
+ GUJARATI: 366489 out of 366506 tests passed. 17 failed (0.0046384%)
+ GURMUKHI: 60750 out of 60809 tests passed. 59 failed (0.0970251%)
+ KANNADA: 951086 out of 951913 tests passed. 827 failed (0.0868777%)
+ KHMER: 299094 out of 299124 tests passed. 30 failed (0.0100293%)
+ MALAYALAM: 1048109 out of 1048416 tests passed. 307 failed
+ (0.0292823%)
+ ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%)
+ SINHALA: 271715 out of 271847 tests passed. 132 failed (0.0485567%)
+ TAMIL: 1091837 out of 1091837 tests passed. 0 failed (0%)
+ TELUGU: 970550 out of 970573 tests passed. 23 failed (0.00236973%)
+
+ test/shaping/hb_test_tools.py | 1 +
+ .../indic/script-malayalam/misc/misc.txt | 2 ++
+ 2 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 65c43accdc4d2082282d5cedba8514b8df0c18a2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 03:36:47 2012 -0400
+
+ [Indic] Better position left-matra in Malayalam
+
+ Just put it before base, which is what's expected.
+
+ Malayalam failures down from 1559 to 1197 (0.114172%).
+
+ BENGALI: 353988 out of 354285 tests passed. 297 failed (0.0838308%)
+ DEVANAGARI: 693571 out of 693628 tests passed. 57 failed (0.00821766%)
+ GUJARATI: 366489 out of 366506 tests passed. 17 failed (0.0046384%)
+ GURMUKHI: 60750 out of 60809 tests passed. 59 failed (0.0970251%)
+ KANNADA: 950956 out of 951913 tests passed. 957 failed (0.100534%)
+ KHMER: 299094 out of 299124 tests passed. 30 failed (0.0100293%)
+ MALAYALAM: 1047219 out of 1048416 tests passed. 1197 failed
+ (0.114172%)
+ ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%)
+ SINHALA: 271699 out of 271847 tests passed. 148 failed (0.0544424%)
+ TAMIL: 1091837 out of 1091837 tests passed. 0 failed (0%)
+ TELUGU: 970524 out of 970573 tests passed. 49 failed (0.00504856%)
+
+ src/hb-ot-shape-complex-indic.cc | 41
+ +++++++++++++------
+ .../indic/script-malayalam/misc/misc.txt | 1 +
+ 2 files changed, 29 insertions(+), 13 deletions(-)
+
+commit 88f413b56f2858d149e2fc067685aeecaea779ca
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 03:04:36 2012 -0400
+
+ [Indic] Implement Reph+Ya-Phalaa interaction
+
+ The sequence Ra,H,Ya in Bengali is ambigious and Unicode encoded
+ that to
+ get Ya-Phalaa, one would place ZWJ before Halant. Ie. a ZWJ,H
+ sequence
+ requests subjoining, while a H,ZWJ requests Half form. Implement
+ that.
+
+ Bengali failures go down from 377 to 297 (0.0838308%).
+ Gujarati is down by 4 to 17 (0.0046384%).
+ Kannada is down by 226 to 957 (0.100534%).
+
+ Current status:
+
+ BENGALI: 353988 out of 354285 tests passed. 297 failed (0.0838308%)
+ DEVANAGARI: 693571 out of 693628 tests passed. 57 failed (0.00821766%)
+ GUJARATI: 366489 out of 366506 tests passed. 17 failed (0.0046384%)
+ GURMUKHI: 60750 out of 60809 tests passed. 59 failed (0.0970251%)
+ KANNADA: 950956 out of 951913 tests passed. 957 failed (0.100534%)
+ KHMER: 299094 out of 299124 tests passed. 30 failed (0.0100293%)
+ MALAYALAM: 1046857 out of 1048416 tests passed. 1559 failed
+ (0.148701%)
+ ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%)
+ SINHALA: 271699 out of 271847 tests passed. 148 failed (0.0544424%)
+ TAMIL: 1091837 out of 1091837 tests passed. 0 failed (0%)
+ TELUGU: 970524 out of 970573 tests passed. 49 failed (0.00504856%)
+
+ src/hb-ot-shape-complex-indic.cc | 10 ++++++++--
+ .../indic/script-bengali/misc/reph.txt | 4 ++++
+ 2 files changed, 12 insertions(+), 2 deletions(-)
+
+commit dff0ece11d61978c04e839501f179a5c3077f340
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 02:30:38 2012 -0400
+
+ [Indic] Limit matras to 4 per syllable
+
+ Also limit joiners.
+
+ This limits our syllable length to a constant, and is
+ closer to what Uniscribe does anyway.
+
+ Two Devanagari tests regressed, but who cares about tests with 20
+ joiners in a row?! Devanagari at 57 (0.00821766%) now.
+
+ src/hb-ot-shape-complex-indic-machine.rl | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 330b329c8905a37ca88c556dea82c70d74c77458
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 02:25:26 2012 -0400
+
+ [Indic] Unmark U+17D1 KHMER SIGN VIRIAM to NOT be a Virama
+
+ Fixes another 1 Khmer failure. Down to 30 (0.0100293%) now.
+
+ src/hb-ot-shape-complex-indic.cc | 2 ++
+ .../south-east-asian/script-khmer/misc/misc.txt | 1 +
+ 2 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 6824a7194e01b77eddb95bd95a9b32e219140912
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 02:22:18 2012 -0400
+
+ [Indic] Recategorize Khmer various signs as top matras
+
+ Khmer failures down from 39 to 31 (0.0103636%).
+
+ src/hb-ot-shape-complex-indic.cc | 23 ++++++++++-------------
+ 1 files changed, 10 insertions(+), 13 deletions(-)
+
+commit d90b8e841e0068a601c96ab184d18b0f48eec9d1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 02:10:20 2012 -0400
+
+ [Indic] Reposition Khmer prebase-reordering Ra around split matras
+
+ In Khmer coeng model, a V,Ra can go *after* matras. If it goes
+ after a
+ split matra, it should be reordered to *before* the left part of
+ such matra.
+
+ Khmer failures down from 136 to 39 (0.0130381%).
+
+ src/hb-ot-shape-complex-indic.cc | 13 +++++++++++++
+ .../south-east-asian/script-khmer/misc/misc.txt | 4 ++++
+ 2 files changed, 17 insertions(+), 0 deletions(-)
+
+commit 0afb84c12567ac35adac657bf8be29999b8c5a50
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 01:44:47 2012 -0400
+
+ [Indic] Fix minor bug in pre-base Ra positioning
+
+ src/hb-ot-shape-complex-indic.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 7573799126e812a047daa5f64121ec959866b3c8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 01:32:07 2012 -0400
+
+ [Indic] Position Khmer U+17CE
+
+ Fixes another 6 Khmer failures. Now at 136 (0.0454661%).
+
+ src/hb-ot-shape-complex-indic.cc | 6 ++++++
+ .../south-east-asian/script-khmer/misc/misc.txt | 1 +
+ 2 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 8d00e8d0e7d10f823e6975fecaffb9d557b1a99a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 01:04:18 2012 -0400
+
+ [Indic] Don't reposition Khmer Bindu
+
+ Khmer Bindu doesn't like to move to syllable end. Leave it where it
+ was.
+
+ Brings down Khmer failures from 510 to 142 (0.047572%).
+
+ src/hb-ot-shape-complex-indic.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 2278eefcdb3dd0d492b9d07176fbecc1f0516bb7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 00:26:43 2012 -0400
+
+ [Indic] In Sinhala, form forced Reph even if no other consonant found
+
+ Fixes another 10 Sinhala failures. Down to 148 (0.0544424%).
+
+ src/hb-ot-shape-complex-indic.cc | 10 +++++-----
+ .../indic/script-sinhala/misc/misc.txt | 1 +
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+commit 71fd5e80ad06c8e85a1112cc89e129d6cd03f82c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 00:21:16 2012 -0400
+
+ [Indic] Further adjust base algorithm for Sinhala
+
+ Apparently if there is C,V,ZWJ,C, the first C will be base, but if
+ it's C,ZWJ,V,C, the second one will be.
+
+ Note that Uniscribe implements this differently, by breaking
+ syllable in
+ the case of C,ZWJ,V,C and putting the first consonant in one syllable
+ and the rest in the next syllable.
+
+ Sinhala failures down from 208 to 158 (0.0581209%). No changes to
+ Khmer.
+
+ src/hb-ot-shape-complex-indic.cc | 11 +++++++----
+ .../indic/script-sinhala/misc/misc.txt | 3 +++
+ 2 files changed, 10 insertions(+), 4 deletions(-)
+
+commit 73d71cc527d28fd5519c5d965c272ea1fb149a0e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 24 00:09:12 2012 -0400
+
+ [Indic] End Vowel-based syllable at ZWJ
+
+ One Devanagari test regressed, plus 10 Malayalam (at 1545 now).
+
+ Fixed 120 Sinhala failures. Now at 208 (0.0765136%).
+
+ src/hb-ot-shape-complex-indic-machine.rl | 2 +-
+ .../indic/script-sinhala/misc/misc.txt | 1 +
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 34c215036f5fcdc7599b1ab0591b56dbb3811902
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 23 23:51:29 2012 -0400
+
+ [Indic] Improve Sinhala base algorithm and reph positioning
+
+ Sinhala does not have half forms. And most (all?) consonants can be
+ base, except when preceded by ZWJ, which would request a subjoined
+ form.
+ Hence switch the base algorithm to categorize with Khmer, start search
+ at start, and stop at a ZWJ.
+
+ Also, mark all pos=base consonants after base to be subjoined. Mark
+ base itself to have pos=base.
+
+ Finally, adjust Sinhala's reph position to after-main.
+
+ Brings down Sinhala failures from 455 to 328 (0.120656%).
+
+ src/hb-ot-shape-complex-indic.cc | 18
+ +++++++++++++++++-
+ .../indic/script-sinhala/misc/misc.txt | 1 +
+ 2 files changed, 18 insertions(+), 1 deletions(-)
+
+commit 2ec934c6c25423e7af20d909a9c698a149808ea9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 23 23:49:04 2012 -0400
+
+ [Indic] Change "unknown" position to end of syllable
+
+ src/hb-ot-shape-complex-indic-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b70021f7c81a0ed08475b14b07291f662cd9f905
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 23 20:18:17 2012 -0400
+
+ When removing zero-width marks, don't remove ligatures
+
+ If a mark ligated, it probably should NOT be removed.
+
+ src/hb-ot-shape.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 49c5ec51444f27f33e1eb6aa1959c61b08fa89c0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 23 20:14:13 2012 -0400
+
+ Minor refactoring
+
+ src/hb-ot-layout-gsubgpos-private.hh | 32
+ -------------------------------
+ src/hb-ot-layout-private.hh | 35
+ ++++++++++++++++++++++++++++++++++
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ 3 files changed, 36 insertions(+), 33 deletions(-)
+
+commit c3e6fdc3791168cf2b4c9412e751f187d58faa42
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 23 20:11:42 2012 -0400
+
+ [Indic] Improve check on ligatures
+
+ Only skip actual ligatures, not marks in-between ligature components.
+
+ src/hb-ot-layout-gsubgpos-private.hh | 5 +++++
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 771a8f50289e8fa458cfc3cd84f73a380ce98077
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 23 20:07:50 2012 -0400
+
+ [Indic] exclude ligatures when matching on Indic category
+
+ If, say, a H,ZWJ,C ligature was formed, we don't want the code
+ to detec
+ that as a Halant. So, ignore ligatures when matching category in
+ final_reordering.
+
+ Sinhala failures down from 514 to 455 (0.167374%).
+
+ src/hb-ot-shape-complex-indic.cc | 41
+ ++++++++++---------
+ .../indic/script-sinhala/misc/misc.txt | 1 +
+ 2 files changed, 23 insertions(+), 19 deletions(-)
+
+commit d1af9e82e5309158ed334ab8e21f3a3b64b9540f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 23 19:55:35 2012 -0400
+
+ [GSUB/GPOS] Const correctness
+
+ src/hb-ot-layout-gsubgpos-private.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit baacd090df97610e3f6d1b2a110dc67b6c6f9f5c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 23 19:51:48 2012 -0400
+
+ [Indic] Minor refactoring
+
+ src/hb-ot-shape-complex-indic.cc | 10 ++++++++--
+ 1 files changed, 8 insertions(+), 2 deletions(-)
+
+commit c7c4de2fb9bba216e37875d79815eef55c0acc01
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 23 18:25:02 2012 -0400
+
+ [Indic] Remove syllable length check before sorting
+
+ We now limit syllable lengths in the machine. No need to match here.
+
+ src/hb-ot-shape-complex-indic.cc | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 9fa052733eb93a3ce1205f63ff8f74cb295cbe99
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 23 18:19:17 2012 -0400
+
+ [Indic] Limit syllables to at most five consonants
+
+ Seems to be about what Uniscribe does. Not exactly. But close
+ enough.
+ More consonants will start a new cluster.
+
+ A few scripts went way down in failures. In particular:
+
+ - Devanagari failures went down from 490 to 56.
+ - Telugu went down from 113 to 49.
+
+ Other scripts went down slightly or didn't change. New numbers:
+
+ BENGALI: 353908 out of 354285 tests passed. 377 failed (0.106412%)
+ DEVANAGARI: 693572 out of 693628 tests passed. 56 failed (0.00807349%)
+ GUJARATI: 366485 out of 366506 tests passed. 21 failed (0.00572978%)
+ GURMUKHI: 60750 out of 60809 tests passed. 59 failed (0.0970251%)
+ KANNADA: 950730 out of 951913 tests passed. 1183 failed (0.124276%)
+ KHMER: 298613 out of 299124 tests passed. 511 failed (0.170832%)
+ MALAYALAM: 1046881 out of 1048416 tests passed. 1535 failed
+ (0.146411%)
+ ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%)
+ SINHALA: 271333 out of 271847 tests passed. 514 failed (0.189077%)
+ TAMIL: 1091837 out of 1091837 tests passed. 0 failed (0%)
+ TELUGU: 970524 out of 970573 tests passed. 49 failed (0.00504856%)
+
+ Some of the remaining Telugu and Devanagari issues seem to be
+ Uniscribe
+ eating Anusvara when placed before a non-joiner. Ouch!
+
+ src/hb-ot-shape-complex-indic-machine.rl | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 093cd583263a5d427e3377b31585043fb55d2557
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 23 14:04:42 2012 -0400
+
+ [Thai] Fix SARA AM handling
+
+ Oops, thinko.
+
+ src/hb-ot-shape-complex-misc.cc | 6 +++---
+ src/hb-private.hh | 4 ++--
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 42848453bf260b456b46a07f066e31b8c3aac2f1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 23 13:52:07 2012 -0400
+
+ [Thai] Reorder U+0E3A THAI VOWEL SIGN PHINTHU
+
+ Uniscribe reorders U+0E3A to be after U+0E38 and U+0E39. We do
+ that by
+ modifying the ccc for U+0E3A.
+
+ Fixes the two remaining Thai failures (see previous commit).
+
+ src/hb-ot-shape-complex-misc.cc | 7 +++++++
+ src/hb-unicode.cc | 6 ++++++
+ .../in-tree/shaper-thai/script-thai/misc/MANIFEST | 1 +
+ .../shaper-thai/script-thai/misc/phinthu.txt | 16
+ ++++++++++++++++
+ 4 files changed, 30 insertions(+), 0 deletions(-)
+
+commit 4a7f4f3e56f8f7640ae7337aa1b3324f31e0d4ab
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 23 13:15:33 2012 -0400
+
+ [Thai] Adjust SARA AM reordering to match Uniscribe
+
+ Adjust the list of marks before SARA AM that get the reordering
+ treatment. Also adjust cluster formation to match Uniscribe.
+
+ With Wikipedia test data, now I see:
+
+ - For Thai, with the Angsana New font from Win7, I see 54
+ failures out
+ of over 4M tests (0.00129107%). Of the 54, two are legitimate
+ reordering issues (fix coming soon), and the other 52 are simply
+ Uniscribe using a zero-width space char instead of an unknown
+ character for missing glyphs. No idea why. The missing-glyph
+ sequences include one that is a Thai character followed by
+ an Arabic
+ Sokun. Someone confused it with Nikhahit I assume!
+
+ - For Lao, with the Dokchampa font from Win7, 33 tests fail out of
+ 54k (0.0615167%). All seem to be insignificant mark positioning
+ with two marks on a base. Have to investigate.
+
+ src/hb-ot-shape-complex-misc.cc | 42
+ ++++++++++++-------
+ src/hb-private.hh | 6 +++
+ test/shaping/texts/in-tree/shaper-thai/MANIFEST | 1 +
+ .../texts/in-tree/shaper-thai/script-lao/MANIFEST | 1 +
+ .../in-tree/shaper-thai/script-lao/misc/MANIFEST | 1 +
+ .../shaper-thai/script-lao/misc/sara-am.txt | 20 +++++++++
+ .../shaper-thai/script-thai/misc/sara-am.txt | 18 ++++++++-
+ 7 files changed, 72 insertions(+), 17 deletions(-)
+
+commit 2cc933aff97916e5d0fe42883f40f0879f848e25
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 23 08:22:55 2012 -0400
+
+ [Indic] Fix cluster formation with left-matras and conjunct forms
+
+ Test case was: <U+0D15,U+0D4D,U+0D15,U+0D4A>.
+
+ src/hb-ot-shape-complex-indic.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit e6b01a878cd2e63cb675e7e0c6ac4d83a8c10f37
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 23 00:11:26 2012 -0400
+
+ [Indic] Further streamline cluster formation
+
+ This should address all possible cluster misformations that I had in
+ mind.
+
+ src/hb-ot-shape-complex-indic.cc | 21 ++++++++++-----------
+ 1 files changed, 10 insertions(+), 11 deletions(-)
+
+commit 7b2a7dadd6c616bbfe1d8358700cab9cee88e584
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 22 23:58:55 2012 -0400
+
+ [Indic] Merge clusters before sorting
+
+ This should fix any instabilities in cluster formation that we were
+ speculating may happen with surrounding syllables. Or most of it
+ perhaps.
+
+ src/hb-ot-shape-complex-indic.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit abb3239ef92cc5dccb4638806d7ae9868b9ac9b3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 22 23:55:19 2012 -0400
+
+ [Indic] Update clusters for left-matra even if matra didn't move
+
+ Fixes crashes reported with left matra under
+ non-uniscribe-bug-compatibilty mode.
+
+ src/hb-ot-shape-complex-indic.cc | 9 ++++++++-
+ 1 files changed, 8 insertions(+), 1 deletions(-)
+
+commit 60554f14d8dca208721f0da8b69d84b92819c54f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 22 23:23:56 2012 -0400
+
+ [Indic] Merge in Malayalam tests
+
+ From:
+ http://silpa.org.in/pub/tests/hb/ml/ml-harfbuzz-testdata.txt
+
+ .../indic/script-malayalam/misc/misc.txt | 94
+ ++++++++++----------
+ 1 files changed, 46 insertions(+), 48 deletions(-)
+
+commit 5c7081770c7a611bbe79b451b7b86dec4fa6395d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 22 23:20:27 2012 -0400
+
+ [Indic] Add extensive Sinhala tests
+
+ Generated by:
+ http://git.savannah.gnu.org/cgit/sinhala.git/plain/utils/gen-unicode-sinhala.py
+
+ .../indic/script-sinhala/misc/extensive.txt | 4390
+ ++++++++++++++++++++
+ 1 files changed, 4390 insertions(+), 0 deletions(-)
+
+commit 2efe4707b1b449962f6e161716477d9775456c46
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 22 23:17:59 2012 -0400
+
+ [Indic] Add Sinhala tests
+
+ Merge tests from:
+ http://git.savannah.gnu.org/cgit/sinhala.git/plain/patches/icu-sinhala-rendering.txt
+
+ .../indic/script-sinhala/misc/misc.txt | 26
+ ++++++++++++++++++-
+ 1 files changed, 24 insertions(+), 2 deletions(-)
+
+commit 3d4c111b7a13700b2f7a0b087eb3992283295f21
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 19:34:39 2012 -0400
+
+ Add a test case
+
+ .../indic/script-bengali/misc/misc.txt | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 92a1ad7bef9efb456ab87bd63818cfbed7da3f6f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 18:38:27 2012 -0400
+
+ [Indic] Stop searching for base if a post form is found before
+ below form
+
+ Improves Bengali and Gurmukhi. Malayalam regressed a bit. We will
+ deal
+ with that later.
+
+ src/hb-ot-shape-complex-indic.cc | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 4c450c703f8e4618c587bcd7ef46dcc1f2c7947b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 18:13:04 2012 -0400
+
+ [Indic] Recompose Bengali Ya,Nukta
+
+ This is a bunch of hacks for now.
+
+ Improves Bengali a bit.
+
+ src/hb-ot-shape-complex-indic.cc | 4 ++--
+ src/hb-unicode.cc | 8 ++++++++
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+commit e9c0f152a38cb2e76650a3e43f7fdcda266af696
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 17:05:46 2012 -0400
+
+ [Uniscribe] Fix script fallback
+
+ Gurmukhi failures half now. Others changed slightly.
+
+ src/hb-uniscribe.cc | 34 ++++++++++++++--------------------
+ 1 files changed, 14 insertions(+), 20 deletions(-)
+
+commit 5791f329159c9863317e2b507514c29321be31a7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 16:26:55 2012 -0400
+
+ [Indic] Allow a ZWNJ after SM's
+
+ Malayalam failures go way down. Other scripts benefitted slightly
+ too.
+ Sinhala had one or two test regressions, but...
+
+ src/hb-ot-shape-complex-indic-machine.rl | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 34ae336f3fae93ef9372881d545c817bce383041
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 16:17:28 2012 -0400
+
+ [Indic] Improve Reph AfterMain positioning
+
+ Fixes 20 out of 48 failing Oriya tests. Failure rate down to
+ 0.066% now.
+
+ src/hb-ot-shape-complex-indic.cc | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit bdd080431a40bc941ece3230f338b94a46bd12a2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 16:03:09 2012 -0400
+
+ [Indic] Reposition Oriya Candrabindu
+
+ Oriya failures down from 0.65% to 0.20%.
+
+ src/hb-ot-shape-complex-indic.cc | 1 +
+ .../shaper-indic/indic/script-oriya/misc/MANIFEST | 1 +
+ .../shaper-indic/indic/script-oriya/misc/bindu.txt | 2 ++
+ 3 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 5f0eaaad129ff04d56b8756bebf19fbc242718c9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 15:47:24 2012 -0400
+
+ [Indic] Fix base search in final_reordering
+
+ Fixes most Malayalam failures. Down from 1.6% to 0.38% now. Fixes a
+ few more in other scripts too.
+
+ src/hb-ot-shape-complex-indic.cc | 12 ++++++++----
+ 1 files changed, 8 insertions(+), 4 deletions(-)
+
+commit 81202bd860e4034c18d9f80c5a4f33d9f48463a3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 15:10:02 2012 -0400
+
+ [Indic] Don't attach SM/VD to other characters
+
+ src/hb-ot-shape-complex-indic-private.hh | 3 ++
+ src/hb-ot-shape-complex-indic.cc | 38
+ ++++++++++++++++-------------
+ 2 files changed, 24 insertions(+), 17 deletions(-)
+
+commit efb4ad735691837a52447bedc1a66a87d0d9af51
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 14:27:38 2012 -0400
+
+ Fix compiler warnings
+
+ If x is not constant, we cannot ASSERT_STATIC on it.
+
+ src/hb-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f31d97e44eeb6fb141f3de928e27e033fc7b1f47
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 14:13:35 2012 -0400
+
+ [Indic] Form Telugu Reph out of Ra,Virama,ZWJ
+
+ Apparently this was approved in Feb 2012. No font yet.
+
+ src/hb-ot-shape-complex-indic-private.hh | 2 +-
+ src/hb-ot-shape-complex-indic.cc | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 2e193b240ec85cab0d4e2f8a375c5a7f0ef99985
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 14:02:35 2012 -0400
+
+ [Indic] Don't split U+0AC9
+
+ Althought IndicMatraCategory.txt classifies it as Top_And_Right matra,
+ it does not have Unicode decomposition, and Uniscribe does not do
+ anything special about it either.
+
+ Gujarati failures down from 0.672% to 0.0130966%.
+
+ src/hb-unicode.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 30c3d5e9fc61b49c2c6ad4e744300edd6f3e0261
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 13:56:32 2012 -0400
+
+ [Indic] Simplify Uniscribe cluster emulation
+
+ Now that we break syllables on Halant,ZWNJ, this code can be
+ simplified.
+
+ src/hb-ot-shape-complex-indic.cc | 11 ++---------
+ 1 files changed, 2 insertions(+), 9 deletions(-)
+
+commit decf6ffca475fe01ff3151b7641f629f031137d2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 13:51:31 2012 -0400
+
+ [Indic] Minor!
+
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9e4f94a72cea6d65a6a7ba5a47db92e00dbfbb91
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 13:48:03 2012 -0400
+
+ [Indic] Break syllables at Halant,ZWNJ
+
+ That's really what Uniscribe does, and explains a lot of pecularities
+ of
+ Halant,ZWNJ before the base.
+
+ Sent Telugu from 1% failures to 0.03%. Improved Kannada and Malayalam
+ slightly. Fixed half of Bengali, and did NOT break anything!
+
+ src/hb-ot-shape-complex-indic-machine.rl | 5 +++--
+ src/hb-ot-shape-complex-indic.cc | 5 ++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 2c372b80f6befad69e216e3f218b38640b8cc044
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 13:37:48 2012 -0400
+
+ [Indic] Better check for applying 'init'
+
+ Specifically, don't apply 'init' if previous char is a joiner.
+
+ Fixes some more of Bengali.
+
+ src/hb-ot-shape-complex-indic.cc | 9 +--------
+ src/hb-private.hh | 3 ++-
+ 2 files changed, 3 insertions(+), 9 deletions(-)
+
+commit 34a7440b7c6c6e53394ddbdbedaad57b23f85105
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 12:32:59 2012 -0400
+
+ [GPOS] Don't zero mark advances
+
+ Fixes more of Telugu, Kannada, and Oriya.
+
+ May break things (outside Indic...), but we cannot think of any
+ font relying
+ on this immediately.
+
+ src/hb-ot-layout-gpos-table.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 8ed248de77e5d2ed978e55c0ce1a11727bc9e34c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 11:42:24 2012 -0400
+
+ [Indic] Minor
+
+ src/hb-ot-shape-complex-indic.cc | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit d0e68dbd0b9fc9a42c4280d01c8ffd9c5015d550
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 11:25:41 2012 -0400
+
+ [Indic] Implement reph positioning step 5
+
+ Not tuned, just copied from step 2. Fixes another 0.5% of Kannada
+ failures. 1% to go.
+
+ src/hb-ot-shape-complex-indic.cc | 12 +++++++++++-
+ 1 files changed, 11 insertions(+), 1 deletions(-)
+
+commit a9e45c32e4a0d6da33c52f8427aa694e57f52eb9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 11:04:15 2012 -0400
+
+ [Indic] Don't let ZWNJ at the end of syllable affect base search
+
+ Fixes a few Devanagari, half of remaining Kannada failures,
+ quarter for
+ Telugu, and others slightly improved or unchanged.
+
+ src/hb-ot-shape-complex-indic.cc | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 20b68e699f73e6ce046c0ec143d40b3d6d48e06b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 10:47:46 2012 -0400
+
+ [Indic] Apply 'cjct' globally
+
+ Fixes 5 Devanagari failures, and no regressions.
+
+ src/hb-ot-shape-complex-indic.cc | 15 +++++++++------
+ 1 files changed, 9 insertions(+), 6 deletions(-)
+
+commit 51e764de441072e7c9f67de23e8ed717b9b8957d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 10:30:24 2012 -0400
+
+ [Indic] Unbreak old scriptures
+
+ Brings down failures with Lohit-Telugu from 57% to 1.40%.
+
+ src/hb-ot-shape-complex-indic.cc | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 900cf3d449bf36d4f8b1474590cae925fef48fc8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 20 10:18:23 2012 -0400
+
+ Minor
+
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 87cd63266e73af316b250573ef57388a0bcc9133
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 21:17:48 2012 -0400
+
+ [Indic] Recategorize some Kannada right matras
+
+ Kannada failures down from 3.5% to 2.93%.
+
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ .../indic/script-kannada/misc/MANIFEST | 1 +
+ .../indic/script-kannada/misc/right-matras.txt | 7 +++++++
+ 3 files changed, 9 insertions(+), 1 deletions(-)
+
+commit 3604d64ced909ade91998d294a7b4b2ee14d47aa
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 21:13:04 2012 -0400
+
+ [Indic] Recategorize GURMUKHI ADDAK
+
+ It's not in IndicSyllabicCategory.txt. Fixes most of Gurmukhi
+ failures.
+ Failures down from 7.7% to 0.222%!
+
+ src/hb-ot-shape-complex-indic.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 89328581236a53ec16508b95db54c7e5315b178f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 21:02:38 2012 -0400
+
+ Minor
+
+ src/hb-ot-layout-gsubgpos-private.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 47ef931f13778b894090139a64238a5ab9ac1154
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 20:52:44 2012 -0400
+
+ [buffer] Make sure out_info = info during GPOS
+
+ src/hb-buffer.cc | 9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+commit ae63cf206291befe3920adfe015e6cd0961580e5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 20:45:41 2012 -0400
+
+ Print line number during return when tracing
+
+ src/hb-private.hh | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 5249f3aee108b0f41770d137e63a625f594418e7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 20:30:22 2012 -0400
+
+ [Indic] Unbreak Khmer
+
+ For Khmer, all consonants are subjoining. No need to look in
+ the font.
+ We were looking in the wrong order anyway.
+
+ src/hb-ot-shape-complex-indic.cc | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit e0475345d5d7db8dbc8b554beedfa2435c5d7fd1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 20:24:14 2012 -0400
+
+ [Indic] Apply 'akhn' globally
+
+ Fixes 1.5% more failures for Telugu, 2% for Kannada.
+ Breaks one test in Devanagari.
+
+ src/hb-ot-shape-complex-indic.cc | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit c87bcddb10752b407c0471ee5ac4de6f1b00b711
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 20:03:25 2012 -0400
+
+ [Indic] Add failing test for Kannada
+
+ .../indic/script-kannada/misc/misc.txt | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit fa247ebe524f92fa95d344ba912f704262879c13
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 19:52:19 2012 -0400
+
+ [Indic] Better position U+0CD5
+
+ Fixes another 5% of Kannada failures.
+
+ src/hb-ot-shape-complex-indic.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit f055442716ec7543ed156d4789955b19c11a5255
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 16:20:21 2012 -0400
+
+ [Indic] Lookup consonant position in the font
+
+ Fixes most failures of Oriya, and improves others a bit.
+
+ src/hb-ot-map-private.hh | 13 +++-
+ src/hb-ot-shape-complex-indic-private.hh | 105
+ ------------------------------
+ src/hb-ot-shape-complex-indic.cc | 63 +++++++++++++-----
+ 3 files changed, 54 insertions(+), 127 deletions(-)
+
+commit 74d1d88781e91866a52e27f391e34df03b313442
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 16:14:23 2012 -0400
+
+ [GSUB] Fix would_apply() for LigatureSubst
+
+ src/hb-ot-layout-gsub-table.hh | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 787f7d1e9ba9ad038f24e5a1063d12c7d169ad37
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 15:29:13 2012 -0400
+
+ [TODO] Minor
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit be73a5f9368136ecbdb211b96516ad0c554c8201
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 14:59:15 2012 -0400
+
+ Add src/test-would-substitute tool
+
+ src/Makefile.am | 6 ++-
+ src/test-would-substitute.cc | 94 ++++++++++++++++++++++++++++++
+ src/test.cc | 132
+ ++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 231 insertions(+), 1 deletions(-)
+
+commit e72b360ac6381b549249b8836fa3e70b909d3437
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 14:35:23 2012 -0400
+
+ Refactor / finish would_apply() operation
+
+ Untested.
+
+ src/hb-ot-layout-gpos-table.hh | 6 +-
+ src/hb-ot-layout-gsub-table.hh | 126 ++++++++----------
+ src/hb-ot-layout-gsubgpos-private.hh | 233
+ +++++++++++++++++++++++++++++++++-
+ src/hb-ot-layout.cc | 11 ++
+ src/hb-ot-layout.h | 7 +
+ 5 files changed, 308 insertions(+), 75 deletions(-)
+
+commit 8c973ebf0f59abb5ee920edd5d64e23d8e47ad75
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 13:25:08 2012 -0400
+
+ [Indic] Implement per-script matra positioning
+
+ Following what the spec says.
+
+ Brings down Telugu failures from 40% to 3.75%, and Kannada failures
+ from
+ 44% to 10%. Does NOT affect other scripts' test results.
+
+ src/hb-ot-shape-complex-indic-private.hh | 2 +-
+ src/hb-ot-shape-complex-indic.cc | 40
+ +++++++++++++++++++++++++++--
+ src/hb-unicode.cc | 2 +-
+ 3 files changed, 39 insertions(+), 5 deletions(-)
+
+commit 8bb32458f95f13f66688e0811cc91f1bfffb867d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 12:59:06 2012 -0400
+
+ [Indic] More refactoring
+
+ src/hb-ot-shape-complex-indic-private.hh | 9 ++--
+ src/hb-ot-shape-complex-indic.cc | 65
+ +++++++++++++++++++++++-------
+ 2 files changed, 54 insertions(+), 20 deletions(-)
+
+commit 9ccc6382ba43760167c134c18c1c4ada4b8c3f22
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 12:32:16 2012 -0400
+
+ [Indic] Minor refactoring
+
+ src/hb-ot-shape-complex-indic.cc | 127
+ +++++++++++++++++++++-----------------
+ 1 files changed, 71 insertions(+), 56 deletions(-)
+
+commit f83aaa3133de5d807be267a100d6a200e8db9017
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 12:23:23 2012 -0400
+
+ [Indic] Minor
+
+ src/hb-ot-shape-complex-indic-private.hh | 42
+ ++++++++++++++++++-----------
+ 1 files changed, 26 insertions(+), 16 deletions(-)
+
+commit be8b9f5f715f6fb36b98bd33c3303f79cc068f8a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 12:11:12 2012 -0400
+
+ [Indic] Start refactoring different matra positions per script
+
+ src/hb-ot-shape-complex-indic-private.hh | 36
+ ++++++++++++++++++-----------
+ src/hb-ot-shape-complex-indic.cc | 4 +-
+ 2 files changed, 24 insertions(+), 16 deletions(-)
+
+commit deeb540a74f8d394db273145b17bf385d14d01bb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 11:30:48 2012 -0400
+
+ [test] Ignore tests with DOTTED CIRCLE in the output
+
+ test/shaping/hb_test_tools.py | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit b01d9b3d90e892341ee4463f2eda4600850b97d8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 19 11:25:49 2012 -0400
+
+ [Indic] Disallow decomposition of a couple characters
+
+ This is a hack for now. Will be fixed when we do
+ complex-shaper-driven
+ normalization properly.
+
+ The results with or without decomposition are the same, but Uniscribe
+ does not normalize, so this matches better.
+
+ src/hb-unicode.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 422ecd2d3c198a36d07d409341cb82ea57c7ad6b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 18 23:25:58 2012 -0400
+
+ [Indic] Accept a forced Rakar sequence at the end of syllable
+
+ In Sinhala, Rakar is formed by Al-Lakuna,ZWJ,Ra. If you put that
+ at the
+ end of a Consonant,Matra syllable, you get a dotted-circle from
+ Uniscribe. Apparently adding a ZWJ before the Al-Lakuna "fixes" that.
+ And people have been encoding that sequence... So, allow a forced
+ "ZWJ,Virama,ZWJ,Ra" sequence at the of syllables.
+
+ Fixes some 100 or more of Sinhala failures. Now at 622 only (0.23%).
+
+ src/hb-ot-shape-complex-indic-machine.rl | 3 ++-
+ .../indic/script-sinhala/misc/misc.txt | 2 ++
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 6fc1732003d71cf90d37247482772c3da884687f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 18 17:49:19 2012 -0400
+
+ [Indic] Allow joiners on both sides of Halant at the same time
+
+ The sequence <ZWJ,Al-Lakuna,ZWJ> is used in Sinhala to explicitly ask
+ for Rakar. Fixes two-thousand Sinhala tests. Not many left.
+
+ src/hb-ot-shape-complex-indic-machine.rl | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 10cdc94eee2225f14c198c015256a5a0063eecad
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 18 17:42:34 2012 -0400
+
+ [Indic] In final reordering, find base, even if it disappeared
+
+ POS_BASE can disappear if base ligated backward. Define base as last
+ with position not after base.
+
+ Fixes a few hundred of Sinhala failures with Iskoola Pota.
+
+ src/hb-ot-shape-complex-indic.cc | 7 ++-----
+ .../indic/script-sinhala/misc/misc.txt | 1 +
+ 2 files changed, 3 insertions(+), 5 deletions(-)
+
+commit 9c4d24a3a677a58ec59c7fb0f8b70b8aad30a032
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 18 17:29:10 2012 -0400
+
+ [Indic] Minor
+
+ src/hb-ot-shape-complex-indic.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 3285e107c9a83aeb552e67f9460680ff6d167d88
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 18 17:22:14 2012 -0400
+
+ [Indic] Implement Sinhala "Al Lakuna" Reph behavior
+
+ In Sinhala, Reph is formed only explicitly, by the presence of a ZWJ.
+
+ src/hb-ot-shape-complex-indic-private.hh | 2 ++
+ src/hb-ot-shape-complex-indic.cc | 7 ++++++-
+ .../indic/script-sinhala/misc/MANIFEST | 1 +
+ .../indic/script-sinhala/misc/reph.txt | 3 +++
+ 4 files changed, 12 insertions(+), 1 deletions(-)
+
+commit 91cade755534c42bb826a6aefcbca8a543d94387
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 18 16:50:41 2012 -0400
+
+ [Indic/Unicode] Decompose Sinhala split matras the way Uniscribe likes
+
+ Makes no visual difference.
+
+ Fixes most of the failures. Down from 15% to 1.3%!
+
+ src/hb-unicode.cc | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit d8942dcbb4e3249a2d78a6455c119294ed4390bc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 18 16:34:10 2012 -0400
+
+ Apply Tibetan (global) features.
+
+ Fixes all Tibetan failures. All 180k of them!
+
+ Merges back Hangul into the default shaper.
+
+ src/hb-ot-shape-complex-misc.cc | 82
+ ++++++++++++++++--------------------
+ src/hb-ot-shape-complex-private.hh | 7 ---
+ 2 files changed, 37 insertions(+), 52 deletions(-)
+
+commit 552d19b7a11f7dff888587fce4d56d9f8e47e819
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 18 16:00:49 2012 -0400
+
+ [Indic] Treat Register Shifters like Nukta
+
+ Really this time.
+
+ Fixes another 18 Khmer tests.
+
+ src/hb-ot-shape-complex-indic-machine.rl | 2 +-
+ src/hb-ot-shape-complex-indic.cc | 2 --
+ .../south-east-asian/script-khmer/misc/misc.txt | 1 +
+ 3 files changed, 2 insertions(+), 3 deletions(-)
+
+commit e8cd81f76d159f3ecf808952dab24bc07782497a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 18 16:00:20 2012 -0400
+
+ [Indic] Minor
+
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 69f26bf39c824d6bf5b1c0d410380cc5462ad5ca
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 18 15:45:43 2012 -0400
+
+ [Indic] Fix Matra reordering when base is at end of syllable
+
+ For example: U+915,U+200c,U+93f
+
+ Fixes last Tamil failure!
+
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ .../indic/script-devanagari/misc/misc.txt | 1 +
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+commit d16ccc4ae7aa8be460881042413fa2637929fede
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 18 15:43:55 2012 -0400
+
+ Leave one extra item at the end of buffer allocation
+
+ Just in case, for the times we do out-of-bounds access.
+
+ jk
+
+ src/hb-buffer-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 075d671f1093d2e3c58f7f45568696030f1b3efd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 18 15:41:53 2012 -0400
+
+ [Indic] Fix out-of-bounds array access
+
+ src/hb-ot-shape-complex-indic.cc | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit dcb527242b1eca4db1e190a7802f9cd132aaf46e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 18 15:28:25 2012 -0400
+
+ [Indic] Allow joiners before matras
+
+ Fixes 1 more Devanagari test!
+
+ src/hb-ot-shape-complex-indic-machine.rl | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 391cc0331749e263bdfe83a8f5f6d76f2360ee7a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 18 15:10:05 2012 -0400
+
+ [Indic] Allow halant group in Vowel and placeholder syllables
+
+ Fixes 2 out of 560 Devanagari failures. AND:
+ Fixes 1 out of 2 Tamil failures.
+
+ src/hb-ot-shape-complex-indic-machine.rl | 7 ++++---
+ .../indic/script-devanagari/misc/misc.txt | 1 +
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+commit ca4e3d3eab7b738c2b8e2a81696a28bca1b81495
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 18 15:05:40 2012 -0400
+
+ [Indic] Streamline halant/joiner in grammar
+
+ src/hb-ot-shape-complex-indic-machine.rl | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 418d00dffddd95a1f27e9be15752d494c627d45e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 18 14:57:28 2012 -0400
+
+ [Indic] Minor
+
+ src/hb-ot-shape-complex-indic-machine.rl | 3 ++-
+ .../indic/script-devanagari/misc/misc.txt | 3 +++
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 4c3691d2a32ca7e54a54f7c08098fd96fa7af39e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 18 14:23:55 2012 -0400
+
+ [Indic] Hopefully minor!
+
+ Refactoring Indic machin. No semantic change.
+
+ src/hb-ot-shape-complex-indic-machine.rl | 12 +++++++-----
+ 1 files changed, 7 insertions(+), 5 deletions(-)
+
+commit e092c556fb1cf38be3cea1f4b75a0d879372dfa2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 18 14:09:25 2012 -0400
+
+ [Indic] Minor
+
+ src/hb-ot-shape-complex-indic-private.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 14dbdd9e39d3a869fd1521000c889c347433d22b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 18 13:13:03 2012 -0400
+
+ [Indic] Unbreak Tamil
+
+ Tamil has only about 150 failures now!
+
+ src/hb-ot-shape-complex-indic.cc | 18 +++++++++++++++++-
+ 1 files changed, 17 insertions(+), 1 deletions(-)
+
+commit db8981f1e0e8625714568c6d0f11f0b317b11d0a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 17 18:17:30 2012 -0400
+
+ [Indic] Position Khmer Robat
+
+ It's a visual Repha.
+
+ Still not positioning logical Repha as occurs in Malayalam.
+
+ Another 200 Khmer failures fixed. 547 to go. That's better than
+ Devanagari!
+
+ src/hb-ot-shape-complex-indic-machine.rl | 36
+ +++++++++++++++--------------
+ src/hb-ot-shape-complex-indic-private.hh | 7 +++--
+ src/hb-ot-shape-complex-indic.cc | 13 ++++++++++
+ 3 files changed, 36 insertions(+), 20 deletions(-)
+
+commit 25bc489498ef7d0beb8fe9ab663e3f0b2f52c9c2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 17 17:53:03 2012 -0400
+
+ [Indic] Better categorize Register Shifters and Khmer Various signs
+
+ Down another 500 or so Khmer failures!
+
+ src/hb-ot-shape-complex-indic-machine.rl | 14 +++++++-------
+ src/hb-ot-shape-complex-indic-private.hh | 2 +-
+ src/hb-ot-shape-complex-indic.cc | 8 ++++----
+ .../south-east-asian/script-khmer/misc/MANIFEST | 2 ++
+ .../script-khmer/misc/other-marks-invalid.txt | 4 ++++
+ .../script-khmer/misc/other-marks.txt | 6 ++++++
+ 6 files changed, 24 insertions(+), 12 deletions(-)
+
+commit 39b17837b4064d59c18cebb49c1c0b5b8cc0c117
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 17 17:09:29 2012 -0400
+
+ Add hb_buffer_normalize_glyphs() and hb-shape --normalize-glyphs
+
+ This reorders glyphs within the cluster to a nominal order.
+ This should
+ have no visible effect on the output, but helps with testing, for
+ getting the same hb-shape output for visually-equal glyphs for each
+ cluster.
+
+ src/hb-buffer.cc | 76
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-buffer.h | 13 +++++++++
+ src/hb-private.hh | 29 +++++++++++++++-----
+ util/options.cc | 1 +
+ util/options.hh | 7 ++++-
+ 5 files changed, 118 insertions(+), 8 deletions(-)
+
+commit 25e302da9a712e6f1d63b0d243a8df0d326ddba3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 17 14:25:14 2012 -0400
+
+ [Indic] Minor
+
+ src/hb-ot-shape-complex-indic.cc | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 5d32690a3428fa86eb26fe5fcec943a10aa95881
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 17 14:23:28 2012 -0400
+
+ [Indic] For scripts without Half forms, always choose first consonant
+ as base
+
+ In such scripts (ie. Khmer), a ZWJ/ZWNJ shouldn't stop the search for
+ base. So, instead just choose the first consonant as base directly.
+
+ Test sequence:
+ U+1798,200c,U+17C9,U+17D2,U+179B,U+17C1,U+17C7
+
+ src/hb-ot-shape-complex-indic.cc | 59
+ ++++++++++++++++++++++---------------
+ 1 files changed, 35 insertions(+), 24 deletions(-)
+
+commit 34b57149065d96f7528aaccaa7654e956ce27e93
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 17 14:09:32 2012 -0400
+
+ [Indic] Treat Khmer Register Shifters more like Nuktas
+
+ Except that there may be a ZWNJ before a Register Shifter.
+
+ src/hb-ot-shape-complex-indic-machine.rl | 2 +-
+ .../south-east-asian/script-khmer/misc/misc.txt | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 11e2a601b19861b05dbb2051d2d078c3cfd75b29
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 17 14:02:28 2012 -0400
+
+ [Indic] Minor
+
+ src/hb-ot-shape-complex-indic-machine.rl | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 0201e0a4649ad5b607e50bcb9605e7a5b7143812
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 17 13:55:10 2012 -0400
+
+ [Indic] Apply 'cfar' for Khmer
+
+ Mark stuff after a pre-base reordering Ro 'cfar'. Used in Khmer.
+ This allows distinguishing the following cases with MS Khmer fonts:
+
+ U+1784,U+17D2,U+179A,U+17D2,U+1782
+ U+1784,U+17D2,U+1782,U+17D2,U+179A
+
+ src/hb-ot-shape-complex-indic.cc | 16
+ ++++++++++++++--
+ .../south-east-asian/script-khmer/misc/misc.txt | 2 ++
+ 2 files changed, 16 insertions(+), 2 deletions(-)
+
+commit 55f70ebfb95083f515d9b0044a2a65ab11484bb5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 17 12:50:13 2012 -0400
+
+ [Indic] Position final subjoined consonants (and vowels) after matras
+
+ In Khmer, a final subjoined consonant or independent vowel can occur
+ after matras. This final subjoined thing should NOT be reordered to
+ before the matra even though it's subjoined.
+
+ Fixes another 1k of the Khmer failures. Not much left really.
+
+ src/hb-ot-shape-complex-indic-private.hh | 1 +
+ src/hb-ot-shape-complex-indic.cc | 13 +++++++++++++
+ .../south-east-asian/script-khmer/misc/misc.txt | 2 ++
+ 3 files changed, 16 insertions(+), 0 deletions(-)
+
+commit c50ed71e9a3df1844f564de66d54b46a696c1356
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 17 11:54:28 2012 -0400
+
+ [Indic] Recategorize Khmer coeng sign as a separate category OT_Coeng
+
+ Amend the syllable structure to allow a final subscripted consonant
+ (Coeng+C) and a final subscripted independent vowel (Coeng+V).
+ Fixes another 2k of Khmer failures.
+
+ src/hb-ot-shape-complex-indic-machine.rl | 7 ++++---
+ src/hb-ot-shape-complex-indic.cc | 6 +++++-
+ .../south-east-asian/script-khmer/misc/misc.txt | 1 +
+ 3 files changed, 10 insertions(+), 4 deletions(-)
+
+commit deb521dee4fdca8c2124cfb39a205e6269d4a70d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 17 11:37:32 2012 -0400
+
+ [Indic] Add a separate Coeng class
+
+ No characters recategorized yet. No semantic change.
+
+ src/hb-ot-shape-complex-indic-machine.rl | 1 +
+ src/hb-ot-shape-complex-indic-private.hh | 3 ++-
+ src/hb-ot-shape-complex-indic.cc | 26
+ ++++++++++++++++----------
+ 3 files changed, 19 insertions(+), 11 deletions(-)
+
+commit 74ccc6a1322f8c48c5f2a05f04821783c4b87a14
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 17 11:16:19 2012 -0400
+
+ [Indic] Move Halant with after-base consonants
+
+ Normally, we attach the Halant to the previous character and move it
+ with it. For after-base consonants however, the Halant "belongs"
+ to the
+ consonant after, so attach it so.
+
+ This fixes Bengali sequences involving post-base consonant Ya, which
+ should ligate with the Halant to form Ya Phala, but previously a
+ reordered matras was blocking the ligation.
+
+ src/hb-ot-shape-complex-indic.cc | 11 +++++++++++
+ .../indic/script-bengali/misc/misc.txt | 1 +
+ 2 files changed, 12 insertions(+), 0 deletions(-)
+
+commit d5c4edcdd6df32f2f23aca44f14838b4baab4d7a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 17 10:40:59 2012 -0400
+
+ [Indic] Apply presentation-forms features all at once
+
+ Seems like this is what Uniscribe is doing, and does not break
+ any fonts
+ we tested (with Devanagari, Malayalam, Khmer, and Bengali), while
+ fixing
+ some Ra Phala sequences for Bengali with Vrinda. Fixes another 2% of
+ Bengali failures (a couple more to go).
+
+ src/hb-ot-shape-complex-indic.cc | 6 +++---
+ .../indic/script-bengali/misc/misc.txt | 1 +
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+commit 559f70667891a3ceeffb36f40de38a4f85868945
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 22:43:17 2012 -0400
+
+ Fix MarkAttachmentType matching
+
+ Fixes issue reported by Khaled Hosny with his Hussaini Nastaleeq font
+ and sequences like those added in the previous commit.
+
+ src/hb-ot-layout.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 6de103547e4a7fb34c833861713ea373cd912261
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 22:46:06 2012 -0400
+
+ [test/arabic] Add Arabic tests for mark skipping
+
+ Expose a bug with Khaled's Hussaini Nastaleeq font.
+
+ .../script-arabic/misc/diacritics/MANIFEST | 1 +
+ .../misc/diacritics/mark-skipping.txt | 10 ++++++++++
+ 2 files changed, 11 insertions(+), 0 deletions(-)
+
+commit ad4494759fa8bfd2497800c24fa414075ed1aa61
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 22:40:21 2012 -0400
+
+ Minor
+
+ src/hb-ot-layout.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit af92b4cc90e4184d5bdd8037c551ed482700114f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 20:31:24 2012 -0400
+
+ [Indic] Disable 'kern' in Uniscribe bug compatibility mode
+
+ Uniscribe does not apply 'kern' in the Indic module. Some of
+ the Khmer
+ fonts they ship have small adjustments in the 'kern' table. Disable
+ 'kern' in the Indic module under Uniscribe bug compatibility mode.
+
+ Fixes some 10% of the Khmer failures. Remains under 3% (excluding
+ dotted-circle ones).
+
+ src/hb-ot-shape-complex-indic.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit d96838ef951ce6170eb2dc576ebcba2262cf7008
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 20:26:57 2012 -0400
+
+ Allow complex shapers overriding common features
+
+ In a new callback... Currently unused by all complex shapers.
+
+ src/hb-ot-shape-complex-arabic.cc | 6 ++++++
+ src/hb-ot-shape-complex-indic.cc | 6 ++++++
+ src/hb-ot-shape-complex-misc.cc | 18 ++++++++++++++++++
+ src/hb-ot-shape-complex-private.hh | 30 ++++++++++++++++++++++++++++++
+ src/hb-ot-shape.cc | 2 ++
+ 5 files changed, 62 insertions(+), 0 deletions(-)
+
+commit df50b8474094f0563ccfdae12c4425a51b72add6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 19:56:29 2012 -0400
+
+ [Indic] Categorize other Khmer marks
+
+ Mark them the same as the Register Shifters for now. Need to rename
+ that category to something more sensible after all is settled.
+
+ Fixes another percent of Khmer failures. Down to under 3%!
+
+ src/hb-ot-shape-complex-indic.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 8e7b5882fb4c1921c9d030d354a9b998115cdb8c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 17:04:46 2012 -0400
+
+ [Indic] Recognize pre-base reordering Ra anywhere in the syllable
+
+ We were doing that only immediately after base.
+
+ Fixes another percent in the Khmer failures. About three more
+ to go...
+
+ src/hb-ot-shape-complex-indic.cc | 84
+ +++++++++++++++++++++-----------------
+ 1 files changed, 46 insertions(+), 38 deletions(-)
+
+commit 7d09c98a1fff97127e48eae48d380dc9fcff288e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 16:45:22 2012 -0400
+
+ [Indic] Recognizer Register Shifter marks
+
+ Fixes another 6% of the Khmer failures.
+
+ src/hb-ot-shape-complex-indic-machine.rl | 3 ++-
+ src/hb-ot-shape-complex-indic-private.hh | 5 +++--
+ src/hb-ot-shape-complex-indic.cc | 2 ++
+ 3 files changed, 7 insertions(+), 3 deletions(-)
+
+commit 60da763dfac96a7931d6e6bdef8b9973bd5209ab
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 16:13:32 2012 -0400
+
+ [GSUB/GDEF] Guess glyph classes after substitution only if no GDEF
+
+ Brings down Khmer failures with Daun Penh font from 36% to 20%.
+
+ src/hb-ot-layout-gsubgpos-private.hh | 20 +++++++++++++-------
+ 1 files changed, 13 insertions(+), 7 deletions(-)
+
+commit fcdc5f1c8849a7f38d9f34f64d60c6d95d7501f7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 15:52:54 2012 -0400
+
+ [Indic] Categorize Khmer Ro
+
+ Khmer failures down from 58% to 36%.
+
+ src/hb-ot-shape-complex-indic-private.hh | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 78818124b17691ec2c647142fdb9ae743aa03dee
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 15:49:08 2012 -0400
+
+ [Indic] Reoder pre-base reordering Ra
+
+ Brings down Malayalam failures from 14% down to 3%.
+
+ src/hb-ot-shape-complex-indic.cc | 42
+ ++++++++++++++++++++++++++-----------
+ 1 files changed, 29 insertions(+), 13 deletions(-)
+
+commit 1a1dbe9a2787f226f3e43063da8eb6633438b0a0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 15:40:33 2012 -0400
+
+ [Indic] Rename
+
+ src/hb-ot-shape-complex-indic.cc | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 46e645ec4b59f0a278347be11f40c7df700d5bb6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 15:30:05 2012 -0400
+
+ [Indic] Start implementing pre-base reordering
+
+ src/hb-ot-shape-complex-indic.cc | 33 ++++++++++++++++++---------------
+ 1 files changed, 18 insertions(+), 15 deletions(-)
+
+commit 921ce5b17daf06af8e17989a3e335b9f5df20483
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 15:26:56 2012 -0400
+
+ [Indic] Rename
+
+ No semantic change.
+
+ src/hb-ot-shape-complex-indic.cc | 26 +++++++++++++-------------
+ 1 files changed, 13 insertions(+), 13 deletions(-)
+
+commit b504e060f008e95b1ba36c06600c9fea4f5d4808
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 15:21:12 2012 -0400
+
+ [Indic] Implement After-Main Reph positioning
+
+ Almost...
+
+ src/hb-ot-shape-complex-indic.cc | 8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 17d7de91d76406d3e92db37d9eef2fc615f06e68
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 15:20:15 2012 -0400
+
+ [Indic] Apply 'pref' to pre-base reodering Ra
+
+ No reordering yet.
+
+ src/hb-ot-shape-complex-indic.cc | 10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit 362d3db8d3527d0fef260a17d2466e92a4a25425
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 15:15:28 2012 -0400
+
+ [Indic] Minor
+
+ Should not be any semantic change. In preparation for implementing
+ pre-base reordering Ra.
+
+ src/hb-ot-shape-complex-indic.cc | 8 +-------
+ 1 files changed, 1 insertions(+), 7 deletions(-)
+
+commit 70fe77bb9a25922bd34f206826d8731d901fb451
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 14:52:18 2012 -0400
+
+ Minor
+
+ src/hb-ot-shape-complex-indic.cc | 44
+ +++++++++++++++++++-------------------
+ 1 files changed, 22 insertions(+), 22 deletions(-)
+
+commit 2f903215c5da2330a37abe489a3f45f7c3fd5a09
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 13:54:43 2012 -0400
+
+ Minor
+
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit a3e04bee2c2fa648759a87e460db6b4f1b685586
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 13:47:19 2012 -0400
+
+ [Indic] Reorder virama only for old Indic spec
+
+ src/hb-ot-shape-complex-indic.cc | 15 +++++++++++++--
+ 1 files changed, 13 insertions(+), 2 deletions(-)
+
+commit 0de771b72da6b342b015e3556190821547a4011d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 13:39:36 2012 -0400
+
+ [Indic] Categorize Khmer consonants
+
+ src/hb-ot-shape-complex-indic.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit d487fff266258eb1af056e9704cfb09d04251ddc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 13:25:17 2012 -0400
+
+ Split matras without a Unicode decomposition
+
+ This is a hack for now, to get us going with Khmer. This will be
+ refactored properly later to move the complex logic into complex
+ shapers.
+
+ src/hb-unicode.cc | 22 ++++++++++++++++++++++
+ 1 files changed, 22 insertions(+), 0 deletions(-)
+
+commit 8aa801a6fd1a737fa20b851edf7528bdd6635b8b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 13:24:26 2012 -0400
+
+ [Indic] Adjust position for split matras
+
+ We are going to split matras without a Unicode decompositions in a way
+ that the second half takes the codepoint of the whole matra. So,
+ position them where the second half is supposed to end up.
+
+ src/hb-ot-shape-complex-indic-private.hh | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 1feb8345a5fd92297eb6796e6dce633bafa0c76e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 13:23:40 2012 -0400
+
+ [GSUB] Allow 1-to-1 ligature substitutions!
+
+ Apparently Uniscribe allows these, and they are used in some Khmer
+ fonts
+ shipped with Windows, namely, Daun Penh.
+
+ src/hb-ot-layout-gsub-table.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 29f106d7fba25e1464debd3a4831a7380d75c4c9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 16 12:05:35 2012 -0400
+
+ [Indic] Apply Above Forms
+
+ src/hb-ot-shape-complex-indic.cc | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit fa2bd9fb63d83b657373764d4b657084d8327fc9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 14 12:15:54 2012 -0400
+
+ Further simplify atomic ops on Visual Studio
+
+ src/hb-atomic-private.hh | 5 -----
+ 1 files changed, 0 insertions(+), 5 deletions(-)
+
+commit 0a492357016bc9a614d2a726f2006c10af68ca58
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 13 13:20:49 2012 -0400
+
+ Minor
+
+ src/hb-warning.cc | 29 +++++------------------------
+ 1 files changed, 5 insertions(+), 24 deletions(-)
+
+commit 11c4ad439ef2b39a840f397a693b1ba643f52c21
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 13 11:29:31 2012 -0400
+
+ Add -Wcast-align
+
+ configure.ac | 3 +++
+ src/Makefile.am | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+commit a98d0ab18624501ee60551304f2715361ac643da
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 13 10:19:10 2012 -0400
+
+ Make sure HB_BEGIN_DECLS / HB_END_DECLS is only used in public headers
+
+ So we can use them to switch default visibility to internal if
+ desired,
+ and use these to make only declared symbols public.
+
+ src/check-c-linkage-decls.sh | 10 +++++++++-
+ src/hb-fallback-shape-private.hh | 6 ------
+ src/hb-ot-shape-complex-indic-machine.rl | 4 ----
+ 3 files changed, 9 insertions(+), 11 deletions(-)
+
+commit 5c5bc96216c9ad58243eb3ed27b253e237f08ebe
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 13 10:15:37 2012 -0400
+
+ Allow overriding HB_BEGIN_DECLS / HB_END_DECLS
+
+ src/hb-common.h | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit ec5f5f0f8a1d5b3ff98452175bb4450a59897620
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 13 10:00:42 2012 -0400
+
+ Don't export inline methods
+
+ configure.ac | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 50a4e78b530563917eb606ff3b96dcc9eed5b3ee
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 13 09:48:39 2012 -0400
+
+ Check for exported weak symbols
+
+ Ouch, all our C++ inline functions are being exported (weakly)
+ already.
+ Fix coming.
+
+ src/check-internal-symbols.sh | 8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+commit b5aeb95afeb13a66177caada9f5d5ad4cddbd35f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 13 09:45:54 2012 -0400
+
+ Make hb_in_range() static
+
+ src/hb-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 271c8f89075607c689938b4f5e60323d9a1acd70
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 13 09:32:30 2012 -0400
+
+ Minor
+
+ src/hb-ft.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 391f1ff5d894b60bfe0f606be436ffe7e43f7455
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 13 09:04:07 2012 -0400
+
+ Fix _InterlockedCompareExchangePointer on x86
+
+ src/hb-atomic-private.hh | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 2023e2b54d91924dddfd228ffdbb46021135b068
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 11 19:00:30 2012 -0400
+
+ [ft] Disable ppem setting
+
+ The calculations were wrong.
+
+ FreeType makes it really hard to set size and ppem independently.
+ For now, disable it. Need to come up with a fix later.
+
+ src/hb-ft.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit cdf7444505a7ae49d20f9ba6776dea92c1fde2a6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 11 18:52:39 2012 -0400
+
+ [ft] Use unfitted kerning if x_ppem is zero
+
+ src/hb-ft.cc | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 6d08c7f1b3601095f9a12630045331dd0fe75380
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 11 18:01:27 2012 -0400
+
+ Revert "Towards templatizing common Lookup types"
+
+ This reverts commit 727135f3a9938c1ebd5b9f5015a46c7ccc8573c5.
+
+ This is work-in-progress. Didn't mean to push it out just yet.
+
+ src/hb-ot-layout-gpos-table.hh | 16 ++++++----------
+ src/hb-ot-layout-gsub-table.hh | 24 ++++++++++--------------
+ src/hb-ot-layout-gsubgpos-private.hh | 33
+ ++-------------------------------
+ 3 files changed, 18 insertions(+), 55 deletions(-)
+
+commit 552bf3a9f9651311084b7979805dbdc18c0335ca
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 11 16:44:51 2012 -0400
+
+ Bump WINNT version requested from 500 to 600
+
+ Since we use the OpenType versions of Uniscribe functions, we are
+ relying on that version of the WINNT API. Otherwise, usp10.h
+ will hide
+ those symbols.
+
+ src/hb-uniscribe.cc | 2 +-
+ src/hb-uniscribe.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 9a5b421a64db1bb23d5c6ebbc3bf3f3a5513dc36
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 11 16:35:04 2012 -0400
+
+ Fix build with no Unicode funcs implementations provided
+
+ src/hb-unicode-private.hh | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 6efe1eca660135096f05987ac0ef9b635de6cdfd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 11 15:30:08 2012 -0400
+
+ Update git.mk to upstream
+
+ git.mk | 58 ++++++++++++++++++++++++++++++++++++++--------------------
+ 1 files changed, 38 insertions(+), 20 deletions(-)
+
+commit 727135f3a9938c1ebd5b9f5015a46c7ccc8573c5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 3 22:15:35 2012 -0400
+
+ Towards templatizing common Lookup types
+
+ src/hb-ot-layout-gpos-table.hh | 16 ++++++++++------
+ src/hb-ot-layout-gsub-table.hh | 24 ++++++++++++++----------
+ src/hb-ot-layout-gsubgpos-private.hh | 33
+ +++++++++++++++++++++++++++++++--
+ 3 files changed, 55 insertions(+), 18 deletions(-)
+
+commit 1167c7bfc9e61f145e11da4881968293a4d3c0a9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 3 11:38:46 2012 -0400
+
+ Minor
+
+ test/shaping/texts/in-tree/shaper-thai/MANIFEST | 2 +-
+ .../texts/in-tree/shaper-thai/misc/MANIFEST | 1 -
+ .../texts/in-tree/shaper-thai/misc/misc.txt | 6 ------
+ .../texts/in-tree/shaper-thai/script-thai/MANIFEST | 1 +
+ .../in-tree/shaper-thai/script-thai/misc/MANIFEST | 1 +
+ .../shaper-thai/script-thai/misc/sara-am.txt | 4 ++++
+ 6 files changed, 7 insertions(+), 8 deletions(-)
+
+commit aa116582e69d18777448e7993078e5d6335ddfed
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 29 10:50:12 2012 -0400
+
+ Minor
+
+ .../indic/script-malayalam/misc/misc.txt | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 1f13c7185f02ea18d4fadd2ea8ad444bea863c39
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jun 27 10:07:27 2012 -0400
+
+ Add TODO item
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 12f5c0a222a2f0aebe63c0d367937a0ff985474a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 26 11:16:13 2012 -0400
+
+ Fix check for Intel atomic ops
+
+ configure.ac | 9 +++++----
+ src/hb-atomic-private.hh | 2 +-
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+commit 6932a41fb61ffc2901c260587b1e98ed9c2a7ea1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 26 10:46:31 2012 -0400
+
+ Use octal-escaped UTF-8 characters instead of plain text
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=50970
+
+ src/hb-private.hh | 17 ++++++++++++-----
+ 1 files changed, 12 insertions(+), 5 deletions(-)
+
+commit 8c0ea7bcb4409aaf8c96ad641f2db30003228ad0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jun 24 13:20:56 2012 -0400
+
+ Disable introspection again
+
+ Until I figure out the build issues. Sigh...
+
+ configure.ac | 2 +-
+ src/Makefile.am | 42 +++++++++++++++++++++---------------------
+ 2 files changed, 22 insertions(+), 22 deletions(-)
+
+commit 8c5f5e6f5ec2b6a219fbdfc955f6299325a0adde
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jun 17 14:58:59 2012 -0400
+
+ Minor
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 49f8e0cd9a5493ae26857c43bac0711cdf47c80d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 16 15:40:03 2012 -0400
+
+ GStaticMutex is deprecated
+
+ src/hb-mutex-private.hh | 9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+commit 5e113a4b7921ced6af2d53460a7a2f1d0185c02a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 16 15:26:13 2012 -0400
+
+ g_thread_init() is deprecated
+
+ test/api/hb-test.h | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 1bc1cb3603167f5da309336f7018c8b0608ac104
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 16 15:21:55 2012 -0400
+
+ Make source more digestable for gobject-introspection
+
+ src/hb-blob.cc | 2 +-
+ src/hb-blob.h | 2 +-
+ src/hb-buffer-private.hh | 4 ++--
+ src/hb-buffer.h | 6 +++---
+ src/hb-common.cc | 2 +-
+ src/hb-common.h | 4 ++--
+ src/hb-font-private.hh | 6 +++---
+ src/hb-font.cc | 2 +-
+ src/hb-font.h | 8 ++++----
+ src/hb-set-private.hh | 2 +-
+ src/hb-set.h | 2 +-
+ src/hb-shape.h | 2 +-
+ src/hb-unicode-private.hh | 2 +-
+ src/hb-unicode.h | 2 +-
+ 14 files changed, 23 insertions(+), 23 deletions(-)
+
+commit 84d781e54cc75c81a06ba43fd7b1a74b8c7d9591
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 16 15:21:41 2012 -0400
+
+ Flesh out gobject-introspection stuff a bit
+
+ configure.ac | 1 +
+ src/Makefile.am | 23 +++++++++++++++++++++--
+ 2 files changed, 22 insertions(+), 2 deletions(-)
+
+commit 49ee12ccd00870d4976339dc546c74eaf08a8fc0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 16 14:53:51 2012 -0400
+
+ Add TODO item
+
+ TODO | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit d3c8115d1ad09404b8970b98e6b5ab74510a35f6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 12 09:52:57 2012 -0400
+
+ Minor
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 2cf301968cb8c1150cead0ab909457cdd3ee2d01
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 9 14:58:01 2012 -0400
+
+ Add hb_object_lock/unlock()
+
+ src/hb-object-private.hh | 32 ++++++++++++++++++++++++++------
+ 1 files changed, 26 insertions(+), 6 deletions(-)
+
+commit 6a5661f1e69c937083e8d976cb12429b99180d54
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 9 03:26:16 2012 -0400
+
+ Ugh
+
+ util/shape-consumer.hh | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit f211d5c291b4c947cfd732e873627567173057e4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 9 03:11:22 2012 -0400
+
+ More Oops! Fix fast-path with sub-type==0
+
+ src/hb-ot-layout-gpos-table.hh | 2 +-
+ src/hb-ot-layout-gsub-table.hh | 2 +-
+ util/shape-consumer.hh | 2 ++
+ 3 files changed, 4 insertions(+), 2 deletions(-)
+
+commit b1de6aa1f33b228afe231c8209aef90a5fa1ee5d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 9 03:07:59 2012 -0400
+
+ Oops!
+
+ src/hb-ot-layout-gpos-table.hh | 2 +-
+ src/hb-ot-layout-gsub-table.hh | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit b12e2549cbcd4f1ef46e66c75533686ee560f59b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 9 03:05:20 2012 -0400
+
+ Minor
+
+ src/hb-ot-layout-gsubgpos-private.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit faf0f20253d954cc4cfa4c967ece7573a5ddae3b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 9 03:02:36 2012 -0400
+
+ Add sanitize() logic for fast-paths
+
+ src/hb-ot-layout-gpos-table.hh | 15 ++++++++++++---
+ src/hb-ot-layout-gsub-table.hh | 20 ++++++++++++++------
+ 2 files changed, 26 insertions(+), 9 deletions(-)
+
+commit 4e766ff28d1fb831ded20666799787478129c07c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 9 02:53:57 2012 -0400
+
+ Add fast-path for GPOS too
+
+ Shaves another 3% for DejaVu Sans long Latin strings.
+
+ src/hb-ot-layout-gpos-table.hh | 16 ++++++++++++++--
+ 1 files changed, 14 insertions(+), 2 deletions(-)
+
+commit 993c51915f503f74ee00eee646b67bf2e3f73596
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 9 02:48:16 2012 -0400
+
+ Add fast-path to GSUB to check coverage
+
+ Shaves a good 10% off DejaVu Sans with simple Latin text for me.
+ Now, DejaVu is very ChainContext-intensive, but it's also a very
+ popular font!
+
+ src/hb-ot-layout-gsub-table.hh | 18 ++++++++++++++++--
+ 1 files changed, 16 insertions(+), 2 deletions(-)
+
+commit f19e0b0099ec73b8fedccacff4902403f5eabc42
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 9 02:26:57 2012 -0400
+
+ Match input before backtrack
+
+ Makes more sense, optimization-wise.
+
+ src/hb-ot-layout-gsubgpos-private.hh | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 67bb9e8cea49a44be6996515e1c7d8cdc95a77e6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 9 02:02:46 2012 -0400
+
+ Add set add_coverage() to Coverage()
+
+ src/hb-ot-layout-common-private.hh | 24 ++++++++++++++++++++++++
+ src/hb-set-private.hh | 5 +++++
+ 2 files changed, 29 insertions(+), 0 deletions(-)
+
+commit 4952f0aa5b2f4368d9e3418252e0a1b9294cd5ee
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 9 01:39:11 2012 -0400
+
+ Minor
+
+ src/hb-ot-layout-gsub-table.hh | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit ad6a6f22401d6256e34521d0f52e91348c5ed4c9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 9 01:21:02 2012 -0400
+
+ Minor
+
+ src/hb-ot-layout.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 46617a42133fbab151de4111a74dcbdc4e769c74
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 9 01:18:58 2012 -0400
+
+ Fix cache implementation
+
+ src/hb-cache-private.hh | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit ce47613889aa3ff9b0067d3e51ba63cfdb139adb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 9 01:10:26 2012 -0400
+
+ Micro-optimize
+
+ I know...
+
+ src/hb-ot-layout-gsubgpos-private.hh | 3 +-
+ src/hb-ot-layout.cc | 46
+ ++++++++++++++++++++-------------
+ 2 files changed, 30 insertions(+), 19 deletions(-)
+
+commit 70416de298b811ab6be53a1c67f0d2531d99cd46
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 9 00:56:41 2012 -0400
+
+ Minor
+
+ src/hb-open-type-private.hh | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 99159e52a3c9d5ae6c0fbdec64e7ed684fa70b61
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 9 00:50:40 2012 -0400
+
+ Use linear search for small counts
+
+ I see about 8% speedup with long strings with DejaVu Sans.
+
+ src/hb-open-type-private.hh | 19 ++++++++++++++-----
+ 1 files changed, 14 insertions(+), 5 deletions(-)
+
+commit caf0412690542e58e23246dccc4b2fb83bd652ec
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 9 00:26:32 2012 -0400
+
+ Minor
+
+ src/hb-ot-layout-common-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0f8fea71a66b1e01ee4398967db464393f478d42
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 9 00:24:38 2012 -0400
+
+ Minor. Hide _hb_ot_layout_get_glyph_property()
+
+ src/hb-ot-layout-private.hh | 4 ----
+ src/hb-ot-layout.cc | 2 +-
+ 2 files changed, 1 insertions(+), 5 deletions(-)
+
+commit 44b8ee0c90d7b1dd91e5848114141e3186534a0f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 9 00:23:24 2012 -0400
+
+ Minor
+
+ src/hb-ot-layout-gpos-table.hh | 3 ++-
+ src/hb-ot-layout.cc | 2 +-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 7b84c536c10ab90ed96a033d88e9ad232d46c5b8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 22:04:23 2012 -0400
+
+ In MarkBase attachment, only attach to first of a MultipleSubst
+ sequence
+
+ This is apparently what Uniscribe does. Test case is:
+
+ SEEN FATHA TEH ALEF
+
+ with Arabic Typesetting. Originally reported by Khaled Hosny.
+
+ src/hb-ot-layout-gpos-table.hh | 7 ++++++-
+ src/hb-ot-layout-gsubgpos-private.hh | 8 ++++++++
+ 2 files changed, 14 insertions(+), 1 deletions(-)
+
+commit ec57e0c5655ced5109c4638bf802772d336448fd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 21:47:23 2012 -0400
+
+ Set lig_comp for MultipleSubst components
+
+ To be used for correct mark attachment to first component of a
+ MultipleSubst output. That's what Uniscribe does.
+
+ src/hb-ot-layout-gsub-table.hh | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit e085fcf7ca302eb7802a032197c022819e7e7074
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 21:45:00 2012 -0400
+
+ Remove unused buffer->replace_glyphs_be16
+
+ src/hb-buffer-private.hh | 3 ---
+ src/hb-buffer.cc | 23 -----------------------
+ src/hb-ot-layout-gsubgpos-private.hh | 8 --------
+ 3 files changed, 0 insertions(+), 34 deletions(-)
+
+commit 3ec77d6ae0510dc2c0ec64382c4948bc6e109844
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 21:44:06 2012 -0400
+
+ Don't use replace_glyphs_be for MultipleSubst
+
+ src/hb-ot-layout-gsub-table.hh | 5 ++++-
+ src/hb-ot-layout-gsubgpos-private.hh | 7 ++++++-
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+commit 4b7192125ffd295091d6b3a0bdfca7011947c2ca
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 21:41:46 2012 -0400
+
+ Minor
+
+ src/hb-ot-layout-gsub-table.hh | 3 ++-
+ src/hb-ot-layout-gsubgpos-private.hh | 8 ++++++++
+ 2 files changed, 10 insertions(+), 1 deletions(-)
+
+commit 4508789f4b5e0ece5620d35598aeeb7ecbe3e3aa
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 21:32:43 2012 -0400
+
+ Add test for static initializers and other C++ stuff
+
+ src/Makefile.am | 3 ++-
+ src/check-static-inits.sh | 33 +++++++++++++++++++++++++++++++++
+ 2 files changed, 35 insertions(+), 1 deletions(-)
+
+commit 56bd259b9ac22dd98913c8ca2e2cf7b30b632373
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 21:29:18 2012 -0400
+
+ Minor
+
+ src/check-internal-symbols.sh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4538b47bf08e73e7f5cce6337df5fe154233c168
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 21:01:45 2012 -0400
+
+ Remove done TODO items
+
+ TODO | 7 +------
+ 1 files changed, 1 insertions(+), 6 deletions(-)
+
+commit bc8357ea7b4c0d7c715aae353176434fb9460205
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 21:01:20 2012 -0400
+
+ Merge clusters during normalization
+
+ src/hb-ot-shape-normalize.cc | 11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+commit fe3dabc08df7501010564f8844bd4d11771cc6a4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 20:56:05 2012 -0400
+
+ Minor
+
+ src/hb-buffer.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit e88e14421a33ca5bdfd76bc0b2f801fcb6e78911
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 20:55:21 2012 -0400
+
+ Use merge_clusters instead of open-coding
+
+ src/hb-buffer.cc | 16 ++++------------
+ 1 files changed, 4 insertions(+), 12 deletions(-)
+
+commit 330a2af3ff0e12c01b3b451357b8bdc83b2e9b47
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 20:40:02 2012 -0400
+
+ Use merge_clusters when forming Unicode clusters
+
+ src/hb-ot-shape.cc | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit bd300df9adf955c1e69b3783c1c061876940fb8b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 20:35:18 2012 -0400
+
+ Minor
+
+ src/hb-object-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e51d2b6ed1c794ac28c5610bfd01dbc9fb383633
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 20:33:27 2012 -0400
+
+ Extend into main buffer if extension hit end of out-buffer merging
+ clusters
+
+ src/hb-buffer.cc | 5 +++++
+ src/hb-ot-shape-complex-misc.cc | 9 ---------
+ 2 files changed, 5 insertions(+), 9 deletions(-)
+
+commit 5ced012d9f58c51d557a835593c3277e35fe3b35
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 20:31:32 2012 -0400
+
+ Extend end when merging clusters in out-buffer
+
+ src/hb-buffer.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 72c0a1878313e7232d554bc226f4c6dc01418a95
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 20:30:03 2012 -0400
+
+ Extend clusters backward in out-buffer
+
+ src/hb-buffer.cc | 8 ++++++++
+ src/hb-ot-shape-complex-misc.cc | 2 --
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+commit cd5891493df06fdb92e1ae526d29dee8df250235
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 20:27:53 2012 -0400
+
+ Extend clusters backwards, into the out-buffer too
+
+ src/hb-buffer.cc | 9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+commit 77471e037122548bfc08cacea6fbb472831c34f3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 20:21:02 2012 -0400
+
+ Clear output buffer before calling GSUB pause functions
+
+ src/hb-ot-map.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit cafa6f372721fd6b0a7c0da68b9421d3e94931bc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 20:17:10 2012 -0400
+
+ When merging clusters, extend the end
+
+ src/hb-buffer.cc | 20 ++++++++++++++------
+ 1 files changed, 14 insertions(+), 6 deletions(-)
+
+commit 28ce5fa454b54f728044ee12a9dbe7d016783d4a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 20:13:56 2012 -0400
+
+ Merge clusters when ligating
+
+ src/hb-ot-layout-gsub-table.hh | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 2bb1761ccb7d300744ced6427165f4ea75ddf96c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 19:29:44 2012 -0400
+
+ Minor, use next_glyph()
+
+ src/hb-ot-layout-gsub-table.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 5f68f8675e5ccaee91f5a90d86bc3b022b9a54e4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 19:23:43 2012 -0400
+
+ Minor
+
+ src/hb-ot-shape.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 872969126756456a69bf958f3df6e56a26e57b0a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 14:18:30 2012 -0400
+
+ Increase Uniscribe MAX_ITEMS
+
+ src/hb-uniscribe.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit dbffa4c83d29c689ee4cd8a1c53e84521028c711
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 14:08:32 2012 -0400
+
+ Fix Uniscribe charset matching
+
+ Previously was failing to match fonts that didn't support
+ CHARSET_ANSI.
+
+ There still remains a problem with the Uniscribe backend, in that if a
+ font with the same family name is installed, and is newer, the native
+ one is preferred over the font we provide. Fixing it requires
+ rewriting
+ the name table with a unique family name...
+
+ src/hb-uniscribe.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 82e8bd8628aeb37835fb019a71b6bdac87824b97
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 11:48:29 2012 -0400
+
+ Remove unused code
+
+ src/hb-uniscribe.cc | 4 +---
+ 1 files changed, 1 insertions(+), 3 deletions(-)
+
+commit 6da9dbff21b47fb10794b8d6cb747393c9eab7dd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 10:53:35 2012 -0400
+
+ Remove zero-width chars in the fallback shaper too
+
+ src/hb-fallback-shape.cc | 16 ++++++++++++----
+ 1 files changed, 12 insertions(+), 4 deletions(-)
+
+commit 68b76121f83fc9b87dc84f03e8bef38d4332734d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 10:43:49 2012 -0400
+
+ Fix regressions introduced by sed. Ouch!
+
+ Introduced in 99c2695759a6af855d565f4994bbdf220570bb48.
+ Broken mark-mark and mark-ligature stuff.
+
+ src/hb-ot-layout-gpos-table.hh | 6 +++---
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 0dd86f9f6849d82d60a99e66b6928795cfb2a3c7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 10:23:03 2012 -0400
+
+ Whitespace
+
+ src/hb-uniscribe.cc | 144
+ +++++++++++++++++++++++++-------------------------
+ 1 files changed, 72 insertions(+), 72 deletions(-)
+
+commit 8e7beba7c3b3dea3cb3b7e280c5aab4f13b92d31
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 10:22:06 2012 -0400
+
+ Fix Uniscribe clusters with direction-overriden Arabic
+
+ src/hb-uniscribe.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit b069c3c31bfbbf160eb897c7474be9ea90ed4fc1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 10:10:29 2012 -0400
+
+ Really fix override-direction in Uniscribe
+
+ src/hb-uniscribe.cc | 10 +++++++---
+ 1 files changed, 7 insertions(+), 3 deletions(-)
+
+commit fcd6f5326166e993b8f5222efbaffe916da98f0a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 09:59:43 2012 -0400
+
+ Unbreak Uniscribe
+
+ Oops. hb_tag_t and OPENTYPE_TAG have different endianness. Perhaps
+ something to add API for in hb-uniscribe.h
+
+ src/hb-private.hh | 12 +++++++++++-
+ src/hb-uniscribe.cc | 8 ++++----
+ 2 files changed, 15 insertions(+), 5 deletions(-)
+
+commit 29eac8f591fdb86f1c4fdc0a6ab63910ff286b84
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 09:26:17 2012 -0400
+
+ Override direction in Uniscribe backend
+
+ Matches OT backend now.
+
+ src/hb-uniscribe.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 1c1233e57686d77d89fe3ac1dc53de9ee60798c1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 8 09:20:53 2012 -0400
+
+ Make Uniscribe backend respect selected script
+
+ src/hb-uniscribe.cc | 15 +++++++++++++--
+ 1 files changed, 13 insertions(+), 2 deletions(-)
+
+commit 0bb0f5d41976ae27c5c7a51cbb82144b48315a4b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jun 7 17:42:48 2012 -0400
+
+ Add note re _NullPool
+
+ src/hb-open-type-private.hh | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 2a3d911fe0ff5d6442659d3381d5b08c30ee2896
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jun 7 17:31:46 2012 -0400
+
+ Fix alignment-requirement missmatch
+
+ Detected by clang and lots of cmdline options.
+
+ src/hb-buffer-private.hh | 2 +-
+ src/hb-buffer.cc | 5 +++--
+ src/hb-ot-layout-gsub-table.hh | 4 ++--
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ 4 files changed, 7 insertions(+), 6 deletions(-)
+
+commit 6095de1635441af16340c7b2c5a6b4c531ec242f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jun 7 15:48:18 2012 -0400
+
+ Fix clang warning with NO_MT path
+
+ src/hb-shape.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit a18280a8ce9128fc9d75f8a367ae8ce0886a9599
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jun 7 15:44:12 2012 -0400
+
+ Fix warnings produced by clang analyzer
+
+ src/hb-icu.cc | 6 ++++--
+ test/api/test-blob.c | 2 +-
+ test/api/test-buffer.c | 4 ++--
+ util/helper-cairo.cc | 2 +-
+ 4 files changed, 8 insertions(+), 6 deletions(-)
+
+commit 7ec83051c05777c0e6e2eea6ef6c71effede9527
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jun 7 13:32:57 2012 -0400
+
+ Fix warnings
+
+ util/ansi-print.cc | 30 +++++++++++++-----------------
+ 1 files changed, 13 insertions(+), 17 deletions(-)
+
+commit 73cb02de2dd28b09d4aa76230132248215cfe83d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jun 6 11:29:25 2012 -0400
+
+ Minor
+
+ src/hb-private.hh | 26 +++++++++++++-------------
+ 1 files changed, 13 insertions(+), 13 deletions(-)
+
+commit 79e2b4791fe95ede9a1e6b1c71ccc6e36c4fc0e5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jun 6 11:27:17 2012 -0400
+
+ Fix ASSERT_POD on clang
+
+ As reported by bashi. Not tested.
+
+ src/hb-private.hh | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+commit 4282d2f3771d6510c27b62e54cc1254d6f2389b3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jun 6 03:42:36 2012 -0400
+
+ Enabled ICU again
+
+ configure.ac | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 6220e5fc0dad728e67a92e838d3ac275d032f2c7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jun 6 03:30:09 2012 -0400
+
+ Add ASSERT_POD for most objects
+
+ src/hb-blob.cc | 1 +
+ src/hb-buffer-private.hh | 2 ++
+ src/hb-font-private.hh | 3 +++
+ src/hb-object-private.hh | 2 ++
+ src/hb-private.hh | 2 +-
+ src/hb-set-private.hh | 4 +++-
+ src/hb-unicode-private.hh | 1 +
+ 7 files changed, 13 insertions(+), 2 deletions(-)
+
+commit a00a63b5ef503fafa87e26b517732b2214e01719
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jun 6 03:07:01 2012 -0400
+
+ Add macros to check that types are POD
+
+ configure.ac | 1 +
+ src/hb-open-type-private.hh | 32 ++++++++++++++++++++------------
+ src/hb-private.hh | 24 ++++++++++++++++++++++++
+ 3 files changed, 45 insertions(+), 12 deletions(-)
+
+commit 61eb60c129e865e92f6a5767a88c44a391f4d413
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 21:14:04 2012 -0400
+
+ Don't link to libstdc++
+
+ New try.
+
+ src/Makefile.am | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 81a4b9fd4eb8995c5930db1df3669db93661eb52
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 20:49:51 2012 -0400
+
+ Remove unused hb_static_mutex_t
+
+ src/hb-mutex-private.hh | 11 -----------
+ 1 files changed, 0 insertions(+), 11 deletions(-)
+
+commit 4a3a9897b3698dd09c3e880b3ddd4db24c6fb460
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 20:39:07 2012 -0400
+
+ Disable Intel atomic ops on mingw32
+
+ Apparently the configure test is not enough...
+
+ src/hb-atomic-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0594a2448440208efa0acac9a5d8d52d43108289
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 20:35:40 2012 -0400
+
+ Cleanup TRUE/FALSE vs true/false
+
+ src/hb-atomic-private.hh | 4 +-
+ src/hb-blob.cc | 28 ++++++++--------
+ src/hb-buffer-private.hh | 2 +-
+ src/hb-buffer.cc | 38 ++++++++++++------------
+ src/hb-buffer.h | 4 +-
+ src/hb-fallback-shape.cc | 2 +-
+ src/hb-font.cc | 22 +++++++-------
+ src/hb-ft.cc | 22 +++++++-------
+ src/hb-glib.cc | 16 +++++-----
+ src/hb-graphite2.cc | 8 ++--
+ src/hb-icu.cc | 30 +++++++++---------
+ src/hb-ot-layout.cc | 28 ++++++++--------
+ src/hb-ot-shape-complex-private.hh | 2 +-
+ src/hb-ot-shape-normalize.cc | 16 +++++-----
+ src/hb-ot-shape.cc | 4 +-
+ src/hb-private.hh | 18 ++++-------
+ src/hb-set.cc | 2 +-
+ src/hb-set.h | 2 +-
+ src/hb-shape.cc | 6 ++--
+ src/hb-tt-font.cc | 12 ++++----
+ src/hb-unicode.cc | 8 ++--
+ src/hb-uniscribe.cc | 18 +++++-----
+ src/main.cc | 2 +-
+ util/hb-shape.cc | 2 +-
+ util/helper-cairo.cc | 16 +++++-----
+ util/main-font-text.hh | 2 +-
+ util/options.cc | 58
+ ++++++++++++++++++------------------
+ util/options.hh | 2 +-
+ util/view-cairo.hh | 2 +-
+ 29 files changed, 185 insertions(+), 191 deletions(-)
+
+commit e1ac38f8dd04c29d2d4140f5a492cdaf25d72901
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 20:31:49 2012 -0400
+
+ Fix inert buffer set_length() with zero
+
+ Oops!
+
+ src/hb-buffer.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 04bc1eebe7a304c0e6f86ab6814c65889f152602
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 20:16:56 2012 -0400
+
+ Add configure tests for Intel atomic intrinsics
+
+ configure.ac | 17 +++++++++++++++++
+ src/hb-atomic-private.hh | 12 ++++++------
+ src/hb-mutex-private.hh | 2 +-
+ 3 files changed, 24 insertions(+), 7 deletions(-)
+
+commit 68c75b46977beb57e35082db26be712b3cd65678
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 19:55:46 2012 -0400
+
+ Shuffle
+
+ configure.ac | 16 ++++++++--------
+ 1 files changed, 8 insertions(+), 8 deletions(-)
+
+commit f64b2ebf82c5f355cd95806478cd30c00b1a2731
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 19:23:29 2012 -0400
+
+ Remove last static initializer
+
+ We're free! Lazy or immediate...
+
+ src/hb-ft.cc | 2 +
+ src/hb-shape.cc | 150
+ +++++++++++++++++++++++++++++++++++++++---------------
+ 2 files changed, 110 insertions(+), 42 deletions(-)
+
+commit 4a8a529068fc380298bb05b9d878bede3e9f4da1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 19:17:02 2012 -0400
+
+ Make hb-view err if all shapers failed
+
+ util/view-cairo.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 04aed572f112b96a6033cd6c3df7bdba5e29e93c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 18:30:19 2012 -0400
+
+ Make hb-ft static-initializer free
+
+ src/hb-common.cc | 5 ++---
+ src/hb-ft.cc | 38 +++++++++++++++++++++++++++-----------
+ 2 files changed, 29 insertions(+), 14 deletions(-)
+
+commit be4560a3b5e8599cbe2b29a01a60c21c9e2b194f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 18:14:03 2012 -0400
+
+ Undo default unicode-funcs to avoid static initializer again
+
+ src/hb-buffer.cc | 2 +-
+ src/hb-glib.cc | 23 ++++++++++++-----------
+ src/hb-icu.cc | 24 +++++++++++++-----------
+ src/hb-unicode-private.hh | 10 +++++-----
+ src/hb-unicode.cc | 26 ++++++++++++++------------
+ 5 files changed, 45 insertions(+), 40 deletions(-)
+
+commit 093171cceca63e48e735bbf05a2c11b1b7e95ef1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 18:00:45 2012 -0400
+
+ Implement lock-free hb_language_t
+
+ Another static-initialization down. One more to go.
+
+ src/hb-common.cc | 66
+ ++++++++++++++++++++++++++++++++++++++++++++---------
+ 1 files changed, 54 insertions(+), 12 deletions(-)
+
+commit 6843ce01be0df501ef3149a2c1c54cdfb693195d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 17:27:20 2012 -0400
+
+ Add atomic-pointer functions
+
+ Gonig to use these for lock-free linked-lists, to be used for
+ hb_language_t among other things.
+
+ src/hb-atomic-private.hh | 21 +++++++++++++++++++++
+ 1 files changed, 21 insertions(+), 0 deletions(-)
+
+commit cdafe3a7d8483ac586e2c16487e2a09164e0f65c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 16:34:49 2012 -0400
+
+ Add gcc intrinsics implementations for atomic and mutex
+
+ configure.ac | 4 +-
+ src/hb-atomic-private.hh | 11 ++++++++-
+ src/hb-mutex-private.hh | 51
+ +++++++++++++++++++++++++++++++++++++++------
+ src/hb-object-private.hh | 4 ++-
+ src/hb-warning.cc | 14 ++++++------
+ 5 files changed, 65 insertions(+), 19 deletions(-)
+
+commit d970d2899b36a2fbd002b224b8bd37b0906fdd5f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 16:06:28 2012 -0400
+
+ Add gcc implementation for atomic ops
+
+ src/hb-atomic-private.hh | 9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+commit 0e253e97af71e2a7ead153589f61fd579a247502
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 15:37:19 2012 -0400
+
+ Add a mutex to object header
+
+ Removes one more static-initialization. A few more to go.
+
+ src/hb-common.cc | 24 +++++++++---------------
+ src/hb-mutex-private.hh | 19 +++++++------------
+ src/hb-object-private.hh | 36 ++++++++++++++++++++++--------------
+ src/hb-private.hh | 11 +++++------
+ 4 files changed, 43 insertions(+), 47 deletions(-)
+
+commit a2b471df821b32625d127f83b2f90e6d6a967e7e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 15:17:44 2012 -0400
+
+ Remove static initializers from indic
+
+ src/hb-ot-shape-complex-indic.cc | 50
+ +++++++++++++++++++++++++++++--------
+ 1 files changed, 39 insertions(+), 11 deletions(-)
+
+commit f06ab8a4262c759b4723614fd28f55ee77aa8466
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 12:31:51 2012 -0400
+
+ Better hide nil objects and make them const
+
+ src/hb-blob.cc | 34 +++++++++++-----------
+ src/hb-buffer.cc | 39 ++++++++++++-------------
+ src/hb-font.cc | 70
+ ++++++++++++++++++++++-----------------------
+ src/hb-ft.cc | 49 ++++++++++++++-----------------
+ src/hb-glib.cc | 25 ++++++++--------
+ src/hb-icu.cc | 25 ++++++++--------
+ src/hb-set.cc | 16 +++++-----
+ src/hb-unicode-private.hh | 11 +++----
+ src/hb-unicode.cc | 34 +++++++++++-----------
+ 9 files changed, 146 insertions(+), 157 deletions(-)
+
+commit bf93b636c4963cbc32d5fba7ace1053db6719192
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 14:17:32 2012 -0400
+
+ Remove constructor from hb_prealloced_array_t
+
+ This was causing all object types to be non-POD and have static
+ initializers. We don't need that!
+
+ Now, most nil objects just moved from .bss to .data. Fixing for that
+ coming soon.
+
+ src/hb-object-private.hh | 3 +++
+ src/hb-private.hh | 4 +++-
+ src/hb-set-private.hh | 1 +
+ 3 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 7037291aacb858f8090fd7d9028c196cc1a21703
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 13:30:11 2012 -0400
+
+ Check for atexit()
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f1971a217424bd6db5c7072ba5cf197f318d4e47
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 5 13:04:20 2012 -0400
+
+ Fix warnings
+
+ src/indic.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b0a6e58bb3dda72dcce37d54d987591630a3db6c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jun 4 10:21:22 2012 -0400
+
+ s/script-punjabi/script-gurmukhi/
+
+ .../texts/in-tree/shaper-indic/indic/MANIFEST | 2 +-
+ .../shaper-indic/indic/script-gurmukhi/MANIFEST | 2 +
+ .../indic/script-gurmukhi/misc/MANIFEST | 1 +
+ .../indic/script-gurmukhi/misc/misc.txt | 1 +
+ .../indic/script-gurmukhi/utrrs/LICENSE | 19 +++
+ .../indic/script-gurmukhi/utrrs/MANIFEST | 3 +
+ .../indic/script-gurmukhi/utrrs/README | 13 ++
+ .../indic/script-gurmukhi/utrrs/SOURCES | 2 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 38 +++++
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 9 ++
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 ++
+ .../IndicFontFeatureCodepoint-GurmukhiSpecific.txt | 6 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 10 ++
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 6 +
+ .../indic/script-gurmukhi/utrrs/codepoint/MANIFEST | 7 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 22 +++
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 2 +
+ .../indic/script-gurmukhi/utrrs/gpos/MANIFEST | 2 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 152
+ ++++++++++++++++++++
+ .../indic/script-gurmukhi/utrrs/gsub/MANIFEST | 1 +
+ .../shaper-indic/indic/script-punjabi/MANIFEST | 2 -
+ .../indic/script-punjabi/misc/MANIFEST | 1 -
+ .../indic/script-punjabi/misc/misc.txt | 1 -
+ .../indic/script-punjabi/utrrs/LICENSE | 19 ---
+ .../indic/script-punjabi/utrrs/MANIFEST | 3 -
+ .../shaper-indic/indic/script-punjabi/utrrs/README | 13 --
+ .../indic/script-punjabi/utrrs/SOURCES | 2 -
+ .../IndicFontFeatureCodepoint-Consonants.txt | 38 -----
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 9 --
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 --
+ .../IndicFontFeatureCodepoint-GurmukhiSpecific.txt | 6 -
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 10 --
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 -
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 6 -
+ .../indic/script-punjabi/utrrs/codepoint/MANIFEST | 7 -
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 22 ---
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 2 -
+ .../indic/script-punjabi/utrrs/gpos/MANIFEST | 2 -
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 152
+ --------------------
+ .../indic/script-punjabi/utrrs/gsub/MANIFEST | 1 -
+ 41 files changed, 309 insertions(+), 309 deletions(-)
+
+commit c1885483120d4b686b2fe95b217dce7248e040b1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jun 4 08:56:00 2012 -0400
+
+ Add --verbose to hb-shape
+
+ Just turns all --show-* options on.
+
+ util/options.cc | 11 +++++++++++
+ util/options.hh | 1 -
+ 2 files changed, 11 insertions(+), 1 deletions(-)
+
+commit 9fc7a11469113d31d8095757c4fc038c3427d44a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jun 4 08:28:19 2012 -0400
+
+ Remove comma at the end of enum
+
+ As reported by Jonathan Kew on the list.
+
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3b8fd9c48f4bde368bf2d465c148b9743a9216ee
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jun 3 15:54:19 2012 -0400
+
+ Remove const from ref_count.ref_count
+
+ According to Tom Hacohen this was breaking build with some compilers.
+
+ In file included from hb-buffer-private.hh:35:0,
+ from hb-ot-map-private.hh:32,
+ from hb-ot-shape-private.hh:32,
+ from hb-ot-shape.cc:29:
+ hb-object-private.hh: In constructor
+ '_hb_object_header_t::_hb_object_header_t()':
+ hb-object-private.hh:97:8: error: uninitialized const member in
+ 'struct hb_reference_count_t'
+ hb-object-private.hh:51:25: note: 'hb_reference_count_t::ref_count'
+ should be initialized
+ In file included from hb-ot-shape.cc:33:0:
+ hb-set-private.hh: In constructor '_hb_set_t::_hb_set_t()':
+ hb-set-private.hh:37:8: note: synthesized method
+ '_hb_object_header_t::_hb_object_header_t()' first required here
+ hb-ot-shape.cc: In function 'void
+ hb_ot_shape_glyphs_closure(hb_font_t*, hb_buffer_t*, const
+ hb_feature_t*, unsigned int, hb_set_t*)':
+ hb-ot-shape.cc:521:12: note: synthesized method
+ '_hb_set_t::_hb_set_t()' first required here
+
+ src/hb-object-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 70600dbf626808a30fb0fd8b7ae860e64d9ffe87
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jun 3 15:52:51 2012 -0400
+
+ Minor
+
+ src/hb-object-private.hh | 14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+commit ae62166519291057316a9d15cea3f1570fcb5eaf
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 2 12:21:19 2012 -0400
+
+ [util] Minor
+
+ util/options.cc | 4 +---
+ util/options.hh | 26 ++++++++++++++------------
+ util/shape-consumer.hh | 4 +++-
+ 3 files changed, 18 insertions(+), 16 deletions(-)
+
+commit 5db0683a822f70c914468430cda6487cee740ae3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jun 2 12:13:08 2012 -0400
+
+ [util] Make hb-shape continue shaping other lines if shapers failed
+
+ util/hb-ot-shape-closure.cc | 3 ++
+ util/hb-shape.cc | 36 ++++++++++++++++++++++++-----
+ util/main-font-text.hh | 2 +-
+ util/options.cc | 34 +++++++++++++++++++++------
+ util/options.hh | 33 ++++++++++++++-------------
+ util/shape-consumer.hh | 17 +++++++++++--
+ util/view-cairo.cc | 47 ++++++--------------------------------
+ util/view-cairo.hh | 52
+ +++++++++++++++++++++++++++++++++++++-----
+ 8 files changed, 143 insertions(+), 81 deletions(-)
+
+commit 96a9ef0c9fca8d58d8dc6baf6b262d96587abee0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 1 13:46:26 2012 -0400
+
+ Remove tab character like other "zero-width" characters
+
+ Uniscribe does that, this make comparing results to Uniscribe
+ easier.
+
+ src/hb-unicode-private.hh | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit cd6a5493411fea30a04466128e1a37b4d89c6a72
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 1 13:45:25 2012 -0400
+
+ Remove unused variable
+
+ util/hb-ot-shape-closure.cc | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 0558d55bac7fb9279aac859b465e7c0e3ad97492
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 28 10:46:47 2012 -0400
+
+ Remove hb_atomic_int_set/get()
+
+ We never use them in fact...
+
+ I'm just adjusting these as I better understand the requirements of
+ the code and the guarantees of each operation.
+
+ src/hb-atomic-private.hh | 8 --------
+ src/hb-object-private.hh | 12 +++++-------
+ 2 files changed, 5 insertions(+), 15 deletions(-)
+
+commit 4efdffec095e19ceeb4b319d60201e84ece30fd9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 27 22:39:48 2012 -0400
+
+ Minor Malayalam test case
+
+ From https://bugs.freedesktop.org/show_bug.cgi?id=45166
+
+ .../indic/script-malayalam/misc/misc.txt | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit dfff5b3021016d3a472c100272fd8e2f52307860
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 27 22:07:04 2012 -0400
+
+ Add Myanmar test case
+
+ .../in-tree/shaper-indic/south-east-asian/MANIFEST | 1 +
+ .../south-east-asian/script-myanmar/MANIFEST | 1 +
+ .../south-east-asian/script-myanmar/misc/MANIFEST | 1 +
+ .../south-east-asian/script-myanmar/misc/misc.txt | 1 +
+ 4 files changed, 4 insertions(+), 0 deletions(-)
+
+commit bce095524b3e69a47f8e88a2fb02d6ab537f9b0a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 27 11:29:21 2012 -0400
+
+ Add hb_font_get_glyph_name() and hb_font_get_glyph_from_name()
+
+ TODO | 1 +
+ src/hb-font-private.hh | 2 +
+ src/hb-font.cc | 80
+ +++++++++++++++++++++++++++++++++----------
+ src/hb-font.h | 28 +++++++++++++++
+ src/hb-ft.cc | 52 +++++++++++++++++++++++-----
+ util/hb-ot-shape-closure.cc | 9 ++---
+ util/options.cc | 10 ++----
+ 7 files changed, 142 insertions(+), 40 deletions(-)
+
+commit bc145658bdaeaeea0cdbd719e2756f09a2dbfb48
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 27 10:45:57 2012 -0400
+
+ Warn if no Unicode functions implementation is found
+
+ src/hb-unicode-private.hh | 1 +
+ src/hb-warning.cc | 13 +++++++++++++
+ 2 files changed, 14 insertions(+), 0 deletions(-)
+
+commit a3547330fa88e30a138f6f17e60d9c7d1e316622
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 27 10:20:47 2012 -0400
+
+ Cleanup atomic ops on OS X
+
+ src/hb-atomic-private.hh | 7 +++----
+ 1 files changed, 3 insertions(+), 4 deletions(-)
+
+commit e4b6d503c5575ddbf49249e3fef693d75ae75170
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 27 10:11:13 2012 -0400
+
+ Don't use atomic ops in hb_cache_t
+
+ We don't care about linearizability, so unprotected int read/write
+ are enough, no need for expensive memory barriers. It's a cache,
+ that's all.
+
+ src/hb-cache-private.hh | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 819faa05307aa192015f4b43d8103a35e87d6cc7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 27 10:09:18 2012 -0400
+
+ Minor
+
+ src/hb-atomic-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 303d5850ec0516e198db241456b0cfc4899ef9c0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 27 10:01:13 2012 -0400
+
+ Fix Windows atomic get/set
+
+ According to:
+ http://msdn.microsoft.com/en-us/library/65tt87y8.aspx
+
+ MemoryBarrier() is the right macro to protect these, not
+ _ReadBarrier()
+ and/or _WriteBarrier().
+
+ src/hb-atomic-private.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 8f8956a55fff95e5ad529d2f124c9528d1f4f81d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 25 14:30:24 2012 -0400
+
+ [util] Add hidden --shaper that is equivalent of --shapers
+
+ util/helper-cairo.cc | 2 +-
+ util/options.cc | 6 +++++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+commit 29ce446d3161b7ea5874352e5f8eb33cd59338c3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 25 14:17:54 2012 -0400
+
+ Add set iterator
+
+ src/hb-set-private.hh | 26 +++++++++++++++++++++++---
+ src/hb-set.cc | 7 +++++++
+ src/hb-set.h | 11 +++++++++--
+ util/hb-ot-shape-closure.cc | 8 +++++---
+ 4 files changed, 44 insertions(+), 8 deletions(-)
+
+commit 62c3e111fce0ad34960871134c2eb6da572df303
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 25 13:48:00 2012 -0400
+
+ Add set symmetric difference
+
+ src/hb-set-private.hh | 5 +++++
+ src/hb-set.cc | 7 +++++++
+ src/hb-set.h | 6 ++++++
+ 3 files changed, 18 insertions(+), 0 deletions(-)
+
+commit 27aba594c90b4444c35273a38f5fedc8e09d9a88
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 24 15:00:01 2012 -0400
+
+ Minor
+
+ src/hb-ot-shape-complex-indic-machine.rl | 2 +-
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit cde1c0114ba66a45d907e81a49bf625e0dc946b0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 24 10:46:39 2012 -0400
+
+ Fix hb_atomic_int_set() implementation for HB_NO_MT
+
+ As pointed out by Jonathan Kew.
+
+ src/hb-atomic-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3b9b7133bea787f787170beea073f185e36d2327
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 23 22:00:25 2012 -0400
+
+ Update TODO
+
+ TODO | 18 ++++++++++++++++--
+ 1 files changed, 16 insertions(+), 2 deletions(-)
+
+commit ff3524c21aabf5d0d6014d1ce1b3e12ca5f0990f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 23 21:50:43 2012 -0400
+
+ Add Arabic diacritics tests
+
+ .../shaper-arabic/script-arabic/misc/MANIFEST | 2 +-
+ .../script-arabic/misc/diacritics/MANIFEST | 5 +
+ .../script-arabic/misc/diacritics/lam-alef.txt | 28 +
+ .../misc/diacritics/language-arabic.txt | 695
+ ++++++++++++++++++++
+ .../misc/diacritics/language-persian.txt | 48 ++
+ .../misc/diacritics/language-urdu.txt | 188 ++++++
+ .../misc/diacritics/ligature-diacritics.txt | 1 +
+ .../script-arabic/misc/ligature-diacritics.txt | 1 -
+ 8 files changed, 966 insertions(+), 2 deletions(-)
+
+commit ed2f1363a391add41f10cff18792003583a10257
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 22 22:12:22 2012 -0400
+
+ Fix substitution glyph class propagation
+
+ The old code was doing nothing.
+
+ Still got to find an example font+string that makes this matter, but
+ need this for fixing synthetic GDEF anyway.
+
+ src/hb-ot-layout-gsub-table.hh | 10 ++++------
+ src/hb-ot-layout-gsubgpos-private.hh | 23 ++++++-----------------
+ 2 files changed, 10 insertions(+), 23 deletions(-)
+
+commit a6de53664df9549a5dc93752647ea1d3bb336f7b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 18 15:04:35 2012 -0400
+
+ Add CJK Compatibility Ideographs tests
+
+ From:
+ http://people.mozilla.org/~jdaggett/tests/cjkcompat.html
+
+ test/shaping/texts/in-tree/shaper-default/MANIFEST | 3 +-
+ .../in-tree/shaper-default/script-han/MANIFEST | 1 +
+ .../shaper-default/script-han/misc/MANIFEST | 1 +
+ .../shaper-default/script-han/misc/cjk-compat.txt | 3 +
+ .../shaper-default/script-hiragana/MANIFEST | 1 +
+ .../shaper-default/script-hiragana/misc/MANIFEST | 2 +
+ .../script-hiragana/misc/kazuraki-liga-lines.txt | 8 +++
+ .../script-hiragana/misc/kazuraki-liga.txt | 53
+ ++++++++++++++++++++
+ .../shaper-default/script-japanese/MANIFEST | 1 -
+ .../shaper-default/script-japanese/misc/MANIFEST | 2 -
+ .../script-japanese/misc/kazuraki-liga-lines.txt | 8 ---
+ .../script-japanese/misc/kazuraki-liga.txt | 53
+ --------------------
+ 12 files changed, 71 insertions(+), 65 deletions(-)
+
+commit 20fdb0f41d81b226e076a4830d4b0d03da31fc19
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 17 22:04:45 2012 -0400
+
+ Add a lock-free cache type for int->int functions
+
+ To be used for cmap and advance caching if desired.
+
+ TODO | 2 +
+ src/Makefile.am | 1 +
+ src/hb-cache-private.hh | 72
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-font.cc | 2 +
+ 4 files changed, 77 insertions(+), 0 deletions(-)
+
+commit bd908b4f102b5ae18a3ad4a8b137994cf74b86ce
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 17 22:02:08 2012 -0400
+
+ Implement hb_atomic_int_set() for OS X
+
+ src/hb-atomic-private.hh | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 022a05ae90f30bcddff413022e0cd801809b5390
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 17 21:53:24 2012 -0400
+
+ Minor
+
+ src/hb-atomic-private.hh | 4 +++-
+ src/hb-mutex-private.hh | 4 +++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+commit 22afd66a30d01b6771405e76777306f600807bea
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 17 21:23:49 2012 -0400
+
+ Add hb_atomic_int_set() again
+
+ src/hb-atomic-private.hh | 9 ++++++---
+ 1 files changed, 6 insertions(+), 3 deletions(-)
+
+commit 4aa7258cb16176a89e1547fee8f86571fdd98307
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 17 21:01:04 2012 -0400
+
+ Fix type conflicts on Windows without glib
+
+ src/hb-tt-font.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit f039e79d5438a8fc4a3ec11a387bbfc0f6b83024
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 17 20:55:12 2012 -0400
+
+ Don't use min/max as function names
+
+ They can be macros on some systems. Eg. mingw32.
+
+ src/hb-set-private.hh | 4 ++--
+ src/hb-set.cc | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 34961e3198e27fa37fd4cfdad12ef86a2e9e51c2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 17 20:50:38 2012 -0400
+
+ Prefer native atomic/mutex ops to glib's
+
+ src/hb-atomic-private.hh | 29 ++++++++++++++++-------------
+ src/hb-mutex-private.hh | 24 ++++++++++++++----------
+ 2 files changed, 30 insertions(+), 23 deletions(-)
+
+commit ec3ba4b96fc4f262db1ff9f906628c32f26c9b7d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 17 20:30:46 2012 -0400
+
+ Move atomic ops into their own header
+
+ src/Makefile.am | 1 +
+ src/hb-atomic-private.hh | 78
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-mutex-private.hh | 1 -
+ src/hb-object-private.hh | 52 +-----------------------------
+ src/hb-warning.cc | 2 +-
+ 5 files changed, 82 insertions(+), 52 deletions(-)
+
+commit de0878395be5c72d7058faac8f64715bdd42eb3b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 17 20:15:49 2012 -0400
+
+ Update TODO
+
+ TODO | 12 ++++++++----
+ 1 files changed, 8 insertions(+), 4 deletions(-)
+
+commit c87b317f0eb118e67134e8e419a6d65e0fa40d30
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 15 23:53:18 2012 -0400
+
+ [util] Add hb-ot-shape-closure tool
+
+ Computes all the glyphs that may be generated given a font and
+ set of Unicode characters.
+
+ The order of the Unicode characters is irrelevant.
+
+ Sample output:
+
+ behdad:util 0$ ./hb-ot-shape-closure Doulos\ SIL\ Regular.ttf f
+ f f_f
+
+ behdad:util 0$ ./hb-ot-shape-closure Doulos\ SIL\ Regular.ttf i
+ i
+
+ behdad:util 0$ ./hb-ot-shape-closure Doulos\ SIL\ Regular.ttf fi
+ f f_i f_f_i f_f i
+
+ behdad:util 0$ ./hb-ot-shape-closure DroidNaskh-Regular.ttf ب
+ uni0628 uni0628.init uni0628.medi uni0628.fina
+
+ behdad:util 0$ ./hb-ot-shape-closure DroidNaskh-Regular.ttf ا
+ uni0627 uni0627.fina
+
+ behdad:util 0$ ./hb-ot-shape-closure DroidNaskh-Regular.ttf با
+ uni0627 uni0627.fina uni0628 uni0628.init uni0628.medi uni0628.fina
+
+ behdad:util 0$ ./hb-ot-shape-closure DroidNaskh-Regular.ttf با
+ --no-glyph-names
+ 5 6 133 134 135 136
+
+ configure.ac | 2 +-
+ util/Makefile.am | 22 ++++++---
+ util/hb-ot-shape-closure.cc | 112
+ +++++++++++++++++++++++++++++++++++++++++++
+ util/options.hh | 12 +++++
+ 4 files changed, 140 insertions(+), 8 deletions(-)
+
+commit 45675e589e6ef9f81b2a4199cf33e3e7778433a8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 15 23:10:39 2012 -0400
+
+ [util] Refactor to accommodate for upcoming new tool
+
+ util/Makefile.am | 10 +++--
+ util/hb-shape.cc | 70 ++++++++++++++++++-----------------------
+ util/hb-view.cc | 8 +++--
+ util/hb-view.hh | 80
+ ------------------------------------------------
+ util/main-font-text.hh | 80
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ util/shape-consumer.hh | 69 +++++++++++++++++++++++++++++++++++++++++
+ 6 files changed, 191 insertions(+), 126 deletions(-)
+
+commit 1d6846db9ebf84561bb30a4e48c6c43184914099
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 13 18:09:29 2012 +0200
+
+ [Indic] Apply vatu feature after cjct
+
+ Testing with old Deva spec this reduces failures.
+ Test sequence: U+0915,U+094D,U+0930.
+
+ src/hb-ot-shape-complex-indic.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 8caf5dcd66550351c6038b9ae7ecc5254eed64ff
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 13 17:10:18 2012 +0200
+
+ Minor
+
+ util/ansi-print.cc | 67
+ +++++++++++++++++++++++++--------------------------
+ 1 files changed, 33 insertions(+), 34 deletions(-)
+
+commit 617f4ac46f1084859d2034c08760e31e52d3bec3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 13 16:48:03 2012 +0200
+
+ Refactor
+
+ src/hb-ot-shape-complex-indic.cc | 44
+ +++++++++++++++++++------------------
+ 1 files changed, 23 insertions(+), 21 deletions(-)
+
+commit 5e4e21fce4b548b0b8a5951bc8f35a9f27428192
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 13 16:46:08 2012 +0200
+
+ Revert "[Indic] Refactoring"
+
+ This reverts commit 0831061efb78983b9c6e1e72574c977e56383c08.
+
+ src/hb-ot-shape-complex-indic.cc | 28 ++++++++--------------------
+ 1 files changed, 8 insertions(+), 20 deletions(-)
+
+commit 3f18236a03880c0960f5990dc90685f6146951a6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 13 16:20:10 2012 +0200
+
+ Fix more warnings
+
+ src/hb-ot-layout-common-private.hh | 2 +-
+ src/hb-ot-layout-gsub-table.hh | 2 +-
+ src/hb-ot-shape-complex-indic.cc | 8 ++++----
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 9f377ed3210fe7d9f15e0c4f82020556f9a8f6f0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 13 16:13:44 2012 +0200
+
+ Fix more unused-var warnings
+
+ src/hb-ot-shape-complex-arabic.cc | 7 +++++--
+ src/hb-ot-shape-complex-indic.cc | 25 ++++++++++++++++++-------
+ src/hb-ot-shape-complex-misc.cc | 21 +++++++++++++++------
+ src/hb-ot-shape-normalize.cc | 13 ++++++-------
+ src/hb-set.cc | 2 +-
+ 5 files changed, 45 insertions(+), 23 deletions(-)
+
+commit d993e72331c6c4c783b803e01e4d4a02c8e3eb77
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 13 16:04:36 2012 +0200
+
+ Fix hb_face_set_index()
+
+ src/hb-font.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 93345edcbea49bdf0e22f26b5b74a23e601dfab4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 13 16:01:08 2012 +0200
+
+ Fix warnings
+
+ src/hb-fallback-shape.cc | 4 +-
+ src/hb-private.hh | 54
+ +++++++++++++++++++++++-----------------------
+ 2 files changed, 29 insertions(+), 29 deletions(-)
+
+commit eace47b173807d94b29a6490d0bc3c9f8f6168d1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 13 15:54:43 2012 +0200
+
+ Minor
+
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 99c2695759a6af855d565f4994bbdf220570bb48
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 13 15:45:18 2012 +0200
+
+ Add accessort to buffer for current info, current pos, and prev info
+
+ src/hb-buffer-private.hh | 9 +++++++
+ src/hb-ot-layout-gpos-table.hh | 44
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-table.hh | 28 ++++++++++----------
+ src/hb-ot-layout-gsubgpos-private.hh | 28 ++++++++++----------
+ src/hb-ot-shape-complex-arabic.cc | 4 +-
+ src/hb-ot-shape-complex-misc.cc | 5 ++-
+ src/hb-ot-shape-normalize.cc | 16 ++++++------
+ src/hb-ot-shape.cc | 8 +++---
+ 8 files changed, 76 insertions(+), 66 deletions(-)
+
+commit 6736f3c5b09af6a71935afc04248b033e171a9b2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 13 15:21:06 2012 +0200
+
+ Minor
+
+ src/hb-ot-layout-gsubgpos-private.hh | 7 +++----
+ 1 files changed, 3 insertions(+), 4 deletions(-)
+
+commit 5df809b655bb1318115651fd87d4555cdd9b41cb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 13 15:17:51 2012 +0200
+
+ [GSUB/GPOS] Remove context_length
+
+ The spec doesn't say contextual matching should be done this way,
+ and AOTS doesn't do it either. It was inherited from old HarfBuzz.
+ Remove it.
+
+ src/hb-ot-layout-common-private.hh | 1 -
+ src/hb-ot-layout-gpos-table.hh | 3 ---
+ src/hb-ot-layout-gsub-table.hh | 6 ++----
+ src/hb-ot-layout-gsubgpos-private.hh | 32
+ +++++++++++---------------------
+ 4 files changed, 13 insertions(+), 29 deletions(-)
+
+commit 28b9d502bb69a8045818d5f6113ded9c59a56bd7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 13 15:04:00 2012 +0200
+
+ Minor
+
+ src/hb-ot-layout-gsubgpos-private.hh | 11 +++++------
+ 1 files changed, 5 insertions(+), 6 deletions(-)
+
+commit 50f630c17ced1bd59b4da4f27728dcfbb876400a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 13 13:03:44 2012 +0200
+
+ Remove ioctl checks
+
+ Ended up not using terminal size after all.
+
+ configure.ac | 2 +-
+ util/ansi-print.cc | 11 -----------
+ 2 files changed, 1 insertions(+), 12 deletions(-)
+
+commit db0de7cd616e1e9d6fde6659e52a541477fb0148
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 13 13:02:38 2012 +0200
+
+ [util] Set ansi color only on color change
+
+ util/ansi-print.cc | 28 +++++++++++++++++++++++-----
+ 1 files changed, 23 insertions(+), 5 deletions(-)
+
+commit 912c5ff80a255edb8145b9db69e2ed828f8eab5c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 13 12:51:02 2012 +0200
+
+ Reduce default margin
+
+ util/options.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 52e7b1424a3613122e9ca30879298df42733acda
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 13 02:02:58 2012 +0200
+
+ [util] Make hb-view print out Unicode art if stdout is a terminal
+
+ configure.ac | 4 +-
+ util/Makefile.am | 4 +
+ util/ansi-print.cc | 411
+ +++++++++++++++++++++++++++++++++++++++++++++
+ util/ansi-print.hh | 39 +++++
+ util/helper-cairo-ansi.cc | 102 +++++++++++
+ util/helper-cairo-ansi.hh | 39 +++++
+ util/helper-cairo.cc | 70 ++++++++-
+ util/options.hh | 3 +
+ 8 files changed, 668 insertions(+), 4 deletions(-)
+
+commit 8b2753ce2bea8a21ea757186d86dc4a55d8c8b0c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 13 00:54:07 2012 +0200
+
+ Minor
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 30874b4819a99cc84fa39e794266685e1b8735d2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat May 12 15:54:27 2012 +0200
+
+ [util] Make tools default to stdin if no text is provided
+
+ One less argument to type in typical testing workflow!
+
+ util/hb-view.hh | 4 +++-
+ util/options.cc | 12 +++++-------
+ util/options.hh | 2 +-
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+commit 2097951110e33fe091ed9515ae77e2683c46c889
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat May 12 15:41:48 2012 +0200
+
+ [util] Change default font size of hb-view to 256
+
+ Most common usecase of hb-view is to test rendering of short words for
+ testing / inspection. Not having to type "--font-size 150" each time
+ isn't such a bad idea...
+
+ util/options.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 737dded2e08fcc19935db51c05201a987184d337
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat May 12 15:40:11 2012 +0200
+
+ Fix compiler warnings
+
+ src/hb-ot-shape-complex-indic.cc | 5 -----
+ 1 files changed, 0 insertions(+), 5 deletions(-)
+
+commit f538fcb538f1decb4100ba89457eb83f2350d64b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat May 12 15:34:40 2012 +0200
+
+ [test] Make tool usage easier by not requiring "--stdin"
+
+ Just default to it. Added "--help" instead to get usage.
+
+ test/shaping/hb_test_tools.py | 9 ++++-----
+ 1 files changed, 4 insertions(+), 5 deletions(-)
+
+commit a3273e30bb7ffd727ffc18af5716dfef705d3d94
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat May 12 13:34:18 2012 +0200
+
+ [Indic] Add more Malayalam tests
+
+ .../indic/script-malayalam/misc/misc.txt | 38
+ ++++++++++++++++++++
+ 1 files changed, 38 insertions(+), 0 deletions(-)
+
+commit 7f852b644b8143492a02edfc853114aaa23446bd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 23:10:31 2012 +0200
+
+ Fix compiler warnings
+
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ src/hb-ot-shape-complex-private.hh | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit f7e8dcfd4fc377e3d786b097beb656284240456d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 22:00:06 2012 +0200
+
+ [Indic] Unbreak Devanagari
+
+ And this, concludes the HarfBuzz Massala Hackfest.
+
+ I like to specially thank Jonathan Kew for doing all the decription
+ and
+ letting me get commit points.
+
+ configure.ac | 2 +-
+ src/hb-ot-shape-complex-indic-private.hh | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 6a091df9b403b147ef78f3974610dedf4ce1e08a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 21:42:27 2012 +0200
+
+ [Indic] Disambiguate sub vs post vs above matras
+
+ Bengali is at *just* above 5% now.
+
+ src/hb-ot-shape-complex-indic-private.hh | 31
+ ++++++++++++++---------------
+ src/hb-ot-shape-complex-indic.cc | 12 +++++-----
+ 2 files changed, 21 insertions(+), 22 deletions(-)
+
+commit 9d0d319a4a7e85d922e58fade0f40caae1c9f109
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 21:36:32 2012 +0200
+
+ [Indic] Position Bengali Reph before matras
+
+ src/hb-ot-shape-complex-indic.cc | 62
+ ++++++++++++++++++++++----------------
+ 1 files changed, 36 insertions(+), 26 deletions(-)
+
+commit f89367251109af235f4f0446c13c261a5a4a6f72
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 21:10:03 2012 +0200
+
+ [Indic] Start categorizing Reph per script
+
+ src/hb-ot-shape-complex-indic.cc | 41
+ ++++++++++++++++++++++++++++++++-----
+ 1 files changed, 35 insertions(+), 6 deletions(-)
+
+commit a913b024d84973556094fd64ce5f0b7106fcc3b5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 20:59:26 2012 +0200
+
+ [Indic] Apply 'init' feature for Bengali
+
+ Error down from 20% to 7%.
+
+ src/hb-ot-shape-complex-indic.cc | 15 +++++++++++++++
+ 1 files changed, 15 insertions(+), 0 deletions(-)
+
+commit eed903b1644e087178438959664a6a57bebc398b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 20:50:53 2012 +0200
+
+ [Indic] Refactor for the arrival of 'init' feature
+
+ Yep, on Bengali now!
+
+ src/hb-ot-shape-complex-indic.cc | 52
+ ++++++++++++++++++++++++++-----------
+ 1 files changed, 36 insertions(+), 16 deletions(-)
+
+commit 18c06e189bd078affbb84c3bb5bb80687a227c5e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 20:02:14 2012 +0200
+
+ [Indic] Add Uniscribe bug feature for dotted circle
+
+ For dotted-circle independent clusters, Uniscribe does no Reph shaping
+ for the exact sequence Ra+Halant+25CC. Which also is the only
+ possible
+ sequence with 25CC at the end.
+
+ src/hb-ot-shape-complex-indic-machine.rl | 4 +++-
+ src/hb-ot-shape-complex-indic-private.hh | 3 ++-
+ src/hb-ot-shape-complex-indic.cc | 20 ++++++++++++++++----
+ 3 files changed, 21 insertions(+), 6 deletions(-)
+
+commit 5b16de97bcc4b24da4c77ca6c1a42e814d8cdbd1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 19:55:42 2012 +0200
+
+ [Indic] Add tests for dottedcircle
+
+ .../indic/script-devanagari/misc/MANIFEST | 1 +
+ .../indic/script-devanagari/misc/dottedcircle.txt | 7 +++++++
+ 2 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 0831061efb78983b9c6e1e72574c977e56383c08
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 19:07:58 2012 +0200
+
+ [Indic] Refactoring
+
+ src/hb-ot-shape-complex-indic.cc | 26 ++++++++++++++++++--------
+ 1 files changed, 18 insertions(+), 8 deletions(-)
+
+commit 7ea58db311bfb0d8f804d1e9f4a1f004bd45075a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 18:58:57 2012 +0200
+
+ Minor
+
+ src/hb-ot-shape-complex-indic.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 9c09928989316e2befe00d52ed66e055637ccd36
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 18:46:35 2012 +0200
+
+ [Indic] Allow multiple Consonants in Vowel/NBSP syllables
+
+ Uniscribe allows multiple Halant+Consonant after a Vowel.
+ Tests:
+ ↦ * U+0905,U+094D,U+092B,U+094D,930,94d,930
+
+ src/hb-ot-shape-complex-indic-machine.rl | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 8c0aa486f31e9b6cbb31ce295573b53b0a214124
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 18:13:42 2012 +0200
+
+ [Indic] Allow two Nuktas per consonant
+
+ Uniscribe allows up to two nuktas per consonant and one per matra. It
+ does so
+ indepent of whether the consonant already has a nukta in it. Tests:
+
+ * U+0916,U+093C,U+0941
+ * U+0959,U+093C,U+0941
+ * U+0916,U+093C,U+093C,U+0941
+ * U+0959,U+093C,U+093C,U+0941
+ * U+0916,U+093C,U+093C,U+093C,U+0941
+ * U+0959,U+093C,U+093C,U+093C,U+0941
+ * 915,93c,93c,,94d,U+0916,U+093C,U+093C,U+093e,93c,93c
+
+ src/hb-ot-shape-complex-indic-machine.rl | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+commit 3399a06e7033651ee926448737bdb18e553c1796
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 17:54:26 2012 +0200
+
+ [Indic] Fix U+0952 and similar classification to match Uniscribe
+
+ See comments.
+
+ src/hb-ot-shape-complex-indic-machine.rl | 1 +
+ src/hb-ot-shape-complex-indic.cc | 16 +++++++++++-----
+ 2 files changed, 12 insertions(+), 5 deletions(-)
+
+commit 11aa3ef18dbc6ac9561bd119f5ca2c1aa1209c3a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 17:30:48 2012 +0200
+
+ [Indic] Treat U+0951..U+0954 all similar to U+0952
+
+ src/hb-ot-shape-complex-indic.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 5f131d3226131df440d7f36655e57f6effcae204
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 17:29:40 2012 +0200
+
+ [GSUB/GPOS/Indic] Apply GSUB/GPOS within syllables only
+
+ This does not apply to the context matchings.
+
+ This regresses tests right now. And we are not sure whether this is
+ the right thing to do for GPOS. But we'll figure out.
+
+ src/hb-ot-layout-gsubgpos-private.hh | 18 ++++++++++++------
+ 1 files changed, 12 insertions(+), 6 deletions(-)
+
+commit 8fd83aaf6e50c2c25002c51fee26d82847a61769
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 17:18:37 2012 +0200
+
+ [GSUB/GPOS] Fix wrong buffer access in backward skippy mask matching
+
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit ff24d1081af08a887895975285d7e38f5d07bc37
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 17:07:08 2012 +0200
+
+ [Indic] Don't use syllable serial value 0
+
+ src/hb-ot-shape-complex-indic-machine.rl | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 892eb7878238d810a2a70f9dadbf958207bfeaa1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 16:54:40 2012 +0200
+
+ [Indic] Implement Uniscribe Reph+Matra+Halant bug feature
+
+ src/hb-ot-shape-complex-indic.cc | 14 +++++++++-----
+ 1 files changed, 9 insertions(+), 5 deletions(-)
+
+commit 67ea29af49bb08ee679914076808327992cf6676
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 16:51:23 2012 +0200
+
+ [Indic] Add example of different Uniscribe behavior
+
+ src/hb-ot-shape-complex-indic.cc | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit ebe29733d44fe0fa9fb30f946ab0dd7a40336a24
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 16:43:12 2012 +0200
+
+ [Indic] Add runtime Uniscribe bug compatibility mode!
+
+ Enable by setting envvar:
+
+ HB_OT_INDIC_OPTIONS=uniscribe-bug-compatible
+
+ Plus, LeftMatra+Halant "feature".
+
+ src/hb-ot-shape-complex-indic.cc | 44
+ ++++++++++++++++++++++++++++---------
+ 1 files changed, 33 insertions(+), 11 deletions(-)
+
+commit 616e692e2950d326b6c46aba5b5bead3cc29d315
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 16:25:02 2012 +0200
+
+ [Indic] Add #define UNISCRIBE_BUG_COMPATIBLE 1
+
+ src/hb-ot-shape-complex-indic.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 6782bdae3be0357da1dadc7b806a43ceefa67a90
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 16:23:43 2012 +0200
+
+ [Indic] Fix Left Matra + Halant reordering
+
+ As can be seen in: U+092B,U+093F,U+094D
+
+ src/hb-ot-shape-complex-indic.cc | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 3c2ea9481b1028e927e615a5434ebf8edcb5f891
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 16:23:38 2012 +0200
+
+ Minor
+
+ src/hb-ot-shape-complex-indic.cc | 73
+ +++++++++++++++++++------------------
+ 1 files changed, 37 insertions(+), 36 deletions(-)
+
+commit c071b99f150a9344a2056dfeba8c613f8a5602db
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 16:22:46 2012 +0200
+
+ [Indic] Add test for Left Matra with Halant
+
+ Uniscribe doesn't move the Halant, we do. And do a broken job of
+ it now.
+
+ .../script-devanagari/misc/tricky-reordering.txt | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 203d71069c45048b6dd8fa22b61fd8f2c844b4f6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 16:01:44 2012 +0200
+
+ [GSUB/GPOS] Check all glyph masks when matching input
+
+ src/hb-ot-layout-gsubgpos-private.hh | 18 ++++++++++++------
+ 1 files changed, 12 insertions(+), 6 deletions(-)
+
+commit 668c6046c1b3af3bd316bda0cc8636f2a5e8df42
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 15:34:13 2012 +0200
+
+ [Indic] Apply Reph mask to all POS_REPH glyphs
+
+ Needed for upcoming changes to GSUB/GPOS mask matching.
+
+ src/hb-ot-shape-complex-indic.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 4be46bade26faf13f7b4d447e9cc608e183955dc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 14:39:01 2012 +0200
+
+ [Indic] Fix state machine to backtrack
+
+ src/hb-ot-shape-complex-indic-machine.rl | 42
+ +++++++++++++----------------
+ src/hb-private.hh | 2 +
+ 2 files changed, 21 insertions(+), 23 deletions(-)
+
+commit cee7187447b76b22e1bb6136d137b35ac49c3a5d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 11:41:39 2012 +0200
+
+ [Indic] Move syllable tracking from Indic to generic layer
+
+ This is to incorporate it into GSUB/GPOS processing.
+
+ src/hb-ot-layout-gpos-table.hh | 1 +
+ src/hb-ot-layout-gsub-table.hh | 3 ++-
+ src/hb-ot-layout-gsubgpos-private.hh | 3 ---
+ src/hb-ot-layout-private.hh | 4 +---
+ src/hb-ot-shape-complex-indic-machine.rl | 2 +-
+ src/hb-ot-shape-complex-indic-private.hh | 1 -
+ src/hb-ot-shape-complex-indic.cc | 8 +++-----
+ src/hb-ot-shape-complex-private.hh | 13 ++++++++-----
+ 8 files changed, 16 insertions(+), 19 deletions(-)
+
+commit 3bf27a9f0e92aa31b464bd3b9fdea5933c9ae8b1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 11:17:23 2012 +0200
+
+ [Indic] Disable conjuncts when a ZWJ happens
+
+ Not that the code makes any difference since the presence of ZWJ
+ itself
+ causes the ligature to fail to match anyway.
+
+ src/hb-ot-shape-complex-indic.cc | 7 +------
+ 1 files changed, 1 insertions(+), 6 deletions(-)
+
+commit c6d904d67db589dd6209928e56504f04f6a07756
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 11:07:40 2012 +0200
+
+ [Indic] Fix bitops typo!
+
+ Another 1000 down!
+
+ src/hb-ot-shape-complex-indic.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 55fe2cf79b11d9a63ea33b3ee76bd0ebca345157
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 03:45:28 2012 +0200
+
+ Make APPLY debug output print current index and codepoint
+
+ Yay!
+
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 7bd2b04fea5649d77d796d58b7f4918fe0378ee5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 03:40:58 2012 +0200
+
+ Minor
+
+ src/hb-object-private.hh | 8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+commit cf26510dbbd8d38486e6ba423800db6427ade332
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 03:35:08 2012 +0200
+
+ Some more...
+
+ Done. I promise.
+
+ src/hb-object-private.hh | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 9659523ca32b0e254d0e5fe387d817208d9cb6bf
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 03:33:36 2012 +0200
+
+ More beauty in debug output!
+
+ src/hb-private.hh | 12 +++++++-----
+ 1 files changed, 7 insertions(+), 5 deletions(-)
+
+commit cf26e88a5ab477295479f5b9450c2019b6430eaa
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 03:16:57 2012 +0200
+
+ Finish off debug output beautification
+
+ src/hb-open-type-private.hh | 58
+ +++++++++++++++++++-----------------------
+ 1 files changed, 26 insertions(+), 32 deletions(-)
+
+commit d7bba01a353efc7432c474dd8755a02db4abd2ae
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 02:46:26 2012 +0200
+
+ Only print class name in debug output if there's one available
+
+ src/hb-private.hh | 12 +++++++-----
+ 1 files changed, 7 insertions(+), 5 deletions(-)
+
+commit 85f73fa8da1fbb864aef0f3a592b1d65e24d593d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 02:40:42 2012 +0200
+
+ Only printout class name in tracing, if one is available
+
+ Makes debug output much more pleasant.
+
+ src/hb-private.hh | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+commit 98619ce4fa650c593b030d06d2f89fec83a10015
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 02:34:06 2012 +0200
+
+ Minor
+
+ src/hb-ot-layout-gsubgpos-private.hh | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit acea183e986dd378c6f95120fe0feb0586a8ef36
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 02:33:11 2012 +0200
+
+ Add return annotation for APPLY
+
+ src/hb-ot-layout-gpos-table.hh | 163
+ ++++++++++++++--------------------
+ src/hb-ot-layout-gsub-table.hh | 114 ++++++++++--------------
+ src/hb-ot-layout-gsubgpos-private.hh | 83 +++++++----------
+ 3 files changed, 151 insertions(+), 209 deletions(-)
+
+commit 5ccfe8e2154ad0b58dabcc236bbe9478c17b02ab
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 02:19:41 2012 +0200
+
+ /Minor/
+
+ src/hb-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0ab8c8621712d33e1e91dfdb4ad0b335e3d2a3fb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 01:25:34 2012 +0200
+
+ Annotate SANITIZE return values
+
+ More to come, for APPLY, CLOSURE, etc.
+
+ src/hb-open-file-private.hh | 23 +++--
+ src/hb-open-type-private.hh | 49 +++++-----
+ src/hb-ot-head-table.hh | 4 +-
+ src/hb-ot-hhea-table.hh | 4 +-
+ src/hb-ot-hmtx-table.hh | 4 +-
+ src/hb-ot-layout-common-private.hh | 51 ++++------
+ src/hb-ot-layout-gdef-table.hh | 48 +++++-----
+ src/hb-ot-layout-gpos-table.hh | 180
+ +++++++++++++++-------------------
+ src/hb-ot-layout-gsub-table.hh | 101 +++++++++----------
+ src/hb-ot-layout-gsubgpos-private.hh | 88 ++++++++---------
+ src/hb-ot-maxp-table.hh | 7 +-
+ src/hb-ot-name-table.hh | 17 ++--
+ src/hb-private.hh | 39 ++++++--
+ 13 files changed, 299 insertions(+), 316 deletions(-)
+
+commit 829e814ff358c5e700ba4df54932696801aa9f65
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 00:52:16 2012 +0200
+
+ Minor
+
+ src/hb-private.hh | 32 ++++++++++----------------------
+ 1 files changed, 10 insertions(+), 22 deletions(-)
+
+commit 6eec6f406d2cc13dbca422e88492d3d498af02bf
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 00:50:38 2012 +0200
+
+ Code reshuffling
+
+ src/hb-private.hh | 36 +++++++++++++++++++++++++-----------
+ 1 files changed, 25 insertions(+), 11 deletions(-)
+
+commit 1e08830b4fac3a60ae52349cab6e101d389d30cd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 11 00:16:40 2012 +0200
+
+ Beautify debug output
+
+ src/hb-open-type-private.hh | 20 ++++++------
+ src/hb-private.hh | 74
+ ++++++++++++++++++++++++++-----------------
+ 2 files changed, 55 insertions(+), 39 deletions(-)
+
+commit 6f4553801729a06e506ffdde7b27c72780d4bb80
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 23:24:43 2012 +0200
+
+ More massaging trace messaging
+
+ src/hb-open-type-private.hh | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 4 ++--
+ src/hb-private.hh | 4 ++--
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+commit b5fa37cb694b01a7df3a656710391c40dd3fcc04
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 23:09:48 2012 +0200
+
+ Minor
+
+ src/hb-set-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 208109703c929428c684ddcf9310b8ba780c4c31
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 23:06:58 2012 +0200
+
+ Better trace message support infrastructure
+
+ We have varargs in the trace interface now. To be used soon...
+
+ src/hb-open-type-private.hh | 17 ++++-----
+ src/hb-ot-layout-gsubgpos-private.hh | 4 +-
+ src/hb-private.hh | 64
+ +++++++++++++++++++++++++---------
+ 3 files changed, 56 insertions(+), 29 deletions(-)
+
+commit 02b2922fbf098c8282eb23dc2c54d5829cf67024
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 21:44:50 2012 +0200
+
+ [Indic] Towards better Reph positioning
+
+ Fixed for Deva cases with two full-form consonants. Failures **way**
+ down.
+ Not much left to go :-).
+
+ src/hb-ot-shape-complex-indic.cc | 111
+ +++++++++++++++++++++++++++-----------
+ 1 files changed, 80 insertions(+), 31 deletions(-)
+
+commit 74e54cf446bb979e488685e8c09eeed6b9d03c24
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 21:20:37 2012 +0200
+
+ [Indic] Add Ra back for scripts without Reph
+
+ We now check that the 'rphp' table exists before forming Reph, so
+ we don't need to comment out Ra for those scripts.
+
+ src/hb-ot-shape-complex-indic-private.hh | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 2b70df5cc008617453b12bafeaac50e6d61b3224
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 18:38:22 2012 +0200
+
+ [Indic] Add note re Uniscribe clusters
+
+ src/hb-ot-shape-complex-indic.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 21d2803133c2c424ed37a9f3d17c7fc4963e5a60
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 18:34:34 2012 +0200
+
+ [Indic] Do clustering like Uniscribe does
+
+ Hindi Wikipedia failures down to 6639 (0.938381%)!
+
+ src/hb-ot-shape-complex-indic.cc | 24 ++++++++++++++++++++----
+ 1 files changed, 20 insertions(+), 4 deletions(-)
+
+commit b20c9ebaf5176101fdfcffbe4714a2e619dd94b6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 18:31:17 2012 +0200
+
+ [Indic] Add test for matra group
+
+ The spec says: "[{M}+[N]+[H]]", and that's what Uniscribe implements.
+ We instead do: "{M+[N]+[H]}", which means we allow Nukta and Halant
+ after all Matras, not just the last one. It makes more sense.
+
+ .../indic/script-devanagari/misc/MANIFEST | 1 +
+ .../script-devanagari/misc/spec-deviations.txt | 1 +
+ 2 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 8df5636968389ac7bf8620ccd091fd4872b0bbee
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 15:41:04 2012 +0200
+
+ [Indic] Reorder Reph to before the Halant after Matras
+
+ Uniscribe doesn't do it, but we want to do as it gives the Reph the
+ opportunity to interact with the Matras. Test with mangal for
+ example.
+ Sequence: <0930,094d,0915,094b,094d>
+ In test suite already.
+
+ src/hb-ot-shape-complex-indic.cc | 12 ++++++++++++
+ 1 files changed, 12 insertions(+), 0 deletions(-)
+
+commit daf3234bdc82c669302599a76d2b14f5e69989db
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 15:28:27 2012 +0200
+
+ [Indic] Don't clear the mask for Reph
+
+ This was removing the mandatory global 1 bit in the mask and hence
+ disabling GPOS for Reph!
+
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 7708ee23cbcc8c8edce13e73b6e549b77bd8c2d0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 14:48:25 2012 +0200
+
+ [Indic] Improve Left Matra repositioning
+
+ Move its dependents too.
+
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 61a58e26a5bda16851669404fc8206896e124740
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 14:43:53 2012 +0200
+
+ [Indic] Add tricky reordering test cases
+
+ In the case of Consonant,LeftMatra,Halant, Uniscribe leaves the Halant
+ where it is, but we want to move it with the Matra as that makes more
+ logical sense.
+
+ .../indic/script-devanagari/misc/MANIFEST | 1 +
+ .../script-devanagari/misc/tricky-reordering.txt | 4 ++++
+ 2 files changed, 5 insertions(+), 0 deletions(-)
+
+commit dbb105883c6e9b83e78dc8b10766cd56b98cd7e1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 13:45:52 2012 +0200
+
+ [Indic] Do Reph repositioning in final reordering like the spec says
+
+ This introduced a failure, which we tracked down to a test case
+ like this:
+
+ U+092E,U+094B,U+094D,U+0930
+
+ The final character is a Ra that should be put in a syllable of it's
+ own. And we do. But it will interact with the Halant before it. So
+ now we finally are convinced that we have to limit features to
+ syllable
+ boundaries. That's coming after lunch!
+
+ src/hb-ot-shape-complex-indic-private.hh | 2 -
+ src/hb-ot-shape-complex-indic.cc | 103
+ ++++++++++++++++++-----------
+ 2 files changed, 64 insertions(+), 41 deletions(-)
+
+commit 4705a7026900e51f6430f03a73c87f2df035df92
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 13:09:08 2012 +0200
+
+ Minor
+
+ src/hb-ot-shape-complex-indic.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 4ac9e98d9d2ea973dd612dc4063cf78496c643a0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 12:53:53 2012 +0200
+
+ [Indic] Reorder left matras to be closer to base
+
+ src/hb-ot-shape-complex-indic-private.hh | 4 --
+ src/hb-ot-shape-complex-indic.cc | 50
+ +++++++++++++++++++++++++++--
+ 2 files changed, 46 insertions(+), 8 deletions(-)
+
+commit 1a1fa8c655a082fc1439608457ba717306cc83ca
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 12:20:21 2012 +0200
+
+ [Indic] Treat the standalone cluster case reusing the consonant logic
+
+ src/hb-ot-shape-complex-indic.cc | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 190eb31a16178269aecaf5d2ecc9012f956749f4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 12:17:16 2012 +0200
+
+ [Indic] Minor
+
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit c5306b6861cfaa50af40e8ceb058791fa06d7981
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 12:07:33 2012 +0200
+
+ [Indic] Handle Vowel syllables
+
+ Reusing the consonant logic!
+
+ src/hb-ot-shape-complex-indic-private.hh | 3 +--
+ src/hb-ot-shape-complex-indic.cc | 11 ++++++-----
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 6d8e0cb74c02f6bc09cd4abe9e4bc82062e1b517
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 11:41:51 2012 +0200
+
+ [Indic] Simplify Reph logic
+
+ src/hb-ot-shape-complex-indic.cc | 24 +++++-------------------
+ 1 files changed, 5 insertions(+), 19 deletions(-)
+
+commit 3d25079f8d6be81b9b4b91d3a97016b8a572f571
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 11:37:42 2012 +0200
+
+ [Indic] Don't form Reph is Ra is the only consonant in the syllable
+
+ src/hb-ot-shape-complex-indic-private.hh | 2 +-
+ src/hb-ot-shape-complex-indic.cc | 10 ++++++++++
+ 2 files changed, 11 insertions(+), 1 deletions(-)
+
+commit b99d63ae114fb58f129562b293a8a66543d499ad
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 11:32:52 2012 +0200
+
+ [Indic] Increase max syllable length
+
+ 20 was way too low, one could hit a syllable with 7ish consonants
+ with it.
+
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit a391ff50b9a7b6ac3e58d199ea726b20ee6839bb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 11:31:20 2012 +0200
+
+ [Indic] Adjust base after sorting
+
+ src/hb-ot-shape-complex-indic.cc | 11 ++++++++++-
+ 1 files changed, 10 insertions(+), 1 deletions(-)
+
+commit d3637edb248162970e202e9d0671540274192844
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 10 10:51:38 2012 +0200
+
+ [Indic] Don't return for long syllables. Just not sort.
+
+ src/hb-ot-shape-complex-indic.cc | 6 ++----
+ 1 files changed, 2 insertions(+), 4 deletions(-)
+
+commit dfa0cade7fce3791e47eaa7edcd23da76c7a0ed0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 19:10:07 2012 +0200
+
+ Fix Uniscribe clusters with multiple items
+
+ src/hb-uniscribe.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 86e5dd386a7989701da476db89be268e4ac1e219
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 18:57:37 2012 +0200
+
+ [Indic] Don't give up syllable parsing upon junk
+
+ src/hb-ot-shape-complex-indic-machine.rl | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit ef24cc8c8e2478a6352c340f4611a617646de4cc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 17:56:03 2012 +0200
+
+ [Indic] Towards multi-cluster syllables and final reordering
+
+ src/hb-ot-shape-complex-arabic.cc | 2 +-
+ src/hb-ot-shape-complex-indic-machine.rl | 21 +++++++++----
+ src/hb-ot-shape-complex-indic-private.hh | 1 +
+ src/hb-ot-shape-complex-indic.cc | 45
+ ++++++++++++++++++++++--------
+ src/hb-ot-shape-complex-private.hh | 5 +--
+ 5 files changed, 51 insertions(+), 23 deletions(-)
+
+commit a9844d41c6cb30d8a2d733130a0e72f51b6c81c1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 17:53:13 2012 +0200
+
+ Combine lig_id and lig_comp into one byte, to free up one for Indic
+
+ src/hb-ot-layout-gpos-table.hh | 14 ++++++++------
+ src/hb-ot-layout-gsub-table.hh | 11 ++++-------
+ src/hb-ot-layout-gsubgpos-private.hh | 26 ++++++++++++++++++++++----
+ 3 files changed, 34 insertions(+), 17 deletions(-)
+
+commit 92332e5116271a5d96e532005fe750e7552a6cbb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 17:40:00 2012 +0200
+
+ Minor
+
+ src/hb-ot-shape-complex-indic.cc | 41
+ +++++++++++++++++++------------------
+ 1 files changed, 21 insertions(+), 20 deletions(-)
+
+commit dbccf87eef0d26838fa4bb3ae26410f6c4818836
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 17:24:39 2012 +0200
+
+ [Indic] Make room for more reordering positions
+
+ src/hb-ot-shape-complex-indic-private.hh | 213
+ +++++++++++++++---------------
+ src/hb-ot-shape-complex-indic.cc | 12 +-
+ 2 files changed, 115 insertions(+), 110 deletions(-)
+
+commit d4480ace7fdbe48aeaf77278c032b8b2ef2ebe8e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 15:56:35 2012 +0200
+
+ [Indic] Improve matra vs consonant ordering
+
+ Another 1.5% down.
+
+ src/hb-ot-shape-complex-indic-private.hh | 32
+ ++++++++++++++++++-----------
+ src/hb-ot-shape-complex-indic.cc | 6 ++--
+ src/indic.cc | 2 +-
+ 3 files changed, 24 insertions(+), 16 deletions(-)
+
+commit 33c92e769563ec2a6c1249b57d8cac742eea6f88
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 15:41:51 2012 +0200
+
+ [Indic] Categorize Anudatta
+
+ src/hb-ot-shape-complex-indic.cc | 9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+commit 3943293a9942201d8fc8d59212fcc8cca5132e3d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 15:27:56 2012 +0200
+
+ [Indic] Add joiner test cases for Devanagari
+
+ .../indic/script-devanagari/misc/MANIFEST | 1 +
+ .../indic/script-devanagari/misc/joiners.txt | 19
+ +++++++++++++++++++
+ 2 files changed, 20 insertions(+), 0 deletions(-)
+
+commit 19d984edaa4f86c842345a9d4150597e045e1887
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 15:21:13 2012 +0200
+
+ [Indic] Make sure Reph jumps over all matras to the right
+
+ Another 12 thousand failures gone! (78 to go)
+
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9034641333d7bfb41a0784cce72e43591faea083
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 15:04:58 2012 +0200
+
+ [Indic] Keep Vedic signs at the right too
+
+ src/hb-ot-shape-complex-indic.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit d1deaa2f5bd028e8076265cba92cffa4fa2834ac
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 15:04:13 2012 +0200
+
+ Replace zerowidth invisible chars with a zero-advance space glyph
+
+ Like Uniscribe does.
+
+ src/hb-ot-shape-complex-arabic.cc | 3 +-
+ src/hb-ot-shape-complex-indic.cc | 20 -----------------
+ src/hb-ot-shape-complex-private.hh | 4 +-
+ src/hb-ot-shape-normalize.cc | 25 ++++++++--------------
+ src/hb-ot-shape-private.hh | 27 +++++++++++++++++++++++
+ src/hb-ot-shape.cc | 41
+ +++++++++++++++++++++++------------
+ src/hb-unicode-private.hh | 38
+ +++++++++++++++++++++++++++++++++
+ 7 files changed, 105 insertions(+), 53 deletions(-)
+
+commit 49e5da1591b8d28f01e7ff9caac9d9ac53668bba
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 13:23:27 2012 +0200
+
+ [indic] Keep the syllable modifier marks to the right
+
+ Shaping failures on Hindi Wikipedia go down from 25% to 14%!
+
+ src/hb-ot-shape-complex-indic.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 5b1260909350bffa3e3d06da346f9f86ce651dbb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 12:37:27 2012 +0200
+
+ Minor
+
+ src/hb-ot-shape-complex-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9ce939232bbce8f51e235195e3854d1e8bb961f8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 12:03:09 2012 +0200
+
+ Minor
+
+ src/hb-ot-shape-complex-indic-private.hh | 14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 76b3409de6887c1cdd5c679939497b1b56f4554b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 11:43:43 2012 +0200
+
+ [indic] Better Reph matching
+
+ src/hb-ot-shape-complex-indic.cc | 21 +++++++++++++++------
+ 1 files changed, 15 insertions(+), 6 deletions(-)
+
+commit df6d45c693c417bf311e6fa49f18a8558542e525
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 11:38:31 2012 +0200
+
+ Minor
+
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 412b91889d9a1ae477e8b6907d0b9a76e78a6c91
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 11:07:18 2012 +0200
+
+ [indic] Apply Indic features in order
+
+ src/hb-ot-shape-complex-indic.cc | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+commit 1ac075b227090a9ad930dcc1670236c176b27067
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 11:06:47 2012 +0200
+
+ [indic] Apply rakaar forms
+
+ Fixes 10% of the failures against all of Hindi Wikipedia!
+
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 2214a03900d32710573a1b05c7665195b3129761
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 09:54:54 2012 +0200
+
+ Add hb-diff-ngrams
+
+ test/shaping/Makefile.am | 1 +
+ test/shaping/hb-diff-ngrams | 5 +++
+ test/shaping/hb_test_tools.py | 71
+ ++++++++++++++++++++++++++++++++++++++---
+ 3 files changed, 72 insertions(+), 5 deletions(-)
+
+commit 178e6dce01ad28c8708bad62ce0fb79c46e836dc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 08:57:29 2012 +0200
+
+ Add N-gram generator
+
+ test/shaping/hb_test_tools.py | 72
+ +++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 70 insertions(+), 2 deletions(-)
+
+commit 98669ceb77657d60435f2cb2e3fc18272c0a2c6a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 08:16:15 2012 +0200
+
+ Use groupby()
+
+ test/shaping/hb_test_tools.py | 26 ++++++++------------------
+ 1 files changed, 8 insertions(+), 18 deletions(-)
+
+commit c438a14b62433db488b5c90854a4a3934adf3305
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 07:45:17 2012 +0200
+
+ Add hb-diff-stat
+
+ test/shaping/Makefile.am | 1 +
+ test/shaping/hb-diff-stat | 5 +++++
+ test/shaping/hb_test_tools.py | 22 ++++++++++++++++++++--
+ 3 files changed, 26 insertions(+), 2 deletions(-)
+
+commit 1058d031e2046eb80331b0950eaff75c2bf608dc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 9 07:30:07 2012 +0200
+
+ Make hb-diff-filter-failtures retain all test info for failed tests
+
+ test/shaping/hb_test_tools.py | 33 ++++++++++++++++++++++++++-------
+ 1 files changed, 26 insertions(+), 7 deletions(-)
+
+commit f1eb008cc727370e1bd0dc32fdf301f62d9ff981
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 8 23:41:41 2012 +0200
+
+ Add hb-diff-colorize
+
+ Accepts --format=html now.
+
+ test/shaping/Makefile.am | 1 +
+ test/shaping/hb-diff | 4 +-
+ test/shaping/hb-diff-colorize | 7 ++
+ test/shaping/hb_test_tools.py | 158
+ +++++++++++++++++++++++++----------------
+ 4 files changed, 106 insertions(+), 64 deletions(-)
+
+commit 9155e4ffe00c96a2c14e14a300004b1038ca3a9c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 8 22:44:21 2012 +0200
+
+ Cleanup diff
+
+ Doesn't do --color anymore. That will go into a new hb-diff-colorize
+ tool.
+
+ test/shaping/hb-diff | 10 +++-------
+ test/shaping/hb_test_tools.py | 32 ++++++++++++++++++--------------
+ 2 files changed, 21 insertions(+), 21 deletions(-)
+
+commit 7d22135b4c3f8fb70552302bf8239df9976dddda
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 8 19:38:49 2012 +0200
+
+ Make hb-diff faster
+
+ test/shaping/hb_test_tools.py | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit a93e238e05a2f70a6e664e5d04ba25bbd54493dc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 8 18:55:29 2012 +0200
+
+ More tests
+
+ .../shaper-arabic/script-mongolian/misc/MANIFEST | 1 +
+ .../shaper-arabic/script-mongolian/misc/poem.txt | 4 ++++
+ .../indic/script-bengali/misc/MANIFEST | 1 +
+ .../indic/script-bengali/misc/reph.txt | 10 ++++++++++
+ 4 files changed, 16 insertions(+), 0 deletions(-)
+
+commit 1a2a4a0078dda834443edd421037a4bcbad18c5e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat May 5 22:38:20 2012 +0200
+
+ Fix warning and build issues
+
+ As reported by Jonathan Kew on the list.
+
+ src/hb-set-private.hh | 2 +-
+ src/main.cc | 9 +++++----
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+commit a5e39fed85e069ba1afbf90408349ad99ceb0e1d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 25 00:14:46 2012 -0400
+
+ Minor
+
+ src/hb-set-private.hh | 2 ++
+ src/hb-set.cc | 2 ++
+ 2 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 1827dc208c867e433a95237d1ed3fc7a73d1d9a7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 24 16:56:37 2012 -0400
+
+ Add hb_ot_shape_glyphs_closure()
+
+ Experimental API for now.
+
+ src/hb-ot-map-private.hh | 7 ++++---
+ src/hb-ot-shape.cc | 35 +++++++++++++++++++++++++++++++++++
+ src/hb-ot.h | 8 ++++++++
+ src/hb-set-private.hh | 3 +++
+ 4 files changed, 50 insertions(+), 3 deletions(-)
+
+commit bb09f0ec10216b11189b5e8584856adf0f14d1fc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 24 16:02:12 2012 -0400
+
+ Minor
+
+ src/hb-unicode.cc | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 29a7e306e30e894f7a38daf73eca9fc772c58158
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 24 16:01:30 2012 -0400
+
+ Minor
+
+ src/hb-ot-shape-normalize.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 585b107cdee7305920dacc83c9ee1f8eeff7afd1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 24 16:00:50 2012 -0400
+
+ Add test caes for a minority language using Bengali
+
+ U+0985 BENGALI LETTER A followed by U+09D7 BENGALI AU LENGTH MARK.
+ According to Bobby de Vos on the mailing list, this results in
+ a dotted
+ circle with most shaping engines, but is a legitimate sequence in this
+ minority language.
+
+ We reached the consensus on the list to NOT implement dotted-circle
+ in HarfBuzz.
+
+ .../indic/script-bengali/misc/misc.txt | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 6c6ccaf575392f6e6bb9a15534026e4ea462705b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 24 14:21:15 2012 -0400
+
+ Add a few more set operations
+
+ TODO: Tests for hb_set_t.
+
+ src/hb-set-private.hh | 54
+ +++++++++++++++++++++++++++++++++++++++++++++++-
+ src/hb-set.cc | 55
+ +++++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-set.h | 34 +++++++++++++++++++++++++++--
+ 3 files changed, 139 insertions(+), 4 deletions(-)
+
+commit 5caece67ab9eee322bdcdf6f4b607eadde297e56
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 23 23:03:12 2012 -0400
+
+ Make closure() return void
+
+ src/hb-ot-layout-gsub-table.hh | 142 ++++++++++++-----------------
+ src/hb-ot-layout-gsubgpos-private.hh | 165
+ +++++++++++++++++-----------------
+ src/hb-ot-layout.cc | 10 +-
+ src/hb-ot-layout.h | 8 +-
+ src/hb-set-private.hh | 20 ++---
+ 5 files changed, 157 insertions(+), 188 deletions(-)
+
+commit 0b08adb3539f2ec29682456b89c69e89ff5e9c03
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 23 22:41:09 2012 -0400
+
+ Add hb_set_t
+
+ TODO | 2 +
+ src/Makefile.am | 3 +
+ src/hb-ot-layout-common-private.hh | 1 +
+ src/hb-ot-layout-private.hh | 47 --------------
+ src/hb-ot-layout.h | 2 -
+ src/hb-set-private.hh | 95 ++++++++++++++++++++++++++++
+ src/hb-set.cc | 120
+ ++++++++++++++++++++++++++++++++++++
+ src/hb-set.h | 91 +++++++++++++++++++++++++++
+ src/hb.h | 1 +
+ 9 files changed, 313 insertions(+), 49 deletions(-)
+
+commit 5b93e8d94fb4c2474816304ae3f52e1c704882de
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 23 22:26:13 2012 -0400
+
+ Update copyright headers
+
+ src/hb-ot-layout-common-private.hh | 2 +-
+ src/hb-ot-layout-gpos-table.hh | 2 +-
+ src/hb-ot-layout-gsub-table.hh | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 6a9be5bd3524dc3eb1e88d1063bde2e4d8b57011
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 23 22:23:17 2012 -0400
+
+ Rename hb_glyph_map_t to hb_set_t
+
+ src/hb-ot-layout-common-private.hh | 16 ++++++++--------
+ src/hb-ot-layout-gsubgpos-private.hh | 12 ++++++------
+ src/hb-ot-layout-private.hh | 2 +-
+ src/hb-ot-layout.cc | 2 +-
+ src/hb-ot-layout.h | 4 ++--
+ src/hb-ot-map-private.hh | 2 +-
+ src/hb-ot-map.cc | 2 +-
+ 7 files changed, 20 insertions(+), 20 deletions(-)
+
+commit a4385f0b0a6949e2ce49e6a147ad4beaa724f6c3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 23 22:20:14 2012 -0400
+
+ Improve clustering
+
+ src/hb-ot-shape.cc | 5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+
+commit 8e3715f8a16b315c1c7dd4b256e7f68a36c53e7c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 23 22:18:54 2012 -0400
+
+ Minor
+
+ src/hb-buffer-private.hh | 2 +-
+ src/hb-buffer.cc | 2 +-
+ src/hb-graphite2.cc | 5 ++---
+ src/hb-ot-shape-complex-arabic.cc | 4 ++--
+ src/hb-ot-shape-complex-misc.cc | 4 ++--
+ 5 files changed, 8 insertions(+), 9 deletions(-)
+
+commit d2984a241e4819474d827b1dd5d4b6d76596b3a5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 23 17:21:14 2012 -0400
+
+ Add map->substitute_closure()
+
+ src/hb-ot-map-private.hh | 3 +++
+ src/hb-ot-map.cc | 15 +++++++++++++++
+ 2 files changed, 18 insertions(+), 0 deletions(-)
+
+commit 31081f7390e5130df72f89acc609ccab5dc77a48
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 23 16:54:58 2012 -0400
+
+ Implement closure() for Context and ChainContext lookups
+
+ src/hb-ot-layout-common-private.hh | 54 ++++++
+ src/hb-ot-layout-gsubgpos-private.hh | 347
+ +++++++++++++++++++++++++++-------
+ src/hb-ot-layout-private.hh | 23 ++-
+ 3 files changed, 351 insertions(+), 73 deletions(-)
+
+commit c64ddab3c34897cd520d4d73a054866e649e8793
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 23 15:28:35 2012 -0400
+
+ Flesh out closure() for GSUB
+
+ The GSUBGPOS part still missing.
+
+ src/hb-ot-layout-common-private.hh | 61 ++++++++++++++------
+ src/hb-ot-layout-gsub-table.hh | 112
+ ++++++++++++++++++++++++++++--------
+ src/hb-ot-layout-private.hh | 34 +++++++++++
+ src/hb-ot-layout.h | 2 +-
+ 4 files changed, 165 insertions(+), 44 deletions(-)
+
+commit 0da132bde4d576a03095d6738507954f7f85103d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 23 14:21:33 2012 -0400
+
+ Fix Coverage iters
+
+ src/hb-ot-layout-common-private.hh | 30 +++++++++++++++++++++---------
+ 1 files changed, 21 insertions(+), 9 deletions(-)
+
+commit 3e32cd9570fd8b09901fb790b80365ae425f681a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 23 13:20:52 2012 -0400
+
+ Minor
+
+ src/hb-ot-layout-gsubgpos-private.hh | 1 -
+ src/hb-ot-layout.cc | 6 +++---
+ src/hb-ot-layout.h | 8 ++++++++
+ src/hb-private.hh | 4 +++-
+ 4 files changed, 14 insertions(+), 5 deletions(-)
+
+commit 650ac00da3d2f988197393f34d40f0ba1a0fa093
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 23 13:17:09 2012 -0400
+
+ Minor refactoring
+
+ src/hb-ot-layout-gpos-table.hh | 27 ++++++++++-------------
+ src/hb-ot-layout-gsub-table.hh | 39
+ +++++++++++++++------------------
+ src/hb-ot-layout-gsubgpos-private.hh | 8 +-----
+ src/hb-ot-layout.cc | 6 +++-
+ 4 files changed, 36 insertions(+), 44 deletions(-)
+
+commit f94b0aa64609654497ced9c00312c9643eb69053
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 23 13:04:38 2012 -0400
+
+ Add "closure" operation stubs to GSUB
+
+ Filling in.
+
+ src/hb-ot-layout-gsub-table.hh | 179
+ ++++++++++++++++++++++++++++++++++
+ src/hb-ot-layout-gsubgpos-private.hh | 110 ++++++++++++++++++++-
+ src/hb-ot-layout.cc | 8 ++
+ 3 files changed, 293 insertions(+), 4 deletions(-)
+
+commit 7d50d502635d7c95e6bd091e7d4cc993f0853f76
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 23 13:02:14 2012 -0400
+
+ Add Coverage iterators
+
+ src/hb-ot-layout-common-private.hh | 59
+ ++++++++++++++++++++++++++++++++++++
+ 1 files changed, 59 insertions(+), 0 deletions(-)
+
+commit 3ed4634ec349fa9e943ad23718c04be4dd4bba62
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 19 22:34:06 2012 -0400
+
+ Add Indic inspection tool
+
+ src/Makefile.am | 7 +-
+ src/hb-ot-shape-complex-indic-private.hh | 264
+ ++++++++++++++++++++++++++++++
+ src/hb-ot-shape-complex-indic.cc | 229
+ +--------------------------
+ src/indic.cc | 46 +++++
+ 4 files changed, 317 insertions(+), 229 deletions(-)
+
+commit a06411ecf93c7e5256e363eef3ef69554896dd55
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 19 22:28:25 2012 -0400
+
+ Minor matra renumbering
+
+ Should have no visible effect.
+
+ src/hb-ot-shape-complex-indic.cc | 30 +++++++++++++++++-------------
+ 1 files changed, 17 insertions(+), 13 deletions(-)
+
+commit 36608941f3cc530fea57282fa175e4cc3b4c66c6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 19 22:21:38 2012 -0400
+
+ Add GSUB "would_apply" API
+
+ To be used in the Indic shaper later. Unused for now.
+
+ src/hb-ot-layout-gsub-table.hh | 140
+ +++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 138 insertions(+), 2 deletions(-)
+
+commit a0d4caeb91fa5e5f2090db4efc35c64ff9a64789
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 17 13:42:30 2012 -0400
+
+ Minor
+
+ TODO | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit a5e40542ab9508f0ba6f822f1262d93fccb71f45
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 17 12:37:19 2012 -0400
+
+ Make font immutable in hb_shape()
+
+ src/hb-shape.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 3cde23664fbbe9cd2ac1b8fd5eb2ea288309cc9c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 17 11:44:49 2012 -0400
+
+ Minor note re Graphite
+
+ src/hb-graphite2.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 4dc2449d92308f8dd366142831c0b85bd30ea5a9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 17 11:39:48 2012 -0400
+
+ Fix leak in graphite
+
+ src/hb-graphite2.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 0290bbf8611aa881daed907f22256a431250c90a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 17 10:28:21 2012 -0400
+
+ Add another Thai test
+
+ .../texts/in-tree/shaper-thai/misc/misc.txt | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 9ceca3aeb14cc096f5f87660cf7351bc35073084
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 16 21:05:51 2012 -0400
+
+ Fix ragel regexp in vowel-based syllable
+
+ As reported by datao zhang on the mailing list.
+
+ src/hb-ot-shape-complex-indic-machine.rl | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b870afcd1b436614af95db6dc297e54c8f03f0cd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 16 21:05:11 2012 -0400
+
+ Rewrite ragel expression to better match the one on MS spec
+
+ https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx
+
+ src/hb-ot-shape-complex-indic-machine.rl | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 95cefdf96efe43a44133aa8a186155cf4e63e2b7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 16 18:08:20 2012 -0400
+
+ Add --utf8-clusters
+
+ Also fix cairo cluster generation.
+
+ util/hb-shape.cc | 8 +++++---
+ util/hb-view.hh | 2 +-
+ util/helper-cairo.cc | 22 +++++++++++++++++-----
+ util/helper-cairo.hh | 3 ++-
+ util/options.cc | 19 ++++++++++++++-----
+ util/options.hh | 26 ++++++++++++++++----------
+ util/view-cairo.cc | 5 +++--
+ util/view-cairo.hh | 3 ++-
+ 8 files changed, 60 insertions(+), 28 deletions(-)
+
+commit effb42e5c520128bdc2e29398ed801730c5c0f52
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 16 16:04:07 2012 -0400
+
+ Always use cairo_show_text_glyphs()
+
+ Better catches cluster errors.
+
+ util/view-cairo.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 799cfdd15ab369580b2283200c3aca6866214b59
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 16 16:00:36 2012 -0400
+
+ Make page progression be right to left for vertical text
+
+ util/view-cairo.cc | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit a5f1834f57ea3fb254f5c7d372747de316fcc8f1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 16 15:55:13 2012 -0400
+
+ Apply 'liga' for vertical writing mode too
+
+ Apparently that's what Kazuraki uses to form vertical ligatures,
+ which suggests that it's what Adobe does.
+
+ src/hb-ot-shape.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4d85252bda25cddd1fbdd744687e449888f0b5fa
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 16 15:54:26 2012 -0400
+
+ Add Japanese test data from Adobe's Kazuraki font ligatures
+
+ test/shaping/texts/in-tree/shaper-default/MANIFEST | 1 +
+ .../shaper-default/script-japanese/MANIFEST | 1 +
+ .../shaper-default/script-japanese/misc/MANIFEST | 2 +
+ .../script-japanese/misc/kazuraki-liga-lines.txt | 8 +++
+ .../script-japanese/misc/kazuraki-liga.txt | 53
+ ++++++++++++++++++++
+ 5 files changed, 65 insertions(+), 0 deletions(-)
+
+commit e74616b8898b5f18d9bf82b9e81aefad056c1e36
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Apr 15 14:12:13 2012 -0400
+
+ Add comment
+
+ src/hb-private.hh | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 683b503f30bba29d57a93d7e8ac7138c2e7f49f1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Apr 14 20:47:14 2012 -0400
+
+ Minor
+
+ src/hb-ot-shape-normalize.cc | 11 +++++++++--
+ src/hb-ot-shape-private.hh | 9 ---------
+ src/hb-ot-shape.cc | 9 ++++++++-
+ 3 files changed, 17 insertions(+), 12 deletions(-)
+
+commit b9f199c8e38cc5ed0d73845568630f3bcbdd4374
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Apr 14 20:23:58 2012 -0400
+
+ Move code around
+
+ src/hb-ot-shape-private.hh | 40 ---------------------------------------
+ src/hb-ot-shape.cc | 45
+ ++++++++++++++++++++++++++++++++++++++++---
+ 2 files changed, 41 insertions(+), 44 deletions(-)
+
+commit 38a83019e6a7f4aa47662fd557344f62ae001abe
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Apr 14 19:40:18 2012 -0400
+
+ Minor
+
+ src/hb-common.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit d4adade217a61007dd2da5cd9eccf889f79a019a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Apr 14 19:23:17 2012 -0400
+
+ Add assert
+
+ src/hb-ot-shape.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit fe28b997fbbeb2cfeab62ac453993ccffe3e6719
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Apr 14 19:19:26 2012 -0400
+
+ Add HB_DIRECTION_IS_VALID
+
+ src/hb-common.h | 1 +
+ test/api/test-common.c | 7 +++++++
+ 2 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 5e88aa66822ba64324b4428c9ffbe06a43b4f310
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Apr 14 18:51:50 2012 -0400
+
+ Remove public enum names again
+
+ As was reported to me, glib-mkenum does not understand named enums,
+ so remove for now.
+
+ src/hb-blob.h | 2 +-
+ src/hb-common.h | 6 +++---
+ src/hb-ot-layout-private.hh | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 08569c0eaab026c7122c0dc29922cf44011c4d10
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Apr 14 18:47:07 2012 -0400
+
+ Minor
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 4bf90f648313e35d21b427a956aa1fe762bae757
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 12 17:38:23 2012 -0400
+
+ Make HB_DIRECTION_INVALID be zero
+
+ This changes all the HB_DIRECTION_* enum member values, but is
+ nicer, in preparation for making hb_segment_properties_t public.
+
+ src/hb-common.cc | 7 ++++---
+ src/hb-common.h | 20 ++++++++++----------
+ test/api/test-common.c | 9 +++++++--
+ 3 files changed, 21 insertions(+), 15 deletions(-)
+
+commit d01402da9c756f90a84bfb1f964fd56caf2b35c3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 12 17:38:02 2012 -0400
+
+ Minor
+
+ TODO | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 69b84a8f6c789726815261c2e86692de7a65d6e8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 12 15:50:40 2012 -0400
+
+ Fix hb-view surface size calc for vertical text
+
+ For some reason it doesn't quite work with IranianNastaliq, but
+ that looks like a font issue.
+
+ util/helper-cairo.hh | 5 +++--
+ util/options.hh | 7 +++++++
+ util/view-cairo.cc | 31 +++++++++++++++++++++----------
+ util/view-cairo.hh | 1 +
+ 4 files changed, 32 insertions(+), 12 deletions(-)
+
+commit 6bd9b479b8b2befbb0847282e93beade197c8038
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 12 14:53:53 2012 -0400
+
+ Hide backend-specific shape functions
+
+ Also remove shaper_options argument to hb_shape_full(). That was
+ unused and for "future". Let it go.
+
+ More shaper API coming in preparation for plan/planned API.
+
+ configure.ac | 6 ++--
+ src/Makefile.am | 11 ++++----
+ src/hb-fallback-shape-private.hh | 9 +++----
+ src/hb-fallback-shape.cc | 9 +++----
+ src/hb-graphite2-private.hh | 42 +++++++++++++++++++++++++++++++++
+ src/hb-graphite2.cc | 5 +--
+ src/hb-graphite2.h | 7 -----
+ src/hb-ot-shape-private.hh | 8 ++++-
+ src/hb-ot-shape.cc | 11 +++-----
+ src/hb-ot-shape.h | 48
+ --------------------------------------
+ src/hb-ot.h | 1 -
+ src/hb-shape.cc | 24 +++++++------------
+ src/hb-shape.h | 1 -
+ src/hb-uniscribe-private.hh | 42 +++++++++++++++++++++++++++++++++
+ src/hb-uniscribe.cc | 9 +++----
+ src/hb-uniscribe.h | 7 -----
+ util/options.hh | 2 +-
+ 17 files changed, 126 insertions(+), 116 deletions(-)
+
+commit c6035cf802c60f0526f421f39a55886061df94ee
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 12 13:23:59 2012 -0400
+
+ Add names to enums
+
+ gdb was showing <anonymous enum> instead of useful stuff, so name
+ all our enums.
+
+ src/hb-blob.h | 2 +-
+ src/hb-common.h | 6 +++---
+ src/hb-ot-layout-common-private.hh | 2 +-
+ src/hb-ot-layout-gdef-table.hh | 2 +-
+ src/hb-ot-layout-gpos-table.hh | 5 ++---
+ src/hb-ot-layout-gsub-table.hh | 2 +-
+ src/hb-ot-layout-private.hh | 2 +-
+ 7 files changed, 10 insertions(+), 11 deletions(-)
+
+commit d1c9eb458c843215da8df84b596bfae51fee135b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 12 13:17:44 2012 -0400
+
+ Make it an error to include non-top-level headers
+
+ Users should #include <hb.h> (or hb-ft.h, hb-glib.h, etc), but
+ never things like hb-shape.h directly. This makes it easier to
+ refactor headers later on without breaking compatibility.
+
+ src/hb-blob.h | 4 ++++
+ src/hb-buffer.h | 4 ++++
+ src/hb-common.h | 4 ++++
+ src/hb-font.h | 4 ++++
+ src/hb-ft.h | 2 --
+ src/hb-glib.h | 1 +
+ src/hb-gobject.h | 1 +
+ src/hb-graphite2.h | 5 +++--
+ src/hb-icu.h | 1 +
+ src/hb-ot-layout.h | 8 +++++---
+ src/hb-ot-shape.h | 9 +++++----
+ src/hb-ot-tag.h | 6 +++++-
+ src/hb-ot.h | 2 ++
+ src/hb-private.hh | 5 ++++-
+ src/hb-shape.h | 4 ++++
+ src/hb-unicode.h | 4 ++++
+ src/hb-uniscribe.h | 3 +--
+ src/hb-version.h.in | 4 ++++
+ src/hb.h | 2 ++
+ 19 files changed, 58 insertions(+), 15 deletions(-)
+
+commit 323190c27b80cddc9b3c42d19f1f243e2acb2411
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 12 12:29:10 2012 -0400
+
+ Minor
+
+ src/hb-ft.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 0e3361464b00b76aa7375515163e0710a691db0c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 12 10:06:52 2012 -0400
+
+ Fix bug with not setting Unicode props of the first character
+
+ Fixes Mongolian shaping issue:
+ https://bugs.freedesktop.org/show_bug.cgi?id=45695
+
+ src/hb-ot-shape.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f9746b600a6e14dbe48aabfc17df8f12a5b46b11
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 12 09:59:26 2012 -0400
+
+ Minor
+
+ .../shaper-arabic/script-mongolian/misc/misc.txt | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 7470b0ff805e4ff59d23d7a1808888fafdf550eb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 12 09:44:27 2012 -0400
+
+ Add Mongolian test case
+
+ test/shaping/texts/in-tree/MANIFEST | 1 +
+ .../shaper-arabic/script-mongolian/misc/MANIFEST | 1 +
+ .../shaper-arabic/script-mongolian/misc/misc.txt | 4 ++++
+ test/shaping/texts/in-tree/shaper-thai/MANIFEST | 1 +
+ .../texts/in-tree/shaper-thai/misc/MANIFEST | 1 +
+ 5 files changed, 8 insertions(+), 0 deletions(-)
+
+commit c65662b71e6160f5adfb6226d97589ca457d98b9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 12 09:31:55 2012 -0400
+
+ Fix left-matra positioning in Indic
+
+ Fixes 200 failures out of previous 4290 cases in the OO.o Indic
+ dictionary (of ~16000 entries).
+
+ src/hb-ot-shape-complex-indic.cc | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 6d16403bfaa4d710d80c93298eca7211ecaa419f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 11 22:04:42 2012 -0400
+
+ Adjust TODO
+
+ TODO | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 029a82d81d8ffa1b6771d19018d592fec1dbc934
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 11 22:00:46 2012 -0400
+
+ [hangul] Apply *jmo features to all Hangul chars
+
+ This is what old HB does. Morever, fixes rendering with Win8 malgun
+ font. The Win7 version doesn't compose with either Uniscribe nor HB,
+ but Win8 version works as expected, like Uniscribe, with this change.
+
+ Lets call Hangul done for now.
+
+ src/hb-ot-shape-complex-misc.cc | 9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+commit 3baae2440de69577d330209edb708e7d2bb2231d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 11 21:54:37 2012 -0400
+
+ Update TODO
+
+ TODO | 28 +++++++++++++++-------------
+ 1 files changed, 15 insertions(+), 13 deletions(-)
+
+commit a4976447cd1a1feffdecd0d501a2690716b1cf4b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 11 17:48:40 2012 -0400
+
+ Add Hangul test
+
+ .../shaper-hangul/script-hangul/misc/misc.txt | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit e95d912b3b0af027c4384553f95236db822e5acc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 11 17:33:02 2012 -0400
+
+ Fix diff tool
+
+ test/shaping/hb_test_tools.py | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 41ae674f6871f43d0a6e4ca67a747074d63ae576
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 11 17:11:05 2012 -0400
+
+ Don't create hb_apply_context_t per glyph!
+
+ I couldn't measure significant performance gains out of this; maybe
+ about 5% (with one million Malayalam strings). Still, not bad.
+ But reminds me that optimizing this codebase without profiling first
+ is simply not going to work. Oh well...
+
+ src/hb-ot-layout-gpos-table.hh | 24 ++++++------------------
+ src/hb-ot-layout-gsub-table.hh | 26 +++++++-------------------
+ src/hb-ot-layout-gsubgpos-private.hh | 22 ++++++++++++++++++++++
+ 3 files changed, 35 insertions(+), 37 deletions(-)
+
+commit 4a1e02ef7979d58fe0c726ee7c665b2420c42ddd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 11 14:37:53 2012 -0400
+
+ Fix shape to presentation forms font check
+
+ As reported by Jonathan Kew on the list.
+
+ src/hb-ot-shape-complex-arabic.cc | 9 ++++++---
+ 1 files changed, 6 insertions(+), 3 deletions(-)
+
+commit 6062f5f01436b4044be729890ed00b9b62737824
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 11 14:19:55 2012 -0400
+
+ Fix build with some compilers
+
+ As reported by Jonathan Kew on the list.
+
+ src/hb-ot-shape-complex-misc.cc | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+commit acd88e659fdb2fa1cbf7171f0a1c7fbc81b9f298
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 10 18:02:20 2012 -0400
+
+ In Arabic fallback shaping, check that the font has glyph for new char
+
+ src/hb-ot-shape-complex-arabic.cc | 12 +++++++-----
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ src/hb-ot-shape-complex-misc.cc | 6 +++---
+ src/hb-ot-shape-complex-private.hh | 7 ++++---
+ src/hb-ot-shape.cc | 2 +-
+ 5 files changed, 16 insertions(+), 13 deletions(-)
+
+commit 7752aa73e72301a46c64c533c1e423ff5987cc05
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 10 17:22:14 2012 -0400
+
+ Minor
+
+ src/hb-ot-shape-private.hh | 1 -
+ src/hb-ot-shape.cc | 10 ----------
+ 2 files changed, 0 insertions(+), 11 deletions(-)
+
+commit 939c010211b063f78874a3b72b032c1ed9a13b87
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 10 17:20:05 2012 -0400
+
+ Implement Arabic fallback shaping mandatory ligatures
+
+ src/gen-arabic-table.py | 32
+ +++++++++++++++++++++---------
+ src/hb-ot-shape-complex-arabic-table.hh | 28 ++++++++++++++++++--------
+ src/hb-ot-shape-complex-arabic.cc | 31
+ ++++++++++++++++++++++++++++++
+ src/hb-ot-shape-complex-misc.cc | 4 +-
+ 4 files changed, 74 insertions(+), 21 deletions(-)
+
+commit b7d04eb606800100faa11100d2adf559e297a4ee
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 10 16:44:38 2012 -0400
+
+ Do Arabic fallback shaping
+
+ src/hb-ot-shape-complex-arabic.cc | 38
+ ++++++++++++++++++++++++++++++++----
+ 1 files changed, 33 insertions(+), 5 deletions(-)
+
+commit ae4a2b9365051c23c9a299cf76f3ab7e661999b1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 10 16:25:08 2012 -0400
+
+ Generate fallback Arabic shaping table
+
+ Not hooked up yet.
+
+ src/Makefile.am | 6 +-
+ src/gen-arabic-table.py | 220
+ ++++++++++++++++++++++---------
+ src/gen-indic-table.py | 4 +-
+ src/hb-ot-shape-complex-arabic-table.hh | 205
+ ++++++++++++++++++++++++++++-
+ 4 files changed, 367 insertions(+), 68 deletions(-)
+
+commit 3b26f96ebe859570d14c6902afc23462bca40712
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 10 10:52:07 2012 -0400
+
+ Add Thai shaper that does SARA AM decomposition / reordering
+
+ That's not in the OpenType spec, but it's what MS and Adobe do.
+
+ src/hb-buffer.cc | 1 +
+ src/hb-ot-shape-complex-misc.cc | 104
+ +++++++++++++++++++++++++++++++++++-
+ src/hb-ot-shape-complex-private.hh | 8 +++
+ 3 files changed, 112 insertions(+), 1 deletions(-)
+
+commit 0b6d2ac6a1d04877ae4542fc2a3b920185547053
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 10 10:52:03 2012 -0400
+
+ Minor
+
+ TODO | 10 ++++------
+ 1 files changed, 4 insertions(+), 6 deletions(-)
+
+commit e099dd6592b4ea887696330f4718efb572494d93
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 10 10:47:33 2012 -0400
+
+ Add Thai test case for SARA AM decomposition
+
+ test/shaping/texts/in-tree/shaper-hangul/MANIFEST | 1 +
+ .../texts/in-tree/shaper-thai/misc/misc.txt | 5 +++++
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 4450dc9354b18cd68980b0891b24ea8efa4f38b6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Apr 7 22:07:23 2012 -0400
+
+ Move around
+
+ test/shaping/texts/in-tree/MANIFEST | 1 +
+ test/shaping/texts/in-tree/shaper-default/MANIFEST | 1 -
+ .../in-tree/shaper-default/script-hangul/MANIFEST | 1 -
+ .../shaper-default/script-hangul/misc/MANIFEST | 1 -
+ .../shaper-default/script-hangul/misc/misc.txt | 2 --
+ .../in-tree/shaper-hangul/script-hangul/MANIFEST | 1 +
+ .../shaper-hangul/script-hangul/misc/MANIFEST | 1 +
+ .../shaper-hangul/script-hangul/misc/misc.txt | 2 ++
+ 8 files changed, 5 insertions(+), 5 deletions(-)
+
+commit d4cc44716c1e098f8abbc0e495404598026ef242
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Apr 7 21:52:28 2012 -0400
+
+ Move code around, in prep for Thai/Lao shaper
+
+ src/hb-buffer-private.hh | 5 +++++
+ src/hb-buffer.cc | 23 +++++++++++++++++++++++
+ src/hb-ot-shape-complex-indic-machine.rl | 14 +-------------
+ 3 files changed, 29 insertions(+), 13 deletions(-)
+
+commit c9a841f4452921c5361b8f5697bbff7736ce60cd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Apr 7 15:06:55 2012 -0400
+
+ Add simple Hangul shaper that recomposes Jamo when feasible
+
+ Previously, we were NOT actually recomposing Hangul Jamo. We do now.
+ The two lines in:
+
+ test/shaping/texts/in-tree/shaper-default/script-hangul/misc/misc.txt
+
+ Now render the same with the UnDotum.ttf font. Previously the second
+ linle was rendering boxes.
+
+ We can also start applying OpenType Jamo features later. At this
+ time,
+ I have no idea how the 'ljmo', 'vjmo', 'tjmo' features are supposed to
+ work. Maybe someone can explain them to me?
+
+ src/hb-ot-shape-complex-misc.cc | 16 ++++++++++++++++
+ src/hb-ot-shape-complex-private.hh | 15 +++++++++++++--
+ 2 files changed, 29 insertions(+), 2 deletions(-)
+
+commit 968318455304804dc53045e8ba0cd4d76800c02d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Apr 7 14:57:21 2012 -0400
+
+ Implement normalization mode
+ HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_FULL
+
+ In this mode we try composing CCC=0 with CCC=0 characters. Useful for
+ Hangul.
+
+ src/hb-ot-shape-normalize.cc | 21 +++++++++++++--------
+ 1 files changed, 13 insertions(+), 8 deletions(-)
+
+commit bec2ac4fde1ba0dd6dba02adbb836ce569a5cf6f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Apr 7 14:51:17 2012 -0400
+
+ Bring normalization algorithm closer to the spec
+
+ No logical difference so far.
+
+ src/hb-ot-shape-normalize.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit e02d9257863b49e33ab5942971266349d3c548f6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Apr 7 14:49:13 2012 -0400
+
+ Flip logic around
+
+ src/hb-ot-shape-normalize.cc | 38
+ +++++++++++++-------------------------
+ 1 files changed, 13 insertions(+), 25 deletions(-)
+
+commit aaa25d5f458127f53f4b5ecdeb986ae91fabbad3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 5 17:27:23 2012 -0400
+
+ Add Hangul test case
+
+ Composed, and decomposed, of the same text.
+
+ test/shaping/texts/in-tree/shaper-default/MANIFEST | 1 +
+ .../in-tree/shaper-default/script-hangul/MANIFEST | 1 +
+ .../shaper-default/script-hangul/misc/MANIFEST | 1 +
+ .../shaper-default/script-hangul/misc/misc.txt | 2 ++
+ 4 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 11138ccff71f442da1fcf64faa0e1d22e083e775
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 5 17:25:19 2012 -0400
+
+ Add normalize mode
+
+ In preparation for Hangul shaper.
+
+ src/Makefile.am | 1 +
+ src/hb-ot-layout-common-private.hh | 1 -
+ src/hb-ot-shape-complex-arabic.cc | 6 +-
+ src/hb-ot-shape-complex-indic.cc | 6 +-
+ src/hb-ot-shape-complex-misc.cc | 8 ++--
+ src/hb-ot-shape-complex-private.hh | 13 +++---
+ src/hb-ot-shape-normalize-private.hh | 46 +++++++++++++++++++++
+ src/hb-ot-shape-normalize.cc | 73
+ ++++++++++++++++-----------------
+ src/hb-ot-shape-private.hh | 7 +--
+ src/hb-ot-shape.cc | 2 +-
+ 10 files changed, 102 insertions(+), 61 deletions(-)
+
+commit 6769f21d579a354e32577ec57348e97d2cb1b438
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 5 16:46:46 2012 -0400
+
+ More moving code around
+
+ src/hb-ot-shape-normalize.cc | 2 +-
+ src/hb-ot-shape-private.hh | 8 --------
+ src/hb-ot-shape.cc | 2 +-
+ src/hb-unicode-private.hh | 8 ++++++++
+ 4 files changed, 10 insertions(+), 10 deletions(-)
+
+commit 2db2a566826ed4763ce69629194ec656bd48b0bd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 5 16:40:37 2012 -0400
+
+ Move code around
+
+ src/hb-ot-shape-private.hh | 53
+ ------------------------------------------
+ src/hb-unicode-private.hh | 3 ++
+ src/hb-unicode.cc | 55
+ ++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 58 insertions(+), 53 deletions(-)
+
+commit cad3821f3d5b68d490b0728bd37bd57428ec809c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Mar 7 17:13:25 2012 -0500
+
+ More sorting by Unicode version
+
+ This is the most convenient way to browse scripts.
+
+ src/hb-common.cc | 2 +-
+ src/hb-common.h | 2 +-
+ src/hb-ot-shape-complex-private.hh | 94
+ ++++++++++++++++++++++++++---------
+ 3 files changed, 72 insertions(+), 26 deletions(-)
+
+commit 317b9504d7a4faa70dcf21e5c2aff4792dbd201a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Mar 7 16:51:29 2012 -0500
+
+ Minor
+
+ src/hb-ot-shape-complex-private.hh | 10 ++++++++--
+ 1 files changed, 8 insertions(+), 2 deletions(-)
+
+commit fa2673c1ee954ddbbfbfca7cced7b839d7776fc0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Mar 7 15:52:02 2012 -0500
+
+ More Unicode script age annotation, and a couple more RTL scripts
+
+ Cross-checked with Mark Davis's spreadsheet at http://goo.gl/x9ilM
+
+ src/hb-common.cc | 8 ++++++++
+ src/hb-common.h | 52
+ +++++++++++++++++++++++++++++-----------------------
+ 2 files changed, 37 insertions(+), 23 deletions(-)
+
+commit 6d4016f1ba48d409800dc3281b93e5cd58c99d9f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Mar 7 15:33:14 2012 -0500
+
+ Make src tests pass again
+
+ src/gen-arabic-table.py | 11 ++++++-----
+ src/gen-indic-table.py | 9 +++++----
+ src/hb-ot-shape-complex-arabic-table.hh | 6 ++++++
+ src/hb-ot-shape-complex-indic-table.hh | 4 ++++
+ 4 files changed, 21 insertions(+), 9 deletions(-)
+
+commit 7da435f08cc406080a5ee9b1ab5351db6a93acae
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Mar 7 15:20:20 2012 -0500
+
+ Separate Unicode 3.1 and Unicode 3.2 additions
+
+ src/hb-common.h | 14 +++++++++-----
+ 1 files changed, 9 insertions(+), 5 deletions(-)
+
+commit f91136cb528e298651c4a8a8a1d6dc54136e09ce
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Mar 7 12:56:22 2012 -0500
+
+ Route three Unicode 6.1 scripts through Indic shaper
+
+ src/hb-ot-shape-complex-private.hh | 7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+commit f32c0012ad794cd2df669dfc7b0438fafbe38b2d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Mar 7 12:53:34 2012 -0500
+
+ Add Unicode 6.1.0 scripts
+
+ src/hb-common.h | 9 +++++++++
+ src/hb-glib.cc | 11 ++++++++++-
+ 2 files changed, 19 insertions(+), 1 deletions(-)
+
+commit 50e810cd0e55c25fddb0a2fd0861c51fbf65700e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Mar 7 12:49:08 2012 -0500
+
+ Lydian and Kharoshthi are right-to-left
+
+ src/hb-common.cc | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit a52835635e4a2a12715aff2febb561515a10cd5a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Mar 7 12:38:39 2012 -0500
+
+ Whitespace
+
+ src/hb-common.h | 194
+ +++++++++++++++++++++++++++---------------------------
+ 1 files changed, 97 insertions(+), 97 deletions(-)
+
+commit 183224684a45d7dcd7d28510d4383a7a7cb3dff3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Mar 7 12:21:28 2012 -0500
+
+ Use generic shaper for Buhid
+
+ As requested by Jonathan Kew.
+
+ We need to devise a better mechanism to choose which scripts to
+ pass through the Indic shaper. Moreover, currently we are storing
+ data for some scripts in the Indic shaper that are not even going
+ through that shaper. Need to find a better way...
+
+ src/hb-ot-shape-complex-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit cdc8b491a8e7cec5082ca2ad0346c1f41fdd5c92
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Mar 7 12:08:33 2012 -0500
+
+ Update Indic table to Unicode 6.1 data
+
+ src/Makefile.am | 15 +++
+ src/gen-indic-table.py | 20 ++--
+ src/hb-ot-shape-complex-arabic-table.hh | 35 ------
+ src/hb-ot-shape-complex-indic-table.hh | 178
+ +++++++++++++++++++------------
+ 4 files changed, 134 insertions(+), 114 deletions(-)
+
+commit e3b2e077f549b04779c08a9fedb1f35b9f11075c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Mar 7 10:21:24 2012 -0500
+
+ Typo
+
+ src/hb-ot-shape-normalize.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit c346671b6b9b05fa51b95c16212eb29ac69510fa
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Mar 6 20:47:50 2012 -0500
+
+ Minor doc fixes
+
+ src/hb-ot-shape-normalize.cc | 10 ++++++----
+ 1 files changed, 6 insertions(+), 4 deletions(-)
+
+commit 406044986a68676f3050f9350ccc448c615fc685
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Mar 6 20:24:31 2012 -0500
+
+ Add Hebrew diacritics test cases
+
+ From:
+ https://bugzilla.mozilla.org/show_bug.cgi?id=662055
+
+ test/shaping/texts/in-tree/shaper-default/MANIFEST | 1 +
+ .../in-tree/shaper-default/script-hebrew/MANIFEST | 1 +
+ .../shaper-default/script-hebrew/misc/MANIFEST | 1 +
+ .../script-hebrew/misc/diacritics.txt | 15 +++++++++++++++
+ 4 files changed, 18 insertions(+), 0 deletions(-)
+
+commit 461b9b6347e4f58589f5be82c40a2df61da2c715
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Mar 1 18:11:19 2012 -0800
+
+ Fix cluster formation in Indic
+
+ Makes number of failures against Uniscribe with hi_IN dictionary from
+ OO.o to go down from 6334 to 4290. Not bad for a one-line change!
+
+ Mozilla Bug 729626 - ASAN: heap-buffer-overflow HTML
+
+ src/hb-ot-shape-complex-indic-machine.rl | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit bc71ad4973842f25216b48842a46d6c9cbce6aa3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Mar 1 17:30:29 2012 -0800
+
+ Fix atomic-int op on Apple
+
+ The OSAtomicAdd32Barrier operator returns the new value, we want the
+ old value.
+
+ src/hb-blob.cc | 2 +-
+ src/hb-object-private.hh | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit a1970d9afc15b2c6b7513b923019bb223bd95154
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Feb 24 13:51:09 2012 -0500
+
+ Add support for atomic int and mutex on Apple systems
+
+ So, apparently there's no atomic int 'get' method on Apple.
+ You have to
+ add(0) to get. And that's not const-friendly. So switch inert-object
+ checking to a non-atomic get. This, however, is safe, and a
+ negligible
+ performance boost too.
+
+ src/hb-mutex-private.hh | 14 +++++++++-----
+ src/hb-object-private.hh | 15 ++++++++++-----
+ 2 files changed, 19 insertions(+), 10 deletions(-)
+
+commit 8004429102d7d3a8c42e1cbfe231835de4d3d782
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Feb 23 18:47:17 2012 -0500
+
+ Remove unused hb_atomic_int_set()
+
+ Apparently it can't be implemented on OS X. We weren't using
+ it anyway.
+
+ src/hb-object-private.hh | 4 ----
+ 1 files changed, 0 insertions(+), 4 deletions(-)
+
+commit 45227c10e416894ba7f84fdf72d849cecdb9b898
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Feb 23 19:47:43 2012 -0500
+
+ Add hb-warning.cc. Oops!
+
+ src/hb-warning.cc | 53
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 53 insertions(+), 0 deletions(-)
+
+commit bd7ff1dec5b92ee59fa060e793f88499adcd8c11
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Feb 23 15:06:16 2012 -0500
+
+ Allow disabling multi-threaded support
+
+ By defining HB_NO_MT.
+
+ Also, only warn once per missing MT feature support.
+
+ Mozilla Bug 666661 - gfx/harfbuzz/src/hb-prive.h - compiler warnings
+ on mac
+
+ src/Makefile.am | 1 +
+ src/hb-mutex-private.hh | 6 +++---
+ src/hb-object-private.hh | 11 +++--------
+ 3 files changed, 7 insertions(+), 11 deletions(-)
+
+commit 634c9e3423a9c23793400d1f56e98070e00b6056
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Feb 22 16:43:21 2012 -0500
+
+ Minor
+
+ src/hb-ot-shape-private.hh | 69
+ +++++++++++++++++++++++++-------------------
+ 1 files changed, 39 insertions(+), 30 deletions(-)
+
+commit 514b6f88668da4eab85103c536dabe24b7bc457b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Feb 22 16:34:37 2012 -0500
+
+ Followup: Reorder Hebrew combining classes for better rendering
+
+ Patch from Jonathan Kew.
+
+ Bug 662055 - advanced Hebrew diacritics are shown correctly only in
+ particular order.
+
+ src/hb-ot-shape-private.hh | 20 ++++++++++----------
+ 1 files changed, 10 insertions(+), 10 deletions(-)
+
+commit 6e78607ea71e3e5306f88f227ddba76133d16ed0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Feb 22 16:31:15 2012 -0500
+
+ Reorder Hebrew combining classes for better rendering
+
+ Patch from Jonathan Kew.
+
+ Bug 662055 - advanced Hebrew diacritics are shown correctly only in
+ particular order
+
+ src/hb-ot-shape-private.hh | 28 ++++++++++++++++++++++++++++
+ 1 files changed, 28 insertions(+), 0 deletions(-)
+
+commit 7a70ca78e06c676befe1ae17199fff1f000f8188
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Feb 21 11:31:47 2012 -0500
+
+ Add test case from https://bugzilla.mozilla.org/show_bug.cgi?id=714067
+
+ .../shaper-arabic/script-arabic/misc/MANIFEST | 1 +
+ .../script-arabic/misc/ligature-diacritics.txt | 1 +
+ 2 files changed, 2 insertions(+), 0 deletions(-)
+
+commit f51e167436a51b890ffe3f7f7920498fa287acd9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jan 30 09:48:33 2012 -0500
+
+ Minor error handling
+
+ util/options.cc | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+commit bee74efbdebc4e46ce57daa8a88bcf06b13411fe
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 27 02:14:08 2012 -0500
+
+ Update git.mk to new upstream
+
+ git.mk | 44 +++++++++++++++++++++++++++++++++-----------
+ 1 files changed, 33 insertions(+), 11 deletions(-)
+
+commit 134aa7bc7e3f9b9de76c9de2ed4b7344a7b323f9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 27 02:09:40 2012 -0500
+
+ Make checks more OS X friendly
+
+ src/check-internal-symbols.sh | 21 +++++++++++++--------
+ src/check-libstdc++.sh | 21 +++++++++++++--------
+ 2 files changed, 26 insertions(+), 16 deletions(-)
+
+commit 6152199368399bf98368ea3c794fa760b49756ba
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 27 01:57:59 2012 -0500
+
+ Fix check-header-guards on OS X
+
+ src/check-header-guards.sh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit c62e41b6aad1fc56225d0e53d6d4abd0f005fe3b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 27 02:20:58 2012 -0500
+
+ Minor
+
+ configure.ac | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 1a5a91dc0d8bf4b72a2f22dc6300b06ad7000b79
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jan 22 19:57:00 2012 -0500
+
+ Add a few more tests
+
+ .../indic/script-devanagari/misc/misc.txt | 3 +++
+ .../south-east-asian/script-thai/misc/misc.txt | 9 +++++++++
+ 2 files changed, 12 insertions(+), 0 deletions(-)
+
+commit 1795f3a222a85cdf80c78a0e9181d23dd1673876
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jan 22 19:29:45 2012 -0500
+
+ Add a couple Thai test cases from Thep
+
+ .../in-tree/shaper-indic/south-east-asian/MANIFEST | 1 +
+ .../south-east-asian/script-thai/MANIFEST | 1 +
+ .../south-east-asian/script-thai/misc/MANIFEST | 1 +
+ .../south-east-asian/script-thai/misc/misc.txt | 2 ++
+ 4 files changed, 5 insertions(+), 0 deletions(-)
+
+commit ec3f506682fc6e2d7d7455e49d6c82ac9dd0c660
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jan 22 19:10:55 2012 -0500
+
+ Add Devanagari test from Tom Hacohen
+
+ .../indic/script-devanagari/misc/misc.txt | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 71be4ca3dd5eaaca31957e34fef11f6aeb4aebdf
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jan 22 16:26:49 2012 -0500
+
+ Also ignore "ChangeLog" in manifests
+
+ test/shaping/hb_test_tools.py | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3c9a39ecd65990f2c7b29bb741c6a538fa425531
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jan 22 16:21:19 2012 -0500
+
+ Remove newline
+
+ test/shaping/hb_test_tools.py | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit e4ccbfe276db5ed098ddcf78a7bb8f2da4263128
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jan 22 16:07:32 2012 -0500
+
+ Allow --color=html in hb-diff
+
+ Not that useful right now as we don't escape < and >. Perhaps
+ another tool can be added to convert the ANSI output to HTML.
+
+ test/shaping/hb-diff | 2 +-
+ test/shaping/hb_test_tools.py | 22 +++++++++++++++++-----
+ 2 files changed, 18 insertions(+), 6 deletions(-)
+
+commit 71632c96daa4ba15e13f4d9e7f2c121d0162614e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jan 22 15:31:44 2012 -0500
+
+ Fallback to Latin script if the font has no other usable scripts
+
+ Patch and description from Jonathan Kew:
+
+ It turns out that some legacy Thai fonts provide OpenType substitution
+ features to implement mark positioning, but (incorrectly) put those
+ features/lookups under the 'latn' script tag instead of using 'thai'
+ (or
+ possibly 'DFLT'). See
+ https://bugzilla.mozilla.org/show_bug.cgi?id=719366 for an example and
+ more detailed description.
+
+ Although this is really a font bug, I suggest that we could improve
+ the
+ rendering of such fonts by looking for the 'latn' as a fallback if
+ neither the requested script nor "default" is found in
+ hb_ot_layout_table_choose_script. Suggested patch against harfbuzz
+ master is attached.
+
+ This does _not_ affect the other kind of legacy Thai font, where
+ custom
+ code to support vendor-specific PUA codepoints would be needed. I'm
+ not
+ keen to go down that path; IMO, such fonts should be ruthlessly
+ stamped
+ out in favour of standards-based solutions. :)
+
+ JK
+
+ src/hb-ot-layout.cc | 9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+commit 8f80f93491be73f05eba908591c856339acda51e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jan 21 20:03:25 2012 -0500
+
+ More shoveling around
+
+ test/shaping/hb-diff-filter-failures | 2 +-
+ test/shaping/hb-manifest-read | 2 +-
+ test/shaping/hb_test_tools.py | 27 ++++++++++++++++-----------
+ 3 files changed, 18 insertions(+), 13 deletions(-)
+
+commit c78c6e9844a23144ce7fa29afbf57b74587bfcd0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jan 21 19:55:16 2012 -0500
+
+ Cleanup
+
+ test/shaping/hb-manifest-read | 2 +-
+ test/shaping/hb_test_tools.py | 13 ++++++++-----
+ 2 files changed, 9 insertions(+), 6 deletions(-)
+
+commit ab94a9c542f7ec9143335b73493ccb75d4586a3a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jan 21 19:43:58 2012 -0500
+
+ Distribute testing tools
+
+ test/shaping/Makefile.am | 24 ++++++++++++++++++++++++
+ 1 files changed, 24 insertions(+), 0 deletions(-)
+
+commit 3e86feb54c94e46b60168fd2a4773183eb1354b4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jan 21 19:40:30 2012 -0500
+
+ Speed up colorless diff
+
+ test/shaping/hb_test_tools.py | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 1e58df603457cb4b57da78b5d4a8df66aa7d7be4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jan 21 19:37:31 2012 -0500
+
+ Cleanup manifest code
+
+ test/shaping/hb_test_tools.py | 18 ++++++++++++------
+ 1 files changed, 12 insertions(+), 6 deletions(-)
+
+commit 956d552e108eeb50bb3ad21588830af7a2f3862a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jan 21 19:31:51 2012 -0500
+
+ Port hb-manifest-update to Python
+
+ test/shaping/hb-manifest-update | 23 +++--------------------
+ test/shaping/hb_test_tools.py | 38
+ ++++++++++++++++++++++++++++++--------
+ 2 files changed, 33 insertions(+), 28 deletions(-)
+
+commit 3a34e9e351ed0ee3eb27f9c0f154bc227f1226bf
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jan 21 19:15:41 2012 -0500
+
+ Ignore Broken Pipe errors
+
+ test/shaping/hb_test_tools.py | 76
+ ++++++++++++++++++++++++++---------------
+ 1 files changed, 48 insertions(+), 28 deletions(-)
+
+commit d5300241680844f5625f32792f7dd7181ed05f9b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jan 21 19:07:22 2012 -0500
+
+ [util] Make clusters work with char offset instead of UTF-8 offset
+
+ This means the --features indices also refer to char position
+ instead of byte position now. Same for cluster values reported
+ by hb-shape.
+
+ Will add an option for byte indices later.
+
+ util/options.cc | 7 +++++--
+ util/options.hh | 12 ++++++++++++
+ 2 files changed, 17 insertions(+), 2 deletions(-)
+
+commit 0f68f4a0b5ee78cbdb2a89a9a1a9125afe72ed2f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jan 21 18:59:48 2012 -0500
+
+ Correctly print out Unicode strings
+
+ util/options.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f22089ac24f43ff048c2a0f1c1f604ae3a96be8b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 21:21:47 2012 -0500
+
+ Misc fixes
+
+ test/shaping/hb-diff | 8 ++++----
+ test/shaping/hb_test_tools.py | 4 ++--
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 96968bfae5ce61a0a098bf0e6acd2210a309a499
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 21:16:34 2012 -0500
+
+ Port hb-manifest-read to Python
+
+ test/shaping/hb-diff-filter-failures | 2 +-
+ test/shaping/hb-manifest-read | 37 ++-----------------------
+ test/shaping/hb_test_tools.py | 49
+ ++++++++++++++++++++++++++++++---
+ 3 files changed, 48 insertions(+), 40 deletions(-)
+
+commit a59ed46fa4f7b76605f8ce6e75783ead406468f5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 20:56:32 2012 -0500
+
+ Add final residues from test-shape-complex
+
+ .../in-tree/shaper-arabic/script-nko/misc/MANIFEST | 1 +
+ .../in-tree/shaper-arabic/script-nko/misc/misc.txt | 5 +++++
+ test/shaping/texts/in-tree/shaper-default/MANIFEST | 1 +
+ .../shaper-default/script-linear-b/MANIFEST | 1 +
+ .../shaper-default/script-linear-b/misc/MANIFEST | 1 +
+ .../shaper-default/script-linear-b/misc/misc.txt | 1 +
+ test/shaping/texts/in-tree/shaper-indic/MANIFEST | 1 +
+ .../in-tree/shaper-indic/south-east-asian/MANIFEST | 1 +
+ .../south-east-asian/script-khmer/MANIFEST | 1 +
+ .../south-east-asian/script-khmer/misc/MANIFEST | 1 +
+ .../south-east-asian/script-khmer/misc/misc.txt | 9 +++++++++
+ 11 files changed, 23 insertions(+), 0 deletions(-)
+
+commit 820e0ed318d9b187a131baa9491d5d390ec33ef4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 20:51:52 2012 -0500
+
+ Add Punjabi tests from test-shape-complex also
+
+ .../indic/script-punjabi/misc/MANIFEST | 1 +
+ .../indic/script-punjabi/misc/misc.txt | 1 +
+ 2 files changed, 2 insertions(+), 0 deletions(-)
+
+commit a7d71c105772fb612871b4cae59bdae47bbc8751
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 20:50:09 2012 -0500
+
+ Add Tamil test data from Muguntharaj Subramanian
+
+ .../shaper-indic/indic/script-tamil/misc/MANIFEST | 1 +
+ .../shaper-indic/indic/script-tamil/misc/misc.txt | 43
+ ++++++++++++++++++++
+ 2 files changed, 44 insertions(+), 0 deletions(-)
+
+commit 5992a9941e7f19181df1e34e79e514ccedc3d284
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 20:48:14 2012 -0500
+
+ Import test data from late test-shape-complex
+
+ .../in-tree/shaper-arabic/script-arabic/MANIFEST | 1 +
+ .../in-tree/shaper-arabic/script-mandaic/MANIFEST | 1 +
+ .../shaper-arabic/script-mongolian/MANIFEST | 1 +
+ .../in-tree/shaper-arabic/script-nko/MANIFEST | 1 +
+ .../in-tree/shaper-arabic/script-syriac/MANIFEST | 1 +
+ .../shaper-indic/indic/script-assamese/MANIFEST | 1 +
+ .../shaper-indic/indic/script-bengali/MANIFEST | 1 +
+ .../indic/script-bengali/misc/MANIFEST | 1 +
+ .../indic/script-bengali/misc/misc.txt | 48
+ ++++++++++++++++++++
+ .../shaper-indic/indic/script-devanagari/MANIFEST | 1 +
+ .../indic/script-devanagari/misc/MANIFEST | 1 +
+ .../indic/script-devanagari/misc/misc.txt | 23 +++++++++
+ .../shaper-indic/indic/script-gujarati/MANIFEST | 1 +
+ .../shaper-indic/indic/script-kannada/MANIFEST | 1 +
+ .../indic/script-kannada/misc/MANIFEST | 1 +
+ .../indic/script-kannada/misc/misc.txt | 17 +++++++
+ .../shaper-indic/indic/script-malayalam/MANIFEST | 1 +
+ .../indic/script-malayalam/misc/MANIFEST | 1 +
+ .../indic/script-malayalam/misc/misc.txt | 22 +++++++++
+ .../shaper-indic/indic/script-oriya/MANIFEST | 1 +
+ .../shaper-indic/indic/script-oriya/misc/MANIFEST | 1 +
+ .../shaper-indic/indic/script-oriya/misc/misc.txt | 28 +++++++++++
+ .../shaper-indic/indic/script-punjabi/MANIFEST | 1 +
+ .../shaper-indic/indic/script-sinhala/MANIFEST | 1 +
+ .../indic/script-sinhala/misc/MANIFEST | 1 +
+ .../indic/script-sinhala/misc/misc.txt | 6 +++
+ .../shaper-indic/indic/script-tamil/MANIFEST | 1 +
+ .../shaper-indic/indic/script-telugu/MANIFEST | 1 +
+ .../shaper-indic/indic/script-telugu/misc/MANIFEST | 1 +
+ .../shaper-indic/indic/script-telugu/misc/misc.txt | 11 +++++
+ 30 files changed, 178 insertions(+), 0 deletions(-)
+
+commit 46ac45647760984c6220f04ba4521038e628b169
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 19:32:17 2012 -0500
+
+ Fix Unicode encoding issue
+
+ test/shaping/hb_test_tools.py | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit ad34e39a4a320310b1edd9fc4d7e740373510c69
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 18:39:27 2012 -0500
+
+ Make test tools interactive
+
+ By bypassing readlines() buffering.
+
+ test/shaping/hb_test_tools.py | 33 +++++++++++++++++++++++++++------
+ 1 files changed, 27 insertions(+), 6 deletions(-)
+
+commit 91540a7d97051a3d6e97fdcd1e98af23e0780cdd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 18:27:52 2012 -0500
+
+ Move most testing logic into hb_test_tools.py
+
+ The actual utils are one-liners now.
+
+ test/shaping/hb-diff | 77 ++-------------
+ test/shaping/hb-diff-filter-failures | 27 +-----
+ test/shaping/hb-unicode-decode | 18 +---
+ test/shaping/hb-unicode-encode | 21 +----
+ test/shaping/hb-unicode-prettyname | 53 +----------
+ test/shaping/hb_test_tools.py | 180
+ ++++++++++++++++++++++++++++++++++
+ 6 files changed, 197 insertions(+), 179 deletions(-)
+
+commit 66aa080033dcff07b8bb5e7b1f0e3511f067d6c1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 17:36:10 2012 -0500
+
+ Remove test-shape-complex
+
+ New shaping testsuite and framework coming.
+
+ test/api/Makefile.am | 6 -
+ test/api/test-shape-complex.c | 1237
+ ------------------------------------
+ test/shaping/hb-unicode-prettyname | 1 +
+ 3 files changed, 1 insertions(+), 1243 deletions(-)
+
+commit ed459bfb63c58b59fc0dbe25021c396e8ef8683c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 17:24:05 2012 -0500
+
+ Add hb-unicode-encode
+
+ test/shaping/hb-unicode-encode | 22 ++++++++++++++++++++++
+ 1 files changed, 22 insertions(+), 0 deletions(-)
+
+commit d8134bc017ca3383e0978ddee57070eb3aab8964
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 17:18:59 2012 -0500
+
+ [hb-shape] Add parantheses around --show-text output
+
+ util/options.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit b12c4d43614199f8910a06507603f6c431d9df67
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 17:17:44 2012 -0500
+
+ Add hb-diff-filter-failures
+
+ test/shaping/hb-diff-filter-failures | 28 ++++++++++++++++++++++++++++
+ 1 files changed, 28 insertions(+), 0 deletions(-)
+
+commit d4bffbc55bf4c23ab5c7f46af613aeecc79ac515
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 17:16:35 2012 -0500
+
+ Move
+
+ test/shaping/texts/MANIFEST | 4 +-
+ test/shaping/texts/in-tree/MANIFEST | 3 +
+ test/shaping/texts/in-tree/shaper-arabic/MANIFEST | 5 +
+ test/shaping/texts/in-tree/shaper-indic/MANIFEST | 1 +
+ .../texts/in-tree/shaper-indic/indic/MANIFEST | 11 +
+ .../shaper-indic/indic/script-assamese/MANIFEST | 1 +
+ .../indic/script-assamese/utrrs/LICENSE | 19 +
+ .../indic/script-assamese/utrrs/MANIFEST | 3 +
+ .../indic/script-assamese/utrrs/README | 13 +
+ .../indic/script-assamese/utrrs/SOURCES | 2 +
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 4 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 40 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 10 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 11 +
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 6 +
+ .../indic/script-assamese/utrrs/codepoint/MANIFEST | 7 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 59 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 131 ++
+ .../indic/script-assamese/utrrs/gpos/MANIFEST | 2 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 139 ++
+ .../indic/script-assamese/utrrs/gsub/MANIFEST | 1 +
+ .../shaper-indic/indic/script-bengali/MANIFEST | 1 +
+ .../indic/script-bengali/utrrs/LICENSE | 19 +
+ .../indic/script-bengali/utrrs/MANIFEST | 3 +
+ .../shaper-indic/indic/script-bengali/utrrs/README | 13 +
+ .../indic/script-bengali/utrrs/SOURCES | 2 +
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 1 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 36 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 10 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 12 +
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 6 +
+ .../indic/script-bengali/utrrs/codepoint/MANIFEST | 7 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 58 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 119 ++
+ .../indic/script-bengali/utrrs/gpos/MANIFEST | 2 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 215 +++
+ .../indic/script-bengali/utrrs/gsub/MANIFEST | 1 +
+ .../shaper-indic/indic/script-devanagari/MANIFEST | 1 +
+ .../indic/script-devanagari/utrrs/LICENSE | 19 +
+ .../indic/script-devanagari/utrrs/MANIFEST | 3 +
+ .../indic/script-devanagari/utrrs/README | 13 +
+ .../indic/script-devanagari/utrrs/SOURCES | 2 +
+ ...icFontFeatureCodepoint-AdditionalConsonants.txt | 8 +
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 4 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 45 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 14 +
+ ...tFeatureCodepoint-DevnagariSpecificAddition.txt | 1 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ ...ndicFontFeatureCodepoint-GenericPunctuation.txt | 2 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 16 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 10 +
+ .../script-devanagari/utrrs/codepoint/MANIFEST | 9 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 185 +++
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 185 +++
+ .../indic/script-devanagari/utrrs/gpos/MANIFEST | 2 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 1367
+ ++++++++++++++++++++
+ .../indic/script-devanagari/utrrs/gsub/MANIFEST | 1 +
+ .../shaper-indic/indic/script-gujarati/MANIFEST | 1 +
+ .../indic/script-gujarati/utrrs/LICENSE | 19 +
+ .../indic/script-gujarati/utrrs/MANIFEST | 3 +
+ .../indic/script-gujarati/utrrs/README | 13 +
+ .../indic/script-gujarati/utrrs/SOURCES | 2 +
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 1 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 34 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 12 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 13 +
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 7 +
+ .../indic/script-gujarati/utrrs/codepoint/MANIFEST | 7 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 170 +++
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 170 +++
+ .../indic/script-gujarati/utrrs/gpos/MANIFEST | 2 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 1156
+ +++++++++++++++++
+ .../indic/script-gujarati/utrrs/gsub/MANIFEST | 1 +
+ .../shaper-indic/indic/script-kannada/MANIFEST | 1 +
+ .../indic/script-kannada/utrrs/LICENSE | 19 +
+ .../indic/script-kannada/utrrs/MANIFEST | 3 +
+ .../shaper-indic/indic/script-kannada/utrrs/README | 13 +
+ .../indic/script-kannada/utrrs/SOURCES | 2 +
+ ...icFontFeatureCodepoint-AdditionalConsonants.txt | 1 +
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 4 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 40 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 13 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 14 +
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 9 +
+ .../indic/script-kannada/utrrs/codepoint/MANIFEST | 8 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 188 +++
+ .../indic/script-kannada/utrrs/gpos/MANIFEST | 1 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 306 +++++
+ .../indic/script-kannada/utrrs/gsub/MANIFEST | 1 +
+ .../shaper-indic/indic/script-malayalam/MANIFEST | 1 +
+ .../indic/script-malayalam/utrrs/LICENSE | 19 +
+ .../indic/script-malayalam/utrrs/MANIFEST | 2 +
+ .../indic/script-malayalam/utrrs/README | 13 +
+ .../indic/script-malayalam/utrrs/SOURCES | 2 +
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 2 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 36 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 12 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 14 +
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 4 +
+ .../script-malayalam/utrrs/codepoint/MANIFEST | 7 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 254 ++++
+ .../indic/script-malayalam/utrrs/gsub/MANIFEST | 1 +
+ .../shaper-indic/indic/script-oriya/MANIFEST | 1 +
+ .../shaper-indic/indic/script-oriya/utrrs/LICENSE | 19 +
+ .../shaper-indic/indic/script-oriya/utrrs/MANIFEST | 2 +
+ .../shaper-indic/indic/script-oriya/utrrs/README | 13 +
+ .../shaper-indic/indic/script-oriya/utrrs/SOURCES | 2 +
+ ...icFontFeatureCodepoint-AdditionalConsonants.txt | 3 +
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 2 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 34 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 12 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 12 +
+ .../IndicFontFeatureCodepoint-OriyaSpecific.txt | 2 +
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 8 +
+ .../indic/script-oriya/utrrs/codepoint/MANIFEST | 9 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 170 +++
+ .../indic/script-oriya/utrrs/gsub/MANIFEST | 1 +
+ .../shaper-indic/indic/script-punjabi/MANIFEST | 1 +
+ .../indic/script-punjabi/utrrs/LICENSE | 19 +
+ .../indic/script-punjabi/utrrs/MANIFEST | 3 +
+ .../shaper-indic/indic/script-punjabi/utrrs/README | 13 +
+ .../indic/script-punjabi/utrrs/SOURCES | 2 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 38 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 9 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ .../IndicFontFeatureCodepoint-GurmukhiSpecific.txt | 6 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 10 +
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 6 +
+ .../indic/script-punjabi/utrrs/codepoint/MANIFEST | 7 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 22 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 2 +
+ .../indic/script-punjabi/utrrs/gpos/MANIFEST | 2 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 152 +++
+ .../indic/script-punjabi/utrrs/gsub/MANIFEST | 1 +
+ .../shaper-indic/indic/script-sinhala/MANIFEST | 1 +
+ .../indic/script-sinhala/utrrs/LICENSE | 19 +
+ .../indic/script-sinhala/utrrs/MANIFEST | 3 +
+ .../shaper-indic/indic/script-sinhala/utrrs/README | 13 +
+ .../indic/script-sinhala/utrrs/SOURCES | 2 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 41 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 17 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 18 +
+ .../IndicFontFeatureCodepoint-Punctuation.txt | 1 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 3 +
+ .../indic/script-sinhala/utrrs/codepoint/MANIFEST | 5 +
+ .../utrrs/gpos/IndicFontFeatureGPOS.txt | 162 +++
+ .../indic/script-sinhala/utrrs/gpos/MANIFEST | 1 +
+ .../utrrs/gsub/IndicFontFeatureGSUB-Conjunct.txt | 1 +
+ .../gsub/IndicFontFeatureGSUB-Rakaaraansaya.txt | 41 +
+ .../utrrs/gsub/IndicFontFeatureGSUB-Repaya.txt | 42 +
+ .../gsub/IndicFontFeatureGSUB-Special-Cases.txt | 2 +
+ .../gsub/IndicFontFeatureGSUB-TouchingLetters.txt | 1 +
+ .../utrrs/gsub/IndicFontFeatureGSUB-Yansaya.txt | 41 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 1 +
+ .../indic/script-sinhala/utrrs/gsub/MANIFEST | 7 +
+ .../shaper-indic/indic/script-tamil/MANIFEST | 1 +
+ .../shaper-indic/indic/script-tamil/utrrs/LICENSE | 19 +
+ .../shaper-indic/indic/script-tamil/utrrs/MANIFEST | 3 +
+ .../shaper-indic/indic/script-tamil/utrrs/README | 13 +
+ .../shaper-indic/indic/script-tamil/utrrs/SOURCES | 2 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 23 +
+ .../IndicFontFeatureCodepoint-CurrencySymbols.txt | 1 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 11 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 12 +
+ .../IndicFontFeatureCodepoint-Numerics.txt | 3 +
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 +
+ .../IndicFontFeatureCodepoint-Symbols.txt | 6 +
+ .../IndicFontFeatureCodepoint-TamilSymbol.txt | 1 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 4 +
+ .../indic/script-tamil/utrrs/codepoint/MANIFEST | 10 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 64 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 44 +
+ .../indic/script-tamil/utrrs/gpos/MANIFEST | 2 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 4 +
+ .../indic/script-tamil/utrrs/gsub/MANIFEST | 1 +
+ .../shaper-indic/indic/script-telugu/MANIFEST | 1 +
+ .../shaper-indic/indic/script-telugu/utrrs/LICENSE | 19 +
+ .../indic/script-telugu/utrrs/MANIFEST | 3 +
+ .../shaper-indic/indic/script-telugu/utrrs/README | 13 +
+ .../shaper-indic/indic/script-telugu/utrrs/SOURCES | 2 +
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 2 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 38 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 13 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 14 +
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 6 +
+ .../indic/script-telugu/utrrs/codepoint/MANIFEST | 7 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 385 ++++++
+ .../indic/script-telugu/utrrs/gpos/MANIFEST | 1 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 287 ++++
+ .../indic/script-telugu/utrrs/gsub/MANIFEST | 1 +
+ test/shaping/texts/shaper-arabic/MANIFEST | 5 -
+ test/shaping/texts/shaper-indic/MANIFEST | 1 -
+ test/shaping/texts/shaper-indic/indic/MANIFEST | 11 -
+ .../shaper-indic/indic/script-assamese/MANIFEST | 1 -
+ .../indic/script-assamese/utrrs/LICENSE | 19 -
+ .../indic/script-assamese/utrrs/MANIFEST | 3 -
+ .../indic/script-assamese/utrrs/README | 13 -
+ .../indic/script-assamese/utrrs/SOURCES | 2 -
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 4 -
+ .../IndicFontFeatureCodepoint-Consonants.txt | 40 -
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 10 -
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 -
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 11 -
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 -
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 6 -
+ .../indic/script-assamese/utrrs/codepoint/MANIFEST | 7 -
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 59 -
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 131 --
+ .../indic/script-assamese/utrrs/gpos/MANIFEST | 2 -
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 139 --
+ .../indic/script-assamese/utrrs/gsub/MANIFEST | 1 -
+ .../shaper-indic/indic/script-bengali/MANIFEST | 1 -
+ .../indic/script-bengali/utrrs/LICENSE | 19 -
+ .../indic/script-bengali/utrrs/MANIFEST | 3 -
+ .../shaper-indic/indic/script-bengali/utrrs/README | 13 -
+ .../indic/script-bengali/utrrs/SOURCES | 2 -
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 1 -
+ .../IndicFontFeatureCodepoint-Consonants.txt | 36 -
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 10 -
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 -
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 12 -
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 -
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 6 -
+ .../indic/script-bengali/utrrs/codepoint/MANIFEST | 7 -
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 58 -
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 119 --
+ .../indic/script-bengali/utrrs/gpos/MANIFEST | 2 -
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 215 ---
+ .../indic/script-bengali/utrrs/gsub/MANIFEST | 1 -
+ .../shaper-indic/indic/script-devanagari/MANIFEST | 1 -
+ .../indic/script-devanagari/utrrs/LICENSE | 19 -
+ .../indic/script-devanagari/utrrs/MANIFEST | 3 -
+ .../indic/script-devanagari/utrrs/README | 13 -
+ .../indic/script-devanagari/utrrs/SOURCES | 2 -
+ ...icFontFeatureCodepoint-AdditionalConsonants.txt | 8 -
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 4 -
+ .../IndicFontFeatureCodepoint-Consonants.txt | 45 -
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 14 -
+ ...tFeatureCodepoint-DevnagariSpecificAddition.txt | 1 -
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 -
+ ...ndicFontFeatureCodepoint-GenericPunctuation.txt | 2 -
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 16 -
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 10 -
+ .../script-devanagari/utrrs/codepoint/MANIFEST | 9 -
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 185 ---
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 185 ---
+ .../indic/script-devanagari/utrrs/gpos/MANIFEST | 2 -
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 1367
+ --------------------
+ .../indic/script-devanagari/utrrs/gsub/MANIFEST | 1 -
+ .../shaper-indic/indic/script-gujarati/MANIFEST | 1 -
+ .../indic/script-gujarati/utrrs/LICENSE | 19 -
+ .../indic/script-gujarati/utrrs/MANIFEST | 3 -
+ .../indic/script-gujarati/utrrs/README | 13 -
+ .../indic/script-gujarati/utrrs/SOURCES | 2 -
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 1 -
+ .../IndicFontFeatureCodepoint-Consonants.txt | 34 -
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 12 -
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 -
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 13 -
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 -
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 7 -
+ .../indic/script-gujarati/utrrs/codepoint/MANIFEST | 7 -
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 170 ---
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 170 ---
+ .../indic/script-gujarati/utrrs/gpos/MANIFEST | 2 -
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 1156
+ -----------------
+ .../indic/script-gujarati/utrrs/gsub/MANIFEST | 1 -
+ .../shaper-indic/indic/script-kannada/MANIFEST | 1 -
+ .../indic/script-kannada/utrrs/LICENSE | 19 -
+ .../indic/script-kannada/utrrs/MANIFEST | 3 -
+ .../shaper-indic/indic/script-kannada/utrrs/README | 13 -
+ .../indic/script-kannada/utrrs/SOURCES | 2 -
+ ...icFontFeatureCodepoint-AdditionalConsonants.txt | 1 -
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 4 -
+ .../IndicFontFeatureCodepoint-Consonants.txt | 40 -
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 13 -
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 -
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 14 -
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 -
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 9 -
+ .../indic/script-kannada/utrrs/codepoint/MANIFEST | 8 -
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 188 ---
+ .../indic/script-kannada/utrrs/gpos/MANIFEST | 1 -
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 306 -----
+ .../indic/script-kannada/utrrs/gsub/MANIFEST | 1 -
+ .../shaper-indic/indic/script-malayalam/MANIFEST | 1 -
+ .../indic/script-malayalam/utrrs/LICENSE | 19 -
+ .../indic/script-malayalam/utrrs/MANIFEST | 2 -
+ .../indic/script-malayalam/utrrs/README | 13 -
+ .../indic/script-malayalam/utrrs/SOURCES | 2 -
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 2 -
+ .../IndicFontFeatureCodepoint-Consonants.txt | 36 -
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 12 -
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 -
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 14 -
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 -
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 4 -
+ .../script-malayalam/utrrs/codepoint/MANIFEST | 7 -
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 254 ----
+ .../indic/script-malayalam/utrrs/gsub/MANIFEST | 1 -
+ .../texts/shaper-indic/indic/script-oriya/MANIFEST | 1 -
+ .../shaper-indic/indic/script-oriya/utrrs/LICENSE | 19 -
+ .../shaper-indic/indic/script-oriya/utrrs/MANIFEST | 2 -
+ .../shaper-indic/indic/script-oriya/utrrs/README | 13 -
+ .../shaper-indic/indic/script-oriya/utrrs/SOURCES | 2 -
+ ...icFontFeatureCodepoint-AdditionalConsonants.txt | 3 -
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 2 -
+ .../IndicFontFeatureCodepoint-Consonants.txt | 34 -
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 12 -
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 -
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 12 -
+ .../IndicFontFeatureCodepoint-OriyaSpecific.txt | 2 -
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 -
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 8 -
+ .../indic/script-oriya/utrrs/codepoint/MANIFEST | 9 -
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 170 ---
+ .../indic/script-oriya/utrrs/gsub/MANIFEST | 1 -
+ .../shaper-indic/indic/script-punjabi/MANIFEST | 1 -
+ .../indic/script-punjabi/utrrs/LICENSE | 19 -
+ .../indic/script-punjabi/utrrs/MANIFEST | 3 -
+ .../shaper-indic/indic/script-punjabi/utrrs/README | 13 -
+ .../indic/script-punjabi/utrrs/SOURCES | 2 -
+ .../IndicFontFeatureCodepoint-Consonants.txt | 38 -
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 9 -
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 -
+ .../IndicFontFeatureCodepoint-GurmukhiSpecific.txt | 6 -
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 10 -
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 -
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 6 -
+ .../indic/script-punjabi/utrrs/codepoint/MANIFEST | 7 -
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 22 -
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 2 -
+ .../indic/script-punjabi/utrrs/gpos/MANIFEST | 2 -
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 152 ---
+ .../indic/script-punjabi/utrrs/gsub/MANIFEST | 1 -
+ .../shaper-indic/indic/script-sinhala/MANIFEST | 1 -
+ .../indic/script-sinhala/utrrs/LICENSE | 19 -
+ .../indic/script-sinhala/utrrs/MANIFEST | 3 -
+ .../shaper-indic/indic/script-sinhala/utrrs/README | 13 -
+ .../indic/script-sinhala/utrrs/SOURCES | 2 -
+ .../IndicFontFeatureCodepoint-Consonants.txt | 41 -
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 17 -
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 18 -
+ .../IndicFontFeatureCodepoint-Punctuation.txt | 1 -
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 3 -
+ .../indic/script-sinhala/utrrs/codepoint/MANIFEST | 5 -
+ .../utrrs/gpos/IndicFontFeatureGPOS.txt | 162 ---
+ .../indic/script-sinhala/utrrs/gpos/MANIFEST | 1 -
+ .../utrrs/gsub/IndicFontFeatureGSUB-Conjunct.txt | 1 -
+ .../gsub/IndicFontFeatureGSUB-Rakaaraansaya.txt | 41 -
+ .../utrrs/gsub/IndicFontFeatureGSUB-Repaya.txt | 42 -
+ .../gsub/IndicFontFeatureGSUB-Special-Cases.txt | 2 -
+ .../gsub/IndicFontFeatureGSUB-TouchingLetters.txt | 1 -
+ .../utrrs/gsub/IndicFontFeatureGSUB-Yansaya.txt | 41 -
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 1 -
+ .../indic/script-sinhala/utrrs/gsub/MANIFEST | 7 -
+ .../texts/shaper-indic/indic/script-tamil/MANIFEST | 1 -
+ .../shaper-indic/indic/script-tamil/utrrs/LICENSE | 19 -
+ .../shaper-indic/indic/script-tamil/utrrs/MANIFEST | 3 -
+ .../shaper-indic/indic/script-tamil/utrrs/README | 13 -
+ .../shaper-indic/indic/script-tamil/utrrs/SOURCES | 2 -
+ .../IndicFontFeatureCodepoint-Consonants.txt | 23 -
+ .../IndicFontFeatureCodepoint-CurrencySymbols.txt | 1 -
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 11 -
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 -
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 12 -
+ .../IndicFontFeatureCodepoint-Numerics.txt | 3 -
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 -
+ .../IndicFontFeatureCodepoint-Symbols.txt | 6 -
+ .../IndicFontFeatureCodepoint-TamilSymbol.txt | 1 -
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 4 -
+ .../indic/script-tamil/utrrs/codepoint/MANIFEST | 10 -
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 64 -
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 44 -
+ .../indic/script-tamil/utrrs/gpos/MANIFEST | 2 -
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 4 -
+ .../indic/script-tamil/utrrs/gsub/MANIFEST | 1 -
+ .../shaper-indic/indic/script-telugu/MANIFEST | 1 -
+ .../shaper-indic/indic/script-telugu/utrrs/LICENSE | 19 -
+ .../indic/script-telugu/utrrs/MANIFEST | 3 -
+ .../shaper-indic/indic/script-telugu/utrrs/README | 13 -
+ .../shaper-indic/indic/script-telugu/utrrs/SOURCES | 2 -
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 2 -
+ .../IndicFontFeatureCodepoint-Consonants.txt | 38 -
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 13 -
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 -
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 14 -
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 -
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 6 -
+ .../indic/script-telugu/utrrs/codepoint/MANIFEST | 7 -
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 385 ------
+ .../indic/script-telugu/utrrs/gpos/MANIFEST | 1 -
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 287 ----
+ .../indic/script-telugu/utrrs/gsub/MANIFEST | 1 -
+ 410 files changed, 7601 insertions(+), 7600 deletions(-)
+
+commit 45f640c98d752161e51eda63061d70fad9ab9f68
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 14:24:21 2012 -0500
+
+ Minor
+
+ test/shaping/hb-diff | 35 ++++++++++++++++++++---------------
+ 1 files changed, 20 insertions(+), 15 deletions(-)
+
+commit 47ca766a9cbdfb304f60e23a4dee0a155075a277
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 14:21:53 2012 -0500
+
+ Minor
+
+ test/shaping/hb-unicode-decode | 2 +-
+ test/shaping/hb-unicode-prettyname | 5 ++---
+ 2 files changed, 3 insertions(+), 4 deletions(-)
+
+commit 8f1db07894674b02c36ca9352e666b4618ee8832
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 13:57:57 2012 -0500
+
+ [test/shaping] Add some Indic test data for the new test suite
+
+ Imported from UTRRS.
+
+ test/shaping/texts/shaper-indic/indic/MANIFEST | 2 +-
+ .../shaper-indic/indic/script-assamese/MANIFEST | 1 +
+ .../indic/script-assamese/utrrs/LICENSE | 19 +
+ .../indic/script-assamese/utrrs/MANIFEST | 3 +
+ .../indic/script-assamese/utrrs/README | 13 +
+ .../indic/script-assamese/utrrs/SOURCES | 2 +
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 4 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 40 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 10 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 11 +
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 6 +
+ .../indic/script-assamese/utrrs/codepoint/MANIFEST | 7 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 59 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 131 ++
+ .../indic/script-assamese/utrrs/gpos/MANIFEST | 2 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 139 ++
+ .../indic/script-assamese/utrrs/gsub/MANIFEST | 1 +
+ .../shaper-indic/indic/script-bengali/MANIFEST | 1 +
+ .../indic/script-bengali/utrrs/LICENSE | 19 +
+ .../indic/script-bengali/utrrs/MANIFEST | 3 +
+ .../shaper-indic/indic/script-bengali/utrrs/README | 13 +
+ .../indic/script-bengali/utrrs/SOURCES | 2 +
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 1 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 36 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 10 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 12 +
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 6 +
+ .../indic/script-bengali/utrrs/codepoint/MANIFEST | 7 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 58 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 119 ++
+ .../indic/script-bengali/utrrs/gpos/MANIFEST | 2 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 215 +++
+ .../indic/script-bengali/utrrs/gsub/MANIFEST | 1 +
+ .../shaper-indic/indic/script-devanagari/MANIFEST | 1 +
+ .../indic/script-devanagari/utrrs/LICENSE | 19 +
+ .../indic/script-devanagari/utrrs/MANIFEST | 3 +
+ .../indic/script-devanagari/utrrs/README | 13 +
+ .../indic/script-devanagari/utrrs/SOURCES | 2 +
+ ...icFontFeatureCodepoint-AdditionalConsonants.txt | 8 +
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 4 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 45 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 14 +
+ ...tFeatureCodepoint-DevnagariSpecificAddition.txt | 1 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ ...ndicFontFeatureCodepoint-GenericPunctuation.txt | 2 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 16 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 10 +
+ .../script-devanagari/utrrs/codepoint/MANIFEST | 9 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 185 +++
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 185 +++
+ .../indic/script-devanagari/utrrs/gpos/MANIFEST | 2 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 1367
+ ++++++++++++++++++++
+ .../indic/script-devanagari/utrrs/gsub/MANIFEST | 1 +
+ .../shaper-indic/indic/script-gujarati/MANIFEST | 1 +
+ .../indic/script-gujarati/utrrs/LICENSE | 19 +
+ .../indic/script-gujarati/utrrs/MANIFEST | 3 +
+ .../indic/script-gujarati/utrrs/README | 13 +
+ .../indic/script-gujarati/utrrs/SOURCES | 2 +
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 1 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 34 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 12 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 13 +
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 7 +
+ .../indic/script-gujarati/utrrs/codepoint/MANIFEST | 7 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 170 +++
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 170 +++
+ .../indic/script-gujarati/utrrs/gpos/MANIFEST | 2 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 1156
+ +++++++++++++++++
+ .../indic/script-gujarati/utrrs/gsub/MANIFEST | 1 +
+ .../shaper-indic/indic/script-kannada/MANIFEST | 1 +
+ .../indic/script-kannada/utrrs/LICENSE | 19 +
+ .../indic/script-kannada/utrrs/MANIFEST | 3 +
+ .../shaper-indic/indic/script-kannada/utrrs/README | 13 +
+ .../indic/script-kannada/utrrs/SOURCES | 2 +
+ ...icFontFeatureCodepoint-AdditionalConsonants.txt | 1 +
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 4 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 40 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 13 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 14 +
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 9 +
+ .../indic/script-kannada/utrrs/codepoint/MANIFEST | 8 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 188 +++
+ .../indic/script-kannada/utrrs/gpos/MANIFEST | 1 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 306 +++++
+ .../indic/script-kannada/utrrs/gsub/MANIFEST | 1 +
+ .../shaper-indic/indic/script-malayalam/MANIFEST | 1 +
+ .../indic/script-malayalam/utrrs/LICENSE | 19 +
+ .../indic/script-malayalam/utrrs/MANIFEST | 2 +
+ .../indic/script-malayalam/utrrs/README | 13 +
+ .../indic/script-malayalam/utrrs/SOURCES | 2 +
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 2 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 36 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 12 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 14 +
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 4 +
+ .../script-malayalam/utrrs/codepoint/MANIFEST | 7 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 254 ++++
+ .../indic/script-malayalam/utrrs/gsub/MANIFEST | 1 +
+ .../texts/shaper-indic/indic/script-oriya/MANIFEST | 1 +
+ .../shaper-indic/indic/script-oriya/utrrs/LICENSE | 19 +
+ .../shaper-indic/indic/script-oriya/utrrs/MANIFEST | 2 +
+ .../shaper-indic/indic/script-oriya/utrrs/README | 13 +
+ .../shaper-indic/indic/script-oriya/utrrs/SOURCES | 2 +
+ ...icFontFeatureCodepoint-AdditionalConsonants.txt | 3 +
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 2 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 34 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 12 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 12 +
+ .../IndicFontFeatureCodepoint-OriyaSpecific.txt | 2 +
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 8 +
+ .../indic/script-oriya/utrrs/codepoint/MANIFEST | 9 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 170 +++
+ .../indic/script-oriya/utrrs/gsub/MANIFEST | 1 +
+ .../shaper-indic/indic/script-punjabi/MANIFEST | 1 +
+ .../indic/script-punjabi/utrrs/LICENSE | 19 +
+ .../indic/script-punjabi/utrrs/MANIFEST | 3 +
+ .../shaper-indic/indic/script-punjabi/utrrs/README | 13 +
+ .../indic/script-punjabi/utrrs/SOURCES | 2 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 38 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 9 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ .../IndicFontFeatureCodepoint-GurmukhiSpecific.txt | 6 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 10 +
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 6 +
+ .../indic/script-punjabi/utrrs/codepoint/MANIFEST | 7 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 22 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 2 +
+ .../indic/script-punjabi/utrrs/gpos/MANIFEST | 2 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 152 +++
+ .../indic/script-punjabi/utrrs/gsub/MANIFEST | 1 +
+ .../shaper-indic/indic/script-sinhala/MANIFEST | 1 +
+ .../indic/script-sinhala/utrrs/LICENSE | 19 +
+ .../indic/script-sinhala/utrrs/MANIFEST | 3 +
+ .../shaper-indic/indic/script-sinhala/utrrs/README | 13 +
+ .../indic/script-sinhala/utrrs/SOURCES | 2 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 41 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 17 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 18 +
+ .../IndicFontFeatureCodepoint-Punctuation.txt | 1 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 3 +
+ .../indic/script-sinhala/utrrs/codepoint/MANIFEST | 5 +
+ .../utrrs/gpos/IndicFontFeatureGPOS.txt | 162 +++
+ .../indic/script-sinhala/utrrs/gpos/MANIFEST | 1 +
+ .../utrrs/gsub/IndicFontFeatureGSUB-Conjunct.txt | 1 +
+ .../gsub/IndicFontFeatureGSUB-Rakaaraansaya.txt | 41 +
+ .../utrrs/gsub/IndicFontFeatureGSUB-Repaya.txt | 42 +
+ .../gsub/IndicFontFeatureGSUB-Special-Cases.txt | 2 +
+ .../gsub/IndicFontFeatureGSUB-TouchingLetters.txt | 1 +
+ .../utrrs/gsub/IndicFontFeatureGSUB-Yansaya.txt | 41 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 1 +
+ .../indic/script-sinhala/utrrs/gsub/MANIFEST | 7 +
+ .../texts/shaper-indic/indic/script-tamil/MANIFEST | 1 +
+ .../shaper-indic/indic/script-tamil/utrrs/LICENSE | 19 +
+ .../shaper-indic/indic/script-tamil/utrrs/MANIFEST | 3 +
+ .../shaper-indic/indic/script-tamil/utrrs/README | 13 +
+ .../shaper-indic/indic/script-tamil/utrrs/SOURCES | 2 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 23 +
+ .../IndicFontFeatureCodepoint-CurrencySymbols.txt | 1 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 11 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 12 +
+ .../IndicFontFeatureCodepoint-Numerics.txt | 3 +
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 +
+ .../IndicFontFeatureCodepoint-Symbols.txt | 6 +
+ .../IndicFontFeatureCodepoint-TamilSymbol.txt | 1 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 4 +
+ .../indic/script-tamil/utrrs/codepoint/MANIFEST | 10 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 64 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 44 +
+ .../indic/script-tamil/utrrs/gpos/MANIFEST | 2 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 4 +
+ .../indic/script-tamil/utrrs/gsub/MANIFEST | 1 +
+ .../shaper-indic/indic/script-telugu/MANIFEST | 1 +
+ .../shaper-indic/indic/script-telugu/utrrs/LICENSE | 19 +
+ .../indic/script-telugu/utrrs/MANIFEST | 3 +
+ .../shaper-indic/indic/script-telugu/utrrs/README | 13 +
+ .../shaper-indic/indic/script-telugu/utrrs/SOURCES | 2 +
+ .../IndicFontFeatureCodepoint-AdditionalVowels.txt | 2 +
+ .../IndicFontFeatureCodepoint-Consonants.txt | 38 +
+ .../IndicFontFeatureCodepoint-DependentVowels.txt | 13 +
+ .../codepoint/IndicFontFeatureCodepoint-Digits.txt | 10 +
+ ...IndicFontFeatureCodepoint-IndependentVowels.txt | 14 +
+ .../IndicFontFeatureCodepoint-Reserved.txt | 2 +
+ .../IndicFontFeatureCodepoint-VariousSigns.txt | 6 +
+ .../indic/script-telugu/utrrs/codepoint/MANIFEST | 7 +
+ .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 385 ++++++
+ .../indic/script-telugu/utrrs/gpos/MANIFEST | 1 +
+ .../utrrs/gsub/IndicFontFeatureGSUB.txt | 287 ++++
+ .../indic/script-telugu/utrrs/gsub/MANIFEST | 1 +
+ 202 files changed, 7581 insertions(+), 1 deletions(-)
+
+commit 11267aef364b1cc5683ce65aaf544b7f2a127fb3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 13:57:14 2012 -0500
+
+ Fix
+
+ test/shaping/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4e84ce48d5d41cf1bad2fb8774e5c66745b0e75e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 13:50:55 2012 -0500
+
+ Move hb-diff to test/shaping/
+
+ test/shaping/hb-diff | 70
+ ++++++++++++++++++++++++++++++++++++++++++++++++++
+ util/Makefile.am | 2 -
+ util/hb-diff | 70
+ --------------------------------------------------
+ 3 files changed, 70 insertions(+), 72 deletions(-)
+
+commit f868e1b84d2f73688d4d6558d44610b1ac75ec13
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 13:50:05 2012 -0500
+
+ Add hb-unicode-decode
+
+ test/shaping/hb-manifest-read | 36
+ ++++++++++++++++++++++++++++++++++++
+ test/shaping/hb-manifest-update | 22 ++++++++++++++++++++++
+ test/shaping/hb-read-manifest | 36
+ ------------------------------------
+ test/shaping/hb-unicode-decode | 19 +++++++++++++++++++
+ test/shaping/hb-update-manifests | 22 ----------------------
+ 5 files changed, 77 insertions(+), 58 deletions(-)
+
+commit 9ab23ef4749b51e60464b9ef2a92739cdc2b36ba
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 13:49:56 2012 -0500
+
+ Minor
+
+ test/shaping/hb-unicode-prettyname | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit c8d81db03335192f20f08ab8fabe9869fd7350a2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 13:39:27 2012 -0500
+
+ Recognize more characters
+
+ test/shaping/hb-unicode-prettyname | 7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 0016d4662d486fa32c2191df801a2792f44b273c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jan 20 13:31:59 2012 -0500
+
+ [test] Make hb-unicode-prettyname take a --stdin option
+
+ test/shaping/hb-unicode-prettyname | 15 +++++++++------
+ 1 files changed, 9 insertions(+), 6 deletions(-)
+
+commit ad8c6446f2e0d21d065203924467f6a2c418401e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 19 20:28:31 2012 -0500
+
+ [test/shaping] Add hb-unicode-prettyname
+
+ test/shaping/hb-unicode-prettyname | 38
+ ++++++++++++++++++++++++++++++++++++
+ 1 files changed, 38 insertions(+), 0 deletions(-)
+
+commit e900869b0f373d25b72d966338beb6cbc53e6446
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 19 20:28:15 2012 -0500
+
+ [test/shaping] Add hb-read-manifest
+
+ test/shaping/hb-read-manifest | 36 ++++++++++++++++++++++++++++++++++++
+ 1 files changed, 36 insertions(+), 0 deletions(-)
+
+commit a211cd3ffce3aa100e92d837384bbaa9decf6b09
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 19 20:27:53 2012 -0500
+
+ Ignore AUTHORS also
+
+ test/shaping/hb-update-manifests | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit c91c4fa47140c0d6191241a832fc534b1c1514ce
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 19 17:51:57 2012 -0500
+
+ [hb-shape] Change glyphstring brackets from </> to [/]
+
+ Sorry for the disruption but I need this to differentiate from the
+ Unicode string.
+
+ util/options.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 36fe87d1b4bf8317074a597501d1ee52c0bec38d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 19 16:55:26 2012 -0500
+
+ More Indic tests from Pravin
+
+ test/api/test-shape-complex.c | 48
+ +++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 48 insertions(+), 0 deletions(-)
+
+commit a33e46cf7d9862856fd7ecb04e047cc58a9785c8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 19 15:43:48 2012 -0500
+
+ [test/shaping] Add hb-update-manifests
+
+ test/shaping/Makefile.am | 6 ++----
+ test/shaping/hb-update-manifests | 22
+ ++++++++++++++++++++++
+ test/shaping/texts/shaper-indic/indic/MANIFEST | 1 +
+ 3 files changed, 25 insertions(+), 4 deletions(-)
+
+commit d4de562adf691425b15e3e9c0eec035feaa60413
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 19 15:21:04 2012 -0500
+
+ Start adding new shaping test suite together
+
+ configure.ac | 1 +
+ test/Makefile.am | 2 +-
+ test/shaping/Makefile.am | 10 ++++++++++
+ test/shaping/texts/MANIFEST | 3 +++
+ test/shaping/texts/shaper-arabic/MANIFEST | 5 +++++
+ test/shaping/texts/shaper-indic/MANIFEST | 1 +
+ test/shaping/texts/shaper-indic/indic/MANIFEST | 10 ++++++++++
+ 7 files changed, 31 insertions(+), 1 deletions(-)
+
+commit 7a4a848db27d1605195f677c9c8632cde558aa05
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 19 15:15:21 2012 -0500
+
+ Minor
+
+ src/hb-ot-shape-complex-private.hh | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 4d6dafd47f4271549e528d2e8047d50562aef399
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 19 14:52:02 2012 -0500
+
+ Rename test/ to test/api/
+
+ configure.ac | 1 +
+ test/Makefile.am | 128 +-----
+ test/api/Makefile.am | 131 +++++
+ test/api/hb-test.h | 265 +++++++++
+ test/api/test-blob.c | 301 +++++++++++
+ test/api/test-buffer.c | 783 +++++++++++++++++++++++++++
+ test/api/test-c.c | 58 ++
+ test/api/test-common.c | 213 ++++++++
+ test/api/test-cplusplus.cc | 30 +
+ test/api/test-font.c | 502 +++++++++++++++++
+ test/api/test-object.c | 367 +++++++++++++
+ test/api/test-ot-tag.c | 241 +++++++++
+ test/api/test-shape-complex.c | 1189
+ +++++++++++++++++++++++++++++++++++++++++
+ test/api/test-shape.c | 165 ++++++
+ test/api/test-unicode.c | 887 ++++++++++++++++++++++++++++++
+ test/api/test-version.c | 80 +++
+ test/hb-test.h | 265 ---------
+ test/test-blob.c | 301 -----------
+ test/test-buffer.c | 783 ---------------------------
+ test/test-c.c | 58 --
+ test/test-common.c | 213 --------
+ test/test-cplusplus.cc | 30 -
+ test/test-font.c | 502 -----------------
+ test/test-object.c | 367 -------------
+ test/test-ot-tag.c | 241 ---------
+ test/test-shape-complex.c | 1189
+ -----------------------------------------
+ test/test-shape.c | 165 ------
+ test/test-unicode.c | 887 ------------------------------
+ test/test-version.c | 80 ---
+ 29 files changed, 5214 insertions(+), 5208 deletions(-)
+
+commit 3b5c22c39b87155f315853fb0c40edcf14e99b54
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 19 14:28:11 2012 -0500
+
+ Remove src/test.cc
+
+ Not really useful.
+
+ src/Makefile.am | 6 +--
+ src/test.cc | 132
+ -------------------------------------------------------
+ 2 files changed, 1 insertions(+), 137 deletions(-)
+
+commit 4983feebbbb25e79201bf34035e4d58e61218758
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 19 13:54:52 2012 -0500
+
+ [hb-diff] Clean up
+
+ util/hb-diff | 41 ++++++++++++++++++++++++++---------------
+ 1 files changed, 26 insertions(+), 15 deletions(-)
+
+commit cdc673d97c5ffedb386865a81f54a5cedcbad27c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 19 12:46:18 2012 -0500
+
+ [hb-shape] Add --show-line-num
+
+ Ok, much more useful as a test suite driver now.
+
+ util/hb-shape.cc | 24 +++++-------------------
+ util/options.cc | 34 ++++++++++++++++++++++++++++++++++
+ util/options.hh | 25 ++++++++++++++++++++-----
+ 3 files changed, 59 insertions(+), 24 deletions(-)
+
+commit cc4d9810d6318ca2e4de3b8d62f03b51cc21ee05
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 19 12:32:20 2012 -0500
+
+ [hb-shape] Add --show-text and --show-unicode options
+
+ util/hb-shape.cc | 19 ++++++++++++++++++-
+ util/options.cc | 26 +++++++++++++++++++++++---
+ util/options.hh | 12 +++++++++---
+ 3 files changed, 50 insertions(+), 7 deletions(-)
+
+commit 27c36af411c7c4d75dd25d79fc76dd92c6bb9643
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 19 12:30:43 2012 -0500
+
+ Fix OOB in hb-shape
+
+ util/options.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 8d2781d69274672303e30522e222bd01c6b5e781
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 19 11:36:39 2012 -0500
+
+ [test] Add two Indic test cases from Bernard Massot
+
+ test/test-shape-complex.c | 16 ++++++++++++++++
+ 1 files changed, 16 insertions(+), 0 deletions(-)
+
+commit 8750abaf8410005facbea8c886c592bead7f959b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jan 18 22:47:44 2012 -0500
+
+ [util] Add --help-features
+
+ Patch from Khaled Hosny.
+
+ util/options.cc | 42 +++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 41 insertions(+), 1 deletions(-)
+
+commit 889caa52fa1bef61013ec1d127f84d7d5907ef1e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jan 18 22:32:52 2012 -0500
+
+ [icu] Use U_FAILURE
+
+ src/hb-icu.cc | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 36a4f4a482456ee816dcb59befa0b0538ba487df
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jan 18 22:16:49 2012 -0500
+
+ Replace u_strlen() with u_countChar32()
+
+ The latter is what I meant.
+
+ src/hb-icu.cc | 8 +++-----
+ 1 files changed, 3 insertions(+), 5 deletions(-)
+
+commit 055fb24d03ae518fa0aa6c2860a03f3cb6a5ef0d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jan 18 21:58:34 2012 -0500
+
+ Add test for bug in ICU decompose
+
+ As reported by Kenichi Ishibashi on 2011-10-28.
+
+ test/test-unicode.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit c521e793bd6c1dafacb94253a45b9c70ab38525e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jan 18 21:51:05 2012 -0500
+
+ Fix OOB in replace_glyph()
+
+ Patch from Kenichi Ishibashi.
+
+ src/hb-buffer.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 03408ce73d003ed4e58e3f8472f9445e72b86bee
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jan 18 21:28:34 2012 -0500
+
+ Fix more possible buffer overruns
+
+ I have this function, but can't clean up it to my satisfaction.
+
+ src/hb-ot-layout-gsubgpos-private.hh | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 7d479900cd11bc88148cd601ee43bc5492ce5843
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jan 18 21:19:32 2012 -0500
+
+ Refactor the two remaining uses of _hb_ot_layout_skip_mark()
+
+ src/hb-ot-layout-gsub-table.hh | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 7 +++++--
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+commit 506ffeb8e77a668fa305139582d215c32e46bb03
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jan 18 16:07:53 2012 -0500
+
+ Further mark skippy fixes from Jonathan Kew
+
+ We should be in good shape now.
+
+ src/hb-ot-layout-gsubgpos-private.hh | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit a4a48fe6d4f884a37e720430347d10dbe3562a79
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jan 17 18:08:41 2012 -0500
+
+ Fix mark skipping regression
+
+ Ouch!
+
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4ab97311541225906f6b737a2b47de252224cc09
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jan 16 22:05:08 2012 -0500
+
+ Refactor mark skipping
+
+ src/hb-ot-layout-gpos-table.hh | 95 ++++++++++----------------
+ src/hb-ot-layout-gsub-table.hh | 21 +++---
+ src/hb-ot-layout-gsubgpos-private.hh | 125
+ ++++++++++++++++++++++++++--------
+ 3 files changed, 143 insertions(+), 98 deletions(-)
+
+commit 370f03e9c69d98d735eafb7e72b13b17f42cbaa9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jan 16 17:03:55 2012 -0500
+
+ Minor
+
+ src/hb-ot-layout-gsub-table.hh | 5 ++---
+ src/hb-ot-layout-gsubgpos-private.hh | 6 ++----
+ 2 files changed, 4 insertions(+), 7 deletions(-)
+
+commit 4d3aeb8cb2bc1ca7cdd03ba28ba8c334f12d4c03
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jan 16 16:43:26 2012 -0500
+
+ [GSUB/GPOS] Fix mark skip indexing issues
+
+ Mozilla bug 701637 and 714067 combined.
+
+ Patch from Jonathan Kew.
+
+ src/hb-ot-layout-gpos-table.hh | 42
+ ++++++++++++++++----------------
+ src/hb-ot-layout-gsub-table.hh | 21 ++++++++-------
+ src/hb-ot-layout-gsubgpos-private.hh | 45
+ ++++++++++++++++-----------------
+ 3 files changed, 54 insertions(+), 54 deletions(-)
+
+commit e8eedf2687f05372bf5476e84139d01ba67c9f73
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jan 16 16:39:40 2012 -0500
+
+ Avoid enum trailing commas
+
+ Based on patch from Jonathan Kew.
+
+ src/hb-ot-shape-complex-indic.cc | 4 ++--
+ src/hb-ot-shape-complex-private.hh | 2 ++
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 3d0ddd12801689b4093ffca97da4dd9ca669b64a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jan 15 15:55:52 2012 -0500
+
+ Require glib >= 2.16 for the gobject option
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 95ab82a992ab916046c2e6205db7cadeec88d206
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jan 15 14:56:56 2012 -0500
+
+ Disable gtk-doc macro
+
+ We don't have any docs yet.
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 299ae0c3a367c84a835eadbd1276ca284d2720c0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jan 14 21:29:45 2012 -0500
+
+ [icu] Remove glib-ism
+
+ src/hb-icu.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit a097043f9a81e6c20caf69a5dabdf9e00438d79b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jan 14 17:55:51 2012 -0500
+
+ Allow space in one more place when parsing features
+
+ util/options.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit af92135424b994062648f4fb7e26af0bd970a4b1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 21 09:18:43 2011 -0700
+
+ Minor
+
+ src/hb-object-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 89d89646e8163b6c0874b9a3c14d4da974ea8219
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Oct 17 11:50:54 2011 -0700
+
+ Fix intrin.h b0rkage with older MSVC
+
+ Reported by Jonathan Kew.
+
+ src/hb-object-private.hh | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+commit af913c5788e600e36d29f44fe4e77db84cf8c442
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Oct 17 11:39:28 2011 -0700
+
+ Fix infinite loop in normalization code with variation selectors
+
+ Reported by Jonathan Kew.
+
+ src/hb-ot-shape-normalize.cc | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit fd528c17b7b5ac912f1ac980e1d9981f561c3b46
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 12 15:03:58 2011 -0400
+
+ [util] Add --list-shapers to hb-view and hb-shape
+
+ util/options.cc | 17 ++++++++++++++++-
+ 1 files changed, 16 insertions(+), 1 deletions(-)
+
+commit a17554bfd51dc8a37b1674d1ede63e616618e0a6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Sep 28 16:57:34 2011 -0400
+
+ Make test-c.c actually use hb
+
+ This will make sure we test that C code can actually link to the
+ library.
+
+ test/test-c.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 55deff7595ef357d000fef83559c74c9f8acad00
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Sep 28 16:20:09 2011 -0400
+
+ Add comments
+
+ src/hb-ot-shape-normalize.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit a240d5a0a3ccc71902e7a341b6d531995319999d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Sep 27 13:50:45 2011 -0400
+
+ Add TODO item
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 52ebdff49d13f239efc886de935d47be9860f6e5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Sep 27 12:38:16 2011 -0400
+
+ Fix GSUB lookuptype 1 subtype 1 delta wrapping
+
+ src/hb-ot-layout-gsub-table.hh | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 5857720cd35078d1c3906c8b2db3190b5166b66f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Sep 27 12:36:26 2011 -0400
+
+ [util] s/%d/%u/ when printing glyph ids and clusters
+
+ util/options.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit b95324cdd217f44c40c5fd44898e659500f19511
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Sep 21 16:50:39 2011 -0400
+
+ Minor
+
+ src/hb-blob.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0cd33592ab4bb486ffc438ba0efdac2fa7a1bb7f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Sep 21 16:49:33 2011 -0400
+
+ Fix possible leaks
+
+ src/hb-font.cc | 16 +++++++++++++---
+ 1 files changed, 13 insertions(+), 3 deletions(-)
+
+commit d3f3690b485e1d240fec4f204aef54e07853a244
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Sep 21 16:41:43 2011 -0400
+
+ hb-shape: In --no-glyph-names, output glyph number directly
+
+ Ie. write "86" instead of "gid86".
+
+ util/options.cc | 11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+commit 088c1e27c0fc0cdef999cf1f567e4d5eb2cfb2e4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Sep 20 14:43:55 2011 -0400
+
+ [util] Fix option parsing
+
+ Wow, who knew bool is one byte and I was using it as a 4byte int?!
+
+ C++ auto casts fails you in mysterious ways...
+
+ util/helper-cairo.cc | 2 +-
+ util/options.cc | 3 ++-
+ util/options.hh | 14 +++++++-------
+ 3 files changed, 10 insertions(+), 9 deletions(-)
+
+commit d606daa4cca323c8977b2e52e6863dc0f1b72fa9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Sep 20 14:34:06 2011 -0400
+
+ Whitespace
+
+ src/gen-arabic-table.py | 2 +-
+ src/gen-indic-table.py | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit e700bce1189465a159a7c3c179f231be224f31cc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Sep 20 11:20:53 2011 -0400
+
+ [util] Add hb-diff
+
+ A diff program written in Python that is more suitable for comparing
+ hb-shape output from different backends. Main differences with stock
+ diff:
+
+ 1. It outputs one line's comparison at a time, as opposed to batching
+ '+' lines and '-' lines.
+
+ 2. It colors the part of the line that changed, taking word boundaries
+ into consideration.
+
+ You can pipe the colored output to 'less -r'.
+
+ util/Makefile.am | 2 +
+ util/hb-diff | 59
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 61 insertions(+), 0 deletions(-)
+
+commit 880c1f0e4ede65890592d28dfb38bb06f5b57500
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 19 23:10:22 2011 -0400
+
+ Rewrite ICU detection code with in-house macros
+
+ At least works for cross-compiling now...
+
+ configure.ac | 26 +++++++++++++++-----------
+ 1 files changed, 15 insertions(+), 11 deletions(-)
+
+commit f83f0f4836691b04306c2ef80979f2e1d76a2f28
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 19 18:51:48 2011 -0400
+
+ [graphite] Add note about graphite shaker brokenness
+
+ src/hb-graphite2.cc | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 422558142aabb996d8ad1848df7ea4d5a8ade98a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 19 17:57:02 2011 -0400
+
+ [util] Account for line-space in surface size
+
+ util/options.cc | 2 +-
+ util/options.hh | 1 -
+ util/view-cairo.cc | 2 +-
+ 3 files changed, 2 insertions(+), 3 deletions(-)
+
+commit b5afd8f78e6b372f1bbed469329c1554adb20eea
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 19 16:56:21 2011 -0400
+
+ [util] Rename --output to --output_file, and --format to
+ --output-format
+
+ util/options.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 0a965eee880428a43ad7f9d1317c344666247dd7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 19 16:53:47 2011 -0400
+
+ Minor
+
+ src/hb-ot-shape-complex-indic.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 466393c2f04fb5b3dcb3e81ea9609905fa8c9648
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 19 16:50:18 2011 -0400
+
+ Really fix build this time
+
+ util/hb-view.hh | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit fe1605db4f28ed75d5debe0db45a19aa77f0585f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 19 16:49:03 2011 -0400
+
+ Fix dist
+
+ util/Makefile.am | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 8b8b19056decaf09e4e0ccd9412ee1aeb30f4de7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 19 16:41:17 2011 -0400
+
+ [util] Add hb-shape utility
+
+ Like hb-view, but prints out buffer contents.
+
+ The output format is kinda cryptic. Suggestions welcome.
+
+ configure.ac | 6 -
+ util/Makefile.am | 44 ++++--
+ util/common.cc | 43 ------
+ util/common.hh | 57 --------
+ util/hb-shape.cc | 78 ++++++++++
+ util/hb-view.cc | 44 +------
+ util/hb-view.hh | 79 +++++++++++
+ util/helper-cairo.cc | 375
+ +++++++++++++++++++++++++++++++++++++++++++++++++
+ util/helper-cairo.hh | 79 +++++++++++
+ util/options.cc | 79 +++++++++++
+ util/options.hh | 53 +++++++-
+ util/view-cairo.cc | 381
+ ++------------------------------------------------
+ util/view-cairo.hh | 8 +-
+ 13 files changed, 785 insertions(+), 541 deletions(-)
+
+commit eb2d8be7a8ede0c0f5e346cf06516792f83f36f7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 19 16:15:22 2011 -0400
+
+ Minor
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit f6496663c2f6849a944e41afcf9511f378477532
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 19 15:45:52 2011 -0400
+
+ [util] If no text is provided, simply call cairo_show_glyphs()
+
+ util/view-cairo.cc | 92
+ +++++++++++++++++++++++++++++-----------------------
+ 1 files changed, 51 insertions(+), 41 deletions(-)
+
+commit 5c299343118d1eaff32ffb2a5dac077cfff67dee
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 19 14:53:26 2011 -0400
+
+ [uniscribe] Various improvements
+
+ src/hb-uniscribe.cc | 30 +++++++++++++++++++-----------
+ 1 files changed, 19 insertions(+), 11 deletions(-)
+
+commit 11e51993ab562d4c7460eb7c43d0e97404e628e7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 19 09:58:55 2011 -0400
+
+ [util] Move font-size into view-options
+
+ util/options.cc | 2 +-
+ util/options.hh | 7 +++----
+ util/view-cairo.cc | 4 ++--
+ 3 files changed, 6 insertions(+), 7 deletions(-)
+
+commit 0fe296019746689551d224a5f6fb7e0ebe1b91dc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Sep 17 09:59:58 2011 -0400
+
+ Fix Linux build when io.h is available
+
+ Bug 40953 - fail compile git: make[2]: *** [hb_view-options.o] Error 1
+
+ configure.ac | 2 +-
+ util/options.cc | 8 ++++----
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+commit d2b3ab9ecebbf46cb9dac1f09c17379c50ea4575
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Sep 16 16:59:17 2011 -0400
+
+ Fix "[util] Fix hb-view crash with bogus font."
+
+ util/view-cairo.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit da4a2a1426ee3aa9d9678ec12c9ba4dfcba0bcf8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Sep 16 16:56:34 2011 -0400
+
+ Cosmetic
+
+ util/view-cairo.cc | 31 +++++++++++++++++++++++--------
+ 1 files changed, 23 insertions(+), 8 deletions(-)
+
+commit 4274ed7ab6fb03fbf8eaaa43ab06647dc0beed79
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Sep 16 16:52:26 2011 -0400
+
+ [util] Fix hb-view crash with bogus font
+
+ util/view-cairo.cc | 8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 5ddd9cc499f2470eca239ae357a5c8a3626c0809
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Sep 16 16:40:44 2011 -0400
+
+ Minor
+
+ src/hb-private.hh | 2 +-
+ src/hb-unicode-private.hh | 4 ++--
+ src/test.cc | 4 ++--
+ util/common.hh | 2 +-
+ util/options.cc | 8 ++++----
+ 5 files changed, 10 insertions(+), 10 deletions(-)
+
+commit 652d64aa8d32d914bf3ee2f2c451de103fea8fa9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Sep 16 16:34:39 2011 -0400
+
+ TODO items
+
+ TODO | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 947c9a778c0d4b428b58806f98c34ede59b7439c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Sep 16 16:33:18 2011 -0400
+
+ Minor
+
+ src/hb-ot-shape-normalize.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit d5476a30a10da5e54783c8dbf04340225a9a00d7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Sep 16 12:30:50 2011 -0400
+
+ Minor
+
+ src/hb-object-private.hh | 26 +++++++++++++++-----------
+ 1 files changed, 15 insertions(+), 11 deletions(-)
+
+commit 55aeb0490454cc1ba93a42f307ed1230f59dee4b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Sep 16 02:08:36 2011 -0400
+
+ Fix reading text from stdin
+
+ util/options.cc | 76
+ ++++++++++++++++++++++++++++++++++------------------
+ util/options.hh | 16 +++++++----
+ util/view-cairo.cc | 6 +++-
+ 3 files changed, 64 insertions(+), 34 deletions(-)
+
+commit a75c1b125159f6cfb6b652a9ec40803f7c7e3f71
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Sep 16 01:16:41 2011 -0400
+
+ Move code around
+
+ util/options.cc | 27 +++++++++++++++++++++++++--
+ util/options.hh | 20 +-------------------
+ 2 files changed, 26 insertions(+), 21 deletions(-)
+
+commit 7bf6ecd3bfb1ccf5d9ac6fe274efa74b46885fea
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Sep 16 01:11:30 2011 -0400
+
+ Always shape at size=upem
+
+ Fixes bug with uniscribe not handling GIGANTIC sizes.
+
+ util/options.cc | 2 +-
+ util/view-cairo.cc | 8 ++++----
+ util/view-cairo.hh | 2 +-
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 674ee58d9bc9f825d769220d77f58513edae4558
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Sep 16 00:54:05 2011 -0400
+
+ Minor
+
+ util/options.cc | 4 +---
+ 1 files changed, 1 insertions(+), 3 deletions(-)
+
+commit 4451168e5d1ea26560899e9a9733b3a3f1853050
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Sep 16 00:38:19 2011 -0400
+
+ Fix binary stdin/stdout io in Windows
+
+ Make --font-file accept "-" to mean stdin, and have it work
+ in Windows too!
+
+ configure.ac | 2 +-
+ util/common.hh | 5 ++++
+ util/options.cc | 64
+ +++++++++++++++++++++++++++++++++++++++++++++---------
+ util/options.hh | 10 +++++++-
+ 4 files changed, 67 insertions(+), 14 deletions(-)
+
+commit 639b5957d9c7b6d8bef6784e3467ccc055ddeea4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Sep 15 18:09:49 2011 -0400
+
+ Minor
+
+ util/options.cc | 5 +++--
+ util/options.hh | 4 ++--
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+commit f7e2ef74f856ee13d6fd6cf3f1e04bc162203bc2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Sep 15 17:52:00 2011 -0400
+
+ [hb-view] Make print to stdout work in Windows
+
+ Apparently there's no equivalent to "/dev/stdout", so write using
+ stdio to be able to output to stdout.
+
+ util/common.hh | 1 +
+ util/options.hh | 31 ++++++++++++++++----
+ util/view-cairo.cc | 79
+ +++++++++++++++++++++++++++++++++++-----------------
+ 3 files changed, 78 insertions(+), 33 deletions(-)
+
+commit 36b10f58cc70ce9570d17b30616f9cb27423e03b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Sep 15 16:29:51 2011 -0400
+
+ Minor
+
+ src/hb-ot-shape-normalize.cc | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+commit c4611cb66f8e3a133ec00e3ace62ef19d9b95b28
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Sep 13 13:33:11 2011 -0400
+
+ Fix test
+
+ src/hb-graphite2.h | 1 +
+ src/hb-ot-shape.h | 1 +
+ src/hb-uniscribe.h | 1 +
+ 3 files changed, 3 insertions(+), 0 deletions(-)
+
+commit b9b10ad78b1f977494a3a42b58f8040fe16505a3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Sep 13 13:30:39 2011 -0400
+
+ [util] Refactor hb-view completely
+
+ Now we can use the same code to do other utils...
+
+ configure.ac | 2 +
+ util/Makefile.am | 2 +
+ util/common.cc | 7 +-
+ util/common.hh | 2 +-
+ util/hb-view.cc | 244 ++++-------------------------
+ util/options.cc | 321 +++++++++++++++++++++++++++-----------
+ util/options.hh | 179 +++++++++++++++++++---
+ util/view-cairo.cc | 440
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ util/view-cairo.hh | 63 ++++++++
+ 9 files changed, 927 insertions(+), 333 deletions(-)
+
+commit bc4b07b05ea9e39eb9f966eb2c3e1c737efa77ff
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Sep 8 17:08:32 2011 -0400
+
+ More reshuffling
+
+ util/hb-view.cc | 4 +-
+ util/options.cc | 64
+ +++++++++++++++++++++++++++++-------------------------
+ util/options.hh | 13 ++++++-----
+ 3 files changed, 43 insertions(+), 38 deletions(-)
+
+commit 516857eb51bbb79ff4adf44e3fefbf460f9ee8f8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Sep 8 16:50:24 2011 -0400
+
+ [util] Simplify more
+
+ util/options.hh | 9 +++------
+ 1 files changed, 3 insertions(+), 6 deletions(-)
+
+commit 4f4b114a5592c2f5d128ee795f159b438ad97829
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Sep 8 16:49:02 2011 -0400
+
+ [util] Move code around
+
+ util/hb-view.cc | 8 +-------
+ util/options.hh | 14 ++++++++++++++
+ 2 files changed, 15 insertions(+), 7 deletions(-)
+
+commit 46d86a73a103b061144018c3fe947b57548fc58f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Sep 8 16:43:15 2011 -0400
+
+ Minor
+
+ We now support using -1 for NUL-terminated strings.
+
+ util/hb-view.cc | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 90e312cb85df7a6dc350cb62138ab950790e3d15
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Sep 8 16:42:37 2011 -0400
+
+ [util] Move code around
+
+ util/hb-view.cc | 5 -----
+ util/options.hh | 4 ++++
+ 2 files changed, 4 insertions(+), 5 deletions(-)
+
+commit 109cb382898f491eed733dba4ef5ba12de94aaf6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Sep 8 16:00:04 2011 -0400
+
+ [util] Further refactor option parsing
+
+ util/options.cc | 80
+ ++++++++++++++++++++++++++++++++++++++++++++++---------
+ util/options.hh | 20 +++++++++++---
+ 2 files changed, 83 insertions(+), 17 deletions(-)
+
+commit bc187e5ac7433f5561b0e97e8c62172c73883f3f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Sep 8 13:35:17 2011 -0400
+
+ Refine Indic scripts, following Martin Hosken's recommendation
+
+ src/hb-ot-shape-complex-private.hh | 56
+ ++++++++++++++++++++++--------------
+ 1 files changed, 34 insertions(+), 22 deletions(-)
+
+commit 738d096a06822e63b3894bd817ecb90e5fb94f73
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Sep 2 13:31:19 2011 -0400
+
+ Pass through unknown ISO 639-3 language tags to OpenType engine
+
+ In hb_ot_tag_from_language(), if first component of an unknown
+ language is three letters long, use it directly as OpenType language
+ tag (after case conversion and padding).
+
+ src/hb-ot-tag.cc | 8 ++++++++
+ test/test-ot-tag.c | 5 +++++
+ 2 files changed, 13 insertions(+), 0 deletions(-)
+
+commit ea02cbf03c084b3ead6e9e4c9af07b3b47608d5b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Sep 2 12:39:20 2011 -0400
+
+ [graphite] Don't preload glyphs
+
+ Doesn't seem to be slower.
+
+ src/hb-graphite2.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 210a06f3d7bd2df55ebd1743da74f327c5a7a967
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 26 13:39:49 2011 +0200
+
+ Minor
+
+ src/hb-graphite2.h | 12 ++++++------
+ src/hb-ot-shape.h | 1 -
+ src/hb-uniscribe.h | 1 -
+ 3 files changed, 6 insertions(+), 8 deletions(-)
+
+commit 4a8d2e379a34b19bccc72bc3e2d9ace3fdd27733
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 26 09:40:54 2011 +0200
+
+ [graphite2] Chop a few more lines
+
+ src/hb-graphite2.cc | 13 ++++---------
+ 1 files changed, 4 insertions(+), 9 deletions(-)
+
+commit 81ec289da799bd2f50da9382507c606d2c779ab9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 26 09:33:06 2011 +0200
+
+ Minor
+
+ src/hb-graphite2.cc | 24 ++++++++++++------------
+ 1 files changed, 12 insertions(+), 12 deletions(-)
+
+commit 3380de5abbaff535e1cf57ea7e5c2a7c4fdcfe66
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 26 09:30:49 2011 +0200
+
+ [graphite] Use buffer->replace_glyphs()
+
+ src/hb-graphite2.cc | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit 9ebe8c0286856d46430ae184ba7303bd34485883
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 26 09:29:42 2011 +0200
+
+ Add buffer->replace_glyphs()
+
+ src/hb-buffer-private.hh | 3 +++
+ src/hb-buffer.cc | 26 ++++++++++++++++++++++++++
+ 2 files changed, 29 insertions(+), 0 deletions(-)
+
+commit a5edb1031c204464da4f852ba3d90e8cc20cd20e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 26 09:27:13 2011 +0200
+
+ Minor
+
+ src/hb-graphite2.cc | 9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+commit 290e3ee51727df75d136ccfff79831b94d1583b6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 26 09:25:04 2011 +0200
+
+ [graphite] Only pass the first part language tag to graphite
+
+ Still not sure about:
+
+ 1) Case. We pass lowercase for now. Would be nice if graphite was
+ uppercase 3letter like OpenType,
+
+ 2) Padding. IMO, tag padding is always with spaces, but Martin was
+ talking about NUL bytes.
+
+ src/hb-graphite2.cc | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 4c9fe88d30036340fe592bcbc375049b84602b8b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 26 09:18:53 2011 +0200
+
+ [API] Make all _from_string() functions take a len parameter
+
+ Can be -1 for NUL-terminated string. This is useful for passing parts
+ of a larger string to a function without having to copy or modify the
+ string first.
+
+ Affected functions:
+
+ hb_tag_t hb_tag_from_string()
+ hb_direction_from_string()
+ hb_language_from_string()
+ hb_script_from_string()
+
+ src/hb-common.cc | 29 ++++++++++++------
+ src/hb-common.h | 12 +++++--
+ src/hb-graphite2.cc | 2 +-
+ src/hb-icu.cc | 2 +-
+ src/hb-ot-tag.cc | 8 ++--
+ test/test-buffer.c | 4 +-
+ test/test-common.c | 79
+ +++++++++++++++++++++++++++++---------------------
+ test/test-ot-tag.c | 22 +++++++-------
+ util/hb-view.cc | 6 ++--
+ util/options.cc | 5 +--
+ 10 files changed, 96 insertions(+), 73 deletions(-)
+
+commit a499bdea5cc5097dec62eeafdef58d08ba534be0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 25 22:46:21 2011 +0200
+
+ [graphite2] Bail if grface is NULL
+
+ src/hb-graphite2.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 3007ffa9e53e6100a761c2363f50a2b19a0764fc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 25 09:08:53 2011 +0200
+
+ Reorder combining-class to better suit Arabic shadda mark-mark
+ positioning
+
+ As reported by Khaled on the list:
+
+ "After the introduction of canonical reordering of combining marks
+ (commit 34c22f8), I'm no longer able to do mark/mark substitution or
+ positioning for mark sequences that involve shadda as a first mark (or
+ most interesting sequences at least).
+
+ "After some digging, it turned out that shadda have a ccc=33
+ while most
+ Arabic marks that combine with it have a lower ccc value, which
+ results
+ in the shadda being reordered after the other mark which,
+ unsurprisingly, breaks my contextual substitution and mkmk anchors."
+
+ See:
+
+ http://unicode.org/faq/normalization.html#8
+ http://unicode.org/faq/normalization.html#9
+
+ src/hb-ot-shape-private.hh | 18 +++++++++++++++++-
+ 1 files changed, 17 insertions(+), 1 deletions(-)
+
+commit 74ef81a0b0f9adddfb42c3cb87f08f8156054519
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 24 19:16:13 2011 +0200
+
+ Fix make distcheck
+
+ src/Makefile.am | 15 ++++++++-------
+ src/hb-gobject-enums.cc.tmpl | 2 +-
+ 2 files changed, 9 insertions(+), 8 deletions(-)
+
+commit 24bcdbcc0639ca9e9c0fde1a71cbbf1c3d2ef98d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 24 19:13:15 2011 +0200
+
+ Add hb-ot-hmtx-table.hh
+
+ Oops!
+
+ src/hb-ot-hmtx-table.hh | 86
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 86 insertions(+), 0 deletions(-)
+
+commit a3bd8a0e1862212a2d4141b973039bd000a3054f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 24 03:22:49 2011 +0200
+
+ [graphite] Rewrite properly
+
+ src/hb-graphite2.cc | 633
+ ++++++++++++++++++++++-----------------------------
+ src/hb-uniscribe.cc | 2 +
+ 2 files changed, 273 insertions(+), 362 deletions(-)
+
+commit 5072934c35bddc23d6bcb07a41010da51eb1b090
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 24 02:24:27 2011 +0200
+
+ Minor
+
+ src/hb-uniscribe.cc | 14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 46377396accf6b43792ffba553dcd9847608aa86
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 24 02:12:05 2011 +0200
+
+ [configure] Fix graphite bits
+
+ configure.ac | 9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+commit 71388b3ee71c7d3b79f842db7588bd683691797c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 24 02:09:04 2011 +0200
+
+ [uniscribe] Minor
+
+ src/hb-uniscribe.cc | 19 +++++++++----------
+ 1 files changed, 9 insertions(+), 10 deletions(-)
+
+commit cd2b901027bd154e31aa509c0cb2d86633e36398
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 24 01:47:25 2011 +0200
+
+ [graphite] Minor
+
+ src/hb-graphite2.cc | 10 ++++------
+ src/hb-shape.cc | 1 -
+ 2 files changed, 4 insertions(+), 7 deletions(-)
+
+commit 834af3b48a1aca3e53811d1eb4ca09b582b8e598
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 24 01:45:47 2011 +0200
+
+ [graphite] Remove hb_graphite2_feature_check()
+
+ I don't see how this function can be useful.
+
+ src/hb-graphite2.cc | 10 ----------
+ src/hb-graphite2.h | 2 --
+ 2 files changed, 0 insertions(+), 12 deletions(-)
+
+commit 1f49cf32c96cb45a4d8ba2c210aeb7a8076b4762
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 24 01:29:25 2011 +0200
+
+ Add graphite2 integration from Martin Hosken
+
+ To be modified, a lot.
+
+ configure.ac | 9 +-
+ contrib/python/lib/harfbuzz.pyx | 20 +-
+ contrib/python/runpy | 2 -
+ contrib/python/scripts/hbtestfont | 4 +-
+ contrib/python/setup.py | 18 ++-
+ src/Makefile.am | 7 +
+ src/hb-graphite2.cc | 446
+ +++++++++++++++++++++++++++++++++++++
+ src/hb-graphite2.h | 47 ++++
+ src/hb-shape.cc | 7 +
+ 9 files changed, 542 insertions(+), 18 deletions(-)
+
+commit 0e6d36d8a3f9f533cb6eb04408af62bfd1ad83da
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 24 01:31:29 2011 +0200
+
+ Minor
+
+ src/Makefile.am | 2 +-
+ src/hb-uniscribe-shape.cc | 454
+ ---------------------------------------------
+ src/hb-uniscribe.cc | 454
+ +++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 455 insertions(+), 455 deletions(-)
+
+commit efde8113258b117ec0a7fbffe6d681442d045c41
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 23 00:04:57 2011 +0200
+
+ Add a constructor for hb_prealloced_array_t
+
+ Fixes build with MSVC.
+
+ src/hb-private.hh | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit d75333f166d21e9b9f2341c3bc8a9ef8a886f4b3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 19 19:59:24 2011 +0200
+
+ Add gobject enum support, but disabled for now
+
+ need to figure out the naming. The generated code doesn't have the
+ right name.
+
+ configure.ac | 2 +
+ src/Makefile.am | 13 ++++++--
+ src/hb-gobject-enums.cc.tmpl | 74
+ ++++++++++++++++++++++++++++++++++++++++++
+ src/hb-gobject-structs.cc | 63 +++++++++++++++++++++++++++++++++++
+ src/hb-gobject.cc | 63 -----------------------------------
+ 5 files changed, 149 insertions(+), 66 deletions(-)
+
+commit 7d235d272f4c9213f54c9c807fb8fba5068c45b0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 17 23:55:29 2011 +0200
+
+ Flesh out tt funcs a bit
+
+ src/hb-tt-font.cc | 36 +++++++++++++++++++++++++++++++++++-
+ 1 files changed, 35 insertions(+), 1 deletions(-)
+
+commit b9415e76d7b41da203b9ae85e38b6dc777481184
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 17 19:21:44 2011 +0200
+
+ [API] Add hb_font_set_funcs_data()
+
+ src/hb-font.cc | 15 +++++++++++++++
+ src/hb-font.h | 6 ++++++
+ 2 files changed, 21 insertions(+), 0 deletions(-)
+
+commit e6c09cdf43201ff1b7f38e411ae1f9977e4f9271
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 17 19:07:59 2011 +0200
+
+ Remove the pre_allocate argument from hb_buffer_create()
+
+ For two reasons:
+
+ 1. User can always call hb_buffer_pre_allocate() themselves, and
+
+ 2. Now we do a pre_alloc in add_utfX anyway, so the total number of
+ reallocs is limited to a small number (~3) anyway. This just
+ makes the
+ API cleaner.
+
+ src/hb-buffer.cc | 7 +------
+ src/hb-buffer.h | 2 +-
+ src/test.cc | 2 +-
+ test/test-buffer.c | 9 ++++-----
+ test/test-object.c | 4 ++--
+ test/test-shape-complex.c | 2 +-
+ test/test-shape.c | 2 +-
+ util/hb-view.cc | 2 +-
+ 8 files changed, 12 insertions(+), 18 deletions(-)
+
+commit 187bdeaa6c82fcb95fdd546da9c78b843e1dea0e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 17 19:03:06 2011 +0200
+
+ Do (nothing for) hmtx sanitize
+
+ src/hb-ot-hhea-table.hh | 1 -
+ src/hb-tt-font.cc | 1 +
+ 2 files changed, 1 insertions(+), 1 deletions(-)
+
+commit d6016e49108be183ab2dc9c226447d1db3a09b90
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 17 14:47:41 2011 +0200
+
+ Fix name-table sanitize
+
+ src/hb-ot-name-table.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit ae9877dea6a1aed3566d9b87a75ede84259deaca
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 17 14:43:45 2011 +0200
+
+ Add hhea-table support
+
+ src/Makefile.am | 1 +
+ src/hb-open-type-private.hh | 6 +
+ src/hb-ot-head-table.hh | 2 +-
+ src/hb-ot-hhea-table.hh | 93 ++++++++++++++++++
+ src/hb-ot-layout-gdef-table.hh | 2 +-
+ src/hb-ot-layout-gpos-table.hh | 2 +-
+ src/hb-ot-layout-gsub-table.hh | 2 +-
+ src/hb-ot-maxp-table.hh | 2 +-
+ src/hb-ot-name-table.hh | 3 +-
+ src/hb-tt-font.cc | 207
+ ++++++++++++++++++++++++++++++++++++++++
+ 10 files changed, 314 insertions(+), 6 deletions(-)
+
+commit 7a750ac33ec482e2c4856c19ea607f3563741c24
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 17 14:19:59 2011 +0200
+
+ Rename table files from eg maxp-private.hh to maxp-table.hh
+
+ src/Makefile.am | 12 +-
+ src/hb-font.cc | 2 +-
+ src/hb-ot-head-private.hh | 143 ---
+ src/hb-ot-head-table.hh | 143 +++
+ src/hb-ot-layout-gdef-private.hh | 427 ---------
+ src/hb-ot-layout-gdef-table.hh | 427 +++++++++
+ src/hb-ot-layout-gpos-private.hh | 1633
+ ----------------------------------
+ src/hb-ot-layout-gpos-table.hh | 1633
+ ++++++++++++++++++++++++++++++++++
+ src/hb-ot-layout-gsub-private.hh | 943 --------------------
+ src/hb-ot-layout-gsub-table.hh | 943 ++++++++++++++++++++
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ src/hb-ot-layout.cc | 8 +-
+ src/hb-ot-maxp-private.hh | 66 --
+ src/hb-ot-maxp-table.hh | 66 ++
+ src/hb-ot-name-private.hh | 128 ---
+ src/hb-ot-name-table.hh | 128 +++
+ src/hb-uniscribe-shape.cc | 2 +-
+ src/main.cc | 2 +-
+ 18 files changed, 3354 insertions(+), 3354 deletions(-)
+
+commit 0b7e4d9f20b3ed947d0c441ca59b43c4097cdb0e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 15 20:41:59 2011 +0200
+
+ [ft] FT_Get_Advance() for advance-width callbacks
+
+ Using graphite2's comparerenderer suggests that this makes hb-ft 15
+ times faster. No caching layer needed anymore.
+
+ configure.ac | 2 +-
+ src/hb-ft.cc | 19 +++++++++++++------
+ util/common.hh | 4 +++-
+ 3 files changed, 17 insertions(+), 8 deletions(-)
+
+commit 97796453aab56873809a15b5e316cba8acea7449
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 15 19:03:43 2011 +0200
+
+ Fix falloffs of the GOption conversion
+
+ util/options.cc | 8 ++++----
+ util/options.hh | 4 ++--
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 4e9ff1dd6ee3ea63fd91a76a91d9725a10a294a0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 15 16:21:22 2011 +0200
+
+ Pre-allocate buffers when adding string
+
+ We do a conservative estimate of the number of characters, but still,
+ this limits the number of buffer reallocs to a small constant.
+
+ src/hb-buffer.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 553bc3de82cfda8d83db26a93205e0d39440cbd1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 15 16:21:06 2011 +0200
+
+ Minor
+
+ src/hb-ft.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 254142bb67a5c520a304142301479eb5292592d1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 15 16:15:44 2011 +0200
+
+ [ft] FT_Select_Charmap() when we create face
+
+ src/hb-ft.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit a4cbd03dd17990783d8fd4c6be0c9c0d3d9cae5b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 15 09:52:05 2011 +0200
+
+ Apply 'locl' with 'ccmp' in Arabic shaper
+
+ According to Peter Constable this is indeed what Uniscribe has been
+ doing for years.
+
+ Mozilla Bug 667166 - wrong shape of letter when it comes at the end of
+ word in the arabic version of Firefox 5.0
+
+ src/hb-ot-shape-complex-arabic.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit c214cff55ce539d004d069a484dac3988953cb11
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 14 15:17:16 2011 +0200
+
+ Start adding gobject-introspection support
+
+ configure.ac | 13 +++++++++-
+ src/Makefile.am | 43 ++++++++++++++------------------
+ src/hb-common.h | 1 +
+ src/hb-glib.cc | 3 --
+ src/hb-gobject.cc | 63
+ +++++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-gobject.h | 68
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 6 files changed, 163 insertions(+), 28 deletions(-)
+
+commit 9527fb200ffbbd839334e99b51d9671752d393db
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 13 19:03:48 2011 +0200
+
+ Fix missing return
+
+ src/hb-ft.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 77a328769545f6b2970d8491fe77fe98781961cf
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 13 17:16:45 2011 +0200
+
+ Minor
+
+ src/hb-common.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3bb300ee78a40f9ded21ab19283863b733aeb677
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 11 11:54:31 2011 +0200
+
+ Refactor hb-view code
+
+ util/Makefile.am | 26 ++++-
+ util/common.cc | 40 ++++++
+ util/common.hh | 49 +++++++
+ util/hb-view.cc | 387
+ ++++--------------------------------------------------
+ util/options.cc | 318 ++++++++++++++++++++++++++++++++++++++++++++
+ util/options.hh | 86 ++++++++++++
+ 6 files changed, 541 insertions(+), 365 deletions(-)
+
+commit d6660356dd81358033743f72d8a5fbf2fc70eaf7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 10 22:08:36 2011 +0200
+
+ Add uniscribe font getters
+
+ src/hb-uniscribe-shape.cc | 24 +++++++++++++++++++++---
+ src/hb-uniscribe.h | 8 ++++++++
+ 2 files changed, 29 insertions(+), 3 deletions(-)
+
+commit 01ec13a1d9ae380305b593e1c52cebb0e8327cb6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 10 22:00:35 2011 +0200
+
+ Implement hb_ft_font_get_face
+
+ src/hb-ft.cc | 15 ++++++++++++++-
+ src/hb-ft.h | 2 ++
+ 2 files changed, 16 insertions(+), 1 deletions(-)
+
+commit 36a4fe037df201f85b7a544eb30d75dc3585a1b6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 10 21:54:22 2011 +0200
+
+ Fix charset conversion
+
+ util/hb-view.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 25c4830593064f023e296aa795b72ddcaa1c9322
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 10 16:28:38 2011 +0200
+
+ [util] Add hb-shape --shapers
+
+ If the specified shapers fail, hb-shape will fail immediately
+
+ util/hb-view.cc | 57
+ +++++++++++++++++++++++++++++++-----------------------
+ 1 files changed, 33 insertions(+), 24 deletions(-)
+
+commit 0501573deda3a8dcdfcea491392f554f21ed0154
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 10 16:25:56 2011 +0200
+
+ Fix const correctness in the API
+
+ src/hb-fallback-shape-private.hh | 2 +-
+ src/hb-fallback-shape.cc | 2 +-
+ src/hb-ot-shape.cc | 2 +-
+ src/hb-ot-shape.h | 2 +-
+ src/hb-shape.cc | 14 +++++++-------
+ src/hb-shape.h | 12 ++++++------
+ src/hb-uniscribe-shape.cc | 2 +-
+ src/hb-uniscribe.h | 2 +-
+ 8 files changed, 19 insertions(+), 19 deletions(-)
+
+commit a21add6c0da067173d51792d716d6e38379f138f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 10 16:07:49 2011 +0200
+
+ Reformat
+
+ util/hb-view.cc | 49 ++++++++++++++++++-------------------------------
+ 1 files changed, 18 insertions(+), 31 deletions(-)
+
+commit 8df90c81187db58eee6b90426cd16c32feef6be3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 10 15:26:41 2011 +0200
+
+ [util] Port hb-view to GOption
+
+ util/hb-view.cc | 267
+ ++++++++++++++++++++++++++++++++-----------------------
+ 1 files changed, 156 insertions(+), 111 deletions(-)
+
+commit 511a136f0c092880b19250a5df53bcf9f4b043ca
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 9 15:03:00 2011 +0200
+
+ Move hb-view into util/
+
+ Makefile.am | 3 +-
+ configure.ac | 1 +
+ src/Makefile.am | 13 --
+ src/hb-view.cc | 568
+ ------------------------------------------------------
+ util/Makefile.am | 24 +++
+ util/hb-view.cc | 568
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 6 files changed, 594 insertions(+), 583 deletions(-)
+
+commit d753ac78da5619a0a545cdaf7a8e65787e996570
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 9 14:03:12 2011 +0200
+
+ [uniscribe] Remove zerowidth glyphs from output
+
+ src/hb-uniscribe-shape.cc | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+commit 217cc81cd9c3de30b2ef226983ec43c0f78b5c7d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 9 14:00:44 2011 +0200
+
+ [test/shape-complex] Print cluster and position info in --verbose
+
+ test/test-shape-complex.c | 20 +++++++++++++++++---
+ 1 files changed, 17 insertions(+), 3 deletions(-)
+
+commit 708403e7f3e4a5cf9b0d2bd764fb74b148af7adb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 9 13:52:36 2011 +0200
+
+ Fix warnings with old glib
+
+ test/hb-test.h | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit ddd247b0c528cdb8bdf5f8063180abe884afa305
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 9 11:44:42 2011 +0200
+
+ Minor
+
+ src/test.cc | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit 1b8196c98638ba05ae0ebcb8ba7aa99ed9c08e0a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 9 11:37:46 2011 +0200
+
+ Add fallback shaper
+
+ src/hb-fallback-shape.cc | 23 +++++++++++++++++++++--
+ 1 files changed, 21 insertions(+), 2 deletions(-)
+
+commit 13a601fe99f237b08b7166448e386eaea0b77294
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 9 11:36:54 2011 +0200
+
+ [FT] Don't make font immutable
+
+ src/hb-ft.cc | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 38b2118724600521c6ad1e49df0667dcdf863634
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 9 10:51:24 2011 +0200
+
+ [API] Add hb_ft_font_set_funcs(), remove hb_ft_get_font_funcs()
+
+ Remove hb_ft_get_font_funcs() as it cannot be used by the user anyway.
+
+ Add hb_ft_font_set_funcs(). Which will make the font internally use
+ FreeType. That is, no need for the font to have created using the
+ hb-ft API. Just create using hb_face_create()/hb_font_create() and
+ then call this on the font (after having set font scale). This
+ internally creates an FT_Face and attached to the font.
+
+ src/Makefile.am | 4 +-
+ src/hb-ft.cc | 76
+ +++++++++++++++++++++++++++++++++++++++++++++++++--
+ src/hb-ft.h | 10 +++++--
+ src/test.cc | 7 +++++
+ test/Makefile.am | 8 -----
+ test/test-object.c | 9 ------
+ 6 files changed, 89 insertions(+), 25 deletions(-)
+
+commit 255f176fdcd42ab94f9c3c54e2bffb55d0b1a8f5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 9 08:35:07 2011 +0200
+
+ Minor
+
+ src/hb-uniscribe-shape.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit a9057eb3f38018faa1ece53c4aaeeba798b41fd1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 9 00:47:55 2011 +0200
+
+ [uniscribe] Unbreak
+
+ src/hb-uniscribe-shape.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit c0975e12315b7167b92411584d2f00a751bbc204
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 9 00:46:18 2011 +0200
+
+ Fix build again
+
+ test/Makefile.am | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 33ccc77902660ed4b49184e5ec99f4fd0ef63175
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 9 00:43:24 2011 +0200
+
+ [API] Make set_user_data() functions take a replace parameter
+
+ We need this to set data on objects safely without worrying that some
+ other thread unsets it by setting it at the same time.
+
+ src/hb-blob.cc | 5 +++--
+ src/hb-blob.h | 3 ++-
+ src/hb-buffer.cc | 5 +++--
+ src/hb-buffer.h | 3 ++-
+ src/hb-common.cc | 13 ++++++++-----
+ src/hb-font.cc | 15 +++++++++------
+ src/hb-font.h | 9 ++++++---
+ src/hb-object-private.hh | 13 ++++++++-----
+ src/hb-private.hh | 16 +++++++++++-----
+ src/hb-shape.cc | 2 +-
+ src/hb-unicode.cc | 5 +++--
+ src/hb-unicode.h | 3 ++-
+ src/hb-uniscribe-shape.cc | 18 ++++++++++++++----
+ test/test-object.c | 33 +++++++++++++++++----------------
+ 14 files changed, 89 insertions(+), 54 deletions(-)
+
+commit 944b2ba1ce076385f985212bbdf2df96a8a995f0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 9 00:23:58 2011 +0200
+
+ [buffer] Make API take signed int length
+
+ Since we already switched to accepting -1 as 'zero-terminated'.
+
+ src/hb-buffer.cc | 12 ++++++------
+ src/hb-buffer.h | 12 ++++++------
+ src/hb-ot-layout.cc | 2 --
+ src/main.cc | 1 -
+ 4 files changed, 12 insertions(+), 15 deletions(-)
+
+commit de1e1cf9bccfd116d495804e230dc2e12b733a2d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 9 00:19:38 2011 +0200
+
+ [FT] Adapt to new face API
+
+ src/hb-ft.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 458c89a85695220d43b69dbae36fc93e3fe78d89
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 9 00:19:19 2011 +0200
+
+ Minor
+
+ test/test-c.c | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+commit bf3eef540f81fdeba1c36263d7d5b2ec4c5f07b1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 9 00:13:24 2011 +0200
+
+ [uniscribe] Cleanup backend
+
+ TODO | 2 +
+ src/hb-uniscribe-shape.cc | 161
+ ++++++++++++++++++++++++++++++++++-----------
+ 2 files changed, 123 insertions(+), 40 deletions(-)
+
+commit f1f848e2e46ac54ff08aca7cd83390af31c7c9ef
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 8 23:41:06 2011 +0200
+
+ Fix build
+
+ test/Makefile.am | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 3897335c7620c37e9a0224b0c42ade0dfdce4053
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 8 23:37:41 2011 +0200
+
+ [API] Sort out get_blob API
+
+ hb_face_get_blob() renamed to hb_face_reference_blob(), returns a
+ reference now.
+
+ hb_face_[sg]et_index() added.
+
+ hb_face_set_upem() added.
+
+ src/hb-font-private.hh | 3 +-
+ src/hb-font.cc | 67
+ ++++++++++++++++++++++++++++++++++---------
+ src/hb-font.h | 17 +++++++++--
+ src/hb-ft.cc | 3 +-
+ src/hb-ot-layout-private.hh | 9 ------
+ src/hb-ot-layout.cc | 21 -------------
+ src/hb-uniscribe-shape.cc | 3 +-
+ 7 files changed, 72 insertions(+), 51 deletions(-)
+
+commit e715784be35f0846c0e084b7c53c7556ce933a45
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 8 21:42:02 2011 +0200
+
+ Rename get_table to reference_table in all API
+
+ src/hb-font-private.hh | 6 +++---
+ src/hb-font.cc | 20 ++++++++++----------
+ src/hb-font.h | 8 ++++----
+ src/hb-ft.cc | 4 ++--
+ 4 files changed, 19 insertions(+), 19 deletions(-)
+
+commit 670c873499f7f03fdfc07b8a0567b041628c6ab0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 8 21:36:24 2011 +0200
+
+ Fix shaper ordering logic
+
+ src/hb-shape.cc | 80
+ +++++++++++++++++++++++-------------------------------
+ 1 files changed, 34 insertions(+), 46 deletions(-)
+
+commit cc797e0d5368b2f5732d77eb3e3882283bd87cf7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 8 03:49:30 2011 +0200
+
+ Minor
+
+ TODO | 2 --
+ src/hb-shape.cc | 2 ++
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 826e22732dd8697600a1392f48af21b7b3ce6271
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 7 03:53:42 2011 -0400
+
+ [uniscribe] Fix blob lifecycles
+
+ src/hb-uniscribe-shape.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit ff199ba356f0eb5bc6252203eea18a1d1fd28934
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 7 03:43:46 2011 -0400
+
+ Fix shaper_list manipulation, aaaaaaaaaaaaargh
+
+ src/hb-shape.cc | 16 +++++++++-------
+ 1 files changed, 9 insertions(+), 7 deletions(-)
+
+commit 206e32934592b915b1f3052aecf014c6ced729e1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 7 01:10:55 2011 -0400
+
+ [test] test-object is not FreeType-specific, move it to the right
+ place
+
+ test/Makefile.am | 8 +++-----
+ 1 files changed, 3 insertions(+), 5 deletions(-)
+
+commit 577326b86af80cc137eea81f4cc1e30adf9232b1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 7 01:04:40 2011 -0400
+
+ [uniscribe] Fix cluster calculation
+
+ src/hb-uniscribe-shape.cc | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+commit f6d83b2dcf120f9d6f0a28c6f5de2da7addf9089
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 7 00:59:58 2011 -0400
+
+ Minor
+
+ src/test.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 2eb474afb4a09f4da8f14b444bd6066769010224
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 7 00:59:38 2011 -0400
+
+ [uniscribe] Fix shaper
+
+ It's kinda working finally!
+
+ src/hb-uniscribe-shape.cc | 9 ++++++---
+ 1 files changed, 6 insertions(+), 3 deletions(-)
+
+commit f22e661147691ebc9d531aa28a850988e6503f9b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 7 00:59:12 2011 -0400
+
+ [glib] Protect against invalid characters
+
+ src/hb-glib.cc | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+commit 144cd49a0eb3ccc749325d0ee14b3ebf4367c971
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 7 00:51:50 2011 -0400
+
+ [buffer] Accept -1 for text_length and item_length
+
+ A -1 text_length means: zero-terminated string.
+ A -1 item_length means: to the end of string.
+
+ src/hb-buffer.cc | 10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit e9c71fab30fd1d5b163c8a072f9e2d3eb8ba3a92
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 7 00:00:27 2011 -0400
+
+ Fix name-table lookup
+
+ Oops!
+
+ src/hb-ot-name-private.hh | 2 +-
+ src/hb-uniscribe-shape.cc | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 3fd2b5bece28c81e3e379352f09eee39d19ac372
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 6 22:59:54 2011 -0400
+
+ [uniscribe] Use font size directly
+
+ src/hb-uniscribe-shape.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 892eb2e462b40451b8f73879eab66310d884386a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 6 22:06:52 2011 -0400
+
+ [uniscribe] Make font selection work
+
+ Not tested yet.
+
+ src/hb-ot-name-private.hh | 37 +++++++++++++++++++++++++++++++++++++
+ src/hb-uniscribe-shape.cc | 30 +++++++++++++++++++++++-------
+ src/test.cc | 1 -
+ 3 files changed, 60 insertions(+), 8 deletions(-)
+
+commit b492299eb3c398701557e452f6c2c9bd370fbbf3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 5 20:34:50 2011 -0400
+
+ Start implementing the 'name' table
+
+ src/Makefile.am | 3 +-
+ src/hb-ot-name-private.hh | 91
+ +++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-uniscribe-shape.cc | 12 +++--
+ 3 files changed, 100 insertions(+), 6 deletions(-)
+
+commit 4538efacca84329a60ff69851de70027d9b4f567
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 5 20:11:06 2011 -0400
+
+ Skip tests by returning 77
+
+ automake test runner understands this.
+
+ src/check-internal-symbols.sh | 3 ++-
+ src/check-libstdc++.sh | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 54eb65538da0a6ab0389d09944c90e12a913157d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 5 20:09:25 2011 -0400
+
+ Fix check on OS X sh
+
+ src/check-header-guards.sh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9da554504e30a326fc57b28cdb0e57108bfa9555
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 5 19:48:49 2011 -0400
+
+ Add hb_shape_list_shapers()
+
+ src/hb-shape.cc | 22 ++++++++++++++++++----
+ src/hb-shape.h | 3 +++
+ test/Makefile.am | 2 ++
+ test/test-c.c | 8 ++++++++
+ test/test-shape.c | 15 +++++++++++++++
+ 5 files changed, 46 insertions(+), 4 deletions(-)
+
+commit d7bf473ef222ab420456ff155ffaa09bacb3a394
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 5 18:18:21 2011 -0400
+
+ Minor
+
+ src/check-header-guards.sh | 1 -
+ src/hb-open-type-private.hh | 10 +++++-----
+ 2 files changed, 5 insertions(+), 6 deletions(-)
+
+commit c62a8f10f3b9a4ac3ac6b686464ac734ebfa2f7f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 5 18:02:30 2011 -0400
+
+ Free all static memory upon exit
+
+ src/hb-common.cc | 8 +++++---
+ src/hb-shape.cc | 4 ++--
+ 2 files changed, 7 insertions(+), 5 deletions(-)
+
+commit c4d63ef744f79701458ab7af2055afb87ffe8de3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 5 17:54:25 2011 -0400
+
+ Fix env parsing code
+
+ Also changed the separator to comma instead of colon.
+
+ src/hb-shape.cc | 34 +++++++++++++++++++++++++---------
+ 1 files changed, 25 insertions(+), 9 deletions(-)
+
+commit 3931837bebd79c5eb1bd5b24ff12e2c8e7d3f24c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 5 17:22:19 2011 -0400
+
+ Change hb_shape() API back to what it was, add hb_shape_full()
+
+ I disliked changing hb_shape() API, and disliked the fact that it was
+ returning a bool now. So, reverted. Added new API for the extra
+ functionality.
+
+ src/hb-view.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3ca6c4ecc299295b6682fa2b6b9f83b213223bad
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 5 17:22:19 2011 -0400
+
+ Change hb_shape() API back to what it was, add hb_shape_full()
+
+ I disliked changing hb_shape() API, and disliked the fact that it was
+ returning a bool now. So, reverted. Added new API for the extra
+ functionality.
+
+ src/hb-shape.cc | 21 +++++++++++++++------
+ src/hb-shape.h | 14 ++++++++++----
+ src/test.cc | 2 +-
+ test/test-shape.c | 2 +-
+ 4 files changed, 27 insertions(+), 12 deletions(-)
+
+commit 02aeca985b570763342c35e99af90025bfa088d5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 4 22:31:05 2011 -0400
+
+ [API] Changes to main shape API
+
+ hb_shape() now accepts a shaper_options and a shaper_list argument.
+ Both can be set to NULL to emulate previous API. And in most
+ situations
+ they are expected to be set to NULL.
+
+ hb_shape() also returns a boolean for now. If shaper_list is
+ NULL, the
+ return value can be ignored.
+
+ shaper_options is ignored for now, but otherwise it should be a
+ NULL-terminated list of strings.
+
+ shaper_list is a NULL-terminated list of strings. Currently
+ recognized
+ strings are "ot" for native OpenType Layout implementation,
+ "uniscribe"
+ for the Uniscribe backend, and "fallback" for the non-complex backend
+ (that will be implemented shortly). The fallback backend never fails.
+
+ The env var HB_SHAPER_LIST is also parsed and honored. It's a
+ colon-separated list of shaper names. The fallback shaper is
+ invoked if
+ none of the env-listed shapers succeed.
+
+ New API hb_buffer_guess_properties() added.
+
+ TODO | 2 -
+ configure.ac | 9 +++
+ src/Makefile.am | 14 +++--
+ src/hb-buffer-private.hh | 1 +
+ src/hb-buffer.cc | 35 ++++++++++
+ src/hb-buffer.h | 3 +
+ src/hb-fallback-shape-private.hh | 48 +++++++++++++
+ src/hb-fallback-shape.cc | 43 ++++++++++++
+ src/hb-ot-shape.cc | 9 ++-
+ src/hb-ot-shape.h | 5 +-
+ src/hb-shape.cc | 135
+ +++++++++++++++++++++++---------------
+ src/hb-shape.h | 13 ++--
+ src/hb-uniscribe-shape.cc | 52 ++++++---------
+ src/hb-uniscribe.h | 5 +-
+ src/hb-view.cc | 2 +-
+ src/test.cc | 3 +-
+ test/test-shape.c | 2 +-
+ 17 files changed, 274 insertions(+), 107 deletions(-)
+
+commit 57692adf1294a6db4627d0de7c671e4aa01d2a8f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 4 20:49:16 2011 -0400
+
+ Make test.cc do something more useful
+
+ Hardcoded to the uniscribe backend for now. Will fix soon.
+
+ src/test.cc | 38 ++++++++++++++++++++++++++++++++++----
+ 1 files changed, 34 insertions(+), 4 deletions(-)
+
+commit c605bbbb6d4b2a98b1f40ca818760088d991f7d1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 4 20:00:53 2011 -0400
+
+ Remove C++ guards from source files
+
+ Where causing issues for people with MSVC.
+
+ src/check-c-linkage-decls.sh | 3 +--
+ src/hb-blob.cc | 2 --
+ src/hb-buffer-private.hh | 2 --
+ src/hb-buffer.cc | 2 --
+ src/hb-common.cc | 2 --
+ src/hb-font-private.hh | 2 --
+ src/hb-font.cc | 2 --
+ src/hb-ft.cc | 2 --
+ src/hb-glib.cc | 2 --
+ src/hb-icu.cc | 2 --
+ src/hb-mutex-private.hh | 2 --
+ src/hb-object-private.hh | 4 ----
+ src/hb-open-file-private.hh | 2 --
+ src/hb-open-type-private.hh | 4 ----
+ src/hb-ot-head-private.hh | 2 --
+ src/hb-ot-layout-common-private.hh | 4 ----
+ src/hb-ot-layout-gdef-private.hh | 2 --
+ src/hb-ot-layout-gpos-private.hh | 4 ----
+ src/hb-ot-layout-gsub-private.hh | 4 ----
+ src/hb-ot-layout-gsubgpos-private.hh | 6 ------
+ src/hb-ot-layout-private.hh | 2 --
+ src/hb-ot-layout.cc | 2 --
+ src/hb-ot-map-private.hh | 2 --
+ src/hb-ot-map.cc | 2 --
+ src/hb-ot-maxp-private.hh | 2 --
+ src/hb-ot-shape-complex-arabic-table.hh | 2 --
+ src/hb-ot-shape-complex-arabic.cc | 2 --
+ src/hb-ot-shape-complex-indic-table.hh | 2 --
+ src/hb-ot-shape-complex-indic.cc | 2 --
+ src/hb-ot-shape-complex-misc.cc | 2 --
+ src/hb-ot-shape-complex-private.hh | 2 --
+ src/hb-ot-shape-normalize.cc | 2 --
+ src/hb-ot-shape-private.hh | 2 --
+ src/hb-ot-shape.cc | 2 --
+ src/hb-ot-tag.cc | 2 --
+ src/hb-private.hh | 8 --------
+ src/hb-shape.cc | 2 --
+ src/hb-unicode-private.hh | 2 --
+ src/hb-unicode.cc | 2 --
+ src/hb-uniscribe-shape.cc | 2 --
+ src/hb-view.cc | 2 --
+ src/main.cc | 2 --
+ src/test.cc | 2 --
+ 43 files changed, 1 insertions(+), 106 deletions(-)
+
+commit 8336186a52813b53e90b4399dc462d55750e2d37
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 4 19:49:05 2011 -0400
+
+ Zero map objects
+
+ src/hb-ot-map-private.hh | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit ecd3b6e4ad253cf9d0dae1ed2da8ba6caed16b85
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 4 01:57:40 2011 -0400
+
+ More build fixes
+
+ configure.ac | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit c747f509bcc4e6a34ced04e9e79ed414a44437b1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 4 01:51:30 2011 -0400
+
+ More out-of-tree build fixes
+
+ src/check-c-linkage-decls.sh | 3 +--
+ src/check-header-guards.sh | 8 ++++----
+ 2 files changed, 5 insertions(+), 6 deletions(-)
+
+commit 0530ca9a180edc330ab801c535907cefa4a0c298
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 4 01:42:59 2011 -0400
+
+ Fix out-of-tree build
+
+ test/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit ddbf4edc5d09a645351b1bd1722b068aba6a6dec
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 4 01:38:37 2011 -0400
+
+ Minor
+
+ configure.ac | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 20dde6101662fd9ebe5f613631ea468f4c0a995f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 4 01:07:33 2011 -0400
+
+ Minor
+
+ src/hb-uniscribe.h | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 44b4f50d05fd51d8056a78e359fbb00fbcac43a0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 4 00:52:20 2011 -0400
+
+ Fix typo
+
+ src/hb-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0fbb2dc83132a89201ad8b56c6909610437d2da0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 3 19:55:04 2011 -0400
+
+ Add draft experimental Uniscribe backend
+
+ Not complete yet, font selection doesn't work. But hey it shapes!
+
+ This is not supposed to be a production backend, more like a testing
+ backend.
+
+ configure.ac | 9 ++
+ src/Makefile.am | 11 ++
+ src/hb-private.hh | 4 +-
+ src/hb-uniscribe-shape.cc | 325
+ +++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-uniscribe.h | 46 +++++++
+ 5 files changed, 394 insertions(+), 1 deletions(-)
+
+commit 0d7d4824b2edc7aeeb995077655a9a89b5c360a9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 3 17:39:24 2011 -0400
+
+ Minor
+
+ configure.ac | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+commit e62df43649e31b7815c272f01808b3f726c7d07d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 3 17:38:54 2011 -0400
+
+ Add internal hb_buffer_t::get_scratch_buffer()
+
+ src/hb-buffer-private.hh | 2 ++
+ src/hb-buffer.cc | 10 ++++++++++
+ 2 files changed, 12 insertions(+), 0 deletions(-)
+
+commit 71e7936fcadfd375a8bdc47987ef8b1b2b542df5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 3 17:38:34 2011 -0400
+
+ Minor
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit bf8c57ba745c02370c38198adfdcd8075ba38b13
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 3 17:38:04 2011 -0400
+
+ [API] Add hb_face_get_blob()
+
+ Need to think more about it.
+
+ src/hb-font.cc | 10 ++++++++++
+ src/hb-font.h | 3 +++
+ 2 files changed, 13 insertions(+), 0 deletions(-)
+
+commit 2118fdb9f584e6735e904638e48bae48314372fa
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 2 14:06:51 2011 -0400
+
+ Fix fallback shaping
+
+ Broke it a few commits ago.
+
+ src/hb-ot-shape.cc | 8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+commit 199abbd0f15bd295c3a56845c71b38dd20af1332
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 2 13:59:47 2011 -0400
+
+ Minor
+
+ test/test-unicode.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 4f052b93c0b17d92b9f0adddf64ef77518bf2ac4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 2 13:44:24 2011 -0400
+
+ Fix build with glib but not freetype
+
+ test/Makefile.am | 7 +++----
+ 1 files changed, 3 insertions(+), 4 deletions(-)
+
+commit c21be799daa85d5edb2d831ac985d3e43c8755ec
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 2 12:05:49 2011 -0400
+
+ Minor
+
+ test/Makefile.am | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit e9c2341b1384c161bbab9871411af0bc9f6c3cf4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 2 11:40:44 2011 -0400
+
+ Don't use icu-config when cross-compiling
+
+ configure.ac | 17 ++++++++++-------
+ 1 files changed, 10 insertions(+), 7 deletions(-)
+
+commit 390dab49b6cf34f263b67d20a13f0752ada57bcc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 2 11:29:55 2011 -0400
+
+ Unbreak icu-config results a bit
+
+ configure.ac | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit b301478a69d961c724a4875b839a81fb458d1153
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 2 11:25:13 2011 -0400
+
+ Bug 39763 - autogen.sh should check pkg-config availability
+
+ (and revert change have_icu change I mistakenly pushed out)
+
+ autogen.sh | 10 ++++++++--
+ configure.ac | 1 -
+ 2 files changed, 8 insertions(+), 3 deletions(-)
+
+commit f60271c0c2b0101e7b2725f9a9ad950c277a616c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 2 09:56:30 2011 -0400
+
+ Add mingw32 support
+
+ With these changes, on Ubuntu I can do:
+
+ ./configure --host=i586-mingw32msvc && make
+
+ configure.ac | 1 +
+ src/hb-mutex-private.hh | 4 ++--
+ src/hb-open-type-private.hh | 5 +++++
+ src/hb-private.hh | 6 +++++-
+ src/main.cc | 1 +
+ 5 files changed, 14 insertions(+), 3 deletions(-)
+
+commit 1264b23e4a4ae1c9831a3009e1c7ab8e65a5b434
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 1 16:39:32 2011 -0400
+
+ Bug 39702 - configure check for ragel
+
+ autogen.sh | 18 +++++++++++++-----
+ 1 files changed, 13 insertions(+), 5 deletions(-)
+
+commit f5414cf0a220d6e6f3d4b6e8221cd583b4684187
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 1 16:34:16 2011 -0400
+
+ Use missing script for calling ragel
+
+ src/Makefile.am | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit a91c58bf98258a34e5f7c1ad39a38db58fadc4b9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 1 16:30:11 2011 -0400
+
+ [Indic] Disable CJCT-disabling logic
+
+ Read comment.
+
+ src/hb-ot-shape-complex-indic.cc | 7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 5e72071062c015237b79fbd0521341a63166a204
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 31 17:51:50 2011 -0400
+
+ [Indic] Stop looking for base upon seeing joiners
+
+ Not sure where this is documented, but I remember this being the
+ desired
+ behavior.
+
+ test-shape-complex failures are down from 48 to 46. Meh.
+
+ src/hb-ot-shape-complex-indic.cc | 11 +++++++++--
+ 1 files changed, 9 insertions(+), 2 deletions(-)
+
+commit 281683995a46ed37aeeb84061249758c59822457
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 31 16:00:35 2011 -0400
+
+ Cosmetic
+
+ src/hb-ot-shape-complex-indic.cc | 23 +++++++++++++++--------
+ 1 files changed, 15 insertions(+), 8 deletions(-)
+
+commit 6b37bc80843e38ca7b62500f95fd70c08af68d62
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 31 15:57:00 2011 -0400
+
+ [Indic] Fix ZWJ/ZWNJ application
+
+ Not quite working just yet. False alarm re 10 failures. It was
+ crashing. Ouch! Back to 48 failures.
+
+ src/hb-ot-shape-complex-indic.cc | 10 ++++++----
+ 1 files changed, 6 insertions(+), 4 deletions(-)
+
+commit e7be05702447ae270d797398132c1930cd3a9b86
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 31 15:18:57 2011 -0400
+
+ [Indic] Add Final Reordering rules into comments
+
+ Not applied yet.
+
+ src/hb-ot-shape-complex-indic.cc | 86
+ ++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 83 insertions(+), 3 deletions(-)
+
+commit cfd4382ec1af91640129551697de36fd42c0849a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 31 15:07:11 2011 -0400
+
+ [Indic] Handle Reph when determining base consonant
+
+ src/hb-ot-shape-complex-indic.cc | 24 +++++++++++++++---------
+ 1 files changed, 15 insertions(+), 9 deletions(-)
+
+commit 97158392a5899ddb739afaac925128f33f699bd7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 31 15:01:28 2011 -0400
+
+ [Indic] Ra is a consonant too
+
+ src/hb-ot-shape-complex-indic.cc | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit 0d8f8a177c4bfd4dc642a353bab8d03674e839ac
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 31 14:57:59 2011 -0400
+
+ [Indic] Fix reph inhibition logic
+
+ src/hb-ot-shape-complex-indic.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 9da0487cd452d780673e24329ce03e174a4ef83b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 31 13:46:44 2011 -0400
+
+ [Indic] Support ZWJ/ZWNJ
+
+ Brings test-shape-complex failures down from 52 to 10!
+
+ I hereby declare harfbuzz-ng supporting Indic!
+
+ src/hb-ot-shape-complex-indic.cc | 57
+ ++++++++++++++++++++++++++++++++------
+ 1 files changed, 48 insertions(+), 9 deletions(-)
+
+commit 9ee27a928a989c71923cef82a9e9828f8e9ca051
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 31 11:10:14 2011 -0400
+
+ [Indic] Suppress reph formation upon joiners
+
+ src/hb-ot-shape-complex-indic.cc | 8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 8354e004e553856d7d743e0f0b4de4668484026a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jul 31 02:24:51 2011 -0400
+
+ Un-Ra U+09F1. According to the test suite this is correct.
+
+ But I'm not sure... Down from 54 failures to 52.
+
+ src/hb-ot-shape-complex-indic.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 07cedd81f48907b2e372cd2e963716bbded9ce29
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 30 21:16:51 2011 -0400
+
+ Minor
+
+ test/test-shape-complex.c | 21 +++++++++++----------
+ 1 files changed, 11 insertions(+), 10 deletions(-)
+
+commit ba7e85c104e68b4685c1b3b5c9a260fe0f6879df
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 30 21:11:53 2011 -0400
+
+ Cosmetic
+
+ src/hb-ot-shape-complex-indic.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit f5bc2725cb892264ba223e0a49f7fd2c622a0730
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 30 21:08:10 2011 -0400
+
+ [Indic] For old-style Indic tables, move Halant around
+
+ In old-style Indic OT standards, the post-base Halants are moved after
+ their base. Emulate that by moving first post-base Halant to
+ post-last-consonant.
+
+ Brings test-shape-complex failures down from 88 to 54. Getting there!
+
+ src/hb-ot-map-private.hh | 3 +++
+ src/hb-ot-shape-complex-indic.cc | 20 ++++++++++++++++++++
+ 2 files changed, 23 insertions(+), 0 deletions(-)
+
+commit c47a31fb4793b825f4be57e9cb1b10db352b9512
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 30 20:57:01 2011 -0400
+
+ [OT] Save chosen script tag
+
+ src/hb-ot-layout.cc | 20 ++++++++++++++++----
+ src/hb-ot-layout.h | 3 ++-
+ src/hb-ot-map-private.hh | 1 +
+ src/hb-ot-map.cc | 2 +-
+ 4 files changed, 20 insertions(+), 6 deletions(-)
+
+commit 3a9b14dfdfc278b432890e1537672a4ca141a3b0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 30 20:23:55 2011 -0400
+
+ Minor
+
+ test/test-shape-complex.c | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 8613193bbf28fe8951c900b68c4418a6fb929626
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 30 20:21:40 2011 -0400
+
+ [test] Fix problem with N'ko test direction
+
+ Old HarfBuzz test suite always shaped as left-to-right and hence
+ had wrong
+ 0x14db, direction expected glyphstring for N'ko. Doh!
+
+ Failures down from 92 to 88.
+
+ test/test-shape-complex.c | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit fd06bf56110e73826b3d5c73ac964e2609450d46
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 30 20:14:44 2011 -0400
+
+ [Indic] Handle initial Ra+Halant in scripts that support Reph
+
+ Brings test-shape-complex failures down from 104 to 92. Way to go!
+
+ src/hb-ot-shape-complex-indic.cc | 10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit ee58f3bc75d2d071a71b94063bf12205a5871acb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 30 19:15:53 2011 -0400
+
+ Minor
+
+ src/hb-ot-shape-complex-indic.cc | 23 ++++++++++++-----------
+ 1 files changed, 12 insertions(+), 11 deletions(-)
+
+commit 352372ae5ea0998e40cf9fe43c22b6b610a5764e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 30 19:04:02 2011 -0400
+
+ [Indic] Categorize Ra in scripts that have Reph
+
+ Is the categorization correct? I don't know.
+
+ src/hb-ot-shape-complex-indic.cc | 31 ++++++++++++++++++++++++++++++-
+ 1 files changed, 30 insertions(+), 1 deletions(-)
+
+commit 45d6f29f15f1d2323bcaa2498aed23ff0c8a1567
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 30 14:44:30 2011 -0400
+
+ [Indic] Reorder matras
+
+ Number of failing shape-complex tests goes from 125 down to 94.
+
+ Next: Add Ra handling and it's fair to say we kinda support Indic :).
+
+ src/hb-ot-shape-complex-indic.cc | 29 +++++++++++++++++++++++++++--
+ src/hb-ot-shape-normalize.cc | 26 ++++++++++----------------
+ src/hb-private.hh | 36
+ ++++++++++++++++++++++++++++++------
+ 3 files changed, 67 insertions(+), 24 deletions(-)
+
+commit 911bf32acad7f1cd161f666cb659990ade0925ad
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 30 11:16:00 2011 -0400
+
+ Bug 39686 - Add '-no-undefined' to libharfbuzz LDFLAGS
+
+ src/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 8f0b64fb6988f9502d2c5e39768a9af133d9a83f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 29 17:02:48 2011 -0400
+
+ Minor
+
+ src/hb-ot-shape-complex-arabic.cc | 6 +++---
+ src/hb-private.hh | 8 ++++++--
+ 2 files changed, 9 insertions(+), 5 deletions(-)
+
+commit 743807a3ce1b2229e5307a8aea074a7544623d8d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 29 16:37:02 2011 -0400
+
+ [Indic] Apply Indic features
+
+ Find the base consonant and apply basic Indic features accordingly.
+ Nothing complete, but does something for now. Specifically:
+ no Ra handling right now, and no ZWJ/ZWNJ.
+
+ Number of failing shape-complex tests goes from 174 down to 125.
+
+ Next: reorder matras.
+
+ src/hb-ot-shape-complex-indic-machine.rl | 35 ++++--
+ src/hb-ot-shape-complex-indic.cc | 209
+ +++++++++++++++++++++++++++---
+ 2 files changed, 212 insertions(+), 32 deletions(-)
+
+commit 1a1b5013159369b343d0c32df02c9c419277aead
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 29 16:36:46 2011 -0400
+
+ Minor
+
+ test/test-shape-complex.c | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+commit dd5546de15e63c0320b7db2bf42b0f15271f7915
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 29 16:27:31 2011 -0400
+
+ Minor
+
+ test/test-shape-complex.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9f9bcceca6321d5a5812f878de1de39901349a78
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 28 17:06:46 2011 -0400
+
+ Register buffer vars in Indic shaper
+
+ src/hb-ot-shape-complex-indic.cc | 6 ++++++
+ src/hb-ot-shape.cc | 2 ++
+ 2 files changed, 8 insertions(+), 0 deletions(-)
+
+commit be09bf6b799cafc2ff54a28915b307ffe99661b6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 28 17:03:43 2011 -0400
+
+ Oops. This should have gone into the previous commit
+
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b65c06025d2b54a44f716e030d4b10072c65bea8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 28 16:48:43 2011 -0400
+
+ Formalize buffer var allocations
+
+ src/hb-buffer-private.hh | 25 +++++---------
+ src/hb-buffer.cc | 15 +++++----
+ src/hb-ot-layout-gpos-private.hh | 14 +++++---
+ src/hb-ot-layout-gsub-private.hh | 5 ++-
+ src/hb-ot-shape-complex-arabic.cc | 6 +++-
+ src/hb-ot-shape-complex-indic.cc | 4 +-
+ src/hb-ot-shape-complex-private.hh | 10 +++++-
+ src/hb-ot-shape.cc | 60
+ +++++++++++++++++++++--------------
+ src/hb-private.hh | 1 +
+ 9 files changed, 83 insertions(+), 57 deletions(-)
+
+commit a9ad3d3460ba863a8d8f3766ccbeab288c3c6822
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 28 15:42:18 2011 -0400
+
+ Move more code around
+
+ Buffer var allocation coming into shape
+
+ src/hb-buffer-private.hh | 1 +
+ src/hb-buffer.cc | 35
+ +++++++++++++++++++++++++++++++++++
+ src/hb-ot-layout-gpos-private.hh | 7 +++++++
+ src/hb-ot-layout-gsub-private.hh | 18 ++++++++++++++++++
+ src/hb-ot-layout.cc | 8 +++-----
+ 5 files changed, 64 insertions(+), 5 deletions(-)
+
+commit cc06c243d8be3ebb1190281653d2dba504c16c0f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 25 20:25:44 2011 -0400
+
+ Streamline debugging infrastructure even more
+
+ src/hb-blob.cc | 26 ++++----
+ src/hb-object-private.hh | 8 +-
+ src/hb-open-type-private.hh | 64 ++++++--------------
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ src/hb-private.hh | 109
+ ++++++++++++++++++++++++++++++---
+ 5 files changed, 136 insertions(+), 73 deletions(-)
+
+commit 43ff203d8ea3e1b09e316e3aae1a4e5ec15bfdd2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 25 17:35:24 2011 -0400
+
+ Use variadic macros for debugging
+
+ Looks *so* much nicer!
+
+ src/hb-blob.cc | 26 +++++++-------
+ src/hb-object-private.hh | 8 ++--
+ src/hb-open-type-private.hh | 75
+ +++++++++++++++++++-----------------------
+ src/hb-private.hh | 7 +++-
+ 4 files changed, 56 insertions(+), 60 deletions(-)
+
+commit decd4e3e16424dc311e9fb5b663170414a11556a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 25 16:47:02 2011 -0400
+
+ Add sugar syntax for debug messages
+
+ Buffer debugging coming soon.
+
+ src/hb-blob.cc | 35 ++++++++++++---------------------
+ src/hb-object-private.hh | 9 +++----
+ src/hb-open-type-private.hh | 44
+ +++++++++++++++++++++---------------------
+ src/hb-private.hh | 7 ++++-
+ 4 files changed, 44 insertions(+), 51 deletions(-)
+
+commit 3a81b1db89beba91fb91791918b9fdd9f8fc9fa0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 25 16:30:32 2011 -0400
+
+ Minor, fix leak from my previous refactorings
+
+ src/hb-buffer.cc | 14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+commit f4a579bc42fb811ff5c391a0e97b7d8656ef59b1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 25 16:20:16 2011 -0400
+
+ Add internal API for buffer var allocation
+
+ src/hb-buffer-private.hh | 25 +++++++++++++++++++++++--
+ src/hb-buffer.cc | 22 ++++++++++++++++++++++
+ 2 files changed, 45 insertions(+), 2 deletions(-)
+
+commit 651e8dd79ec8eaca5ab75a61e8ce961ff7bd26eb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 25 14:54:08 2011 -0400
+
+ Start cleaning up buffer var allocation
+
+ I've messed up a lot of stuff recently, different parts of the
+ shaping process are stumbling on eachother's toes because
+ manually tracking what's in which buffer var is hard. I'm
+ going to add some internal API to track those such that mistakes
+ are discovered as soon as they are introduced.
+
+ src/hb-ot-layout-gsubgpos-private.hh | 1 -
+ src/hb-ot-layout.cc | 1 +
+ src/hb-ot-shape.cc | 10 ----------
+ 3 files changed, 1 insertions(+), 11 deletions(-)
+
+commit c86f932015bdf5803572b0904d343d3bc033e009
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 25 00:44:50 2011 -0400
+
+ Move code around
+
+ src/hb-ot-shape.cc | 85
+ +++++++++++++++++++++++++--------------------------
+ 1 files changed, 42 insertions(+), 43 deletions(-)
+
+commit 18c42850c9327ab4479ff150660a76d4ff6f3e9c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 25 00:36:58 2011 -0400
+
+ Shrink space used for ligature ids
+
+ This frees 16bits in the glyph_info struct during the ot_layout
+ process.
+ We can use the freed space in the shapers now.
+
+ src/hb-ot-layout-gsubgpos-private.hh | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit d8787493c9aa420544096cef07c29a591a0c1a99
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 25 00:36:01 2011 -0400
+
+ Minor
+
+ src/hb-ot-layout-gsub-private.hh | 6 ------
+ src/hb-ot-layout-gsubgpos-private.hh | 7 +++++++
+ 2 files changed, 7 insertions(+), 6 deletions(-)
+
+commit c311d852080b50ffc85e80168de62abb05a6be59
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 23 23:43:54 2011 -0400
+
+ Keep Unicode props updated as we go so we avoid a scan later
+
+ src/hb-ot-shape-normalize.cc | 54
+ ++++++++++++++++++++---------------------
+ 1 files changed, 26 insertions(+), 28 deletions(-)
+
+commit 5389ff4dbc46c76c9483e3c95f22524b60e21166
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 22 20:22:49 2011 -0400
+
+ Implement the Unicode Canonical Composition algorithm
+
+ Fallback normalization is complete and working now!
+
+ src/hb-ot-shape-normalize.cc | 49
+ +++++++++++++++++++++++++++++++++++++++--
+ 1 files changed, 46 insertions(+), 3 deletions(-)
+
+commit dcdc51cdc0ba9d9fb75f84dd5fa7a49aa0b24ea0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 22 17:14:46 2011 -0400
+
+ Handle singleton decompositions
+
+ src/hb-ot-shape-normalize.cc | 12 +++++++-----
+ 1 files changed, 7 insertions(+), 5 deletions(-)
+
+commit 34c22f816808d061a980cffca12de03beb437fa0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 22 17:04:20 2011 -0400
+
+ Implement Unicode Canonical Reordering Algorithm
+
+ src/hb-ot-shape-normalize.cc | 80
+ +++++++++++++++++++++++++++++++++++------
+ src/hb-ot-shape-private.hh | 2 +
+ src/hb-ot-shape.cc | 6 ++--
+ 3 files changed, 73 insertions(+), 15 deletions(-)
+
+commit 4ff0d2d9dfc4f7e4880a4e964ca9872624508ea0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 22 16:15:32 2011 -0400
+
+ Decomposition works now!
+
+ src/hb-ot-shape-normalize.cc | 109
+ ++++++++++++++++++++++++++----------------
+ src/hb-ot-shape.cc | 3 +-
+ 2 files changed, 70 insertions(+), 42 deletions(-)
+
+commit 468e9cb25c9bc14781b7013e447d763f93bf76a3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 22 11:28:07 2011 -0400
+
+ Move buffer methods into the object
+
+ src/hb-buffer-private.hh | 110 +++----
+ src/hb-buffer.cc | 605
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gpos-private.hh | 88 +++---
+ src/hb-ot-layout-gsub-private.hh | 58 ++--
+ src/hb-ot-layout-gsubgpos-private.hh | 50 ++--
+ src/hb-ot-shape-normalize.cc | 16 +-
+ src/hb-ot-shape.cc | 14 +-
+ 7 files changed, 456 insertions(+), 485 deletions(-)
+
+commit 45412523dc295cb5ee12e096bfacb282cc925843
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 22 11:07:05 2011 -0400
+
+ More normalization kick
+
+ src/hb-ot-shape-normalize.cc | 54
+ ++++++++++++++++++++++++++++--------------
+ src/hb-ot-shape-private.hh | 8 +++++-
+ src/hb-ot-shape.cc | 13 ++-------
+ 3 files changed, 46 insertions(+), 29 deletions(-)
+
+commit 63c0ef4a0763e579c9c80887bbfbd2651de05067
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 21 20:58:42 2011 -0400
+
+ Fix decompose() implementations to work with non-starter
+ non-composables
+
+ Add tests.
+
+ src/hb-glib.cc | 10 +++++-----
+ src/hb-icu.cc | 20 +++++++++++++-------
+ test/test-unicode.c | 11 ++++++++---
+ 3 files changed, 26 insertions(+), 15 deletions(-)
+
+commit 5d90a342e319068716429bf7af76c3896b61a0e5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 21 15:25:01 2011 -0400
+
+ Document normalization design
+
+ src/hb-ot-shape-normalize.cc | 78
+ +++++++++++++++++++++++++++++++++--------
+ src/hb-ot-shape-private.hh | 2 +-
+ src/hb-ot-shape.cc | 6 ++-
+ 3 files changed, 67 insertions(+), 19 deletions(-)
+
+commit 02cdf743c2ec345a44d4fcf865594b6ac13fccd0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 21 12:23:12 2011 -0400
+
+ Add prefer_decomposed() complex-shaper callback
+
+ This allows the Indic shaper to request decomposed characters.
+ This will
+ handle split matra for free. Other shapers prefer precomposed
+ characters.
+
+ src/hb-ot-shape-complex-arabic.cc | 6 ++++++
+ src/hb-ot-shape-complex-indic.cc | 7 +++++++
+ src/hb-ot-shape-complex-misc.cc | 6 ++++++
+ src/hb-ot-shape-complex-private.hh | 31 +++++++++++++++++++++++++++++--
+ 4 files changed, 48 insertions(+), 2 deletions(-)
+
+commit d6b9c6d20041b4f4fa11befc179aee757c41904d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 21 12:16:45 2011 -0400
+
+ More kicking
+
+ src/hb-ot-shape-normalize.cc | 17 ++++++++++++++---
+ 1 files changed, 14 insertions(+), 3 deletions(-)
+
+commit 192445aef2e50087049243ce54ce7059ec441ffa
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 21 12:13:04 2011 -0400
+
+ Remove intermittent_glyph()
+
+ Lets not worry about performance for now...
+
+ src/hb-ot-shape-normalize.cc | 3 ++-
+ src/hb-ot-shape-private.hh | 2 --
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+commit d63adfc7d09b26764d9166da97372b21257e7611
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 21 11:48:57 2011 -0400
+
+ No need to handle variation-selectors seperately, they are GC=Mn
+
+ src/hb-ot-shape.cc | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit aa7264123a088936f2043b45d4d41ca7413fabe5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 21 11:34:59 2011 -0400
+
+ Only form clusters if we are reversing
+
+ This produces more accurate cluster mappings. Cluster mappings are
+ minimal now. Combining marks get their own cluster value most of
+ the time.
+
+ src/hb-ot-shape.cc | 45 ++++++++++++++++++++++-----------------------
+ 1 files changed, 22 insertions(+), 23 deletions(-)
+
+commit 5c6f5982d78e2d7fadc2fbb8b4f3a4be9420c59a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 21 11:31:08 2011 -0400
+
+ Towards normalization
+
+ src/hb-ot-shape-normalize.cc | 33 ++++++++++++++++++++++-----------
+ src/hb-ot-shape-private.hh | 3 ++-
+ src/hb-ot-shape.cc | 4 +++-
+ 3 files changed, 27 insertions(+), 13 deletions(-)
+
+commit ad903e66b1cc4ec1b8160f93b3ab2b5e636f8d62
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 21 10:17:22 2011 -0400
+
+ s/COMBINING_MARK/SPACING_MARK/ here too. Oops!
+
+ test/test-unicode.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit cf7f43ec3382cac2af11f5637c840500daabf889
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 21 01:12:26 2011 -0400
+
+ Remove stale comment
+
+ src/hb-ot-shape.cc | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 54d1a0d2b2c4ffe15494967122c6422ecb1fc80b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 21 01:11:09 2011 -0400
+
+ Form clusters before ensuring native direciton
+
+ This is essential as ensure_native_direction uses cluster info that
+ is set by form_clusters().
+
+ src/hb-ot-shape.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 9111b21ef99d5e53348176f683261b0101eb427f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 21 00:58:29 2011 -0400
+
+ Add _hb_buffer_output_glyph() and _hb_buffer_skip_glyph()
+
+ src/hb-buffer-private.hh | 10 ++++++++++
+ src/hb-buffer.cc | 19 ++++++++++++++++---
+ src/hb-ot-shape.cc | 2 +-
+ 3 files changed, 27 insertions(+), 4 deletions(-)
+
+commit 655586fe5e1fadf2a2ef7826e61ee9a445ffa37a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 21 00:51:18 2011 -0400
+
+ Towards normalization
+
+ src/Makefile.am | 1 +
+ src/hb-ot-shape-normalize.cc | 71
+ ++++++++++++++++++++++++++++++++++++++++++
+ src/hb-ot-shape-private.hh | 12 +++++++
+ src/hb-ot-shape.cc | 10 +-----
+ 4 files changed, 86 insertions(+), 8 deletions(-)
+
+commit 49741c86334d12fa08a5bfa2110ff3b9adcba1c7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 21 00:35:37 2011 -0400
+
+ Include variation-selectors in cluster calculation
+
+ src/hb-ot-shape.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit dd89d958c139d85efb776fffaf314eead3952c78
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 21 00:28:57 2011 -0400
+
+ Fix cluster calculation for non-LTR text
+
+ TODO | 6 ------
+ src/hb-buffer.cc | 5 +++++
+ 2 files changed, 5 insertions(+), 6 deletions(-)
+
+commit 4a68684654e645882095c1189477146287ce9437
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 21 00:14:01 2011 -0400
+
+ When forming clusters, participate all mark types
+
+ src/hb-ot-shape.cc | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 5157e12a55f943b7fc5be7dce0b2ee1bcacca6ec
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 21 00:12:33 2011 -0400
+
+ Rename HB_UNICODE_GENERAL_CATEGORY_COMBINING_MARK to
+ HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK
+
+ Spacing_Mark is the current Unicode long-name for this property value.
+ The previous name was wrongly carried from glib.
+
+ src/hb-common.h | 2 +-
+ src/hb-icu.cc | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 7b08b0a7f2057937dfc3ab2ec191656bf2386463
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 20 23:59:07 2011 -0400
+
+ Minor
+
+ src/hb-ot-shape-complex-arabic.cc | 8 ++++----
+ src/hb-private.hh | 19 +++++++++++++++++++
+ 2 files changed, 23 insertions(+), 4 deletions(-)
+
+commit 498e1a9be673bb02c00aac3f12bb4c6993a85910
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 20 23:19:49 2011 -0400
+
+ [icu] Implement compose()/decompose()
+
+ src/hb-icu.cc | 87
+ +++++++++++++++++++++++++++++++++++++++++++++++++-
+ test/test-unicode.c | 1 +
+ 2 files changed, 86 insertions(+), 2 deletions(-)
+
+commit ffd4a436f7baccb68a0c3602f94ea0246e32844f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 20 22:30:29 2011 -0400
+
+ Add tests for compose()/decompose()
+
+ Adjust glib fallback implementation.
+
+ The tests are not hooked up for ICU yet.
+
+ src/hb-glib.cc | 17 +++++++++++-
+ src/hb-unicode.cc | 2 +-
+ test/test-unicode.c | 66
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 82 insertions(+), 3 deletions(-)
+
+commit fca0923b04aeff9369849da97d247a647611f346
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 20 22:16:13 2011 -0400
+
+ Minor
+
+ src/hb-icu.cc | 62
+ ++++++++++++++++++++++++++++++++++----------------------
+ 1 files changed, 38 insertions(+), 24 deletions(-)
+
+commit 26b6024962b254b624d4f22088b6c87745074743
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 20 21:58:14 2011 -0400
+
+ [glib] Use g_unicode_script_to/from_iso15924() if available
+
+ src/hb-glib.cc | 10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit 22fdc66712464bdb02e45eed49e4be57e79b442f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 20 21:51:37 2011 -0400
+
+ [glib] Add compose() and decompose() implementations with fallback
+
+ src/hb-glib.cc | 126
+ +++++++++++++++++++++++++++++++++++++++++++----------
+ src/hb-unicode.cc | 6 ++-
+ 2 files changed, 106 insertions(+), 26 deletions(-)
+
+commit a54a5505a35eef5315a8e2e7a79502901e3eff5f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 20 16:42:10 2011 -0400
+
+ Minor
+
+ src/hb-ot-shape-complex-indic.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 23db8d5c92c96a34c716b68e1aa6819c5a20477a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 12 12:02:26 2011 -0400
+
+ [test] Work around glib <= 2.30 API
+
+ test/hb-test.h | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 22989c5ffc8cce1ea05d729cdf33661c35a52334
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 12 11:54:58 2011 -0400
+
+ Distribute hb-ot-shape-complex-indic-machine.rl
+
+ src/Makefile.am | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit f6fd3780e12b23ff7ed3743497c8996e71dcb064
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 8 00:22:40 2011 -0400
+
+ Let shapers decide when to apply ccmp and locl
+
+ Instead of always applying those two features before the complex
+ shaper,
+ let the complex shaper decide whether they should be applied first.
+
+ Also add stub for Indic's final_reordering().
+
+ src/hb-ot-shape-complex-arabic.cc | 2 ++
+ src/hb-ot-shape-complex-indic.cc | 16 ++++++++++++++++
+ src/hb-ot-shape.cc | 7 +------
+ 3 files changed, 19 insertions(+), 6 deletions(-)
+
+commit c4641723fbf6532b2e80a662e15573b31276bc73
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 7 23:47:19 2011 -0400
+
+ [API] Add compose() and decompose() unicode funcs, rename other ones
+
+ Add compose() and decompose() unicode funcs. These implement
+ pair-wise canonical composition/decomposition.
+
+ The glib/icu implementations are lacking for now. We are adding
+ API for this to glib, but I cannot find any useful API in ICU.
+ May end of implementing these in-house.
+
+ Changed all unicode_funcs callback names to remove the "_get" part.
+ Eg, hb_unicode_get_script_func_t is now hb_unicode_script_func_t,
+ and hb_unicode_get_script() is hb_unicode_script() now.
+
+ TODO | 4 ++-
+ src/hb-glib.cc | 6 +++-
+ src/hb-icu.cc | 6 +++-
+ src/hb-ot-shape.cc | 6 ++--
+ src/hb-shape.cc | 2 +-
+ src/hb-unicode-private.hh | 8 +++--
+ src/hb-unicode.cc | 85
+ ++++++++++++++++++++++++++++++++------------
+ src/hb-unicode.h | 70 ++++++++++++++++++++++++++----------
+ test/test-unicode.c | 21 ++++++-----
+ 9 files changed, 146 insertions(+), 62 deletions(-)
+
+commit d05dded1676924e8894c90f7a7c3527b492bcdff
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 7 23:42:40 2011 -0400
+
+ More code generation through preprocessor
+
+ src/hb-ot-shape-complex-private.hh | 46
+ ++++++++++++++++++++++-------------
+ 1 files changed, 29 insertions(+), 17 deletions(-)
+
+commit 891c4755baae6cd59fad59d27fd8933e5f548a74
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 7 23:19:27 2011 -0400
+
+ Humm, undo some shuffling
+
+ In preparation for adding more advanced unicode funcs.
+
+ src/hb-ot-shape.cc | 6 ++--
+ src/hb-shape.cc | 2 +-
+ src/hb-unicode-private.hh | 36 ++++++++++++------------
+ src/hb-unicode.cc | 65
+ +++++++++++++++++++++++++++++++++------------
+ 4 files changed, 70 insertions(+), 39 deletions(-)
+
+commit 4b6317c4f426cfaf21e509dbf6ee6d4e0422cdac
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 7 23:14:42 2011 -0400
+
+ More code shuffling
+
+ src/hb-font-private.hh | 16 +++---
+ src/hb-font.cc | 3 +-
+ src/hb-unicode-private.hh | 42 +++++++-------
+ src/hb-unicode.cc | 140
+ +++++++++++++++++----------------------------
+ 4 files changed, 82 insertions(+), 119 deletions(-)
+
+commit 3361c9a323575309d9fd55fe076697a3e22073c0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 7 22:35:17 2011 -0400
+
+ Minor
+
+ src/Makefile.am | 1 +
+ src/hb-ot-shape-complex-misc.cc | 51
+ ++++++++++++++++++++++++++++++++++++
+ src/hb-ot-shape-complex-private.hh | 12 +++++---
+ 3 files changed, 60 insertions(+), 4 deletions(-)
+
+commit 76f76812ac7cca8ac6935952a2360d5e151480fa
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 7 22:25:25 2011 -0400
+
+ Shuffle code around, remove shape_plan from complex shapers
+
+ src/hb-ot-shape-complex-arabic.cc | 36 ++++++++++++------------
+ src/hb-ot-shape-complex-indic-machine.rl | 12 ++++----
+ src/hb-ot-shape-complex-indic.cc | 25 ++++++++---------
+ src/hb-ot-shape-complex-private.hh | 44
+ +++++++++++++++++++----------
+ src/hb-ot-shape-private.hh | 13 +-------
+ src/hb-ot-shape.cc | 4 +-
+ 6 files changed, 69 insertions(+), 65 deletions(-)
+
+commit e88bff9b4d77dc86c04832163081effbff752216
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 7 22:03:02 2011 -0400
+
+ Minor, use function typedefs
+
+ src/hb-ot-shape-complex-private.hh | 10 ++++++----
+ 1 files changed, 6 insertions(+), 4 deletions(-)
+
+commit 359dcaa0d33271025ca42a5f54ecbac7ae3b56d3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 7 21:55:05 2011 -0400
+
+ Update copyright headers
+
+ src/hb-ot-map-private.hh | 2 +-
+ src/hb-ot-map.cc | 2 +-
+ src/hb-ot-shape-complex-private.hh | 2 +-
+ src/hb-ot-shape.cc | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+commit d8d0c480c85246a74d47dd5297019c7e39391ab0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 7 21:22:08 2011 -0400
+
+ Refactor some code common to GSUB and GPOS
+
+ src/hb-ot-map-private.hh | 29 +++++++++++++++++-------
+ src/hb-ot-map.cc | 54
+ ++++++++-------------------------------------
+ 2 files changed, 30 insertions(+), 53 deletions(-)
+
+commit b70c96dbe41d6512b80fe3d966a1942e1ef64a4b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 7 21:07:41 2011 -0400
+
+ Enable applying GSUB/GPOS features in multiple segments
+
+ Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=644184
+ among others.
+
+ Shapers now can request segmented feature application by calling
+ add_gsub_pause() or add_gpos_pause(). They can also provide a
+ callback to be called at the pause. Currently the Arabic shaper
+ uses pauses to enforce certain feature application. The Indic
+ shaper can use the same facility to pause and do reordering in the
+ callback.
+
+ src/hb-ot-map-private.hh | 50 +++++++++++---
+ src/hb-ot-map.cc | 132
+ ++++++++++++++++++++++++++++++++-----
+ src/hb-ot-shape-complex-arabic.cc | 24 ++++++-
+ src/hb-private.hh | 5 ++
+ 4 files changed, 181 insertions(+), 30 deletions(-)
+
+commit f6d7a9bb4c19e605f1f16d9ca40adefba138c37e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 7 16:20:35 2011 -0400
+
+ Shuffle code around
+
+ src/hb-ot-map-private.hh | 68
+ +++++++++++++++++++++++-----------------------
+ 1 files changed, 34 insertions(+), 34 deletions(-)
+
+commit fc551edbf236d71a522ae7c2c9461aa71c5f7d66
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 7 16:09:38 2011 -0400
+
+ Add todo
+
+ I'm too lazy to fix the tests now.
+
+ test/test-shape.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 2e18c6dbdfbbfdec0490260bb7cb5213551b2188
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 6 16:05:45 2011 -0400
+
+ Fix reverse_range() position loop
+
+ Mozilla Bug 669175 - Slow rendering of text sometimes in this case,
+ using direction: rtl
+
+ src/hb-buffer.cc | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+commit fa2befa46f215d8c33a54dfc57889928a628164c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 4 17:18:57 2011 -0400
+
+ Minor
+
+ src/hb-view.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit d69d5ceaa0ad30e8d4b9783507c59c6d4221de4f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jul 4 12:56:38 2011 -0400
+
+ [Indic] Well, at least finding syllables works now :)
+
+ Still not much there.
+
+ src/hb-ot-shape-complex-indic-machine.rl | 4 +++-
+ src/hb-ot-shape-complex-indic.cc | 9 ++++++++-
+ 2 files changed, 11 insertions(+), 2 deletions(-)
+
+commit 253a57fb5ab211f67140e6139d183e49483a9074
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 28 17:26:03 2011 -0400
+
+ [test-shape-complex] Remove the greek tests
+
+ They are outdated with respect to the DejaVu Sans I'm using.
+ We need to add font version checking to the tests.
+
+ test/test-shape-complex.c | 17 -----------------
+ 1 files changed, 0 insertions(+), 17 deletions(-)
+
+commit afa74bf90405fb121d3132982b87762c1686d80c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 28 17:25:17 2011 -0400
+
+ [test-shape-complex] Print out expected and actual glyphstrings
+ upon failure
+
+ One has to run the test with --verbose to see that right now.
+
+ test/test-shape-complex.c | 25 ++++++++++++++++++++++---
+ 1 files changed, 22 insertions(+), 3 deletions(-)
+
+commit 42d453b0236f67239342df2003b7abce6e2c51ea
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 28 16:59:16 2011 -0400
+
+ [test] Name tests after their input string
+
+ test/Makefile.am | 2 +-
+ test/test-shape-complex.c | 150
+ +++++++++++++++++++++++++++++---------------
+ 2 files changed, 100 insertions(+), 52 deletions(-)
+
+commit 27413169782fdf79e278dd6552c8e194b3bc4eaa
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 28 16:21:31 2011 -0400
+
+ Minor
+
+ Towards a better test runner.
+
+ test/test-shape-complex.c | 10 +++++++++-
+ 1 files changed, 9 insertions(+), 1 deletions(-)
+
+commit cc674cbf7fb9972975dc0499974e5e7fb4ae3c81
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 28 16:17:16 2011 -0400
+
+ Minor
+
+ test/test-shape-complex.c | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 20d8a3982ae320035edd6a04b402cefc9a5e5779
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 28 16:16:21 2011 -0400
+
+ [test] Remove disabled code
+
+ We'd add normalization and decomposition tests later.
+
+ test/test-shape-complex.c | 92
+ ---------------------------------------------
+ 1 files changed, 0 insertions(+), 92 deletions(-)
+
+commit 9704f0ca6c2defed52640da77506c80bc67b4f56
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 28 16:15:46 2011 -0400
+
+ [test] Restructure shape test data a bit
+
+ test/test-shape-complex.c | 75
+ +++++++++++++++++++++++++-------------------
+ 1 files changed, 43 insertions(+), 32 deletions(-)
+
+commit 4ec30aec3014be6effc09cbbc88dcd075f3826df
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 28 14:13:38 2011 -0400
+
+ [Indic] Optimize Indic table storage
+
+ src/hb-ot-shape-complex-indic.cc | 8 +++++---
+ src/hb-private.hh | 1 +
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+commit c4a59de6d8c1e581b5c155319232be9e805e5cba
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 28 14:03:29 2011 -0400
+
+ [Indic] Generate a single data table instead of multiple ones
+
+ src/gen-indic-table.py | 30 +++++++++------
+ src/hb-ot-shape-complex-indic-table.hh | 62
+ +++++++++++++++----------------
+ 2 files changed, 48 insertions(+), 44 deletions(-)
+
+commit a346e923a99f920bbebc25b335db51fdfb1429ea
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 28 12:49:18 2011 -0400
+
+ [test] Add Indic tests from harfbuzz.old
+
+ Needs fonts to be put in test/fonts. Tests are skipped otherwise.
+ Run with --verbose for details. Working on improving the test runner
+ to make it easier to make sense of what's going on.
+
+ test/Makefile.am | 11 +-
+ test/hb-test.h | 21 +
+ test/test-shape-complex.c | 1179
+ +++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 1209 insertions(+), 2 deletions(-)
+
+commit 8fdba506f0f1c66b50f8f4b114d624cb956d03b7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 24 20:45:55 2011 -0400
+
+ [Indic] Define indic_position_t
+
+ src/hb-ot-shape-complex-indic.cc | 239
+ +++++++++++++++++++-------------------
+ 1 files changed, 122 insertions(+), 117 deletions(-)
+
+commit 65988a145b4a52c37fd53c1473034f9e701f61d9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 24 19:05:52 2011 -0400
+
+ [Indic] Add a table of consonant positions
+
+ Copied form HarfBuzz.old Indic data. These are below and post
+ consonants. This is temporary. Read the comment in the patch.
+
+ src/hb-ot-shape-complex-indic.cc | 106
+ ++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 106 insertions(+), 0 deletions(-)
+
+commit c7fe56a1d5d3e969b6ec51cd9ecd471706a19568
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 24 19:05:34 2011 -0400
+
+ [Indic] Some of the basic features are global; Mark them so
+
+ src/hb-ot-shape-complex-indic-machine.rl | 1 +
+ src/hb-ot-shape-complex-indic.cc | 48
+ +++++++++++++++++++++---------
+ 2 files changed, 35 insertions(+), 14 deletions(-)
+
+commit 867361c3ad39629a8d5b7dc48d558a1c19e37d43
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 17 18:35:46 2011 -0400
+
+ [indic] Add syllable recognition state machine
+
+ Using an incredible tool called Ragel.
+
+ src/Makefile.am | 5 ++
+ src/hb-ot-shape-complex-indic-machine.rl | 105
+ ++++++++++++++++++++++++++++++
+ src/hb-ot-shape-complex-indic.cc | 21 ++++--
+ 3 files changed, 125 insertions(+), 6 deletions(-)
+
+commit 422e08dbb8e2c0c5664f1bdc7e159a673cfea8c5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jun 15 17:22:48 2011 -0400
+
+ Better categorize Indic character classes
+
+ Matches OT types now.
+
+ src/hb-ot-shape-complex-indic.cc | 51
+ +++++++++++++++++++++++--------------
+ 1 files changed, 32 insertions(+), 19 deletions(-)
+
+commit 31f18abecb149f8888a72510f2660328dd6de16d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jun 15 09:49:58 2011 -0400
+
+ Minor compiler warning fixes
+
+ src/hb-buffer-private.hh | 8 ++++----
+ src/hb-object-private.hh | 4 ++--
+ src/hb-open-type-private.hh | 6 +++---
+ src/hb-ot-layout-common-private.hh | 8 ++++----
+ src/hb-ot-map.cc | 28 +++++++++++++++-------------
+ src/hb-ot-shape-complex-arabic.cc | 3 +--
+ src/hb-view.cc | 11 ++++++-----
+ test/test-object.c | 22 +++++++++++-----------
+ test/test-unicode.c | 4 ++--
+ 9 files changed, 48 insertions(+), 46 deletions(-)
+
+commit e3693b72f0651985d4f619cde668611639dca885
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jun 15 09:33:52 2011 -0400
+
+ Change a couple strstr() to strchr()
+
+ src/hb-ot-tag.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit b9452bfc1696457e156e79037c863903da5454fc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 14 14:47:07 2011 -0400
+
+ Fix compiler warnings with -pedantic
+
+ src/hb-blob.cc | 18 +++++++++---------
+ src/hb-glib.cc | 20 ++++++++++----------
+ src/hb-icu.cc | 20 ++++++++++----------
+ src/hb-object-private.hh | 2 +-
+ src/hb-open-type-private.hh | 14 +++++++-------
+ src/hb-ot-layout-gdef-private.hh | 2 +-
+ src/hb-ot-layout.cc | 2 +-
+ src/hb-ot-map-private.hh | 2 +-
+ src/hb-ot-shape-complex-indic.cc | 8 ++++----
+ src/hb-ot-shape-private.hh | 2 +-
+ src/hb-ot-shape.cc | 2 +-
+ 11 files changed, 46 insertions(+), 46 deletions(-)
+
+commit 970e092dc23cbeb7897d4c7bb58c042209f518fb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 14 14:35:44 2011 -0400
+
+ Remove extra semicolon
+
+ src/hb-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 81426808020e2b88f008480bd63519aa68c579a7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jun 13 16:02:18 2011 -0400
+
+ Cosmetic
+
+ src/gen-indic-table.py | 9 +-
+ src/hb-ot-shape-complex-indic-table.hh | 1038
+ ++++++++++++++++----------------
+ 2 files changed, 524 insertions(+), 523 deletions(-)
+
+commit 902ab866f2d2edc3a71c1203065e6ddf49e5b431
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jun 10 23:08:54 2011 -0400
+
+ GNOME Bug 652227 - Unconditional use of stdint.h
+
+ src/hb-common.h | 33 ++++++++++++++++++++++-----------
+ 1 files changed, 22 insertions(+), 11 deletions(-)
+
+commit 20503ccd578c9983162857954e3236413469ed35
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 7 17:02:48 2011 -0400
+
+ More Indic data shuffling
+
+ src/hb-ot-shape-complex-indic.cc | 74
+ +++++++++++++++++++++++++------------
+ 1 files changed, 50 insertions(+), 24 deletions(-)
+
+commit 63b177e45c2405272da3fa6c26fe11ae37950bd0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 7 15:51:40 2011 -0400
+
+ Minor
+
+ src/hb-ot-shape.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit b9ddbd55930228422e82b34a141ad1b6093f5376
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jun 2 17:43:12 2011 -0400
+
+ [Indic] Start an Indic shaper
+
+ Nothing functional in there yet.
+
+ So far, we're parsing IndicSyllabicCategory.txt and
+ IndicMatraCategory.txt
+ fils from Unicode Character Database and store them in an array to
+ be used
+ by the shaper. Also hooked up the shaper, but it does not do anything
+ right now.
+
+ src/Makefile.am | 3 +
+ src/gen-indic-table.py | 201 ++++++++
+ src/hb-ot-shape-complex-arabic.cc | 4 +-
+ src/hb-ot-shape-complex-indic-table.hh | 834
+ ++++++++++++++++++++++++++++++++
+ src/hb-ot-shape-complex-indic.cc | 141 ++++++
+ src/hb-ot-shape-complex-private.hh | 58 ++-
+ src/hb-ot-shape-private.hh | 3 +-
+ 7 files changed, 1237 insertions(+), 7 deletions(-)
+
+commit 697a65c5f5cda53bc68720886a253a019e8212a8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jun 1 20:52:00 2011 -0400
+
+ Minor
+
+ src/gen-arabic-table.py | 21 +++++++++++++--------
+ src/hb-ot-shape-complex-arabic-table.hh | 9 ++++-----
+ 2 files changed, 17 insertions(+), 13 deletions(-)
+
+commit 9de1481f2bbbf2a174280b849628612f36a2f701
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jun 1 20:45:14 2011 -0400
+
+ Update to ArabicShaping-6.1.0d2.txt
+
+ src/hb-ot-shape-complex-arabic-table.hh | 307
+ ++++++++++++++++++++-----------
+ 1 files changed, 197 insertions(+), 110 deletions(-)
+
+commit 9d49433efba2217852f4e44f056465b451961c49
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jun 1 18:10:10 2011 -0400
+
+ Minor rename
+
+ src/Makefile.am | 2 +-
+ src/gen-arabic-joining-table.py | 83
+ -------------------------------
+ src/gen-arabic-table.py | 83
+ +++++++++++++++++++++++++++++++
+ src/hb-ot-shape-complex-arabic-table.hh | 2 +-
+ 4 files changed, 85 insertions(+), 85 deletions(-)
+
+commit 0eafce56eed4c5166ee5b97b121a452ffd292a7a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jun 1 12:44:30 2011 -0400
+
+ [TODO] New items
+
+ TODO | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 89a2bc9ba674e7e57fec1fd8ce7648a44f3aab63
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 31 15:18:13 2011 -0400
+
+ [Vertical] Apply vertical features
+
+ We apply all of vert, vrt2, vkrn, valt, and vpal.
+
+ TODO | 7 -------
+ src/hb-ot-shape.cc | 50
+ +++++++++++++++++++++++++++++++++++++++++---------
+ 2 files changed, 41 insertions(+), 16 deletions(-)
+
+commit 0c6a9767c812c00f2a6a02d9f43f4694e1f43815
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 31 12:59:17 2011 -0400
+
+ [hb-view] Add --face-index to choose a face in a TrueType Collection
+
+ src/hb-view.cc | 7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 4f28fbdd804fabeec57a98fe267d892ab58b3a6d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 31 12:33:11 2011 -0400
+
+ Fix TTC header handling
+
+ Also change the Version type to avoid similar bugs in the future.
+
+ Reported by Grigori Goronzy.
+
+ src/hb-open-file-private.hh | 6 +++---
+ src/hb-open-type-private.hh | 2 +-
+ src/hb-ot-layout-gdef-private.hh | 6 +++---
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 21deab2bdc58d8e9f1a3ba1f9c61c30a79e288a1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 30 11:08:40 2011 -0400
+
+ Fixed inifinite loop introduced in 7403e055cd1463f
+
+ k is the index, not j.
+
+ Reported by Tom Hacohen.
+
+ src/hb-ot-layout-gpos-private.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 51881a61ca96c3328e2d92927a5a61e60997a429
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 27 18:15:56 2011 -0400
+
+ Shrink code size
+
+ src/hb-ot-map-private.hh | 11 +----------
+ src/hb-ot-map.cc | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 10 deletions(-)
+
+commit 90645fb24bcbb78183576d3641a99560d87e49f2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 27 18:13:31 2011 -0400
+
+ [OT] Separate map_builder from the actual map
+
+ Respectively, separate planner from the actual plan.
+
+ src/hb-ot-map-private.hh | 121
+ +++++++++++++++++++----------------
+ src/hb-ot-map.cc | 33 +++++-----
+ src/hb-ot-shape-complex-arabic.cc | 6 +-
+ src/hb-ot-shape-complex-private.hh | 8 +-
+ src/hb-ot-shape-private.hh | 22 +++++++
+ src/hb-ot-shape.cc | 28 +++++----
+ 6 files changed, 127 insertions(+), 91 deletions(-)
+
+commit 5560a19e2b3901437d8ee2e5905b4ac77073bfbe
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 27 17:49:16 2011 -0400
+
+ Minor
+
+ src/hb-view.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 1587c26fe94087040b4a5d682ec196f568e4a1a2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 27 16:05:01 2011 -0400
+
+ [TODO] Add item
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 5c9f14932d59e306fbc72f7daecb384a16da73d9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 27 15:59:33 2011 -0400
+
+ Minor
+
+ Makefile.am | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 5bc18195d55570ef01e4b24dd248f222f081b0a2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 27 15:58:54 2011 -0400
+
+ Add check-includes.sh
+
+ src/Makefile.am | 7 ++++++
+ src/check-c-linkage-decls.sh | 6 ++++-
+ src/check-header-guards.sh | 8 ++++++-
+ src/check-includes.sh | 42
+ +++++++++++++++++++++++++++++++++++++++++
+ src/check-internal-symbols.sh | 8 +++---
+ src/check-libstdc++.sh | 7 +++--
+ src/hb-ot-shape.h | 1 +
+ 7 files changed, 70 insertions(+), 9 deletions(-)
+
+commit 3f12c434e20261f6d5c600e56575b7dfdd5b1470
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 27 04:58:11 2011 -0400
+
+ [configure] Generate sha256sum and GPG-sign it
+
+ Makefile.am | 29 ++++++++++++++++++++++++++++-
+ 1 files changed, 28 insertions(+), 1 deletions(-)
+
+commit 75ba4073ca6f72c135927d9314197a605281b789
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 27 03:58:17 2011 -0400
+
+ [test] Rename valgrind-log to log-vaglring.txt
+
+ test/Makefile.am | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit e3b0ba8e292e6a90666cfbbab6faf11ae11f9ddb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 27 03:56:37 2011 -0400
+
+ Minor
+
+ harfbuzz.doap | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 595dc63eee926a0e0fee26f8225b5fbe00610fcb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 27 04:14:12 2011 -0400
+
+ Bump version to 0.7.0 to open up for development
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f24557604281356131618546332d7ee3a0c8abef
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 25 16:08:06 2011 -0400
+
+ Release 0.6.0. First official tarball release!
+
+ There are no API guarantees just yet, but I *expect* that no
+ incompatible API changes to happen before 1.0.0.
+
+ Update NEWS.
+
+ NEWS | 262
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ configure.ac | 2 +-
+ 2 files changed, 263 insertions(+), 1 deletions(-)
+
+commit 654f88fbc9bcb54f9bd2d5586236234e03424044
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 27 03:38:46 2011 -0400
+
+ [test-common] Test hb_direction_to_string()
+
+ Caught by "make check-symbols".
+
+ test/test-common.c | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 18bced134fc3379c9124ba029e22ff3f6434ca0f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 27 03:38:30 2011 -0400
+
+ [test] Rename test-symbols to check-symbols
+
+ Shows undocumented symbols.
+
+ test/Makefile.am | 37 +++++++++++++++++++++----------------
+ 1 files changed, 21 insertions(+), 16 deletions(-)
+
+commit 376dafa6ed414e368e9dc1d5a2e0bfc8e55f410d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 27 03:35:58 2011 -0400
+
+ Hide internal symbols
+
+ src/hb-ot-shape.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 0e482ec6ba30b613f2d7ee97c61be458c5aebcd6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 27 02:46:28 2011 -0400
+
+ [test/unicode] Fix double-free
+
+ Caught by "make check-valgrind".
+
+ test/Makefile.am | 2 +-
+ test/test-unicode.c | 2 --
+ 2 files changed, 1 insertions(+), 3 deletions(-)
+
+commit 28b1bac5415774cf892c9cc0afcac1324c2093f5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 27 02:44:29 2011 -0400
+
+ [test] Switch to automake-based test-runner
+
+ Adds check-valgrind among other modes. We do not run under gtester by
+ default anymore.
+
+ Makefile.am | 2 +
+ test/Makefile.am | 48 ++++++++++++++++++++++++++--
+ test/Makefile.decl | 90
+ ----------------------------------------------------
+ 3 files changed, 47 insertions(+), 93 deletions(-)
+
+commit adbc97ddde27cf609d95d3249f3ea8060a6e1d20
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 27 01:33:18 2011 -0400
+
+ [test] Add test-symbols that checks API symbol text coverage
+
+ We're not at 100% coverage yet, so do not enable the test by default.
+
+ test/Makefile.am | 21 +++++++++++++++++++++
+ 1 files changed, 21 insertions(+), 0 deletions(-)
+
+commit 9313b9aa66a82fd3fa60d8417c22a5350e5a8791
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 27 01:00:55 2011 -0400
+
+ [test/version] Test hb-version.h
+
+ test/Makefile.am | 1 +
+ test/test-version.c | 80
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 81 insertions(+), 0 deletions(-)
+
+commit 329c15714be90d3fc2d9054f80cb14fa325dc959
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 25 16:07:07 2011 -0400
+
+ Add libtool versioning
+
+ The versioning is automatic. For now, soname-major is 0. With
+ the 1.0.0 release it will jump to 1 and stay there forever.
+
+ configure.ac | 26 +++++++++++++++++++++-----
+ src/Makefile.am | 1 +
+ 2 files changed, 22 insertions(+), 5 deletions(-)
+
+commit 5b21eff8c4a00962d4315a47a65a143abe323299
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 25 14:49:35 2011 -0400
+
+ Update README, etc
+
+ COPYING | 1 +
+ README | 8 +++-----
+ configure.ac | 2 +-
+ 3 files changed, 5 insertions(+), 6 deletions(-)
+
+commit 5bf56ea056b30fba8e07e82ec818c430cab8cafd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 25 14:43:10 2011 -0400
+
+ [TODO] Add item
+
+ TODO | 2 ++
+ test/test-shape.c | 2 ++
+ 2 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 2d8ebcb9d089c2cfbefac71ca6350e2703ab13e3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 25 11:27:33 2011 -0400
+
+ [API] One last font-funcs API change
+
+ Now that vertical text works correctly, I'm doing a last round
+ modification of the font-funcs API to simplify. Expect no more
+ changes around here.
+
+ src/hb-font.cc | 107
+ +++++++++++++++++-----------------------------------
+ src/hb-font.h | 50 +++++++++++--------------
+ src/hb-ft.cc | 26 +++++-------
+ test/test-font.c | 27 ++++++-------
+ test/test-shape.c | 21 +++++-----
+ 5 files changed, 91 insertions(+), 140 deletions(-)
+
+commit d31691296f7d3051fcd345bf1325d17835484b50
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 25 11:01:32 2011 -0400
+
+ [test] Update to API changes
+
+ test/test-font.c | 72
+ ++++++++++++++++++++--------------------------------
+ test/test-shape.c | 35 +++++++++++--------------
+ 2 files changed, 44 insertions(+), 63 deletions(-)
+
+commit 7403e055cd1463f38215ad9faedd61c3e1b66ac5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 24 21:04:15 2011 -0400
+
+ [Vertical] fix vertical gpos
+
+ Wow, it took me a few days to find the right fix!
+
+ We now set the advance for attached marks to zero, but we
+ do this in the _finish() state of gpos, so it shouldn't
+ regress with fonts like DejaVuSansMono that explicitly
+ decrease the mark advance width to set it to zero.
+
+ src/hb-ot-layout-gpos-private.hh | 167
+ ++++++++++++++++++++++----------------
+ src/hb-ot-shape.cc | 9 ++-
+ 2 files changed, 103 insertions(+), 73 deletions(-)
+
+commit ff7cbd0219a7c260612c53b3bed343747d79ec4e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 25 09:56:06 2011 -0400
+
+ [TODO] Update
+
+ TODO | 14 ++++++++++++--
+ 1 files changed, 12 insertions(+), 2 deletions(-)
+
+commit 3b0bb855e011099f1a4c77ffc5214c658e280b2d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 20 15:59:59 2011 -0400
+
+ [Vertical] GPOS x/y advance adjustments only apply in hori/vert
+ respectively
+
+ src/hb-ot-layout-gpos-private.hh | 31 +++++++++++++++++++++----------
+ 1 files changed, 21 insertions(+), 10 deletions(-)
+
+commit cc2086d67ce559878a5ce2b41d89a37eabac90b8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 19 19:19:50 2011 -0400
+
+ [Vertical] Fix GPOS y-advance direction
+
+ src/hb-ot-layout-gpos-private.hh | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+commit 67d51ff96154c8909734046601e439dd8f6a86df
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 19 19:08:57 2011 -0400
+
+ [Vertical] Do fallback origin calculation
+
+ src/hb-font.cc | 32 +++++++++++++++++++++++++++-----
+ 1 files changed, 27 insertions(+), 5 deletions(-)
+
+commit 60fbb36096e344e9af79409ce8cfe3f1f7b0d321
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 19 18:46:15 2011 -0400
+
+ [Vertical] GPOS is always done with horizontal origin
+
+ src/hb-font-private.hh | 4 +-
+ src/hb-font.cc | 187
+ ++++++++++++++++++--------------------
+ src/hb-font.h | 53 +++++------
+ src/hb-ft.cc | 47 ++++------
+ src/hb-ot-layout-gdef-private.hh | 18 ++--
+ src/hb-ot-layout-gpos-private.hh | 23 ++---
+ src/hb-ot-layout.h | 2 +-
+ src/hb-ot-shape.cc | 15 +++
+ 8 files changed, 166 insertions(+), 183 deletions(-)
+
+commit 8b38faeede41e64eb0f6ac2e12ce51dd7138d50a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 19 13:08:00 2011 -0400
+
+ More vertical
+
+ Starting to get there, but not without yet another round of changes.
+
+ I think I know wheere to go now.
+
+ src/hb-font.cc | 44 ++++++++++++++++++++++++++++++++------------
+ src/hb-font.h | 10 ++++++++++
+ src/hb-ft.cc | 14 ++++++++++++--
+ src/hb-ot-shape.cc | 4 ++++
+ 4 files changed, 58 insertions(+), 14 deletions(-)
+
+commit e609aeb1e24da6b7c812396cddb93ee3c95ef87a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 18 10:17:02 2011 -0400
+
+ [hb-view] Add --annotate
+
+ Currently it only marks glyph origins.
+
+ src/hb-view.cc | 20 +++++++++++++++++++-
+ 1 files changed, 19 insertions(+), 1 deletions(-)
+
+commit b8d76dd74e50d295918cc015e9d2a55e2bf6a461
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 17 23:31:00 2011 -0400
+
+ Vertical: Adjust origin in glyph_extents() and glyph_contour_point()
+
+ The base for vertical is almost ready now.
+
+ src/hb-font.cc | 12 ++++++++----
+ 1 files changed, 8 insertions(+), 4 deletions(-)
+
+commit 190981851fe2bb6479b5c72451279f66fe4f6e23
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 17 23:27:22 2011 -0400
+
+ Cosmetic
+
+ src/hb-font.cc | 114
+ ++++++++++++++++++++++++++++----------------------------
+ src/hb-ft.cc | 36 ++++++++---------
+ 2 files changed, 74 insertions(+), 76 deletions(-)
+
+commit 2c3f51a11c176aa3fc12a9522325efaef2c79d35
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 17 23:23:27 2011 -0400
+
+ Minor
+
+ src/hb-font.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 7e2c85de305be59e1a6afa7d2061e4b7dd00acf7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 17 17:55:03 2011 -0400
+
+ [API] Vertical support, take 2
+
+ I like this API *much* better. Implementation still incomplete, but
+ horizontal works.
+
+ src/hb-font-private.hh | 7 +-
+ src/hb-font.cc | 185
+ ++++++++++++++++++++++---------------
+ src/hb-font.h | 109 ++++++++++++----------
+ src/hb-ft.cc | 66 ++++++++------
+ src/hb-ot-layout-gdef-private.hh | 2 +-
+ src/hb-ot-layout-gpos-private.hh | 2 +-
+ src/hb-ot-shape.cc | 8 +-
+ 7 files changed, 218 insertions(+), 161 deletions(-)
+
+commit 744970af4d884cc87ffa645804578fec8df674a9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 16 18:15:37 2011 -0400
+
+ [API] Add support for vertical text
+
+ Design not final yet, and in fact I'm going to change it immediately,
+ but this is an standalone change for itself.
+
+ src/hb-font-private.hh | 35 ++--
+ src/hb-font.cc | 387
+ +++++++++++++++++++++++++---------
+ src/hb-font.h | 164 +++++++++++----
+ src/hb-ft.cc | 227 +++++++++++++-------
+ src/hb-ot-layout-gdef-private.hh | 2 +-
+ src/hb-ot-layout-gpos-private.hh | 35 ++--
+ src/hb-ot-layout-gsub-private.hh | 1 +
+ src/hb-ot-layout-gsubgpos-private.hh | 1 +
+ src/hb-ot-shape.cc | 14 +-
+ src/hb-ot-tag.cc | 2 +-
+ test/test-font.c | 61 +++---
+ test/test-shape.c | 17 +-
+ 12 files changed, 650 insertions(+), 296 deletions(-)
+
+commit 80dce8b7c8202766d52cc7666355446bbf5b0565
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 17 17:08:36 2011 -0400
+
+ Minor
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 5be7d047f6bf54cc577e311b5426c463d2b9b131
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 17 15:05:34 2011 -0400
+
+ Check for mmap()
+
+ Apparently there exist systems with mprotect(), but not mmap()?
+
+ configure.ac | 2 +-
+ test/test-blob.c | 6 ++++--
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+commit 4053f3f788353448b41e541ee617aafbe1cac366
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 16 16:20:48 2011 -0400
+
+ Cosmetic
+
+ src/hb-font.h | 8 ++++----
+ test/test-shape.c | 6 +++---
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 56d12e0356bee5a95b870dfbc2100b8caeb5d593
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 16 16:01:58 2011 -0400
+
+ Remove unnecessary TODO item
+
+ src/hb-ft.cc | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 1883af3796459cafe2d194064403b6b1152c584d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 16 15:18:16 2011 -0400
+
+ [hb-view] Start work on vertical support
+
+ src/hb-view.cc | 10 ++++++----
+ 1 files changed, 6 insertions(+), 4 deletions(-)
+
+commit 9aa6f96af5e5940ba5c9596c6ae377fea23c0ec0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 16 15:08:31 2011 -0400
+
+ [hb-view] No need to allocate an extra glyph item at the end
+
+ src/hb-view.cc | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit a0359485c9997e3a211f7c00d40c09074d906c4f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 16 15:07:48 2011 -0400
+
+ Minor
+
+ test/test-shape.c | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 92de53ea450eaee077eb1730e6d7a487b20ac721
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 16 12:24:56 2011 -0400
+
+ [test/buffer] Add more tests for nil buffer
+
+ test/test-buffer.c | 38 ++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 38 insertions(+), 0 deletions(-)
+
+commit 065fb38c9a338ddb095f2ec9e034fcc5a02167bd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 13 23:04:46 2011 -0400
+
+ [test/ot-tag] More tests
+
+ test/test-ot-tag.c | 9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+commit 1a64f6e19a4b483e278c85e4941107be2f71b0a4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 13 22:55:32 2011 -0400
+
+ [API] Add HB_LANGUAGE_INVALID
+
+ src/hb-common.cc | 5 +++--
+ src/hb-common.h | 2 ++
+ src/hb-ot-tag.cc | 2 +-
+ src/hb-shape.cc | 2 +-
+ test/test-common.c | 9 ++++++---
+ 5 files changed, 13 insertions(+), 7 deletions(-)
+
+commit 40b5c2e86c633441040196d158e965ad95d6ad37
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 13 22:46:36 2011 -0400
+
+ [test/test-ot-tag] Test hb-ot-tag.h, fix many bugs
+
+ I'm in awe with how many bugs this test revealed. All fixed.
+
+ src/hb-ot-tag.cc | 153 +++++++++++++++++++++--------------
+ test/Makefile.am | 3 +
+ test/test-ot-tag.c | 227
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 320 insertions(+), 63 deletions(-)
+
+commit 1368018b475c2a6dd5f625af99695ae2fcba1f05
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 13 20:25:38 2011 -0400
+
+ [TODO] Add items
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 7fc5a30cb4fbe9a4633ab842b0a8cbbcc6f6bd1b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 12 17:48:20 2011 -0400
+
+ [API] Add hb_face_make/is_immutable()
+
+ src/hb-font-private.hh | 2 ++
+ src/hb-font.cc | 18 ++++++++++++++++++
+ src/hb-font.h | 6 ++++++
+ test/test-font.c | 2 ++
+ test/test-object.c | 2 +-
+ 5 files changed, 29 insertions(+), 1 deletions(-)
+
+commit 20c8b908ddf50a9814dfdd9fca595f258273cd4f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 12 15:19:33 2011 -0400
+
+ Finish off previous change
+
+ src/hb-font.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 0fd8c2f1be693616f19f2f1526369874763d6cf6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 12 15:14:13 2011 -0400
+
+ [API] Make get_glyph() callback return a boolean
+
+ We need to know whether the glyph exists, so we can fallback to
+ composing / decomposing. Assuming that glyph==0 means "doesn't exist"
+ wouldn't work for applications like Pango that want to use different
+ "doesn't exist" glyph codes for different characters. An explicit
+ return value fixes that.
+
+ src/hb-font.cc | 15 +++++++++------
+ src/hb-font.h | 12 +++++++-----
+ src/hb-ft.cc | 12 +++++++-----
+ src/hb-ot-shape.cc | 13 +++++++++----
+ test/test-font.c | 5 ++++-
+ test/test-shape.c | 12 +++++++-----
+ 6 files changed, 43 insertions(+), 26 deletions(-)
+
+commit 8e07f93ab4a3ef9adc7942727ef21f2f9a141d10
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 12 14:27:44 2011 -0400
+
+ [test/shape] Check shape output
+
+ test/test-shape.c | 23 +++++++++++++++++++----
+ 1 files changed, 19 insertions(+), 4 deletions(-)
+
+commit 805af72405a2f653f08de392d7172291ffe8e902
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 12 12:39:40 2011 -0400
+
+ Rename get_kernings() arguments from first/second_glyph to
+ left/right_glyph
+
+ Makes it clear that kerning is in visual order.
+
+ src/hb-font.cc | 10 +++++-----
+ src/hb-font.h | 4 ++--
+ src/hb-ft.cc | 6 +++---
+ 3 files changed, 10 insertions(+), 10 deletions(-)
+
+commit 23d2432219a91c6328efa9e041b1ecf137752ac3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 12 10:53:57 2011 -0400
+
+ [test] Add test-shape.c. Oops
+
+ test/test-shape.c | 125
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 125 insertions(+), 0 deletions(-)
+
+commit c098c3acc8c48b4b6883c50c9a87e81dbe98ba24
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 12 10:49:30 2011 -0400
+
+ [test/blob] Use MAP_ANON instead of MAP_ANONYMOUS
+
+ More portable.
+
+ test/test-blob.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 8329eb7c6ca39e162228733a2210e643b1a1019d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 12 01:39:17 2011 -0400
+
+ [test/shape] Add simplest test for hb_shape()
+
+ test/Makefile.am | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit df077fadd7828b609bdfe4dbcad52ef2448525c7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 12 01:19:39 2011 -0400
+
+ [object] Make object inert during destruction
+
+ Such that user_data and other finalizers cannot resurrect object
+
+ src/hb-object-private.hh | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit ee8dd83bb4e0b1c2ca5928391e35e8bd1fca6121
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 12 01:02:03 2011 -0400
+
+ [TODO] Update
+
+ TODO | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 52df150efeff4cf003cee65f8c91618f1a980bc8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 12 00:46:57 2011 -0400
+
+ Fix font subclass chainup
+
+ Test passing now.
+
+ src/hb-font.cc | 6 +-----
+ 1 files changed, 1 insertions(+), 5 deletions(-)
+
+commit f2c1dd4f746c36a44cf33d0257a3cd800107c286
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 12 00:35:12 2011 -0400
+
+ [test/font] Test font_funcs subclassing
+
+ test/test-font.c | 158
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 155 insertions(+), 3 deletions(-)
+
+commit 14f1e81b77971204e9325e2a8b6f8b690fac20a7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 12 00:18:28 2011 -0400
+
+ [test/font] Test empty funcs
+
+ test/test-font.c | 75
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 73 insertions(+), 2 deletions(-)
+
+commit 2ca0b5ae1e65d3f43df3a4a2144a1451d8b485c4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 23:57:36 2011 -0400
+
+ [test/font] Test more
+
+ test/test-font.c | 63
+ ++++++++++++++++++++++++++++++++++++++++++++++-------
+ 1 files changed, 54 insertions(+), 9 deletions(-)
+
+commit 7033518f756490e9cf00b96387fee6f2f7fae785
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 23:31:15 2011 -0400
+
+ [API] Pass face to get_table()
+
+ src/hb-font.cc | 4 ++--
+ src/hb-font.h | 2 +-
+ src/hb-ft.cc | 2 +-
+ test/test-font.c | 2 +-
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+commit b46782780690e26a8221e2d63dd224159aebe413
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 23:25:28 2011 -0400
+
+ [API] Remove const from font user_data
+
+ src/hb-font.cc | 20 ++++++++++----------
+ src/hb-font.h | 20 ++++++++++----------
+ src/hb-ft.cc | 20 ++++++++++----------
+ 3 files changed, 30 insertions(+), 30 deletions(-)
+
+commit ea93e7b27ca04a1655d62bd1d18a32805994af44
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 23:22:55 2011 -0400
+
+ [test/font] More tests
+
+ test/test-font.c | 36 +++++++++++++++++++++++++++++++++---
+ 1 files changed, 33 insertions(+), 3 deletions(-)
+
+commit cdb153175f8a1521cde112c65b173f548ca6ee5c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 23:12:58 2011 -0400
+
+ [test/font] More tests
+
+ test/test-font.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 44 insertions(+), 0 deletions(-)
+
+commit 74d9fa3d9ac226ed72702884e721ef94ecc48e22
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 23:07:47 2011 -0400
+
+ [test/font] More get_empty() tests
+
+ test/test-font.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit db9f4eb4e004fadae9d540522d1d21c3bbe659b0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 23:06:02 2011 -0400
+
+ [test/font] Test get_face() / get_parent()
+
+ test/test-font.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 606923bb4304d5b9cf164745d657cba58949a80a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 23:05:02 2011 -0400
+
+ [test/font] Add test_font_properties()
+
+ test/test-font.c | 85
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 85 insertions(+), 0 deletions(-)
+
+commit da603e80386b41b360acb070a862b6ed87da57b8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 22:52:35 2011 -0400
+
+ [test/font] Start adding tests for hb-font.h
+
+ test/Makefile.am | 1 +
+ test/test-buffer.c | 2 +-
+ test/test-font.c | 69
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ test/test-unicode.c | 1 +
+ 4 files changed, 72 insertions(+), 1 deletions(-)
+
+commit 9a14688e40e926b9453fcb75891f27bff1e45c49
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 22:49:29 2011 -0400
+
+ [API] Rename hb_face_create_for_data() to hb_face_create()
+
+ src/hb-font.cc | 4 ++--
+ src/hb-font.h | 4 ++--
+ src/hb-ft.cc | 2 +-
+ src/test.cc | 2 +-
+ test/test-object.c | 4 ++--
+ 5 files changed, 8 insertions(+), 8 deletions(-)
+
+commit 46d6a21cc8613519e6ce27b1925e29285cccb71d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 22:33:13 2011 -0400
+
+ [API] Add hb_ot_layout_substitute_start/finish()
+
+ src/hb-ot-layout.cc | 13 +++++++++++++
+ src/hb-ot-layout.h | 8 ++++++++
+ 2 files changed, 21 insertions(+), 0 deletions(-)
+
+commit c84d15f52e1183164502d45b476b54f8fe812e0f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 22:23:15 2011 -0400
+
+ Remove unused hb_set_t
+
+ src/hb-private.hh | 48 ------------------------------------------------
+ 1 files changed, 0 insertions(+), 48 deletions(-)
+
+commit 389a7c9e67549b1a9f7c538965e4647077f8e6ec
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 22:21:38 2011 -0400
+
+ Remove hb_static_threadsafe_set_t
+
+ src/hb-common.cc | 5 +++--
+ src/hb-mutex-private.hh | 42 ------------------------------------------
+ 2 files changed, 3 insertions(+), 44 deletions(-)
+
+commit e06d4eda7bbdb3a1be1f1ce8d98b059a0730f14d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 22:18:31 2011 -0400
+
+ Use constructor/destructor for hb_ot_shape_plan_t
+
+ src/hb-ot-shape-private.hh | 6 +++++-
+ src/hb-ot-shape.cc | 4 +---
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+commit a5e4e109460ea23fa5e64926a1676c6a02ab6ba2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 22:00:56 2011 -0400
+
+ Minor
+
+ TODO | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit daa446f184fa27c9764ff7f8a2444d47cf34d986
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 21:31:25 2011 -0400
+
+ Fix compile with no mutex available
+
+ src/hb-mutex-private.hh | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 1e56c476c10577fe319fe553c5ced000bd740940
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 21:28:01 2011 -0400
+
+ Free static mutex'es
+
+ src/hb-mutex-private.hh | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 831886a9b4073cfe27f7e1db0e957cbd5913fd31
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 21:27:52 2011 -0400
+
+ Streamline mutex stuff
+
+ src/hb-mutex-private.hh | 61
+ +++++++++++++++++++++++++++++-----------------
+ src/hb-private.hh | 8 ++++++
+ 2 files changed, 46 insertions(+), 23 deletions(-)
+
+commit 438c4eee353ddf0de66171d84c6ef9b21cbdf8f6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 21:14:34 2011 -0400
+
+ Remove unused hb_mutex_trylock()
+
+ src/hb-mutex-private.hh | 3 ---
+ 1 files changed, 0 insertions(+), 3 deletions(-)
+
+commit b8477e1da2785708f3232f8f2577f602a5d320d1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 21:12:44 2011 -0400
+
+ [test] Add tests for _get_empty() funcs
+
+ test/test-blob.c | 1 +
+ test/test-buffer.c | 7 +++++++
+ test/test-unicode.c | 10 ++++++++++
+ 3 files changed, 18 insertions(+), 0 deletions(-)
+
+commit 3994be3ded40e5a3da0e187ad421b19a78865e02
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 21:08:31 2011 -0400
+
+ [TODO] Update
+
+ TODO | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 80a6833b032bc63b4e8c3da6489d3767af1168f3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 18:14:44 2011 -0400
+
+ [API] Add hb_*_get_empty() for all objects
+
+ src/hb-buffer.cc | 6 ++++++
+ src/hb-buffer.h | 3 +++
+ src/hb-font.cc | 18 ++++++++++++++++++
+ src/hb-font.h | 9 +++++++++
+ src/hb-unicode.cc | 6 ++++++
+ src/hb-unicode.h | 3 +++
+ test/test-object.c | 36 +++++++++++++++++++++++++++++++++---
+ 7 files changed, 78 insertions(+), 3 deletions(-)
+
+commit d3b30be378c1dec0259a626d9a408bb9ca1b71ac
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 18:06:12 2011 -0400
+
+ [API] Add HB_UNTAG()
+
+ Useful in C API only.
+
+ src/hb-common.h | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 3cc6e9dcb42551761c3a1a9d3c25b1f1bcdc2419
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 18:02:48 2011 -0400
+
+ Minor
+
+ src/test.cc | 9 ++++++---
+ 1 files changed, 6 insertions(+), 3 deletions(-)
+
+commit 4101ca7dbbdf1438fa116fb8cad935501ac7cca8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 14:30:56 2011 -0400
+
+ Plug more leaks
+
+ All good now.
+
+ src/hb-blob.cc | 2 +-
+ src/hb-open-type-private.hh | 8 ++++----
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 6a7ac79e26e85f6781186cf708a12825c0857324
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 14:19:18 2011 -0400
+
+ Plug leaks
+
+ src/hb-ot-map-private.hh | 7 +++++++
+ src/hb-ot-shape-private.hh | 2 ++
+ src/hb-ot-shape.cc | 2 ++
+ src/hb-private.hh | 10 +++++++++-
+ 4 files changed, 20 insertions(+), 1 deletions(-)
+
+commit 7aa12ebdff11a4ffbd04bf9b164586eb0c172e37
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 11:55:11 2011 -0400
+
+ [unicode] Simplify method setting
+
+ src/hb-unicode.cc | 6 +-----
+ test/test-unicode.c | 6 +++++-
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+commit d5bfd0272130a315d3b5e6cdcf9b7e6395879204
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 11:48:28 2011 -0400
+
+ Minor
+
+ src/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 6a4e7e1372ef9fde81b84ecc9c4d1f23d97396c1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 10:31:33 2011 -0400
+
+ Add maxp table
+
+ Not used for anything right now. Will use to get num_glyphs in
+ the future.
+
+ src/Makefile.am | 1 +
+ src/hb-ot-head-private.hh | 1 -
+ src/hb-ot-layout.cc | 1 +
+ src/hb-ot-maxp-private.hh | 68
+ +++++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 70 insertions(+), 1 deletions(-)
+
+commit e0b0710ae52bcc8c6fbd87dfae83818faa5d5f5f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 08:58:21 2011 -0400
+
+ Minor
+
+ TODO | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit a513dbcf73ab1cc39a7c9653034904d0c6cd9fe9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 00:24:34 2011 -0400
+
+ [API] Change signature of get_contour_point and get_kerning ffuncs
+
+ get_contour_point now takes glyph id before point_index.
+
+ get_kerning now takes a vector to fill-in.
+
+ src/hb-font.cc | 56
+ ++++++++++++++++++++-----------------
+ src/hb-font.h | 16 ++++++-----
+ src/hb-ft.cc | 11 +++++---
+ src/hb-ot-layout-gdef-private.hh | 2 +-
+ src/hb-ot-layout-gpos-private.hh | 2 +-
+ src/hb-ot-shape.cc | 15 +++++++---
+ 6 files changed, 59 insertions(+), 43 deletions(-)
+
+commit 63d646fb2933c2765ce526d321a498d0f7fae2f5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 00:15:37 2011 -0400
+
+ [font] Do user-space conversion when chaining up to parent font
+
+ src/hb-font-private.hh | 28 ++++++++++++++++++++++++++++
+ src/hb-font.cc | 23 +++++++++++++++++------
+ 2 files changed, 45 insertions(+), 6 deletions(-)
+
+commit b6f902a1a9c8b72b5d6a241a14a7bacfaea3a56a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 00:04:15 2011 -0400
+
+ Minor
+
+ src/hb-font-private.hh | 6 +++---
+ src/hb-ot-layout-gdef-private.hh | 6 +++---
+ src/hb-ot-layout-gpos-private.hh | 20 ++++++++++----------
+ 3 files changed, 16 insertions(+), 16 deletions(-)
+
+commit abcfe9b59b4475eb02dd679aac4bc59616713b28
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 11 00:02:02 2011 -0400
+
+ Remove hb_ot_layout_context_t, simplify code
+
+ src/hb-font-private.hh | 12 +++-
+ src/hb-font.cc | 6 ++-
+ src/hb-ot-layout-common-private.hh | 8 +-
+ src/hb-ot-layout-gdef-private.hh | 34 +++++-----
+ src/hb-ot-layout-gpos-private.hh | 121
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-private.hh | 24 ++++----
+ src/hb-ot-layout-gsubgpos-private.hh | 11 ++--
+ src/hb-ot-layout-private.hh | 13 ----
+ src/hb-ot-layout.cc | 15 +----
+ 9 files changed, 118 insertions(+), 126 deletions(-)
+
+commit 1ded6d8bbf93b7dabf2b1f620c07bd3236e7a60f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 10 20:49:02 2011 -0400
+
+ Make default font-funcs chain-up to the parent
+
+ src/hb-font.cc | 44 +++++++++++++++++++++++++++++++++++++++-----
+ src/hb-font.h | 41 +++++++++++++++++++++--------------------
+ 2 files changed, 60 insertions(+), 25 deletions(-)
+
+commit b9d975b931d6310f25fab5ac280f523cdc27bf94
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 10 20:41:13 2011 -0400
+
+ [API] Pass down closure user_data to font funcs
+
+ src/hb-font-private.hh | 30 ++++++--
+ src/hb-font.cc | 184
+ ++++++++++++++++++++++++------------------------
+ src/hb-font.h | 42 +++++++----
+ src/hb-ft.cc | 103 ++++++++++++++-------------
+ 4 files changed, 198 insertions(+), 161 deletions(-)
+
+commit 446df9cdb1fddb51819b731436fca54146d0bb23
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 10 20:14:44 2011 -0400
+
+ Whitespace
+
+ src/hb-unicode.h | 30 +++++++++++++++---------------
+ 1 files changed, 15 insertions(+), 15 deletions(-)
+
+commit 686c2d165dfb284b74b78f6b902d04b585dcaef3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 10 20:04:26 2011 -0400
+
+ [API] Remove font_funcs func getter functions
+
+ src/hb-font.cc | 32 --------------------------------
+ src/hb-font.h | 18 ------------------
+ 2 files changed, 0 insertions(+), 50 deletions(-)
+
+commit defc45be6d75aba4a67fa7814b91b73bad953fe6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 10 20:02:49 2011 -0400
+
+ [API] Add hb_font_create_sub_font() and hb_font_get_parent()
+
+ Not quite useful just yet.
+
+ src/hb-font-private.hh | 1 +
+ src/hb-font.cc | 41 ++++++++++++++++++++++++++++++++++++++---
+ src/hb-font.h | 5 +++++
+ src/hb-unicode.h | 2 +-
+ 4 files changed, 45 insertions(+), 4 deletions(-)
+
+commit 11bb8fe7b3925bc9b019ad0c0218a231e581f152
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 10 19:57:00 2011 -0400
+
+ [font] Fix internal sign of x/y_scale
+
+ Should have been done as part of
+ da975419884a535281745f30f4b32fee0bc8a7a1
+
+ src/hb-font-private.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 85e6218e3306165d69ef44277459511d5b54b9ff
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 10 19:40:44 2011 -0400
+
+ [API] Remove broken-by-design hb_font_unset_funcs()
+
+ src/hb-font.cc | 22 ----------------------
+ src/hb-font.h | 16 ----------------
+ 2 files changed, 0 insertions(+), 38 deletions(-)
+
+commit 74f1d896f2479500d65649cf3ec86dd201f0663a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 10 19:39:32 2011 -0400
+
+ Add hb_font_make/is_immutable()
+
+ src/hb-font-private.hh | 2 ++
+ src/hb-font.cc | 26 +++++++++++++++++++++++---
+ src/hb-font.h | 6 ++++++
+ test/test-object.c | 2 +-
+ 4 files changed, 32 insertions(+), 4 deletions(-)
+
+commit 8c7a100a4d0f3a257fb7563cb08ed4356c3af669
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 10 19:21:07 2011 -0400
+
+ Fix build without mutex
+
+ src/hb-mutex-private.hh | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 19d3035c40e73923bcad709dc5eefe31cb34d681
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 10 19:18:12 2011 -0400
+
+ Remove duplicate atomic_int implementation
+
+ src/hb-mutex-private.hh | 17 -----------------
+ 1 files changed, 0 insertions(+), 17 deletions(-)
+
+commit 45bfa99034512e886d75b1d45a5a649647f4711f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 10 19:12:49 2011 -0400
+
+ Fix set implementation to be truly threadsafe even with destroy()
+ callbacks
+
+ The test/object test is passing again, instead of deadlocking.
+
+ src/hb-common.cc | 26 ++++------
+ src/hb-mutex-private.hh | 47 +++++++------------
+ src/hb-object-private.hh | 6 ++-
+ src/hb-private.hh | 117
+ +++++++++++++++++++++++++++++++++++++--------
+ 4 files changed, 128 insertions(+), 68 deletions(-)
+
+commit 0c2ec1d78bfa0166ffd4afc204c2668d4f456ed9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 10 19:11:27 2011 -0400
+
+ [test] Always initialize gthread such that our mutex() stuff is tested
+
+ Now the test/object test deadlocks as expected. Fix coming.
+
+ configure.ac | 1 +
+ test/Makefile.am | 4 ++--
+ test/hb-test.h | 1 +
+ 3 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 6a9093cc486c1899197cd7cc9a3eb907c2e756f7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 10 19:00:07 2011 -0400
+
+ [test/object] Test user_data with destroy() callback that calls
+ user_data
+
+ Exposes the non-atomicity of user_data opertaions at this time because
+ we call finish() while still locked and modifying the object.
+ In fact,
+ I'm surprised that it doesn't deadlock. It should.
+
+ test/test-object.c | 22 ++++++++++++++++++++++
+ 1 files changed, 22 insertions(+), 0 deletions(-)
+
+commit abe636b8761e47ea60b193c7e72a044de224d172
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 10 17:55:40 2011 -0400
+
+ Add DOAP file
+
+ Makefile.am | 6 +++++-
+ harfbuzz.doap | 24 ++++++++++++++++++++++++
+ 2 files changed, 29 insertions(+), 1 deletions(-)
+
+commit f82c18630471216a04e4e3ad42396da4e6d74cba
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 10 17:48:34 2011 -0400
+
+ [test/blob] Fix bug in test
+
+ test/test-blob.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 785d23acd0ce72d399f9c5021bebc854872648af
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 10 17:41:44 2011 -0400
+
+ [test/blob] Add create_sub_blob()
+
+ test/test-blob.c | 17 +++++++++++++++++
+ 1 files changed, 17 insertions(+), 0 deletions(-)
+
+commit 0617b1558234673d3924f37541be01b04d36f05a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 10 17:37:08 2011 -0400
+
+ [test] Test blob API
+
+ test/Makefile.am | 1 +
+ test/test-blob.c | 280
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ test/test-buffer.c | 149 +++++++++++++++-------------
+ 3 files changed, 359 insertions(+), 71 deletions(-)
+
+commit 1c9f8717eb12c37c219333cbb0d123e1d2da4896
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 6 22:28:26 2011 -0400
+
+ [API] Simplify blob API, remove lock
+
+ TODO | 2 -
+ src/hb-blob.cc | 206
+ ++++++++++++++++++-------------------------
+ src/hb-blob.h | 19 ++--
+ src/hb-font.cc | 2 -
+ src/hb-open-type-private.hh | 32 +++++--
+ src/hb-ot-layout.cc | 7 +--
+ test/test-object.c | 2 +-
+ 7 files changed, 118 insertions(+), 152 deletions(-)
+
+commit 71cef14ac3de07e4fed0a2903b1f0f639406ec6c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 6 19:30:59 2011 -0400
+
+ Add -Bsymbolic-functions to linker flags
+
+ configure.ac | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit ab428aeab724ca40341318b66640f992cd72d2fc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 6 19:30:46 2011 -0400
+
+ [TODO] Update
+
+ TODO | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit a0f337a1cce1788dbf3147b459e7f615acbfe81b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 6 19:20:52 2011 -0400
+
+ Remove unused hb_blob_try_writable_inplace()
+
+ src/hb-blob.cc | 20 --------------------
+ src/hb-blob.h | 3 ---
+ 2 files changed, 0 insertions(+), 23 deletions(-)
+
+commit 08611d5194144bbf5d96a1110aeb812db06e0901
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 6 16:28:10 2011 -0400
+
+ Add note re deadlocks
+
+ src/hb-common.cc | 1 +
+ src/hb-mutex-private.hh | 4 ++++
+ 2 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 34fb5521a5fbb6b95ceff4bbac42a62628bc9f31
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 6 00:04:28 2011 -0400
+
+ [API] Add hb_language_get_default()
+
+ It uses locale information to detect default language. It's used by
+ hb_shape() whenever language is not set on the buffer.
+
+ Not sure how to properly test it in the test suite. Tested by
+ observing
+ that with DejaVu Sans we select the proper local glyph version
+ for U+431
+ under Serbian locale. See http://www.pango.org/ScriptGallery
+
+ src/hb-common.cc | 21 +++++++++++++++++++++
+ src/hb-common.h | 3 +++
+ src/hb-shape.cc | 2 +-
+ test/test-common.c | 5 +++++
+ 4 files changed, 30 insertions(+), 1 deletions(-)
+
+commit c78f4485587cc1dee07e772c164a13fde9d2859f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 21:31:04 2011 -0400
+
+ [API] Add version macros and functions
+
+ Step version up to 0.5.0.
+
+ Also, fix to pass "make distcheck"
+
+ configure.ac | 24 ++++++++++++----
+ src/Makefile.am | 9 ++++++
+ src/check-c-linkage-decls.sh | 2 +-
+ src/hb-common.cc | 29 +++++++++++++++++++
+ src/hb-version.h.in | 62
+ ++++++++++++++++++++++++++++++++++++++++++
+ src/hb.h | 1 +
+ test/Makefile.am | 2 +
+ 7 files changed, 122 insertions(+), 7 deletions(-)
+
+commit 9ff819f6571fd0d570f271162d7a30d97ee64148
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 19:47:59 2011 -0400
+
+ Add disable-static libtool flag
+
+ No one who builds harfbuzz static uses the autotools build system
+ to do it.
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 7ca7571ef91754274f6c84bbf988962d74a74098
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 19:47:12 2011 -0400
+
+ Remove win32-dll libtool flag
+
+ Since we're not win32-dll clean the way libtool docs define it.
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 174e3fe89b72729c9c34c647544a2dc1bf63cd84
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 19:37:53 2011 -0400
+
+ Add AC_CANONICAL_HOST
+
+ configure.ac | 10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit e6a5b88c01420366a70e0c9ae1775fb3c930cb8b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 16:24:42 2011 -0400
+
+ Fix build with older glib
+
+ configure.ac | 2 +-
+ test/hb-test.h | 55
+ +++++++++++++++++++++++++++++++++----------------------
+ 2 files changed, 34 insertions(+), 23 deletions(-)
+
+commit 3935af1c0d0f53a5fd6054e1ee219f3adda42dca
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 16:09:45 2011 -0400
+
+ [buffer] Remove wrong optimization
+
+ While the cluster fields of the glyph string are usually sorted, they
+ wouldn't be in special cases (for example for non-native direction).
+ Blindly using bsearch is plain wrong. If we want to reintroduce this
+ optimization we have to make sure we know the buffer clusters are
+ monotonic and in which direction. Not sure it's worth it though.
+
+ src/hb-buffer.cc | 16 +++-------------
+ 1 files changed, 3 insertions(+), 13 deletions(-)
+
+commit 46df6828513d56cd60467e36cbe45aa06648f488
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 15:33:19 2011 -0400
+
+ Make user_data access threadsafe
+
+ For now, by taking a global user_data mutex.
+
+ src/hb-common.cc | 25 +++++++++++++++++++++++--
+ src/hb-object-private.hh | 2 --
+ 2 files changed, 23 insertions(+), 4 deletions(-)
+
+commit 218e67b9eefa26e2e4fe43f99a84d082b185b1b0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 15:28:37 2011 -0400
+
+ Shrink code
+
+ src/hb-common.cc | 26 ++++++++++++++++++++++++++
+ src/hb-object-private.hh | 21 ++++-----------------
+ 2 files changed, 30 insertions(+), 17 deletions(-)
+
+commit b8d6183ebc4697a434776cf2aec7857d63a7d881
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 15:14:04 2011 -0400
+
+ Use threadsafe set implementation for hb_language lookups
+
+ Note that the static variable has to be a global static, as gcc
+ implements local statics differently and that would require linking
+ to libstdc++, which we don't want.
+
+ src/hb-common.cc | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit d37486d87b65c5abaaa2998fa5c9e48eedde0933
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 15:07:54 2011 -0400
+
+ Add hb_threadsafe_set_t
+
+ src/hb-mutex-private.hh | 54
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-private.hh | 3 +-
+ 2 files changed, 55 insertions(+), 2 deletions(-)
+
+commit b45f32ee4e599c515ce93e44315283d236b073bb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 15:00:43 2011 -0400
+
+ Use hb_array_t for hb_language_t mapping
+
+ src/hb-common.cc | 48
+ +++++++++++++++++++++------------------------
+ src/hb-object-private.hh | 4 +-
+ src/hb-private.hh | 19 ++++++++++++++---
+ 3 files changed, 39 insertions(+), 32 deletions(-)
+
+commit 21d2c92fdf7307c7117f8948021f0dd7d5a5d2a3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 14:47:53 2011 -0400
+
+ Move code around
+
+ src/hb-object-private.hh | 28 ++++++++++++++--------------
+ 1 files changed, 14 insertions(+), 14 deletions(-)
+
+commit 448ea9bf63104d39f87fff66219034222fa632b8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 14:39:24 2011 -0400
+
+ [TODO] Remove done items
+
+ TODO | 9 ---------
+ 1 files changed, 0 insertions(+), 9 deletions(-)
+
+commit 265ac614ea6d26041c7d64739098b76a82bbc4f4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 14:38:16 2011 -0400
+
+ Replace fixed-size lookup_maps array with hb_array_t
+
+ src/hb-ot-map-private.hh | 13 ++++-------
+ src/hb-ot-map.cc | 47
+ ++++++++++++++++++++++++---------------------
+ src/hb-private.hh | 6 +---
+ 3 files changed, 32 insertions(+), 34 deletions(-)
+
+commit 6843569d2c70c1771ce964e3d1a4cf91e14e7687
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 14:12:37 2011 -0400
+
+ Replace fixed-size feature_maps array with hb_array_t
+
+ src/hb-ot-map-private.hh | 10 +++-------
+ src/hb-ot-map.cc | 12 ++++++------
+ src/hb-ot-shape.cc | 2 +-
+ src/hb-private.hh | 42
+ +++++++++++++++++++++++++++++-------------
+ 4 files changed, 39 insertions(+), 27 deletions(-)
+
+commit 44b0a4d2fc62689fc56ef57f412b4bb1e439a614
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 13:42:19 2011 -0400
+
+ Replace fixed-size feature_infos array with hb_array_t
+
+ src/hb-ot-map-private.hh | 9 +++++----
+ src/hb-ot-map.cc | 9 +++++----
+ src/hb-private.hh | 12 ++++++++++++
+ 3 files changed, 22 insertions(+), 8 deletions(-)
+
+commit b214ec3ac0ce6568e9226fd09661d52de11dca96
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 13:24:07 2011 -0400
+
+ Minor
+
+ src/hb-private.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 811482bd650fb5652a9835471ae8ecf0fb185611
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 13:21:04 2011 -0400
+
+ Replace hb_map_t with hb_set_t which is more intuitive and flexible
+
+ src/hb-object-private.hh | 24 ++++++++++++++----------
+ src/hb-private.hh | 44
+ +++++++++++++++++---------------------------
+ test/test-object.c | 4 ++++
+ 3 files changed, 35 insertions(+), 37 deletions(-)
+
+commit 478a42536ff7ab777a7774fbfdb9c5e51334a14e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 12:39:51 2011 -0400
+
+ Make array/map implementation more generic
+
+ src/hb-object-private.hh | 2 ++
+ src/hb-private.hh | 13 +++++++------
+ 2 files changed, 9 insertions(+), 6 deletions(-)
+
+commit b81bd42951e1ce1569b29168015d3c5a2dacf773
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 00:21:16 2011 -0400
+
+ Make hb_mutex_*() macros take a pointer
+
+ More intuitive.
+
+ src/hb-blob.cc | 28 ++++++++++++++--------------
+ src/hb-mutex-private.hh | 32 ++++++++++++++++----------------
+ 2 files changed, 30 insertions(+), 30 deletions(-)
+
+commit a4b1900913c91aa9db74c4fdfa7c691a5cdf02a8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 5 00:17:43 2011 -0400
+
+ Add hb_static_mutex_t
+
+ src/hb-mutex-private.hh | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 56eb5ad6f94c32189ad219438db9a18683ca6846
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 4 19:27:37 2011 -0400
+
+ Move code around
+
+ Mutex (and Windows.h by extension) are fairly isolated now.
+
+ src/Makefile.am | 8 ++--
+ src/hb-blob-private.hh | 60 --------------------------
+ src/hb-blob.cc | 24 ++++++++++-
+ src/hb-font-private.hh | 3 -
+ src/hb-font.cc | 12 +++--
+ src/hb-mutex-private.hh | 105
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-object-private.hh | 33 +-------------
+ src/hb-unicode.cc | 1 -
+ 8 files changed, 141 insertions(+), 105 deletions(-)
+
+commit d292885893395dcb345dce1010e5c8628a715ef4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 3 01:03:53 2011 -0400
+
+ [ft] Fix font->face handling
+
+ Don't use _cached()
+
+ src/hb-ft.cc | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+commit 2000179487b49e0d504ec127450dc6fcb5568cec
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 3 00:49:06 2011 -0400
+
+ Move Win32 thread-safety stuff to hb-object-private.h
+
+ The Win32 definitions for LONG, ULONG, etc conflicts with
+ hb-open-type.h. Avoid that by making sure hb-object-private.h
+ and hb-open-type.h are not included in the same compilation unit.
+
+ src/hb-common.cc | 54 -------------------------------------
+ src/hb-object-private.hh | 66
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-private.hh | 66
+ ----------------------------------------------
+ 3 files changed, 66 insertions(+), 120 deletions(-)
+
+commit 266b34418c9bbe23ccaf29cb354b58c465fa3b22
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 3 00:35:53 2011 -0400
+
+ Refactor to keep hb-object-private.h and hb-open-type.h separate
+
+ Needed to be able to include <Windows.h> from hb-object-private.h.
+
+ src/hb-font.cc | 19 +++----------
+ src/hb-ot-layout-private.hh | 60
+ ++++++++++++++++++++++++------------------
+ src/hb-ot-layout.cc | 28 +++++++++++++++++---
+ 3 files changed, 63 insertions(+), 44 deletions(-)
+
+commit d4141a44b97377a65e6d2a3e03b3709307af38c1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 3 00:19:18 2011 -0400
+
+ [blob] Implement sub_blob() in terms of create()
+
+ Fixes problem with uninitialized sub_blob->mutex among other things.
+
+ Reported by Bradley Grainger.
+
+ src/hb-blob.cc | 12 +++++-------
+ 1 files changed, 5 insertions(+), 7 deletions(-)
+
+commit fc52e9e44c2fe84d63f18dc0098720830f0b467d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 3 00:09:16 2011 -0400
+
+ Implement win32 thread-safety stuff
+
+ Patch from Bradley Grainger.
+
+ src/hb-common.cc | 54
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-private.hh | 30 ++++++++++++++++++++++++----
+ 2 files changed, 79 insertions(+), 5 deletions(-)
+
+commit f55272ecde857c116f97a3195f3abd1df3be4b86
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 20:57:28 2011 -0400
+
+ Add hb_mutex_free() and use it
+
+ Based on patch by Bradley Grainger.
+
+ src/hb-blob.cc | 1 +
+ src/hb-private.hh | 16 +++++++++-------
+ 2 files changed, 10 insertions(+), 7 deletions(-)
+
+commit 8d5186484b28b5f629b523e067d7d5166eec557a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 20:52:21 2011 -0400
+
+ Cosmetic
+
+ src/hb-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 72657e4ce757dcb055a8db7291b68f96f0d34bfb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 20:46:32 2011 -0400
+
+ [API] Make hb_font_create() take a face and reference it
+
+ src/hb-font-private.hh | 2 +
+ src/hb-font.cc | 42
+ +++++++++++++++++++++++--------------
+ src/hb-font.h | 26 +++++++++++++----------
+ src/hb-ft.cc | 7 +-----
+ src/hb-ot-layout-gdef-private.hh | 2 +-
+ src/hb-ot-layout-gpos-private.hh | 2 +-
+ src/hb-ot-layout.cc | 10 +++-----
+ src/hb-ot-layout.h | 2 -
+ src/hb-ot-map-private.hh | 2 +-
+ src/hb-ot-shape.cc | 23 ++++++++++----------
+ src/hb-ot-shape.h | 1 -
+ src/hb-shape.cc | 18 +--------------
+ src/hb-shape.h | 1 -
+ src/hb-view.cc | 4 +--
+ test/test-object.c | 7 ++++-
+ 15 files changed, 70 insertions(+), 79 deletions(-)
+
+commit cec6611c5ce84d69d910bf7e9ec1fdd594398f9f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 20:18:58 2011 -0400
+
+ Protect NULL in a couple places
+
+ src/hb-font.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 5a5030366e40baa8d96ca67b47a52ad5af143157
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 19:54:29 2011 -0400
+
+ Fix bug in array growth implementation
+
+ With this, test/object is now passing. Yay!
+
+ src/hb-private.hh | 24 +++++++++++-------------
+ 1 files changed, 11 insertions(+), 13 deletions(-)
+
+commit 16123e10700436df18d14e37371bb621b31ea5d1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 19:54:17 2011 -0400
+
+ Fix bug in map implementation
+
+ src/hb-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 1cd5969f253528b1fc05a06c7a9f222baa29f68d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 19:53:39 2011 -0400
+
+ [object] Fix bug in get_user_data() implementation
+
+ src/hb-object-private.hh | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+commit db99589529a22a2113bcef1680ab6d9b934f382e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 19:52:47 2011 -0400
+
+ [test/object] Add test for object lifecycle stuff
+
+ Revealed many bugs in the (untested and known buggy) user_data
+ support.
+
+ test/Makefile.am | 4 +
+ test/test-object.c | 316
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 320 insertions(+), 0 deletions(-)
+
+commit f74d6c81f14f117b3cecfb65f0d5df22849c9a07
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 19:52:32 2011 -0400
+
+ Cosmetic
+
+ test/test-unicode.c | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 4911062d5be0d937ee8f1a70cc93e05d162f45b3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 19:36:39 2011 -0400
+
+ [API] Rename hb_blob_create_empty() to hb_blob_get_empty()
+
+ src/hb-blob.cc | 2 +-
+ src/hb-blob.h | 2 +-
+ src/hb-font.cc | 2 +-
+ src/hb-open-type-private.hh | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 1ab1d3e38cdf8e7331efdbc4ef0c02ee9d5c8c04
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 19:35:53 2011 -0400
+
+ [face] Return nil face if blob is inert
+
+ src/hb-font.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit e87867cb88280e3f3a38d829e359cb686168b2cb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 19:35:05 2011 -0400
+
+ [buffer] Fail in _create() if we cannot pre-allocate the requested
+ size
+
+ src/hb-buffer.cc | 8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+commit cd361ec9a1b2bfc271e5490dbfc0a870fd5c439a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 16:54:05 2011 -0400
+
+ Cosmetic
+
+ test/test-unicode.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit c784c67a28f5b92d396eaa9529d57ef91a5cb9ac
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 15:59:57 2011 -0400
+
+ [unicode] Make _get_parent() return _nil object instead of NULL
+
+ src/hb-unicode.cc | 29 ++++++++++++-----------------
+ test/test-unicode.c | 2 +-
+ 2 files changed, 13 insertions(+), 18 deletions(-)
+
+commit 07e22779abd089d5921bf2d19d4a3bf1bd0173c6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 14:58:04 2011 -0400
+
+ [test/unicode] Add script roundtrip tests for glib and ICU
+
+ test/test-unicode.c | 70
+ ++++++++++++++++++++++++++++++++++++++++++++++----
+ 1 files changed, 64 insertions(+), 6 deletions(-)
+
+commit 7cda65935c73c277550f6ac12f6730e96d4852a7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 14:33:53 2011 -0400
+
+ [test/unicode] Better test chainup
+
+ test/test-unicode.c | 54
+ ++++++++++++++++++++++++++++++++++++++++++++++----
+ 1 files changed, 49 insertions(+), 5 deletions(-)
+
+commit 250c59225ead28449deb11522dee3819480a19b4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 14:21:30 2011 -0400
+
+ [test/unicode] Port the _custom test to test all property setters
+
+ test/test-unicode.c | 186
+ ++++++++++++++++++++++++++++----------------------
+ 1 files changed, 104 insertions(+), 82 deletions(-)
+
+commit e74b5b339ab0af53d893ec84a0955d5aa508fed3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 14:03:55 2011 -0400
+
+ [test/unicode] Test Unicode 5.2+ but don't fail
+
+ test/test-unicode.c | 21 +++++++++++++++++++--
+ 1 files changed, 19 insertions(+), 2 deletions(-)
+
+commit c763aa42b46eaee95359806cab56fa632ff3ad58
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 13:52:17 2011 -0400
+
+ [test/buffer] Clean up testing
+
+ Getting the hang of how to cleanly use gtest.
+
+ test/test-buffer.c | 154
+ +++++++++++++++++++++++++++++-----------------------
+ 1 files changed, 85 insertions(+), 69 deletions(-)
+
+commit 819e9d9e5310e67e8dcce9fa885f8a086a9b9ee8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 12:38:54 2011 -0400
+
+ Minor
+
+ test/test-unicode.c | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 03034acb8a9fdd33135bc3775a1f932da9ebdd42
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 12:37:45 2011 -0400
+
+ [icu] Make sure we return script UNKNOWN instead of INVALID
+
+ src/hb-icu.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit d02985ec5a24c659a0a133cc6bc103f1d76bcb29
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 12:35:14 2011 -0400
+
+ ISO 15924 fixes
+
+ Update to http://unicode.org/iso15924
+
+ Fixes some of the test failures in test-unicode with ICU. Still
+ one more to fix before the test passes.
+
+ src/hb-common.cc | 10 ++++++++--
+ src/hb-common.h | 5 +++--
+ src/hb-ot-tag.cc | 2 --
+ 3 files changed, 11 insertions(+), 6 deletions(-)
+
+commit e8e29c725a72c2e991cd1c4422a020457e1684e9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 2 12:06:18 2011 -0400
+
+ [test/unicode] Add log messages
+
+ Use with --verbose to see what's failing
+
+ test/test-unicode.c | 9 ++++++---
+ 1 files changed, 6 insertions(+), 3 deletions(-)
+
+commit 208c2c31501f6eb2b81b6bf80fcf39f4646eb38b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 1 20:04:01 2011 -0400
+
+ Minor
+
+ test/test-unicode.c | 478
+ ++++++++++++++++++++++++++-------------------------
+ 1 files changed, 243 insertions(+), 235 deletions(-)
+
+commit 60833efaf1310c3f18e150b61daaeb0074ae3d91
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 29 16:49:57 2011 -0400
+
+ [test/unicode] Add testing of all unicode properties
+
+ ICU fails for now.
+
+ test/hb-test.h | 4 +-
+ test/test-unicode.c | 432
+ ++++++++++++++++++++++++++++++++++++++++++++++++---
+ 2 files changed, 416 insertions(+), 20 deletions(-)
+
+commit da96ee072fa3544c3d36cf0b82ada11806789d70
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 29 12:17:09 2011 -0400
+
+ [test/unicode] Test is/make_immutable()
+
+ test/test-unicode.c | 46 ++++++++++++++++++++++++++++++----------------
+ 1 files changed, 30 insertions(+), 16 deletions(-)
+
+commit 6af9cff5e17e82100b435c8d21aed0765296d58d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 29 12:00:38 2011 -0400
+
+ [test/unicode] Use text fixture instead of static variables
+
+ src/hb-unicode-private.hh | 2 +-
+ src/hb-unicode.h | 2 +-
+ test/test-buffer.c | 2 +-
+ test/test-c.c | 1 +
+ test/test-common.c | 3 +-
+ test/test-cplusplus.cc | 1 +
+ test/test-unicode.c | 112
+ +++++++++++++++++++++++++++------------------
+ 7 files changed, 74 insertions(+), 49 deletions(-)
+
+commit 13db3d40bfc09c68f9761a71435b1840b9d34099
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 28 19:44:45 2011 -0400
+
+ [test/buffer] Add UTF-16 tests
+
+ test/test-buffer.c | 48
+ ++++++++++++++++++++++++++++++++++++++++++++++--
+ 1 files changed, 46 insertions(+), 2 deletions(-)
+
+commit 243673d601588a6f704ceafbff5dd5cdf66c47b7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 28 19:37:51 2011 -0400
+
+ [test/buffer] Add more extensive UTF-8 test data from glib
+
+ src/hb-buffer.cc | 2 +-
+ test/test-buffer.c | 317
+ +++++++++++++++++++++++++++++++++++++++++++++++++---
+ 2 files changed, 303 insertions(+), 16 deletions(-)
+
+commit dfec67f958482e5c3bb01e06b08694cd4ded6f66
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 28 18:34:42 2011 -0400
+
+ [test/buffer] Add initial utf-8 tests
+
+ test/hb-test.h | 25 ++++++++++++++++++++++++-
+ test/test-buffer.c | 46 +++++++++++++++++++++++++++++++++++++++++++++-
+ 2 files changed, 69 insertions(+), 2 deletions(-)
+
+commit aafe395ab550d3ba2fabc69155662e87d45e74a8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 28 17:10:44 2011 -0400
+
+ Add test suite infrastructure
+
+ Wraps around glib for convenience and ease of use.
+
+ test/Makefile.am | 1 +
+ test/hb-test.h | 132
+ +++++++++++++++++++++++++++++++++++++++++++++++----
+ test/test-buffer.c | 29 +++++------
+ test/test-common.c | 14 +++---
+ test/test-unicode.c | 32 ++++++------
+ 5 files changed, 160 insertions(+), 48 deletions(-)
+
+commit c7ffe2ad5f6e97e26d14e2cc0d4098af8f5f36d0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 28 16:03:29 2011 -0400
+
+ [API Remove hb_font_funcs_copy()
+
+ Will be adding font_funcs subclassing instead.
+
+ src/hb-font.cc | 13 -------------
+ src/hb-font.h | 3 ---
+ 2 files changed, 0 insertions(+), 16 deletions(-)
+
+commit 30f34d08d445722320db711c3ddf41e66225752c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 28 16:02:40 2011 -0400
+
+ [TODO] Remove finished items
+
+ TODO | 2 --
+ src/hb-font.h | 10 ----------
+ 2 files changed, 0 insertions(+), 12 deletions(-)
+
+commit 080a0eb7d82d7195be72c16ece6e0a3ffed636b6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 28 16:01:01 2011 -0400
+
+ Add _hb_unsigned_int_mul_overflows
+
+ src/hb-buffer.cc | 7 ++-----
+ src/hb-open-type-private.hh | 2 +-
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ src/hb-private.hh | 9 ++++++++-
+ 4 files changed, 12 insertions(+), 8 deletions(-)
+
+commit 1d39d6e42b3d7628512d675a84a831a0f58624eb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 28 15:54:16 2011 -0400
+
+ Desable possibly lethal test on 64-bit machines
+
+ test/test-buffer.c | 9 ++++++---
+ 1 files changed, 6 insertions(+), 3 deletions(-)
+
+commit 3264042873fd639f3ef8ff0acfad777a0a9f3355
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 28 14:24:16 2011 -0400
+
+ [test/buffer] Test pre_allocate() and allocation_successful()
+
+ src/hb-buffer.cc | 3 ++-
+ test/test-buffer.c | 26 +++++++++++++++++++++++++-
+ 2 files changed, 27 insertions(+), 2 deletions(-)
+
+commit 123aa04f7b3241d6e43de2d472c4a1cbdb250ac7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 28 12:58:28 2011 -0400
+
+ Fix possible but improbable overflow in hb_array_t
+
+ src/hb-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e0db4b868f9fdd8e680890f87dd4e13a1c27b7a1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 28 12:56:49 2011 -0400
+
+ [buffer] More error handling
+
+ Should be all set now.
+
+ src/hb-buffer-private.hh | 2 +-
+ src/hb-buffer.cc | 60
+ ++++++++++++++++++++++++++++++++-------------
+ 2 files changed, 43 insertions(+), 19 deletions(-)
+
+commit 15c57e04bf05026ef424f8ae912d2f379301bf93
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 28 12:28:54 2011 -0400
+
+ [test/buffer] Add test pre_alloc(); hangs in the buffer code right now
+
+ Because the following loop overflows:
+
+ while (size > new_allocated)
+ new_allocated += (new_allocated >> 1) + 32;
+
+ test/test-buffer.c | 33 ++++++++++++++++++++++++++-------
+ 1 files changed, 26 insertions(+), 7 deletions(-)
+
+commit 1e5527e2d60ed3b4a5adf62b258415ec3aef41fb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 28 12:15:24 2011 -0400
+
+ [test/buffer] Test reset(), set_length(), and set/get_unicode_data()
+
+ test/test-buffer.c | 66
+ ++++++++++++++++++++++++++++++++++++++++++++++-----
+ 1 files changed, 59 insertions(+), 7 deletions(-)
+
+commit db126b5448ec802285cf2b6f0e7da412d02dfb28
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 28 11:56:29 2011 -0400
+
+ [test/buffer] Test reverse() and reverse_clusters()
+
+ test/test-buffer.c | 61
+ ++++++++++++++++++++++++++++++++++++++++++++++++---
+ 1 files changed, 57 insertions(+), 4 deletions(-)
+
+commit 5fa849b77d49da2212825ebb1bea9145713b8449
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 27 21:46:01 2011 -0400
+
+ [API] Add _set/get_user_data() for all objects
+
+ src/hb-blob.cc | 17 +++++++++++++++++
+ src/hb-blob.h | 12 ++++++++++++
+ src/hb-buffer.cc | 16 ++++++++++++++++
+ src/hb-buffer.h | 10 ++++++++++
+ src/hb-font.cc | 51
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-font.h | 36 ++++++++++++++++++++++++++++++++++++
+ src/hb-unicode.cc | 17 +++++++++++++++++
+ src/hb-unicode.h | 12 ++++++++++++
+ 8 files changed, 171 insertions(+), 0 deletions(-)
+
+commit 852e08ec8fbfbce1d50e571d0bb0b52ef4d4cc58
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 27 21:45:51 2011 -0400
+
+ Move code around
+
+ src/hb-object-private.hh | 153
+ ++++++++++------------------------------------
+ src/hb-private.hh | 136 +++++++++++++++++++++++++++++++++++++----
+ 2 files changed, 157 insertions(+), 132 deletions(-)
+
+commit 29c67d3f70b081766a6c01353980f457f38aeb12
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 27 21:22:32 2011 -0400
+
+ Add initial implementation of user_data to objects
+
+ src/hb-common.h | 11 ++-
+ src/hb-object-private.hh | 186
+ +++++++++++++++++++++++++++++++++++++++++++++-
+ 2 files changed, 193 insertions(+), 4 deletions(-)
+
+commit 47e71d9661946a4ffb96026bf1d697d788414ab5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 27 16:38:03 2011 -0400
+
+ [object] Remove unnecessary use of macros
+
+ TODO | 2 --
+ src/hb-blob.cc | 18 +++++++++---------
+ src/hb-buffer.cc | 6 +++---
+ src/hb-font.cc | 30 +++++++++++++++---------------
+ src/hb-object-private.hh | 9 ---------
+ src/hb-unicode.cc | 8 ++++----
+ 6 files changed, 31 insertions(+), 42 deletions(-)
+
+commit 8be1420f8fd0e5c53282245d6830efbee5c7409d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 27 16:14:04 2011 -0400
+
+ [blob] Use HB_FUNC instead of __FUNCTION__
+
+ src/hb-blob.cc | 24 ++++++++++++------------
+ 1 files changed, 12 insertions(+), 12 deletions(-)
+
+commit ae008b90cfc2028e878100f78b21d70f923a6044
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 27 16:12:12 2011 -0400
+
+ [object] Add tracing support back in
+
+ src/hb-object-private.hh | 38 ++++++++++++++++++++++++++------------
+ 1 files changed, 26 insertions(+), 12 deletions(-)
+
+commit 5b7f38979fa90117861fe327477de1707f117a8c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 27 15:10:12 2011 -0400
+
+ GNOME Bug 612402 - (hb-arm) HarfBuzz compilation fix for arm
+
+ With gcc on arm, request 8-bit structure alignment.
+
+ configure.ac | 10 +++++++++-
+ 1 files changed, 9 insertions(+), 1 deletions(-)
+
+commit 39a840ae65327b173e6eb1bb291e235a8305d7a1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 27 14:48:19 2011 -0400
+
+ [API] Add hb_direction_from/to_string()
+
+ And hb-view --direction argument.
+
+ TODO | 1 -
+ src/hb-common.cc | 36 ++++++++++++++++++++++++++++++++++++
+ src/hb-common.h | 6 ++++++
+ src/hb-view.cc | 13 ++++++++++---
+ test/test-common.c | 21 ++++++++++++++++++++-
+ 5 files changed, 72 insertions(+), 5 deletions(-)
+
+commit f1425a549fef360c3750532de23604cd318999d8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 27 12:15:06 2011 -0400
+
+ Rename hb-view.c and test.c to .cc files
+
+ src/Makefile.am | 4 +-
+ src/hb-view.c | 540
+ -------------------------------------------------------
+ src/hb-view.cc | 540
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/test.c | 94 ----------
+ src/test.cc | 97 ++++++++++
+ 5 files changed, 639 insertions(+), 636 deletions(-)
+
+commit eb5796f58897ecfb9d76fd99915bf1a30669a0fa
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 27 12:14:53 2011 -0400
+
+ [TODO] Add hb-view items
+
+ TODO | 10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit 65e0063eae2f3adb25315b8bd7b0e7757aa960f3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 27 09:33:58 2011 -0400
+
+ Make buffer size growth start from 32 instead of 8
+
+ src/hb-buffer.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit d4bee9f813bb299b1c4aab7c33d588be2a7d354b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 27 09:24:37 2011 -0400
+
+ [API] Add hb_unicode_funcs_get_default()
+
+ src/hb-buffer.cc | 4 ++--
+ src/hb-glib.cc | 5 +++--
+ src/hb-icu.cc | 5 +++--
+ src/hb-unicode-private.hh | 11 +++++++++++
+ src/hb-unicode.cc | 7 +++++++
+ src/hb-unicode.h | 8 ++++++++
+ src/hb-view.c | 13 ++++++-------
+ test/test-unicode.c | 11 ++++++++++-
+ 8 files changed, 50 insertions(+), 14 deletions(-)
+
+commit 153142dac8dd9abaf164bb88af07c600c17fc3a1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 27 01:49:03 2011 -0400
+
+ Replace simple macros with inline functions for better type safety
+
+ Now that we use C++ for all source code, lets benefit from it!
+
+ The hb_be_int16/32_get/put/eq() macros grow code size if replaced with
+ inline functions, so leave them as is.
+
+ src/hb-open-type-private.hh | 4 ++--
+ src/hb-private.hh | 30 +++++++++++++++++++++---------
+ 2 files changed, 23 insertions(+), 11 deletions(-)
+
+commit 40a9b8154f929947f4693bf90c64301afa407c3f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 27 01:48:56 2011 -0400
+
+ Add TODO item
+
+ src/hb-object-private.hh | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit ebdc83467c31574daa118fc18cd2ef2dc819b503
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 27 01:41:24 2011 -0400
+
+ Don't return in void function
+
+ Would have been nice if gcc had warned...
+
+ src/hb-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit ec6f9c2fd03a49d1e91cbaefa5bdbbfb35dff92e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 21 18:35:58 2011 -0400
+
+ Further simplify object handling
+
+ src/hb-object-private.hh | 53
+ +++++++++++++++++++++++----------------------
+ 1 files changed, 27 insertions(+), 26 deletions(-)
+
+commit fca368c4682624346a0aaee690e1ad6ed4c0b337
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 21 18:24:02 2011 -0400
+
+ Add hb_object_header_t which is the common part of all objects
+
+ Makes way for adding arbitrary user_data support.
+
+ src/hb-blob-private.hh | 3 +-
+ src/hb-blob.cc | 2 +-
+ src/hb-buffer-private.hh | 9 ++--
+ src/hb-buffer.cc | 2 +-
+ src/hb-font-private.hh | 7 ++-
+ src/hb-font.cc | 7 ++-
+ src/hb-ft.cc | 3 +-
+ src/hb-glib.cc | 3 +-
+ src/hb-icu.cc | 3 +-
+ src/hb-object-private.hh | 95
+ ++++++++++++++++++++++++--------------------
+ src/hb-private.hh | 5 +--
+ src/hb-unicode-private.hh | 6 ++-
+ src/hb-unicode.cc | 3 +-
+ 13 files changed, 82 insertions(+), 66 deletions(-)
+
+commit a9f24c802956d57180d71b83e96a0fb81197df4a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 21 17:18:22 2011 -0400
+
+ Move hb_reference_count_t to hb-private.h
+
+ src/hb-object-private.hh | 17 -----------------
+ src/hb-private.hh | 20 ++++++++++++++++++++
+ 2 files changed, 20 insertions(+), 17 deletions(-)
+
+commit 2409d5f8d7dd8b535ce5ea29e933f7db27d33793
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 21 17:14:28 2011 -0400
+
+ Update Copyright headers
+
+ COPYING | 15 ++++++++-------
+ src/hb-blob-private.hh | 2 +-
+ src/hb-blob.cc | 2 +-
+ src/hb-blob.h | 2 +-
+ src/hb-buffer-private.hh | 4 ++--
+ src/hb-buffer.cc | 6 +++---
+ src/hb-buffer.h | 6 +++---
+ src/hb-common.cc | 4 +++-
+ src/hb-common.h | 4 +++-
+ src/hb-font-private.hh | 4 +++-
+ src/hb-font.cc | 2 +-
+ src/hb-font.h | 2 +-
+ src/hb-ft.cc | 4 ++--
+ src/hb-ft.h | 2 +-
+ src/hb-glib.cc | 4 +++-
+ src/hb-glib.h | 4 +++-
+ src/hb-icu.cc | 6 ++++--
+ src/hb-icu.h | 4 +++-
+ src/hb-object-private.hh | 6 ++++--
+ src/hb-open-file-private.hh | 2 +-
+ src/hb-open-type-private.hh | 2 +-
+ src/hb-ot-head-private.hh | 2 +-
+ src/hb-ot-layout-common-private.hh | 4 ++--
+ src/hb-ot-layout-gdef-private.hh | 4 ++--
+ src/hb-ot-layout-gpos-private.hh | 4 ++--
+ src/hb-ot-layout-gsub-private.hh | 4 ++--
+ src/hb-ot-layout-gsubgpos-private.hh | 4 ++--
+ src/hb-ot-layout-private.hh | 2 +-
+ src/hb-ot-layout.cc | 6 +++---
+ src/hb-ot-layout.h | 2 +-
+ src/hb-ot-map-private.hh | 4 ++--
+ src/hb-ot-map.cc | 4 ++--
+ src/hb-ot-shape-complex-arabic-table.hh | 2 +-
+ src/hb-ot-shape-complex-arabic.cc | 2 +-
+ src/hb-ot-shape-complex-private.hh | 2 +-
+ src/hb-ot-shape-private.hh | 2 +-
+ src/hb-ot-shape.cc | 4 ++--
+ src/hb-ot-shape.h | 2 +-
+ src/hb-ot-tag.cc | 4 +++-
+ src/hb-ot-tag.h | 2 +-
+ src/hb-ot.h | 2 +-
+ src/hb-private.hh | 4 +++-
+ src/hb-shape.cc | 2 +-
+ src/hb-shape.h | 2 +-
+ src/hb-unicode-private.hh | 4 ++--
+ src/hb-unicode.cc | 4 ++--
+ src/hb-unicode.h | 4 +++-
+ src/hb-view.c | 4 ++--
+ src/hb.h | 2 +-
+ src/main.cc | 2 +-
+ src/test.c | 2 +-
+ test/hb-test.h | 17 ++++++++++++++++-
+ test/test-buffer.c | 2 +-
+ test/test-c.c | 2 +-
+ test/test-common.c | 2 +-
+ test/test-cplusplus.cc | 2 +-
+ test/test-unicode.c | 2 +-
+ 57 files changed, 122 insertions(+), 84 deletions(-)
+
+commit 08da7a3841ca7dfcb627314cae1c3a668b9c7236
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 21 16:59:10 2011 -0400
+
+ [hb-view] Accept numbers in feature tag name
+
+ Reported by Adam Twardoch.
+
+ src/hb-view.c | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 24229eb13268a422efffbcb28a094b726824c7f0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 21 16:55:17 2011 -0400
+
+ Remove obsolete comment
+
+ Talking to Ryan Lortie, he thinks my comment doesn't make sense.
+
+ So I'm making the getter const. Note that g_atomic_int_get()
+ casts that away itself, so we don't need to worry about that
+ (which kinda makes me uncomfortable actually).
+
+ src/hb-object-private.hh | 16 ++--------------
+ 1 files changed, 2 insertions(+), 14 deletions(-)
+
+commit dcb7026f33cbcdf60e9b7fcdd44c64cc08702c74
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 21 16:34:22 2011 -0400
+
+ Add ASSERT_STATIC_EXPR macro
+
+ Unused right now.
+
+ src/hb-private.hh | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 3e8bdbf9414291da5cf61213d5f4275c1ae23ae5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 21 16:16:21 2011 -0400
+
+ Cleanup hb_refrence_count_t
+
+ src/hb-object-private.hh | 23 ++++++++++++++++++-----
+ src/hb-private.hh | 6 +++---
+ 2 files changed, 21 insertions(+), 8 deletions(-)
+
+commit 783a7d69696bf0b1502ec9c1495e482e491c78e0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 21 16:03:59 2011 -0400
+
+ [TODO] Remove finished items
+
+ TODO | 6 +-----
+ src/hb-ft.cc | 1 -
+ 2 files changed, 1 insertions(+), 6 deletions(-)
+
+commit da975419884a535281745f30f4b32fee0bc8a7a1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 21 15:08:01 2011 -0400
+
+ [API] Allow negative font x_scale/y_scale
+
+ I was reconsidering whether y should grow down, since all three/four
+ times I've used this API I was tricked and got that wrong in my use.
+ So I was very inclined to make y grow down instead of up. However,
+ considering that the font space has y up and it would be very
+ confusing
+ for callbacks to work against that, I decided that what I really want
+ is for the user to be able to set y_scale to a negative number
+ to imply
+ that user-space y grows down.
+
+ Changing x_scale/y_scale from unsigned int to int allows that,
+ and I've
+ made pango to use that instead of negating glyph y_offset later.
+ hb-ft
+ however still has y group up. I *guess* that's how FreeType works?
+ I'm not sure, FreeType docs don't make this clear...
+
+ I'm happy with the resolution :-).
+
+ src/hb-font.cc | 8 ++++----
+ src/hb-font.h | 8 ++++----
+ src/hb-ot-layout-common-private.hh | 6 +-----
+ src/hb-ot-layout-private.hh | 2 +-
+ 4 files changed, 10 insertions(+), 14 deletions(-)
+
+commit 4d559cddbb3b3a5c12c5167eba69598618a9f283
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 21 14:58:23 2011 -0400
+
+ [icu] Remove big script switch(), rely on reverse-lookup
+
+ src/hb-icu.cc | 137
+ ++++-----------------------------------------------------
+ 1 files changed, 9 insertions(+), 128 deletions(-)
+
+commit d18431b4cd8c1b14523733cd60a62b862f5b471f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 18:59:10 2011 -0400
+
+ Move hb_reference_count_t from macros to inline methods
+
+ src/hb-object-private.hh | 25 +++++++++++--------------
+ 1 files changed, 11 insertions(+), 14 deletions(-)
+
+commit c57d454accff66e5f2c58006e8fb40bc020b6182
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 18:50:27 2011 -0400
+
+ Rename all private sources and headers to C++ files
+
+ So we can liberally use the simple features of C++ that parts of the
+ codebase is already using.
+
+ src/Makefile.am | 17 +-
+ src/hb-blob-private.h | 59 ---
+ src/hb-blob-private.hh | 59 +++
+ src/hb-blob.cc | 4 +-
+ src/hb-buffer-private.hh | 2 +-
+ src/hb-common.c | 222 ----------
+ src/hb-common.cc | 222 ++++++++++
+ src/hb-font-private.h | 97 -----
+ src/hb-font-private.hh | 97 +++++
+ src/hb-font.cc | 6 +-
+ src/hb-ft.c | 262 ------------
+ src/hb-ft.cc | 262 ++++++++++++
+ src/hb-glib.cc | 2 +-
+ src/hb-icu.cc | 2 +-
+ src/hb-object-private.h | 134 ------
+ src/hb-object-private.hh | 132 ++++++
+ src/hb-open-type-private.hh | 2 +-
+ src/hb-ot-layout-gdef-private.hh | 2 +-
+ src/hb-ot-layout-private.hh | 4 +-
+ src/hb-ot-shape-complex-arabic-table.h | 674
+ ------------------------------
+ src/hb-ot-shape-complex-arabic-table.hh | 674
+ ++++++++++++++++++++++++++++++
+ src/hb-ot-shape-complex-arabic.cc | 2 +-
+ src/hb-ot-shape-complex-private.hh | 2 +-
+ src/hb-ot-shape-private.hh | 2 +-
+ src/hb-ot-tag.c | 677
+ -------------------------------
+ src/hb-ot-tag.cc | 677
+ +++++++++++++++++++++++++++++++
+ src/hb-private.h | 301 --------------
+ src/hb-private.hh | 301 ++++++++++++++
+ src/hb-shape.cc | 2 +-
+ src/hb-unicode-private.hh | 2 +-
+ src/hb-unicode.cc | 2 +-
+ src/hb-view.c | 6 +
+ 32 files changed, 2457 insertions(+), 2452 deletions(-)
+
+commit f19f4f9b0965ad7473a0f3a1ffcdbf16930e35d4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 18:25:56 2011 -0400
+
+ Rename hb-blob.c to hb-blob.cc in preparation of more changes
+
+ src/Makefile.am | 2 +-
+ src/hb-blob.c | 356
+ -------------------------------------------------------
+ src/hb-blob.cc | 356
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 357 insertions(+), 357 deletions(-)
+
+commit 04744e73bad22d679986173b5f0d84dbbf49dd57
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 17:24:03 2011 -0400
+
+ [TODO] Remove done items
+
+ TODO | 6 ------
+ 1 files changed, 0 insertions(+), 6 deletions(-)
+
+commit 9417c1c0d2b005eadf0c087ca695121a6200d0f7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 17:21:23 2011 -0400
+
+ [API] Make hb_face_reference_table() return empty blob instead of NULL
+
+ The idea here is that:
+
+ - Like pretty much all other API in harfbuzz, user does not have to
+ check for NULL.
+
+ - In any caller code, the case of missing table should be handled
+ exactly the same way that a too-short table is handled. Turning
+ a non-existent talbe into a table of size 0 makes the user code
+ safer.
+
+ src/hb-font.cc | 2 ++
+ src/hb-open-type-private.hh | 3 ---
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+commit c035812feb0d385a9e8c334631738e4915912c71
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 17:03:00 2011 -0400
+
+ [API] Rename hb_face_get_table() to hb_face_reference_table()
+
+ That correctly reflects the reference ownership transfer happening.
+
+ src/hb-font.cc | 4 ++--
+ src/hb-font.h | 7 ++-----
+ src/hb-ot-layout.cc | 6 +++---
+ src/hb-shape.cc | 2 +-
+ 4 files changed, 8 insertions(+), 11 deletions(-)
+
+commit 2d7b61a4b0ed212ca414b3281c2eae3e3db19c13
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 16:40:56 2011 -0400
+
+ [TODO] Remove done items
+
+ TODO | 10 ++--------
+ src/hb-ft.h | 2 +-
+ 2 files changed, 3 insertions(+), 9 deletions(-)
+
+commit af02933739e03a156b9f7761fd7a63e2a02d0df1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 15:49:31 2011 -0400
+
+ [API] Remove hb_*_get_reference_count()
+
+ This was a bizzare piece of API that I inherited from cairo. It has
+ been wrong adding them to cairo in the first place. Remove them
+ before
+ someone uses them!
+
+ src/hb-blob.c | 6 ------
+ src/hb-blob.h | 3 ---
+ src/hb-buffer.cc | 6 ------
+ src/hb-buffer.h | 3 ---
+ src/hb-font.cc | 18 ------------------
+ src/hb-font.h | 9 ---------
+ src/hb-object-private.h | 7 -------
+ src/hb-unicode.cc | 6 ------
+ src/hb-unicode.h | 3 ---
+ test/test-unicode.c | 24 ------------------------
+ 10 files changed, 0 insertions(+), 85 deletions(-)
+
+commit 440a76b630a36a7336c93e8b05d988c6407b085e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 14:20:00 2011 -0400
+
+ [OT] Fix script to ot-script-tag conversion
+
+ src/hb-ot-tag.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit a3036a3e97b14c8eb1df208aed944207f9b6cc0b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 14:13:23 2011 -0400
+
+ Minor
+
+ src/hb-view.c | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit fb6291d9c9224bedf207bf0077ad9f0a2690f867
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 03:15:31 2011 -0400
+
+ [test] Add test for headers included from C and C++
+
+ test/Makefile.am | 17 ++++++++++++++++
+ test/test-c.c | 49
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ test/test-cplusplus.cc | 29 ++++++++++++++++++++++++++++
+ 3 files changed, 95 insertions(+), 0 deletions(-)
+
+commit 107a50581ccab7df7c390d5b927fdab1bbe8e713
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 03:04:56 2011 -0400
+
+ [test] Add todo items
+
+ test/test-unicode.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 5668189c12c264e8d2caf0d12dac918363ef6f80
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 03:03:32 2011 -0400
+
+ [API] font: move user_data before destroy()
+
+ This is the common convention for language binding tools.
+
+ src/hb-font-private.h | 4 ++--
+ src/hb-font.cc | 30 +++++++++++++++---------------
+ src/hb-font.h | 12 ++++++------
+ src/hb-ft.c | 8 ++++----
+ 4 files changed, 27 insertions(+), 27 deletions(-)
+
+commit e5847f75fb7bd25c5db6061d8e20d61fa469f9fe
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 02:59:28 2011 -0400
+
+ [API] blob: move user_data before destroy()
+
+ This is the common convention for language binding tools.
+
+ src/hb-blob-private.h | 2 +-
+ src/hb-blob.c | 16 ++++++++--------
+ src/hb-blob.h | 4 ++--
+ 3 files changed, 11 insertions(+), 11 deletions(-)
+
+commit 1fd73b594d611624ccb73f614c61298debf48994
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 02:56:39 2011 -0400
+
+ [test] Rename test-types to test-common
+
+ test/Makefile.am | 2 +-
+ test/test-common.c | 166
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ test/test-types.c | 166
+ ----------------------------------------------------
+ 3 files changed, 167 insertions(+), 167 deletions(-)
+
+commit f144a8ea840c6452c1fece2fd988b42a8ea7c5a6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 02:54:42 2011 -0400
+
+ [icu] Add two-way script conversion functions
+
+ Also optimizes the common-direction script lookup.
+
+ src/hb-common.c | 5 +-
+ src/hb-icu.cc | 205
+ ++++++++++++++++++++++++++++------------------------
+ src/hb-icu.h | 9 +++
+ test/test-types.c | 2 +-
+ 4 files changed, 124 insertions(+), 97 deletions(-)
+
+commit 0809aadd4bbd5d0f256407def7cc10b79772a824
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 02:44:29 2011 -0400
+
+ [glib] Add two-way script conversion functions
+
+ Also optimizes the common-direction script lookup to be an array
+ lookup.
+
+ src/hb-glib.cc | 270
+ +++++++++++++++++++++++++++++---------------------------
+ src/hb-glib.h | 8 ++
+ 2 files changed, 148 insertions(+), 130 deletions(-)
+
+commit 5c8c1b680c4fa23c8574b9aebd21113e276f57a3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 02:29:22 2011 -0400
+
+ Remove verbose comments
+
+ src/hb-glib.cc | 194 ++++++++++++++++++++--------------------
+ src/hb-icu.cc | 266
+ ++++++++++++++++++++++++++++----------------------------
+ 2 files changed, 230 insertions(+), 230 deletions(-)
+
+commit fb194b8794898f51eb596fa4092c26606889d376
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 02:00:47 2011 -0400
+
+ unicode: Cleanup implementation
+
+ src/Makefile.am | 8 +-
+ src/hb-buffer-private.hh | 2 +-
+ src/hb-glib.c | 230 ------------------------------------
+ src/hb-glib.cc | 231 ++++++++++++++++++++++++++++++++++++
+ src/hb-icu.c | 285
+ ---------------------------------------------
+ src/hb-icu.cc | 285
+ +++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-ot-shape.cc | 14 +--
+ src/hb-shape.cc | 4 +-
+ src/hb-unicode-private.h | 77 ------------
+ src/hb-unicode-private.hh | 96 +++++++++++++++
+ src/hb-unicode.c | 256 ----------------------------------------
+ src/hb-unicode.cc | 223 +++++++++++++++++++++++++++++++++++
+ src/hb-unicode.h | 57 +++++-----
+ test/test-unicode.c | 23 +++-
+ 14 files changed, 892 insertions(+), 899 deletions(-)
+
+commit ecfb773829a5d98a4f5456a992f3e5ecd6731435
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 20 01:34:51 2011 -0400
+
+ Cosmetic
+
+ src/hb-unicode.h | 22 +++++++++-------------
+ 1 files changed, 9 insertions(+), 13 deletions(-)
+
+commit 2fd0c577e322ccbf762927bc4600b3ea31db4c80
+Author: Ryan Lortie <desrt@desrt.ca>
+Date: Wed Apr 20 00:19:20 2011 -0400
+
+ [API] unicode: rework virtual functions for subclassing
+
+ Unicode data providers can now be subclassed, including support for
+ chain-up. The interface should now be nicely bindable, as well.
+
+ Also fix glib unicode funcs that where broken after hb_script_t
+ changes. Nicely caught by the test-unicode.c added in this commit.
+
+ src/hb-glib.c | 186 +++++++++++++++++++++++++++++++++++--
+ src/hb-icu.c | 45 +++++++--
+ src/hb-ot-shape.cc | 9 +-
+ src/hb-shape.cc | 2 +-
+ src/hb-unicode-private.h | 17 ++++
+ src/hb-unicode.c | 231
+ +++++++++++++++++++++++++---------------------
+ src/hb-unicode.h | 68 +++++++-------
+ test/Makefile.am | 1 +
+ test/test-unicode.c | 215
+ ++++++++++++++++++++++++++++++++++++++++++
+ 9 files changed, 610 insertions(+), 164 deletions(-)
+
+commit f85faee9b3cb841ea977403945e2c877ab32b97a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 19 00:38:01 2011 -0400
+
+ [API] Rename hb_buffer_add_glyph() to hb_buffer_add()
+
+ src/hb-buffer.cc | 10 +++++-----
+ src/hb-buffer.h | 8 ++++----
+ test/test-buffer.c | 2 +-
+ 3 files changed, 10 insertions(+), 10 deletions(-)
+
+commit aab0de50e23727b69fa8c3d4e05c50c114c62835
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 19 00:32:19 2011 -0400
+
+ [API] Add hb_buffer_allocation_successful()
+
+ Returns the error status of the buffer.
+
+ src/hb-buffer.cc | 6 ++++++
+ src/hb-buffer.h | 6 ++++++
+ test/test-buffer.c | 2 +-
+ 3 files changed, 13 insertions(+), 1 deletions(-)
+
+commit 02a534b23f2d1e7475109563b9f61221ed020e8b
+Author: Ryan Lortie <desrt@desrt.ca>
+Date: Fri Apr 15 18:34:45 2011 -0400
+
+ [API] Rename hb_buffer_ensure() to hb_buffer_pre_allocate()
+
+ The new name is self-documenting.
+
+ src/hb-buffer.cc | 4 ++--
+ src/hb-buffer.h | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 70566befc59cfa8b9c43ac682749c40ea783b1dd
+Author: Ryan Lortie <desrt@desrt.ca>
+Date: Fri Apr 15 18:32:36 2011 -0400
+
+ [API} hb_buffer_get_glyph_{infos,positions}: Add length out parameter
+
+ Return the length, whenever we return an array. Makes it easier
+ on the
+ language bindings.
+
+ src/hb-buffer.cc | 12 ++++++++++--
+ src/hb-buffer.h | 6 ++++--
+ src/hb-ot-layout-gpos-private.hh | 4 ++--
+ src/hb-view.c | 4 ++--
+ test/test-buffer.c | 7 ++-----
+ 5 files changed, 20 insertions(+), 13 deletions(-)
+
+commit 62879eebd9965179af8602ba29ac0a64a739b757
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 18 23:40:21 2011 -0400
+
+ [API] Use ISO 15924 tags for hb_script_t
+
+ This simplifies the code, reduces static data, and makes the design
+ more extensible to future additions of new scripts.
+
+ src/hb-common.c | 411
+ ++++--------------------------------
+ src/hb-common.h | 199 +++++++++---------
+ src/hb-ot-map.cc | 4 +-
+ src/hb-ot-shape-complex-private.hh | 3 +-
+ src/hb-ot-tag.c | 228 +++++++++-----------
+ src/hb-ot-tag.h | 6 +-
+ src/hb-shape.cc | 4 +-
+ test/test-types.c | 2 +-
+ 8 files changed, 252 insertions(+), 605 deletions(-)
+
+commit c0af193c8e25c4f11d23b8893e9ce1c2d2615bb2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 15 19:26:24 2011 -0400
+
+ Change buffer default properties to invalid
+
+ This includes HB_DIRECTION_INVALID and HB_SCRIPT_INVALID.
+
+ The INVALID will cause a "guess whatever from the text" in hb_shape().
+ While it's not ideal, it works better than the previous defaults at
+ least (HB_DIRECTION_LTR and HB_SCRIPT_COMMON).
+
+ src/hb-buffer-private.hh | 9 +++------
+ src/hb-buffer.cc | 24 ++++++++++++++++--------
+ src/hb-view.c | 6 ++----
+ test/test-buffer.c | 4 ++--
+ 4 files changed, 23 insertions(+), 20 deletions(-)
+
+commit 00bec2c969555e76c3f84650a1d3c45308e585ad
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 15 19:16:54 2011 -0400
+
+ Move enum types to hb-common.h
+
+ src/hb-common.c | 406
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-common.h | 170 +++++++++++++++++++++++
+ src/hb-unicode.c | 406
+ ------------------------------------------------------
+ src/hb-unicode.h | 166 ----------------------
+ 4 files changed, 576 insertions(+), 572 deletions(-)
+
+commit 5dd4609f4da5674966a0169d9fa533ac5bc9f464
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 15 19:16:34 2011 -0400
+
+ [TODO] Add new item
+
+ TODO | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit b54cd07b2623b68171e00179a9dc3ecbea7aa6a1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 15 19:12:01 2011 -0400
+
+ Mark internal buffer variables private
+
+ src/hb-buffer.h | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 0e8d35c0932ddc20ebf430f2fd82c087da698954
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 15 19:07:10 2011 -0400
+
+ Add hb_script_from_string()
+
+ src/hb-unicode.c | 6 ++++++
+ src/hb-unicode.h | 4 ++++
+ src/hb-view.c | 2 +-
+ 3 files changed, 11 insertions(+), 1 deletions(-)
+
+commit 8f0d7e0c3fd4b05c43ac449be4f374dc2dc56127
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 15 18:59:56 2011 -0400
+
+ Remove hb_buffer_clear_positions(), add hb_ot_layout_position_start()
+
+ src/hb-buffer-private.hh | 6 +++++-
+ src/hb-buffer.cc | 24 ++++++++++++------------
+ src/hb-buffer.h | 5 +----
+ src/hb-ot-layout.cc | 6 ++++++
+ src/hb-ot-layout.h | 4 ++++
+ src/hb-ot-shape.cc | 2 +-
+ 6 files changed, 29 insertions(+), 18 deletions(-)
+
+commit 2fc56edff6d64f190271454ccb1b5fd347d4f172
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 15 18:35:08 2011 -0400
+
+ [API] Remove hb_buffer_clear()
+
+ One should use hb_buffer_reset() really.
+
+ src/hb-buffer.cc | 16 +++++-----------
+ src/hb-buffer.h | 4 ----
+ test/test-buffer.c | 4 ----
+ 3 files changed, 5 insertions(+), 19 deletions(-)
+
+commit 7f5bdc80541cdc90aa1acafba5e9e0bd2df53ff4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 15 18:34:55 2011 -0400
+
+ [TODO] Remove done items
+
+ TODO | 4 ----
+ 1 files changed, 0 insertions(+), 4 deletions(-)
+
+commit 5814dfa3f5aa41bc3df06b78980d57d7bea0ba58
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 15 14:41:04 2011 -0400
+
+ Cosmetic
+
+ src/hb-ot-shape.cc | 14 +++++++-------
+ src/hb-ot-shape.h | 4 ++--
+ src/hb-shape.cc | 20 ++++++++++----------
+ src/hb-shape.h | 10 +++++-----
+ 4 files changed, 24 insertions(+), 24 deletions(-)
+
+commit cfbfeb88a6ec059ea97a6624e63cfacc642b685a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 15 12:40:40 2011 -0400
+
+ [TODO] Remove done items
+
+ TODO | 4 ----
+ 1 files changed, 0 insertions(+), 4 deletions(-)
+
+commit 3cbdf70e0a92f1c24e16c0d4dcfbec4ac59a77a3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 15 12:32:06 2011 -0400
+
+ Make hb_language_t typesafe
+
+ src/hb-common.c | 18 +++++++++++-------
+ src/hb-common.h | 2 +-
+ 2 files changed, 12 insertions(+), 8 deletions(-)
+
+commit 2f2f448af35c232d18888c0e57cb21c9796ba7a8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 15 11:45:14 2011 -0400
+
+ [test] Add more TODO items
+
+ test/test-buffer.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit c910bec863215f918c659f58debbc7fe5264d7b6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 13 15:49:06 2011 -0400
+
+ Add hb_buffer_reset() and hb_buffer_set_length()
+
+ src/hb-buffer.cc | 31 +++++++++++++++++++++++++++++++
+ src/hb-buffer.h | 15 ++++++++++++++-
+ 2 files changed, 45 insertions(+), 1 deletions(-)
+
+commit 69ea23cb5d47dd1cfd3129f68375021ef79bf63b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 13 15:02:40 2011 -0400
+
+ Minor
+
+ src/hb-buffer.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 7dea908cd582c8c25555015940065c69c1e7e65b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 13 01:35:58 2011 -0400
+
+ [test] Add todo items
+
+ test/test-buffer.c | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 07cbaac07d7f43437b171e9275430b5fb3097716
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 13 01:11:19 2011 -0400
+
+ [TODO] Add item re script iso15924 functions
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit d0f53fdbead15d9003b521b8ed47d02fd29a4c64
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 13 01:09:09 2011 -0400
+
+ [test] Test hb-buffer.h
+
+ test/Makefile.am | 8 ++-
+ test/test-buffer.c | 195
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 202 insertions(+), 1 deletions(-)
+
+commit 72d89404c2837d578f5305456c817130b6a15c73
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 13 01:07:42 2011 -0400
+
+ [TODO] Add item re hb_buffer_reset()
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 5015c12dfb4de8525325178ae6def9e80fd83669
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 13 01:06:02 2011 -0400
+
+ [TODO] Add item re hb_buffer_resize()
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 9329ec92078d0e2d7bb04f683e0c6a582aab92f7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 13 00:06:23 2011 -0400
+
+ [TODO] Add API item
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 4744379efc6063d94e15ff99381a7ab8b88ee567
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 11 19:47:33 2011 -0400
+
+ Minor
+
+ test/test-types.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9385caa8a693df0f06a511a71de9aa407637097c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 11 19:43:51 2011 -0400
+
+ [test] Actually hook up hb_script_t tests
+
+ I really shall find a way to automate the test enumeration. Otherwise
+ it's too easy to add a test and wrongly hook it up. Did it twice
+ today.
+
+ test/test-types.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 8e4bb3cacc269ed32187aaaeaa166c64f41a0418
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 11 17:55:58 2011 -0400
+
+ Fold hb-language.[ch] into hb-common.[ch]
+
+ src/Makefile.am | 2 -
+ src/hb-buffer.h | 1 -
+ src/hb-common.c | 92 ++++++++++++++++++++++++++++++++++++++++-
+ src/hb-common.h | 42 +++++++++++++------
+ src/hb-language.c | 120
+ -----------------------------------------------------
+ src/hb-language.h | 46 --------------------
+ src/hb-ot-tag.h | 1 -
+ src/hb.h | 1 -
+ 8 files changed, 120 insertions(+), 185 deletions(-)
+
+commit 09125576ca745b3393f3dc49071df891400bbdc9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 11 17:49:33 2011 -0400
+
+ [test] Test hb_language_t
+
+ test/test-types.c | 26 +++++++++++++++++++++++++-
+ 1 files changed, 25 insertions(+), 1 deletions(-)
+
+commit 316b7a1afb84a5dfeaed886a585669b4d549c9b7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 11 17:49:10 2011 -0400
+
+ Make hb_language_from_string("") return NULL language
+
+ src/hb-language.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit db60c96f20426111ffa71e9802ef6e248f8b28d0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 11 16:17:02 2011 -0400
+
+ [teset] Test hb_script_t
+
+ test/hb-test.h | 8 ++++++++
+ test/test-types.c | 35 ++++++++++++++++++++++++++++++++++-
+ 2 files changed, 42 insertions(+), 1 deletions(-)
+
+commit 99b74760a4cddc798ab44b5ca897486bbb9c76d6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 11 15:47:40 2011 -0400
+
+ Rename hb_category_t to hb_unicode_general_category_t
+
+ src/hb-glib.c | 2 +-
+ src/hb-icu.c | 64
+ ++++++++++++++++++------------------
+ src/hb-ot-shape-complex-arabic.cc | 8 ++--
+ src/hb-ot-shape-private.hh | 2 +-
+ src/hb-ot-shape.cc | 2 +-
+ src/hb-unicode.c | 4 +-
+ src/hb-unicode.h | 66
+ ++++++++++++++++++------------------
+ 7 files changed, 74 insertions(+), 74 deletions(-)
+
+commit 4188096a7722f09ffa9319986c0286071da10a27
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 11 14:58:28 2011 -0400
+
+ Make HB_TAG_CHAR4 private
+
+ It's just sugar.
+
+ src/hb-common.h | 5 +----
+ src/hb-private.h | 7 ++++++-
+ test/test-types.c | 2 --
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 7ff7401c9237cda661869c1cb196d685706ac4e9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 11 13:27:30 2011 -0400
+
+ Make hb_tag_from_string(NULL) return HB_TAG_NONE
+
+ src/hb-common.c | 3 +++
+ test/test-types.c | 3 +++
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 02f6e62d6cabc7808c188daef26a1fe7ac626b1f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 11 13:27:21 2011 -0400
+
+ Build fix
+
+ test/Makefile.am | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit db5227c40e5c35fe2ffb750f32b639cb44424a1d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 11 13:16:08 2011 -0400
+
+ Move macros around
+
+ src/hb-ot-tag.c | 6 ++----
+ src/hb-private.h | 7 +++++++
+ 2 files changed, 9 insertions(+), 4 deletions(-)
+
+commit 07233581c9d953708d3c020907c42b8b89472b89
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 11 13:12:37 2011 -0400
+
+ Rename HB_TAG_STR() to HB_TAG_CHAR4()
+
+ The problem with HB_TAG_STR() was that it expected a string of size 4
+ exactly, and unlike hb_tag_from_string() it doesn't pad the tag with
+ space characters. So, the new name is more appropriate.
+
+ src/hb-common.c | 2 +-
+ src/hb-common.h | 8 ++++----
+ src/hb-ot-tag.c | 2 +-
+ test/test-types.c | 2 +-
+ 4 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 9faa980067f802f712c2adf8263152ed40c98088
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 11 12:46:49 2011 -0400
+
+ Add an in-tree test suite
+
+ Uses the glib testing framework. Wrote unit tests for hb-common.h
+ types.
+
+ Makefile.am | 2 +-
+ test/Makefile.am | 18 +++++++++
+ test/Makefile.decl | 90 +++++++++++++++++++++++++++++++++++++++++++
+ test/hb-test.h | 67 ++++++++++++++++++++++++++++++++
+ test/test-types.c | 108
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 5 files changed, 284 insertions(+), 1 deletions(-)
+
+commit d77b76200efbaa0611691920f9f2018b1e8be340
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 11 12:29:52 2011 -0400
+
+ Add few more paratheses to the HB_TAG macro
+
+ Never hurts.
+
+ src/hb-common.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b13640de6992de9ee9d07e3581c33b8181b70ff9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 11 12:29:31 2011 -0400
+
+ A few more ASSERTs
+
+ src/hb-private.h | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit ae9eeaff9300f3bb7bed588c5478e8e5461b3df0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 11 11:49:08 2011 -0400
+
+ Remove warning message from public header file
+
+ Since we now assert thos in hb-private.h, the int types cannot
+ be wrong.
+ (Except for when someone else includes hb-common.h in a very broken
+ configuration, but that's not our problem!)
+
+ Plus, we don't use inline in the public headers, so remove that too.
+
+ src/hb-common.h | 7 -------
+ src/hb-private.h | 4 ++++
+ 2 files changed, 4 insertions(+), 7 deletions(-)
+
+commit 6fd5364bdc3a2b459175377e9e16c86cff054232
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 11 11:47:14 2011 -0400
+
+ Assert int types
+
+ src/hb-private.h | 12 ++++++++++++
+ 1 files changed, 12 insertions(+), 0 deletions(-)
+
+commit bbdeff59646e5502b9fc53ab1761b3f014ee276c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 7 16:05:07 2011 -0400
+
+ Add test directory
+
+ configure.ac | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 4accc92afc702177ea53280d977cec839af3c12c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 7 15:53:26 2011 -0400
+
+ Update TODO items
+
+ TODO | 31 ++++++++++++++++++++-----------
+ 1 files changed, 20 insertions(+), 11 deletions(-)
+
+commit a71b9c8579d73aea4549f12524bbc2e89f43b5c5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 6 14:04:56 2011 -0400
+
+ Disable 'cswh' by default except for Arabic shaper
+
+ That better matches OpenType spec. Note that we enable it for all
+ Arabic-shaper scripts. Ie. we enable it by default for Syriac too,
+ but the SyriacOT spec does not require it. I think this is a more
+ useful compromise than special-casing for Arabic script alone.
+
+ src/hb-ot-shape-complex-arabic.cc | 3 +++
+ src/hb-ot-shape.cc | 1 -
+ 2 files changed, 3 insertions(+), 1 deletions(-)
+
+commit cab6f65bba560ac1651d9152f1ecf12eb88eca74
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 4 15:36:51 2011 -0400
+
+ [hb-view] setlocale (LC_ALL, "")
+
+ For now we don't use anything from the locale, but we should default
+ to using $LANG, etc, if --language is not specified. Right?
+
+ src/hb-view.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit fb9ca1bfabde7da0c274e7a1bd12bffaf7949c18
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 4 14:50:09 2011 -0400
+
+ [hb-view] Rewrite --features parsing, with range support
+
+ The --features parsing handles errors now. More importantly, it
+ allos limiting individual features to specific byte ranges. The
+ format is Python-esque. Here is how it all works:
+
+ Syntax: Value: Start: End:
+
+ Setting value:
+ "kern" 1 0 ∞ # Turn feature on
+ "+kern" 1 0 ∞ # Turn feature off
+ "-kern" 0 0 ∞ # Turn feature off
+ "kern=0" 0 0 ∞ # Turn feature off
+ "kern=1" 1 0 ∞ # Turn feature on
+ "kern=2" 2 0 ∞ # Choose 2nd alternate
+
+ Setting index:
+ "kern[]" 1 0 ∞ # Turn feature on
+ "kern[:]" 1 0 ∞ # Turn feature on
+ "kern[5:]" 1 5 ∞ # Turn feature on, partial
+ "kern[:5]" 1 0 5 # Turn feature on, partial
+ "kern[3:5]" 1 3 5 # Turn feature on, range
+ "kern[3]" 1 3 3+1 # Turn feature on, single char
+
+ Mixing it all:
+
+ "kern[3:5]=0" 1 3 5 # Turn feature off
+ for range
+
+ src/hb-view.c | 169
+ ++++++++++++++++++++++++++++++++++++++++++++-------------
+ 1 files changed, 132 insertions(+), 37 deletions(-)
+
+commit ccc6745afaa68ce7497a6cd02ce85986d3c863d0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 4 14:49:50 2011 -0400
+
+ [hb-view] Use cached hb-ft face creation
+
+ Avoids recreating the face the second time we call draw().
+
+ src/hb-view.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 1b4a2cc095d165dc573e0235f00fbbf2a5d3c2c5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 4 14:45:28 2011 -0400
+
+ [hb-view] Add --debug
+
+ Frees all allocated memory before exiting. Useful for valgrind run.
+
+ src/hb-view.c | 17 +++++++++++++++++
+ 1 files changed, 17 insertions(+), 0 deletions(-)
+
+commit b2da26d1e32a012f7feaad7c7cced61e4fb269f1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 1 15:48:43 2011 -0400
+
+ [hb-view] Support --features
+
+ Accepts values like:
+
+ --features="-mkmk,aalt=2,calt=1,+cswh"
+
+ A minus sign means "=0", a plus sign means "=1". Default is "=1".
+ A minus sign overrides an explicit value.
+
+ src/hb-view.c | 70
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 68 insertions(+), 2 deletions(-)
+
+commit f48ff19b629070d13cee3c0eeeb06c98992f93c6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 1 14:19:10 2011 -0400
+
+ Sort options for clarity
+
+ src/hb-view.c | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 5d91c3d547f78163b36aa7436d4388a836cca94a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Mar 16 17:36:32 2011 -0300
+
+ Add script to/from ISO 15924 tag support
+
+ Also adds --script support to hb-view.
+
+ If a script tag is not known to us, we pass the ISO 15924 tag around.
+ Right now, the OT layer ignores that, but we can fix it to blindly
+ convert that to an OT script tag.
+
+ src/hb-ot-tag.c | 4 +
+ src/hb-unicode.c | 273
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-unicode.h | 8 ++-
+ src/hb-view.c | 10 ++-
+ 4 files changed, 293 insertions(+), 2 deletions(-)
+
+commit 3286fc0e9adc3f2874c9409e7fdb09e4d2b7dda1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Mar 16 14:53:32 2011 -0300
+
+ Let hb_shape() guess script and direction...
+
+ - Rename HB_SCRIPT_INVALID_CODE to HB_SCRIPT_INVALID
+
+ - Add HB_DIRECTION_INVALID
+
+ - Make hb_script_get_horizontal_direction() public
+
+ - Make hb_shape() guess script from buffer text (first non-common
+ non-inherit script) if buffer script is set to HB_SCRIPT_INVALID
+ (this
+ is NOT the default.)
+
+ - Make hb_shape() guess direction from buffer script if buffer
+ direction
+ is set to HB_DIRECTION_INVALID (this is NOT the default.)
+
+ - Make hb-view.c set INVALID script and direction on the buffer.
+
+ The above changes are meant to make hb-view fairly useful for
+ uni-script
+ uni-direction text. The guessing behavior however is NOT the
+ default of
+ hb_shape() and must be asked for explicitly. This is intended,
+ because
+ the guess is not a suitable substitute to full-fledged bidi and script
+ segmentation. It's just a testing tool.
+
+ src/hb-common.h | 3 +-
+ src/hb-icu.c | 2 +-
+ src/hb-ot-shape.cc | 3 +-
+ src/hb-shape.cc | 52
+ ++++++++++++++++++++++++++++++++++++++++-----
+ src/hb-unicode-private.h | 4 ---
+ src/hb-unicode.c | 2 +-
+ src/hb-unicode.h | 8 ++++++-
+ src/hb-view.c | 4 +-
+ 8 files changed, 61 insertions(+), 17 deletions(-)
+
+commit b7b29684df67af7280b74ca4cf18f02ad6521bdc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Mar 2 01:01:03 2011 -0500
+
+ [hb-view] Handle write_to_png errors
+
+ src/hb-view.c | 9 ++++++++-
+ 1 files changed, 8 insertions(+), 1 deletions(-)
+
+commit c2cb98c8185c5560cfd04de7ee7c64c9496b986c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Mar 1 23:18:09 2011 -0500
+
+ [hb-view] Link with -lm
+
+ src/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b5dd44e24669cd35affcd92788d39ff56cac94db
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Feb 28 10:13:52 2011 -0800
+
+ Fix possible overflow
+
+ src/hb-buffer.cc | 12 ++++++++++--
+ 1 files changed, 10 insertions(+), 2 deletions(-)
+
+commit a4b781e93a0bee0549611e129b3564d9804d9090
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Feb 23 12:47:56 2011 -0500
+
+ Default background color shall either be white or transparent
+
+ Definitely not black!
+
+ src/hb-view.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 5353bf439c150492708ef9337078cfd73b83627b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Feb 22 18:06:19 2011 -0500
+
+ Add initial hb-view tool
+
+ Currently doesn't handle script or direction.
+
+ configure.ac | 18 +++
+ src/Makefile.am | 14 +++
+ src/hb-view.c | 342
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 374 insertions(+), 0 deletions(-)
+
+commit 82438c6ad5f60b6afc75c48cef72e18bef532468
+Author: Bradley Grainger <bgrainger@logos.com>
+Date: Tue Feb 15 18:37:29 2011 -0500
+
+ Fix #pragma message for MSVC.
+
+ __LOC__ was renamed to _HB__LOC__ in cd7555 but the corresponding
+ change wasn't made in hb-private.h.
+
+ src/hb-private.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit ba9ab8d6d9c863662c4b44ace4a4d89e29e592f2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jan 10 07:45:41 2011 -0500
+
+ Fix language extension matching
+
+ src/hb-ot-tag.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit a07874300a669ec0ea09a67df2a3ee8b0612d6b9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jan 10 02:27:49 2011 -0500
+
+ Don't use the m4/ dir
+
+ We just require people to have libtool, pkg-config, etc installed
+ when running autogen.sh
+
+ Makefile.am | 2 --
+ configure.ac | 1 -
+ 2 files changed, 0 insertions(+), 3 deletions(-)
+
+commit 7bbe14bed8a886ea5b293c927c4bf937cbfc6f51
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jan 9 22:29:14 2011 -0500
+
+ Fix 'make distcheck'
+
+ src/Makefile.am | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+commit 2abe1264a580858bf7803af1701117a462375fb4
+Author: Javier Jardón <jjardon@gnome.org>
+Date: Sun Jan 9 22:18:53 2011 -0500
+
+ Bug 31174 - Update autotools configuration
+
+ Makefile.am | 2 +
+ autogen.sh | 188
+ ++++------------------------------------------------------
+ configure.ac | 22 +++++--
+ 3 files changed, 29 insertions(+), 183 deletions(-)
+
+commit cc1a8a938b4c13e76b58825a9e1951c4134e634a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 6 14:58:52 2011 -0500
+
+ Fix ChanContext backtrack matching with GPOS
+
+ Reported on mailing list by Keith Stribley and Khaled Hosny.
+
+ src/hb-buffer-private.hh | 5 +++--
+ src/hb-buffer.cc | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 6 +++---
+ 3 files changed, 7 insertions(+), 6 deletions(-)
+
+commit 1c3183027fe823cd673866ba29d169b69f8efba1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 6 14:44:14 2011 -0500
+
+ Remove unused realloc
+
+ We always allocate and grow str and pos together.
+
+ src/hb-buffer.cc | 6 ------
+ 1 files changed, 0 insertions(+), 6 deletions(-)
+
+commit 76691f0240d6de230e9b42280b54e91639464635
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 6 14:16:59 2011 -0500
+
+ Fix ICU detection
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 756f794a1fce701092345a3f9afae039583fb55b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Dec 26 20:52:40 2010 -0500
+
+ Remove Graphite backend
+
+ It was unmaintained and the code has to be replaced to use the new
+ grphite-ng code base.
+
+ configure.ac | 6 -
+ src/Makefile.am | 14 ---
+ src/hb-graphite.cc | 310
+ ----------------------------------------------------
+ src/hb-graphite.h | 47 --------
+ 4 files changed, 0 insertions(+), 377 deletions(-)
+
+commit f3d9d9879364609502d9d3a3a9f4647adb167d78
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Dec 22 01:39:29 2010 -0500
+
+ Docs
+
+ src/hb-unicode.h | 60
+ +++++++++++++++++++++++++++---------------------------
+ 1 files changed, 30 insertions(+), 30 deletions(-)
+
+commit d86a5b3c5752abcc791724035ba4115958e6b5e2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Dec 21 18:36:25 2010 -0500
+
+ Bug 32274 - classic mongolian shaper
+
+ Add support for classic Mongolian script to the Arabic shaper.
+
+ Still work to be done around U+180E MONGOLIAN VOWEL SEPARATOR as it
+ should not be included in the final glyph stream the same way that
+ ZWNJ, etc should not appear in the final glyph stream.
+
+ But the joining part should be done.
+
+ There remains the question of how should the U+18A9 MONGOLIAN
+ LETTER ALI
+ GALI DAGALGA be handled as it has General Category NSM but a letter
+ nonetheless. For now, our generic logic makes this a joining
+ T instead
+ of joining D as other Mongolian letters are.
+
+ src/hb-ot-shape-complex-arabic.cc | 8 ++++++++
+ src/hb-ot-shape-complex-private.hh | 1 +
+ 2 files changed, 9 insertions(+), 0 deletions(-)
+
+commit b0e7378fa9a4fc6fc74d9b3c27d927602eaacc5b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Dec 21 14:19:32 2010 -0500
+
+ Reroute Mandaic shaping through the Arabic shaper
+
+ We added Mandaic joining data to the Arabic shaper a while ago, but
+ were not actually using the Arabic shaper for Mandaic. Fixed.
+
+ src/hb-ot-shape-complex-private.hh | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 88e7f37488e4e8590619d815b975232a0c9d2ea0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Dec 21 14:18:24 2010 -0500
+
+ Annotate the Arabic joining table with block information
+
+ src/gen-arabic-joining-table.py | 93
+ ++++++++++++++++++++------------
+ src/hb-ot-shape-complex-arabic-table.h | 24 +++++++-
+ 2 files changed, 80 insertions(+), 37 deletions(-)
+
+commit 1482a39e56cd4151874e5c073540274349240a87
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Dec 17 20:15:05 2010 -0500
+
+ Rename remaining metrics uses to extents
+
+ src/hb-font.h | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 22c537657cee1f47a4056a21e2cddfcbe6ab1c01
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Dec 14 23:51:29 2010 -0500
+
+ Rename TableDirectory to TableRecord as per OpenType 1.6
+
+ src/hb-open-file-private.hh | 18 +++++++++---------
+ 1 files changed, 9 insertions(+), 9 deletions(-)
+
+commit 33e8b86197239e667a887709104357bdc6566b7c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Dec 13 15:54:56 2010 -0500
+
+ Update 'head' table to OpenType 1.6
+
+ src/hb-ot-head-private.hh | 8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+commit b7683335146bfe3a74d9419db92cd7a8019a9c10
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Dec 13 14:22:35 2010 -0500
+
+ Disallow ligature substitutions replacing one glyph
+
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 7eb875118dc31e9fb0e23c45985396a8bfe977e3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Dec 13 14:13:35 2010 -0500
+
+ Mozilla Bug 618592 - freeze on typekit
+
+ Fix apply_lookup() for zero-input broken fonts.
+
+ src/hb-ot-layout-gsubgpos-private.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit bbbbe80ec9bc45c5b685bc09c8f993e98496555c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Dec 7 16:22:02 2010 -0500
+
+ Rename original_direction to target_direction
+
+ src/hb-ot-shape-private.hh | 2 +-
+ src/hb-ot-shape.cc | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+commit ee8aaf976a6eb42be49b63b4c51c7a0a338e0298
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Dec 7 16:20:42 2010 -0500
+
+ Fix arabic shaping of LTR text
+
+ We should ensure-direction before doing any complex work. The only
+ exception is mirroring that needs to see the original / final
+ direction,
+ not the native. Handle that.
+
+ src/hb-ot-shape.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit d1f1707adc03317760b0f75e04d0f3dd425e547f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 30 00:57:15 2010 -0500
+
+ Bug 31965 - some GNU/Linux distributions lack icu.pc but have
+ icu-config
+
+ Patch from suzuki toshiya.
+
+ configure.ac | 10 +++++++++-
+ 1 files changed, 9 insertions(+), 1 deletions(-)
+
+commit 3c48982be6b2286088541ee55cac78b0f2b6e771
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Nov 28 19:39:47 2010 -0500
+
+ Adjust pyx files to reflect change from int to hb_var_int_t
+
+ Patch from Thomas Hunger.
+
+ contrib/python/lib/harfbuzz.pyx | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+commit 4f9e4a40bc248aeb1364ed6f4aa7f392aa364497
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 22 11:30:32 2010 -0500
+
+ Fix failing checks
+
+ src/hb-ot-shape-complex-arabic-table.h | 37
+ ++++++++++++++++++++++++++++++++
+ 1 files changed, 37 insertions(+), 0 deletions(-)
+
+commit 9da26d6669e7f3b91ba37e71f6f8a6e2ea806688
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 22 11:03:18 2010 -0500
+
+ Remove email address from Copyright headers
+
+ COPYING | 2 +-
+ src/hb-ft.c | 2 +-
+ src/hb-icu.c | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+commit a45f00019242734fca742adeb2ed507305baeda6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 18 13:58:32 2010 -0500
+
+ Clarify copyright notice
+
+ COPYING | 12 ++++++++++++
+ README | 4 ++--
+ src/hb-graphite.cc | 4 ++--
+ src/hb-object-private.h | 2 +-
+ 4 files changed, 17 insertions(+), 5 deletions(-)
+
+commit 0884a8d9cd576f116400b3f7c8815e747c315d5e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 17 16:58:21 2010 -0500
+
+ Move generated table to its own file
+
+ src/Makefile.am | 1 +
+ src/hb-ot-shape-complex-arabic-table.h | 619
+ +++++++++++++++++++++++++++++++
+ src/hb-ot-shape-complex-arabic.cc | 621
+ +-------------------------------
+ 3 files changed, 621 insertions(+), 620 deletions(-)
+
+commit 14d784116b08685425e4ddcb1c1f813dbe2b2986
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 17 16:52:58 2010 -0500
+
+ Update Arabic joining table to include Mandaic
+
+ Mandaic was added to Unicode 6.0, but the joining data was not
+ updated.
+ Draft ArabicShaping.txt from 6.1 includes the joining data for
+ Mandaic.
+ Use that.
+
+ src/gen-arabic-joining-table.py | 45 ++++++++++----
+ src/hb-ot-shape-complex-arabic.cc | 123
+ +++++++++++++++++++++++++++++++------
+ 2 files changed, 137 insertions(+), 31 deletions(-)
+
+commit 43bf2f7f1ec427c431e2ee2fd1a9345e7d5c9718
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 17 14:49:40 2010 -0500
+
+ Add OpenType script tags for Unicode 5.2 and Unicode 6.0 scripts
+
+ Based on tags proposed by Microsoft for inclusion in OpenType.
+
+ src/hb-ot-tag.c | 34 +++++++++++++++++-----------------
+ 1 files changed, 17 insertions(+), 17 deletions(-)
+
+commit afab01cf7caca79cf6dfabe6827d1703be1a74f7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 17 14:35:34 2010 -0500
+
+ Add Unicode 6.0 scripts
+
+ src/hb-icu.c | 6 ++++++
+ src/hb-ot-tag.c | 7 ++++++-
+ src/hb-unicode.c | 7 ++++++-
+ src/hb-unicode.h | 7 ++++++-
+ 4 files changed, 24 insertions(+), 3 deletions(-)
+
+commit f234b68d18d956f7e4eb4bf58d6dc408d9e5146e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 17 14:25:44 2010 -0500
+
+ Change HB_SCRIPT_MEITEI_MAYEK to HB_SCRIPT_MEETEI_MAYEK
+
+ The new name matches the Unicode name. Reported by Jonathan Kew.
+
+ src/hb-icu.c | 2 +-
+ src/hb-ot-tag.c | 2 +-
+ src/hb-unicode.h | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 3ca9a6d1cffe950b325e1d522b20d4a645ae448e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 17 13:08:47 2010 -0500
+
+ Add TODO item
+
+ TODO | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 300cb41417d40473268e3b4089bed24e9e77a753
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 17 12:57:23 2010 -0500
+
+ Add XXX marks
+
+ src/hb-ot-layout-gsubgpos-private.hh | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit ea00aee9f94ae8c6cf03d620254817d5e1f51d64
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 5 10:51:37 2010 -0400
+
+ Add TODO item
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 3a852ae7fe6edfaadd75625d27515a3689503395
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 3 16:37:24 2010 -0400
+
+ Save general category and combining class in the buffer for reuse
+
+ src/hb-ot-layout-private.hh | 3 ++-
+ src/hb-ot-shape-complex-arabic.cc | 16 ++++++++++------
+ src/hb-ot-shape-private.hh | 6 ++++++
+ src/hb-ot-shape.cc | 26 +++++++++++++++++++++-----
+ 4 files changed, 39 insertions(+), 12 deletions(-)
+
+commit a5ab682b9ba8224fc132624f93e6fef9973a68ca
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 3 15:50:36 2010 -0400
+
+ More "unreached code" warning fixes
+
+ Ugly :(.
+
+ src/hb-blob.c | 48 ++++++++++++++++++++++++------------------------
+ 1 files changed, 24 insertions(+), 24 deletions(-)
+
+commit 4e22c7e94102c9f00c32b8cb6aaa832f83909149
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 3 15:47:12 2010 -0400
+
+ Add comment
+
+ src/hb-ot-layout-common-private.hh | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 0342034d1cb577d34b42f7204da7fb930c12a464
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 3 15:40:07 2010 -0400
+
+ Pedantic
+
+ src/hb-ot-layout-gpos-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4a2d844c2f12dc1b858ab4ddd737ded7c0852221
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 3 15:28:56 2010 -0400
+
+ Minor code shuffling
+
+ src/hb-ot-layout-private.hh | 21 ++------------
+ src/hb-ot-layout.cc | 61
+ +++++++++++++++++++++++++++++++-----------
+ 2 files changed, 48 insertions(+), 34 deletions(-)
+
+commit 11e3ec444a85fc72541823c2e98cc92c4ceb19af
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 3 15:11:04 2010 -0400
+
+ Fix a few more "unreachable code" warnings
+
+ src/hb-blob.c | 2 +-
+ src/hb-object-private.h | 12 ++--
+ src/hb-open-type-private.hh | 84
+ ++++++++++++++++------------------
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ src/hb-private.h | 3 +-
+ 5 files changed, 49 insertions(+), 54 deletions(-)
+
+commit 2304856340782c72cb30873f7907191dc359e921
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 3 12:46:58 2010 -0400
+
+ Remove another couple lines of dead code
+
+ src/hb-ot-layout-gsubgpos-private.hh | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit b8783c85ac5dd9ea8f5a66eacb92dfcfbf649a6d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 3 11:50:21 2010 -0400
+
+ Fix unreachable-code warning
+
+ src/hb-ot-layout-gpos-private.hh | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit c2709119c8c610a0d4d71884a7d4fdba7cb65b72
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 23:18:51 2010 -0400
+
+ Move things around some more
+
+ src/hb-ot-layout-gpos-private.hh | 8 ++++----
+ src/hb-ot-layout-gsub-private.hh | 4 ++--
+ src/hb-ot-layout-gsubgpos-private.hh | 9 +++++++--
+ src/hb-ot-layout-private.hh | 7 +++----
+ src/hb-ot-layout.cc | 6 +++---
+ 5 files changed, 19 insertions(+), 15 deletions(-)
+
+commit 194d4566ec054db03fa31d369a9f1c6cf4941e74
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 23:09:10 2010 -0400
+
+ Move buffer var allocation local
+
+ src/hb-ot-layout-gpos-private.hh | 19 ++++++++++++++-----
+ src/hb-ot-layout-private.hh | 2 --
+ 2 files changed, 14 insertions(+), 7 deletions(-)
+
+commit 1e7c1fcbc33599faefc32d4a28e5d8506d2c56fa
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 22:48:31 2010 -0400
+
+ Move code around
+
+ src/hb-ot-layout-gpos-private.hh | 59
+ ++++++++++++++++++++++++++++++++++++++
+ src/hb-ot-layout.cc | 59
+ +------------------------------------
+ src/hb-ot-layout.h | 4 +--
+ src/hb-ot-shape.cc | 2 +-
+ 4 files changed, 63 insertions(+), 61 deletions(-)
+
+commit bf94b3ad22b2fe4730d4e64d673c63154fc5b5fe
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 22:37:59 2010 -0400
+
+ Move some more code around
+
+ src/hb-ot-layout-gdef-private.hh | 21 ++++++++++++++
+ src/hb-ot-layout-private.hh | 27 +++++++++++++++---
+ src/hb-ot-layout.cc | 56
+ +++++--------------------------------
+ 3 files changed, 52 insertions(+), 52 deletions(-)
+
+commit 6334658fe79d6acfb46a2a147721b78f92510ebb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 22:11:32 2010 -0400
+
+ Simplify mark skipping logic
+
+ src/hb-ot-layout.cc | 17 +++--------------
+ 1 files changed, 3 insertions(+), 14 deletions(-)
+
+commit 8c69e65abed961002d90024c92e18538c6516262
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 22:07:49 2010 -0400
+
+ Rename lookup_flags to lookup_props since it's more than just flags
+
+ src/hb-ot-layout-common-private.hh | 6 ++++-
+ src/hb-ot-layout-gpos-private.hh | 14 ++++++------
+ src/hb-ot-layout-gsub-private.hh | 8 +++---
+ src/hb-ot-layout-gsubgpos-private.hh | 10 ++++----
+ src/hb-ot-layout-private.hh | 4 +-
+ src/hb-ot-layout.cc | 36
+ +++++++++++++++++-----------------
+ src/main.cc | 4 +-
+ 7 files changed, 43 insertions(+), 39 deletions(-)
+
+commit 98370e89d1bff248737b482d129c2a4deb8bfd95
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 17:39:01 2010 -0400
+
+ WIP removing external synthesized GDEF support and implementing
+ it internally
+
+ TODO | 2 -
+ src/hb-buffer-private.hh | 4 -
+ src/hb-buffer.cc | 3 -
+ src/hb-ot-layout-common-private.hh | 8 +-
+ src/hb-ot-layout-gdef-private.hh | 6 +-
+ src/hb-ot-layout-gpos-private.hh | 4 +-
+ src/hb-ot-layout-gsub-private.hh | 66 ++++++-----------
+ src/hb-ot-layout-gsubgpos-private.hh | 29 +++++++-
+ src/hb-ot-layout-private.hh | 29 ++-----
+ src/hb-ot-layout.cc | 138
+ +++++-----------------------------
+ src/hb-ot-layout.h | 26 -------
+ src/hb-ot-shape.cc | 10 +++
+ 12 files changed, 98 insertions(+), 227 deletions(-)
+
+commit 870e2d6eac01d004c72a925ea93e6823251d5fa2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 17:37:20 2010 -0400
+
+ Remove unused function
+
+ src/hb-buffer-private.hh | 10 ----------
+ src/hb-buffer.cc | 27 ---------------------------
+ 2 files changed, 0 insertions(+), 37 deletions(-)
+
+commit 1115890b90709fa5329a55d22f543020f3df9f6f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 17:07:04 2010 -0400
+
+ More cleanup
+
+ src/hb-buffer-private.hh | 5 +----
+ src/hb-ot-layout-private.hh | 6 ++++++
+ 2 files changed, 7 insertions(+), 4 deletions(-)
+
+commit dbf56b1d94910f04823e53e39ace1e5145bddc04
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 17:06:12 2010 -0400
+
+ More lig-id cleanup
+
+ src/hb-buffer-private.hh | 4 ++--
+ src/hb-buffer.cc | 2 +-
+ src/hb-ot-layout-gsub-private.hh | 8 +++++++-
+ 3 files changed, 10 insertions(+), 4 deletions(-)
+
+commit f6a23a0b9171958f76c1d0473b09fc08d2b3a0d0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 17:01:03 2010 -0400
+
+ More removal of lig-id code from buffer
+
+ src/hb-buffer.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit dd2ffd282c059194fd87fb1664e2e0cdb56a87a0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 16:57:01 2010 -0400
+
+ Minor renaming
+
+ src/hb-buffer-private.hh | 41
+ ++++++++++++++++++-------------------
+ src/hb-buffer.cc | 20 +++++++++---------
+ src/hb-ot-layout-gsub-private.hh | 8 +++---
+ src/hb-ot-shape.cc | 6 ++--
+ 4 files changed, 37 insertions(+), 38 deletions(-)
+
+commit fe263272a2b26204bc39829a94d90ab537517f3f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 16:51:02 2010 -0400
+
+ Move setting lig_id/component out of buffer and to the gsub code
+
+ src/hb-buffer-private.hh | 30 ++++++---------------
+ src/hb-buffer.cc | 52
+ ++++++-------------------------------
+ src/hb-ot-layout-gsub-private.hh | 27 +++++++++++--------
+ 3 files changed, 34 insertions(+), 75 deletions(-)
+
+commit 2e2b2480c01c788ea702d78ca830c2bb659654a8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 16:25:28 2010 -0400
+
+ Always allocate new ligature id
+
+ No practical point in reusing ligature ids.
+
+ src/hb-ot-layout-gsub-private.hh | 5 +----
+ 1 files changed, 1 insertions(+), 4 deletions(-)
+
+commit bf07d5a29c61baf6fd683289c7764f487ad7e413
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 16:19:13 2010 -0400
+
+ Set component=0 for ligature glyph
+
+ src/hb-ot-layout-gsub-private.hh | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 37ab877149582c7ce7416425bb402340e3f948a2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 15:38:06 2010 -0400
+
+ Remove comment
+
+ src/hb-buffer.cc | 20 --------------------
+ 1 files changed, 0 insertions(+), 20 deletions(-)
+
+commit 88474c6fdaf35c56368694a5b164f4988a004d49
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 14:42:15 2010 -0400
+
+ Get rid of the OpenType-specific internal buffer representation
+
+ Add variant integers to buffer item types. More cleanup coming.
+
+ TODO | 2 -
+ src/hb-buffer-private.hh | 35 +++++---------------
+ src/hb-buffer.cc | 62
+ ++++++++++++++++++------------------
+ src/hb-buffer.h | 2 +-
+ src/hb-ot-layout-gpos-private.hh | 24 +++++++-------
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ src/hb-ot-layout-private.hh | 4 +-
+ src/hb-ot-layout.cc | 39 +++++++++++------------
+ src/hb-ot-shape-complex-arabic.cc | 8 ++--
+ 9 files changed, 79 insertions(+), 99 deletions(-)
+
+commit 6cb8c3493019e1497921666fc268cb81943f9f1f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 14:27:03 2010 -0400
+
+ Add hb_var_int_t
+
+ src/hb-buffer.h | 6 +++---
+ src/hb-common.h | 10 ++++++++++
+ 2 files changed, 13 insertions(+), 3 deletions(-)
+
+commit f22802431a983bd4bc60a7653b1103973c3475cb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 2 19:12:37 2010 -0400
+
+ Remove trailing comma
+
+ src/hb-ot-shape-complex-arabic.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 13528d0c78cadb1f67267c9a692558caef9fdaa6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 14:09:27 2010 -0400
+
+ Supposedly implement vertical support in GPOS
+
+ Not tested at all.
+
+ src/hb-ot-layout-gpos-private.hh | 27 +++++++++++++++++++------
+ src/hb-ot-layout.cc | 39
+ +++++++++++++++++++++++--------------
+ 2 files changed, 44 insertions(+), 22 deletions(-)
+
+commit 9624de5b496846cd89ee4f7b07d38029aca70ce1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 13:44:59 2010 -0400
+
+ Clarify cursive_chain (and change its sign)
+
+ src/hb-ot-layout-gpos-private.hh | 4 ++--
+ src/hb-ot-layout.cc | 13 +++++++------
+ 2 files changed, 9 insertions(+), 8 deletions(-)
+
+commit d6c9eadb88240c40b3cb9a33f067e575cbc2f729
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 12:34:50 2010 -0400
+
+ Remove more pointless LONGTERMTODO items
+
+ src/hb-ot-layout-common-private.hh | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit e204674fe340a57c48a9fe7e1ed02a9a08f4aca4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 12:32:02 2010 -0400
+
+ Rename hb_ot_layout_get_lig_carets() to
+ hb_ot_layout_get_ligature_carets()
+
+ src/hb-ot-layout.cc | 14 +++++++-------
+ src/hb-ot-layout.h | 14 +++++++-------
+ 2 files changed, 14 insertions(+), 14 deletions(-)
+
+commit 3357d145f81cb7b746c910018fe3a0dfab00972c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 12:30:46 2010 -0400
+
+ Implement vertical support in get_lig_carets()
+
+ src/hb-ot-layout-gdef-private.hh | 34
+ ++++++++++++++++++----------------
+ src/hb-ot-layout.cc | 3 ++-
+ src/hb-ot-layout.h | 1 +
+ 3 files changed, 21 insertions(+), 17 deletions(-)
+
+commit 8eeed7eddc789151cbffe62ed6bfd77612266bf1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 12:07:49 2010 -0400
+
+ Remove LONGTERMTODO item that I'll never fix
+
+ src/hb-ot-layout-gsubgpos-private.hh | 6 ------
+ 1 files changed, 0 insertions(+), 6 deletions(-)
+
+commit 184a5279c64f37bc2ceefbe2191bb64ca87f88d8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 12:00:49 2010 -0400
+
+ Remove unused macro
+
+ src/hb-ot-layout-gpos-private.hh | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit af5d02a269d55331300df1e382241893928d64e0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 11:54:26 2010 -0400
+
+ Rewrite Cursive joining to act more like other pair lookups
+
+ Look forward for next character instead of joining to the last
+ character.
+
+ src/hb-ot-layout-gpos-private.hh | 71
+ ++++++++++++++++---------------------
+ src/hb-ot-layout-private.hh | 10 -----
+ 2 files changed, 31 insertions(+), 50 deletions(-)
+
+commit ea22c749c7371cf66ca44f0bfe7030aef1926edd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 11:09:48 2010 -0400
+
+ Fix Cursive positioning
+
+ Test case: "مرا" rendered using IranNastaliq.
+
+ src/hb-ot-layout-gpos-private.hh | 124
+ +-------------------------------------
+ 1 files changed, 3 insertions(+), 121 deletions(-)
+
+commit aefdb64689aab19df76590a36c4a04052a8bffdb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 10:40:39 2010 -0400
+
+ Fix segfault with Arabic combining marks
+
+ src/hb-ot-shape-complex-arabic.cc | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 12b2d09a87adc1e1aac089cd2e09a68fb7129829
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 01:28:28 2010 -0400
+
+ Remove obsolete TODO item
+
+ We don't cache any metrics internally, so the correct way to add more
+ glyph metrics items is to add new callbacks for them. We already have
+ separeate callbacks for advance vs extents.
+
+ TODO | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 248e3c2ba47889c247959e44166644872aed59ba
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 01:23:14 2010 -0400
+
+ Oops, remove extra mask setting that broke complex shaping
+
+ src/hb-ot-shape.cc | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 502f4cba3e0bcd625d31f8fd295b8b18e2d02a5a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 27 01:13:56 2010 -0400
+
+ Divide get_metrics into get_advance and get_extents
+
+ Graphite module not updated.
+ Bump version to 0.3.
+
+ configure.ac | 2 +-
+ src/hb-font-private.h | 3 +-
+ src/hb-font.cc | 96
+ +++++++++++++++++++++++++++++++++---------------
+ src/hb-font.h | 61 +++++++++++++++++++------------
+ src/hb-ft.c | 72 ++++++++++++++++++++++--------------
+ src/hb-ot-shape.cc | 7 ++--
+ 6 files changed, 154 insertions(+), 87 deletions(-)
+
+commit ec6c0e54d322d58cbc835feb58dcec7ede6ab744
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 26 11:28:14 2010 -0400
+
+ Fix blob leak
+
+ src/hb-font.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit bd7378b2ef9793de4e7f57b920f29f48ac9d0c25
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 13 18:33:16 2010 -0400
+
+ Massage mask setting a bit more
+
+ Still finding the exact correct way the masks should be set.
+
+ src/hb-buffer-private.hh | 19 ++++++++++++++++---
+ src/hb-buffer.cc | 9 +++++++++
+ src/hb-ot-shape.cc | 6 ++++--
+ 3 files changed, 29 insertions(+), 5 deletions(-)
+
+commit 961f9baa7bc3556f1e4e7135859cebe1351f73a4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 13 17:17:00 2010 -0400
+
+ Oops, actually set global mask
+
+ src/hb-buffer.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 39dede9ffffe732f78cbd092ccb3b48d77ddd66d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 13 15:54:06 2010 -0400
+
+ Make sure boolean features always use value=1
+
+ Previously boolean features turned on the entire feature mask.
+ This is
+ wrong if feature is Alternate and user has provided values bigger
+ than one.
+ Though, I don't think other engines support such corner cases.
+
+ src/hb-ot-map-private.hh | 10 ++++++++--
+ src/hb-ot-map.cc | 3 ++-
+ src/hb-ot-shape-complex-arabic.cc | 2 +-
+ src/hb-ot-shape.cc | 2 +-
+ 4 files changed, 12 insertions(+), 5 deletions(-)
+
+commit 3506b2e78db27e7835bd2c09c053a9807c9cac40
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 13 15:38:52 2010 -0400
+
+ Return early if mask is 0
+
+ src/hb-buffer.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 5c1c8c9c50ddbe66ea595afb245a208b7775b27c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 13 15:36:38 2010 -0400
+
+ Make sure feature values don't leak out of their mask
+
+ src/hb-buffer.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 852912fc2db06b6183a2dc87c45ec1b563063572
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 13 15:34:50 2010 -0400
+
+ Fix applying default-value for features
+
+ Previously if a default global feature was overrided by a non-global
+ user feature, we were not setting any default mask for the feature,
+ essentially disabling the feature by default. Fix that.
+
+ TODO | 2 --
+ src/hb-ot-map-private.hh | 10 ++++++----
+ src/hb-ot-map.cc | 13 +++++++------
+ 3 files changed, 13 insertions(+), 12 deletions(-)
+
+commit 2989be4919242670c94825bded96db20a7b2035b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 13 15:18:29 2010 -0400
+
+ Set user masks after complex masks
+
+ src/hb-ot-shape.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit a7820b7b15a809b4a1a4077147ceed7bea528483
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 13 14:20:48 2010 -0400
+
+ Add TODO item
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 04a3023a66203d94b77f2d7a8d6bcdedf067e155
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 13 10:57:27 2010 -0400
+
+ Cleanup TODO
+
+ Looks like a roadmap now.
+
+ TODO | 72
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------
+ 1 files changed, 59 insertions(+), 13 deletions(-)
+
+commit 3111b8a0d5b38da57c0f6285aec2b92eb690188f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 13 10:41:53 2010 -0400
+
+ Fix stupid bug, oops
+
+ src/hb-font.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3703f88b74707113e782eb6ca9a77603561760d0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 12 18:34:20 2010 -0400
+
+ Step the version up to 0.2 now that Arabic shaper is in
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 758f68b860b44b5a04eb3dde5cb40b1b04cf634a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 12 17:37:44 2010 -0400
+
+ Fix Arabic shaper
+
+ It's tested now. It works!
+
+ src/hb-ot-shape-complex-arabic.cc | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+commit 13403bc67a01e0d4908fb964093fd02ddd11c580
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 12 17:23:54 2010 -0400
+
+ Hookup Arabic shaper!
+
+ Not tested yet.
+
+ src/hb-ot-shape-complex-arabic.cc | 6 ++--
+ src/hb-ot-shape-complex-private.hh | 37
+ +++++++++++++++++++++--------------
+ src/hb-ot-shape-private.hh | 14 ++++++++++++-
+ src/hb-ot-shape.cc | 3 +-
+ 4 files changed, 40 insertions(+), 20 deletions(-)
+
+commit 57ac0ecb7843533b2e6e6d6c8a12b2a44437cc1c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 12 17:07:02 2010 -0400
+
+ Merge clearing masks and setting global masks
+
+ src/hb-buffer-private.hh | 11 ++++++-----
+ src/hb-buffer.cc | 5 +++--
+ src/hb-ot-map.cc | 2 +-
+ src/hb-ot-shape.cc | 7 ++-----
+ 4 files changed, 12 insertions(+), 13 deletions(-)
+
+commit fc96596b7c1c4e62491e951a3c256fb00dcde550
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 12 17:00:25 2010 -0400
+
+ Form clusters before setting masks
+
+ src/hb-ot-shape.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 1e80782244cdb1dedae9d1e61079d0508e57ca72
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 12 17:00:07 2010 -0400
+
+ Clear masks before setting them up, not after!
+
+ src/hb-ot-shape.cc | 6 ++----
+ 1 files changed, 2 insertions(+), 4 deletions(-)
+
+commit fd3d32d31cb6d74a9994b6850d539fd0b707d941
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 12 16:57:47 2010 -0400
+
+ Add hb_ot_shape_execute()
+
+ Not public yet.
+
+ src/hb-ot-shape-private.hh | 5 ++---
+ src/hb-ot-shape.cc | 19 ++++++++++++++-----
+ 2 files changed, 16 insertions(+), 8 deletions(-)
+
+commit 49baa1f69efb0e3c62e45bd59dd88459a84bf390
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 12 16:50:36 2010 -0400
+
+ Add hb_ot_complex_shaper_t stuff and start hooking Arabic shaper up
+
+ src/Makefile.am | 3 +-
+ src/hb-ot-map-private.hh | 2 +-
+ src/hb-ot-map.cc | 2 +-
+ src/hb-ot-shape-arabic.cc | 706
+ -----------------------------------
+ src/hb-ot-shape-complex-arabic.cc | 715
+ ++++++++++++++++++++++++++++++++++++
+ src/hb-ot-shape-complex-private.hh | 88 +++++
+ src/hb-ot-shape-private.hh | 12 +-
+ src/hb-ot-shape.cc | 8 +-
+ 8 files changed, 813 insertions(+), 723 deletions(-)
+
+commit 605ed468f380f86d642031f6451447d270cb6de1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 12 16:19:29 2010 -0400
+
+ Add hb_ot_shape_plan_t
+
+ This is the object that a separate plan/execute shaping API will
+ use in
+ between the two stages.
+
+ src/hb-ot-shape-private.hh | 12 ++++++++++--
+ src/hb-ot-shape.cc | 38 ++++++++++++++++++--------------------
+ 2 files changed, 28 insertions(+), 22 deletions(-)
+
+commit 895fb5d364e7ae5d9d2e34b9f68b8651804369ef
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 12 16:00:21 2010 -0400
+
+ Refactor, in a different direction
+
+ src/hb-ot-map-private.hh | 15 ++++++++-------
+ src/hb-ot-map.cc | 23 ++++++++++++-----------
+ src/hb-ot-shape-private.hh | 13 +------------
+ src/hb-ot-shape.cc | 33 +++++++++++++++++----------------
+ 4 files changed, 38 insertions(+), 46 deletions(-)
+
+commit d2ba016ca1ba7489537768b619980d5159b5870c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 12 15:35:45 2010 -0400
+
+ More refactoring
+
+ src/hb-ot-map-private.hh | 32 +++++---------------------------
+ src/hb-ot-map.cc | 32 +++++++++++++++++++++++++++++---
+ src/hb-ot-shape-private.hh | 16 ++++++++++++++--
+ src/hb-ot-shape.cc | 43
+ ++++++++++++++++++++++++++++---------------
+ src/hb-ot-shape.h | 10 +++++-----
+ 5 files changed, 81 insertions(+), 52 deletions(-)
+
+commit 66e487dfbfdccd0c4be8cd11661d412ca27c3425
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 12 13:51:19 2010 -0400
+
+ Update Arabic shaping table to Unicode 6.0.0.
+
+ src/hb-ot-shape-arabic.cc | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit f4792d99eee0e8cd72b7cb01c96a09f16e2a72ce
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 12 12:32:18 2010 -0400
+
+ Fix infinite loop!
+
+ Untested code is indeed buggy code.
+
+ Mozilla bug #603352.
+
+ src/hb-ot-tag.c | 6 ++----
+ 1 files changed, 2 insertions(+), 4 deletions(-)
+
+commit 993d1e786a32612b796dae8309ce402a4121bec7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 12 11:17:30 2010 -0400
+
+ Fix missing negation in unreachable code!
+
+ Mozilla bug #603346
+
+ src/hb-open-type-private.hh | 5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+
+commit 52601275d5e4000dada4f925fb78723eeeee7bd4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 8 20:38:46 2010 -0400
+
+ More separation
+
+ src/hb-ot-shape.cc | 14 +++++---------
+ 1 files changed, 5 insertions(+), 9 deletions(-)
+
+commit 6b7e6758626268ba1c7c266128e618ec73ae2c0f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 8 20:30:04 2010 -0400
+
+ Minor
+
+ src/hb-ot-shape.cc | 22 +++++++++++-----------
+ 1 files changed, 11 insertions(+), 11 deletions(-)
+
+commit aa9c450bb2d7c3c9e36ea32e3558250391a0582d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 8 20:27:38 2010 -0400
+
+ Enable 'rtlm' mirroring
+
+ src/hb-ot-map-private.hh | 9 +++++----
+ src/hb-ot-shape.cc | 30 +++++++++++++++---------------
+ 2 files changed, 20 insertions(+), 19 deletions(-)
+
+commit 36925f695d349a53d52ecc3a58f18240a6977463
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 8 20:20:32 2010 -0400
+
+ Rename hb_mask_allocator_t to hb_ot_map_t
+
+ hb_ot_plan_t may be a better name, donno.
+
+ src/hb-ot-map-private.hh | 4 +-
+ src/hb-ot-map.cc | 2 +-
+ src/hb-ot-shape-private.hh | 4 +-
+ src/hb-ot-shape.cc | 49
+ +++++++++++++++++++------------------------
+ 4 files changed, 27 insertions(+), 32 deletions(-)
+
+commit f5dd3be46b5c77a2c5b97b82a0b67ac9e851b898
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 8 20:16:23 2010 -0400
+
+ Improve checks
+
+ src/check-c-linkage-decls.sh | 2 +-
+ src/check-header-guards.sh | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 5a2b0b3878cd9c62121bb4fd6344e102a9ee1825
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 8 20:14:57 2010 -0400
+
+ Add hb-ot-map.cc
+
+ src/Makefile.am | 1 +
+ src/hb-ot-map-private.hh | 129 +-----------------------------------
+ src/hb-ot-map.cc | 165
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 168 insertions(+), 127 deletions(-)
+
+commit ecc4550ed7bc900a61081edfbcd0ad09cbf29b36
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 8 20:05:29 2010 -0400
+
+ Fix feature overriding
+
+ src/hb-ot-map-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 8f08c3275040870a645ef034a38d30c05c619f21
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 8 19:43:48 2010 -0400
+
+ Minor cleanup
+
+ src/hb-open-type-private.hh | 8 +----
+ src/hb-ot-map-private.hh | 61
+ ++++++++++++-------------------------------
+ src/hb-ot-tag.c | 11 +++----
+ src/hb-private.h | 4 +++
+ 4 files changed, 28 insertions(+), 56 deletions(-)
+
+commit a806762a314e83154793d96ee665e6668d6b56de
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 8 19:18:40 2010 -0400
+
+ Add hb-ot-shape-private.hh
+
+ src/Makefile.am | 1 +
+ src/hb-ot-shape-arabic.cc | 2 +-
+ src/hb-ot-shape-private.hh | 60
+ ++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 62 insertions(+), 1 deletions(-)
+
+commit 4924affe0f0adf75f2a0e2137a71206b0576d63f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 8 19:18:16 2010 -0400
+
+ Add hb-ot-map-private.hh
+
+ src/Makefile.am | 1 +
+ src/hb-ot-map-private.hh | 307
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-ot-shape.cc | 274 +----------------------------------------
+ 3 files changed, 315 insertions(+), 267 deletions(-)
+
+commit a7c5046d6b676a32298b97403a49235f7f255161
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 8 18:47:47 2010 -0400
+
+ Add private hb_segment_properties_t
+
+ src/hb-buffer-private.hh | 14 ++++++++------
+ 1 files changed, 8 insertions(+), 6 deletions(-)
+
+commit b897c607d91d569f4eaa681d1f5b3d9f3d2bb093
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 8 18:41:57 2010 -0400
+
+ Flip the OT bit-allocation vs gsub/gpos inside-out
+
+ We now build our entire attack plan before jumping in.
+
+ src/hb-ot-shape.cc | 333
+ +++++++++++++++++++++++++++------------------------
+ 1 files changed, 176 insertions(+), 157 deletions(-)
+
+commit e89b7d2a61b7f58e6c7cec00d5ce2246dee1e8a1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 8 12:29:59 2010 -0400
+
+ Logically separate feature collection
+
+ src/hb-ot-shape.cc | 29 ++++++++++++++++++-----------
+ 1 files changed, 18 insertions(+), 11 deletions(-)
+
+commit 5b88908f12ad1d828dd6075fb8fc0036c2d6af3a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 8 12:23:01 2010 -0400
+
+ Minor
+
+ src/hb-ot-shape.cc | 18 ++++++------------
+ 1 files changed, 6 insertions(+), 12 deletions(-)
+
+commit 5360ce0c5c33f921b3f9ad3f42529a19df5ad0fe
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 7 21:21:11 2010 -0400
+
+ Move some more code around
+
+ src/hb-ot-shape.cc | 27 +++++++++++++--------------
+ 1 files changed, 13 insertions(+), 14 deletions(-)
+
+commit d9c726078828d50db62e05407a3f38f2e7607533
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 7 21:19:54 2010 -0400
+
+ Minor
+
+ src/hb-ot-shape.cc | 18 +++++++++---------
+ 1 files changed, 9 insertions(+), 9 deletions(-)
+
+commit efe0d682e860ffd23a1d17c68c8273f17d51c1c9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 7 21:12:46 2010 -0400
+
+ Simplify compiling lookups
+
+ src/hb-ot-shape.cc | 66
+ +++++++++++++++++++++------------------------------
+ 1 files changed, 27 insertions(+), 39 deletions(-)
+
+commit 476c94218b4f5b8e119e82b0e10b641e0c10bf56
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 7 17:47:33 2010 -0400
+
+ Rename
+
+ src/hb-ot-shape.cc | 18 ++++++++++--------
+ 1 files changed, 10 insertions(+), 8 deletions(-)
+
+commit 34db6f031d7ac009f554386ef990bad44886b9ee
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 7 01:21:19 2010 -0400
+
+ Add XXX note
+
+ src/hb-buffer.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 98aa3f65446496dc250d9b01d98cacfdf1157e06
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 6 00:23:36 2010 -0400
+
+ Call hb_ot_shape_setup_lookups_complex()
+
+ src/hb-ot-shape.cc | 10 +++++++++-
+ 1 files changed, 9 insertions(+), 1 deletions(-)
+
+commit f1d07885dc358e79c237e824c94b3320c0a9c17d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 6 00:21:37 2010 -0400
+
+ Rename setup_lookups()
+
+ src/hb-ot-shape.cc | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+commit affc5abac7bdae51df85856a5478d34d96fda4fe
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Oct 6 00:18:16 2010 -0400
+
+ Move table_tag to hb_ot_shape_context_t
+
+ src/hb-ot-shape.cc | 31 +++++++++++++++++--------------
+ 1 files changed, 17 insertions(+), 14 deletions(-)
+
+commit 967240dd8b96802345ef273e75427066e91ea8fb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 5 23:00:05 2010 -0400
+
+ Add internal hb_ot_shape_context_t
+
+ src/hb-ot-shape-arabic.cc | 26 ++----
+ src/hb-ot-shape.cc | 237
+ +++++++++++++++++++--------------------------
+ 2 files changed, 108 insertions(+), 155 deletions(-)
+
+commit 3eb936f1539475098f39be78654b9c39b86f0799
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 5 18:36:58 2010 -0400
+
+ Add Arabic/Syriac/N'ko shaping logic
+
+ Not hooked up just yet.
+
+ src/Makefile.am | 9 +
+ src/gen-arabic-joining-table.py | 39 +++
+ src/hb-ot-shape-arabic.cc | 716
+ +++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 764 insertions(+), 0 deletions(-)
+
+commit 0109816b50064a314389333ff64aaf22cb4b1e56
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Oct 5 18:36:45 2010 -0400
+
+ Update build system
+
+ autogen.sh | 3 ---
+ configure.ac | 1 +
+ 2 files changed, 1 insertions(+), 3 deletions(-)
+
+commit e81d7afe6e0e9dd26025f3243a11cf0b408a8046
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Oct 4 18:18:48 2010 -0400
+
+ Add hb_face_get_upem()
+
+ src/hb-font.cc | 6 ++++++
+ src/hb-font.h | 3 +++
+ 2 files changed, 9 insertions(+), 0 deletions(-)
+
+commit d47f79db92fa45d51cd5f7845db8a206f5ec122b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Oct 4 18:13:30 2010 -0400
+
+ Add TODO item
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit bd361945a89ea31e6c4525aa030e18744ea81fb3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Oct 4 17:22:57 2010 -0400
+
+ Add API comments
+
+ src/hb-font.h | 17 +++++++++++++++--
+ 1 files changed, 15 insertions(+), 2 deletions(-)
+
+commit 645f6f265b5f6fb85b3c0f59ea874d58c86e3917
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Oct 4 17:01:01 2010 -0400
+
+ Add is_mutable() functions
+
+ Correspond to the make_mutable() ones.
+
+ src/hb-font.cc | 6 ++++++
+ src/hb-font.h | 2 ++
+ src/hb-unicode.c | 6 ++++++
+ src/hb-unicode.h | 2 ++
+ 4 files changed, 16 insertions(+), 0 deletions(-)
+
+commit 19c0eab8cf96d00e168c4b11ec435019c1ed44f7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Oct 4 16:45:21 2010 -0400
+
+ Add getters for all setter APIs
+
+ One in particular is not a straight getter: hb_font_unset_funcs() is
+ special because of the specific needs of the lifecycle management of
+ the user_data object.
+
+ src/hb-font.cc | 64
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-font.h | 40 +++++++++++++++++++++++++++++++++
+ src/hb-unicode.c | 32 +++++++++++++++++++++++++++
+ src/hb-unicode.h | 31 +++++++++++++++++++++++++-
+ 4 files changed, 166 insertions(+), 1 deletions(-)
+
+commit f0feb084b0fd1510474b25404d1dcc5686ee0538
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Oct 3 19:09:39 2010 -0400
+
+ Minor
+
+ src/hb-ot-layout-private.hh | 12 +++++++-----
+ 1 files changed, 7 insertions(+), 5 deletions(-)
+
+commit ac0c1663fa6e93a5a94c88fc7497bc11ca17f0a1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 1 19:09:23 2010 -0400
+
+ Avoid div-by-zero, validate upem
+
+ src/hb-ot-head-private.hh | 7 +++++++
+ src/hb-ot-layout-private.hh | 6 +++---
+ 2 files changed, 10 insertions(+), 3 deletions(-)
+
+commit 7f97d2cd904ea999c099c73c52187c5d65aeec67
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 1 18:58:50 2010 -0400
+
+ Pedantic
+
+ src/hb-open-type-private.hh | 12 ++++++------
+ src/hb-ot-layout-common-private.hh | 2 +-
+ src/hb-ot-layout-gdef-private.hh | 10 +++++-----
+ src/hb-ot-layout-gpos-private.hh | 6 +++---
+ 4 files changed, 15 insertions(+), 15 deletions(-)
+
+commit 2841436926d6a406bd1f4a35c66a0e3c2fdbeca7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Sep 29 12:20:36 2010 -0400
+
+ Don't zero glyph advances in MarkToBase and similar lookups
+
+ See email thread "Should MarkToBase attachment zero the mark advance?"
+ started by Jonathan Kew on 23 August 2010 for details.
+
+ src/hb-ot-layout-gpos-private.hh | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 36b3862009c00ad922d68810173a69ac59723365
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Sep 29 12:10:24 2010 -0400
+
+ One fewer cmp() implementation...
+
+ src/hb-ot-layout-common-private.hh | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit 4e573715ae5f5ed486ad66382bb44c47a86591ff
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Sep 28 16:23:58 2010 -0400
+
+ Improve cmp function parameter namings and casts
+
+ No semantic change.
+
+ src/hb-open-type-private.hh | 6 +++---
+ src/hb-ot-layout-common-private.hh | 6 +++---
+ src/hb-ot-shape.cc | 8 ++++----
+ 3 files changed, 10 insertions(+), 10 deletions(-)
+
+commit dca8aff24652c83c53efbb9d06e5e1c7ef1c2fa5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Sep 28 16:25:23 2010 -0400
+
+ Add comment re DejaVu Sans Mono having 'dflt' script
+
+ src/hb-ot-layout.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 9dc45401c07cb40114067cafbe286c63a9598f3b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Sep 28 16:23:28 2010 -0400
+
+ Fix stupid bug in bsearch cmp function!
+
+ src/hb-ot-layout-common-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 6fca4c18c42bdcbc67ee8855499c51c7d6311eb2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Sep 23 10:28:51 2010 -0400
+
+ Add TODO iteam
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit f2a30bd605a57b99fce4b78e288c2ca62f7191ad
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Sep 23 10:27:08 2010 -0400
+
+ Remove unimplemented method hb_font_get_funcs()
+
+ Got to add a suitable replacement.
+
+ src/hb-font.h | 3 ---
+ 1 files changed, 0 insertions(+), 3 deletions(-)
+
+commit 7b9a38a112aa2421d97187a9b30619360edeabbe
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Sep 22 17:42:59 2010 -0400
+
+ Add test.c using public API
+
+ src/Makefile.am | 6 +++-
+ src/test.c | 94
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 99 insertions(+), 1 deletions(-)
+
+commit 9ea7368fce3fa373d8d2925961ad211f5cf6ce70
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Sep 22 17:38:44 2010 -0400
+
+ Fix hb_ot_layout leak
+
+ src/hb-ot-layout.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 8e577acae2e605547b6a1b9b3a941cb9e3c56a4c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Sep 22 17:37:02 2010 -0400
+
+ Fix blob refcounting with insane SFNT table directories
+
+ src/hb-font.cc | 4 +---
+ 1 files changed, 1 insertions(+), 3 deletions(-)
+
+commit 75371bea4fbf50b8604d2698b4935c011648a6b6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Sep 22 17:12:10 2010 -0400
+
+ Add TODO item
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 5bd1e95236320aed60fb29ca1e93b9595d4aeeec
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Sep 22 16:46:18 2010 -0400
+
+ Speedup Device table delta computation for common cases
+
+ src/hb-ot-layout-common-private.hh | 25 +++++++++++++++++++++----
+ 1 files changed, 21 insertions(+), 4 deletions(-)
+
+commit ed4acbde9c5e3323cc95037b500d1bf2878ed3ee
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 16 14:36:27 2010 -0400
+
+ Fix NULL dereference
+
+ Reported by Jonathan Kew. Face table handling needs to be redone
+ anyway, but fix this for now.
+
+ src/hb-ot-layout.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 258305c2a5dd47bd2d83f12eaf9caa5b19ae5efb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 13 14:10:02 2010 -0400
+
+ [GPOS] Fix div-by-zero
+
+ Patch by Jonathan Kew. Mozilla bug #465728.
+
+ src/hb-ot-layout-gpos-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 2422c4b96d32037a5cdaef4c427ed1d25db5f647
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 13 14:00:34 2010 -0400
+
+ Add TODO
+
+ src/hb-ot-shape.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 27f0b092a13344e8791c496c77a3c1e5de4f887c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 23 17:35:54 2010 -0400
+
+ Logically separate feature allocation from application
+
+ src/hb-ot-shape.cc | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 6cf63132dc771e1bcd5627720daf4bd2ea0800a5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 23 17:32:26 2010 -0400
+
+ Minor
+
+ src/hb-ot-shape.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4e4ef24e46f273ad2bdda2f718223e05b37dd50f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 23 17:22:11 2010 -0400
+
+ Towards separating bit allocation from shaping
+
+ src/hb-buffer-private.hh | 9 +++++--
+ src/hb-buffer.cc | 12 +++++-----
+ src/hb-ot-layout-gpos-private.hh | 2 +-
+ src/hb-ot-layout.cc | 2 +-
+ src/hb-ot-shape.cc | 41
+ ++++++++++++++-----------------------
+ 5 files changed, 30 insertions(+), 36 deletions(-)
+
+commit da6cff3864d2ef4a061a29e5918359bafcd51f4c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 23 15:40:58 2010 -0400
+
+ Add TODO items
+
+ TODO | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit acdba3f90b232fc12fcb200dca2584481b339118
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 23 15:11:18 2010 -0400
+
+ Prefer C linkage
+
+ src/Makefile.am | 1 +
+ src/check-c-linkage-decls.sh | 18 ++++++++++++++++++
+ src/hb-blob-private.h | 2 ++
+ src/hb-blob.c | 18 ++++++++++++------
+ src/hb-blob.h | 2 ++
+ src/hb-buffer-private.hh | 1 +
+ src/hb-buffer.cc | 7 ++++++-
+ src/hb-buffer.h | 1 +
+ src/hb-common.c | 6 ++++++
+ src/hb-common.h | 21 +++++++++++++--------
+ src/hb-font-private.h | 1 +
+ src/hb-font.cc | 4 ++++
+ src/hb-font.h | 1 +
+ src/hb-ft.c | 10 ++++++++--
+ src/hb-ft.h | 2 ++
+ src/hb-glib.c | 6 ++++++
+ src/hb-glib.h | 2 ++
+ src/hb-graphite.cc | 6 ++++++
+ src/hb-graphite.h | 3 ++-
+ src/hb-icu.c | 6 ++++++
+ src/hb-icu.h | 2 ++
+ src/hb-language.c | 5 +++++
+ src/hb-language.h | 2 ++
+ src/hb-object-private.h | 2 ++
+ src/hb-open-file-private.hh | 4 ++++
+ src/hb-open-type-private.hh | 5 +++++
+ src/hb-ot-head-private.hh | 5 +++++
+ src/hb-ot-layout-common-private.hh | 6 ++++++
+ src/hb-ot-layout-gdef-private.hh | 4 ++++
+ src/hb-ot-layout-gpos-private.hh | 6 ++++++
+ src/hb-ot-layout-gsub-private.hh | 7 ++++++-
+ src/hb-ot-layout-gsubgpos-private.hh | 13 +++++++++++++
+ src/hb-ot-layout-private.hh | 3 ++-
+ src/hb-ot-layout.cc | 5 +++++
+ src/hb-ot-layout.h | 1 +
+ src/hb-ot-shape.cc | 6 ++++++
+ src/hb-ot-shape.h | 2 ++
+ src/hb-ot-tag.c | 5 +++++
+ src/hb-ot-tag.h | 2 ++
+ src/hb-ot.h | 3 +++
+ src/hb-private.h | 5 +++++
+ src/hb-shape.cc | 5 +++++
+ src/hb-shape.h | 1 +
+ src/hb-unicode-private.h | 1 +
+ src/hb-unicode.c | 6 ++++++
+ src/hb-unicode.h | 1 +
+ src/hb.h | 3 +++
+ src/main.cc | 6 ++++++
+ 48 files changed, 214 insertions(+), 20 deletions(-)
+
+commit cc6d52279d10a2edcf0d86c3a18a79ff4f6d3858
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 23 15:00:13 2010 -0400
+
+ De-C++ where possible
+
+ Helps with avoiding many "extern C" declarations in source files.
+
+ src/Makefile.am | 4 +-
+ src/check-header-guards.sh | 2 +-
+ src/hb-font-private.h | 95 +++++++++++++++
+ src/hb-font-private.hh | 95 ---------------
+ src/hb-font.cc | 2 +-
+ src/hb-ft.c | 240
+ ++++++++++++++++++++++++++++++++++++++
+ src/hb-ft.cc | 240
+ --------------------------------------
+ src/hb-graphite.cc | 2 +-
+ src/hb-ot-layout-gdef-private.hh | 2 +-
+ src/hb-ot-layout-private.hh | 2 +-
+ 10 files changed, 342 insertions(+), 342 deletions(-)
+
+commit 0dd200d28f51bf4062d8a377432c8977c80cb210
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 23 14:56:29 2010 -0400
+
+ Header dep cleanup
+
+ src/hb-font-private.hh | 2 --
+ src/hb-ot-layout-private.hh | 1 +
+ 2 files changed, 1 insertions(+), 2 deletions(-)
+
+commit fb0d25246267851a1fc200ead28c56359a40047e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 23 14:54:22 2010 -0400
+
+ dos2unix
+
+ src/hb-ot-head-private.hh | 256
+ ++++++++++++++++++++++----------------------
+ 1 files changed, 128 insertions(+), 128 deletions(-)
+
+commit 81408cd51ce575891e79e6483be187130f864c28
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 23 14:46:57 2010 -0400
+
+ Don't use "operator ="
+
+ Some compilers don't like operator = defined on members of union
+ members
+ either. Reported by Ginn Chen for Sun Studio compilers.
+
+ src/hb-open-type-private.hh | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 39fe34d4c356516f0a92f42b13a168572829d24e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 22 18:12:38 2010 -0400
+
+ Add TODO option
+
+ TODO | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 243a96f41482edb83e4798358064bd3329dd278c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 21 17:21:12 2010 -0400
+
+ Add arm build fix to TODO
+
+ TODO | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit c407f05f99f9225916d3d0ae06eac8fbc8b55b97
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 21 17:20:44 2010 -0400
+
+ Remove fixed TODO item
+
+ TODO | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 4f801bd6586defdbf70162e0c7f8968d2b476df2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 21 16:37:01 2010 -0400
+
+ Mozilla bug 580233 - check for zero-length record in hb sanitizer.
+
+ Patch / report by Jonathan Kew.
+
+ src/hb-open-type-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 17e9ff938b638fd1cb80c990ba13bd47562116b8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 15 11:21:34 2010 -0700
+
+ Fix 64bit issues with debug prints
+
+ src/hb-blob.c | 10 +++++-----
+ src/hb-open-type-private.hh | 5 +++--
+ 2 files changed, 8 insertions(+), 7 deletions(-)
+
+commit fd56ae49637b978ea3b36fab5b48f1a3cc99e90e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 8 00:53:40 2010 -0400
+
+ Don't bother sorting, it's a safe font error if the array is not
+ sorted
+
+ src/hb-open-type-private.hh | 29 -----------------------------
+ src/hb-ot-layout-common-private.hh | 7 -------
+ 2 files changed, 0 insertions(+), 36 deletions(-)
+
+commit cc8a4abea68f2dba26feb5785f9e518e6853c744
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 8 00:40:04 2010 -0400
+
+ Use bsearch where applicable
+
+ src/hb-open-type-private.hh | 49 ++++++++++++
+ src/hb-ot-layout-common-private.hh | 145
+ +++++++++++++-----------------------
+ 2 files changed, 100 insertions(+), 94 deletions(-)
+
+commit 2f418f5709b2b8b3ef2f6056b9d8c13b66f0b74a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 7 22:07:40 2010 -0400
+
+ Remove useless TODO
+
+ src/hb-open-file-private.hh | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit da8edbb62204dc39f93d500ef85929e234e0bd19
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jun 9 07:15:39 2010 -0400
+
+ Fix header
+
+ src/hb-buffer-private.hh | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit d05d13df02fbe76814694fe49cc01bbb41c3d0e7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jun 9 07:15:03 2010 -0400
+
+ Add a test for header preprocessor guards
+
+ src/Makefile.am | 4 +++-
+ src/check-header-guards.sh | 20 ++++++++++++++++++++
+ src/check-libstdc++.sh | 1 -
+ 3 files changed, 23 insertions(+), 2 deletions(-)
+
+commit 0f0cd9d361f1bb614aa3fd4616160d027062370e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jun 9 06:32:56 2010 -0400
+
+ Fix header tags
+
+ src/hb-font-private.hh | 6 +++---
+ src/hb-object-private.h | 6 +++---
+ src/hb-open-type-private.hh | 4 ++--
+ src/hb-ot-layout-private.hh | 6 +++---
+ src/hb-ot-shape.h | 2 +-
+ 5 files changed, 12 insertions(+), 12 deletions(-)
+
+commit f2a1b411b1d48c3dfac0df8e78c848d9aa3bb047
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jun 3 11:37:51 2010 -0400
+
+ Followup fix for variation-selectors
+
+ Patch from Jonathan Kew
+
+ src/hb-ot-shape.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit a224b4d502d026fa642ee4098bf7bc0b4ba7ce27
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jun 2 22:24:54 2010 -0400
+
+ Fix skipping variation-selectors
+
+ src/hb-ot-shape.cc | 14 ++++++++------
+ 1 files changed, 8 insertions(+), 6 deletions(-)
+
+commit 81a77b115db401f69e869690f24b9047370bdfde
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jun 1 23:03:54 2010 -0400
+
+ Make feature sorting stable
+
+ src/hb-ot-shape.cc | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit fdc322a82047c4bda9fa3dab4338a0eac1c1bde7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 28 20:55:52 2010 -0400
+
+ Minor
+
+ src/hb-ot-shape.cc | 38 +++++++++++++++++++++-----------------
+ 1 files changed, 21 insertions(+), 17 deletions(-)
+
+commit f062ec6bb24b1c21d37b12adc7e944a5fe53526a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 28 20:54:43 2010 -0400
+
+ Further simplify mask allocator
+
+ src/hb-ot-shape.cc | 23 +++++++----------------
+ 1 files changed, 7 insertions(+), 16 deletions(-)
+
+commit 8af45fda475d075c5a285002463a00a0423d3926
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 28 20:41:20 2010 -0400
+
+ Fix global feature handling
+
+ src/hb-ot-shape.cc | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+commit e04685ee7be01695ec437fab50f919f1b7423c57
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 28 20:37:06 2010 -0400
+
+ Simplify mask allocation
+
+ src/hb-ot-shape.cc | 48
+ ++++++++++++++++++++----------------------------
+ 1 files changed, 20 insertions(+), 28 deletions(-)
+
+commit 0e235d0fc9bdeeaffa7215c21abc5d40767a10c7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 28 20:21:47 2010 -0400
+
+ Towards a mask allocator
+
+ src/hb-ot-shape.cc | 291
+ +++++++++++++++++++++++++++++++++-------------------
+ 1 files changed, 186 insertions(+), 105 deletions(-)
+
+commit 81c5e8724b740c6e42ed3a45e0574c7c5f3ad8e6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 28 18:31:16 2010 -0400
+
+ Allow disabling default features
+
+ Patch from Jonathan Kew
+
+ src/hb-buffer-private.hh | 18 +++--
+ src/hb-buffer.cc | 15 ++--
+ src/hb-ot-shape.cc | 196
+ +++++++++++++++++++++++++++++++---------------
+ 3 files changed, 153 insertions(+), 76 deletions(-)
+
+commit 2163afbf35044f59dbf449254e65b8c9feb6cdeb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 27 14:04:15 2010 -0400
+
+ Add note about UTF-8 decoder
+
+ src/hb-buffer.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 226faa58f4e23eb655bebb0eff7206a3024c8d55
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 27 11:42:34 2010 -0400
+
+ Fix loop
+
+ src/hb-ot-tag.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 56bef5680cc76a67d16ca14ac69f0dda1a691968
+Author: Martin Hosken <martin_hosken@sil.org>
+Date: Thu May 27 10:09:04 2010 +0100
+
+ Fixes to Python and Graphite from Martin
+
+ contrib/python/README | 10 ++++
+ contrib/python/lib/fontconfig.pyx | 47 +++++++++++++++++
+ contrib/python/lib/harfbuzz.pyx | 104
+ ++-----------------------------------
+ contrib/python/scripts/hbtestfont | 103
+ ++++++++++++++++++++++++++++++++----
+ contrib/python/setup.py | 3 +-
+ src/hb-graphite.cc | 8 ++--
+ 6 files changed, 159 insertions(+), 116 deletions(-)
+
+commit b485da0b719cb03cc33da57802c5151301664c2f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 27 11:39:19 2010 -0400
+
+ Disable Graphite as it crashes all over the place...
+
+ src/hb-shape.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 93ac709b1f6b015371c29bf244a9ece62baedff0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 26 16:22:00 2010 -0400
+
+ Cypriot is RTL
+
+ src/hb-unicode.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 15c7379c16dbb9ee8ed1c0333ca7492532ce8423
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 26 10:48:10 2010 -0400
+
+ Revert "Merge remote branch 'martin/master'"
+
+ This reverts commit 80af2812fb3b231ddcb4608ec13c6038a681c818,
+ reversing
+ changes made to c442672ec2fb83ed41f3994b3aa4f92a097664ab.
+
+ contrib/python/README | 10 ----
+ contrib/python/lib/fontconfig.pyx | 47 -----------------
+ contrib/python/lib/harfbuzz.pyx | 104
+ +++++++++++++++++++++++++++++++++++--
+ contrib/python/scripts/hbtestfont | 98
+ ++++-------------------------------
+ contrib/python/setup.py | 3 +-
+ src/Makefile.am | 2 +-
+ src/hb-graphite.cc | 8 ++--
+ src/hb-ot-shape.cc | 2 +-
+ src/hb-ot-tag.c | 1 -
+ src/hb-ot.h | 2 +-
+ src/hb-shape.cc | 2 +-
+ 11 files changed, 119 insertions(+), 160 deletions(-)
+
+commit 80af2812fb3b231ddcb4608ec13c6038a681c818
+Merge: c442672 3109a86
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 24 18:14:24 2010 +0100
+
+ Merge remote branch 'martin/master'
+
+commit c442672ec2fb83ed41f3994b3aa4f92a097664ab
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 24 18:02:32 2010 +0100
+
+ Fix struct initializers
+
+ src/hb-ft.cc | 12 ++++++------
+ src/hb-glib.c | 14 +++++++-------
+ src/hb-icu.c | 14 +++++++-------
+ 3 files changed, 20 insertions(+), 20 deletions(-)
+
+commit f5ac9de259773a5f86809892e58166a485d70a3d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 24 18:01:09 2010 +0100
+
+ Minor
+
+ src/hb-object-private.h | 24 +++++++++++++-----------
+ 1 files changed, 13 insertions(+), 11 deletions(-)
+
+commit f97bf4f81257c97a46dff51be31b2ec214d6c270
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 24 17:50:19 2010 +0100
+
+ Make sure we initialize all callbacks upon creation
+
+ Also fixes issue with unicode callbacks never being set really.
+
+ src/hb-font.cc | 18 +++++++-----------
+ src/hb-unicode.c | 9 ++-------
+ 2 files changed, 9 insertions(+), 18 deletions(-)
+
+commit bf36a1074ab23abeab0a7a6c47db26770dc1ab0a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 24 17:46:21 2010 +0100
+
+ Move all callback functions in a vtable structs
+
+ src/hb-font-private.hh | 10 ++++++----
+ src/hb-font.cc | 28 +++++++++++++++-------------
+ src/hb-ot-shape.cc | 4 ++--
+ src/hb-unicode-private.h | 12 +++++++-----
+ src/hb-unicode.c | 32 +++++++++++++++++---------------
+ 5 files changed, 47 insertions(+), 39 deletions(-)
+
+commit 3109a86add936ae4cc77541fc026c4fe2db4e328
+Author: Martin Hosken <martin_hosken@sil.org>
+Date: Mon May 24 13:25:37 2010 +0100
+
+ hb-graphite now no longer has -ve advances within clusters. Fix
+ infinite loop in tag_to_script(). python fixed to use tag_to_script
+ and allow hbtestfont to be passed font files, where fontconfig knows
+ about them.
+
+ contrib/python/lib/harfbuzz.pyx | 4 ++--
+ contrib/python/scripts/hbtestfont | 6 +++++-
+ src/hb-graphite.cc | 4 ++--
+ src/hb-ot-tag.c | 1 +
+ 4 files changed, 10 insertions(+), 5 deletions(-)
+
+commit e5bed0a37fe1b0576d08435179e455cb28eadcdb
+Author: Martin Hosken <martin_hosken@sil.org>
+Date: Sat May 22 20:19:00 2010 +0100
+
+ Tidy up hbtestfont and add README
+
+ contrib/python/README | 10 +++
+ contrib/python/scripts/hbtestfont | 134
+ ++++++++++++++++++------------------
+ 2 files changed, 77 insertions(+), 67 deletions(-)
+
+commit 70ae332fe66510500d303b6fcc79537833b42f05
+Author: Martin Hosken <martin_hosken@sil.org>
+Date: Sat May 22 19:58:00 2010 +0100
+
+ Add fontconfig to hbtestfont
+
+ contrib/python/lib/fontconfig.pyx | 47 +++++++++++++++++++++++++++
+ contrib/python/scripts/hbtestfont | 64
+ ++++++++++++++++++++++--------------
+ contrib/python/setup.py | 3 +-
+ 3 files changed, 88 insertions(+), 26 deletions(-)
+
+commit 72631c9d06b131d82080f212908e7d0b0266b841
+Merge: 1432ab1 1094a29
+Author: Martin Hosken <martin_hosken@sil.org>
+Date: Sat May 22 09:38:02 2010 +0100
+
+ Merge branch 'master' of git://git.freedesktop.org/~behdad/harfbuzz-ng
+
+commit 1432ab15c163eb0b5be3de66a4cb3df15ad73500
+Author: Martin Hosken <martin_hosken@sil.org>
+Date: Sat May 22 00:56:40 2010 +0100
+
+ Add graphical output to hbtestfont
+
+ contrib/python/lib/harfbuzz.pyx | 100
+ +------------------------------------
+ contrib/python/scripts/hbtestfont | 62 ++++++++++++++++++++++-
+ src/Makefile.am | 2 +-
+ src/hb-ot-shape.cc | 2 +-
+ src/hb-ot.h | 2 +-
+ src/hb-shape.cc | 2 +-
+ 6 files changed, 67 insertions(+), 103 deletions(-)
+
+commit bbc7a99d01298f9be1ebaaceacbc9bc961e247e5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 18:24:34 2010 +0100
+
+ Move mirroring around a bit
+
+ src/hb-ot-shape.cc | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit bd0987386b3a4dddf208ccf1a70ebfff6242ba73
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 18:06:35 2010 +0100
+
+ Add a few more standard features
+
+ src/hb-ot-shape.cc | 10 ++++++----
+ 1 files changed, 6 insertions(+), 4 deletions(-)
+
+commit 75f3469ca6d626b08eb411984a2ba7fd48ca5b5f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 17:59:04 2010 +0100
+
+ Add note
+
+ src/hb-ot-shape.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 1094a294f6a44c47fc75867983f2b135a6442bab
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 17:58:20 2010 +0100
+
+ Add rtlm
+
+ src/hb-ot-shape.cc | 26 +++++++++++++++++++++-----
+ 1 files changed, 21 insertions(+), 5 deletions(-)
+
+commit 074ea787493a37ae8f68d17be7820f13fff57520
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 17:53:10 2010 +0100
+
+ Add ltra, ltrm, and rtla features
+
+ src/hb-ot-shape.cc | 60
+ +++++++++++++++++++++++++++++++++++++++++----------
+ 1 files changed, 48 insertions(+), 12 deletions(-)
+
+commit 1ce7b87c4d8d1ab3ec1d5198351d71b7199f7c64
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 17:31:45 2010 +0100
+
+ Cleanup bitmask allocation
+
+ src/hb-buffer-private.hh | 16 ++++++++++++
+ src/hb-buffer.cc | 36 +++++++++++++++++++++++++++
+ src/hb-ot-shape.cc | 60
+ ++++++++++++++++++++--------------------------
+ 3 files changed, 78 insertions(+), 34 deletions(-)
+
+commit dd22a8f7bfd424a69286e90f79d2a23af6e89ec1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 16:43:17 2010 +0100
+
+ Add note
+
+ src/hb-ot-layout-gsub-private.hh | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit cbd1d6a63a5d696b7d6a5aba9ee7305ea228416a
+Author: Martin Hosken <martin_hosken@sil.org>
+Date: Fri May 21 15:16:43 2010 +0100
+
+ Rename Grxxx to HbGrxxx
+
+ src/hb-graphite.cc | 26 +++++++++++++-------------
+ 1 files changed, 13 insertions(+), 13 deletions(-)
+
+commit 0375bdd2027767ee7bebef1ed289b33dc64f430e
+Author: Martin Hosken <martin_hosken@sil.org>
+Date: Fri May 21 15:01:37 2010 +0100
+
+ Rename classes from Grxxx to HbGrxxx
+
+ src/hb-graphite.cc | 22 +++++++++++-----------
+ 1 files changed, 11 insertions(+), 11 deletions(-)
+
+commit a5a72e004bb7123445c2c3a94352d358fc80d904
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 15:12:52 2010 +0100
+
+ Add hb-ot-shape.h, oops.
+
+ src/hb-ot-shape.h | 44 ++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 44 insertions(+), 0 deletions(-)
+
+commit aa62a402a72bdecad2a955dbfaf6e24cd2c00e55
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 14:42:11 2010 +0100
+
+ Fix Makefile to install hb-ot-shape.h
+
+ src/Makefile.am | 2 +-
+ src/hb-ot.h | 1 +
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 9722b8f005a10fd16e841df4da3ccd80be66e296
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 14:37:47 2010 +0100
+
+ Simple renames
+
+ src/hb-ot-shape.cc | 36 ++++++++++++++++++------------------
+ 1 files changed, 18 insertions(+), 18 deletions(-)
+
+commit 02f28550d785671cf92fd4239c5f913f7e71585f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 14:37:28 2010 +0100
+
+ Graphite also forces us to link to libstdc++ currently
+
+ src/Makefile.am | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit ca663bb23c16f6a1f04efa6e10dad0e3e7c260a3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 14:34:23 2010 +0100
+
+ Move main shaper code into hb_ot_shape()
+
+ src/hb-ot-shape-private.hh | 53 ----------
+ src/hb-ot-shape.cc | 225
+ +++++++++++++++++++++++++++++++++++++++++---
+ src/hb-shape.cc | 209
+ +----------------------------------------
+ 3 files changed, 214 insertions(+), 273 deletions(-)
+
+commit 7acd232d36c2b2ed03823e6aa6bb2b814bf673b3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 14:20:48 2010 +0100
+
+ Fix test failing
+
+ src/hb-graphite.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit dd47924d88d86b83e7f3ab040de6e7136ac0ca09
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 14:18:08 2010 +0100
+
+ Fix warnings
+
+ src/hb-graphite.cc | 14 +++++---------
+ 1 files changed, 5 insertions(+), 9 deletions(-)
+
+commit 305ba8671553cd955c20a54db622666c0bb02532
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 14:02:20 2010 +0100
+
+ Import Graphite shaping backend by Martin Hosken
+
+ configure.ac | 6 +
+ src/Makefile.am | 11 ++
+ src/hb-graphite.cc | 308
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-graphite.h | 46 ++++++++
+ src/hb-shape.cc | 15 +++
+ 5 files changed, 386 insertions(+), 0 deletions(-)
+
+commit 3ba6818ba9be950e46902f0239f2451ec0e65d44
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 13:51:29 2010 +0100
+
+ Update the Python module
+
+ contrib/python/lib/harfbuzz.pyx | 40
+ ++++++++++++++++++++------------------
+ 1 files changed, 21 insertions(+), 19 deletions(-)
+
+commit 83f34677bcbc6bb194940407b0fcb23575650e3d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 13:43:49 2010 +0100
+
+ Add hb_tag_from_string()
+
+ src/Makefile.am | 1 +
+ src/hb-common.c | 41 +++++++++++++++++++++++++++++++++++++++++
+ src/hb-common.h | 3 +++
+ 3 files changed, 45 insertions(+), 0 deletions(-)
+
+commit 4a9a5c0b06e8aa5d15327242609a7c766d3e0e94
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 13:33:46 2010 +0100
+
+ Don't allocate bits for features not available
+
+ src/hb-ot-shape.cc | 10 ++++++----
+ 1 files changed, 6 insertions(+), 4 deletions(-)
+
+commit e53d77142ac4ecbe38ab3235491fa93cb7ff16ab
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 13:32:38 2010 +0100
+
+ Speed up feature mask setting
+
+ Patch from Jonathan Kew.
+
+ src/hb-ot-shape.cc | 31 +++++++++++++++++++++++++------
+ 1 files changed, 25 insertions(+), 6 deletions(-)
+
+commit 4fa67f34ecc65056ce60a572213fbdae66e0423b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 13:29:12 2010 +0100
+
+ Add Unicode 5.2 scripts
+
+ src/hb-icu.c | 29 ++++++++++++++++++++++++++++-
+ src/hb-ot-tag.c | 21 +++++++++++++++++++--
+ src/hb-unicode.c | 19 ++++++++++++++++++-
+ src/hb-unicode.h | 19 ++++++++++++++++++-
+ 4 files changed, 83 insertions(+), 5 deletions(-)
+
+commit ee1b322100a6bd575b999904592abbd9fed5587f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 12:55:57 2010 +0100
+
+ Fix feature mask setting
+
+ src/hb-ot-shape.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit b490fa343322f1b5abaf880abc073287c1f34132
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 11:15:07 2010 +0100
+
+ Add hb_ot_tag_to_script()
+
+ src/hb-ot-tag.c | 14 ++++++++++++++
+ src/hb-ot-tag.h | 3 +++
+ 2 files changed, 17 insertions(+), 0 deletions(-)
+
+commit 50355309047765558ef8f5d60aefed42a7f954cc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 21 10:33:23 2010 +0100
+
+ Add Python wrapper from Martin Hosken
+
+ contrib/python/lib/harfbuzz.pyx | 306
+ +++++++++++++++++++++++++++++++++++++
+ contrib/python/runpy | 2 +
+ contrib/python/scripts/hbtestfont | 35 +++++
+ contrib/python/setup.py | 24 +++
+ 4 files changed, 367 insertions(+), 0 deletions(-)
+
+commit 280af1bddb958ff97cf7ce12fe7ec2b6352e61d0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 20 18:33:35 2010 +0100
+
+ Let hb_face_get_table() return NULL if table not found
+
+ src/hb-font.cc | 2 +-
+ src/hb-font.h | 1 +
+ src/hb-open-type-private.hh | 3 +++
+ 3 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 1cdbfd944eecb58587461f57f037e47a44f39990
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 20 17:47:28 2010 +0100
+
+ Fix alternate, again
+
+ src/hb-ot-layout-gsub-private.hh | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit fdca3d51603bd6bef6a4b0ee4a560f7dcd2f1d37
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 20 17:46:20 2010 +0100
+
+ Fix alternate off-by-one
+
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b634beb39e0a4fef7167a8af646f6b2d8cafe69b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 20 17:44:52 2010 +0100
+
+ Fix delta scale, again...
+
+ src/hb-ot-layout-common-private.hh | 8 ++++++++
+ src/hb-ot-layout-gdef-private.hh | 3 +--
+ src/hb-ot-layout-gpos-private.hh | 12 ++++++------
+ src/hb-ot-layout-private.hh | 2 +-
+ 4 files changed, 16 insertions(+), 9 deletions(-)
+
+commit 40335d4533ac2b08121c9dc6003f3ebc5b44a67b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 20 17:35:14 2010 +0100
+
+ Remove unused operator
+
+ src/hb-ot-layout-common-private.hh | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit f7acd8df5146155b51d6f50aeb04f54f3030c1c3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 20 17:26:35 2010 +0100
+
+ Do alternate glyph selection!
+
+ Kinda hand-wavy right now. Not tested.
+
+ src/hb-ot-layout-gpos-private.hh | 12 +++++++-----
+ src/hb-ot-layout-gsub-private.hh | 20 +++++++++-----------
+ src/hb-ot-layout-gsubgpos-private.hh | 1 +
+ src/hb-private.h | 19 ++++++++++++++++++-
+ 4 files changed, 35 insertions(+), 17 deletions(-)
+
+commit 750a2294553d252e28875b605fe61fd9d6696e0f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 20 16:23:27 2010 +0100
+
+ get_table() is allowed to return NULL. Use that to simplify code
+
+ src/hb-font.cc | 2 +-
+ src/hb-ft.cc | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 99d9ef785f108df76f80a307eaa2784685ea86ba
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 20 15:47:49 2010 +0100
+
+ Write hb_face_create_for_data() in terms of
+ hb_face_create_for_tables()
+
+ Fixes lack of head_table initialization in create_for_tables() also.
+
+ src/hb-font.cc | 35 ++++++++++++-----------------------
+ 1 files changed, 12 insertions(+), 23 deletions(-)
+
+commit 6774463883978b00b4d8c719ed75edfc4537c77f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 20 15:40:12 2010 +0100
+
+ Apply user features to ranges!
+
+ src/hb-ot-shape.cc | 23 ++++++++++++++++++++++-
+ 1 files changed, 22 insertions(+), 1 deletions(-)
+
+commit 9b6023338530a2dbb8214eb4391ef3e8372f3892
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 20 15:31:12 2010 +0100
+
+ Add _hb_bit_storage()
+
+ src/hb-private.h | 35 ++++++++++++++++++++++-------------
+ 1 files changed, 22 insertions(+), 13 deletions(-)
+
+commit 6b1b957f6d2955cbe4fa97e2659e033b3eaaf4d2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 20 15:14:44 2010 +0100
+
+ Add lookup_map
+
+ src/hb-ot-shape.cc | 48
+ +++++++++++++++++++++++++++++++++---------------
+ 1 files changed, 33 insertions(+), 15 deletions(-)
+
+commit 60010a0c4d8efae5c61a0c9cf10cfe2c1860f41e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 20 14:05:02 2010 +0100
+
+ Update always-apply mask from 0xFFFF to 1
+
+ We plan to use the first bit to be always on.
+
+ src/hb-ot-shape.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 009aad567863c05ee2ec4a3ee76fe0ee79c767bb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 20 14:00:57 2010 +0100
+
+ Invert the mask logic
+
+ Before, the mask in the buffer was inverted. That is, a 0 bit meant
+ feature should be applied and 1 meant not applied, whereas in the
+ lookups, the logic was positive.
+
+ Now both are in sync. When calling hb_buffer_add_glyph() manually,
+ the mask should be 1 instead of 0.
+
+ src/hb-buffer.cc | 2 +-
+ src/hb-ot-layout-gpos-private.hh | 2 +-
+ src/hb-ot-layout-gsub-private.hh | 4 ++--
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 7f411dbfd9f8d5360c948531ff9f6c3998d1d897
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 20 13:40:18 2010 +0100
+
+ Apply user features
+
+ No ranges yet
+
+ src/hb-ot-shape.cc | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 0db299ccad346d9ea5573ea8408b78d9997bd379
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 20 13:30:09 2010 +0100
+
+ Change hb_feature_t to keep tag/int instead of string
+
+ src/hb-shape.h | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 0a4399ca228d244e646abdb3487da0f13b228889
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 19 15:45:06 2010 -0400
+
+ Fix scale issues
+
+ hb_font_set_scale() now sets the value to be used to represent a unit
+ pixel. For example, if rendering a 10px font with a 26.6
+ representation,
+ you would set scale to (10 << 6). For 10px in 16.16 you would set
+ it to
+ (10 << 16). This space should be the same space that the
+ get_glyph_metrics
+ and get_kerning callbacks work in.
+
+ src/hb-common.h | 1 -
+ src/hb-font-private.hh | 8 +++-----
+ src/hb-font.cc | 12 ++++++------
+ src/hb-font.h | 12 +++---------
+ src/hb-ft.cc | 4 ++--
+ src/hb-ot-layout-gdef-private.hh | 6 +++---
+ src/hb-ot-layout-gpos-private.hh | 37
+ +++++++++++++++++--------------------
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ src/hb-ot-layout-private.hh | 20 +++++++++++---------
+ src/hb-ot-layout.cc | 31 +++++++++++++++----------------
+ src/hb-private.h | 4 ----
+ 11 files changed, 61 insertions(+), 76 deletions(-)
+
+commit cf5585cfa6cac6fdf627a99941299e76af5ae0f7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 19 12:03:35 2010 -0400
+
+ Add 'head' table
+
+ src/Makefile.am | 1 +
+ src/hb-font-private.hh | 5 ++
+ src/hb-font.cc | 9 +++
+ src/hb-open-type-private.hh | 2 +-
+ src/hb-ot-head-private.hh | 128
+ +++++++++++++++++++++++++++++++++++++++++++
+ 5 files changed, 144 insertions(+), 1 deletions(-)
+
+commit e29caf3f943b2b6f4997f469f7274252c82f465e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 19 11:47:17 2010 -0400
+
+ Add LONGDATETIME
+
+ src/hb-open-type-private.hh | 15 +++++++++++++++
+ 1 files changed, 15 insertions(+), 0 deletions(-)
+
+commit f415755fdf011d3fa3b9aad04c38f2255dd7acf8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 17 15:14:14 2010 -0400
+
+ Minor
+
+ src/hb-ot-layout.cc | 52
+ ++++++++++++++++++++++++++------------------------
+ 1 files changed, 27 insertions(+), 25 deletions(-)
+
+commit 73af7756dc6d3961f176854246e5722baff101fb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 23:38:08 2010 -0400
+
+ Indent
+
+ src/hb-ot-layout-gsub-private.hh | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 3567b87cce541dfb0af7caf024ec67c9d3c09214
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 23:28:44 2010 -0400
+
+ Add an inline version of hb_buffer_ensure()
+
+ src/hb-buffer.cc | 117
+ +++++++++++++++++++++++++++++-------------------------
+ 1 files changed, 63 insertions(+), 54 deletions(-)
+
+commit a6a79df5fe2ed2cd307e7a991346faee164e70d9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 23:20:16 2010 -0400
+
+ Handle malloc failture in the buffer
+
+ src/hb-buffer-private.hh | 5 ++-
+ src/hb-buffer.cc | 71
+ ++++++++++++++++++++++++++++------------------
+ src/hb-buffer.h | 2 +-
+ 3 files changed, 47 insertions(+), 31 deletions(-)
+
+commit ca54a12658510f9aa0b2db82f20a8fac230d6bb6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 22:25:42 2010 -0400
+
+ Minor
+
+ src/hb-shape.cc | 60
+ +++++++++++++++++++++++-------------------------------
+ 1 files changed, 26 insertions(+), 34 deletions(-)
+
+commit 910a33fe8457a8e13f7eb77fc92fa59c31f5e8fd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 22:13:38 2010 -0400
+
+ Update buffer docs
+
+ src/hb-buffer-private.hh | 13 +++++++------
+ src/hb-buffer.cc | 16 ++++++++--------
+ 2 files changed, 15 insertions(+), 14 deletions(-)
+
+commit 36b73c80df91e96492357c6da945e081e9046a93
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 22:10:39 2010 -0400
+
+ Shortening buffer accessors: rename buffer->in_pos to buffer->i
+
+ src/hb-buffer-private.hh | 2 +-
+ src/hb-buffer.cc | 52 +++++++++---------
+ src/hb-ot-layout-gpos-private.hh | 94
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-private.hh | 48 +++++++++---------
+ src/hb-ot-layout-gsubgpos-private.hh | 46 ++++++++--------
+ src/hb-shape.cc | 40 +++++++-------
+ 6 files changed, 141 insertions(+), 141 deletions(-)
+
+commit 29427c5c51ac70aca53ed523fa5ddb3de4355fb0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 22:08:22 2010 -0400
+
+ Shortening buffer accessors: rename buffer->out_length to
+ buffer->out_len
+
+ src/hb-buffer-private.hh | 2 +-
+ src/hb-buffer.cc | 52
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 6 ++--
+ 4 files changed, 31 insertions(+), 31 deletions(-)
+
+commit 6960350be97f24e97140391025b56369c393a3df
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 22:07:46 2010 -0400
+
+ Shortening buffer accessors: rename buffer->in_length to buffer->len
+
+ src/hb-buffer-private.hh | 2 +-
+ src/hb-buffer.cc | 26 +++++++++++++-------------
+ src/hb-ot-layout-gpos-private.hh | 8 ++++----
+ src/hb-ot-layout-gsub-private.hh | 8 ++++----
+ src/hb-ot-layout-gsubgpos-private.hh | 8 ++++----
+ src/hb-shape.cc | 12 ++++++------
+ 6 files changed, 32 insertions(+), 32 deletions(-)
+
+commit 1b621823f3e31b48c80cc8b0691dfa873ba086cd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 22:05:53 2010 -0400
+
+ Shortening buffer accessors: rename buffer->positions to buffer->pos
+
+ src/hb-buffer-private.hh | 4 ++--
+ src/hb-buffer.cc | 32 ++++++++++++++++----------------
+ src/hb-ot-layout-gpos-private.hh | 26 +++++++++++++-------------
+ src/hb-shape.cc | 10 +++++-----
+ 4 files changed, 36 insertions(+), 36 deletions(-)
+
+commit 9d5e26df0877aa5b187764ba09bd7bf221e92968
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 22:03:11 2010 -0400
+
+ Shortening buffer accessors: rename buffer->out_string to
+ buffer->out_info
+
+ src/hb-buffer-private.hh | 2 +-
+ src/hb-buffer.cc | 56
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gsubgpos-private.hh | 4 +-
+ 3 files changed, 31 insertions(+), 31 deletions(-)
+
+commit 7e7007a1c9bf2c07a8369752126ece8fa6164248
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 22:02:37 2010 -0400
+
+ Shortening buffer accessors: rename buffer->in_string to buffer->info
+
+ src/hb-buffer-private.hh | 2 +-
+ src/hb-buffer.cc | 82
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gpos-private.hh | 58 ++++++++++++------------
+ src/hb-ot-layout-gsub-private.hh | 30 ++++++------
+ src/hb-ot-layout-gsubgpos-private.hh | 26 +++++-----
+ src/hb-shape.cc | 18 ++++----
+ 6 files changed, 108 insertions(+), 108 deletions(-)
+
+commit 8e6b6bb2932946ebc7b01c3abf575b654c741e20
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 21:58:22 2010 -0400
+
+ Merge buffer->out_pos and buffer->out_length
+
+ src/hb-buffer-private.hh | 1 -
+ src/hb-buffer.cc | 48
+ ++++++++++++++-------------------
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 6 ++--
+ 4 files changed, 24 insertions(+), 33 deletions(-)
+
+commit 22f668eb9ad5f62d9fcd2e0c826ea78977687e5c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 21:41:04 2010 -0400
+
+ Remove the unused BUFFER macro
+
+ src/hb-buffer-private.hh | 6 ------
+ src/hb-ot-layout-gpos-private.hh | 6 ------
+ src/hb-ot-layout-gsub-private.hh | 6 ------
+ src/hb-ot-layout-gsubgpos-private.hh | 5 -----
+ 4 files changed, 0 insertions(+), 23 deletions(-)
+
+commit 7e53ebe478597778c25c197ff9f0cb379f1d0043
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 21:38:13 2010 -0400
+
+ Remove the IN_CURGLYPH() macro
+
+ src/hb-buffer-private.hh | 3 ---
+ src/hb-ot-layout-gpos-private.hh | 24 ++++++++++++------------
+ src/hb-ot-layout-gsub-private.hh | 16 ++++++++--------
+ src/hb-ot-layout-gsubgpos-private.hh | 16 ++++++++--------
+ src/hb-shape.cc | 14 +++++++-------
+ 5 files changed, 35 insertions(+), 38 deletions(-)
+
+commit d784da1923ff2ca093f8b0210449731d376b7513
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 21:37:18 2010 -0400
+
+ Remove the IN_CURINFO() macro
+
+ src/hb-buffer-private.hh | 1 -
+ src/hb-ot-layout-gpos-private.hh | 2 +-
+ src/hb-ot-layout-gsub-private.hh | 4 ++--
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ 4 files changed, 4 insertions(+), 5 deletions(-)
+
+commit 281f59b4fb16f7c73767eb042a91f70f4c109b3a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 21:34:22 2010 -0400
+
+ Remove IN_INFO() and IN_NEXTGLYPH() macros
+
+ src/hb-buffer-private.hh | 2 --
+ src/hb-ot-layout-gpos-private.hh | 10 +++++-----
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 4 ++--
+ src/hb-shape.cc | 4 ++--
+ 5 files changed, 10 insertions(+), 12 deletions(-)
+
+commit 6e489cdf7623ac627d06d59a80ecea03ca97dc1b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 21:07:35 2010 -0400
+
+ Remove the IN_GLYPH() macro
+
+ src/hb-buffer-private.hh | 1 -
+ src/hb-ot-layout-gpos-private.hh | 12 ++++++------
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 4 ++--
+ src/hb-shape.cc | 2 +-
+ 5 files changed, 10 insertions(+), 11 deletions(-)
+
+commit 01feb74c78a3a302fa3472a0be7b2a1d52fd1ba3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 21:00:08 2010 -0400
+
+ Remove the IN_CLUSTER() macro
+
+ src/hb-buffer-private.hh | 1 -
+ src/hb-shape.cc | 2 +-
+ 2 files changed, 1 insertions(+), 2 deletions(-)
+
+commit d63a1e089acad9ab9f80addd936d36b6d38fb46a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 20:30:07 2010 -0400
+
+ Remove the IN_MASK() macro
+
+ src/hb-buffer-private.hh | 1 -
+ src/hb-ot-layout-gpos-private.hh | 2 +-
+ src/hb-ot-layout-gsub-private.hh | 4 ++--
+ 3 files changed, 3 insertions(+), 4 deletions(-)
+
+commit 89e2834dabd2d17f2823c51fe3a7fcadeaba7a59
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 20:25:55 2010 -0400
+
+ Remove the IN_LIGID() macro
+
+ src/hb-buffer-private.hh | 1 -
+ src/hb-ot-layout-gpos-private.hh | 4 ++--
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ 3 files changed, 3 insertions(+), 4 deletions(-)
+
+commit 4a871041f4718834afa312ed17cdd157603468b7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 20:25:04 2010 -0400
+
+ Remove IN_COMPONENT() macro
+
+ src/hb-buffer-private.hh | 1 -
+ src/hb-ot-layout-gpos-private.hh | 8 ++++----
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ 3 files changed, 5 insertions(+), 6 deletions(-)
+
+commit 27da6dd89a359f7ef340c646c4cb79373782261d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 20:17:50 2010 -0400
+
+ Remove OUT_GLYPH() and OUT_INFO() macros
+
+ src/hb-buffer-private.hh | 2 --
+ src/hb-ot-layout-gsubgpos-private.hh | 4 ++--
+ 2 files changed, 2 insertions(+), 4 deletions(-)
+
+commit cc6ae7ff91eeb93bef153f331ed02b500062f90e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 20:09:48 2010 -0400
+
+ Fix lookahead matching. Oops!
+
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3109375b849f340b4807724218010c53dea58082
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 14 19:55:27 2010 -0400
+
+ Remove POSITION() and CURPOSITION() macros
+
+ src/hb-buffer-private.hh | 2 -
+ src/hb-ot-layout-gpos-private.hh | 54
+ +++++++++++++++++++-------------------
+ src/hb-shape.cc | 10 +++---
+ 3 files changed, 32 insertions(+), 34 deletions(-)
+
+commit d7cfb3b2d1dd2e9fdae2b3e540bbe313660895e8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 13 14:18:49 2010 -0400
+
+ s/\<context\>/c/g
+
+ src/hb-open-file-private.hh | 28 +-
+ src/hb-open-type-private.hh | 100 ++++----
+ src/hb-ot-layout-common-private.hh | 84 +++---
+ src/hb-ot-layout-gdef-private.hh | 98 ++++----
+ src/hb-ot-layout-gpos-private.hh | 460
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-private.hh | 306 +++++++++++-----------
+ src/hb-ot-layout-gsubgpos-private.hh | 258 ++++++++++----------
+ src/hb-ot-layout.cc | 24 +-
+ 8 files changed, 679 insertions(+), 679 deletions(-)
+
+commit f679635893eebc13402c5ee51a6f106eed0c76be
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 13 13:34:17 2010 -0400
+
+ Don't use variable-length-arrays
+
+ src/hb-open-type-private.hh | 11 +++++++++--
+ 1 files changed, 9 insertions(+), 2 deletions(-)
+
+commit 72071a8afaba2952fe42be093024ae9dbd37f233
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 13 13:22:24 2010 -0400
+
+ Add a few more buffer convenience methods
+
+ src/hb-buffer-private.hh | 12 ++++++++++++
+ src/hb-ot-layout-gsub-private.hh | 20 ++++++++++----------
+ 2 files changed, 22 insertions(+), 10 deletions(-)
+
+commit 11a81612e51c598e857507c268312206423cbfca
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 13 00:01:40 2010 -0400
+
+ Minor
+
+ src/hb-unicode.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3f93518a634cb1852bf050877db23b9b9203ad03
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 12 23:48:40 2010 -0400
+
+ Improve check for internal symbols
+
+ src/check-internal-symbols.sh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 357d0f29c431b842179ee4b56c21bcc402178ce7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 12 23:46:16 2010 -0400
+
+ Make HB_PRIVATE more useful
+
+ So we can apply it to class methods also. Not sure if that works!
+
+ src/hb-blob-private.h | 2 +-
+ src/hb-font-private.hh | 4 ++--
+ src/hb-private.h | 2 +-
+ src/hb-unicode-private.h | 3 +--
+ 4 files changed, 5 insertions(+), 6 deletions(-)
+
+commit 1d5e78013696b10751d8a35027619e81978e1312
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 12 23:43:00 2010 -0400
+
+ Add a few other buffer methods
+
+ src/hb-buffer-private.hh | 11 +++++++----
+ src/hb-buffer.cc | 7 -------
+ src/hb-ot-layout-gsub-private.hh | 10 +++++-----
+ src/hb-ot-layout-gsubgpos-private.hh | 4 ++--
+ 4 files changed, 14 insertions(+), 18 deletions(-)
+
+commit d0316a81f59a4e814b0af78797d915d7ce04d119
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 12 23:34:52 2010 -0400
+
+ Add buffer->swap()
+
+ src/hb-buffer-private.hh | 68
+ ++++++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ 2 files changed, 38 insertions(+), 32 deletions(-)
+
+commit 3b649a38b5772dd7aba7f07ff7698a7f427f421f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 12 23:28:38 2010 -0400
+
+ Add check for internal symbols
+
+ src/Makefile.am | 3 ++-
+ src/check-internal-symbols.sh | 28 ++++++++++++++++++++++++++++
+ 2 files changed, 30 insertions(+), 1 deletions(-)
+
+commit eee8598d75d3af692d9ececf7e8ac458e892ba9e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 12 23:22:55 2010 -0400
+
+ Hide internal symbols
+
+ src/hb-ot-layout-private.hh | 4 ++--
+ src/hb-private.h | 8 ++++----
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 8951fc2c82f2db4865da6d9e303fce419b6363bb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 12 23:13:39 2010 -0400
+
+ Add buffer->allocate_lig_id()
+
+ src/hb-buffer-private.hh | 5 ++---
+ src/hb-buffer.cc | 6 ------
+ src/hb-ot-layout-gsub-private.hh | 4 ++--
+ 3 files changed, 4 insertions(+), 11 deletions(-)
+
+commit 1ce4dc95dbb28842085342aea4f9d12cbe9671a9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 12 18:29:25 2010 -0400
+
+ Use bit tricks for HB_DIRECTION_IS_*
+
+ We already depend on the exact values of the direction enum
+ in HB_DIRECTION_REVERSE(), so we may as well use that.
+
+ src/hb-common.h | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 22da7fd94d6318c52df69d70470a85464ffc533d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 12 18:23:21 2010 -0400
+
+ Rename a few files to be C++ sources
+
+ In anticipation for buffer revamp coming.
+
+ src/Makefile.am | 16 +-
+ src/hb-buffer-private.h | 155 --------
+ src/hb-buffer-private.hh | 155 ++++++++
+ src/hb-buffer.c | 650
+ ----------------------------------
+ src/hb-buffer.cc | 650
+ ++++++++++++++++++++++++++++++++++
+ src/hb-common.h | 1 +
+ src/hb-font-private.h | 92 -----
+ src/hb-font-private.hh | 92 +++++
+ src/hb-font.cc | 4 +-
+ src/hb-ft.c | 240 -------------
+ src/hb-ft.cc | 240 +++++++++++++
+ src/hb-ot-layout-common-private.hh | 2 +-
+ src/hb-ot-layout-gdef-private.hh | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ src/hb-ot-layout-private.h | 121 -------
+ src/hb-ot-layout-private.hh | 121 +++++++
+ src/hb-ot-layout.cc | 2 +-
+ src/hb-ot-shape-private.h | 53 ---
+ src/hb-ot-shape-private.hh | 53 +++
+ src/hb-ot-shape.c | 164 ---------
+ src/hb-ot-shape.cc | 164 +++++++++
+ src/hb-shape.c | 258 --------------
+ src/hb-shape.cc | 258 ++++++++++++++
+ 23 files changed, 1748 insertions(+), 1747 deletions(-)
+
+commit c3df649f258b334e93c7626a43cd8ebfbd5a610e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 11 13:54:12 2010 -0400
+
+ Fix comment
+
+ src/hb-buffer-private.h | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit 281f08954a1d96d7807153c25073b8eb7630703b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 11 11:37:58 2010 -0400
+
+ Remove obsolete friend
+
+ src/hb-ot-layout-gpos-private.hh | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 70c9bfd5646a4a55a7f43c0cf0b5ac5993615d5b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 11 00:23:50 2010 -0400
+
+ Simplify PairSet
+
+ src/hb-ot-layout-gpos-private.hh | 101
+ ++++++++++++++++++++------------------
+ 1 files changed, 54 insertions(+), 47 deletions(-)
+
+commit 97e7f8f305c47caf2968a9da3b8407825547286d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 11 00:11:36 2010 -0400
+
+ Add CONST_FUNC annotation
+
+ src/hb-private.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 494d28ad988e505c1c45cc35a7ec6b880cfec5fc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 23:50:07 2010 -0400
+
+ Simplify likely() implementation
+
+ Shrinks .text by 1%!
+
+ src/hb-private.h | 10 +---------
+ 1 files changed, 1 insertions(+), 9 deletions(-)
+
+commit 75651b20871047d3ec17f4221794b8ef5d60e14b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 23:44:51 2010 -0400
+
+ Fix warnings
+
+ src/hb-open-type-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4c20d8c057738b66150a88472714690e137884f8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 23:27:54 2010 -0400
+
+ Sprinkle a few strategic likely()'s
+
+ Shrinks the code size by some 2% even.
+
+ src/hb-open-file-private.hh | 4 ++--
+ src/hb-open-type-private.hh | 20 ++++++++++----------
+ 2 files changed, 12 insertions(+), 12 deletions(-)
+
+commit 69cb28bc13d236a01acf40da62e345c7e83ccba7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 23:13:08 2010 -0400
+
+ Remove a few likely()'s
+
+ src/hb-ot-layout-common-private.hh | 2 +-
+ src/hb-ot-layout-gpos-private.hh | 8 ++++----
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 24552ecf92982fe561dc47d5102fcf1a7b337c70
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 23:08:41 2010 -0400
+
+ Remove excess sub_format sanitize
+
+ src/hb-ot-layout-gpos-private.hh | 1 -
+ src/hb-ot-layout-gsub-private.hh | 1 -
+ 2 files changed, 0 insertions(+), 2 deletions(-)
+
+commit f7adc5e9be352ac31ad3ab847abb6fceb239aa12
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 22:41:50 2010 -0400
+
+ Shrink NullPool now that we have accurate size tracking
+
+ src/hb-open-type-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3d44fb6f15177dc6518166e435597936b044acc1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 22:22:54 2010 -0400
+
+ Fix warning
+
+ src/hb-ot-layout-common-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b5db4f1e4eefa266a71a28b5496f47ff9d1a81e8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 22:22:22 2010 -0400
+
+ Clean up NO_INDEX
+
+ src/hb-open-file-private.hh | 2 +-
+ src/hb-open-type-private.hh | 10 ++++++----
+ src/hb-ot-layout-common-private.hh | 17 ++++-------------
+ src/hb-ot-layout.cc | 8 ++++----
+ src/main.cc | 2 +-
+ 5 files changed, 16 insertions(+), 23 deletions(-)
+
+commit fe9bc070e1d545b0df2ea548eebf5a1fc4c92ddc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 21:39:24 2010 -0400
+
+ Fix awful confusion between lookup format and subtable format
+
+ As reported by John Daggett.
+
+ src/hb-ot-layout-gpos-private.hh | 14 +++++++-------
+ src/hb-ot-layout-gsub-private.hh | 14 +++++++-------
+ 2 files changed, 14 insertions(+), 14 deletions(-)
+
+commit 458ecbb60bb7e8e32aca62a562586d921d5396aa
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 21:11:35 2010 -0400
+
+ Fix tracing order
+
+ src/hb-open-type-private.hh | 14 +++++---------
+ src/hb-ot-layout-gsubgpos-private.hh | 3 +--
+ 2 files changed, 6 insertions(+), 11 deletions(-)
+
+commit 48146e5612f6d272d6962f6829c6d64a31edef89
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 20:07:56 2010 -0400
+
+ Don't fail sanitize on NULL data
+
+ src/hb-open-type-private.hh | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit d2c2ca8faf62fc380d4717d286556139a62d2356
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 19:58:25 2010 -0400
+
+ Fix comment
+
+ src/hb-open-type-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b435ab7e29c388e3b100f729957319931625a3a8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 19:51:57 2010 -0400
+
+ Fix accessing tables from NULL pointer
+
+ src/hb-font.cc | 2 +-
+ src/hb-open-type-private.hh | 5 +++++
+ src/hb-ot-layout.cc | 6 +++---
+ 3 files changed, 9 insertions(+), 4 deletions(-)
+
+commit dacebcadae36b35531d635d81df2afb937677b7a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 19:45:41 2010 -0400
+
+ Simplify unions
+
+ src/hb-open-file-private.hh | 24 ++++---
+ src/hb-ot-layout-common-private.hh | 24 ++++----
+ src/hb-ot-layout-gdef-private.hh | 24 ++++----
+ src/hb-ot-layout-gpos-private.hh | 120
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-private.hh | 88 ++++++++++++------------
+ src/hb-ot-layout-gsubgpos-private.hh | 44 ++++++------
+ 6 files changed, 163 insertions(+), 161 deletions(-)
+
+commit fd671e02433bcbc1fd07901fa2d6065020f41ba8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 19:02:32 2010 -0400
+
+ Remove unused macro
+
+ src/hb-open-type-private.hh | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 0eb9fc6e37935707dba2bf4b3705de2161a08cb7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 19:01:17 2010 -0400
+
+ Change DEFINE_SIZE_VAR to DEFINE_SIZE_ARRAY
+
+ src/hb-open-file-private.hh | 4 ++--
+ src/hb-open-type-private.hh | 10 +++++-----
+ src/hb-ot-layout-common-private.hh | 27 +++++++++++++++------------
+ src/hb-ot-layout-gdef-private.hh | 10 +++++-----
+ src/hb-ot-layout-gpos-private.hh | 25 ++++++++++++-------------
+ src/hb-ot-layout-gsub-private.hh | 14 +++++++-------
+ src/hb-ot-layout-gsubgpos-private.hh | 16 ++++++++--------
+ 7 files changed, 54 insertions(+), 52 deletions(-)
+
+commit 596e471aa5053d955fb5d5b5923088c8814469b1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 18:47:48 2010 -0400
+
+ Cleanup DEFINE_SIZE_VAR2
+
+ src/hb-open-type-private.hh | 18 +++++++++++-------
+ src/hb-ot-layout-common-private.hh | 6 +++---
+ src/hb-ot-layout-gdef-private.hh | 4 ++--
+ src/hb-ot-layout-gpos-private.hh | 4 ++--
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 4 ++--
+ 6 files changed, 21 insertions(+), 17 deletions(-)
+
+commit 33afa4e2dc352f08cc094703e3f01d3ecd83b354
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 18:35:02 2010 -0400
+
+ Minor
+
+ src/hb-open-type-private.hh | 14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+commit b961518b9611471ff7060e97686e5625974847eb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 18:20:54 2010 -0400
+
+ Simplify array access
+
+ src/hb-open-type-private.hh | 29 ++++++++++-------------------
+ src/hb-ot-layout-common-private.hh | 8 ++++----
+ src/hb-ot-layout-gsub-private.hh | 6 +++---
+ src/hb-ot-layout-gsubgpos-private.hh | 16 ++++++++--------
+ 4 files changed, 25 insertions(+), 34 deletions(-)
+
+commit 54842374c2b291ef208c51ae1d853ec0403ccf84
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 18:13:32 2010 -0400
+
+ Fix check_struct to check min_size instead of sizeof
+
+ src/hb-open-type-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit ed07422c33bbb52ff4d79e65986171e3f07697d8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 18:08:46 2010 -0400
+
+ Further cleanup of sizeof
+
+ src/hb-open-type-private.hh | 7 +++++--
+ src/hb-ot-layout-common-private.hh | 4 ++++
+ src/hb-ot-layout-gdef-private.hh | 4 ++++
+ src/hb-ot-layout-gpos-private.hh | 10 +++++++---
+ src/hb-ot-layout-gsub-private.hh | 4 +++-
+ src/hb-ot-layout-gsubgpos-private.hh | 2 ++
+ 6 files changed, 25 insertions(+), 6 deletions(-)
+
+commit a82ef7a893b773a17f7548375de9f588dfc83aba
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 17:55:03 2010 -0400
+
+ Remove CastP completely
+
+ src/hb-open-type-private.hh | 39
+ +++++++++++++++++----------------------
+ 1 files changed, 17 insertions(+), 22 deletions(-)
+
+commit 40cbefe858192531ed64dd51d402f7ca7b8153a3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 17:47:22 2010 -0400
+
+ Remove unnecessary casts
+
+ src/hb-open-type-private.hh | 12 ++++++------
+ src/hb-ot-layout-common-private.hh | 2 +-
+ src/hb-ot-layout-gpos-private.hh | 34
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-private.hh | 4 ++--
+ src/hb-ot-layout-gsubgpos-private.hh | 34
+ +++++++++++++++++-----------------
+ 5 files changed, 43 insertions(+), 43 deletions(-)
+
+commit 09766b1ec5ec55a61edbcd7a89ed3613cc92d4cb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 17:36:03 2010 -0400
+
+ Make StructAtOffset take a pointer
+
+ Is safer.
+
+ src/hb-open-type-private.hh | 26 +++++++++++++-------------
+ src/hb-ot-layout-gpos-private.hh | 6 +++---
+ src/hb-ot-layout-gsub-private.hh | 4 ++--
+ 3 files changed, 18 insertions(+), 18 deletions(-)
+
+commit bea34c7cbb583cf7660776e95cab3171590b8427
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 17:28:16 2010 -0400
+
+ Further cleanup of DEFINE_SIZE
+
+ src/hb-open-file-private.hh | 2 +-
+ src/hb-open-type-private.hh | 10 +++++-----
+ src/hb-ot-layout-common-private.hh | 16 ++++++++--------
+ src/hb-ot-layout-gdef-private.hh | 8 ++++----
+ src/hb-ot-layout-gpos-private.hh | 16 +++++-----------
+ src/hb-ot-layout-gsub-private.hh | 14 +++++++-------
+ src/hb-ot-layout-gsubgpos-private.hh | 14 +++++++-------
+ 7 files changed, 37 insertions(+), 43 deletions(-)
+
+commit 0abcc3b48cfd51a22695c9e988938b2f45cb19d8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 17:04:20 2010 -0400
+
+ Cleanup
+
+ src/hb-open-type-private.hh | 18 ++++++++++--------
+ 1 files changed, 10 insertions(+), 8 deletions(-)
+
+commit b3651231bf80bb7009214547a75ed90e21815c68
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 16:57:29 2010 -0400
+
+ Remove ASSERT_SIZE in favor of the safer DEFINE_SIZE_STATIC
+
+ src/hb-open-file-private.hh | 3 +-
+ src/hb-open-type-private.hh | 20 +++++++++++++--
+ src/hb-ot-layout-common-private.hh | 24 ++++++++++-------
+ src/hb-ot-layout-gdef-private.hh | 22 ++++++++++------
+ src/hb-ot-layout-gpos-private.hh | 44
+ ++++++++++++++++++---------------
+ src/hb-ot-layout-gsub-private.hh | 32 +++++++++++++++---------
+ src/hb-ot-layout-gsubgpos-private.hh | 27 ++++++++++++++-------
+ src/hb-private.h | 2 -
+ 8 files changed, 109 insertions(+), 65 deletions(-)
+
+commit 569da92bc6956f42d9b2d65c784e184fb6380efe
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 10 16:38:32 2010 -0400
+
+ Cleanup ASSERT_SIZE_VAR
+
+ src/hb-open-file-private.hh | 9 ++++++---
+ src/hb-open-type-private.hh | 6 ++++--
+ src/hb-ot-layout-common-private.hh | 22 ++++++++++++----------
+ src/hb-ot-layout-gdef-private.hh | 3 ++-
+ src/hb-ot-layout-gpos-private.hh | 30
+ +++++++++++++++++++-----------
+ src/hb-ot-layout-gsubgpos-private.hh | 10 ++++++----
+ src/hb-private.h | 8 --------
+ 7 files changed, 49 insertions(+), 39 deletions(-)
+
+commit 99bf03459ff2f00cf3fb7fa3c8b8336ec9fcca56
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 6 19:37:32 2010 -0400
+
+ Whitespace
+
+ src/hb-ot-layout-gpos-private.hh | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 65f46b00333e20ab8a52a4b350747507541ec1db
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 6 19:35:19 2010 -0400
+
+ Simplify DEFINE_NULL_DATA
+
+ Using ::min_size.
+
+ src/hb-open-type-private.hh | 6 +++---
+ src/hb-ot-layout-common-private.hh | 9 +++++----
+ 2 files changed, 8 insertions(+), 7 deletions(-)
+
+commit e45d3f86f9a5f3d29ca35a282de7f98e702878f9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 6 19:33:31 2010 -0400
+
+ Start cleaning up get_size()
+
+ So we know when the size is static and when dynamic.
+
+ src/hb-open-file-private.hh | 7 ++---
+ src/hb-open-type-private.hh | 42
+ ++++++++++++++++++++++++---------
+ src/hb-ot-layout-common-private.hh | 14 +++++------
+ src/hb-ot-layout-gpos-private.hh | 17 +++++--------
+ src/hb-ot-layout-gsubgpos-private.hh | 19 +++++++--------
+ 5 files changed, 55 insertions(+), 44 deletions(-)
+
+commit b157617644d1e38f680163889d1dc2e2f64d9ba3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 6 14:48:27 2010 -0400
+
+ Remove the last of SANITIZE macros: SANITIZE_SELF
+
+ src/hb-open-file-private.hh | 4 ++--
+ src/hb-open-type-private.hh | 21 ++++++++++++---------
+ src/hb-ot-layout-common-private.hh | 16 ++++++++--------
+ src/hb-ot-layout-gdef-private.hh | 6 +++---
+ src/hb-ot-layout-gpos-private.hh | 26 +++++++++++++-------------
+ src/hb-ot-layout-gsubgpos-private.hh | 6 +++---
+ 6 files changed, 41 insertions(+), 38 deletions(-)
+
+commit 4f252fedc7136c66a9d7fbcb2978581986da6227
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 6 13:30:23 2010 -0400
+
+ Remove SANITIZE macro
+
+ src/hb-open-file-private.hh | 4 ++--
+ src/hb-open-type-private.hh | 6 ++----
+ src/hb-ot-layout-common-private.hh | 18 +++++++++---------
+ src/hb-ot-layout-gdef-private.hh | 6 +++---
+ src/hb-ot-layout-gpos-private.hh | 18 +++++++++---------
+ src/hb-ot-layout-gsub-private.hh | 26 +++++++++++++-------------
+ src/hb-ot-layout-gsubgpos-private.hh | 22 +++++++++++-----------
+ 7 files changed, 49 insertions(+), 51 deletions(-)
+
+commit c2ddfd2d268385257c77c09a9abeacf4230d5377
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 6 13:06:15 2010 -0400
+
+ Cleanup Value casts
+
+ src/hb-ot-layout-gpos-private.hh | 34
+ +++++++++++++++++++++-------------
+ 1 files changed, 21 insertions(+), 13 deletions(-)
+
+commit 41a93d2c1ff175ef06328a99983577459c2d34b0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 6 12:55:14 2010 -0400
+
+ Remove SANITIZE_WITH_BASE
+
+ src/hb-open-file-private.hh | 2 +-
+ src/hb-open-type-private.hh | 2 -
+ src/hb-ot-layout-common-private.hh | 6 +-
+ src/hb-ot-layout-gdef-private.hh | 24 +++++-----
+ src/hb-ot-layout-gpos-private.hh | 90
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-private.hh | 31 ++++++------
+ src/hb-ot-layout-gsubgpos-private.hh | 44 ++++++++--------
+ 7 files changed, 98 insertions(+), 101 deletions(-)
+
+commit f5fab0c71837371cce32dc3e9edca1ccb8d44e29
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 6 10:26:52 2010 -0400
+
+ Remove SANITIZE_MEM
+
+ src/hb-open-type-private.hh | 4 +---
+ src/hb-ot-layout-common-private.hh | 2 +-
+ src/hb-ot-layout-gpos-private.hh | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 6 +++---
+ 4 files changed, 6 insertions(+), 8 deletions(-)
+
+commit 4ad2cc5dec6b0639da2b1846282bdd99d06d5ff1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 6 09:24:24 2010 -0400
+
+ Rename check to check_range
+
+ src/hb-open-type-private.hh | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 1cd1e117d060d38e314618b627d7663cb01ed584
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 5 20:15:14 2010 -0400
+
+ Remove SANITIZE_ARRAY
+
+ src/hb-open-file-private.hh | 2 +-
+ src/hb-open-type-private.hh | 16 +++++++---------
+ src/hb-ot-layout-gpos-private.hh | 8 ++++----
+ src/hb-ot-layout-gsubgpos-private.hh | 4 ++--
+ 4 files changed, 14 insertions(+), 16 deletions(-)
+
+commit 583d7f9586ce69754f1354aa3895e6d732a0c2ce
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 5 01:49:22 2010 -0400
+
+ Cosmetic
+
+ src/hb-open-file-private.hh | 3 ++-
+ src/hb-open-type-private.hh | 6 ++++--
+ src/hb-ot-layout-common-private.hh | 15 ++++++++++-----
+ src/hb-ot-layout-gpos-private.hh | 5 ++---
+ src/hb-ot-layout-gsub-private.hh | 3 ++-
+ src/hb-ot-layout-gsubgpos-private.hh | 9 +++++----
+ 6 files changed, 25 insertions(+), 16 deletions(-)
+
+commit 705e215268aa95c2bc6af8af9b48b72b690ec1f7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 5 01:40:25 2010 -0400
+
+ Minor
+
+ src/hb-open-type-private.hh | 4 ++--
+ src/hb-ot-layout-gpos-private.hh | 2 +-
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+commit b18eafd0f62f854d15276c78f99843aecd47acad
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 5 01:39:26 2010 -0400
+
+ Minor
+
+ src/hb-open-type-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4169710911450e0f9bc045fe279bfc8ba9e8457c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 5 01:37:58 2010 -0400
+
+ Simplify chaining
+
+ src/hb-ot-layout-gsubgpos-private.hh | 61
+ ++++++++++++++--------------------
+ 1 files changed, 25 insertions(+), 36 deletions(-)
+
+commit 1911b9d21b2b7b6b8219ce6c888540e3a60aa9c3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 5 01:32:04 2010 -0400
+
+ Remove APPLY_ARG_DEF and APPLY_ARG
+
+ src/hb-ot-layout-gpos-private.hh | 92
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-private.hh | 88
+ ++++++++++++++++----------------
+ src/hb-ot-layout-gsubgpos-private.hh | 89
+ +++++++++++++++-----------------
+ 3 files changed, 132 insertions(+), 137 deletions(-)
+
+commit 6c42cddfe53a1c664081862bb9a3e1c38d05a823
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 5 01:30:48 2010 -0400
+
+ Port apply to use hb_trace_t
+
+ src/hb-ot-layout-gpos-private.hh | 9 ++++-----
+ src/hb-ot-layout-gsub-private.hh | 11 +++++------
+ src/hb-ot-layout-gsubgpos-private.hh | 13 +++++--------
+ 3 files changed, 14 insertions(+), 19 deletions(-)
+
+commit 969c9705ae0c64577c3f69f5300fec975f952e1f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 5 01:23:44 2010 -0400
+
+ Move context_length into apply_context
+
+ src/hb-ot-layout-gpos-private.hh | 9 ++--
+ src/hb-ot-layout-gsub-private.hh | 9 ++--
+ src/hb-ot-layout-gsubgpos-private.hh | 70
+ +++++++++++++++++++--------------
+ 3 files changed, 50 insertions(+), 38 deletions(-)
+
+commit 94a23aaeca39c662614037ef887412249bdc8d49
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 5 01:13:09 2010 -0400
+
+ Move buffer into apply_context
+
+ src/hb-buffer-private.h | 30 +++++++++-------
+ src/hb-ot-layout-gpos-private.hh | 64
+ +++++++++++++++++++---------------
+ src/hb-ot-layout-gsub-private.hh | 45 ++++++++++++++----------
+ src/hb-ot-layout-gsubgpos-private.hh | 49 ++++++++++++++------------
+ 4 files changed, 106 insertions(+), 82 deletions(-)
+
+commit 63493f956dca519df49da0a6badc3cb0a1b92779
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 5 01:01:05 2010 -0400
+
+ Move layout_context into apply_context
+
+ src/hb-ot-layout-gpos-private.hh | 105
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-private.hh | 47 ++++++++-------
+ src/hb-ot-layout-gsubgpos-private.hh | 11 ++--
+ 3 files changed, 82 insertions(+), 81 deletions(-)
+
+commit fff9aa263d1daf7c5117cf383fafa5043d5eb5af
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 5 00:32:21 2010 -0400
+
+ Minor
+
+ src/hb-ot-layout-gsubgpos-private.hh | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 27e302dc8e794ff6bf878bc76e17d336d510849e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 5 00:26:16 2010 -0400
+
+ I keep changing my mind about this
+
+ src/hb-open-type-private.hh | 30 ++++++++++--------------------
+ 1 files changed, 10 insertions(+), 20 deletions(-)
+
+commit 39840474afd2cda9ff576c08aff9c87095496c27
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 5 00:23:19 2010 -0400
+
+ Remove SANITIZE_ARG_DEF and SANITIZE_ARG
+
+ src/hb-open-file-private.hh | 16 ++--
+ src/hb-open-type-private.hh | 59 +++++++--------
+ src/hb-ot-layout-common-private.hh | 42 +++++-----
+ src/hb-ot-layout-gdef-private.hh | 28 ++++----
+ src/hb-ot-layout-gpos-private.hh | 136
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-private.hh | 72 +++++++++---------
+ src/hb-ot-layout-gsubgpos-private.hh | 46 ++++++------
+ 7 files changed, 197 insertions(+), 202 deletions(-)
+
+commit b261e2ad5c5a065599ce1dbc4ba437caa2cee1e9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 5 00:20:16 2010 -0400
+
+ Remove trace from sanitize_shallow()
+
+ src/hb-open-type-private.hh | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit dfc8cbe85479dde1ffdc6b2e73f4907331d77a19
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 5 00:19:46 2010 -0400
+
+ Add hb_trace_t
+
+ src/hb-open-type-private.hh | 33 +++++++++++++++++++--------------
+ 1 files changed, 19 insertions(+), 14 deletions(-)
+
+commit 20e3dd5d292b65f70d2eae63b8d8713a1c889d47
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 4 23:21:57 2010 -0400
+
+ Make sanitize_depth variable automatic and not passed through
+ function args
+
+ src/hb-open-type-private.hh | 72
+ +++++++++++++++++++++++++-----------------
+ 1 files changed, 43 insertions(+), 29 deletions(-)
+
+commit 4a446ac35136eff23d55f47bdd7b40095ad707ab
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 4 22:46:21 2010 -0400
+
+ Use function template for pass-thru argument
+
+ src/hb-open-type-private.hh | 26 ++++++--------------------
+ src/hb-ot-layout-gpos-private.hh | 6 +++---
+ 2 files changed, 9 insertions(+), 23 deletions(-)
+
+commit 98daaf183d6dbf2b68959da608cd9876ba55d7aa
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 4 22:42:49 2010 -0400
+
+ Make _hb_sanitize_*() methods of the context object
+
+ src/hb-open-type-private.hh | 190
+ ++++++++++++++++++++++---------------------
+ 1 files changed, 98 insertions(+), 92 deletions(-)
+
+commit bb029af943faa9905e652d58856998687e60c31d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 4 15:28:52 2010 -0400
+
+ Remove SANITIZE_THIS
+
+ src/hb-open-file-private.hh | 2 +-
+ src/hb-open-type-private.hh | 3 +-
+ src/hb-ot-layout-common-private.hh | 4 +-
+ src/hb-ot-layout-gdef-private.hh | 25 ++++++++-------
+ src/hb-ot-layout-gpos-private.hh | 55
+ ++++++++++++++++++---------------
+ src/hb-ot-layout-gsub-private.hh | 29 ++++++++++--------
+ src/hb-ot-layout-gsubgpos-private.hh | 42 +++++++++++++-------------
+ 7 files changed, 85 insertions(+), 75 deletions(-)
+
+commit 2226fc93d1427b8830bfb892fe1b25b488ea36dc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 4 15:12:17 2010 -0400
+
+ Rename SANITIZE_BASE to SANITIZE_WITH_BASE
+
+ src/hb-open-type-private.hh | 11 +++++++----
+ src/hb-ot-layout-common-private.hh | 3 ++-
+ src/hb-ot-layout-gpos-private.hh | 15 ++++++++-------
+ 3 files changed, 17 insertions(+), 12 deletions(-)
+
+commit 89da1346ec3a8dec8a368df46d61ca75356e22fa
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 4 15:01:45 2010 -0400
+
+ Remove SANITIZE_OBJ
+
+ src/hb-open-type-private.hh | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit 4d4cce96266b777a01cec03e8766dc8c0b159351
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 4 14:57:55 2010 -0400
+
+ Remove SANITIZE_THIS2
+
+ src/hb-open-type-private.hh | 2 --
+ src/hb-ot-layout-common-private.hh | 3 ++-
+ src/hb-ot-layout-gdef-private.hh | 10 ++++++----
+ src/hb-ot-layout-gpos-private.hh | 9 ++++++---
+ src/hb-ot-layout-gsub-private.hh | 11 +++++++----
+ src/hb-ot-layout-gsubgpos-private.hh | 14 +++++++++-----
+ 6 files changed, 30 insertions(+), 19 deletions(-)
+
+commit 26bfcb64e473c40e439d6efbe974781dada28eca
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 4 14:49:45 2010 -0400
+
+ Cosmetic
+
+ src/hb-ot-layout-gdef-private.hh | 5 ++---
+ src/hb-ot-layout-gsubgpos-private.hh | 7 +++----
+ 2 files changed, 5 insertions(+), 7 deletions(-)
+
+commit be74284673a1944e0f1884e861c3fe8f9855172c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 4 14:47:05 2010 -0400
+
+ Remove SANITIZE_THIS3
+
+ src/hb-open-type-private.hh | 1 -
+ src/hb-ot-layout-gpos-private.hh | 21 +++++++++++++++------
+ src/hb-ot-layout-gsubgpos-private.hh | 8 ++++++--
+ 3 files changed, 21 insertions(+), 9 deletions(-)
+
+commit fbab9f9bd8ba59e7e5811f33c1dda198f95cf05a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 4 14:42:10 2010 -0400
+
+ Remove SANITIZE_BASE2
+
+ src/hb-open-type-private.hh | 1 -
+ src/hb-ot-layout-gpos-private.hh | 3 ++-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 73c7dbf7f5433c0cdd467ef32402f52867e9798e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 4 14:40:55 2010 -0400
+
+ Remove SANITIZE2
+
+ src/hb-open-type-private.hh | 1 -
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ 2 files changed, 1 insertions(+), 2 deletions(-)
+
+commit c9f14687a30866181feb57ee2736a147ec9f25a1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 4 14:38:08 2010 -0400
+
+ Remove the NEUTER macro, move code to a method
+
+ src/hb-open-type-private.hh | 21 +++++++++++++--------
+ 1 files changed, 13 insertions(+), 8 deletions(-)
+
+commit 30fa2821c277df99a14089749313dfe2b541e2d0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 4 14:28:18 2010 -0400
+
+ Make internal method private
+
+ src/hb-open-type-private.hh | 12 +++++++-----
+ 1 files changed, 7 insertions(+), 5 deletions(-)
+
+commit ce5694c79671bf75990923c1da17bb611e4e7d15
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 4 14:10:18 2010 -0400
+
+ [main] Recognize Apple SFNTs
+
+ src/hb-open-file-private.hh | 4 ++--
+ src/main.cc | 6 ++++++
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+commit 710500a93ecc2a0c595045602aa367073485ff91
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 3 23:11:16 2010 -0400
+
+ Comment new SFNT tags
+
+ src/hb-open-file-private.hh | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 64d3fc8d0dada673245cc8c0b1c12cd849b30997
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 3 22:51:19 2010 -0400
+
+ Cosmetic: Rename HB_LIKELY/HB_UNLIKELY to likely/unlikely
+
+ src/hb-buffer.c | 14 ++++----
+ src/hb-font.cc | 6 ++--
+ src/hb-ft.c | 14 ++++----
+ src/hb-language.c | 2 +-
+ src/hb-object-private.h | 10 +++---
+ src/hb-open-file-private.hh | 2 +-
+ src/hb-open-type-private.hh | 38 ++++++++++----------
+ src/hb-ot-layout-common-private.hh | 16 ++++----
+ src/hb-ot-layout-gdef-private.hh | 2 +-
+ src/hb-ot-layout-gpos-private.hh | 64
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-private.hh | 52 ++++++++++++++--------------
+ src/hb-ot-layout-gsubgpos-private.hh | 40 ++++++++++----------
+ src/hb-ot-layout.cc | 12 +++---
+ src/hb-ot-tag.c | 2 +-
+ src/hb-private.h | 8 ++--
+ src/hb-shape.c | 10 +++---
+ src/hb-unicode.c | 2 +-
+ 17 files changed, 147 insertions(+), 147 deletions(-)
+
+commit fa3b3d58443a7c22eca3f86243993ba2d4bd9f4a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 3 22:47:22 2010 -0400
+
+ Mark a couple functions as inline
+
+ src/hb-open-type-private.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 6b84198f9d471defb6f55d44d4f5423df70b2a10
+Merge: 631d10b eaf29ed
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 3 22:46:52 2010 -0400
+
+ Merge remote branch 'jrmuizel/master'
+
+commit eaf29edb8fa49390e5f48b78105dfd173aff445b
+Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
+Date: Mon May 3 22:27:56 2010 -0400
+
+ HB_UNUSED is unneeded on static inline functions
+
+ src/hb-object-private.h | 2 +-
+ src/hb-open-type-private.hh | 6 +++---
+ src/hb-private.h | 4 ++--
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 4ce578ed369f1526c91deedcf9e72537b3e4328f
+Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
+Date: Mon May 3 15:03:53 2010 -0400
+
+ Include the tags from the Apple specification for TrueType fonts
+
+ src/hb-open-file-private.hh | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 631d10b728d9e1a02c7dddf505d4fae5e244c6e8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 2 21:14:21 2010 -0400
+
+ Remove unused method
+
+ src/hb-open-file-private.hh | 5 -----
+ 1 files changed, 0 insertions(+), 5 deletions(-)
+
+commit f0abcd69408a3af65207cdf8847575ade4579bd4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 2 18:14:25 2010 -0400
+
+ Whitespace
+
+ src/hb-open-type-private.hh | 9 ++++-----
+ 1 files changed, 4 insertions(+), 5 deletions(-)
+
+commit a8d960bd26883ee937b04ca2a3c16a3644870356
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 14:31:56 2010 -0400
+
+ [GPOS] Speedup apply_value()
+
+ src/hb-ot-layout-gpos-private.hh | 7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 2cd1ea4411d0808559a942ff3fa4e637f9c9a9c8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 14:15:32 2010 -0400
+
+ [ft] Disallow getting the entire font data with tag=0
+
+ src/hb-ft.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 33d13fdda99acaeffa9600737e8870278d053ebe
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 13:56:44 2010 -0400
+
+ Rename HB_GNUC_UNUSED -> HB_UNUSED
+
+ src/hb-buffer.c | 6 ++--
+ src/hb-font.cc | 44
+ +++++++++++++++++-----------------
+ src/hb-ft.c | 16 ++++++------
+ src/hb-object-private.h | 2 +-
+ src/hb-open-type-private.hh | 18 +++++++-------
+ src/hb-ot-layout-gdef-private.hh | 4 +-
+ src/hb-ot-layout-gpos-private.hh | 4 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 6 ++--
+ src/hb-ot-layout.cc | 4 +-
+ src/hb-ot-shape.c | 2 +-
+ src/hb-private.h | 16 ++++++------
+ src/hb-shape.c | 32 ++++++++++++------------
+ src/hb-unicode.c | 8 +++---
+ 13 files changed, 81 insertions(+), 81 deletions(-)
+
+commit 7d3a126334f8e6f6441561c1bb592bd3fa7a2c5c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 13:54:01 2010 -0400
+
+ Define HB_FUNC for portability to non-gcc
+
+ src/hb-open-type-private.hh | 12 ++++++------
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ src/hb-private.h | 9 +++++++++
+ 3 files changed, 16 insertions(+), 7 deletions(-)
+
+commit fa030175ca998b00cc42cbced6e98de323ec01ec
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 13:48:26 2010 -0400
+
+ [sanitize] Make debug code always available to the compiler
+
+ Such that we don't break debug build all the time.
+
+ src/hb-open-type-private.hh | 71
+ +++++++++++++++++++------------------------
+ 1 files changed, 31 insertions(+), 40 deletions(-)
+
+commit fde6f5bd682f5ad0cc5e2ec69fc831b0192bf90b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 04:41:41 2010 -0400
+
+ Convert to uppercase in hb_ot_tag_from_language()
+
+ src/hb-ot-tag.c | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 6f729b45b04243c42ad7201b67cda9d5e5c363f1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 03:59:06 2010 -0400
+
+ More contour point use
+
+ src/hb-font.cc | 1 +
+ src/hb-ot-layout-gdef-private.hh | 8 +++++---
+ src/hb-ot-layout-gpos-private.hh | 13 +++++++++----
+ 3 files changed, 15 insertions(+), 7 deletions(-)
+
+commit 3840b6b50503ba2c9a99f774284e0077baffa8a0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 03:48:27 2010 -0400
+
+ [gdef] Fix delta scale
+
+ src/hb-ot-layout-gdef-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4ac6cc284b2c1eb670c2a3659ec385ed729acac4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 03:48:11 2010 -0400
+
+ [gdef] Fix rounding
+
+ src/hb-ot-layout-gdef-private.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit b52fbb1bab608bda76efb936f08344afaec600a1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 03:47:00 2010 -0400
+
+ [gdef] Implement getting contour point
+
+ src/hb-ot-layout-gdef-private.hh | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 4c5fbae011a33b9efef5aedd61c357fc0ded1113
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 03:39:39 2010 -0400
+
+ Make sure mirroring is done in original direction
+
+ Reported by Jonathan Kew.
+
+ src/hb-shape.c | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit ce23c9234b87513d6460fb89bad178fb8537e161
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 03:31:03 2010 -0400
+
+ Use BCP47 private-use tags for OpenType tag language string mapping
+
+ src/hb-ot-tag.c | 16 ++++++++--------
+ 1 files changed, 8 insertions(+), 8 deletions(-)
+
+commit eaf1d9a46c4a320f3b0026c0a610f95a620d566f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 03:11:32 2010 -0400
+
+ Minor
+
+ src/hb-ot-tag.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 3a4784fe88a0f14147ccdd3633952c9c0f3ae8f3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 02:58:38 2010 -0400
+
+ Fix bug in hb_language_from_string()
+
+ Reported by Jonathan Kew.
+
+ src/hb-language.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 602e4f8d5512cdf48c696ad64ad62ff97f6dbdcc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 02:28:54 2010 -0400
+
+ Use const_cast
+
+ src/hb-open-type-private.hh | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit abff3580a5b229641086e0da097efee11d22ff81
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 02:27:20 2010 -0400
+
+ Add const
+
+ src/hb-object-private.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 6617eada95928457a25e29f793f1a93c6b3edaec
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 02:25:30 2010 -0400
+
+ Rename apply_context -> context
+
+ src/hb-ot-layout-gpos-private.hh | 22 +++++++++++-----------
+ src/hb-ot-layout-gsub-private.hh | 26 +++++++++++++-------------
+ src/hb-ot-layout-gsubgpos-private.hh | 12 ++++++------
+ 3 files changed, 30 insertions(+), 30 deletions(-)
+
+commit b4c7fab762935b9c182b3e2ac3415f29fc6a5558
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 02:24:25 2010 -0400
+
+ Rename
+
+ src/hb-ot-layout-gpos-private.hh | 98
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-private.hh | 46 ++++++++--------
+ src/hb-ot-layout-gsubgpos-private.hh | 12 ++--
+ 3 files changed, 78 insertions(+), 78 deletions(-)
+
+commit 1376fb7bf9ef07970f0ba13dc64d6a8ab8252762
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 02:19:21 2010 -0400
+
+ [apply] Use a context object to reduce number of parameters passed
+ around
+
+ src/hb-open-type-private.hh | 5 +--
+ src/hb-ot-layout-gpos-private.hh | 26 +++++++++++++----------
+ src/hb-ot-layout-gsub-private.hh | 37
+ ++++++++++++++++++---------------
+ src/hb-ot-layout-gsubgpos-private.hh | 29 ++++++++++++++------------
+ 4 files changed, 53 insertions(+), 44 deletions(-)
+
+commit 173fde7087c0db3e99409f1119530477c14072f5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 01:47:30 2010 -0400
+
+ Further simplify tracing
+
+ src/hb-open-type-private.hh | 31
+ +++++++++++++++----------------
+ src/hb-ot-layout-gpos-private.hh | 9 +++++----
+ src/hb-ot-layout-gsub-private.hh | 11 ++++++-----
+ src/hb-ot-layout-gsubgpos-private.hh | 8 --------
+ 4 files changed, 26 insertions(+), 33 deletions(-)
+
+commit bc200457430c083914a64bf4b056153506749610
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 29 01:40:26 2010 -0400
+
+ Simplify trace code
+
+ src/hb-open-type-private.hh | 41 ++++++++---------------------
+ src/hb-ot-layout-gsubgpos-private.hh | 25 ++++-------------
+ src/hb-private.h | 48
+ ++++++++++++++++++++++++----------
+ 3 files changed, 51 insertions(+), 63 deletions(-)
+
+commit 807c5b03a2251a3c29a520852639421783101b55
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 28 20:25:22 2010 -0400
+
+ [sanitize] Make debug code always available to the compiler
+
+ Such that we don't break debug build all the time.
+
+ src/hb-open-type-private.hh | 31
+ ++++++++++++++++++++-----------
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ 2 files changed, 21 insertions(+), 12 deletions(-)
+
+commit 74e313c016704e1d9157c2763691c4151f049dfc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 28 15:15:09 2010 -0400
+
+ [gsubgpos] Make debug code always available to the compiler
+
+ Such that we don't break debug build all the time.
+
+ src/hb-ot-layout-gsubgpos-private.hh | 52
+ +++++++++++++++++-----------------
+ 1 files changed, 26 insertions(+), 26 deletions(-)
+
+commit 41011a6ed7c4891b20c0eddbb6d4ad9c820cfddb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 28 13:33:09 2010 -0400
+
+ Fix compiler warning about value unused
+
+ src/hb-object-private.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 863df68e894b7644dcd12da88aa22f73edf829dc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 28 13:29:55 2010 -0400
+
+ [object] Make debug code always available to the compiler
+
+ Such that we don't break debug build all the time.
+
+ src/hb-object-private.h | 42 +++++++++++++++++++++++++++---------------
+ 1 files changed, 27 insertions(+), 15 deletions(-)
+
+commit 1d52151a19ed8ec776276aac5cc6ce3769e0d947
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 28 13:18:41 2010 -0400
+
+ Minor
+
+ src/hb-private.h | 8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+commit 444fffb1ab378cb3022e2a8e9f90d20a00c82f6a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 28 13:16:38 2010 -0400
+
+ [blob] Make debug code always available to the compiler
+
+ Such that we don't break debug build all the time.
+
+ src/hb-blob.c | 78
+ +++++++++++++++++++++++---------------------------------
+ 1 files changed, 32 insertions(+), 46 deletions(-)
+
+commit ba51b25c7ba568aeced17f016eceba987569c5d9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 28 13:10:36 2010 -0400
+
+ Fix build. Ouch!
+
+ src/hb-object-private.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit a92f0fda7fee9d60b399b8865541bf73e6e30141
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 28 13:09:40 2010 -0400
+
+ Fix debug build
+
+ src/hb-open-type-private.hh | 4 ++--
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit c165f25410f817d248ad5d07e1827d33efd1b0a0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 27 23:28:10 2010 -0400
+
+ [object] Actually handle malloc() failure
+
+ Caught by John Daggett.
+
+ src/hb-object-private.h | 10 ++++++----
+ 1 files changed, 6 insertions(+), 4 deletions(-)
+
+commit caff7db93d205e32a535d49e51a3cad70f91dfdd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 26 10:07:35 2010 -0400
+
+ Fix Device::get_size() calculation
+
+ src/hb-ot-layout-common-private.hh | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+commit 66d6eb30eb0b8d61e00f86ea0c7829abaddb52fa
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Apr 25 23:01:45 2010 -0400
+
+ Rename Var to Obj
+
+ src/hb-open-type-private.hh | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 690b9194619589c32ffc0c092e45262ae7776e79
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Apr 25 22:51:05 2010 -0400
+
+ Remove use of flexible arrays
+
+ Also remove wrong ASSERT_SIZE that would trigger only when not using
+ flexible arrays (which was the case on win32, but not with gcc).
+
+ configure.ac | 2 --
+ src/hb-open-file-private.hh | 1 -
+ src/hb-private.h | 4 ----
+ 3 files changed, 0 insertions(+), 7 deletions(-)
+
+commit 1cebfbb0636b13dc5dc6a4b8b7acbb7da28129d2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 23 20:49:18 2010 -0400
+
+ Cleanup hb_face_create_for_data()
+
+ src/Makefile.am | 1 +
+ src/hb-blob-private.h | 57 ++++++++++++++++++++++++++++++
+ src/hb-blob.c | 20 +---------
+ src/hb-font-private.h | 3 --
+ src/hb-font.cc | 92
+ +++++++++++++++++++++++++++++++++---------------
+ 5 files changed, 123 insertions(+), 50 deletions(-)
+
+commit d6b3c83a90f60bedb4049750ffb351161710980d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 23 19:59:53 2010 -0400
+
+ Allow get_table() to return NULL
+
+ src/hb-font.cc | 6 +++++-
+ src/hb-ft.c | 2 +-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+commit ad3653751b1e4a03f7058200cb83f64db46722d5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 23 19:43:40 2010 -0400
+
+ Typo
+
+ src/hb-open-type-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 990443e5f282ad61de00dcf1ebff9cf1d5bc2d70
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 23 17:53:32 2010 -0400
+
+ Remove lock_instance()
+
+ src/hb-font.cc | 2 +-
+ src/hb-open-type-private.hh | 4 ----
+ src/hb-ot-layout.cc | 6 +++---
+ 3 files changed, 4 insertions(+), 8 deletions(-)
+
+commit 187454c595559ce48d072fee6bccb51f3de283d4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 23 16:35:01 2010 -0400
+
+ Add different casts from pointer and ref to avoid bugs
+
+ src/hb-open-type-private.hh | 22 +++++++++++++++-------
+ src/hb-ot-layout-gpos-private.hh | 8 ++++----
+ src/hb-ot-layout-gsub-private.hh | 12 ++++++------
+ src/main.cc | 6 +++---
+ 4 files changed, 28 insertions(+), 20 deletions(-)
+
+commit efb324a46ff64adb4ec8612b4089e8daff1e6d8e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 23 16:22:54 2010 -0400
+
+ Remove GET_FOR_DATA macros
+
+ The major-version check is now handled by sanitize. If major
+ doesn't match, we reject and fall back to the Null object.
+
+ src/hb-open-file-private.hh | 4 ----
+ src/hb-open-type-private.hh | 23 ++---------------------
+ src/hb-ot-layout-gdef-private.hh | 2 --
+ src/hb-ot-layout-gpos-private.hh | 3 ---
+ src/hb-ot-layout-gsub-private.hh | 3 ---
+ src/hb-ot-layout-gsubgpos-private.hh | 2 --
+ src/main.cc | 6 +++---
+ 7 files changed, 5 insertions(+), 38 deletions(-)
+
+commit f1aaa2a43654c28405ffd393de2cb127437c99a5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 23 15:19:50 2010 -0400
+
+ Add TODO
+
+ src/hb-ft.c | 2 --
+ src/hb-ft.h | 1 +
+ src/hb-open-file-private.hh | 2 +-
+ src/hb-open-type-private.hh | 2 ++
+ src/hb-ot-layout-common-private.hh | 12 ++++++------
+ 5 files changed, 10 insertions(+), 9 deletions(-)
+
+commit 33d4d4325e15e332105ea8f361bab79ee542f0f8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 23 14:56:55 2010 -0400
+
+ Zero glyph metrics before calling user callback
+
+ src/hb-font.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 4206e9511a222c0c50cc9b4fe72ec421983bba2c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 23 14:44:55 2010 -0400
+
+ More warning fixes
+
+ src/hb-ot-layout.cc | 4 ++--
+ src/hb-ot-shape.c | 9 ++++-----
+ src/hb-shape.c | 32 ++++++++++++++++----------------
+ 3 files changed, 22 insertions(+), 23 deletions(-)
+
+commit ef66ebeabc6c234004bd9e9bb67eb5c9711f4a1e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 23 14:40:36 2010 -0400
+
+ Remove unused parameter
+
+ src/hb-open-file-private.hh | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 1d720192b193f48b44be0385eda3c2c5d5cd28ad
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 23 14:39:10 2010 -0400
+
+ Fix compile warnings (HB_GNUC_UNUSED)
+
+ src/hb-buffer.c | 6 +++---
+ src/hb-font.cc | 31 ++++++++++++++++++++++---------
+ src/hb-ft.c | 29 +++++++++++++++++++++--------
+ src/hb-open-type-private.hh | 2 +-
+ src/hb-unicode.c | 8 ++++----
+ 5 files changed, 51 insertions(+), 25 deletions(-)
+
+commit 8dfdca599c0a3ba5255131002910bca3b381acac
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 23 14:07:34 2010 -0400
+
+ No need to keep blob in sanitize context
+
+ src/hb-open-type-private.hh | 13 +++++--------
+ 1 files changed, 5 insertions(+), 8 deletions(-)
+
+commit 254933c397f1ce9796f59689a25f9fc2e58df4ea
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 23 13:57:10 2010 -0400
+
+ When sanitizing, delay making writable
+
+ Before, as soon as we needed to make an edit, we tried to make
+ the blob
+ writable inplace. That grows code unnecessarily though. We can
+ simply
+ fail, make writable, then start again. That's indeed what the
+ fallback
+ was doing anyway.
+
+ src/hb-open-type-private.hh | 11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+commit 71e735e915c85536ee4d3035576f7426e8cd19dd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 23 13:48:06 2010 -0400
+
+ [blob] Fallback to copying if mprotect() fails
+
+ src/hb-blob.c | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 1aa4666b914da7747fc58a8f6f2d913c94e3b8da
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 23 13:32:03 2010 -0400
+
+ Cleanup OpenTypeFontFile
+
+ src/hb-open-file-private.hh | 44
+ +++++++++++++++++++++++++-----------------
+ src/main.cc | 2 +-
+ 2 files changed, 27 insertions(+), 19 deletions(-)
+
+commit ae4190cafe927649f8ff8be6a0082478d1298fda
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 23 12:33:02 2010 -0400
+
+ Properly define separate structs for TTCHeader and TTCHeaderVersion1
+
+ src/hb-open-file-private.hh | 71
+ +++++++++++++++++++++++++++++++++----------
+ 1 files changed, 55 insertions(+), 16 deletions(-)
+
+commit a065f471b3bc23d33ef75217308efeaed4ffd033
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 20:15:11 2010 -0400
+
+ Cleanup Extension lookups
+
+ Two things:
+
+ 1. Allow nested Extension lookups. The offset is always positive, so
+ it can't loop circularly.
+
+ 2. Move the check for all Extension subtables having the same lookup
+ type to the correct place. Before it wasn't really working.
+
+ src/hb-ot-layout-gpos-private.hh | 29 +------------------
+ src/hb-ot-layout-gsub-private.hh | 57
+ +++++++++++++++++++++----------------
+ 2 files changed, 33 insertions(+), 53 deletions(-)
+
+commit a0bb49c5830f8a7f25d573ec57b79df2620ddba7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 18:47:03 2010 -0400
+
+ Add comment re bsearch effect on sanitize
+
+ src/hb-open-file-private.hh | 2 +-
+ src/hb-ot-layout-common-private.hh | 8 ++++----
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+commit d632ec4000b3079150e6424e88a3ab7509f7445c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 18:33:12 2010 -0400
+
+ Cosmetic
+
+ src/hb-open-type-private.hh | 6 +++---
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+commit a3263aa773ad7a914496792466c69047048b093c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 18:29:09 2010 -0400
+
+ Convert the last set of cast macros to templates
+
+ src/hb-open-file-private.hh | 4 +-
+ src/hb-open-type-private.hh | 53
+ +++++++++++++++++++++------------
+ src/hb-ot-layout-gpos-private.hh | 16 +++++-----
+ src/hb-ot-layout-gsub-private.hh | 14 ++++----
+ src/hb-ot-layout-gsubgpos-private.hh | 12 ++++----
+ 5 files changed, 57 insertions(+), 42 deletions(-)
+
+commit c38188a1912f72d9ef90ae1bcbdbba7ecce63371
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 16:52:09 2010 -0400
+
+ Remove unused macro
+
+ src/hb-open-type-private.hh | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 3b2c2df41b90f2a1d9e33b3dc15a92cff58a689a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 16:51:42 2010 -0400
+
+ Cleanup Extension sanitize()
+
+ src/hb-ot-layout-common-private.hh | 20 +++-----------------
+ src/hb-ot-layout-gpos-private.hh | 20 +++++++++++++-------
+ src/hb-ot-layout-gsub-private.hh | 20 +++++++++++++-------
+ src/hb-ot-layout-gsubgpos-private.hh | 13 ++++---------
+ 4 files changed, 33 insertions(+), 40 deletions(-)
+
+commit 1856184b93760a1a54fb1a3c54281bb252df7ce6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 14:15:11 2010 -0400
+
+ Fail sanitize on major version mismatch
+
+ We handle major-version differences via get_for_data(), so sanitize
+ should never see a major version mismatch.
+
+ src/hb-open-file-private.hh | 4 ++--
+ src/hb-ot-layout-gdef-private.hh | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+commit df3f505dcfeefc8cd395900b116767d22549f756
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 14:11:33 2010 -0400
+
+ More sanitize cleanup
+
+ src/hb-open-file-private.hh | 24 ++----------------------
+ src/main.cc | 4 ++--
+ 2 files changed, 4 insertions(+), 24 deletions(-)
+
+commit 278a91f0cd802ac817c2603429bae1fa4a350ea0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 13:59:39 2010 -0400
+
+ Minor cleanup of sanitize
+
+ Done with an audit of all sanitize()
+
+ src/hb-ot-layout-gpos-private.hh | 18 +++++++++---------
+ 1 files changed, 9 insertions(+), 9 deletions(-)
+
+commit 9ac7dc73bc24b6dafb94df5de9cbf8fa0c82d5bc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 13:50:22 2010 -0400
+
+ Check for (impossible) overflow
+
+ src/hb-ot-layout-gpos-private.hh | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 9fc8684fd85ef6ec82b3b54323761bbdd4c3d891
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 13:37:58 2010 -0400
+
+ Cleanup ContextFormat3 sanitize
+
+ src/hb-ot-layout-gsubgpos-private.hh | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit e77302c61f1f1620d1f438a997575fa6ee5c172e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 13:34:00 2010 -0400
+
+ Add comment
+
+ src/hb-ot-layout-common-private.hh | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 7c469c3ca4ed4e45c50eff70df59b1a4780bae5b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 13:26:21 2010 -0400
+
+ Minor
+
+ src/hb-ot-layout-common-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit dc228048a813e43356373505168d3822deea5d72
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 13:22:41 2010 -0400
+
+ Remove integrity check in Tag sanitize
+
+ Serves no useful purpose.
+
+ src/hb-open-type-private.hh | 9 ---------
+ src/hb-ot-layout-common-private.hh | 2 +-
+ 2 files changed, 1 insertions(+), 10 deletions(-)
+
+commit 8015a8c762dc7be36998d529b7a3af59e3d14d87
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 11:06:30 2010 -0400
+
+ Don't sanitize raw table data
+
+ That part is performed by individual table sanitize.
+
+ src/hb-open-file-private.hh | 15 +++++++++------
+ 1 files changed, 9 insertions(+), 6 deletions(-)
+
+commit c293581e962b7982622e7d607fa3909b40da718e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 11:15:46 2010 -0400
+
+ Add coment
+
+ src/hb-open-type-private.hh | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 1faa76c6e848c6b0e360d9ddcf567533b87f8f31
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 10:54:26 2010 -0400
+
+ Remove unnecessary casts
+
+ src/hb-open-type-private.hh | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 079dc40112d3908ff7b7028ea3019bfe82bf606d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 10:47:12 2010 -0400
+
+ Avoid overflow in TableDirectory sanitize
+
+ src/hb-open-file-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit fb5904ec935d925a423401bc975ffaa22022ce1b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 10:43:30 2010 -0400
+
+ Make casts more explicit
+
+ src/hb-ot-layout-gpos-private.hh | 4 ++--
+ src/hb-ot-layout-gsub-private.hh | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 565c80bd2960366ace2d10dd71beaaf2a80213c8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 10:26:35 2010 -0400
+
+ Make sure semicolon is expected after DEFINE_NULL_DATA()
+
+ src/hb-open-type-private.hh | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit bb1e16335e537231246f44740f73cc23c0707364
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 01:01:35 2010 -0400
+
+ Improve Subst/Pos SubTable access and sanitize
+
+ src/hb-ot-layout-gpos-private.hh | 4 ++--
+ src/hb-ot-layout-gsub-private.hh | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 81f2af40f9afd5bb9695018e6baddcd4aa3361c1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 00:58:49 2010 -0400
+
+ Simplify Extension offset now that our int types have no alignment
+
+ src/hb-ot-layout-gsubgpos-private.hh | 9 +++------
+ 1 files changed, 3 insertions(+), 6 deletions(-)
+
+commit 19828ad42d8117563412aae3c70887aa117805a9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 00:49:16 2010 -0400
+
+ Sanitize shallow in Lookup since the generic SubLookup has no methods
+
+ src/hb-ot-layout-common-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e5546a4352c54311ac4a9ef138b187378155ebe1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 00:45:42 2010 -0400
+
+ Watch for overflow in Array sanitize
+
+ src/hb-open-type-private.hh | 21 +++++++++++++++------
+ src/hb-ot-layout-common-private.hh | 2 +-
+ 2 files changed, 16 insertions(+), 7 deletions(-)
+
+commit 4f5f1c34dda1e0629bfa6d7b0ffa2e1ce003b7c7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 00:27:39 2010 -0400
+
+ Rename const_sub_array to sub_array since all consts are implicit now
+
+ src/hb-open-type-private.hh | 2 +-
+ src/hb-ot-layout-common-private.hh | 4 ++--
+ src/hb-ot-layout-gdef-private.hh | 4 ++--
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 0795b784dd1009976c185482a376df250167e73b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 00:23:14 2010 -0400
+
+ Cosmetic
+
+ src/hb-ot-layout-common-private.hh | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 2d98d3bbaa0ddadcb08b5a8f437b18c211c50768
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 00:19:30 2010 -0400
+
+ Simplify Lookup sanitize
+
+ src/hb-ot-layout-common-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit c755cb3e3ac55156d0d2ec05adea7a650b97cc41
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 22 00:11:43 2010 -0400
+
+ Change header comment
+
+ README | 2 +-
+ src/hb-blob.c | 2 +-
+ src/hb-blob.h | 2 +-
+ src/hb-buffer-private.h | 2 +-
+ src/hb-buffer.c | 2 +-
+ src/hb-buffer.h | 2 +-
+ src/hb-common.h | 2 +-
+ src/hb-font-private.h | 2 +-
+ src/hb-font.cc | 2 +-
+ src/hb-font.h | 2 +-
+ src/hb-ft.c | 2 +-
+ src/hb-ft.h | 2 +-
+ src/hb-glib.c | 2 +-
+ src/hb-glib.h | 2 +-
+ src/hb-icu.c | 2 +-
+ src/hb-icu.h | 2 +-
+ src/hb-language.c | 2 +-
+ src/hb-language.h | 2 +-
+ src/hb-object-private.h | 2 +-
+ src/hb-open-file-private.hh | 2 +-
+ src/hb-open-type-private.hh | 2 +-
+ src/hb-ot-layout-common-private.hh | 2 +-
+ src/hb-ot-layout-gdef-private.hh | 2 +-
+ src/hb-ot-layout-gpos-private.hh | 2 +-
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ src/hb-ot-layout-private.h | 2 +-
+ src/hb-ot-layout.cc | 2 +-
+ src/hb-ot-layout.h | 2 +-
+ src/hb-ot-shape-private.h | 2 +-
+ src/hb-ot-shape.c | 2 +-
+ src/hb-ot-tag.c | 2 +-
+ src/hb-ot-tag.h | 2 +-
+ src/hb-ot.h | 2 +-
+ src/hb-private.h | 2 +-
+ src/hb-shape.c | 2 +-
+ src/hb-shape.h | 2 +-
+ src/hb-unicode-private.h | 2 +-
+ src/hb-unicode.c | 2 +-
+ src/hb-unicode.h | 2 +-
+ src/hb.h | 2 +-
+ src/main.cc | 2 +-
+ 42 files changed, 42 insertions(+), 42 deletions(-)
+
+commit 243d20e011e251462a07947275e0e98cc19c7e9b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 23:57:01 2010 -0400
+
+ More cast simplification
+
+ src/hb-open-type-private.hh | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 0dfcc13a4668cdd2c2ebdd5f4a7540a51222cf2f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 23:41:26 2010 -0400
+
+ Rename ConstCharP to CharP (overloaded now)
+
+ src/hb-open-file-private.hh | 10 +++++-----
+ src/hb-open-type-private.hh | 24 ++++++++++++------------
+ src/hb-ot-layout-gpos-private.hh | 12 ++++++------
+ src/hb-ot-layout-gsub-private.hh | 4 ++--
+ src/hb-ot-layout-gsubgpos-private.hh | 14 +++++++-------
+ 5 files changed, 32 insertions(+), 32 deletions(-)
+
+commit 62c0fd75737a69721dbf29e773405a4c529f8b6d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 23:30:48 2010 -0400
+
+ Cleanup de-const-casting during sanitize
+
+ src/hb-open-file-private.hh | 2 +-
+ src/hb-open-type-private.hh | 29 ++++++++++++++---------------
+ src/hb-ot-layout-common-private.hh | 4 ++--
+ src/hb-ot-layout-gpos-private.hh | 12 ++++++------
+ 4 files changed, 23 insertions(+), 24 deletions(-)
+
+commit dd155870567cfb9647b2e71593ace8b2705d7cff
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 23:13:33 2010 -0400
+
+ Add more comments
+
+ src/hb-open-type-private.hh | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit c85c3620675f38ffdca59134aeec2641485f40ca
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 23:12:54 2010 -0400
+
+ Add comment
+
+ src/hb-open-type-private.hh | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 2467c669c2aee4de2a6621a9d06cba0262376d41
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 23:11:45 2010 -0400
+
+ Add comment
+
+ src/hb-open-type-private.hh | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 29c3f5e1b6212c775a7b911becd44ba093b7b0eb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 23:01:00 2010 -0400
+
+ Improve comment
+
+ src/hb-open-type-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 01c01618e98283611628cd54d5ba4bf122f24cd9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 22:49:56 2010 -0400
+
+ Further simplify IntType struct defs
+
+ src/hb-open-type-private.hh | 21 ++++++++++++---------
+ 1 files changed, 12 insertions(+), 9 deletions(-)
+
+commit 2cb08458f674301cde9d962c13911035a251f7c5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 22:37:31 2010 -0400
+
+ Rename const_array() to array() (overloaded)
+
+ src/hb-open-type-private.hh | 12 ++++++------
+ src/hb-ot-layout-common-private.hh | 4 ++--
+ src/hb-ot-layout-gsub-private.hh | 6 +++---
+ src/hb-ot-layout-gsubgpos-private.hh | 16 ++++++++--------
+ 4 files changed, 19 insertions(+), 19 deletions(-)
+
+commit 2e2f43edf2f49f4047e28b1ce2ea95938536de9c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 22:30:36 2010 -0400
+
+ Remove ArrayAfter, use StructAfter in place
+
+ src/hb-open-type-private.hh | 21 ++++++---------------
+ 1 files changed, 6 insertions(+), 15 deletions(-)
+
+commit e961c86c579fd98ee604342a9c70c4e7f8d4f220
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 15:56:11 2010 -0400
+
+ Convert NEXT() and ARRAY_AFTER() macros to templates
+
+ src/hb-open-type-private.hh | 40
+ ++++++++++++++++++++++++---------
+ src/hb-ot-layout-common-private.hh | 4 +-
+ src/hb-ot-layout-gsub-private.hh | 8 +++---
+ src/hb-ot-layout-gsubgpos-private.hh | 24 ++++++++++----------
+ 4 files changed, 47 insertions(+), 29 deletions(-)
+
+commit 198facdc55756cb48cdfb8ba7fa50916fac54ec3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 13:35:36 2010 -0400
+
+ Use templates for const char * casts
+
+ src/hb-open-file-private.hh | 12 ++++----
+ src/hb-open-type-private.hh | 48
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-common-private.hh | 2 +-
+ src/hb-ot-layout-gpos-private.hh | 32 +++++++++++-----------
+ src/hb-ot-layout-gsub-private.hh | 4 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 14 +++++-----
+ 6 files changed, 56 insertions(+), 56 deletions(-)
+
+commit 1922ffe7013c46014803a9f18c42e193a25b1968
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 04:19:51 2010 -0400
+
+ Const correctness
+
+ src/hb-ot-layout-gsub-private.hh | 4 ++--
+ src/hb-ot-layout-gsubgpos-private.hh | 30
+ +++++++++++++++---------------
+ 2 files changed, 17 insertions(+), 17 deletions(-)
+
+commit e032ed9f75d4a0f365649a25706871bbb5ae6651
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 03:11:46 2010 -0400
+
+ Use templates for defining int typess
+
+ src/hb-open-type-private.hh | 66
+ ++++++++++++++++++++++++++++--------------
+ src/hb-private.h | 10 +-----
+ 2 files changed, 46 insertions(+), 30 deletions(-)
+
+commit 2c9fd2adce5a6a9dcd62c874bd64613ea68d8d9b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 02:15:39 2010 -0400
+
+ Remove unused macro
+
+ src/hb-open-type-private.hh | 15 ---------------
+ 1 files changed, 0 insertions(+), 15 deletions(-)
+
+commit 7a52f281178867379adb6e6c6fb0022102f75d17
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 02:14:44 2010 -0400
+
+ Rename macros
+
+ src/hb-open-type-private.hh | 6 +++---
+ src/hb-private.h | 30 +++++++++++++++---------------
+ 2 files changed, 18 insertions(+), 18 deletions(-)
+
+commit ffff7dc44cb2a35a60f92831165e9d3c3a61ce19
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 02:13:55 2010 -0400
+
+ Minor
+
+ src/hb-private.h | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+commit f60f2166c48d07f556ff83f04e95181946eb03df
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 02:12:45 2010 -0400
+
+ Move macros around
+
+ src/hb-private.h | 122
+ +++++++++++++++++++++++++++--------------------------
+ 1 files changed, 62 insertions(+), 60 deletions(-)
+
+commit 649a4344ca363da3d44cdd908350449ec40ed0f9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 02:11:59 2010 -0400
+
+ Remove unused macros
+
+ src/hb-private.h | 7 -------
+ 1 files changed, 0 insertions(+), 7 deletions(-)
+
+commit eba8b4f644701cc6b78b0fcb4e932dce15561598
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Mar 29 00:04:12 2010 -0400
+
+ GNOME Bug 613015 - [HB] Does not sanitize Device tables referenced
+ from ValueRecords
+
+ src/hb-ot-layout-gpos-private.hh | 47
+ +++++++++++++++++++++++++++++---------
+ 1 files changed, 36 insertions(+), 11 deletions(-)
+
+commit 673a4efcbc72a62105a24d9b0b54047417160f7d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 02:02:57 2010 -0400
+
+ WIP
+
+ src/hb-ot-layout-gpos-private.hh | 102
+ ++++++++++++++++++++++++++++++--------
+ 1 files changed, 81 insertions(+), 21 deletions(-)
+
+commit 40d73bc68dd828cf68f90fde0f9499a6ce9fbb19
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 00:49:40 2010 -0400
+
+ Improve comments
+
+ src/hb-open-type-private.hh | 22 ++++++++++++++--------
+ 1 files changed, 14 insertions(+), 8 deletions(-)
+
+commit 394bad41a76f90e441e327cef76efb99997e9ae0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 00:40:50 2010 -0400
+
+ Remove stale TODO item
+
+ src/hb-open-type-private.hh | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 9d3677899f90abdc7fb3e3d854db654a8707a84b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 00:32:47 2010 -0400
+
+ Use a function template instead of struct template for Null
+
+ src/hb-open-type-private.hh | 24 ++++++++++--------------
+ 1 files changed, 10 insertions(+), 14 deletions(-)
+
+commit ffd321afd91429c5de7ab03d71ef1030044f53cb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 21 00:14:12 2010 -0400
+
+ Simplify Tag struct
+
+ src/hb-open-file-private.hh | 3 ++-
+ src/hb-open-type-private.hh | 6 +-----
+ src/hb-ot-layout-common-private.hh | 3 ++-
+ 3 files changed, 5 insertions(+), 7 deletions(-)
+
+commit 00e23fcc6fd0eee5c582251bf3de6a2703fbbd3e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 20 23:50:45 2010 -0400
+
+ Cosmetic
+
+ src/hb-open-type-private.hh | 8 ++++----
+ src/hb-ot-layout-common-private.hh | 6 +++---
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+commit a87072db5d41e25b2e31191545298bca4838c65c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 20 15:52:47 2010 -0400
+
+ Fix Class operator return type
+
+ src/hb-ot-layout-common-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f9b37727985191c9b4aedb0e9835736027e59260
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 20 15:51:53 2010 -0400
+
+ Add couple consts to operators
+
+ src/hb-open-type-private.hh | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 53d237ec6352d7c6fab3b2805b48154a25506beb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Apr 20 15:25:27 2010 -0400
+
+ Remove ASSERT_SIZE_DATA
+
+ src/hb-open-type-private.hh | 4 ----
+ src/hb-ot-layout-common-private.hh | 9 ++++++---
+ 2 files changed, 6 insertions(+), 7 deletions(-)
+
+commit 06558d2a745b8f3af11a8d6dce956ae52187a7e5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 19 02:34:10 2010 -0400
+
+ Round instead of trunc
+
+ src/hb-ot-layout-gpos-private.hh | 20 ++++++++++----------
+ src/hb-private.h | 2 +-
+ 2 files changed, 11 insertions(+), 11 deletions(-)
+
+commit 0e206de98621ed8a55824b42e9e6bf320f4c6cc8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 19 02:29:04 2010 -0400
+
+ Fix warnings
+
+ src/hb-open-type-private.hh | 2 +-
+ src/hb-ot-layout-gdef-private.hh | 2 +-
+ src/hb-ot-layout-gpos-private.hh | 4 ++--
+ src/hb-ot-layout-gsubgpos-private.hh | 6 +++---
+ 4 files changed, 7 insertions(+), 7 deletions(-)
+
+commit d5943407a4251cb947fbfc130c0facb2f6216bd6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Apr 19 02:27:56 2010 -0400
+
+ Fix debug build
+
+ src/hb-open-type-private.hh | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 12b27ed91de0192deee4e9feffcaf4aca4c78113
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Mar 27 17:00:19 2010 -0400
+
+ Fix leak when duplicating blob
+
+ src/hb-blob.c | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 4b8487d83e0c10076a6c573cb3487790ce366607
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Mar 16 03:46:17 2010 -0400
+
+ Fix the mystery bug!
+
+ A couple bugs joined forces to exhibit the mystery behavior of
+ crashes / infinite loops on OS X / wrong kerning / invalid memory
+ access. Pooh!
+
+ The bugs were involved:
+
+ - Wrong pointer math with ValueRecord in PairPosFormat1
+
+ - Fallout from avoiding flex arrays, code not correctly updated
+ to remove sizeof() usage.
+
+ We strictly never use sizeof() directly now. And the PairPos code
+ is cleaned up. Should fix them all. Bugs are:
+
+ Bug 605655 - Pango 1.26.2 introduces kerning bug
+ Bug 611229 - Pango reads from uninitialized memory
+ Bug 593240 - (pangoosx) Crash / infinite loop with Mac OS X
+
+ We were also doing wrong math converting Device adjustments to
+ hb_position_t. Fallout from FreeType days. Should shift 16, not
+ 6. Fixed that too.
+
+ There's still another bug: we don't sanitize Device records
+ referenced from value records. Fixing that also.
+
+ src/hb-open-file-private.hh | 4 ++-
+ src/hb-open-type-private.hh | 11 +++++----
+ src/hb-ot-layout-common-private.hh | 10 +++++++-
+ src/hb-ot-layout-gpos-private.hh | 37
+ +++++++++++++++++++--------------
+ src/hb-ot-layout-gsubgpos-private.hh | 15 +++++++------
+ 5 files changed, 46 insertions(+), 31 deletions(-)
+
+commit 9b39755d104603d1163738f77637cc1923d4055b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 15 14:00:25 2010 -0400
+
+ Typo
+
+ src/hb-open-type-private.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit f85ec1c7da36d2c2c9b1c94a988563697dcc79c9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Mar 10 04:14:40 2010 -0500
+
+ Cosmetic
+
+ src/hb-open-type-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e48ed72230a83499dabbd02af2ac63340220a353
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Mar 1 22:33:45 2010 -0500
+
+ [ft] Check stream->read instead of stream->base
+
+ The former is more robust. See discussion on freetype-devel.
+
+ src/hb-ft.c | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 917c227500305aee543981ad24a39f868c5ca0b7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Feb 23 16:47:51 2010 -0500
+
+ Make blob unlocking 64bit-safe
+
+ GNOME Bug 604128 - Applications crash when displaying Hebrew
+ characters
+
+ src/hb-blob.c | 14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+commit ecd2e996d2137fef30011a41dd57ea45f9a796de
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Feb 23 02:42:00 2010 -0500
+
+ Improve the alignment for NullPool
+
+ src/hb-open-type-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit bc7830e4259755ce7549025c6f5bf750e78c2ff1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Feb 17 15:14:57 2010 -0500
+
+ Use __attribute__((unused)) only with gcc 4 and later
+
+ See discussion at:
+ https://bugzilla.gnome.org/show_bug.cgi?id=610183
+
+ src/hb-private.h | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+commit 555d11273ee4c30e84eda3a78ffadb3ee7da65d0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jan 26 12:58:59 2010 -0500
+
+ [GDEF] Fix bug in building synthetic GDEF
+
+ src/hb-ot-layout.cc | 5 +++--
+ src/hb-ot-layout.h | 1 -
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 70834d89c30a56fcd78825fbc28fc9c6bec31124
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jan 26 12:17:37 2010 -0500
+
+ [TODO] Add kern/GPOS interaction
+
+ TODO | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit cd11a98fa1426e9dbc4b61e702913b23a4794ae2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Dec 20 23:05:02 2009 +0100
+
+ Fix compile with older FreeType
+
+ configure.ac | 7 +++++++
+ src/hb-ft.c | 2 ++
+ 2 files changed, 9 insertions(+), 0 deletions(-)
+
+commit 7f7448a354c43650348b4e91b4e40ecf18718d66
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Dec 20 21:42:14 2009 +0100
+
+ Indent
+
+ src/hb-ot-layout-gpos-private.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit e70f45eb522bcb41388cc218b79bbd6aaecf8050
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Dec 20 21:26:24 2009 +0100
+
+ Revert "Fallback to 'kern' if no GPOS applied"
+
+ This reverts commit d740c8f78bcbe80a8bcd8a9468830a406da37cc0.
+
+ The change is wrong. If there is a GPOS table, we should not use
+ 'kern'.
+
+ src/hb-ot-shape.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit d740c8f78bcbe80a8bcd8a9468830a406da37cc0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Dec 20 21:23:56 2009 +0100
+
+ Fallback to 'kern' if no GPOS applied
+
+ src/hb-ot-shape.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 2f78c17197892b2bdc2f64caeb1c1c806ef44545
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Dec 20 21:03:11 2009 +0100
+
+ Remove glibism!
+
+ src/hb-ot-shape-private.h | 4 ++--
+ src/hb-ot-shape.c | 4 ++--
+ src/hb-shape.c | 4 ++--
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 907e67da13b5ed719362702138703fe2f90e790d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Dec 20 20:59:51 2009 +0100
+
+ Oops, add file.
+
+ src/hb-ot-shape-private.h | 53
+ +++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 53 insertions(+), 0 deletions(-)
+
+commit 2014b8d110231b13e524008282ece7451f1ae9e7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Dec 20 20:58:26 2009 +0100
+
+ Hook OpenType shaping up
+
+ Default features only for now.
+
+ src/Makefile.am | 2 +
+ src/hb-ot-layout.cc | 28 +++++++++
+ src/hb-ot-layout.h | 7 ++
+ src/hb-ot-shape.c | 165
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-shape.c | 8 +-
+ 5 files changed, 206 insertions(+), 4 deletions(-)
+
+commit 196610ba4c7071c2b802d0fc921a63cbc0753114
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Dec 20 19:01:14 2009 +0100
+
+ Pass features down
+
+ src/hb-shape.c | 49 +++++++++++++++++++++++++++++++++----------------
+ 1 files changed, 33 insertions(+), 16 deletions(-)
+
+commit 51f141a7f38a73f671b23f58cadf97a72c43b625
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Dec 20 18:22:28 2009 +0100
+
+ Avoid overflow
+
+ src/hb-shape.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 26d7a75752631b2596a5bcb7e645b34cc3d139ab
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Dec 20 17:58:25 2009 +0100
+
+ Refactor hb_shape a bit
+
+ src/hb-shape.c | 87
+ +++++++++++++++++++++++++++++++++++++++++++++++--------
+ 1 files changed, 74 insertions(+), 13 deletions(-)
+
+commit 001fc2d2aa22f14302739fe4ca45f7535855e0fb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Dec 20 17:24:05 2009 +0100
+
+ Add TrueType kern support
+
+ src/hb-shape.c | 74
+ ++++++++++++++++++++++++++++++++++++-------------------
+ 1 files changed, 48 insertions(+), 26 deletions(-)
+
+commit 2c1b85cf66e5ecb7521b6018b76f0e161fb68967
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Dec 20 16:29:17 2009 +0100
+
+ Direct unicode->get_mirroring directly
+
+ src/hb-shape.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 6a2ef5aa5459def232708af30ef8a484906b868b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Dec 20 16:28:01 2009 +0100
+
+ Do mirroring
+
+ src/hb-shape.c | 18 +++++++++++++++++-
+ 1 files changed, 17 insertions(+), 1 deletions(-)
+
+commit 0465e69832393cc1ed36508ec5d597fbab64877a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Dec 20 16:25:18 2009 +0100
+
+ Protect against NULL funcs
+
+ src/hb-buffer.c | 3 +++
+ src/hb-font.cc | 3 +++
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 5ceefa1d8dbd310570ea8d1c47107fe8d3dc96d9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Dec 20 15:29:16 2009 +0100
+
+ Add hb_unicode_get_*() functions
+
+ src/hb-unicode.c | 37 +++++++++++++++++++++++++++++++++++++
+ src/hb-unicode.h | 21 +++++++++++++++++++++
+ 2 files changed, 58 insertions(+), 0 deletions(-)
+
+commit b8a53e44ce05911ce98b7cff34dee165e19d87ba
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Dec 20 14:56:25 2009 +0100
+
+ We'll have to link to libstdc++ if linking to ICU, so disable test
+ for now
+
+ We have to get rid of the ICU in main lib. Still thinking about
+ best way
+ to do it.
+
+ src/Makefile.am | 9 ++++++---
+ 1 files changed, 6 insertions(+), 3 deletions(-)
+
+commit 314905d7548d5be58354546d660754b807b6efb2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Dec 20 14:50:42 2009 +0100
+
+ Explicitly track whether the buffer has positions
+
+ src/hb-buffer-private.h | 3 ++-
+ src/hb-buffer.c | 27 ++++++++++++++-------------
+ 2 files changed, 16 insertions(+), 14 deletions(-)
+
+commit 314b460d8a02ed4b2789ff527cf6c9bc19769114
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Dec 20 13:58:50 2009 +0100
+
+ Add HB_DIRECTION_IS_FORWARD/BACKWARD
+
+ src/hb-common.h | 2 ++
+ src/hb-shape.c | 3 +--
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+commit bdd0ff5290bae4db65c3fdf95c5728031f13ca84
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Dec 15 04:07:40 2009 -0500
+
+ Make main.cc compile without glib
+
+ src/main.cc | 18 ++++++++++++++++--
+ 1 files changed, 16 insertions(+), 2 deletions(-)
+
+commit 8a7d16808200f4fa02d6d12a8b8492bdedeb2c24
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Dec 15 03:53:45 2009 -0500
+
+ Distribute autogen.sh
+
+ Makefile.am | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 807b8aa486753474e05e09f4fcca8ac94021b97c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 19 20:28:03 2009 -0500
+
+ Another C++ strictness fix
+
+ Pango Bug 602408 - Invalid C++ code breaks compile with Sun C++
+ Compiler
+ (Error: A union member cannot have a user-defined assignment operator)
+
+ According to the bug:
+
+ C++ Programming Language by Bjarne Stroustrup: Chapter 10.4.12 forbids
+ explicitly using of union members with constructors, destructors
+ or assignment
+ operations.
+
+ So we use a set() method instead of the assignment operator. Ugly,
+ but hey,
+ that's life.
+
+ src/hb-open-type-private.hh | 8 ++++----
+ src/hb-ot-layout-common-private.hh | 2 +-
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 8b9b866d3e495c186f0530fcf4e00ffcdc170d3f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 19 20:27:57 2009 -0500
+
+ Fix warning
+
+ src/hb-ot-layout-gdef-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit c65b26acf28bd1a5b346fd8f6f28bec1f7d17a2a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 18 11:27:33 2009 -0500
+
+ Use autoconf FLEXIBLE_ARRAY_MEMBER when available
+
+ configure.ac | 2 ++
+ src/hb-ot-layout-gpos-private.hh | 4 ++--
+ src/hb-private.h | 13 ++++++++++---
+ 3 files changed, 14 insertions(+), 5 deletions(-)
+
+commit d33f674cb793af40f1612df3660b138383f2de95
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 18 09:47:44 2009 -0500
+
+ Add Mongolian variation selectors
+
+ src/hb-shape.c | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit d6387757de2c27867d6f57c4ee7c4ef436b3a74f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 11 17:15:03 2009 -0500
+
+ Fix sanitize
+
+ src/hb-ot-layout-common-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 636f017e387d46d4083c9f9ee57647a94dc5dc6d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 10 12:56:35 2009 -0500
+
+ Remove obsolete TODO item
+
+ src/hb-open-file-private.hh | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit bf2b25dd8591e92f3944c763641b613a70c379a7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 6 19:52:47 2009 -0500
+
+ Remove done item
+
+ src/hb-shape.c | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 4a8605315901e0ff1e6e09437a92dd5ac39164cc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 6 19:52:01 2009 -0500
+
+ Reverse buffer at the end if RTL
+
+ src/hb-shape.c | 12 ++++++++----
+ 1 files changed, 8 insertions(+), 4 deletions(-)
+
+commit ff44f88df2c46920f3ec2384ef321a4c7bb0f6ef
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 6 19:48:16 2009 -0500
+
+ Handle shaping in non-native direction
+
+ src/hb-buffer-private.h | 1 +
+ src/hb-buffer.c | 42 +++++++++++++++++--
+ src/hb-buffer.h | 10 +---
+ src/hb-common.h | 11 +++++
+ src/hb-shape.c | 38 ++++++++++++++++-
+ src/hb-unicode-private.h | 5 ++
+ src/hb-unicode.c | 103
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ 7 files changed, 196 insertions(+), 14 deletions(-)
+
+commit b4b4272c8d19ba3e0cb8f12b3b7d1590349e3d14
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 6 17:46:33 2009 -0500
+
+ Oops, wrong change
+
+ src/hb-ot-layout.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 52ea47767c7c35650ebddfba6ddc8203a3e33d3a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 6 17:45:38 2009 -0500
+
+ Change order of font and face for API consistency
+
+ src/hb-ot-layout.cc | 14 +++++++-------
+ src/hb-ot-layout.h | 14 +++++++-------
+ 2 files changed, 14 insertions(+), 14 deletions(-)
+
+commit f4f1fc970b3e37d9903cbf5e05bbd38be4df3047
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 6 17:42:38 2009 -0500
+
+ Remove debug info that crept in
+
+ src/hb-ot-layout.cc | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit aa196d6026b496ec70be3d3588cc8cd2b8ccdb36
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 6 17:23:31 2009 -0500
+
+ [GSUB] More ligature/component fixing
+
+ We can only reuse the ligid if it belongs to a previous ligature,
+ not a
+ component!
+
+ src/hb-ot-layout-gsub-private.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 25e7ef704633447f109b148620336c42d6fb310e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 6 17:21:01 2009 -0500
+
+ Add _hb_buffer_add_output_glyphs() that takes codepoint_t*
+
+ src/hb-buffer-private.h | 10 +++++++-
+ src/hb-buffer.c | 45
+ ++++++++++++++++++++++++++++++++++++-
+ src/hb-ot-layout-gsub-private.hh | 16 ++++++------
+ 3 files changed, 60 insertions(+), 11 deletions(-)
+
+commit 9db8ad75317d589807e7725455f49cafece58d5d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 6 16:47:31 2009 -0500
+
+ Add hb_ot_layout_position_finish()
+
+ We expect buffer to be setup with default positions before GPOS.
+
+ src/hb-buffer-private.h | 6 +---
+ src/hb-buffer.h | 11 +-------
+ src/hb-ot-layout-gpos-private.hh | 8 +++---
+ src/hb-ot-layout.cc | 52
+ ++++++++++++++++++++++++++++++++++++++
+ src/hb-ot-layout.h | 16 ++++++++---
+ 5 files changed, 69 insertions(+), 24 deletions(-)
+
+commit edb54e9aeca25f4120a69ed3d5562cbb68fdb348
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 6 15:19:22 2009 -0500
+
+ Fix FT_Face finalizer call
+
+ src/hb-ft.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3d14528b8b2e7da425a9df7057fc9fb326d8298c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 6 15:13:17 2009 -0500
+
+ Rename hb_buffer_get_len() to hb_buffer_get_length()
+
+ src/hb-buffer.c | 2 +-
+ src/hb-buffer.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 1ff7775051559a8ca442be3938450c7ed3817806
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Nov 6 13:52:57 2009 -0500
+
+ Minor.
+
+ src/hb-shape.c | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 3648bdf5b221adfe01ad99714de420b49964921e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 20:17:53 2009 -0500
+
+ Fix FT_Face generic finalizer
+
+ src/hb-ft.c | 10 ++++++++--
+ 1 files changed, 8 insertions(+), 2 deletions(-)
+
+commit 5a11c875d8c95d480e6f32b57e969ee34ca1940d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 20:08:17 2009 -0500
+
+ Cosmetic
+
+ src/hb-blob.c | 10 ++++++----
+ 1 files changed, 6 insertions(+), 4 deletions(-)
+
+commit 44533e773f75b9a1171d884fcbe91a2f3879e2d8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 19:58:02 2009 -0500
+
+ Fix warning
+
+ src/hb-object-private.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit bcc0406a525ca3fe597aec5f2a97e5c50965d49c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 19:54:23 2009 -0500
+
+ include errno.h
+
+ src/hb-blob.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 799b3c375ad0e1293fd37a0e3a0d422a3166dcd8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 19:37:58 2009 -0500
+
+ Add debugging to object lifecycle
+
+ src/hb-object-private.h | 18 ++++++++++++++++++
+ 1 files changed, 18 insertions(+), 0 deletions(-)
+
+commit 25edb940ab050545f47a06648e73c192fa213548
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 19:20:06 2009 -0500
+
+ Cosmetic
+
+ src/hb-ft.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 850dc5bb551409bb9bf6113ec2199bb3fb905e43
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 18:26:52 2009 -0500
+
+ Return 0 from get_glyph_nil
+
+ src/hb-font.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 85555a953376ee68a8fcc64485e74d44a353577b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 18:25:56 2009 -0500
+
+ Initialize font->klass
+
+ src/hb-font.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit bcd26bd7b1c96057bf154d7d50a61018d40f0d29
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 18:03:26 2009 -0500
+
+ Add TODO item
+
+ src/hb-ft.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit f4281e0a92a40746fa630fb15b877adaf3ff15b1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 17:58:41 2009 -0500
+
+ Fix ref counting
+
+ src/hb-ft.c | 16 ++++++++--------
+ 1 files changed, 8 insertions(+), 8 deletions(-)
+
+commit 6358ff45ae8cfc0b58b4976619319e3dde43add2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 17:39:16 2009 -0500
+
+ Add hb_ft_face_create_cached
+
+ src/hb-ft.c | 16 ++++++++++++++++
+ src/hb-ft.h | 3 +++
+ 2 files changed, 19 insertions(+), 0 deletions(-)
+
+commit 2027f74b286cabe3c60c275170c4f4b437a30f55
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 16:34:47 2009 -0500
+
+ Add default positioning to hb-shape
+
+ src/hb-shape.c | 28 ++++++++++++++++++++++++----
+ 1 files changed, 24 insertions(+), 4 deletions(-)
+
+commit c3f9f7e59d865f8664862b7ca99d9a3a9221e456
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 16:16:14 2009 -0500
+
+ Fix MarkMark issue with ligid and components
+
+ src/hb-ot-layout-gpos-private.hh | 11 ++++++-----
+ src/hb-ot-layout-gsub-private.hh | 6 +-----
+ 2 files changed, 7 insertions(+), 10 deletions(-)
+
+commit d0351314cd29fbdf0efb5c7f89a569648f7a7fc7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 16:16:06 2009 -0500
+
+ Include stdio.h if debugging
+
+ src/hb-blob.c | 4 ++++
+ src/hb-open-type-private.hh | 1 +
+ src/hb-ot-layout-gsubgpos-private.hh | 1 +
+ 3 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 2e336692913405976392bf505028481a5caa53b4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 13:55:41 2009 -0500
+
+ Add hb_font_get_*
+
+ src/hb-font.cc | 35 +++++++++++++++++++++++++++++++++++
+ src/hb-font.h | 18 ++++++++++++++++++
+ src/hb-shape.c | 2 +-
+ 3 files changed, 54 insertions(+), 1 deletions(-)
+
+commit 9bef3611f07b45ba8199a4a339c72f49d266216a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 12:20:11 2009 -0500
+
+ Rename [xy]_pos to [xy]_offset since we don't accumulate positions
+
+ src/hb-buffer-private.h | 4 +-
+ src/hb-buffer.h | 4 +-
+ src/hb-font.h | 4 +-
+ src/hb-ft.c | 10 ++++----
+ src/hb-ot-layout-gpos-private.hh | 40
+ +++++++++++--------------------------
+ src/hb-shape.c | 14 ++++++------
+ src/hb-shape.h | 4 +-
+ 7 files changed, 32 insertions(+), 48 deletions(-)
+
+commit 2daa47e9cdbfb027f76765301b3a78950e92eb09
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Nov 5 12:08:34 2009 -0500
+
+ Cosmetic
+
+ src/hb-shape.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 2f50d873680ce0a43b6ec79df1ac946b91f31e63
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 21:07:03 2009 -0500
+
+ Start filling hb_shape() in
+
+ src/hb-buffer-private.h | 1 +
+ src/hb-shape.c | 40 +++++++++++++++++++++++++++++++++++++++-
+ 2 files changed, 40 insertions(+), 1 deletions(-)
+
+commit ae070b7d39d03bd8bc1244f687b24db505f4af3f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 20:29:54 2009 -0500
+
+ Add script and language to buffer
+
+ TODO | 1 -
+ src/hb-buffer-private.h | 6 +++---
+ src/hb-buffer.c | 26 ++++++++++++++++++++++++++
+ src/hb-buffer.h | 15 ++++++++++++++-
+ 4 files changed, 43 insertions(+), 5 deletions(-)
+
+commit 8a3511ac6c795226699c2b36e03401ecdf88f5f8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 19:45:39 2009 -0500
+
+ Add hb_language_t as well as language/script conversion to OT tags
+
+ src/Makefile.am | 4 +
+ src/hb-language.c | 113 +++++++++
+ src/hb-language.h | 44 ++++
+ src/hb-ot-layout.cc | 6 +-
+ src/hb-ot-layout.h | 4 +-
+ src/hb-ot-tag.c | 662
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-ot-tag.h | 49 ++++
+ src/hb-ot.h | 1 +
+ src/hb-private.h | 3 +
+ src/hb.h | 1 +
+ 10 files changed, 882 insertions(+), 5 deletions(-)
+
+commit 4591753ad4b5ec0224e3f1befdfe4fc5f6075562
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 18:15:59 2009 -0500
+
+ Define ARRAY_LENGTH
+
+ src/hb-private.h | 15 ++++++++-------
+ 1 files changed, 8 insertions(+), 7 deletions(-)
+
+commit 214ac7c1ff51b397d227832526f882e824cb9ea3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 18:12:32 2009 -0500
+
+ Another one
+
+ src/hb-unicode.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 1e91434569a9e9535ef021ca52b60b2e2af75d19
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 18:12:09 2009 -0500
+
+ Minor
+
+ src/hb-open-type-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 48de3730cdf91b9f6473509e22260a902ccec992
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 16:59:50 2009 -0500
+
+ Fix previous commit, ouch!
+
+ src/hb-open-type-private.hh | 12 ++++++++++++
+ src/hb-ot-layout-common-private.hh | 12 ++++--------
+ src/hb-ot-layout-gdef-private.hh | 12 ++++--------
+ 3 files changed, 20 insertions(+), 16 deletions(-)
+
+commit e21899bc3593aa0d3adf64cee21c5de2ea219783
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 16:36:14 2009 -0500
+
+ Fix array query API
+
+ The array query APIs now all do:
+
+ - Return the total number of items
+ - Take a start_offset, such that individual items can be fetched
+ - The _count IN/OUT variable always has number of items written
+ into the array upon return of the function
+
+ TODO | 1 -
+ src/hb-ot-layout-common-private.hh | 59 ++++++++++++++----------
+ src/hb-ot-layout-gdef-private.hh | 84
+ ++++++++++++++++++++--------------
+ src/hb-ot-layout-gsubgpos-private.hh | 14 +++--
+ src/hb-ot-layout.cc | 40 ++++++++++------
+ src/hb-ot-layout.h | 24 ++++++---
+ 6 files changed, 131 insertions(+), 91 deletions(-)
+
+commit 3b59306b858d31d97be0ea8c64461de1d0d03572
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Nov 4 15:48:32 2009 -0500
+
+ Finish FT glue. Rough and untested
+
+ src/hb-font.cc | 2 +-
+ src/hb-font.h | 2 +-
+ src/hb-ft.c | 114
+ ++++++++++++++++++++++++++++++--------------------------
+ 3 files changed, 63 insertions(+), 55 deletions(-)
+
+commit f8be443aecd54b479470e6559b1dfbc8f33c5f55
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 20:28:27 2009 -0500
+
+ Add TODO item
+
+ TODO | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 7951279b4a52b48f13631e7838dbc180c7249ea4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 20:27:05 2009 -0500
+
+ Implement nil font functions
+
+ TODO | 1 +
+ src/hb-font-private.h | 8 ++--
+ src/hb-font.cc | 72
+ +++++++++++++++++++++++++++++++++++--
+ src/hb-font.h | 9 ++---
+ src/hb-ot-layout-gpos-private.hh | 7 ++--
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ src/hb-private.h | 18 +++++-----
+ 7 files changed, 91 insertions(+), 26 deletions(-)
+
+commit 8fb3d1aa4e613cdf965a83bd650c668884c58ad8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 18:34:20 2009 -0500
+
+ Start ft glue
+
+ TODO | 3 -
+ src/Makefile.am | 16 ++++-
+ src/hb-font-private.h | 4 +-
+ src/hb-font.cc | 17 ++++-
+ src/hb-font.h | 6 +-
+ src/hb-ft.c | 192
+ +++++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-ft.h | 52 +++++++++++++
+ src/hb-glib.h | 2 -
+ src/hb-icu.h | 2 -
+ src/hb.h | 4 +-
+ 10 files changed, 281 insertions(+), 17 deletions(-)
+
+commit d94647e2cd187bf4a4c8fb1c0c15c3d23c1293ac
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 16:35:10 2009 -0500
+
+ Add ICU glue
+
+ configure.ac | 8 ++-
+ src/Makefile.am | 23 +++++-
+ src/hb-icu.c | 221
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-icu.h | 41 ++++++++++
+ 4 files changed, 288 insertions(+), 5 deletions(-)
+
+commit b7dd4b945b4ec384526439b365a25739bf9cd2df
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 15:21:15 2009 -0500
+
+ Fix hb_be_uint16()
+
+ src/hb-private.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit cd7555eef27cb18857c0c06d2afdaf3a354a3c15
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 15:16:10 2009 -0500
+
+ Namespace MSVC defines in public header
+
+ src/hb-common.h | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 5ebabecef382c3e8b0a2a5657b2c01f7ff37d796
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 15:15:07 2009 -0500
+
+ Move unicode_funcs to buffer
+
+ TODO | 1 -
+ src/hb-buffer-private.h | 12 +++++++++++-
+ src/hb-buffer.c | 47
+ ++++++++++++++++++++++++++++++++++++++---------
+ src/hb-buffer.h | 10 ++++++++++
+ src/hb-font-private.h | 3 ---
+ src/hb-font.cc | 17 -----------------
+ src/hb-font.h | 9 ++++-----
+ 7 files changed, 63 insertions(+), 36 deletions(-)
+
+commit d5a8e46099e363d928b54de104126b1b34ba401c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 15:14:40 2009 -0500
+
+ [Makefile] Install hb-unicode.h
+
+ Separate OT headers also.
+
+ src/Makefile.am | 27 ++++++++++++++++-----------
+ 1 files changed, 16 insertions(+), 11 deletions(-)
+
+commit 63d7a41dd0704a7e89bd2872ad096f470f51866a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 15:14:08 2009 -0500
+
+ [TODO] Add item for fixing buffer error handling
+
+ TODO | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 21d0fce3d5364c91e5582bd530210f03e054d1a4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 14:28:32 2009 -0500
+
+ Add check for not linking to libstdc++
+
+ TODO | 3 +--
+ src/Makefile.am | 4 ++++
+ src/check-libstdc++.sh | 28 ++++++++++++++++++++++++++++
+ 3 files changed, 33 insertions(+), 2 deletions(-)
+
+commit ca95ce460adf2ca6901595d4a6107fd000d90151
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 14:18:33 2009 -0500
+
+ Use the C linker, not C++ linker
+
+ Such that we don't link to libstdc++.
+
+ src/Makefile.am | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit eb4ebda2d10637b966f42a4ed5cfaec46082a050
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 14:09:32 2009 -0500
+
+ [configure] Fix check for FreeType
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit cb0e99a5a76136c128faba1c27d7e7eac2f219ee
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 14:09:10 2009 -0500
+
+ [TODO] Remove obsolete item
+
+ TODO | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 3a59ec37c5576b711c7c36dcfa2a63f6c00a3f5c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 11:36:06 2009 -0500
+
+ Add bunch of TODO items
+
+ TODO | 15 ++++++++++++---
+ 1 files changed, 12 insertions(+), 3 deletions(-)
+
+commit ffbe0a853d5e7defa85d0eef53814c22d1ecb412
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 10:52:45 2009 -0500
+
+ More MSVC fixes from Jonathan Kew
+
+ src/hb-common.h | 7 ++++++-
+ src/hb-private.h | 5 +++++
+ 2 files changed, 11 insertions(+), 1 deletions(-)
+
+commit d3480ba37fbb5d4be75b094060f5b2f1ce98fb53
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Nov 3 10:47:29 2009 -0500
+
+ Don't use zero-sized arrays
+
+ It's not part of the standard and MSVC doesn't like it. It makes
+ the code
+ a lot less elegant than it used to be, but I think it should work now.
+
+ src/hb-open-file-private.hh | 4 +-
+ src/hb-open-type-private.hh | 36 ++++++++++------
+ src/hb-ot-layout-common-private.hh | 33 ++++++++-------
+ src/hb-ot-layout-gdef-private.hh | 14 +++----
+ src/hb-ot-layout-gpos-private.hh | 76
+ +++++++++++++--------------------
+ src/hb-ot-layout-gsub-private.hh | 44 ++++++++------------
+ src/hb-ot-layout-gsubgpos-private.hh | 47 ++++++++++-----------
+ src/hb-private.h | 5 ++
+ 8 files changed, 122 insertions(+), 137 deletions(-)
+
+commit 6bec81aa3a58b8be255568b2ea63b7854e1b0ea7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 19:17:36 2009 -0500
+
+ Cosmetic
+
+ src/hb-ot-layout-common-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f94cf6b969281cf8a7f701ff26ea4f134ff9746e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 18:55:19 2009 -0500
+
+ Another try at build without glib
+
+ configure.ac | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+commit 2f3e69f3cb7e571cc62b0840d0b3f2072b29345a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 18:53:15 2009 -0500
+
+ Fix build without glib, again
+
+ src/Makefile.am | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit d03f81865914b40e941bf680557c0d8f98e30ad5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 18:52:21 2009 -0500
+
+ Disable configure cache
+
+ autogen.sh | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit a6451aa626fa5850d7c3b716bd52126995154e27
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 18:35:12 2009 -0500
+
+ We don't really use gthread directly
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 63a792a811e0ad69d05e8805d4f347bd533db4c3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 18:33:52 2009 -0500
+
+ Update Makefile to build without glib
+
+ src/Makefile.am | 12 +++++++++---
+ src/hb-glib.c | 2 ++
+ 2 files changed, 11 insertions(+), 3 deletions(-)
+
+commit 68a2c771e2b923461a552bf3673e9e8245e1bfea
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 18:31:53 2009 -0500
+
+ Build without glib
+
+ Thready-safety disabled in that case, until we add support for
+ pthread, etc.
+ Fun...
+
+ src/hb-private.h | 19 +++++++++++++++++--
+ 1 files changed, 17 insertions(+), 2 deletions(-)
+
+commit cc4c096a7e08ae96b3030fe27f871ce5b797f370
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 18:13:17 2009 -0500
+
+ MSVC has no stdint.h
+
+ src/hb-common.h | 13 +++++++++++++
+ 1 files changed, 13 insertions(+), 0 deletions(-)
+
+commit 9a204c7ab57ca0a866c72e1431c54a8883b15605
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 18:11:55 2009 -0500
+
+ Remove use of GINT16_FROM_BE
+
+ src/hb-private.h | 10 ++--------
+ 1 files changed, 2 insertions(+), 8 deletions(-)
+
+commit 1f0ceeb8cf2fad0a0dfd338ce1472470a81789d4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 16:28:39 2009 -0500
+
+ Install library
+
+ autogen.sh | 2 +-
+ src/Makefile.am | 5 ++---
+ 2 files changed, 3 insertions(+), 4 deletions(-)
+
+commit 5932f8f7c3b73ade3752020351fa8b6a9a3bf500
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 16:38:41 2009 -0500
+
+ Generate ChangeLog
+
+ Makefile.am | 39 +++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 39 insertions(+), 0 deletions(-)
+
+commit 29aa40018301a4f138cd5e73463079c7704bf3ac
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 16:28:39 2009 -0500
+
+ Add build system
+
+ COPYING | 17 +++++
+ Makefile.am | 3 +
+ README | 9 +++
+ TODO | 6 ++
+ autogen.sh | 189
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ configure.ac | 40 ++++++++++++
+ git.mk | 184
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ harfbuzz.pc.in | 11 +++
+ src/.gitignore | 1 -
+ src/COPYING | 17 -----
+ src/Makefile.ng | 11 ---
+ src/README | 9 ---
+ src/TODO | 6 --
+ 13 files changed, 459 insertions(+), 44 deletions(-)
+
+commit c09ed9801ead002d6f8e507ce664b83707b202e9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 29 03:08:42 2009 -0400
+
+ [HB] Add glyph_metrics typedef
+
+ src/hb-font.h | 9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+commit 91b1e03e0312be2a7a165308239b40449e3ab360
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 29 03:05:18 2009 -0400
+
+ [HB] Add point_index to get_contour_point()
+
+ Pointed out by Keith Stribley on HarfBuzz list.
+
+ src/hb-font.h | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit aa87d951739f6beacb66daa235cd033fdcfcadd7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 29 03:00:44 2009 -0400
+
+ [HB] Fix lookup_flag ignoring
+
+ Reported by Keith Stribley on HarfBuzz list.
+
+ src/hb-ot-layout-common-private.hh | 1 +
+ src/hb-ot-layout.cc | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 52e9a71d578c5171bbb0f4bfc1b70841c3270328
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 21 13:58:56 2009 -0400
+
+ [HB] Add comment
+
+ src/hb-ot-layout-gsubgpos-private.hh | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit f9c0a2dad09cd168fb28cdee09b4303f307ea56d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 21 13:43:54 2009 -0400
+
+ [HB] Fix apply_lookup() loop
+
+ Part of Bug 595539 - Regressions in rendering certain Thai sequences
+ with
+ OpenType font
+
+ src/hb-ot-layout-gsubgpos-private.hh | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit c0ab43c05833e8fc06d770a89370bec58a627e74
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Sep 21 13:40:38 2009 -0400
+
+ [HB] Fix bug in chain_context_lookup() invocations
+
+ Part of Bug 595539 - Regressions in rendering certain Thai sequences
+ with
+ OpenType font
+
+ src/hb-ot-layout-gsubgpos-private.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit e6bd4e93bd5722249ab977dfa98bdc8eb765318c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 30 21:02:28 2009 -0400
+
+ [HB] Add TODO item
+
+ src/TODO | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 3e2401f6c53d2b047954d75c37aef5e5e7cdc51a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 28 17:17:11 2009 -0400
+
+ [HB] Rename DEBUG to TRACE where appropriate
+
+ src/hb-open-file-private.hh | 8 ++--
+ src/hb-open-type-private.hh | 50 +++++++++---------
+ src/hb-ot-layout-common-private.hh | 32 ++++++------
+ src/hb-ot-layout-gdef-private.hh | 20 ++++----
+ src/hb-ot-layout-gpos-private.hh | 92
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-private.hh | 72 +++++++++++++-------------
+ src/hb-ot-layout-gsubgpos-private.hh | 78 ++++++++++++++--------------
+ 7 files changed, 176 insertions(+), 176 deletions(-)
+
+commit 0535b50f436f3dac85e6df1761957f86c2bd7213
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 28 17:14:33 2009 -0400
+
+ [HB] Add GSUB/GPOS tracing
+
+ src/hb-ot-layout-gpos-private.hh | 29 ++++++++++++++++++--
+ src/hb-ot-layout-gsub-private.hh | 28 +++++++++++++++++--
+ src/hb-ot-layout-gsubgpos-private.hh | 49
+ ++++++++++++++++++++++++++++++++-
+ 3 files changed, 98 insertions(+), 8 deletions(-)
+
+commit 95e202403ffa543c817f45cca21fbc116eb8e807
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 28 16:31:20 2009 -0400
+
+ [HB] Allow enabling different debug facilities individually
+
+ src/hb-blob.c | 28 ++++++++++++++++------------
+ src/hb-open-type-private.hh | 32 ++++++++++++++++++--------------
+ 2 files changed, 34 insertions(+), 26 deletions(-)
+
+commit 37006bd1bd107ac1a1c1b131579e9c494ba3a20f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 28 09:46:14 2009 -0400
+
+ Fix stupid array growing bug
+
+ src/hb-ot-layout.cc | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 9897749113f76dc26a83bfae8de62e55d384fcad
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 27 01:32:17 2009 -0400
+
+ [HB] Simplify counting
+
+ src/hb-ot-layout.cc | 9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+commit 81a5c4df94e7c6066314d5fe75bbaf24483bc022
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 27 00:21:04 2009 -0400
+
+ [HB] Indent
+
+ src/hb-blob.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit c91facd83b5dc3b9aed75617c7c35585ff18889f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 26 18:53:43 2009 -0400
+
+ [HB] Bug 593231 - < c99 compiler dislikes ValueRecord
+
+ src/hb-ot-layout-gpos-private.hh | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit f0c7540c4e217a7354072365a7301453d1e25b80
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 20 14:01:37 2009 -0400
+
+ Bug 592484 - invalid write in HB
+
+ Fix off-by-one.
+
+ src/hb-ot-layout.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit b614b004723ead60849dd37e7ba2faee67cebd93
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 20 13:07:50 2009 -0400
+
+ [HB][glib] Make glib unicode funcs static
+
+ src/hb-glib.c | 36 +++++++++++++++++-------------------
+ 1 files changed, 17 insertions(+), 19 deletions(-)
+
+commit 8b5346130425c7c101f6ff2432874ba2fd372edc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 19 18:16:50 2009 -0400
+
+ [HB] Fix more casts
+
+ src/hb-open-type-private.hh | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 9d2e02db74deb3b3b92beab96f112cc387c8bd88
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 19 18:07:36 2009 -0400
+
+ [HB] Rename CAIRO_ in macro prefix to HB_
+
+ Hiss!
+
+ src/hb-private.h | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 388ad037ff399c23c5e24bbcede27e0e35bed07e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 19 16:45:41 2009 -0400
+
+ [HB] Remove HB_MEMORY_MODE_READONLY_NEVER_DUPLICATE
+
+ Unlike the rest of the memory-mode enum, this one didn't only
+ describe the access mode of the input memory region. Remove it.
+
+ If someone wants to inhibit duplicating, they can lock the blob
+ and throw away the key.
+
+ Based on mailing list discussion with Carl Worth.
+
+ src/hb-blob.c | 51 +++++++++++++++++++++++++--------------------------
+ src/hb-blob.h | 1 -
+ 2 files changed, 25 insertions(+), 27 deletions(-)
+
+commit 977eeb714454630bd045bb11f58ff6397f10b143
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 19 16:17:24 2009 -0400
+
+ [HB] s/writeable/writable/g
+
+ src/hb-blob.c | 38 +++++++++++++++++++-------------------
+ src/hb-blob.h | 10 +++++-----
+ src/hb-open-type-private.hh | 6 +++---
+ 3 files changed, 27 insertions(+), 27 deletions(-)
+
+commit 2f5931e404cb56e31d24b2eb7ff0a849fb077b55
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 19 16:07:40 2009 -0400
+
+ [HB] Hide lig_id and component members of hb_glyph_info_t
+
+ src/hb-buffer.h | 5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+
+commit 6b600dd6199104cff01b3fa43d2abb52ae4319ea
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 19 14:45:24 2009 -0400
+
+ [HB] Fix typo
+
+ src/hb-font.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 32c65a5ca3bde673bf2aa8fca911dd32914d3122
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 18 18:37:36 2009 -0400
+
+ [HB] Add font funcs prototypes
+
+ src/hb-font-private.h | 2 --
+ src/hb-font.cc | 14 ++++++--------
+ src/hb-font.h | 23 ++++++++++++++++-------
+ 3 files changed, 22 insertions(+), 17 deletions(-)
+
+commit 8f034d5849627ee95a5889fa34c9ba294fff13ca
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 18 16:41:59 2009 -0400
+
+ Fix a few other pedantic warnings
+
+ src/hb-ot-layout-common-private.hh | 2 +-
+ src/hb-ot-layout-gdef-private.hh | 2 +-
+ src/hb-ot-layout-gpos-private.hh | 4 ++--
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 864e2560b627f1e73be3b0635e02f00844cb67c3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 18 16:38:48 2009 -0400
+
+ [HB] Fix pedantic warnings
+
+ src/hb-blob.h | 2 +-
+ src/hb-buffer-private.h | 18 +++++++++---------
+ src/hb-buffer.h | 6 +++---
+ 3 files changed, 13 insertions(+), 13 deletions(-)
+
+commit 3e09722214d9bbcc9014409342072c79d0c4447f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 18 16:32:31 2009 -0400
+
+ [HB] Fix more wrong method signatures
+
+ src/hb-ot-layout-common-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 822e99fe9ae920df41a0bd3f1125495c2ea96b45
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 18 16:27:48 2009 -0400
+
+ [HB] Fix wrong method signature
+
+ src/hb-ot-layout-common-private.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 4ff2a58952f010c6252f06e5f404d6840d257250
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 18 15:49:23 2009 -0400
+
+ Bug 592194 - Fix missing _SC_PAGE_SIZE macro
+
+ Autoconfiscate a simple call to mprotect() even more.
+
+ src/hb-blob.c | 94
+ ++++++++++++++++++++++++++++++++++++--------------------
+ 1 files changed, 60 insertions(+), 34 deletions(-)
+
+commit 3c69bd46e27069fac0bfdefdecf5492c17eb01df
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 17 16:48:13 2009 -0400
+
+ [HB] Avoid int overflow in GPOS
+
+ Bug 592036 - integer overflow bug causes misrendering of Nepali
+ characters
+
+ src/hb-ot-layout-gpos-private.hh | 20 ++++++++++----------
+ src/hb-private.h | 3 +++
+ 2 files changed, 13 insertions(+), 10 deletions(-)
+
+commit b2b18ef43c5bac6a5bb8412da7c9a37f815d4deb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 14 19:37:18 2009 -0400
+
+ [HB] Simplify loop
+
+ src/hb-ot-layout-gpos-private.hh | 31 ++++++++++++++-----------------
+ 1 files changed, 14 insertions(+), 17 deletions(-)
+
+commit b41f210d12d8df48e645823463343f7e14b0ddd0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 14 19:33:24 2009 -0400
+
+ [HB] Merge mark positionin code between three types of lookups
+
+ src/hb-ot-layout-gpos-private.hh | 95
+ ++++++++++++--------------------------
+ 1 files changed, 29 insertions(+), 66 deletions(-)
+
+commit cd33cb9ed84308da72bd7c64b9355dc2410c63ec
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 14 18:42:42 2009 -0400
+
+ [HB] More minor shuffling
+
+ src/hb-open-type-private.hh | 3 ---
+ src/hb-ot-layout-common-private.hh | 5 +++++
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+commit 80e2aa2e1bfa2c8ecedcfa4cce8cadeb15792ac3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 14 18:40:56 2009 -0400
+
+ [HB] Move code around
+
+ src/hb-open-type-private.hh | 21 +++++++++++++++++++++
+ src/hb-ot-layout-common-private.hh | 19 -------------------
+ 2 files changed, 21 insertions(+), 19 deletions(-)
+
+commit 3564ee5216004d45d30b0ded61184cf8dde5dd89
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 14 18:32:56 2009 -0400
+
+ [HB] Correctly sanitize LigatureAttach
+
+ src/hb-open-type-private.hh | 14 ++++++++++----
+ src/hb-ot-layout-common-private.hh | 4 ++++
+ src/hb-ot-layout-gdef-private.hh | 4 ++--
+ src/hb-ot-layout-gpos-private.hh | 6 +++---
+ 4 files changed, 19 insertions(+), 9 deletions(-)
+
+commit cb71a2fb76c6ddee050f775eb299ee44230c3ac9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 14 18:14:03 2009 -0400
+
+ [HB] Simplify MarkBase and MarkLig too
+
+ src/hb-ot-layout-gpos-private.hh | 127
+ ++++++++++++++-----------------------
+ 1 files changed, 48 insertions(+), 79 deletions(-)
+
+commit dfa54f4440960c39d37ef02fff4c0d9eb315d4b4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 14 17:53:31 2009 -0400
+
+ [HB] Simplify MarkMark
+
+ src/hb-ot-layout-gpos-private.hh | 29 ++++++++++++++++-------------
+ 1 files changed, 16 insertions(+), 13 deletions(-)
+
+commit 815a73e4202ca17677f12e862b70ca8724cf2f57
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 14 17:31:16 2009 -0400
+
+ [HB] Fix possible int overflows during sanitize
+
+ src/TODO | 1 -
+ src/hb-open-type-private.hh | 22 ++++++++++++++++++++++
+ src/hb-ot-layout-gpos-private.hh | 15 ++++++++-------
+ 3 files changed, 30 insertions(+), 8 deletions(-)
+
+commit ae728e51e94d18d731b7c8dc524da1a4f427d63b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 14 16:41:00 2009 -0400
+
+ [HB] Debug output for SANITIZE_MEM()
+
+ src/hb-open-type-private.hh | 34 +++++++++++++++++++++++-----------
+ 1 files changed, 23 insertions(+), 11 deletions(-)
+
+commit 41895506cb6a41b1a833866f8822261ea449ea0b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 14 16:25:33 2009 -0400
+
+ [HB] Use inline function for SANITIZE_MEM()
+
+ src/hb-open-type-private.hh | 33 ++++++++++++++++++++-------------
+ 1 files changed, 20 insertions(+), 13 deletions(-)
+
+commit 95528131b5ab9fc9e265ace715832135ebd457a4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 14 16:17:32 2009 -0400
+
+ [HB] Use SANITIZE_THIS() when applicable
+
+ src/hb-open-type-private.hh | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 5769538abfe153c503da4801649493e57a9854c2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 14 16:12:22 2009 -0400
+
+ [HB] Add note about auditing sanitize code for overflows
+
+ src/TODO | 1 +
+ src/hb-ot-layout-gpos-private.hh | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 15232e26f4a89dab1b6de35ad9d3d16e75bf93d0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 13 17:13:25 2009 -0400
+
+ [HB] Add empty hb_shape() API
+
+ src/Makefile.am | 2 ++
+ src/hb-shape.c | 40 ++++++++++++++++++++++++++++++++++++++++
+ src/hb-shape.h | 53
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 95 insertions(+), 0 deletions(-)
+
+commit 2866d2974b6768e93cc7d473d14c5a8abae5f7fd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 13 11:47:08 2009 -0400
+
+ [HB] Bitfield packing *is* very delicate
+
+ Fix the second instance.
+
+ src/hb-buffer.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit ec90ee23b29aab187c3fa209970aa97434c84b1b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 13 05:25:23 2009 -0400
+
+ Bug 591511 – hh-blob.c does not compile using mingw on windows
+
+ Check for sys/mman.h, not mprotect().
+
+ src/hb-blob.c | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 12eae6d55d468ff2fbe2bc12bec188d313c671f9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 13 05:20:46 2009 -0400
+
+ [HB] Fix buffer sizing issue with mingw gcc
+
+ Bit field packing is a delicate field. Issue reported in comment
+ 3 here:
+ http://bugzilla.gnome.org/show_bug.cgi?id=591511
+
+ src/hb-buffer-private.h | 14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 6936706cd77f96961a1239d0c9dc8ede64d7f06d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 12 19:45:50 2009 -0400
+
+ Bug 591413 – needs to link with libstdc++
+
+ Enforce -fno-exceptions better.
+
+ src/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit c486ea9c3582710474c1085c21c1dc5e2700adc3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 12 19:36:29 2009 -0400
+
+ Bug 591511 – hb-blob.c does not compile using mingw on windows
+
+ Only call mprotect() when available. For optimal performance, a win32
+ way to make memory writeable needs to be added.
+
+ src/hb-blob.c | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit a579584594f1ca4781f1c5b92ad78513c0b37480
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 12 19:23:16 2009 -0400
+
+ [HB] Add comment
+
+ src/hb-buffer-private.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b6e66ee102eb5b64d945e5a73ab63fe8cac5edcb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 12 16:50:28 2009 -0400
+
+ [HB] Always clear positions if dirty, before returning to user
+
+ src/hb-buffer.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit e4679d9fae43f3219c476c5b9e411d1f5d0d5bae
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 12 16:47:27 2009 -0400
+
+ [HB] Fix _hb_buffer_next() when positioning
+
+ We were copying glyphs to output. This should not happen when in
+ GPOS. Back then it was fine, then some optimizations broke then
+ assumption.
+
+ src/hb-buffer-private.h | 1 +
+ src/hb-buffer.c | 12 ++++++++++++
+ 2 files changed, 13 insertions(+), 0 deletions(-)
+
+commit 5ccf1ba339d6ffb4469f1c4f20d8d8d00012c857
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 12 15:55:23 2009 -0400
+
+ [HB] Fixed signedness warnings
+
+ src/hb-open-type-private.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit f71329147bd3087588cfeafd6feff45f29d1ca7a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 12 15:48:44 2009 -0400
+
+ [HB] Ouch. Fix compilation.
+
+ src/hb-ot-layout-gpos-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0532ed160c678b5404b20594fd2ca9a640bf6a0a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 12 15:40:04 2009 -0400
+
+ [HB] Fix invalid access / overflow on x86-64
+
+ Bug 591557 – [HB] crash scrolling the evolution message list
+ Bug 591576 – crashed with SIGSEGV at pango
+
+ src/hb-ot-layout-gpos-private.hh | 21 ++++++++++++---------
+ src/hb-ot-layout-gsub-private.hh | 2 --
+ 2 files changed, 12 insertions(+), 11 deletions(-)
+
+commit 8d70312c7b899131c3aafa7a43527ef3ced33bfe
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 10 23:50:51 2009 -0400
+
+ [HB] Add hb_font_funcs_make_immutable()
+
+ src/hb-font-private.h | 4 ++++
+ src/hb-font.cc | 17 +++++++++++++++--
+ src/hb-font.h | 3 +++
+ 3 files changed, 22 insertions(+), 2 deletions(-)
+
+commit 3284d05da27c338d94f0da99df66d924cd9d6717
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 10 23:45:57 2009 -0400
+
+ [HB] Add missing initializer
+
+ src/hb-font.cc | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 081819ea8b98c0a4b4dffe8d4aca3512f9798719
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 10 23:40:28 2009 -0400
+
+ [OT] Hookup glib unicode funcs
+
+ src/hb-buffer.c | 14 +++++++-------
+ src/hb-glib.c | 4 +++-
+ src/hb-glib.h | 4 ++--
+ src/hb-ot-layout.cc | 10 +++++-----
+ src/hb-private.h | 2 +-
+ 5 files changed, 18 insertions(+), 16 deletions(-)
+
+commit 49f261df2aa753e8b09e97f7835e6a827f92970a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 10 23:35:05 2009 -0400
+
+ [HB] Add hb-glib
+
+ src/Makefile.am | 4 ++-
+ src/hb-glib.c | 56
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-glib.h | 41 +++++++++++++++++++++++++++++++++
+ src/hb-unicode-private.h | 2 +-
+ src/hb-unicode.c | 10 ++++----
+ src/hb-unicode.h | 6 ++--
+ 6 files changed, 109 insertions(+), 10 deletions(-)
+
+commit eb27ec0cef0d92740875ab5035b53acc639e5fae
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 10 23:25:28 2009 -0400
+
+ [HB] Add hb_unicode_funcs_make_immutable()
+
+ src/hb-unicode-private.h | 2 ++
+ src/hb-unicode.c | 22 +++++++++++++++++-----
+ src/hb-unicode.h | 2 ++
+ 3 files changed, 21 insertions(+), 5 deletions(-)
+
+commit af9e104028b7cdc1fbba0eb1d86cfa4d5258657f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 10 23:21:33 2009 -0400
+
+ [HB] Use nil unicode funcs in nil face
+
+ src/hb-font.cc | 7 ++++---
+ src/hb-unicode-private.h | 3 +++
+ src/hb-unicode.c | 2 +-
+ 3 files changed, 8 insertions(+), 4 deletions(-)
+
+commit 48910f8f0034c54b4e11cef3d08aa40e52c06b28
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 10 23:05:05 2009 -0400
+
+ [HB] Initialize unicode funcs to nil getters
+
+ src/hb-unicode.c | 29 +++++++++++++++++++----------
+ 1 files changed, 19 insertions(+), 10 deletions(-)
+
+commit 04cc0a29ee1472c318c36efcd19b9c1a6657d9ea
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 10 22:58:56 2009 -0400
+
+ [HB] Flesh out Unicode funcs
+
+ src/hb-object-private.h | 2 +-
+ src/hb-unicode-private.h | 12 +++-----
+ src/hb-unicode.c | 67
+ ++++++++++++++++++++++++++++++++++++++++-----
+ src/hb-unicode.h | 3 --
+ 4 files changed, 65 insertions(+), 19 deletions(-)
+
+commit 299f08961ffcea27e8def4f0743d0c86ef8dadf1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 10 22:47:57 2009 -0400
+
+ [HB] Implement buffer UTF-X input
+
+ src/hb-buffer.c | 110
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-buffer.h | 12 +++---
+ 2 files changed, 116 insertions(+), 6 deletions(-)
+
+commit 1b7b97f28ac192006ca5b6d1cc9fbc80fa2bdb55
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 10 21:10:37 2009 -0400
+
+ [HB] Add buffer UTF-X API
+
+ src/hb-buffer.h | 21 +++++++++++++++++++++
+ 1 files changed, 21 insertions(+), 0 deletions(-)
+
+commit fbaf8ffa098bd2b6fb4f4bc2d04b360a319c4af5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 10 20:59:25 2009 -0400
+
+ [HB] Add hb_buffer_reverse()
+
+ src/hb-buffer.c | 32 +++++++++++++++++++++++++++++---
+ src/hb-buffer.h | 7 +++++++
+ 2 files changed, 36 insertions(+), 3 deletions(-)
+
+commit cbe5a4e08e6c2ccfdf98e630d48ec9da69374516
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 10 20:24:49 2009 -0400
+
+ [HB] Reuse the positions array as alt string array
+
+ src/hb-buffer-private.h | 1 -
+ src/hb-buffer.c | 28 +++++++++-------------------
+ 2 files changed, 9 insertions(+), 20 deletions(-)
+
+commit 5c44188455ca1b696aa24b20c3a83877dfae2fb2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 10 20:05:16 2009 -0400
+
+ [HB] Start adding Unicode funcs
+
+ src/Makefile.am | 3 +
+ src/hb-font-private.h | 29 ++-----
+ src/hb-font.cc | 163 +++++++++-------------------------
+ src/hb-font.h | 140 ++++++++++-------------------
+ src/hb-unicode-private.h | 54 +++++++++++
+ src/hb-unicode.c | 89 +++++++++++++++++++
+ src/hb-unicode.h | 220
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ 7 files changed, 463 insertions(+), 235 deletions(-)
+
+commit 20b035dad41247076815a2bbb0346d63058b322f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 10 19:00:36 2009 -0400
+
+ [HB] Put C++ inline's back
+
+ Apparetly in C++, inline means a totally different thing.
+
+ src/hb-open-file-private.hh | 14 +++++++-------
+ src/hb-open-type-private.hh | 16 ++++++++--------
+ src/hb-ot-layout-common-private.hh | 12 ++++++------
+ src/hb-ot-layout-gdef-private.hh | 4 ++--
+ src/hb-ot-layout-gpos-private.hh | 12 ++++++------
+ src/hb-ot-layout-gsub-private.hh | 12 ++++++------
+ src/hb-ot-layout-gsubgpos-private.hh | 12 ++++++------
+ 7 files changed, 41 insertions(+), 41 deletions(-)
+
+commit a62f776d8e7e3e57d28ee71b34abab0a5b8471eb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 10 13:57:02 2009 -0400
+
+ [HB] Don't override CXX compiler
+
+ Just add couple of options to it (still assuming gcc)
+
+ src/Makefile.am | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 6bdab706ecb41c1305e85d041a586e86c54d0ab7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 10 09:35:11 2009 -0400
+
+ [HB] Indent
+
+ src/hb-ot-layout.h | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 797724904a3ab294f8390d4ff80c299d8213a5c6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 9 22:25:17 2009 -0400
+
+ [HB] Remove unused code
+
+ src/hb-ot-layout-gdef-private.hh | 10 ----------
+ 1 files changed, 0 insertions(+), 10 deletions(-)
+
+commit 284899ccbe79fda7405ab09d3092fc25fd89e810
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 9 22:10:39 2009 -0400
+
+ [HB] Add a NEXT() macro
+
+ src/hb-open-type-private.hh | 2 ++
+ src/hb-ot-layout-common-private.hh | 4 ++--
+ src/hb-ot-layout-gsub-private.hh | 8 ++++----
+ src/hb-ot-layout-gsubgpos-private.hh | 24 ++++++++++++------------
+ 4 files changed, 20 insertions(+), 18 deletions(-)
+
+commit 918572fc870dfd7596155ce700247a5bb024fb1a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 9 18:31:47 2009 -0400
+
+ [HB] Remove done TODO item
+
+ src/TODO | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 67cb8111f209de26b3afa46e9fb7e4d01c9ecad4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 9 13:05:08 2009 -0400
+
+ [HB] Print mark sets in main.cc
+
+ src/main.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 17878255fa88e76cd503461fc1ade2ed365cebd2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 8 16:57:27 2009 -0400
+
+ [HB] Remove hb_ot_layout_table_find_feature()
+
+ That function doesn't make much sense as multiple features in the
+ table may
+ have the same tag.
+
+ src/hb-ot-layout.cc | 16 ----------------
+ src/hb-ot-layout.h | 6 ------
+ 2 files changed, 0 insertions(+), 22 deletions(-)
+
+commit 468769b8f5332940278244e744ec2bd5a5dc5ee9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 8 16:53:23 2009 -0400
+
+ [HB] Rename hb_ot_layout_feature_mask_t to hb_mask_t
+
+ src/TODO | 1 -
+ src/hb-buffer-private.h | 4 ++--
+ src/hb-buffer.c | 12 ++++++------
+ src/hb-buffer.h | 4 ++--
+ src/hb-common.h | 1 +
+ src/hb-ot-layout-gpos-private.hh | 12 ++++++------
+ src/hb-ot-layout-gsub-private.hh | 14 +++++++-------
+ src/hb-ot-layout.cc | 18 +++++++++---------
+ src/hb-ot-layout.h | 34
+ +++++++++-------------------------
+ 9 files changed, 42 insertions(+), 58 deletions(-)
+
+commit 7f96b39a9d5a81ba77e0c3dea8fe2cdb9957c4c7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 8 16:37:22 2009 -0400
+
+ [HB] Fix bug introduced recently
+
+ src/hb-open-type-private.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Aug 7 19:46:30 2009 -0400
+
+ [HB] Remove clumsy macros and improve API
+
+ src/TODO | 2 -
+ src/hb-open-file-private.hh | 41 ++++++++--
+ src/hb-open-type-private.hh | 104 +-----------------------
+ src/hb-ot-layout-common-private.hh | 103 ++++++++++++++++++------
+ src/hb-ot-layout-gsubgpos-private.hh | 35 +++++++--
+ src/hb-ot-layout.cc | 146
+ ++++++++++++----------------------
+ src/hb-ot-layout.h | 101 ++++++++++--------------
+ 7 files changed, 240 insertions(+), 292 deletions(-)
+
+commit d0b657379bbe63602953412d6bc944b2a0f430eb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 6 18:34:47 2009 -0400
+
+ [HB] Fix various XXX issues
+
+ src/hb-open-type-private.hh | 13 ++++++++++---
+ src/hb-ot-layout-gdef-private.hh | 5 ++---
+ 2 files changed, 12 insertions(+), 6 deletions(-)
+
+commit 82199868fb036b63799af761762225d45d36f575
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 6 18:28:45 2009 -0400
+
+ [HB] Remove unused var
+
+ src/hb-ot-layout-private.h | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 07e69226cbd4167741fd868a3125487bbabb99dc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 6 18:28:00 2009 -0400
+
+ [HB] Remove another stale XXX
+
+ src/hb-ot-layout.cc | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit e605c367c5627e7ab05af9cb59247a89290e598a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 6 18:27:28 2009 -0400
+
+ [HB] Rebrand XXX as TODO
+
+ src/hb-open-file-private.hh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit c5a13048e21fcfcfd3b74f800e8d521e6245b451
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 6 18:26:38 2009 -0400
+
+ [HB] Remove stale XXX
+
+ src/hb-blob.c | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 9e826ea2832f0444bcef9075b445d481a58a09c2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 6 18:24:55 2009 -0400
+
+ [HB] Fix unaligned access
+
+ src/hb-open-type-private.hh | 20 +++++++++++++++++---
+ src/hb-private.h | 22 ++++++++++++++++++++++
+ 2 files changed, 39 insertions(+), 3 deletions(-)
+
+commit 71a8344a5eeaa34e31d53138cf3bbe30b819f83c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 6 14:28:18 2009 -0400
+
+ [HB] Remove a few 'inline's, though the compiler mostly ignores them
+
+ src/hb-open-file-private.hh | 1 -
+ src/hb-open-type-private.hh | 16 ++++++++--------
+ src/hb-ot-layout-gsubgpos-private.hh | 6 +++---
+ 3 files changed, 11 insertions(+), 12 deletions(-)
+
+commit 7f3d5c8166e5205e9d9bf8b4b2f31d44387a8006
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 6 13:33:51 2009 -0400
+
+ [HB] Fix blob to use a actual mutex
+
+ src/hb-blob.c | 125
+ ++++++++++++++++++++++++++++++++++-------------
+ src/hb-object-private.h | 4 +-
+ src/hb-private.h | 20 +++++---
+ 3 files changed, 106 insertions(+), 43 deletions(-)
+
+commit a794ebf4be9896393f4badf02905a4007981a588
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 6 12:32:35 2009 -0400
+
+ [HB] Use glib again
+
+ src/Makefile.am | 5 +++--
+ src/hb-blob.c | 4 ++--
+ src/hb-object-private.h | 19 ++++++-------------
+ src/hb-private.h | 45
+ ++++++++++++++++++++++++++-------------------
+ 4 files changed, 37 insertions(+), 36 deletions(-)
+
+commit 9b76a290a94f2603f3cb9498ae976125347cf54b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 6 10:27:38 2009 -0400
+
+ [HB] Improve debug output
+
+ src/hb-open-type-private.hh | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+commit 9faee63034d3965735bd6362c0beeca1613bd771
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Aug 6 10:24:49 2009 -0400
+
+ [HB] Minor
+
+ src/hb-private.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f72059ee6946d9b4812b794f662ee83c7e25fe53
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 5 15:35:02 2009 -0400
+
+ [HB] Add a few TODO items
+
+ src/TODO | 8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+commit 0d77ab8a73f57c9fca4c6f9301dae394d79526e3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 5 15:27:42 2009 -0400
+
+ [HB] Improve debug output
+
+ src/hb-open-type-private.hh | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 268cac4c9ef8cb592cfb8507273332165b8d3ad3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 5 15:21:48 2009 -0400
+
+ [HB] Fix blob unlock
+
+ src/hb-blob.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 7acb389569cf99c6bae9db31a8ed7c7007fbb566
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 5 15:20:34 2009 -0400
+
+ [HB] Improve debug output and fix mprotect bug
+
+ src/hb-blob.c | 57
+ +++++++++++++++++++++++++++++++++++++------
+ src/hb-open-type-private.hh | 30 ++++++++++------------
+ src/hb-private.h | 3 +-
+ 3 files changed, 65 insertions(+), 25 deletions(-)
+
+commit ec9f8db0d3cad146801b7dc5c59e517de3b6fa34
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 5 14:52:03 2009 -0400
+
+ [HB] Minor
+
+ src/hb-private.h | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit d341881d9a0f835f691b121480046081ad162918
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Aug 5 14:49:25 2009 -0400
+
+ [HB] Fix build of main.cc
+
+ src/Makefile.am | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 8f3be25e7ec88ea451ee8097bf32e5f729f4fef9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 23:43:40 2009 -0400
+
+ [HB] turn debugging off
+
+ src/hb-private.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 62ed5850d9e0e0d0231889470d58e815420c21e5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 23:30:32 2009 -0400
+
+ [HB] Fix another sanitize() bug; hopefully it's the last one
+
+ src/hb-ot-layout-common-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 90482b68178b687c0f0a3f82cd6a36b2c0bb9384
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 23:24:35 2009 -0400
+
+ [HB] Fix a couple other sanitize() bugs
+
+ src/hb-ot-layout-gpos-private.hh | 4 ++--
+ src/hb-ot-layout-gsub-private.hh | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 4f3ad9115a4161fc23fa559c26082440196217ec
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 23:01:23 2009 -0400
+
+ [HB] More debugging output
+
+ src/hb-open-type-private.hh | 45
+ ++++++++++++++++++++++++++++++++++++++----
+ 1 files changed, 40 insertions(+), 5 deletions(-)
+
+commit 8cd6fa28d1b77100491519b8dedb2e113508bf59
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 22:55:44 2009 -0400
+
+ [HB] Fix fatal Sanitizer bug
+
+ src/hb-open-type-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 2870ac5e5d5d87646a4b273a9805fb3fcf280f97
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 22:43:47 2009 -0400
+
+ [HB] Add missing sanitize
+
+ src/hb-open-file-private.hh | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit b28815c1f6e46d38471cacbc31248ca6fda8c4d1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 22:35:36 2009 -0400
+
+ [HB] Add sanitize debugging facilities
+
+ src/hb-open-file-private.hh | 4 +++
+ src/hb-open-type-private.hh | 43
+ ++++++++++++++++++++++++++++++----
+ src/hb-ot-layout-common-private.hh | 17 +++++++++++++
+ src/hb-ot-layout-gdef-private.hh | 10 ++++++++
+ src/hb-ot-layout-gpos-private.hh | 28 ++++++++++++++++++++++
+ src/hb-ot-layout-gsub-private.hh | 18 ++++++++++++++
+ src/hb-ot-layout-gsubgpos-private.hh | 16 ++++++++++++
+ src/hb-private.h | 6 ++++-
+ 8 files changed, 136 insertions(+), 6 deletions(-)
+
+commit 7edb430f9182723b7b720708c56088cec1200a70
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 22:06:57 2009 -0400
+
+ [HB] Rename open-types to open-type; beauty
+
+ src/Makefile.am | 2 +-
+ src/hb-open-file-private.hh | 2 +-
+ src/hb-open-type-private.hh | 565
+ ++++++++++++++++++++++++++++++++++++
+ src/hb-open-types-private.hh | 565
+ ------------------------------------
+ src/hb-ot-layout-common-private.hh | 2 +-
+ 5 files changed, 568 insertions(+), 568 deletions(-)
+
+commit f4b58d3fc2956a9d1b6178588d809c781f7a5c0c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 21:47:29 2009 -0400
+
+ [HB] Save edit even if not writeable
+
+ src/hb-open-types-private.hh | 6 ++----
+ 1 files changed, 2 insertions(+), 4 deletions(-)
+
+commit 9bd629ccd064e739789e504c41ad875eed93abba
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 21:42:23 2009 -0400
+
+ [HB] Fix warnings
+
+ src/hb-open-file-private.hh | 1 +
+ src/hb-open-types-private.hh | 5 +++++
+ src/hb-ot-layout-gsub-private.hh | 3 +--
+ 3 files changed, 7 insertions(+), 2 deletions(-)
+
+commit 5ff4e13143c227fa57854c987b5a98e610f89361
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 21:35:32 2009 -0400
+
+ [HB] Avoid infinite recusion in Extension sanitize()
+
+ src/hb-ot-layout-gpos-private.hh | 1 +
+ src/hb-ot-layout-gsub-private.hh | 1 +
+ 2 files changed, 2 insertions(+), 0 deletions(-)
+
+commit d60bb8ca2ae6edf29b2227b56c57f0d16879370b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 21:32:57 2009 -0400
+
+ [HB] Hook Sanitizer up. Hell's breaking loose right now
+
+ src/hb-font.cc | 7 ++-----
+ src/hb-open-types-private.hh | 2 +-
+ src/hb-ot-layout.cc | 12 ++++++------
+ 3 files changed, 9 insertions(+), 12 deletions(-)
+
+commit 679f41fe61242aa8d7f45b64bdb66395aa530fe2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 21:32:06 2009 -0400
+
+ [HB] Fix leak
+
+ src/hb-ot-layout.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 4e8a0602bb0b3cbf7f26cc38790e37cdec7b0b37
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 20:52:47 2009 -0400
+
+ [HB] Add Sanitizer
+
+ src/hb-open-types-private.hh | 58
+ ++++++++++++++++++++++++++++++++++++++---
+ 1 files changed, 53 insertions(+), 5 deletions(-)
+
+commit 2765d333e523a13dbd932fa33f3b39a5cf83f0f7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 20:50:18 2009 -0400
+
+ [HB] Add XXX
+
+ src/hb-open-file-private.hh | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit a328d66e6a8122f7d4d71941449d4d0136203e08
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 20:27:05 2009 -0400
+
+ [HB] Minor cleanup
+
+ src/hb-ot-layout-gdef-private.hh | 2 +-
+ src/hb-ot-layout-gpos-private.hh | 2 +-
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 4 ++--
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 577c1116493d785d3455626612f97dabb383abf0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 19:31:02 2009 -0400
+
+ [HB] Shuffle code around
+
+ src/hb-open-types-private.hh | 127
+ +++++++++++++++++++++--------------------
+ 1 files changed, 65 insertions(+), 62 deletions(-)
+
+commit b1e187fc6365f5355c652a61494a5e9f6acf51b4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 15:28:49 2009 -0400
+
+ [HB] More sanitize infrastructure
+
+ src/hb-open-types-private.hh | 29 ++++++++++++++++++++++++++++-
+ 1 files changed, 28 insertions(+), 1 deletions(-)
+
+commit b508e5ccd528f3f0f49f545bd5f30a525d5abd5a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 15:07:24 2009 -0400
+
+ [HB] open-file sanitize()
+
+ src/hb-open-file-private.hh | 46
+ ++++++++++++++++++++++++++++++++++++++---
+ src/hb-open-types-private.hh | 13 +++++++++++
+ 2 files changed, 55 insertions(+), 4 deletions(-)
+
+commit 738c54d9caa3affc4b434e56bfb810ff6dc9b0b3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 14:42:46 2009 -0400
+
+ [HB] Tag sanitize()
+
+ src/hb-open-types-private.hh | 8 ++++++++
+ src/hb-ot-layout-common-private.hh | 6 +-----
+ 2 files changed, 9 insertions(+), 5 deletions(-)
+
+commit e49a84c9e37c08808880e74e94c8160731ababa1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 14:33:23 2009 -0400
+
+ [HB] GDEF sanitize()
+
+ src/hb-ot-layout-gdef-private.hh | 54
+ ++++++++++++++++++++++++++++++++++
+ src/hb-ot-layout-gpos-private.hh | 2 +-
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ 4 files changed, 57 insertions(+), 3 deletions(-)
+
+commit 18939487d04dba86880b0af8e89cf2cc44a431f5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 14:27:56 2009 -0400
+
+ [HB] Fix Extension sanitize()
+
+ src/hb-ot-layout-gpos-private.hh | 3 ++-
+ src/hb-ot-layout-gsub-private.hh | 3 ++-
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ 3 files changed, 5 insertions(+), 3 deletions(-)
+
+commit f2be750981be58a723831e69b1670275851d4be9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 14:12:46 2009 -0400
+
+ [HB] Remove stale TODO
+
+ src/hb-ot-layout.cc | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit ac26e2a838d1266bb5f39c43245eb2a52c5e072d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 14:10:39 2009 -0400
+
+ [HB] Hookup NEUTER()
+
+ src/hb-open-types-private.hh | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 15164d9258a74122a4db748d35532bd72c47cec2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 13:57:41 2009 -0400
+
+ [HB] Fix mix warnings
+
+ src/Makefile.am | 2 +-
+ src/hb-font.cc | 15 +++------------
+ src/hb-open-types-private.hh | 2 +-
+ src/hb-ot-layout-common-private.hh | 6 +++---
+ src/hb-ot-layout-gdef-private.hh | 2 +-
+ src/hb-ot-layout-gpos-private.hh | 9 ++++-----
+ src/hb-ot-layout.cc | 2 +-
+ src/main.cc | 4 +---
+ 8 files changed, 15 insertions(+), 27 deletions(-)
+
+commit 42b778f89e0818fe06910ce04e2203485823da09
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 13:30:49 2009 -0400
+
+ [HB] GPOS sanitize()
+
+ src/hb-open-types-private.hh | 22 ++++-
+ src/hb-ot-layout-gpos-private.hh | 195
+ +++++++++++++++++++++++++++++++++++++-
+ src/hb-ot-layout-gsub-private.hh | 2 -
+ 3 files changed, 213 insertions(+), 6 deletions(-)
+
+commit dc9c4d93cd0f3ac991f32df08c1c17fc389054c0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 12:26:26 2009 -0400
+
+ [HB] Sanitize DeviceTable
+
+ src/hb-open-types-private.hh | 8 ++++----
+ src/hb-ot-layout-common-private.hh | 17 ++++++++++++++---
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ 3 files changed, 19 insertions(+), 8 deletions(-)
+
+commit ad3a3cd4955661c591b20af1f2c493432f0bebf0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 12:13:52 2009 -0400
+
+ [HB] More casts
+
+ src/hb-ot-layout-gsub-private.hh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 95639fccc1ef18eadeb737e8b611d1d1f1315fc2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 12:05:24 2009 -0400
+
+ [HB] Fix couple of bugs
+
+ src/hb-open-types-private.hh | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 2b5a59c277f4c5bf7aac9a9005054763e322e02d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 11:38:50 2009 -0400
+
+ [HB] More cast cleanup
+
+ src/hb-open-types-private.hh | 23 +++++++-----
+ src/hb-ot-layout-common-private.hh | 7 ++--
+ src/hb-ot-layout-gsub-private.hh | 27 +++++---------
+ src/hb-ot-layout-gsubgpos-private.hh | 64
+ ++++++++++++---------------------
+ 4 files changed, 50 insertions(+), 71 deletions(-)
+
+commit 196598bbccff08415ff5192314cba044df258cad
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 11:04:32 2009 -0400
+
+ [Hb] Use reinterpret casts instead of direct casts to char *
+
+ src/hb-open-file-private.hh | 4 +-
+ src/hb-open-types-private.hh | 19 ++++++++++----
+ src/hb-ot-layout-common-private.hh | 8 +++---
+ src/hb-ot-layout-gpos-private.hh | 12 ++++----
+ src/hb-ot-layout-gsub-private.hh | 20 +++++++-------
+ src/hb-ot-layout-gsubgpos-private.hh | 44
+ +++++++++++++++++-----------------
+ 6 files changed, 57 insertions(+), 50 deletions(-)
+
+commit 92b5dd8e71e1bdeaa6e86a53f167683a3f5f4289
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 10:41:32 2009 -0400
+
+ [HB] Merge more templates
+
+ src/hb-open-types-private.hh | 167
+ ++++++++++++++----------------------------
+ 1 files changed, 55 insertions(+), 112 deletions(-)
+
+commit e6ab2c59ba2d37942ac5fcbfe61d38b7e359ac8c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 10:23:01 2009 -0400
+
+ [HB] Simplify indirect sanitize()
+
+ src/hb-open-types-private.hh | 52
+ +++++++++++++++++------------------
+ src/hb-ot-layout-common-private.hh | 11 +-------
+ 2 files changed, 26 insertions(+), 37 deletions(-)
+
+commit 29d8644a315ebe6976f15db2fe96069376d9b8cd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 02:27:37 2009 -0400
+
+ [HB] Finish GSUB sanitize()
+
+ src/hb-ot-layout-gsub-private.hh | 21 ++++++++++++++++++++-
+ 1 files changed, 20 insertions(+), 1 deletions(-)
+
+commit cf086adca1b7b5a361a248808f9a847e513d3630
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 02:14:24 2009 -0400
+
+ [HB] Add comment
+
+ src/hb-ot-layout-common-private.hh | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit a97ce570ab693190350886e4e80942851c4d5727
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 02:10:48 2009 -0400
+
+ [HB] Optimize sanitize()
+
+ src/hb-open-types-private.hh | 7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+commit cd3827ee567612c5500206b62840702fc956e0f5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 02:09:34 2009 -0400
+
+ [HB] More sanitize()
+
+ src/hb-open-file-private.hh | 2 +-
+ src/hb-open-types-private.hh | 12 ++++--
+ src/hb-ot-layout-common-private.hh | 64
+ +++++++++++++++++++++++++++++----
+ src/hb-ot-layout-gdef-private.hh | 2 +-
+ src/hb-ot-layout-gsubgpos-private.hh | 15 +++++++-
+ 5 files changed, 79 insertions(+), 16 deletions(-)
+
+commit 70de50c11ed7037b20eb6814ff60f6e32a9944e4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Aug 4 00:58:28 2009 -0400
+
+ [HB] Start sanitize()
+
+ src/hb-open-types-private.hh | 105 +++++++++++++++++++++++++++-
+ src/hb-ot-layout-common-private.hh | 48 ++++++++++++-
+ src/hb-ot-layout-gsub-private.hh | 125
+ +++++++++++++++++++++++++++++++++-
+ src/hb-ot-layout-gsubgpos-private.hh | 104 ++++++++++++++++++++++++++++
+ 4 files changed, 376 insertions(+), 6 deletions(-)
+
+commit 5fc22e647c8a2bf6d3cb59185e351ac625e7e322
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 3 22:43:02 2009 -0400
+
+ [HB] Remove use of typeof()
+
+ src/hb-blob.c | 4 ++--
+ src/hb-buffer.c | 2 +-
+ src/hb-font.cc | 14 +++++++-------
+ src/hb-object-private.h | 4 ++--
+ 4 files changed, 12 insertions(+), 12 deletions(-)
+
+commit 70e0f2a75ec1559f2f70ada837ce4bc4baca49e3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 3 22:01:47 2009 -0400
+
+ [HB] Make it all work again
+
+ src/hb-font.cc | 23 +++++++++++--------
+ src/hb-ot-layout-private.h | 9 +++++--
+ src/hb-ot-layout.cc | 51
+ +++++++++++++++++++++----------------------
+ 3 files changed, 44 insertions(+), 39 deletions(-)
+
+commit 23c86aa0009324433e78fcd0c47f2c0ff14b1949
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 3 21:40:20 2009 -0400
+
+ [HB] Use face_t directly instead of ot_layout_t
+
+ src/TODO | 1 +
+ src/hb-font-private.h | 4 +
+ src/hb-font.cc | 74 +++++++++---
+ src/hb-font.h | 3 +
+ src/hb-object-private.h | 36 ++++--
+ src/hb-ot-layout-gdef-private.hh | 2 +
+ src/hb-ot-layout-gpos-private.hh | 14 +-
+ src/hb-ot-layout-gsub-private.hh | 32 +++---
+ src/hb-ot-layout-gsubgpos-private.hh | 8 +-
+ src/hb-ot-layout-private.h | 40 ++++---
+ src/hb-ot-layout.cc | 220
+ +++++++++++++++-------------------
+ 11 files changed, 237 insertions(+), 197 deletions(-)
+
+commit fc6c94002dd5478cf9fbdaff12d8374a786c85e1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 3 21:27:08 2009 -0400
+
+ [HB] Simplify sub-blob support
+
+ src/hb-blob.c | 172
+ +++++++++++++++++++++-----------------------------------
+ src/hb-blob.h | 14 +++--
+ 2 files changed, 74 insertions(+), 112 deletions(-)
+
+commit a26442437ae9f11674e0d68cd5cbf395ade7695d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Aug 3 17:53:29 2009 -0400
+
+ [HB] Add sub-blobs
+
+ src/hb-blob.c | 162
+ ++++++++++++++++++++++++++++++++++++++++++++++++---------
+ src/hb-blob.h | 12 ++++-
+ 2 files changed, 147 insertions(+), 27 deletions(-)
+
+commit b28e21b90c4105a0c2e17009b748777294614664
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 2 20:06:48 2009 -0400
+
+ [HB] Rename hb-font.c to hb-font.cc
+
+ src/Makefile.am | 2 +-
+ src/hb-font.c | 349
+ -------------------------------------------------------
+ src/hb-font.cc | 349
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 350 insertions(+), 350 deletions(-)
+
+commit 5f5b24f99f52bbc922e238b65c06061ba07c8548
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 2 20:03:12 2009 -0400
+
+ [OT] Rename C++ header files from *.h to *.hh
+
+ src/Makefile.am | 14 +-
+ src/hb-open-file-private.h | 145 ----
+ src/hb-open-file-private.hh | 145 ++++
+ src/hb-open-types-private.h | 386 ----------
+ src/hb-open-types-private.hh | 386 ++++++++++
+ src/hb-ot-layout-common-private.h | 447 -----------
+ src/hb-ot-layout-common-private.hh | 447 +++++++++++
+ src/hb-ot-layout-gdef-private.h | 320 --------
+ src/hb-ot-layout-gdef-private.hh | 320 ++++++++
+ src/hb-ot-layout-gpos-private.h | 1355
+ ----------------------------------
+ src/hb-ot-layout-gpos-private.hh | 1355
+ ++++++++++++++++++++++++++++++++++
+ src/hb-ot-layout-gsub-private.h | 751 -------------------
+ src/hb-ot-layout-gsub-private.hh | 751 +++++++++++++++++++
+ src/hb-ot-layout-gsubgpos-private.h | 773 -------------------
+ src/hb-ot-layout-gsubgpos-private.hh | 773 +++++++++++++++++++
+ src/hb-ot-layout.cc | 8 +-
+ src/main.cc | 6 +-
+ 17 files changed, 4191 insertions(+), 4191 deletions(-)
+
+commit 2098a021a826e76ee27d5db74e32738d7d1c3d30
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 2 19:57:00 2009 -0400
+
+ [HB] Move OT file handling out of ot-layout
+
+ src/Makefile.am | 3 +-
+ src/hb-open-file-private.h | 145 +++++++++++
+ src/hb-open-types-private.h | 386 +++++++++++++++++++++++++++++
+ src/hb-ot-layout-common-private.h | 4 +-
+ src/hb-ot-layout-open-private.h | 495
+ -------------------------------------
+ src/hb-ot-layout.cc | 2 +-
+ src/main.cc | 4 +-
+ 7 files changed, 539 insertions(+), 500 deletions(-)
+
+commit 0ead481a5a8623103565fd7d924666e7342278dd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 2 17:41:36 2009 -0400
+
+ [HB] Port ot-layout to new public API
+
+ src/TODO | 1 +
+ src/hb-common.h | 1 +
+ src/hb-font.c | 9 +
+ src/hb-font.h | 3 +
+ src/hb-ot-layout-gdef-private.h | 32 ++--
+ src/hb-ot-layout-gpos-private.h | 106 ++++++------
+ src/hb-ot-layout-gsub-private.h | 50 +++---
+ src/hb-ot-layout-gsubgpos-private.h | 12 +-
+ src/hb-ot-layout-private.h | 36 +++-
+ src/hb-ot-layout.cc | 334
+ +++++++++++++++++++----------------
+ src/hb-ot-layout.h | 207 ++++++++++------------
+ 11 files changed, 415 insertions(+), 376 deletions(-)
+
+commit 678bed433371d90536976a2d57195c1e1867f766
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 2 15:35:31 2009 -0400
+
+ [HB] Add top-level header files
+
+ src/Makefile.am | 2 ++
+ src/hb-ot.h | 34 ++++++++++++++++++++++++++++++++++
+ src/hb.h | 35 +++++++++++++++++++++++++++++++++++
+ 3 files changed, 71 insertions(+), 0 deletions(-)
+
+commit 2c80296aa5991ad67483889147f5c84fefe54af2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Aug 2 15:20:22 2009 -0400
+
+ [HB] Add XXX marks
+
+ src/hb-ot-layout-private.h | 2 ++
+ src/hb-ot-layout.cc | 7 ++-----
+ 2 files changed, 4 insertions(+), 5 deletions(-)
+
+commit c46f8efd6ddd981b5724b2600ac98a80193385be
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 1 23:06:27 2009 -0400
+
+ [HB] Rename _duplicate to _copy
+
+ To be in line with cairo
+
+ src/hb-font.c | 4 ++--
+ src/hb-font.h | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+commit f1ebe44985e2192844cf1747a4e36ed81e715ce6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 1 22:55:11 2009 -0400
+
+ [HB] Cleanup TODO
+
+ src/TODO | 10 +---------
+ 1 files changed, 1 insertions(+), 9 deletions(-)
+
+commit f1322e52d557726baa010be8d35a594748e8fa1a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 1 22:53:04 2009 -0400
+
+ [HB] Cleanup public buffer structs
+
+ src/hb-buffer-private.h | 46
+ ++++++++++++++++++++++++++++++------
+ src/hb-buffer.c | 49
+ ++++++++++++++++++++-------------------
+ src/hb-buffer.h | 35 +++++++++++++--------------
+ src/hb-ot-layout-gpos-private.h | 8 +++---
+ src/hb-ot-layout-private.h | 5 ++-
+ src/hb-ot-layout.cc | 20 ++++++++--------
+ 6 files changed, 97 insertions(+), 66 deletions(-)
+
+commit 6d5bb18e93d2a53350b342869a3ec8f25f0396c2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 1 22:25:04 2009 -0400
+
+ [OT] Match struct with HB's
+
+ src/hb-buffer.c | 6 +++---
+ src/hb-buffer.h | 2 +-
+ src/hb-ot-layout.cc | 12 ++++++------
+ 3 files changed, 10 insertions(+), 10 deletions(-)
+
+commit 11fbb5487d9900a019440ef8235f35c9f525decb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 1 22:19:06 2009 -0400
+
+ [HB] Port buffert to new object API
+
+ src/hb-buffer-private.h | 24 +++++++++++++++--
+ src/hb-buffer.c | 65
+ ++++++++++++++++++++++++++++++++++++-----------
+ src/hb-buffer.h | 53 ++++++++++++++++++++++++--------------
+ 3 files changed, 104 insertions(+), 38 deletions(-)
+
+commit 0cc7bc59ea6e8f38bf1e196c558cca9862ac3302
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 1 21:38:39 2009 -0400
+
+ [HB] Move typedef's around
+
+ src/hb-blob.h | 2 ++
+ src/hb-common.h | 9 ---------
+ src/hb-font.h | 10 ++++++++++
+ 3 files changed, 12 insertions(+), 9 deletions(-)
+
+commit a12dd324a3859496a95602d426aee34ce6c5c8a6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 1 21:36:15 2009 -0400
+
+ [HB] Add get_reference_count()
+
+ src/hb-blob.c | 6 ++++++
+ src/hb-blob.h | 3 +++
+ src/hb-font.c | 24 ++++++++++++++++++++++++
+ src/hb-font.h | 12 ++++++++++++
+ src/hb-object-private.h | 7 +++++++
+ 5 files changed, 52 insertions(+), 0 deletions(-)
+
+commit baec684fde2303edb16341bfcf1022cd72acf129
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 1 21:06:11 2009 -0400
+
+ [HB] Remove glib dependency
+
+ src/Makefile.am | 7 ++-----
+ src/hb-buffer.c | 2 +-
+ src/hb-private.h | 30 ++++++++++++++++++------------
+ src/main.cc | 1 +
+ 4 files changed, 22 insertions(+), 18 deletions(-)
+
+commit df66028781a7609a515980e64396e6f1044d764a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 1 20:46:02 2009 -0400
+
+ [HB] Assorted compiler macros
+
+ src/hb-ot-layout-open-private.h | 4 +-
+ src/hb-private.h | 88
+ ++++++++++++++++++++++++++++++---------
+ 2 files changed, 70 insertions(+), 22 deletions(-)
+
+commit ba8d94ce3360bfaf2c530d01f2af69237018a531
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 1 20:29:22 2009 -0400
+
+ [HB] Simplify object creation
+
+ src/Makefile.am | 2 +-
+ src/hb-blob.c | 6 +--
+ src/hb-font-private.h | 1 -
+ src/hb-font.c | 37 +++++------------
+ src/hb-object-private.h | 97
+ +++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-private.h | 2 +
+ src/hb-refcount-private.h | 87 ----------------------------------------
+ 7 files changed, 112 insertions(+), 120 deletions(-)
+
+commit c62b503770325819f249885dfc9d4683a69c9efd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 1 19:54:49 2009 -0400
+
+ [HB] Add abstract font and face API
+
+ Not used yet.
+
+ src/Makefile.am | 3 +
+ src/hb-blob.c | 6 +-
+ src/hb-font-private.h | 108 +++++++++++++++
+ src/hb-font.c | 331
+ +++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-font.h | 182 +++++++++++++++++++++++++
+ src/hb-refcount-private.h | 14 ++-
+ 6 files changed, 636 insertions(+), 8 deletions(-)
+
+commit 35a7383c6138fd705560f0d4bb30659cbd1ab64c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 1 19:30:31 2009 -0400
+
+ [HB] Simplify refcounting functions
+
+ src/hb-blob.c | 32 ++++++++++----------------------
+ src/hb-common.h | 2 ++
+ src/hb-private.h | 2 ++
+ src/hb-refcount-private.h | 31 ++++++++++++++++++++++++++++++-
+ 4 files changed, 44 insertions(+), 23 deletions(-)
+
+commit 23af767a4475fecc1fe9fe9108f12c05c89bc8c9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 1 19:10:41 2009 -0400
+
+ [HB] Fix for dfont's with multiple faces
+
+ src/hb-ot-layout-open-private.h | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit e97a95f2ea2770689bbf076d3c3ac404f273271e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Aug 1 19:05:44 2009 -0400
+
+ [HB] Use calloc instead of malloc where feasible
+
+ src/hb-blob.c | 8 +++++---
+ src/hb-buffer.c | 4 ++--
+ 2 files changed, 7 insertions(+), 5 deletions(-)
+
+commit 0090dc0f67b553d2f6eaaedc289c0956ade09ef6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 30 16:28:45 2009 -0400
+
+ [HB] Remove hinting setting and use ppem==0 to mean "no hinting"
+
+ src/hb-blob.h | 3 ---
+ src/hb-common.h | 9 +++++++++
+ src/hb-ot-layout-gpos-private.h | 36
+ ++++++++++++++++++++++++------------
+ src/hb-ot-layout-private.h | 2 --
+ src/hb-ot-layout.cc | 7 -------
+ src/hb-ot-layout.h | 4 ----
+ 6 files changed, 33 insertions(+), 28 deletions(-)
+
+commit f0954d1e08ae288eda9904e17108fc73f48c0b98
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 30 15:33:57 2009 -0400
+
+ [HB] Add a "blob" manager
+
+ src/Makefile.am | 5 +-
+ src/hb-blob.c | 181
+ +++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-blob.h | 74 ++++++++++++++++++
+ src/hb-private.h | 2 +
+ src/hb-refcount-private.h | 54 +++++++++++++
+ 5 files changed, 315 insertions(+), 1 deletions(-)
+
+commit 02a370697d25b986dbf1d5c38f46a89a4833b495
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 29 18:41:25 2009 -0400
+
+ [HB] Move direction to buffer
+
+ src/hb-buffer.c | 9 +++++++++
+ src/hb-buffer.h | 14 ++++++++++++++
+ src/hb-ot-layout-gpos-private.h | 2 +-
+ src/hb-ot-layout-private.h | 1 -
+ src/hb-ot-layout.cc | 7 -------
+ src/hb-ot-layout.h | 5 -----
+ 6 files changed, 24 insertions(+), 14 deletions(-)
+
+commit 7cda6fa24c26887c5543d0657b07aad466452cb3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jul 29 18:37:57 2009 -0400
+
+ [HB] Rename internal vars
+
+ src/hb-ot-layout-gsubgpos-private.h | 56
+ +++++++++++++++++-----------------
+ 1 files changed, 28 insertions(+), 28 deletions(-)
+
+commit b196e6f2743d631ef181f1116370be3055063d36
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 28 15:50:42 2009 -0400
+
+ [HB] Fix buffer enlargement. Ouch
+
+ src/hb-buffer.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f9cd1014f8f4d0394b5e0e9eefc1e2af13c59cab
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Jul 28 15:43:34 2009 -0400
+
+ Apply patch from Jonathan Kew
+
+ src/hb-buffer.c | 75
+ ++++++++++++++++++++++++++------------------------
+ src/hb-buffer.h | 6 +++-
+ src/hb-ot-layout.cc | 31 +++++++++++++++++++++
+ src/hb-ot-layout.h | 15 ++++++++++
+ src/hb-private.h | 2 +-
+ 5 files changed, 91 insertions(+), 38 deletions(-)
+
+commit 2ebb89d63dd27e800f2b6cbf624924601105f48a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Jul 25 19:09:01 2009 -0400
+
+ Revert "XX"
+
+ This reverts commit c939f6aff405ca7b10b1f1538f46148bff719fcb.
+
+ src/Makefile.am | 2 -
+ src/hb-buffer.c | 9 ---
+ src/hb-buffer.h | 14 -----
+ src/hb-common.h | 3 -
+ src/hb-ot-layout-gdef-private.h | 32 +++++-----
+ src/hb-ot-layout-gpos-private.h | 108
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-private.h | 46 +++++++-------
+ src/hb-ot-layout-gsubgpos-private.h | 68 +++++++++++-----------
+ src/hb-ot-layout-private.h | 28 ++++-----
+ src/hb-ot-layout.cc | 30 ++++++++++
+ src/hb-ot-layout.h | 5 ++
+ src/hb-private.h | 16 -----
+ 12 files changed, 174 insertions(+), 187 deletions(-)
+
+commit 55520d2af172f5f6617b909e80cbd7d898f2bc15
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jun 10 23:26:51 2009 -0400
+
+ XX
+
+ src/Makefile.am | 2 +
+ src/hb-buffer.c | 9 +++
+ src/hb-buffer.h | 14 +++++
+ src/hb-common.h | 3 +
+ src/hb-ot-layout-gdef-private.h | 32 +++++-----
+ src/hb-ot-layout-gpos-private.h | 108
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-private.h | 46 +++++++-------
+ src/hb-ot-layout-gsubgpos-private.h | 68 +++++++++++-----------
+ src/hb-ot-layout-private.h | 28 +++++----
+ src/hb-ot-layout.cc | 30 ----------
+ src/hb-ot-layout.h | 5 --
+ src/hb-private.h | 16 +++++
+ 12 files changed, 187 insertions(+), 174 deletions(-)
+
+commit f53d434b9151c4ec43c148734b49bb165e522cc9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat May 30 22:17:32 2009 -0400
+
+ [GPOS] Advance buffer cursor in SinglePos lookups. Ouch!
+
+ src/hb-ot-layout-gpos-private.h | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit e35bbd570a5d914f86f1ea83941ee4328f268059
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat May 30 12:02:46 2009 -0400
+
+ [HB] Improve buffer. Don't dup out buffer unless out is longer
+ than in
+
+ That is, we work in-place even for ligatures now.
+
+ src/hb-buffer.c | 156
+ ++++++++++++++++++++++++-------------------------------
+ src/hb-buffer.h | 7 +--
+ 2 files changed, 71 insertions(+), 92 deletions(-)
+
+commit 6734ed4b6b2ce382917bf644aaf1acfa993f00ad
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 27 18:16:55 2009 -0400
+
+ [GPOS] Fix property checking
+
+ src/hb-ot-layout-gpos-private.h | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit cc83ae12484108586fba6586bd9008971338b322
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 27 00:17:37 2009 -0400
+
+ [GPOS] Add vertical TODO
+
+ src/hb-ot-layout-gpos-private.h | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit b69d38e7eaea544ba6c1876cdc6ddac61a698dd3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 26 22:29:02 2009 -0400
+
+ [HB] Remove useless include
+
+ src/hb-ot-layout-private.h | 3 ---
+ 1 files changed, 0 insertions(+), 3 deletions(-)
+
+commit 6c8108cb583292a679b05844ab613b7f4587adc6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 26 22:26:08 2009 -0400
+
+ [GPOS] Remove unused variables
+
+ src/hb-ot-layout-gpos-private.h | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit 09c292e3b688a67fbae67b645d1e6ffcf8d8eb6e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 26 19:48:16 2009 -0400
+
+ [HB] Fix glyph properties
+
+ src/hb-ot-layout-common-private.h | 6 +++---
+ src/hb-ot-layout-open-private.h | 2 +-
+ src/hb-ot-layout.cc | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 64e33f008ff9cc807fdfdc4553ad3fe01bb0615f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 26 18:57:56 2009 -0400
+
+ [GPOS] Fix PairPos signedness
+
+ src/hb-ot-layout-gpos-private.h | 11 ++++-------
+ 1 files changed, 4 insertions(+), 7 deletions(-)
+
+commit 80ea5bd10e72561a7627a5196621a6d7eccd91b7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 26 17:58:37 2009 -0400
+
+ [GPOS] Fix mark matching
+
+ src/hb-ot-layout-gpos-private.h | 44
+ +++++++++++++++++---------------------
+ 1 files changed, 20 insertions(+), 24 deletions(-)
+
+commit 4189b92aaa41e4a1756c561cc6e08b0ed024afda
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 26 17:31:56 2009 -0400
+
+ [HB] When looking back/forward, skip marks only
+
+ src/TODO | 1 -
+ src/hb-ot-layout-gpos-private.h | 13 +------
+ src/hb-ot-layout-gsub-private.h | 38 ++++++++-----------
+ src/hb-ot-layout-gsubgpos-private.h | 14 ++++----
+ src/hb-ot-layout-private.h | 6 +++
+ src/hb-ot-layout.cc | 69
+ +++++++++++++++++++++++------------
+ 6 files changed, 76 insertions(+), 65 deletions(-)
+
+commit 1246e41021ab1d782b4c97e5d81c4917a57e3ed4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 26 15:58:34 2009 -0400
+
+ [GDEF] Support MarkFilteringSets
+
+ src/hb-ot-layout.cc | 59
+ ++++++++++++++++++--------------------------------
+ 1 files changed, 21 insertions(+), 38 deletions(-)
+
+commit 5130c35e93528bcf3095fee5baf3847589167a58
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 26 15:45:41 2009 -0400
+
+ [HB] Simplify MarkAttachmentType handling
+
+ src/hb-ot-layout-gpos-private.h | 6 +++---
+ src/hb-ot-layout-gsub-private.h | 6 ++----
+ src/hb-ot-layout.cc | 18 ++++++++----------
+ 3 files changed, 13 insertions(+), 17 deletions(-)
+
+commit e4b92b85a7750bd4271ad607b3c41f0184e89feb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 26 15:38:53 2009 -0400
+
+ [HB] Support parsing MarkFilteringSets introduced in OpenType 1.6
+
+ src/hb-ot-layout-gdef-private.h | 55
+ +++++++++++++++++++++++++++++++++-----
+ src/hb-ot-layout-gpos-private.h | 1 +
+ src/hb-ot-layout.cc | 6 ++--
+ 3 files changed, 51 insertions(+), 11 deletions(-)
+
+commit 515ce4ceb2ab0151d8dfc03ff0bfc7d110dd93b5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 26 13:08:00 2009 -0400
+
+ [HB] More de-C++'ization
+
+ src/hb-ot-layout-gsubgpos-private.h | 24 ++++++++++++------------
+ 1 files changed, 12 insertions(+), 12 deletions(-)
+
+commit d7df42d7ee586219475878d160f85ae5a188bd59
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 26 13:04:59 2009 -0400
+
+ [HB] Start MarkFilteringSet support
+
+ src/hb-ot-layout-common-private.h | 24 +++++++++++++++++++-----
+ 1 files changed, 19 insertions(+), 5 deletions(-)
+
+commit 62964afcecd96038cfaa8bc2bc931f43ee83be7e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 26 12:40:10 2009 -0400
+
+ [HB] Implement get_lig_carets()
+
+ src/hb-ot-layout-gdef-private.h | 57
+ ++++++++++++++++++++++++++++++--------
+ src/hb-ot-layout.cc | 17 +++++++++---
+ src/hb-ot-layout.h | 8 +++++-
+ src/main.cc | 9 +-----
+ 4 files changed, 66 insertions(+), 25 deletions(-)
+
+commit 79420ad9caf2d5fc94c3693e8292edfa27060b2d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 26 12:24:16 2009 -0400
+
+ [HB] Add get_attach_points()
+
+ src/Makefile.am | 2 +-
+ src/hb-ot-layout-gdef-private.h | 35
+ +++++++++++++++++++++++++----------
+ src/hb-ot-layout-gpos-private.h | 28 +++++++---------------------
+ src/hb-ot-layout-gsub-private.h | 28 +++++++---------------------
+ src/hb-ot-layout-open-private.h | 12 +++---------
+ src/hb-ot-layout.cc | 9 +++++++++
+ src/hb-ot-layout.h | 6 ++++++
+ src/main.cc | 8 ++++----
+ 8 files changed, 62 insertions(+), 66 deletions(-)
+
+commit 855720ca47bf5a7a44eb5b84dce9f7da6e7156bd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 26 12:00:28 2009 -0400
+
+ [HB] Remove more macros
+
+ src/hb-ot-layout-gdef-private.h | 18 +++++++++---------
+ 1 files changed, 9 insertions(+), 9 deletions(-)
+
+commit c968fc2dc87cf85b53f60a40db59d5ee7b992edf
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 25 04:04:24 2009 -0400
+
+ [HB] More buffer cleanup
+
+ src/hb-buffer-private.h | 39 +++--------
+ src/hb-buffer.c | 136
+ +++++++++++++++++-----------------
+ src/hb-buffer.h | 22 +++---
+ src/hb-ot-layout-gpos-private.h | 29 ++++----
+ src/hb-ot-layout-gsub-private.h | 10 ++--
+ src/hb-ot-layout-gsubgpos-private.h | 8 +-
+ src/hb-ot-layout-private.h | 13 +---
+ src/hb-ot-layout.cc | 16 ++--
+ src/hb-private.h | 29 --------
+ 9 files changed, 125 insertions(+), 177 deletions(-)
+
+commit 88a5f5a49b6809d88560791f9cf6b8f78f22a4ad
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 25 03:39:11 2009 -0400
+
+ [HB] Cleanup buffer
+
+ src/hb-buffer-private.h | 2 +-
+ src/hb-buffer.c | 26 +++++++-----
+ src/hb-ot-layout-gsub-private.h | 26 ++++---------
+ src/hb-ot-layout-gsubgpos-private.h | 2 +-
+ src/hb-ot-layout.cc | 71
+ -----------------------------------
+ 5 files changed, 25 insertions(+), 102 deletions(-)
+
+commit 347f0b8621d3adfec157e5634ff3defc818ea37f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 25 03:30:31 2009 -0400
+
+ [HB] Clean more
+
+ src/hb-ot-layout-private.h | 10 ++++------
+ src/hb-ot-layout.cc | 8 ++++----
+ 2 files changed, 8 insertions(+), 10 deletions(-)
+
+commit d9d2a07f4a8696666a12f5a206aa9cfb56dc2b35
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 25 03:24:19 2009 -0400
+
+ [HB] Remove one XXX, add another
+
+ src/hb-buffer.h | 2 ++
+ src/hb-ot-layout-private.h | 3 +--
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 6c78683c042250a7b5a6fc6ebae4717b03fadf9e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 25 03:22:19 2009 -0400
+
+ [HB] Update copyright years
+
+ src/hb-buffer-private.h | 2 +-
+ src/hb-buffer.h | 2 +-
+ src/hb-common.h | 2 +-
+ src/hb-ot-layout-private.h | 2 +-
+ src/hb-ot-layout.h | 2 +-
+ src/hb-private.h | 2 +-
+ 6 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 4497af0069a94c69fc1518b1db2c1282721b732a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 25 03:20:18 2009 -0400
+
+ [HB] Would have helped if I actually knew C++ before using it...
+
+ src/hb-ot-layout-gsubgpos-private.h | 4 ++--
+ src/hb-ot-layout-open-private.h | 24 ++++++++++++------------
+ 2 files changed, 14 insertions(+), 14 deletions(-)
+
+commit cc6c644ff2af5f6669b6ec100ff13e904872b21c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 25 03:10:06 2009 -0400
+
+ [HB] More cleanup
+
+ src/hb-ot-layout-common-private.h | 4 ++--
+ src/hb-ot-layout-open-private.h | 9 +++++----
+ 2 files changed, 7 insertions(+), 6 deletions(-)
+
+commit 20cc86b3592db33731de671f008d7d222776be49
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 25 02:41:49 2009 -0400
+
+ [HB] Simplify Tag
+
+ src/hb-ot-layout-open-private.h | 46
+ +++++++++++++++-----------------------
+ 1 files changed, 18 insertions(+), 28 deletions(-)
+
+commit 3ec0092c5e2d48e8c4fc1618d3bee427adddb1e7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 25 02:34:25 2009 -0400
+
+ [HB] Simplify more
+
+ src/hb-ot-layout-open-private.h | 31 ++++++++++---------------------
+ 1 files changed, 10 insertions(+), 21 deletions(-)
+
+commit 6ad8d5f3c7028147b371137ae4bca6aae66b3489
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 25 02:27:29 2009 -0400
+
+ [HB] Simplify some basic things
+
+ src/hb-ot-layout-open-private.h | 90
+ +++++++++++++++++++++++++-------------
+ src/main.cc | 8 ++-
+ 2 files changed, 64 insertions(+), 34 deletions(-)
+
+commit f96ffd43bce0ac6d9c897933c9be0e51d543e570
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 24 15:01:16 2009 -0400
+
+ [HB] simplify macros
+
+ src/hb-buffer-private.h | 4 ++--
+ src/hb-buffer.h | 4 ++--
+ src/hb-common.h | 8 ++++----
+ src/hb-ot-layout-private.h | 4 ++--
+ src/hb-ot-layout.h | 4 ++--
+ 5 files changed, 12 insertions(+), 12 deletions(-)
+
+commit 8e7b30782a12f3997b9a5a18e6b9d01f6bff8b46
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 24 14:27:24 2009 -0400
+
+ [HB] Update text files
+
+ src/COPYING | 7 -------
+ src/README | 13 ++-----------
+ 2 files changed, 2 insertions(+), 18 deletions(-)
+
+commit fa7d47249496fe00ea1ab6943b385c8dd80e5ce6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 24 14:24:35 2009 -0400
+
+ [HB] Remove stale makefile.msc too
+
+ src/makefile.msc | 19 -------------------
+ 1 files changed, 0 insertions(+), 19 deletions(-)
+
+commit da2c52abcd75d46929b34cad55c4fb2c8892bc08
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 24 14:22:22 2009 -0400
+
+ [HB] Remove old code!
+
+ Goodbye 16 thousand lines of ten-year old code!
+
+ src/harfbuzz-dump-main.c | 97 -
+ src/harfbuzz-dump.c | 768 ------
+ src/harfbuzz-dump.h | 41 -
+ src/harfbuzz-gdef-private.h | 124 -
+ src/harfbuzz-gdef.c | 1160 --------
+ src/harfbuzz-gdef.h | 135 -
+ src/harfbuzz-global.h | 84 -
+ src/harfbuzz-gpos-private.h | 712 -----
+ src/harfbuzz-gpos.c | 6071
+ -----------------------------------------
+ src/harfbuzz-gpos.h | 174 --
+ src/harfbuzz-gsub-private.h | 476 ----
+ src/harfbuzz-gsub.c | 4304 -----------------------------
+ src/harfbuzz-gsub.h | 140 -
+ src/harfbuzz-impl.c | 84 -
+ src/harfbuzz-impl.h | 126 -
+ src/harfbuzz-open-private.h | 102 -
+ src/harfbuzz-open.c | 1405 ----------
+ src/harfbuzz-open.h | 282 --
+ src/harfbuzz-stream-private.h | 83 -
+ src/harfbuzz-stream.c | 257 --
+ src/harfbuzz.c | 31 -
+ src/harfbuzz.h | 35 -
+ 22 files changed, 0 insertions(+), 16691 deletions(-)
+
+commit e5372f1621602dcee4e14a4b22dc182c21502a50
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 24 14:21:27 2009 -0400
+
+ [HB] Remove stale TODO mark
+
+ src/hb-ot-layout-open-private.h | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 96908b898476ca5d7da5f386b15be76f9e83d76e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 24 12:30:40 2009 -0400
+
+ [HB] Add FixedVersion cast to int
+
+ src/hb-ot-layout-open-private.h | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 957740dd253475020a94a62ec5dfcd03e3358176
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 24 12:29:55 2009 -0400
+
+ [HB] Simplify tag
+
+ src/hb-ot-layout-open-private.h | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 87fcdcbe3644da10154688765db2d62eb9ac079a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 24 01:03:24 2009 -0400
+
+ [HB] Remove unused data types
+
+ src/hb-ot-layout-gdef-private.h | 2 +-
+ src/hb-ot-layout-gsubgpos-private.h | 2 +-
+ src/hb-ot-layout-open-private.h | 54
+ +++-------------------------------
+ 3 files changed, 7 insertions(+), 51 deletions(-)
+
+commit 5876bf1b73fcb56cc41b4d348248a4817f9688cb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 24 00:53:28 2009 -0400
+
+ [HB] Simplify version check in GSUB/GPOS
+
+ src/hb-ot-layout-gpos-private.h | 5 ++++-
+ src/hb-ot-layout-gsub-private.h | 5 ++++-
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+commit 212aba6189d7aaac0bab169b77ae6bdab16800a5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 24 00:50:27 2009 -0400
+
+ [HB] Check for GDEF/GSUB/GPOS versions
+
+ src/hb-ot-layout-gdef-private.h | 3 +--
+ src/hb-ot-layout-gpos-private.h | 3 +--
+ src/hb-ot-layout-gsub-private.h | 3 +--
+ src/hb-ot-layout-gsubgpos-private.h | 5 ++---
+ src/hb-ot-layout-open-private.h | 11 ++++++++++-
+ 5 files changed, 15 insertions(+), 10 deletions(-)
+
+commit a21b5062cc32c04eeee3c4b20d26c7e2b34133e9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat May 23 22:39:42 2009 -0400
+
+ [HB] Minor
+
+ src/hb-ot-layout-gdef-private.h | 6 +++---
+ src/hb-ot-layout-open-private.h | 4 ++--
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+commit a080b1cc2f66d6e109d431a1e09519d7cf53bb9a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat May 23 18:50:44 2009 -0400
+
+ [HB] Add TODO items
+
+ src/TODO | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit e4efdd80a8fa4edbcdec9cd84f35f5f4521943c2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 22 18:54:24 2009 -0400
+
+ [GDEF] Add some get_carret_value() code
+
+ src/hb-ot-layout-gdef-private.h | 36
+ ++++++++++++++++++------------------
+ 1 files changed, 18 insertions(+), 18 deletions(-)
+
+commit 9b006bc0322723d065271e4b0ea4f137f81101e1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 22 18:29:45 2009 -0400
+
+ [GPOS] MarkLigPosFormat1
+
+ GPOS is complete now! Yay!
+
+ src/hb-ot-layout-gpos-private.h | 128
+ ++++++++++++++++++++++++++++-----------
+ 1 files changed, 92 insertions(+), 36 deletions(-)
+
+commit 923923feb248250626c637c11a886804011197b0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 22 17:58:09 2009 -0400
+
+ [HB] Remove apply_subtables() again
+
+ src/hb-ot-layout-gpos-private.h | 31 +++++++++++--------------------
+ src/hb-ot-layout-gsub-private.h | 33 ++++++++++++---------------------
+ 2 files changed, 23 insertions(+), 41 deletions(-)
+
+commit d468f9af5b9fdc2713b0b86f28129e4190ee5053
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 21 22:31:33 2009 -0400
+
+ [HB] Share Extension lookup code between GSUB and GPOS
+
+ src/hb-ot-layout-gpos-private.h | 64 +++++----------------------
+ src/hb-ot-layout-gsub-private.h | 83
+ ++++++-----------------------------
+ src/hb-ot-layout-gsubgpos-private.h | 52 ++++++++++++++++++++++
+ 3 files changed, 77 insertions(+), 122 deletions(-)
+
+commit 498f1909e0f7a32484b2058622c4a018cbfc1334
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 21 15:51:04 2009 -0400
+
+ [GPOS] Remove printf. MarkMarkPos1 is working
+
+ The "bug" was in the font.
+
+ src/hb-ot-layout-gpos-private.h | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit c7d457aa3ae7138630f52ca7263f663a3ea284c0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 21 12:46:29 2009 -0400
+
+ [HB] Ouch. Add files.
+
+ src/hb-common.h | 13 ++++-----
+ src/hb-private.h | 74
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++-
+ 2 files changed, 78 insertions(+), 9 deletions(-)
+
+commit fe550f4dd815285e9de8c3cbff810b0a1c7b377f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 21 08:27:07 2009 -0400
+
+ [GPOS] MarkMarkPosFormat1
+
+ Still not quite working.
+
+ src/TODO | 4 +-
+ src/hb-ot-layout-gpos-private.h | 105
+ ++++++++++++++++++++++++++++-----------
+ 2 files changed, 79 insertions(+), 30 deletions(-)
+
+commit 357ccde36bba01a405d59b7da061fc5048cdc7b4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 21 06:32:01 2009 -0400
+
+ [GPOS] MarkBasePosFormat1
+
+ src/TODO | 1 +
+ src/hb-ot-layout-gpos-private.h | 62
+ +++++++++++++++++++++++++++++++++++---
+ 2 files changed, 58 insertions(+), 5 deletions(-)
+
+commit 377bfc5860ae018f54e4a2dd737b4b000383ab54
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 21 04:58:24 2009 -0400
+
+ [GPOS] Implement MarkArray interface
+
+ src/hb-ot-layout-gpos-private.h | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit c18ec2b1d7b8c7abe6ebf4b53c9ec75d5c9bb255
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 21 04:54:01 2009 -0400
+
+ [GPOS] Implement Device support in AnchorFormat3
+
+ src/hb-ot-layout-gpos-private.h | 11 ++++++++---
+ 1 files changed, 8 insertions(+), 3 deletions(-)
+
+commit fca6a0d158b847181dcf67a13f34499177df899b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 21 04:49:04 2009 -0400
+
+ [GPOS] Remove apply_value() return value
+
+ src/hb-ot-layout-gpos-private.h | 75
+ +++++++++++++++++---------------------
+ 1 files changed, 34 insertions(+), 41 deletions(-)
+
+commit fb3b5ccfefc4c38c9184d432703e81f73e1f5bc7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 21 04:47:05 2009 -0400
+
+ [GPOS] Start MarkBasePosFormat1
+
+ src/TODO | 1 +
+ src/hb-ot-layout-gpos-private.h | 38
+ +++++++++++++++++---------------------
+ 2 files changed, 18 insertions(+), 21 deletions(-)
+
+commit ee8776d9e009a7fb8e1f3c1f9cf3ad42d9746a16
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 20 15:46:12 2009 -0400
+
+ [HB] Add TODO item
+
+ src/hb-ot-layout-gpos-private.h | 1 +
+ src/hb-ot-layout-gsub-private.h | 1 +
+ 2 files changed, 2 insertions(+), 0 deletions(-)
+
+commit c6456ca5cfc35095378dcf29f8edc33ece9c3ea1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 20 06:15:23 2009 -0400
+
+ [HB] Add TODO item
+
+ src/TODO | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 3015c4175179a1816aad2a4950da9a3b8baf2578
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 20 06:01:16 2009 -0400
+
+ [HB] Remove last dependence on the old code base!
+
+ src/hb-buffer-private.h | 88
+ +++++++++++++++++++-------------------
+ src/hb-buffer.c | 47 ++++++++++-----------
+ src/hb-ot-layout-gpos-private.h | 11 ++---
+ src/hb-ot-layout-gsub-private.h | 12 +++---
+ src/hb-ot-layout.cc | 16 ++++----
+ 5 files changed, 85 insertions(+), 89 deletions(-)
+
+commit 5c0adce1ccc739415c4b26ff13ffd2d77ea4bc6c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 20 05:42:12 2009 -0400
+
+ [HB] Rename harfbuzz-buffer to hb-buffer
+
+ src/Makefile.am | 5 +-
+ src/harfbuzz-buffer-private.h | 106 -----------
+ src/harfbuzz-buffer.c | 349
+ -----------------------------------
+ src/harfbuzz-buffer.h | 94 ----------
+ src/hb-buffer-private.h | 106 +++++++++++
+ src/hb-buffer.c | 347
+ ++++++++++++++++++++++++++++++++++
+ src/hb-buffer.h | 94 ++++++++++
+ src/hb-ot-layout-gsubgpos-private.h | 2 +-
+ src/hb-ot-layout-private.h | 2 +-
+ src/hb-ot-layout.cc | 5 +-
+ src/hb-ot-layout.h | 2 +-
+ 11 files changed, 556 insertions(+), 556 deletions(-)
+
+commit b857b49c82782d29d6d189f1a9f4a84d39cd84ea
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 20 05:35:14 2009 -0400
+
+ [HB] Remove all references to the old code!
+
+ src/Makefile.am | 76 +++++++---------------
+ src/harfbuzz-buffer.c | 154
+ ++++++++++++++++++--------------------------
+ src/harfbuzz-buffer.h | 80 +++++++++++-----------
+ src/hb-ot-layout-private.h | 6 +-
+ src/hb-ot-layout.cc | 17 ++---
+ src/hb-ot-layout.h | 1 +
+ 6 files changed, 137 insertions(+), 197 deletions(-)
+
+commit e1593a6e620ee6a8184487185d1c95e0d1820ba5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 20 04:51:30 2009 -0400
+
+ [GPOS] Finally it's working, up to Cursive
+
+ Wow, IranNastaliq renders perfectly again!
+
+ src/hb-ot-layout.cc | 24 ++++++++++++++++++++++++
+ src/hb-ot-layout.h | 12 ++++++++++++
+ 2 files changed, 36 insertions(+), 0 deletions(-)
+
+commit 0f7e6b2cead0c7d527ef68ededb27e0afd71d819
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 20 04:16:35 2009 -0400
+
+ [GPOS] Fix more brokenness
+
+ src/Makefile.am | 2 +-
+ src/hb-ot-layout-gpos-private.h | 37
+ ++++++++++++++++++++-----------------
+ src/hb-ot-layout.cc | 7 +++++++
+ src/hb-ot-layout.h | 5 +++++
+ 4 files changed, 33 insertions(+), 18 deletions(-)
+
+commit ff05d257dd43221b7c8ebead188e78495daa8eda
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 20 03:53:00 2009 -0400
+
+ [HB] Move lookup types enum into subtable class
+
+ src/hb-ot-layout-gpos-private.h | 66
+ +++++++++++++++++++-------------------
+ src/hb-ot-layout-gsub-private.h | 44 +++++++++++++-------------
+ 2 files changed, 55 insertions(+), 55 deletions(-)
+
+commit 263bbef7670b59aa88ef9ba910579dfa51226524
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 20 00:00:09 2009 -0400
+
+ [GDEF] Simplify Device access
+
+ src/hb-ot-layout-gdef-private.h | 12 +++---------
+ 1 files changed, 3 insertions(+), 9 deletions(-)
+
+commit 60d77cf05fddc5304b4b1fc19cdedba15cbee1e9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 19 23:58:54 2009 -0400
+
+ [HB] Indentation
+
+ src/hb-ot-layout-common-private.h | 170
+ +++++++++++++++++------------------
+ src/hb-ot-layout-gdef-private.h | 65 +++++++------
+ src/hb-ot-layout-gsubgpos-private.h | 150
+ +++++++++++++++++--------------
+ src/hb-ot-layout-open-private.h | 159
+ +++++++++++++++++----------------
+ src/hb-ot-layout-private.h | 9 ++-
+ 5 files changed, 288 insertions(+), 265 deletions(-)
+
+commit 90de3dfff9e82dae20b7517642511aebaf736b74
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 19 23:43:04 2009 -0400
+
+ [HB] Remove unused methods
+
+ src/hb-ot-layout-common-private.h | 6 ------
+ 1 files changed, 0 insertions(+), 6 deletions(-)
+
+commit 4c44d830d79431fcb143df2b5a29cdc8e8fccef3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 19 23:42:30 2009 -0400
+
+ [HB] Indentation
+
+ src/hb-ot-layout-gpos-private.h | 253
+ +++++++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-private.h | 262
+ +++++++++++++++++++++------------------
+ 2 files changed, 284 insertions(+), 231 deletions(-)
+
+commit d18fd8e3f7185f531fa4c4988d3f5d5c5282b8eb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 19 23:25:41 2009 -0400
+
+ [GPOS] CursivePosFormat1
+
+ src/hb-ot-layout-gpos-private.h | 174
+ +++++++++++++++++++++++++++++++++++++--
+ src/hb-ot-layout-private.h | 2 +-
+ 2 files changed, 169 insertions(+), 7 deletions(-)
+
+commit 70632add333e4ab38f8f485bb87b25116128cf92
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 19 22:30:09 2009 -0400
+
+ [GSUB] PairPosFormat2
+
+ src/hb-ot-layout-gpos-private.h | 43
+ ++++++++++++++++++++++++++++++++++----
+ 1 files changed, 38 insertions(+), 5 deletions(-)
+
+commit b24ecbadf44d56fd3286d1d3ff6928151ccec9bd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 19 22:16:04 2009 -0400
+
+ [GPOS] PairPosFormat1
+
+ src/hb-ot-layout-gpos-private.h | 91
+ +++++++++++++++++++++++++++++++--------
+ 1 files changed, 73 insertions(+), 18 deletions(-)
+
+commit 056c7ec1aea1eca60a3b20b583b8a8072be9d758
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 19:47:52 2009 -0400
+
+ [GPOS] Start filling apply() functions in
+
+ src/harfbuzz-buffer-private.h | 1 +
+ src/harfbuzz-buffer.c | 3 -
+ src/hb-ot-layout-common-private.h | 35 ++++++----
+ src/hb-ot-layout-gpos-private.h | 127
+ +++++++++++++++++++++++++++----------
+ 4 files changed, 116 insertions(+), 50 deletions(-)
+
+commit 4fa77d3c4305a76b956de8c1a9b83a961d035a80
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 18:44:54 2009 -0400
+
+ [HB] Use enums
+
+ src/hb-ot-layout-common-private.h | 14 ++++++++------
+ src/hb-ot-layout-gdef-private.h | 22 +++++++++++++---------
+ 2 files changed, 21 insertions(+), 15 deletions(-)
+
+commit 6b54c5d0446b514fbb6521e7e9e614d153435f0e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 18:30:25 2009 -0400
+
+ [HB] More reference cast simplification
+
+ src/hb-ot-layout-gsub-private.h | 8 ++++----
+ src/hb-ot-layout-gsubgpos-private.h | 28 ++++++++++++++--------------
+ src/hb-ot-layout-open-private.h | 2 +-
+ 3 files changed, 19 insertions(+), 19 deletions(-)
+
+commit eb0dfc830e09405492f494c85380e133ac5d0ea3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 18:22:44 2009 -0400
+
+ [HB] Rename LOOKUP_ARGS to APPLY_ARGS
+
+ src/hb-ot-layout-gpos-private.h | 88
+ +++++++++++++++++-----------------
+ src/hb-ot-layout-gsub-private.h | 84
+ ++++++++++++++++----------------
+ src/hb-ot-layout-gsubgpos-private.h | 90
+ +++++++++++++++++-----------------
+ 3 files changed, 131 insertions(+), 131 deletions(-)
+
+commit 2a8e6accdf798a78ff180dcb593140592d62b872
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 18:21:44 2009 -0400
+
+ [HB] Internally rename position() and substitute() to apply()
+
+ src/hb-ot-layout-gpos-private.h | 110
+ +++++++++++++++++++-------------------
+ src/hb-ot-layout-gsub-private.h | 104
+ ++++++++++++++++++------------------
+ 2 files changed, 107 insertions(+), 107 deletions(-)
+
+commit f6c8a6eacf27fd1c509d07c85985f0367c5e475f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 18:01:19 2009 -0400
+
+ [HB] Simplify casts
+
+ src/hb-ot-layout-gdef-private.h | 2 +-
+ src/hb-ot-layout-gpos-private.h | 6 +++---
+ src/hb-ot-layout-gsub-private.h | 6 +++---
+ src/hb-ot-layout-open-private.h | 10 +++++-----
+ 4 files changed, 12 insertions(+), 12 deletions(-)
+
+commit 9c42f05a5ccbb48a9367b80ecdf3679e88088fcf
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 17:43:49 2009 -0400
+
+ Switch Pango to new, defunt, GPOS
+
+ src/hb-ot-layout-gpos-private.h | 22 +++++++++++++++-------
+ src/hb-ot-layout.cc | 13 +++++++++++++
+ src/hb-ot-layout.h | 5 +++++
+ 3 files changed, 33 insertions(+), 7 deletions(-)
+
+commit 5e5eb0573f7ea2ce2cf037fef0df70a4351e82c0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 17:09:33 2009 -0400
+
+ [HB] Start GPOS!
+
+ src/hb-ot-layout-gpos-private.h | 915
+ +++++++++++++++++++++++++++++++++++++++
+ src/hb-ot-layout-gsub-private.h | 2 -
+ src/hb-ot-layout-private.h | 15 +-
+ src/hb-ot-layout.cc | 5 +-
+ src/hb-ot-layout.h | 8 +-
+ 5 files changed, 936 insertions(+), 9 deletions(-)
+
+commit 64e67f7599deeec98b104f8b70d0d321cf96799d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 15:32:40 2009 -0400
+
+ [GSUB] Minor
+
+ src/hb-ot-layout-gsub-private.h | 16 ++++++----------
+ 1 files changed, 6 insertions(+), 10 deletions(-)
+
+commit d79cae0b4eef8c2694ada791bb8e427c1202875e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 13:50:15 2009 -0400
+
+ [HB] Minor
+
+ src/hb-ot-layout-gsub-private.h | 22 +++++++++++-----------
+ 1 files changed, 11 insertions(+), 11 deletions(-)
+
+commit 8533bb985e6af2b656d7c45620d8f11f36330b85
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 06:00:12 2009 -0400
+
+ [GSUB] Protect against mismatching Extension subtable types
+
+ src/hb-ot-layout-gsub-private.h | 9 ++++++---
+ 1 files changed, 6 insertions(+), 3 deletions(-)
+
+commit 969afd706e9b52adc79f6210c0088b2c6bbae9bc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 05:47:47 2009 -0400
+
+ [GSUB] Implement ReverseChainSingleSubst
+
+ GSUB is done!
+
+ src/hb-ot-layout-gsub-private.h | 55
+ ++++++++++++++++++++++++++---------
+ src/hb-ot-layout-gsubgpos-private.h | 43 ++++++++-------------------
+ 2 files changed, 54 insertions(+), 44 deletions(-)
+
+commit 4acaffd786a11b5bd7d41b39fc65625fd8cd5077
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 05:29:29 2009 -0400
+
+ [HB] Don't use G_LIKELY!
+
+ src/hb-ot-layout-gsub-private.h | 12 ++++++------
+ src/hb-ot-layout-gsubgpos-private.h | 12 ++++++------
+ src/hb-ot-layout-open-private.h | 4 ++--
+ src/hb-ot-layout.cc | 6 +++---
+ 4 files changed, 17 insertions(+), 17 deletions(-)
+
+commit 3dcb12f171ebbf44461e6ce6439d286c9520dd88
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 05:22:32 2009 -0400
+
+ [GSUB] Oops, fix Extension check
+
+ src/hb-ot-layout-gsub-private.h | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit 2e8fb6c38dbc01cb77b384c0ae0212514dfbb588
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 04:37:37 2009 -0400
+
+ [HB] Tweak some constants and fix Coverage
+
+ src/hb-ot-layout-common-private.h | 11 ++++++-----
+ src/hb-ot-layout-gsubgpos-private.h | 2 ++
+ src/hb-ot-layout-open-private.h | 6 +++---
+ 3 files changed, 11 insertions(+), 8 deletions(-)
+
+commit d6aae5f5cad54fc5dac8b0ff10a3921ebda533d4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 04:25:22 2009 -0400
+
+ [HB] Cleanup TODOs
+
+ src/hb-ot-layout-gsub-private.h | 12 ++++++------
+ src/hb-ot-layout-open-private.h | 2 +-
+ src/hb-ot-layout.cc | 4 ++--
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+commit 122f21fb9a3a0b914575929a3be11884f1ae00c0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 04:21:53 2009 -0400
+
+ [GSUB] Fix context_length handling in Ligature too
+
+ src/hb-ot-layout-gsub-private.h | 9 ++++-----
+ src/hb-ot-layout-gsubgpos-private.h | 5 +++--
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 47958dea214fd55725bf04aa13d233870255fb03
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 04:17:47 2009 -0400
+
+ [HB] Minor cleanup
+
+ src/hb-ot-layout-gsubgpos-private.h | 10 ++++------
+ 1 files changed, 4 insertions(+), 6 deletions(-)
+
+commit e73a0c2a903112ce9a35b95e14e10ab8ea2dc337
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 04:15:25 2009 -0400
+
+ [HB] Correctly skip glyphs when applying (Chain)Context lookups
+
+ src/hb-ot-layout-gsubgpos-private.h | 14 +++++++++++---
+ 1 files changed, 11 insertions(+), 3 deletions(-)
+
+commit 7cff75babd64cd49dd2b3faaa15193d12c098f42
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 04:09:05 2009 -0400
+
+ [HB] Fix context_length checking
+
+ src/hb-ot-layout-gsubgpos-private.h | 23 +++++++++++++----------
+ src/hb-ot-layout-open-private.h | 2 +-
+ 2 files changed, 14 insertions(+), 11 deletions(-)
+
+commit d0ba0557007798db2c60ddd0b7a5a0624cd1698d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 03:56:39 2009 -0400
+
+ [HB] ChainContext complete
+
+ IranNastaliq renders perfectly again!
+
+ src/hb-ot-layout-gsubgpos-private.h | 63
+ +++++++++++++++++++++++++---------
+ 1 files changed, 46 insertions(+), 17 deletions(-)
+
+commit e072c24e79f0e7c1e078a87c782ab5dd8f21dcda
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 03:47:31 2009 -0400
+
+ [HB] Implement backtrack matching
+
+ src/hb-ot-layout-gsubgpos-private.h | 61
+ +++++++++++++++++++++++++---------
+ 1 files changed, 45 insertions(+), 16 deletions(-)
+
+commit 02e1e5c63fa4f896053fa3c21e495239e1e9caa2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 02:47:57 2009 -0400
+
+ [HB] One more step to go, for fully working GSUB and ChainContext
+
+ src/hb-ot-layout-gsubgpos-private.h | 107
+ ++++++++++++++++++++---------------
+ 1 files changed, 61 insertions(+), 46 deletions(-)
+
+commit f14c2b7acfba75b8a6880f41ceec758f9a56abce
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 02:36:18 2009 -0400
+
+ [HB] Further modularize Context matching
+
+ src/hb-ot-layout-gsubgpos-private.h | 92
+ ++++++++++++++++++++++++-----------
+ 1 files changed, 63 insertions(+), 29 deletions(-)
+
+commit 13ed4405c558e445b052360f1ed8ee27ecf48e6e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 02:14:37 2009 -0400
+
+ [HB] A step closer to working ChainContext
+
+ src/hb-ot-layout-gsubgpos-private.h | 36
+ +++++++++++++++++++++++++---------
+ 1 files changed, 26 insertions(+), 10 deletions(-)
+
+commit e8cbaaf6d538036ff9b880b018db402e0895ed01
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 02:03:58 2009 -0400
+
+ [HB] Add HeadlessArrayTo<>
+
+ src/hb-ot-layout-gsub-private.h | 10 ++++------
+ src/hb-ot-layout-gsubgpos-private.h | 5 ++---
+ src/hb-ot-layout-open-private.h | 19 +++++++++++++++++++
+ 3 files changed, 25 insertions(+), 9 deletions(-)
+
+commit dcb6b60254951a2831c03f3196962d229f7e556c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 18 01:49:57 2009 -0400
+
+ [HB] More template goodness
+
+ src/hb-ot-layout-gsubgpos-private.h | 37
+ ++++++++++++++--------------------
+ 1 files changed, 15 insertions(+), 22 deletions(-)
+
+commit aa3d7adca5c821c91a2a1b5380fd6b3d19656ab1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 23:17:56 2009 -0400
+
+ [HB] More churning towards ChainContext lookups
+
+ src/hb-ot-layout-common-private.h | 6 +-
+ src/hb-ot-layout-gsub-private.h | 15 +++-
+ src/hb-ot-layout-gsubgpos-private.h | 174
+ +++++++++++++++++++++-------------
+ 3 files changed, 125 insertions(+), 70 deletions(-)
+
+commit 48f16ed96ac7041b511d9e0864623d2aa09c6da3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 22:11:30 2009 -0400
+
+ [HB] Towards sharing Context and ChainContext code
+
+ src/hb-ot-layout-gsubgpos-private.h | 220
+ ++++++++++++++++-------------------
+ 1 files changed, 99 insertions(+), 121 deletions(-)
+
+commit 6cf2a52593cb4b23e3efe5e16228e3172bdcdd05
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 21:11:49 2009 -0400
+
+ [HB] Add check to avoid infinite recursion
+
+ src/hb-ot-layout-gsub-private.h | 12 ++++++++----
+ 1 files changed, 8 insertions(+), 4 deletions(-)
+
+commit 887c4b44165eeb8ac7fb09bc4474d11720b94a9e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 21:06:08 2009 -0400
+
+ [HB] Cosmetic
+
+ src/hb-ot-layout-gsub-private.h | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit ca5290f4994e1b2db4dac03f7a22b7071441ba06
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 20:48:27 2009 -0400
+
+ [HB] Start ChainContext and ReverseChainSingleSubst lookups
+
+ src/hb-ot-layout-gsub-private.h | 269
+ ++++++++---------------------------
+ src/hb-ot-layout-gsubgpos-private.h | 214 +++++++++++++++++++++++++++-
+ 2 files changed, 268 insertions(+), 215 deletions(-)
+
+commit 433f4aea741e39df079126769441b79ab64fd236
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 20:30:05 2009 -0400
+
+ [HB] Remove stale TODO
+
+ src/hb-ot-layout-private.h | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 6f20f72e9c58ba23db2e31afa5d331acfea3d77e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 20:28:01 2009 -0400
+
+ [HB] Split Layout-common tables into new files
+
+ src/hb-ot-layout-common-private.h | 429
+ +++++++++++++++++++++++++++++++++++
+ src/hb-ot-layout-gdef-private.h | 3 +-
+ src/hb-ot-layout-gsub-private.h | 1 +
+ src/hb-ot-layout-gsubgpos-private.h | 2 +
+ src/hb-ot-layout-open-private.h | 408
+ ---------------------------------
+ 5 files changed, 434 insertions(+), 409 deletions(-)
+
+commit f45107fe0904414f1266648a6c42849c494fe611
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 20:13:02 2009 -0400
+
+ [HB] More shuffling
+
+ src/hb-ot-layout-gsub-private.h | 71
+ ++++++++++++++++++++---------------
+ src/hb-ot-layout-gsubgpos-private.h | 30 +++++++++++++++
+ src/hb-ot-layout-open-private.h | 41 --------------------
+ 3 files changed, 71 insertions(+), 71 deletions(-)
+
+commit f8dc67b3c24dfc805da756a73cb217b36e16b4b8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 19:47:54 2009 -0400
+
+ [HB] Cleanup format unions
+
+ src/hb-ot-layout-gdef-private.h | 18 ++++----
+ src/hb-ot-layout-gsub-private.h | 87
+ ++++++++++++++++++-----------------
+ src/hb-ot-layout-gsubgpos-private.h | 16 +++---
+ src/hb-ot-layout-open-private.h | 41 ++++++----------
+ 4 files changed, 77 insertions(+), 85 deletions(-)
+
+commit da1097bc3b1995776c205707fd2b17603b804646
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 19:31:18 2009 -0400
+
+ [HB] Use four bytes for Null Tag, not 5
+
+ src/hb-ot-layout-open-private.h | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 19fc24f268b985d30971307ac2055622d11cb21f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 09:45:32 2009 -0400
+
+ [HB] Couple size checks
+
+ src/hb-ot-layout-gsub-private.h | 7 +++++--
+ src/hb-ot-layout-gsubgpos-private.h | 4 ++--
+ src/hb-ot-layout-open-private.h | 4 ++--
+ 3 files changed, 9 insertions(+), 6 deletions(-)
+
+commit ecf17e849db19599bbb816d0018380ebf979576b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 09:34:41 2009 -0400
+
+ [HB] Propagate property of first glyph
+
+ This slightly grows code size.
+
+ src/hb-ot-layout-gsub-private.h | 100
+ ++++++++++++++++++-----------------
+ src/hb-ot-layout-gsubgpos-private.h | 7 ++-
+ 2 files changed, 56 insertions(+), 51 deletions(-)
+
+commit eca8e33710cfce51454e64d974ff0c28b0eefa14
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 09:07:27 2009 -0400
+
+ [GSUB] Further optimize the main switch
+
+ src/hb-ot-layout-gsub-private.h | 31 +++++++++++++++++--------------
+ 1 files changed, 17 insertions(+), 14 deletions(-)
+
+commit 13068232e7054748ae5ba0d961ee5a95b959e92e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 08:59:01 2009 -0400
+
+ [HB] Unify first glyph property checking
+
+ src/hb-ot-layout-gsub-private.h | 81
+ +++++++++++++++--------------------
+ src/hb-ot-layout-gsubgpos-private.h | 12 -----
+ 2 files changed, 35 insertions(+), 58 deletions(-)
+
+commit 66bf7ce4e3135535c110a917178b84c4a2b1d11f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 08:28:42 2009 -0400
+
+ [HB] Move Context matching logic out of GSUB
+
+ src/hb-ot-layout-gdef-private.h | 2 -
+ src/hb-ot-layout-gsub-private.h | 331
+ +--------------------------------
+ src/hb-ot-layout-gsubgpos-private.h | 347
+ +++++++++++++++++++++++++++++++++++
+ 3 files changed, 352 insertions(+), 328 deletions(-)
+
+commit a1625528cd5ed94bc8f18903da3300e823ee5b54
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 07:52:11 2009 -0400
+
+ [GSUB] Unify ContextSubst matching
+
+ src/hb-ot-layout-gsub-private.h | 378
+ ++++++++++++++++-----------------------
+ 1 files changed, 154 insertions(+), 224 deletions(-)
+
+commit c36238bea40e9e2b589028eb6de0710455b31585
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 07:39:34 2009 -0400
+
+ [HB] Renames
+
+ src/hb-ot-layout-gsub-private.h | 122
+ +++++++++++++++++++-------------------
+ 1 files changed, 61 insertions(+), 61 deletions(-)
+
+commit 15c3e75b39797a153b6bc0598f87b27c4a487228
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 06:03:42 2009 -0400
+
+ [HB] Simplify buffer
+
+ src/harfbuzz-buffer-private.h | 14 ++++++--------
+ src/harfbuzz-buffer.c | 35
+ ++++++++++++++++-------------------
+ src/harfbuzz-gsub.c | 6 +++---
+ src/hb-ot-layout-gsub-private.h | 12 ++++++------
+ 4 files changed, 31 insertions(+), 36 deletions(-)
+
+commit 36f78446cef8a7cbae000d5e742c9d13e1cc7f83
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 05:52:32 2009 -0400
+
+ [HB] Add TODO item
+
+ src/TODO | 1 +
+ src/harfbuzz-buffer.c | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+commit ee58aaebd296ea8237516754fd4e825d524b11b7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 05:14:33 2009 -0400
+
+ [HB] Update copyright years
+
+ src/hb-ot-layout-gdef-private.h | 2 +-
+ src/hb-ot-layout-open-private.h | 2 +-
+ src/hb-ot-layout.cc | 2 +-
+ src/main.cc | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+commit f4c9514935cf97a58dcb3b1962ac3f3b5ba61264
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 04:59:56 2009 -0400
+
+ [HB] Simplify more arrays
+
+ src/hb-ot-layout-open-private.h | 241
+ ++++++++++++++++-----------------------
+ src/hb-ot-layout.cc | 8 +-
+ 2 files changed, 100 insertions(+), 149 deletions(-)
+
+commit c9a7cbe9cb52264af9954e5ce9ac7a45d7e310cd
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 01:22:51 2009 -0400
+
+ [HB] Use ArrayOf<> in GSUB
+
+ src/hb-ot-layout-gdef-private.h | 3 +-
+ src/hb-ot-layout-gsub-private.h | 157
+ +++++++++++++--------------------------
+ src/hb-ot-layout-open-private.h | 5 -
+ 3 files changed, 53 insertions(+), 112 deletions(-)
+
+commit 5f810363acc3ad3cba631a68620e3d37e54c95c4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 00:54:25 2009 -0400
+
+ [HB] Add ArrayOf<>
+
+ src/hb-ot-layout-gdef-private.h | 62 +++++++------------------------
+ src/hb-ot-layout-open-private.h | 77
+ +++++++++++++++++++++++++++++----------
+ 2 files changed, 71 insertions(+), 68 deletions(-)
+
+commit 238c855fcd4f0ef97a94a8662d2a2f2bb5c21ecb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 00:22:37 2009 -0400
+
+ [HB] Use OffsetTo<> for Coverage
+
+ src/hb-ot-layout-gdef-private.h | 1 +
+ src/hb-ot-layout-gsub-private.h | 55
+ +++++++++++++++------------------------
+ src/hb-ot-layout-open-private.h | 10 +------
+ 3 files changed, 23 insertions(+), 43 deletions(-)
+
+commit 3d54bd1293069fc3d3bdeeea8ad45036f3ee65f3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 00:15:51 2009 -0400
+
+ [HB] Use OffsetTo<> in more places
+
+ src/hb-ot-layout-gdef-private.h | 12 +++++-------
+ src/hb-ot-layout-open-private.h | 4 ++++
+ 2 files changed, 9 insertions(+), 7 deletions(-)
+
+commit 9e4d9d7b2721859172bc9c59c1aea27b01eb9c07
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun May 17 00:09:20 2009 -0400
+
+ [HB] Add OffsetTo template.
+
+ src/hb-ot-layout-gdef-private.h | 26 ++++++++++++++------------
+ src/hb-ot-layout-gsub-private.h | 6 +++---
+ src/hb-ot-layout-open-private.h | 27 ++++++++++++++++++---------
+ 3 files changed, 35 insertions(+), 24 deletions(-)
+
+commit e07f89295b9b38d233dfd4acec1f6b4a3416f267
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat May 16 23:20:48 2009 -0400
+
+ [HB] Automate int-type size assertion
+
+ src/hb-ot-layout-open-private.h | 13 +++----------
+ 1 files changed, 3 insertions(+), 10 deletions(-)
+
+commit 8b8358033184198ff638ee1379093717596e162d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat May 16 22:48:14 2009 -0400
+
+ [HB] Use templates for Null objects
+
+ Also use a common pool for all nul-content ones.
+
+ src/hb-ot-layout-gdef-private.h | 12 ++--
+ src/hb-ot-layout-gsub-private.h | 28 ++++----
+ src/hb-ot-layout-open-private.h | 142
+ ++++++++++++++++++++++----------------
+ src/hb-ot-layout.cc | 8 +-
+ 4 files changed, 105 insertions(+), 85 deletions(-)
+
+commit 6e13d4140158aff736647fc53d8c0ae3a02c2afc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat May 16 20:15:16 2009 -0400
+
+ [HB] Remove obsolete comment
+
+ src/hb-ot-layout-gdef-private.h | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 9f721cf380954d67415dbfd0404a983cdd75b7df
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat May 16 19:59:15 2009 -0400
+
+ [GSUB] Start ChainContextSubst
+
+ src/hb-ot-layout-gsub-private.h | 50
+ ++++++++++++++++++++++++++++++--------
+ 1 files changed, 39 insertions(+), 11 deletions(-)
+
+commit 7fca9e5245d2d283e8b5354eb1ddf553a7ffc033
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat May 16 19:44:24 2009 -0400
+
+ [GSUB] Implement ContextSubstFormat3
+
+ src/hb-ot-layout-gsub-private.h | 62
+ ++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 61 insertions(+), 1 deletions(-)
+
+commit 1ff926a5681b5d4bfce65351062cda9dc1ffeba2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 15 20:25:37 2009 -0400
+
+ [GSUB] Implement ContextSubstFormat2
+
+ src/hb-ot-layout-gsub-private.h | 105
+ ++++++++++++++++++++++++++++++++++++---
+ 1 files changed, 97 insertions(+), 8 deletions(-)
+
+commit fc36d9453ed7edb0a570abc44d7caa87aafb0fcf
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 15 20:11:10 2009 -0400
+
+ [GSUB] Add GSUB::substitute_lookup()
+
+ src/hb-ot-layout-gsub-private.h | 7 +++++++
+ src/hb-ot-layout.cc | 5 +----
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+commit c43562b2a7587fa3f9ef4c1c4338e4eda77368b5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 15 18:54:53 2009 -0400
+
+ [GSUB] Finish ContextSubstFormat1
+
+ src/hb-ot-layout-gsub-private.h | 77
+ ++++++++++++++++++++++++++++++---------
+ src/hb-ot-layout-private.h | 14 +++++++
+ src/hb-ot-layout.cc | 13 -------
+ 3 files changed, 74 insertions(+), 30 deletions(-)
+
+commit 5ee21896224e3a9835a9695037a94ccf1c35a217
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 15 13:28:56 2009 -0400
+
+ [HB] Fix typo
+
+ src/hb-ot-layout-open-private.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 6b59c9b445b6d2454008c83a2c7d6a995ea5995e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 15 01:00:36 2009 -0400
+
+ [HB] Add TODO item
+
+ src/TODO | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit c5419b6cf28822e07f1ef9b0394825e9cb01a445
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 8 21:17:56 2009 -0400
+
+ [HB] Remove DEFINE_NON_INSTANTIABLE
+
+ src/hb-ot-layout-gdef-private.h | 2 --
+ src/hb-ot-layout-gsub-private.h | 3 ---
+ src/hb-ot-layout-open-private.h | 18 +-----------------
+ 3 files changed, 1 insertions(+), 22 deletions(-)
+
+commit 0dff25f0368c5f14ebb0a4af35f3bb6658740d57
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 8 21:12:18 2009 -0400
+
+ [HB] Remove get_size()
+
+ src/hb-ot-layout-gdef-private.h | 9 -----
+ src/hb-ot-layout-gsub-private.h | 63
+ ---------------------------------------
+ src/hb-ot-layout-open-private.h | 42 ++------------------------
+ 3 files changed, 3 insertions(+), 111 deletions(-)
+
+commit 25c6c9a3f6c062ec639d9202a8b9844be64d6fc0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 8 19:09:17 2009 -0400
+
+ [GSUB] ContextSubst format 1
+
+ src/hb-ot-layout-gsub-private.h | 52
+ +++++++++++++++++++++++++++++++++-----
+ 1 files changed, 45 insertions(+), 7 deletions(-)
+
+commit f70229510303109bd0f71423cdf13aa200066d17
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri May 8 18:45:53 2009 -0400
+
+ [GSUB] Shuffle
+
+ src/hb-ot-layout-gsub-private.h | 170
+ ++++++++++++++++++++-------------------
+ 1 files changed, 86 insertions(+), 84 deletions(-)
+
+commit a83e08f8728439ef75e3dfab2191ac913d8f907b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu May 7 12:53:02 2009 -0400
+
+ [HarfBuzz] Start a TODO file
+
+ src/TODO | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit eed05b04ebc2cbb3fa699c99200db12a0081cefb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 6 00:25:59 2009 -0400
+
+ [GSUB] minor
+
+ src/hb-ot-layout-open-private.h | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit cdb317bc4e188421cad997b448abb19223d39e96
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed May 6 00:12:29 2009 -0400
+
+ [GSUB] Towards Context subtitutes
+
+ src/hb-ot-layout-gsub-private.h | 137
+ ++++++++++++++++++++++++++++++--------
+ 1 files changed, 108 insertions(+), 29 deletions(-)
+
+commit c9c6a78aec2b16ac06dfca8cbfaf28a77a10bae2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 5 16:22:02 2009 -0400
+
+ [GSUB] Minor refactoring
+
+ src/hb-ot-layout-gsub-private.h | 42
+ +++++++++++++++++++++-----------------
+ 1 files changed, 23 insertions(+), 19 deletions(-)
+
+commit bb3899a579b00134b24df8891b69bf1621a8190f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue May 5 13:25:13 2009 -0400
+
+ [GSUB] Implement ligature substitutions
+
+ src/Makefile.am | 2 +
+ src/hb-ot-layout-gsub-private.h | 113
+ +++++++++++++++++++++++++++++++--------
+ 2 files changed, 93 insertions(+), 22 deletions(-)
+
+commit 38b011a293181856463dd08d43e2106e5bf1d56e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon May 4 20:21:57 2009 -0400
+
+ [GSUB] Hook new GSUB up in Pango
+
+ src/hb-ot-layout-gsub-private.h | 15 ++++++++++-----
+ 1 files changed, 10 insertions(+), 5 deletions(-)
+
+commit a84e71ad11a72feff47ead16772a8c4bcf4f69d5
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 16 16:53:40 2009 -0400
+
+ [GSUB] Start Ligature subtable support
+
+ src/hb-ot-layout-gsub-private.h | 132
+ ++++++++++++++++++++++++++++-----------
+ src/hb-ot-layout.h | 2 +-
+ 2 files changed, 96 insertions(+), 38 deletions(-)
+
+commit 52886ca56b24a8335614b1df16a33dd4e2d7ae56
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 16 14:19:42 2009 -0400
+
+ [GSUB] Implement Alternate subtables
+
+ src/hb-ot-layout-gsub-private.h | 104
+ ++++++++++++++++++++++++++++++++++++---
+ src/hb-ot-layout-open-private.h | 2 +-
+ 2 files changed, 97 insertions(+), 9 deletions(-)
+
+commit 4f27ce7e0213ac5ba356f0fd2ec0a175ffd002e6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 16 13:40:13 2009 -0400
+
+ [GSUB] Implement Extension subtables
+
+ src/hb-ot-layout-gsub-private.h | 169
+ +++++++++++++++++++++++++--------------
+ 1 files changed, 108 insertions(+), 61 deletions(-)
+
+commit 83e61ff4702121d3418fe82a8fe7ef6bb63bb5d2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 16 12:30:51 2009 -0400
+
+ [GSUB] Fix reverse lookup loop like we did in the old code before
+
+ src/hb-ot-layout-gsub-private.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 5a0b791184cf6ef39eae0570e14aca21abc32845
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 16 04:45:30 2009 -0400
+
+ [harfbuzz/GSUB] towards a partially working GSUB
+
+ src/harfbuzz-buffer.c | 2 +-
+ src/harfbuzz-impl.h | 2 +-
+ src/harfbuzz.c | 1 -
+ src/hb-ot-layout-gdef-private.h | 4 +-
+ src/hb-ot-layout-gsub-private.h | 383
+ +++++++++++++++++++++++++++++----------
+ src/hb-ot-layout-open-private.h | 31 +++-
+ src/hb-ot-layout-private.h | 6 +-
+ src/hb-ot-layout.cc | 94 +++++++---
+ src/hb-ot-layout.h | 2 -
+ 9 files changed, 381 insertions(+), 144 deletions(-)
+
+commit 30bd763fa2fa4aceee51433ec9fc8dc28480b5d7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 15 22:56:15 2009 -0400
+
+ Implement the first substitute()
+
+ src/harfbuzz-buffer-private.h | 8 ++--
+ src/harfbuzz-buffer.c | 4 +-
+ src/harfbuzz-buffer.h | 2 +-
+ src/harfbuzz-gdef-private.h | 4 +-
+ src/harfbuzz-gdef.c | 6 +-
+ src/harfbuzz-gdef.h | 2 +-
+ src/harfbuzz-gpos.c | 8 ++--
+ src/harfbuzz-gpos.h | 2 +-
+ src/harfbuzz-gsub.h | 2 +-
+ src/hb-ot-layout-gsub-private.h | 88
+ +++++++++++++++++++++++++++++++++++----
+ src/hb-ot-layout-open-private.h | 2 +-
+ src/hb-ot-layout-private.h | 23 ++++++----
+ src/hb-ot-layout.cc | 54 ++++++++++++++++-------
+ src/hb-ot-layout.h | 2 +-
+ 14 files changed, 151 insertions(+), 56 deletions(-)
+
+commit ce48f03946bef895912019046bdbe62bb1301d0b
+Merge: 0e13bee 2d15e72
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Nov 2 14:35:51 2009 -0500
+
+ Merge harfbuzz-ng
+
+commit 0e13beeb93077750183a8242780158b88df81e26
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Apr 17 17:03:39 2009 -0400
+
+ Use git.mk
+
+ src/Makefile.am | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 2d15e72c75931398db5e027e660f1320bb979117
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Apr 15 19:50:16 2009 -0400
+
+ Give it a start at GSUB
+
+ src/hb-common.h | 5 +-
+ src/hb-ot-layout-gdef-private.h | 24 ++++----
+ src/hb-ot-layout-gsub-private.h | 120
+ ++++++++++++++++++++++++++++++++++++++-
+ src/hb-ot-layout-open-private.h | 51 ++++++++++-------
+ src/hb-ot-layout-private.h | 2 +-
+ src/hb-ot-layout.cc | 63 +++++++++++++++++++-
+ src/hb-ot-layout.h | 29 ++++++++-
+ src/main.cc | 4 +-
+ 8 files changed, 253 insertions(+), 45 deletions(-)
+
+commit 9d870f2a558f4e463e3ff953312202a8d144158b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Apr 9 13:30:26 2009 -0400
+
+ Bug 577952 – Error loading {GDEF,GSUB,GPOS} table 0x6EAD
+
+ Detect TrueType Collections by checking the font data header instead
+ of checking for "face->num_faces >1".
+
+ src/harfbuzz-stream.c | 11 +++++++++--
+ 1 files changed, 9 insertions(+), 2 deletions(-)
+
+commit d49caf1f77743550d83fc7feced1293ba34a4e99
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Mar 2 15:16:11 2009 +0330
+
+ [opentype] Protect against illegal access for arrays of length zero
+
+ src/harfbuzz-gpos.c | 22 ++++++++++++++++++----
+ src/harfbuzz-gsub.c | 6 ++++++
+ 2 files changed, 24 insertions(+), 4 deletions(-)
+
+commit 66871797af194f9d2161faf8bfbc9684f09e207e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Mar 2 14:20:20 2009 +0330
+
+ [opentype] Use size_t instead of uint for malloc wrappers
+
+ src/harfbuzz-impl.c | 4 ++--
+ src/harfbuzz-impl.h | 6 ++++--
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+commit 3664e59c52ed56486a3e38126c0c3abb78f42233
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Mar 2 11:09:29 2009 +0330
+
+ Fix Bug 572529 – Poor -I ordering can break build
+
+ src/Makefile.am | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit aca4d11388eedd532a73bd34747abb65c0ea9291
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Mon Feb 2 00:13:07 2009 +0000
+
+ Allocate all array rows in a single ALLOC call. Saves over 100
+ alloc calls
+
+ 2009-01-31 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/harfbuzz-gpos.c (Load_Mark2Array),
+ (Free_Mark2Array):
+ Allocate all array rows in a single ALLOC call. Saves over
+ 100
+ alloc calls when loading DejaVu Sans,
+
+ src/harfbuzz-gpos.c | 59
+ ++++++++++++++------------------------------------
+ 1 files changed, 17 insertions(+), 42 deletions(-)
+
+commit c561d69c721105b78bb06d1e3c5f21ca314d924a
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Jan 29 09:20:08 2009 +0000
+
+ Remove ClassDef->Defined field. This is the comment accompanying it:
+
+ 2009-01-29 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/harfbuzz-open.h:
+ * pango/opentype/harfbuzz-gdef.c (Make_ClassRange),
+ (HB_GDEF_Build_ClassDefinition):
+ * pango/opentype/harfbuzz-gpos.c (Load_PosClassRule),
+ (Load_ChainPosClassRule):
+ * pango/opentype/harfbuzz-gsub.c (Load_SubClassRule),
+ (Load_ChainSubClassRule):
+ * pango/opentype/harfbuzz-open.c (Load_ClassDef1),
+ (Load_ClassDef2), (_HB_OPEN_Load_ClassDefinition),
+ (_HB_OPEN_Load_EmptyClassDefinition),
+ (_HB_OPEN_Free_ClassDefinition):
+ Remove ClassDef->Defined field. This is the comment
+ accompanying it:
+
+ The `Defined' field is not defined in the OpenType
+ specification
+ but apparently needed for processing fonts like trado.ttf:
+ This
+ font refers to a class which contains not a single element.
+ We
+ map such classes to class 0.
+
+ The comment is correct that trado.ttf (MS Traditional
+ Arabic) uses
+ such classes. However, in my testing I couldn't identify any
+ problems with the font if the special handling is removed.
+ I also
+ processed as many fonts as I could get my hand on and
+ trado.ttf was
+ the only not-totally-broken font hitting the special-case
+ code.
+ DejaVu fonts hit it too, but I'm sure they do not require the
+ special-handling code. Most probably, that code introduces
+ bugs
+ in them.
+
+ The special-casing was consuming lots of memory.
+ EIGHT MEGABYTES
+ for loading DejaVu Sans! While this could be complete
+ fixed, I
+ decided to remove the special-handling code altogether.
+ I don't
+ think it will make any real difference, and if it does,
+ we'll fix
+ fonts. Such hacks will not be in harfbuzz-ng anyway.
+
+ Bug originally reported by nsf.
+
+ src/harfbuzz-gdef.c | 8 --------
+ src/harfbuzz-gpos.c | 32 --------------------------------
+ src/harfbuzz-gsub.c | 31 -------------------------------
+ src/harfbuzz-open.c | 30 +++---------------------------
+ src/harfbuzz-open.h | 8 --------
+ 5 files changed, 3 insertions(+), 106 deletions(-)
+
+commit 9372edd6f020c92609853609dcb504c72551c9c3
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Jan 29 09:19:56 2009 +0000
+
+ Use calloc(), instead of malloc()ing and memset()ing.
+
+ 2009-01-29 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/harfbuzz-impl.c (_hb_alloc): Use calloc(),
+ instead of malloc()ing and memset()ing.
+
+ src/harfbuzz-impl.c | 4 +---
+ 1 files changed, 1 insertions(+), 3 deletions(-)
+
+commit 94c21d26ba878b3168a21f2e76f02bc52e8fe6fd
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Jan 29 09:19:43 2009 +0000
+
+ Remove old cruft.
+
+ 2009-01-29 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/harfbuzz-dump-main.c (main): Remove old
+ cruft.
+
+ src/harfbuzz-dump-main.c | 144
+ +---------------------------------------------
+ 1 files changed, 1 insertions(+), 143 deletions(-)
+
+commit 0a47c4f78e8a9e81cd305f24ec92ea61ead7dd8d
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Jan 29 09:19:20 2009 +0000
+
+ Allocate all array rows in a single ALLOC call. Saves over 2000 alloc
+
+ 2009-01-29 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/harfbuzz-gpos.c (Load_BaseArray),
+ (Free_BaseArray):
+ Allocate all array rows in a single ALLOC call. Saves over
+ 2000
+ alloc calls when loading DejaVu Sans!
+
+ src/harfbuzz-gpos.c | 57
+ +++++++++++++++-----------------------------------
+ 1 files changed, 17 insertions(+), 40 deletions(-)
+
+commit 549be924bccd187f53791dfa27647981ac909545
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Fri Dec 26 02:31:47 2008 +0000
+
+ Bug 469049 – Fix all compiler warnings
+
+ 2008-12-25 Behdad Esfahbod <behdad@gnome.org>
+
+ Bug 469049 – Fix all compiler warnings
+
+ * pango-view/viewer-pangocairo.c (render_callback):
+ * pango/fonts.c (append_field),
+ (pango_font_description_to_string):
+ * pango/opentype/harfbuzz-dump.c:
+ * pango/pango-bidi-type.c
+ (pango_log2vis_get_embedding_levels):
+ * pango/pango-coverage.c (pango_coverage_set):
+ * pango/pango-markup.c (span_parse_func):
+ * pango/pango-renderer.c
+ (pango_renderer_default_draw_error_underline):
+ * pango/pango-utils.c (pango_scan_string):
+ * pango/pangocairo-render.c
+ (pango_cairo_renderer_draw_trapezoid),
+ (draw_error_underline), (pango_cairo_renderer_class_init):
+ Fix all the remaining warnings.
+
+ src/harfbuzz-dump.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 719f9eaa755396ff377da10c5eeced01d3456b1b
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Fri Dec 26 02:31:35 2008 +0000
+
+ Fix more warnings.
+
+ 2008-12-25 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/modules.c (pango_module_load), (script_info_free):
+ * pango/opentype/harfbuzz-gpos.c (HB_Load_GPOS_Table):
+ * pango/pango-bidi-type.c:
+ * pango/pango-coverage.c (pango_coverage_ref),
+ (pango_coverage_unref):
+ * pango/pango-engine.c (pango_engine_shape_real_covers),
+ (fallback_engine_shape), (fallback_engine_covers):
+ * pango/pango-fontmap.c (pango_font_map_init):
+ * pango/pango-ot-ruleset.c (pango_ot_ruleset_finalize),
+ (pango_ot_ruleset_new):
+ * pango/pangofc-decoder.c (pango_fc_decoder_init),
+ (pango_fc_decoder_class_init):
+ * pango/pangofc-font.c (pango_fc_font_find_shaper),
+ (pango_fc_font_get_coverage):
+ * pango/pangofc-fontmap.c (pango_fc_font_map_list_families),
+ (pango_fc_make_pattern), (pango_fc_font_map_get_patterns),
+ (get_first_font), (_pango_fc_font_map_get_coverage),
+ (cleanup_font), (pango_fc_font_description_from_pattern),
+ (pango_fc_face_list_sizes), (pango_fc_family_list_faces):
+ * pango/pangoft2-fontmap.c
+ (pango_ft2_font_map_get_resolution):
+ * pango/pangoft2-render.c (pango_ft2_renderer_init),
+ (pango_ft2_renderer_draw_trapezoid):
+ * pango/pangoft2.c (pango_ft2_font_get_face),
+ (pango_ft2_font_real_unlock_face),
+ (pango_ft2_free_glyph_info_callback):
+ Fix more warnings.
+
+ src/harfbuzz-gpos.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 21f7d507f4b50e2743ab47954270f4c72d5a722a
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Wed Oct 15 03:45:29 2008 +0000
+
+ Bug 528272 – "Error loading GPOS table 5503" when using katakana
+
+ 2008-10-14 Behdad Esfahbod <behdad@gnome.org>
+
+ Bug 528272 – "Error loading GPOS table 5503" when using
+ katakana
+ characters
+
+ * pango/opentype/harfbuzz-gpos.c (Load_Mark2Array): Skip
+ parsing
+ null anchor tables.
+
+ src/harfbuzz-gpos.c | 7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit a26c6ae70502b4d60c52a0648662b1619c688b9a
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Mon Sep 29 22:28:47 2008 +0000
+
+ Fix left-to-right positioning. Reported by Peter Hunter.
+
+ 2008-09-29 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/harfbuzz-gpos.c (Position_CursiveChain):
+ Fix left-to-right positioning. Reported by Peter Hunter.
+
+ src/harfbuzz-gpos.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b6c06c56a33f1e1ec15e3b525ecafe8fadc679db
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Sun Jun 29 18:30:14 2008 +0000
+
+ Bug 540592 – Crash in HB_GSUB_Apply_String with Linux-Libertine font
+
+ 2008-06-29 Behdad Esfahbod <behdad@gnome.org>
+
+ Bug 540592 – Crash in HB_GSUB_Apply_String with
+ Linux-Libertine font
+
+ * pango/opentype/harfbuzz-gsub.c (GSUB_Do_String_Lookup):
+ Fix reverse
+ loops for type 8 lookups.
+
+ src/harfbuzz-gsub.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit c44733596c6648e209c12349e18e35424edf3d59
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Feb 18 21:14:23 2008 -0500
+
+ [hb-ot-layout] Add proper namespace to accessors
+
+ src/hb-ot-layout.cc | 165
+ +++++++++++++++++++++++++++++++++++++-------------
+ src/hb-ot-layout.h | 115 +++++++++++++++++++++++------------
+ 2 files changed, 198 insertions(+), 82 deletions(-)
+
+commit 57225672098ebdafb0c06ae091a1b55635daca29
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Feb 18 20:58:39 2008 -0500
+
+ Fix typo, add TODOs
+
+ src/hb-ot-layout-open-private.h | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 4a26ea408c87f0bb59deca9ff44008d138471aa3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jan 28 07:40:10 2008 -0500
+
+ Finish script, language, and feature public API
+
+ src/hb-ot-layout-open-private.h | 22 ++++++---
+ src/hb-ot-layout.cc | 107
+ +++++++++++++++++++++++++++++++--------
+ src/hb-ot-layout.h | 34 ++++++++++++-
+ 3 files changed, 132 insertions(+), 31 deletions(-)
+
+commit 706ab25a4cb043d46e6088aa0a7184ee200276c9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jan 28 05:58:50 2008 -0500
+
+ Add script and language public getter API
+
+ src/hb-ot-layout-open-private.h | 40 ++++++++-----
+ src/hb-ot-layout.cc | 127
+ ++++++++++++++++++++++++++++++++++++++-
+ src/hb-ot-layout.h | 56 +++++++++++++++++
+ src/main.cc | 2 +-
+ 4 files changed, 207 insertions(+), 18 deletions(-)
+
+commit 40a81314fa3eb7c701aea47b43f81bfad985f717
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jan 28 02:30:48 2008 -0500
+
+ Make main.cc compile again, which means finished getter API
+
+ src/hb-ot-layout-open-private.h | 117
+ ++++++++++++++++++++++++++++----------
+ src/main.cc | 99 +++++++++++++++++++++++----------
+ 2 files changed, 155 insertions(+), 61 deletions(-)
+
+commit e50c3978d37b2c0d6ddd4ced6a6196f6857cd596
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jan 28 00:16:49 2008 -0500
+
+ Rename HB_OT_Layout to hb_ot_layout_t
+
+ src/hb-ot-layout-private.h | 8 ++++----
+ src/hb-ot-layout.cc | 34 +++++++++++++++++-----------------
+ src/hb-ot-layout.h | 33 +++++++++++++++------------------
+ 3 files changed, 36 insertions(+), 39 deletions(-)
+
+commit dfa811965133bc4d1696fa5a0166e17ed4142c98
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Jan 28 00:12:21 2008 -0500
+
+ Rename hb_ot_layout_create() to hb_ot_layout_create_for_data()
+
+ src/hb-ot-layout.cc | 4 ++--
+ src/hb-ot-layout.h | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 54e5aac5e2947d4e2864c6f2987e4d275da73100
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun Jan 27 21:19:51 2008 -0500
+
+ GDEF completely working now
+
+ src/hb-ot-layout-open-private.h | 11 ++++++++---
+ src/hb-ot-layout-private.h | 16 +++++++++-------
+ src/hb-ot-layout.cc | 19 +++++++++----------
+ src/hb-private.h | 7 +++++++
+ src/main.cc | 12 ++++++------
+ 5 files changed, 39 insertions(+), 26 deletions(-)
+
+commit 6f425b11799aa20dab553085f05744191b7318e2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 24 19:38:56 2008 -0500
+
+ [GDEF] Finish internal API
+
+ src/hb-ot-layout-private.h | 15 ++++++-
+ src/hb-ot-layout.cc | 95
+ +++++++++++++++++++++-----------------------
+ src/hb-ot-layout.h | 16 ++++----
+ 3 files changed, 66 insertions(+), 60 deletions(-)
+
+commit 590d55cbb9e21ef74dfd88eee51fd0a763958cd2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 24 19:13:50 2008 -0500
+
+ [GDEF] Finish public API
+
+ src/hb-common.h | 11 ++++
+ src/hb-ot-layout-gdef-private.h | 28 ++++-----
+ src/hb-ot-layout-open-private.h | 25 +++++---
+ src/hb-ot-layout-private.h | 23 ++------
+ src/hb-ot-layout.cc | 123
+ ++++++++++++++++++++++++++++++++++++---
+ src/hb-ot-layout.h | 29 +++++----
+ 6 files changed, 176 insertions(+), 63 deletions(-)
+
+commit aff831ed6787abe8e24a977e34d97ff2e0b7dc21
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 24 06:03:45 2008 -0500
+
+ Implement glyph properties
+
+ src/hb-ot-layout-gdef-private.h | 10 ++++-
+ src/hb-ot-layout-private.h | 16 ++++++-
+ src/hb-ot-layout.cc | 84
+ +++++++++++++++++++++++++++++++++++---
+ src/hb-ot-layout.h | 25 ++++++++---
+ 4 files changed, 117 insertions(+), 18 deletions(-)
+
+commit ead428d7a0bf4dc84340a99f3959e5cc58123e99
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 24 03:54:09 2008 -0500
+
+ More public api
+
+ src/hb-ot-layout-open-private.h | 32 +++++++++++++++++++-------------
+ src/hb-ot-layout-private.h | 9 ++++++---
+ src/hb-ot-layout.cc | 21 ++++++++++++++-------
+ src/hb-ot-layout.h | 2 --
+ 4 files changed, 39 insertions(+), 25 deletions(-)
+
+commit fd92a3dde32fd10df30c9eeb97641bc3c15b1e9b
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jan 24 03:11:09 2008 -0500
+
+ Starting public interface
+
+ src/Makefile | 11 -----
+ src/Makefile.ng | 11 +++++
+ src/hb-ot-layout-gdef-private.h | 17 +++----
+ src/hb-ot-layout-gsub-private.h | 3 +-
+ src/hb-ot-layout-open-private.h | 92
+ ++++++++++++++++++++++++++++-----------
+ src/hb-ot-layout-private.h | 51 +++++++++++++++++++++
+ src/hb-ot-layout.cc | 67 ++++++++++++++++++++++++++++
+ src/hb-ot-layout.h | 35 +++++++++++++-
+ src/main.cc | 1 +
+ 9 files changed, 236 insertions(+), 52 deletions(-)
+
+commit 7d6b95b000ec6cd8ca93113b2d81a049ad2f9bbe
+Author: Behdad Esfahbod <behdad@src.gnome.org>
+Date: Thu Jan 24 04:42:24 2008 +0000
+
+ Remove unused macro
+
+ src/harfbuzz-impl.h | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 7586089c6fa8185cad8387869d3703c637e5cbb1
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jan 23 18:02:28 2008 -0500
+
+ Minor
+
+ src/hb-ot-layout-gdef-private.h | 37 +++++++++++++++++++++++-----
+ src/hb-ot-layout-gsub-private.h | 13 ++++++++++
+ src/hb-ot-layout-open-private.h | 49
+ ++++++++++++++++++++++++++++++++------
+ src/hb-private.h | 2 +
+ 4 files changed, 86 insertions(+), 15 deletions(-)
+
+commit aefaafe5bc4fc6d37a412c135b1079c287be7045
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jan 23 17:25:29 2008 -0500
+
+ Minor renaming
+
+ src/hb-ot-layout-gdef-private.h | 10 +++++-----
+ src/hb-ot-layout-open-private.h | 16 +++++++---------
+ src/main.cc | 4 ++--
+ 3 files changed, 14 insertions(+), 16 deletions(-)
+
+commit a16ecbf0564a6e2576da22c12827f3c0719da549
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jan 23 17:01:55 2008 -0500
+
+ Initial gsub stub
+
+ src/hb-ot-layout-gdef-private.h | 4 +
+ src/hb-ot-layout-gsub-private.h | 453
+ +++++++++++++++++++++++++++++++++++++++
+ src/hb-ot-layout-open-private.h | 3 +
+ src/main.cc | 1 +
+ 4 files changed, 461 insertions(+), 0 deletions(-)
+
+commit 64aef3a54999496fd1de4f5aa5b019e4c03b3836
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jan 23 16:14:38 2008 -0500
+
+ Add copyright notices.
+
+ src/hb-common.h | 26 ++++++++++++++++++++++++++
+ src/hb-ot-layout-gdef-private.h | 26 ++++++++++++++++++++++++++
+ src/hb-ot-layout-open-private.h | 26 ++++++++++++++++++++++++++
+ src/hb-ot-layout.h | 26 ++++++++++++++++++++++++++
+ src/hb-private.h | 26 ++++++++++++++++++++++++++
+ src/main.cc | 26 ++++++++++++++++++++++++++
+ 6 files changed, 156 insertions(+), 0 deletions(-)
+
+commit 12360f7c159826ae72271b34486dee59d96aa8ca
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jan 23 15:50:38 2008 -0500
+
+ Minor cleanup, add LIKELY and UNLIKELY annotations
+
+ src/hb-ot-layout-gdef-private.h | 63
+ ++++++++++++++++++++++----------------
+ src/hb-ot-layout-open-private.h | 36 +++++++---------------
+ src/hb-private.h | 15 +++++++++
+ 3 files changed, 63 insertions(+), 51 deletions(-)
+
+commit 8dd1c8b8d6797d899d0f5b0a8015886bf6520ca2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jan 23 05:00:30 2008 -0500
+
+ Clean up file names, add namespace
+
+ src/harfbuzz-common.h | 14 -
+ src/harfbuzz-gdef-private.h | 213 -----------
+ src/harfbuzz-gdef.h | 11 -
+ src/harfbuzz-open-private.h | 804
+ ---------------------------------------
+ src/harfbuzz-open.h | 17 -
+ src/harfbuzz-private.h | 12 -
+ src/hb-common.h | 14 +
+ src/hb-ot-layout-gdef-private.h | 213 +++++++++++
+ src/hb-ot-layout-open-private.h | 804
+ +++++++++++++++++++++++++++++++++++++++
+ src/hb-ot-layout.h | 17 +
+ src/hb-private.h | 12 +
+ src/main.cc | 4 +-
+ 12 files changed, 1062 insertions(+), 1073 deletions(-)
+
+commit 1f437e6f47fb6c15761021bd2078f31778f2179c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jan 23 04:36:40 2008 -0500
+
+ Make all code NULL-free and assert-free
+
+ src/harfbuzz-gdef-private.h | 125 +++++++++----------
+ src/harfbuzz-open-private.h | 285
+ ++++++++++++++++++++++--------------------
+ src/main.cc | 8 +-
+ 3 files changed, 214 insertions(+), 204 deletions(-)
+
+commit 600e5eb80f553ea8eb862e6784133574c74ca513
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jan 23 02:01:37 2008 -0500
+
+ Define get_for_data() factories
+
+ src/harfbuzz-gdef-private.h | 3 +++
+ src/harfbuzz-open-private.h | 42
+ +++++++++++++++++++++++++++++-------------
+ src/main.cc | 10 ++++------
+ 3 files changed, 36 insertions(+), 19 deletions(-)
+
+commit b9d7688fb3d45894901484b74095c4f11cab6196
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jan 23 01:38:10 2008 -0500
+
+ Finish and test GDEF
+
+ src/harfbuzz-gdef-private.h | 72
+ ++++++++++++++++++++++++++++++------------
+ src/harfbuzz-open-private.h | 23 +++++++------
+ src/harfbuzz-open.h | 4 ++
+ src/main.cc | 10 ++++++
+ 4 files changed, 77 insertions(+), 32 deletions(-)
+
+commit 303fe62824d4e99df554b6bfaacba05d068522fb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Jan 23 00:20:48 2008 -0500
+
+ Misc cleanup
+
+ src/Makefile | 10 +++-
+ src/harfbuzz-gdef-private.h | 65 +++++++++++++++++++++------
+ src/harfbuzz-open-private.h | 102
+ +++++++++++++++++++++++++++++++++++++++----
+ src/harfbuzz-private.h | 6 +++
+ src/main.cc | 12 +++---
+ 5 files changed, 163 insertions(+), 32 deletions(-)
+
+commit 17843245fde4cc8cddc7da8ef30357d3d8778187
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Wed Jan 16 20:39:29 2008 +0000
+
+ Remove COPYING.GPL and COPYING.FTL that are no longer there.
+
+ 2008-01-16 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/Makefile.am: Remove COPYING.GPL and
+ COPYING.FTL that
+ are no longer there.
+
+ src/Makefile.am | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit a2a9a023f6472ba262f89e5327318996b8258d25
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Tue Jan 15 22:46:32 2008 +0000
+
+ HarfBuzz was relicensed to a more generous and simpler
+ license. Adapt. See
+
+ 2008-01-15 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/*:
+ HarfBuzz was relicensed to a more generous and simpler
+ license.
+ Adapt. See pango/opentype/COPYING for the new license
+ which is
+ LGPL-compatible.
+
+ src/COPYING | 39 +++--
+ src/COPYING.FTL | 174 ---------------------
+ src/COPYING.GPL | 340
+ -----------------------------------------
+ src/harfbuzz-buffer-private.h | 32 +++-
+ src/harfbuzz-buffer.c | 27 +++-
+ src/harfbuzz-buffer.h | 32 +++-
+ src/harfbuzz-dump-main.c | 34 +++--
+ src/harfbuzz-dump.c | 34 +++--
+ src/harfbuzz-dump.h | 35 +++--
+ src/harfbuzz-gdef-private.h | 29 +++-
+ src/harfbuzz-gdef.c | 29 +++-
+ src/harfbuzz-gdef.h | 29 +++-
+ src/harfbuzz-global.h | 29 +++-
+ src/harfbuzz-gpos-private.h | 29 +++-
+ src/harfbuzz-gpos.c | 31 +++-
+ src/harfbuzz-gpos.h | 29 +++-
+ src/harfbuzz-gsub-private.h | 29 +++-
+ src/harfbuzz-gsub.c | 31 +++-
+ src/harfbuzz-gsub.h | 29 +++-
+ src/harfbuzz-impl.c | 31 +++-
+ src/harfbuzz-impl.h | 29 +++-
+ src/harfbuzz-open-private.h | 29 +++-
+ src/harfbuzz-open.c | 29 +++-
+ src/harfbuzz-open.h | 29 +++-
+ src/harfbuzz-stream-private.h | 29 +++-
+ src/harfbuzz-stream.c | 31 +++-
+ src/harfbuzz.c | 28 +++-
+ src/harfbuzz.h | 29 +++-
+ 28 files changed, 564 insertions(+), 741 deletions(-)
+
+commit 4ccedd22eaa6e47bd8bbf255627a8b55fbb44736
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Wed Dec 5 03:41:29 2007 +0000
+
+ Bug 501575 – Compile errors Patch from Jens Granseuer
+
+ 2007-12-04 Behdad Esfahbod <behdad@gnome.org>
+
+ Bug 501575 – Compile errors
+ Patch from Jens Granseuer
+
+ * pango/opentype/harfbuzz-stream.c (_hb_font_goto_table):
+ * pango/pango-utils.c (handle_alias_line):
+ Fix C99ism.
+
+ src/harfbuzz-stream.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit cd55cfa2b0a1fe35d5a4ad1c8feaa399d7fb7ab3
+Author: Behdad Esfahbod <behdad@src.gnome.org>
+Date: Fri Nov 30 04:31:29 2007 +0000
+
+ Undo accidental change.
+
+ src/harfbuzz-impl.c | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 3f05da638c8d7b13e7f860aeda1a6321e5ebd92e
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Fri Nov 30 04:29:58 2007 +0000
+
+ Bug 485536 – underline_position can be zero
+
+ 2007-11-29 Behdad Esfahbod <behdad@gnome.org>
+
+ Bug 485536 – underline_position can be zero
+
+ * pango/pango-utils.c (pango_cairo_quantize_line_geometry):
+ Document that returned position may be zero.
+
+ * pango/pangocairo-win32font.c
+ (pango_cairo_win32_font_create_metrics_for_context):
+ * pango/pangofc-font.c (get_face_metrics):
+ Handle case of underline_position==0 after rounding.
+
+ src/harfbuzz-impl.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit e58278fedb67cbaac4bf4d6dfc33209cb22eec08
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Sat Nov 24 01:40:13 2007 +0000
+
+ Remove unused macro.
+
+ 2007-11-23 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/harfbuzz-impl.c: Remove unused macro.
+
+ src/harfbuzz-impl.c | 18 ------------------
+ 1 files changed, 0 insertions(+), 18 deletions(-)
+
+commit 3b047380aec4ccc707c4579327d54172c19820fd
+Author: Behdad Esfahbod <behdad@src.gnome.org>
+Date: Sun Nov 18 22:34:08 2007 +0000
+
+ Minor
+
+ src/harfbuzz-dump-main.c | 4 +-
+ src/harfbuzz-stream.c | 89
+ ++++++++++++++++++++++-----------------------
+ 2 files changed, 46 insertions(+), 47 deletions(-)
+
+commit 10d6a25a26bdbab4ece4edf0e34ffd3d22410ebe
+Author: Behdad Esfahbod <behdad@src.gnome.org>
+Date: Wed Nov 7 10:04:11 2007 +0000
+
+ Remove dead code.
+
+ src/harfbuzz-gdef.c | 88
+ ---------------------------------------------------
+ src/harfbuzz-gpos.h | 4 +--
+ 2 files changed, 1 insertions(+), 91 deletions(-)
+
+commit 47d2c33e3d099fae79e199367de5011bc5c12273
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Wed Nov 7 09:59:18 2007 +0000
+
+ And some more.
+
+ 2007-11-07 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/*: And some more.
+
+ src/harfbuzz-buffer.h | 8 ++--
+ src/harfbuzz-dump-main.c | 22 +++++-----
+ src/harfbuzz-gdef.c | 14 +++---
+ src/harfbuzz-gdef.h | 4 +-
+ src/harfbuzz-global.h | 21 +++++-----
+ src/harfbuzz-gpos.c | 82
+ ++++++++++++++++++++---------------------
+ src/harfbuzz-gpos.h | 12 +++---
+ src/harfbuzz-gsub.c | 4 +-
+ src/harfbuzz-gsub.h | 4 +-
+ src/harfbuzz-stream-private.h | 4 +-
+ src/harfbuzz-stream.c | 16 ++++----
+ 11 files changed, 95 insertions(+), 96 deletions(-)
+
+commit 78ef65ba08967fe1b5f97bcb27074bd635f4b898
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Wed Nov 7 08:06:01 2007 +0000
+
+ Some more cleanup and merging.
+
+ 2007-11-07 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/*: Some more cleanup and merging.
+
+ src/Makefile.am | 6 +-
+ src/harfbuzz-buffer-private.h | 33 ++++++
+ src/harfbuzz-buffer.c | 4 +-
+ src/harfbuzz-dump-main.c | 3 +-
+ src/harfbuzz-gdef-private.h | 9 ++-
+ src/harfbuzz-gdef.c | 39 +++++++
+ src/harfbuzz-global.h | 2 +
+ src/harfbuzz-gpos-private.h | 1 +
+ src/harfbuzz-gpos.c | 32 +-----
+ src/harfbuzz-gsub-private.h | 1 +
+ src/harfbuzz-gsub.c | 33 +-----
+ src/harfbuzz-impl.c | 216
+ ++------------------------------------
+ src/harfbuzz-impl.h | 100 +-----------------
+ src/harfbuzz-open-private.h | 4 +-
+ src/harfbuzz-stream-private.h | 70 ++++++++++++
+ src/harfbuzz-stream.c | 234
+ +++++++++++++++++++++++++++++++++++++++++
+ src/harfbuzz.c | 1 +
+ src/harfbuzz.h | 3 +-
+ 18 files changed, 419 insertions(+), 372 deletions(-)
+
+commit 5c9bd379950d914982bdb91d0f82b8036908db37
+Author: Behdad Esfahbod <behdad@src.gnome.org>
+Date: Mon Oct 29 23:51:48 2007 +0000
+
+ Fix typo.
+
+ src/Makefile.am | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit ef1f481752fa6e478f649e826c96927c98f21981
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Oct 25 23:37:11 2007 +0000
+
+ Even more cleanup and more type renames.
+
+ 2007-10-25 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/*: Even more cleanup and more type renames.
+
+ src/harfbuzz-buffer.h | 3 +--
+ src/harfbuzz-global.h | 6 ++++++
+ src/harfbuzz-impl.c | 16 ++++++++--------
+ src/harfbuzz-impl.h | 22 +++++++++++-----------
+ src/harfbuzz-open.h | 3 ---
+ 5 files changed, 26 insertions(+), 24 deletions(-)
+
+commit 282c60a0eea0db784b0a094958bec35b5f3dc399
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Oct 25 23:22:17 2007 +0000
+
+ More cleanup, remove redundant error types.
+
+ 2007-10-25 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/*: More cleanup, remove redundant error
+ types.
+
+ src/harfbuzz-dump-main.c | 4 +-
+ src/harfbuzz-dump.c | 14 +++---
+ src/harfbuzz-gdef.c | 25 +++++-----
+ src/harfbuzz-gdef.h | 3 -
+ src/harfbuzz-global.h | 31 ++++++-----
+ src/harfbuzz-gpos.c | 124
+ +++++++++++++++++++++++-----------------------
+ src/harfbuzz-gpos.h | 3 -
+ src/harfbuzz-gsub.c | 86 ++++++++++++++++----------------
+ src/harfbuzz-gsub.h | 3 -
+ src/harfbuzz-impl.c | 18 +++---
+ src/harfbuzz-impl.h | 2 +
+ src/harfbuzz-open.c | 24 +++++-----
+ src/harfbuzz-open.h | 6 +-
+ 13 files changed, 170 insertions(+), 173 deletions(-)
+
+commit 4280ec4df45ae86c10c3cd24ddb9c05e47223d39
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Oct 25 00:23:46 2007 +0000
+
+ Rename ftglue.c to harfbuzz-impl.c and more type renames and
+ moving code
+
+ 2007-10-24 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/*: Rename ftglue.c to harfbuzz-impl.c
+ and more
+ type renames and moving code around.
+
+ src/Makefile.am | 3 +-
+ src/ftglue.c | 287
+ -------------------------------------------
+ src/ftglue.h | 151 -----------------------
+ src/harfbuzz-dump-main.c | 48 +-------
+ src/harfbuzz-dump.c | 30 +++---
+ src/harfbuzz-gdef.c | 18 ++--
+ src/harfbuzz-global.h | 18 +++
+ src/harfbuzz-gpos-private.h | 2 +-
+ src/harfbuzz-gpos.c | 90 +++++++-------
+ src/harfbuzz-gsub-private.h | 2 +-
+ src/harfbuzz-gsub.c | 64 +++++-----
+ src/harfbuzz-impl.c | 283
+ ++++++++++++++++++++++++++++++++++++++++++
+ src/harfbuzz-impl.h | 114 ++++++++++++++++-
+ src/harfbuzz-open-private.h | 14 +-
+ src/harfbuzz-open.c | 32 +++---
+ src/harfbuzz-open.h | 16 ---
+ src/harfbuzz.c | 4 +-
+ 17 files changed, 542 insertions(+), 634 deletions(-)
+
+commit 5716ae278a82d318ddbfeba01d0785d4efbe1454
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Wed Oct 24 22:44:47 2007 +0000
+
+ New header file harfbuzz-global.h. Rename FT_* int types to HB_*
+ types.
+
+ 2007-10-24 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/*: New header file harfbuzz-global.h. Rename
+ FT_* int types to HB_* types.
+
+ src/Makefile.am | 1 +
+ src/ftglue.c | 30 ++--
+ src/ftglue.h | 26 +-
+ src/harfbuzz-buffer-private.h | 26 +-
+ src/harfbuzz-buffer.c | 40 ++--
+ src/harfbuzz-buffer.h | 42 ++--
+ src/harfbuzz-dump-main.c | 24 +-
+ src/harfbuzz-dump.c | 14 +-
+ src/harfbuzz-dump.h | 4 +-
+ src/harfbuzz-gdef-private.h | 30 ++--
+ src/harfbuzz-gdef.c | 104 ++++----
+ src/harfbuzz-gdef.h | 32 ++--
+ src/harfbuzz-global.h | 34 +++
+ src/harfbuzz-gpos-private.h | 182 +++++++-------
+ src/harfbuzz-gpos.c | 540
+ ++++++++++++++++++++--------------------
+ src/harfbuzz-gpos.h | 52 ++--
+ src/harfbuzz-gsub-private.h | 142 ++++++------
+ src/harfbuzz-gsub.c | 432 ++++++++++++++++----------------
+ src/harfbuzz-gsub.h | 50 ++--
+ src/harfbuzz-impl.h | 6 +-
+ src/harfbuzz-open-private.h | 26 +-
+ src/harfbuzz-open.c | 146 ++++++------
+ src/harfbuzz-open.h | 88 ++++----
+ src/harfbuzz.h | 1 +
+ 24 files changed, 1056 insertions(+), 1016 deletions(-)
+
+commit 2130d852c76cccb94350a4aea222359640ffa8a4
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Wed Oct 24 21:35:03 2007 +0000
+
+ Add commented-out dummy struct for Extension lookups.
+
+ 2007-10-24 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/harfbuzz-gpos-private.h:
+ * pango/opentype/harfbuzz-gsub-private.h:
+ Add commented-out dummy struct for Extension lookups.
+
+ src/harfbuzz-gpos-private.h | 13 +++++++++++++
+ src/harfbuzz-gsub-private.h | 13 +++++++++++++
+ 2 files changed, 26 insertions(+), 0 deletions(-)
+
+commit 13b2b963848ada169c2fe3d3669fbc1c337f7fe7
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Sun Oct 21 18:17:02 2007 +0000
+
+ Bug 488840 – harfbuzz: protect against ligid overflow
+
+ 2007-10-21 Behdad Esfahbod <behdad@gnome.org>
+
+ Bug 488840 – harfbuzz: protect against ligid overflow
+
+ * pango/opentype/harfbuzz-buffer.c
+ (_hb_buffer_allocate_ligid):
+ Never return zero, even in case of overflow.
+
+ * pango/opentype/harfbuzz-impl.h: Define dummy HB_LIKELY() and
+ HB_UNLIKELY(), to be filled later.
+
+ src/harfbuzz-buffer.c | 6 +++++-
+ src/harfbuzz-impl.h | 3 +++
+ 2 files changed, 8 insertions(+), 1 deletions(-)
+
+commit 6b347138b597c41af24453f630336ba2fc033dc5
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Oct 11 08:30:50 2007 +0000
+
+ Mark internal symbols as HB_INTERNAL and define that to static in
+
+ 2007-10-11 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/*: Mark internal symbols as HB_INTERNAL and
+ define that to static in harfbuzz.c.
+
+ * pango/opentype/harfbuzz-buffer-internal.h: New file.
+
+ src/Makefile.am | 1 +
+ src/ftglue.c | 18 +++---
+ src/ftglue.h | 20 ++++---
+ src/harfbuzz-buffer-private.h | 60 ++++++++++++++++++++++
+ src/harfbuzz-buffer.c | 108
+ +++++++++++++++++++++-------------------
+ src/harfbuzz-buffer.h | 38 +--------------
+ src/harfbuzz-gdef-private.h | 17 ++++---
+ src/harfbuzz-gdef.c | 20 ++++---
+ src/harfbuzz-gpos-private.h | 13 +++--
+ src/harfbuzz-gpos.c | 16 +++---
+ src/harfbuzz-gsub-private.h | 14 +++--
+ src/harfbuzz-gsub.c | 20 ++++---
+ src/harfbuzz-impl.h | 12 +++--
+ src/harfbuzz-open-private.h | 81 +++++++++++++++++-------------
+ src/harfbuzz-open.c | 111
+ +++++++++++++++++++++++-----------------
+ src/harfbuzz.c | 1 +
+ 16 files changed, 315 insertions(+), 235 deletions(-)
+
+commit 7cdfb61deefd8f43edb5eb79d45d38dbbbef9051
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Oct 11 07:46:33 2007 +0000
+
+ Remove FTGLUE_API/APIDEF cruft.
+
+ 2007-10-11 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/ftglue.[ch]: Remove FTGLUE_API/APIDEF cruft.
+
+ src/ftglue.c | 16 ++++++++--------
+ src/ftglue.h | 24 ++++++++----------------
+ 2 files changed, 16 insertions(+), 24 deletions(-)
+
+commit 61ddbafaaad31ccacde54cad7e60a84abffc0a9f
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Oct 11 07:45:26 2007 +0000
+
+ Build harfbuzz.c instead of individual source files, to let
+ compiler go
+
+ 2007-10-11 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/Makefile.am: Build harfbuzz.c instead
+ of individual
+ source files, to let compiler go wild with optimizations!
+
+ src/Makefile.am | 9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+commit a219b3d003d6727c79dc51282d21e9ac48c44458
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Oct 11 07:34:08 2007 +0000
+
+ Same here.
+
+ 2007-10-11 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/harfbuzz.c: Same here.
+
+ src/harfbuzz.c | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 6567e16e3b14c08659342bbcc9f2735e71f9114e
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Oct 11 07:33:19 2007 +0000
+
+ Don't include harfbuzz-dump.[ch] in libharfbuzz.a. Those are just
+ used by
+
+ 2007-10-11 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/Makefile.am: Don't include harfbuzz-dump.[ch]
+ in
+ libharfbuzz.a. Those are just used by the harfbuzz-dump tool.
+
+ src/Makefile.am | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 0b032549ba7581c879a0fc4e794b0e9a4723ae85
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Oct 11 07:24:47 2007 +0000
+
+ Some more cleanup.
+
+ 2007-10-11 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/harfbuzz-buffer.c: Some more cleanup.
+
+ src/harfbuzz-buffer.c | 11 ++---------
+ 1 files changed, 2 insertions(+), 9 deletions(-)
+
+commit 7a26864308bd1ca8d5f47d798411cac7239b7d38
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Oct 11 07:21:31 2007 +0000
+
+ Move some code around.
+
+ 2007-10-11 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/harfbuzz-buffer.c: Move some code around.
+
+ src/harfbuzz-buffer.c | 91
+ ++++++++++++++++++++++++++-----------------------
+ 1 files changed, 48 insertions(+), 43 deletions(-)
+
+commit 7a5405c8261573a0f29d28fb533e800d698f6129
+Author: Behdad Esfahbod <behdad@src.gnome.org>
+Date: Thu Oct 11 07:15:16 2007 +0000
+
+ Minor.
+
+ src/harfbuzz-buffer.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 986f4fd96892ebda550793941bb1daed862c4a34
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Oct 11 07:12:49 2007 +0000
+
+ Rename buffer->inplace to buffer->separate_out with the inverted
+ meaning,
+
+ 2007-10-11 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/harfbuzz-buffer.[ch]: Rename buffer->inplace
+ to
+ buffer->separate_out with the inverted meaning, such that
+ buffer
+ is initialization is memset(0).
+
+ src/harfbuzz-buffer.c | 34 +++++++++++++++++-----------------
+ src/harfbuzz-buffer.h | 2 +-
+ 2 files changed, 18 insertions(+), 18 deletions(-)
+
+commit 06003908ccf2473366816935dd1b144cde587be9
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Oct 11 07:05:09 2007 +0000
+
+ Allocate buffer->positions lazily.
+
+ 2007-10-11 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/*: Allocate buffer->positions lazily.
+
+ src/harfbuzz-buffer.c | 25 +++++++++++++++++++++++--
+ src/harfbuzz-buffer.h | 3 +++
+ src/harfbuzz-gpos.c | 13 ++++++++-----
+ src/harfbuzz-gsub.c | 5 +++--
+ 4 files changed, 37 insertions(+), 9 deletions(-)
+
+commit fc3d6f575826704a0ae9ee9018323f6a3c422f4b
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Oct 11 06:52:07 2007 +0000
+
+ Bug 485621 – Get rid of freetype memory allocator in harfbuzz
+
+ 2007-10-11 Behdad Esfahbod <behdad@gnome.org>
+
+ Bug 485621 – Get rid of freetype memory allocator in
+ harfbuzz
+
+ * pango/opentype/*: Remove all occurences of FT_Memory. Use
+ malloc/realloc/free directly.
+
+ * pango/pango-ot*: Update to above.
+
+ src/ftglue.c | 52 ++----
+ src/ftglue.h | 28 ++--
+ src/harfbuzz-buffer.c | 16 +-
+ src/harfbuzz-buffer.h | 4 +-
+ src/harfbuzz-gdef.c | 106 ++++-------
+ src/harfbuzz-gdef.h | 6 +-
+ src/harfbuzz-gpos-private.h | 1 -
+ src/harfbuzz-gpos.c | 462
+ +++++++++++++++++--------------------------
+ src/harfbuzz-gpos.h | 2 -
+ src/harfbuzz-gsub-private.h | 1 -
+ src/harfbuzz-gsub.c | 312 +++++++++++-------------------
+ src/harfbuzz-gsub.h | 2 -
+ src/harfbuzz-open-private.h | 25 +--
+ src/harfbuzz-open.c | 127 ++++++-------
+ 14 files changed, 441 insertions(+), 703 deletions(-)
+
+commit a8abb8b994c3cd89808e8f7128a0c04b23eb3ede
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Oct 11 00:07:58 2007 +0000
+
+ Bug 485559 – Boston Summit HarfBuzz optimizations
+
+ 2007-10-10 Behdad Esfahbod <behdad@gnome.org>
+
+ Bug 485559 – Boston Summit HarfBuzz optimizations
+
+ * pango/opentype/*: HarfBuzz hacking to:
+
+ - Rename last remaining FT_Err stuff to HB_Err.
+
+ - Fix a couple invalid table paths to be permissive so
+ fonts work better. Particularly GDEF table for Nafees
+ Nastaliq is loaded and works great now.
+
+ - Optimize harfbuzz buffer to not copy/swap for simple
+ one-to-one and "copy" GSUB operations.
+
+ * pango/pango-ot*: Update to FT_Err to HB_Err renaming.
+
+ src/ftglue.c | 51 ++-
+ src/ftglue.h | 21 +-
+ src/harfbuzz-buffer.c | 190 +++++++--
+ src/harfbuzz-buffer.h | 26 +-
+ src/harfbuzz-dump-main.c | 14 +-
+ src/harfbuzz-dump.c | 15 +-
+ src/harfbuzz-gdef-private.h | 4 +-
+ src/harfbuzz-gdef.c | 149 ++++----
+ src/harfbuzz-gdef.h | 10 +-
+ src/harfbuzz-gpos-private.h | 2 +-
+ src/harfbuzz-gpos.c | 810 +++++++++++++++++---------------------
+ src/harfbuzz-gpos.h | 30 +-
+ src/harfbuzz-gsub-private.h | 2 +-
+ src/harfbuzz-gsub.c | 919
+ ++++++++++++++++++-------------------------
+ src/harfbuzz-gsub.h | 24 +-
+ src/harfbuzz-impl.h | 22 +-
+ src/harfbuzz-open-private.h | 20 +-
+ src/harfbuzz-open.c | 238 ++++++------
+ src/harfbuzz-open.h | 13 +-
+ 19 files changed, 1253 insertions(+), 1307 deletions(-)
+
+commit dd810b76bc554278d3a226cf89901d16992cf56d
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Wed Aug 29 08:46:50 2007 +0000
+
+ Bug 302952 – The placement of a diacritic marks for an arabic
+ ligature
+
+ 2007-08-29 Behdad Esfahbod <behdad@gnome.org>
+
+ Bug 302952 – The placement of a diacritic marks for an
+ arabic ligature
+ is not correct
+
+ * pango/opentype/harfbuzz-buffer.c (hb_buffer_allocate_ligid):
+ Don't
+ use zero as allocated ligature id. Zero means no ligature id.
+
+ src/harfbuzz-buffer.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e90d19919434b90d79e67aaf199bddd991f8e5d8
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Tue Aug 21 08:03:26 2007 +0000
+
+ Bug 463430 – Gets stuck while "formatting message"
+
+ 2007-08-21 Behdad Esfahbod <behdad@gnome.org>
+
+ Bug 463430 – Gets stuck while "formatting message"
+
+ * pango/opentype/harfbuzz-gpos.c (Lookup_PairPos1),
+ (Lookup_PairPos2), (Lookup_PairPos), (Do_ContextPos):
+ * pango/opentype/harfbuzz-gsub.c (Do_ContextSubst):
+ Change type of intermediate index variable from FT_UShort to
+ FT_ULong as it was overlowing with more than 65536 glyphs.
+
+ src/harfbuzz-gpos.c | 15 ++++++++++-----
+ src/harfbuzz-gsub.c | 2 +-
+ 2 files changed, 11 insertions(+), 6 deletions(-)
+
+commit 13b86ee398905f96f57df001309312f6dfdfea9a
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Tue Aug 21 01:38:07 2007 +0000
+
+ Don't ignore error return value of
+ hb_buffer_copy_output_glyph(). Patch
+
+ 2007-08-20 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/harfbuzz-gsub.c (GSUB_Do_String_Lookup):
+ Don't
+ ignore error return value of hb_buffer_copy_output_glyph().
+ Patch
+ sent to harfbuzz-list.
+
+ src/harfbuzz-gsub.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4c2556cb4c38a56c3a5087deb54aa6262ab3aff9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 6 11:29:21 2007 -0400
+
+ [gdef] Initial implementation
+
+ src/harfbuzz-gdef-private.h | 144
+ ++++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 142 insertions(+), 2 deletions(-)
+
+commit 5b2e947fd2b7c5ea49b2bef1e0190d99a525058c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Jul 6 02:03:26 2007 -0400
+
+ [open] small fixes, including not using unions for main structs
+
+ src/harfbuzz-open-private.h | 54
+ +++++++++++++++++++++++--------------------
+ 1 files changed, 29 insertions(+), 25 deletions(-)
+
+commit 151df44346990728b5dd249db5740a9543ae33b9
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Jul 5 17:22:07 2007 -0400
+
+ Improve stupid Makefile
+
+ src/Makefile | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 6c49bebc70a0118a803a5bc979f4436a82b48240
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Tue May 1 02:32:12 2007 +0000
+
+ Link freetype to harfbuzz-dump, for those systems that don't track
+
+ 2007-04-30 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/Makefile.am: Link freetype to harfbuzz-dump,
+ for
+ those systems that don't track dependencies automatically.
+
+ src/Makefile.am | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 7341a116916c8470f1211f0cb3c65b189b42ec9e
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Tue Apr 3 22:45:29 2007 +0000
+
+ Copy fixes from harfbuzz stable branch. Includes a leak fix, a kerning
+
+ 2007-04-03 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/harfbuzz-gdef.c (_HB_GDEF_Check_Property):
+ * pango/opentype/harfbuzz-gpos.c (HB_Done_GPOS_Table),
+ (Lookup_PairPos):
+ * pango/opentype/harfbuzz-open.c (Get_Class1):
+ Copy fixes from harfbuzz stable branch. Includes a leak fix,
+ a kerning fix, and an array out-of-bound access fix.
+
+ src/harfbuzz-gdef.c | 2 ++
+ src/harfbuzz-gpos.c | 8 ++++++++
+ src/harfbuzz-open.c | 2 +-
+ 3 files changed, 11 insertions(+), 1 deletions(-)
+
+commit 999a6f05758c10a902354457ecbf6c943bfed514
+Author: Hans Breuer <hans@breuer.org>
+Date: Sat Jan 13 21:31:41 2007 +0000
+
+ updated
+
+ 2007-01-13 Hans Breuer <hans@breuer.org>
+
+ * pango/makefile.msc pango/opentype/makefile.msc : updated
+
+ src/makefile.msc | 16 ++++++----------
+ 1 files changed, 6 insertions(+), 10 deletions(-)
+
+commit 3c038d40da4bfe5037cc4e9de22bad08fa408465
+Author: Behdad Esfahbod <behdad@src.gnome.org>
+Date: Tue Jan 9 03:32:12 2007 +0000
+
+ Remove .cvsignore files (moved to svn:ignore prop)
+
+ src/.cvsignore | 7 -------
+ 1 files changed, 0 insertions(+), 7 deletions(-)
+
+commit 5b3f7702a64fe0513d08a67bdb72704e46fd7cd4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Dec 28 06:42:37 2006 -0500
+
+ Add stub GDEF files
+
+ src/harfbuzz-gdef-private.h | 8 ++++++++
+ src/harfbuzz-gdef.h | 11 +++++++++++
+ src/harfbuzz-open-private.h | 3 +--
+ src/harfbuzz-private.h | 6 ++++++
+ src/main.cc | 1 +
+ 5 files changed, 27 insertions(+), 2 deletions(-)
+
+commit b3395a7aa36ff1ba5a17f494fbf359ec317a7e69
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Dec 28 06:31:18 2006 -0500
+
+ Don't shift down the mark attachment type
+
+ src/harfbuzz-open-private.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 193b66d52ae2cb5ced7969e15b7f56dc1978ca8a
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Dec 28 06:12:18 2006 -0500
+
+ Remove stale comment
+
+ src/harfbuzz-open-private.h | 10 ----------
+ 1 files changed, 0 insertions(+), 10 deletions(-)
+
+commit 12c4568c680ea2b9b98a16a8b7402ca185c90ef6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Dec 28 06:10:59 2006 -0500
+
+ Break and rename, in the layout of old HarfBuzz codebase
+
+ src/.gitignore | 1 +
+ src/Makefile | 2 +-
+ src/harfbuzz-common.h | 14 +
+ src/harfbuzz-ng.cc | 802
+ -------------------------------------------
+ src/harfbuzz-open-private.h | 697 +++++++++++++++++++++++++++++++++++++
+ src/harfbuzz-open.h | 13 +
+ src/main.cc | 98 ++++++
+ 7 files changed, 824 insertions(+), 803 deletions(-)
+
+commit 3158d84b0dfe5032e7c56c03f2da97b8ab549d94
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Dec 27 20:08:07 2006 -0500
+
+ Oops. s/OpenTypeFontFaceFile/OpenTypeFontFile/g
+
+ src/harfbuzz-ng.cc | 22 +++++++++++-----------
+ 1 files changed, 11 insertions(+), 11 deletions(-)
+
+commit bf0f9dd61375c5afce8e6b1664d0df5f6c8b2494
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Dec 27 20:06:42 2006 -0500
+
+ Use union for ClassDef
+
+ src/harfbuzz-ng.cc | 12 +++++++-----
+ 1 files changed, 7 insertions(+), 5 deletions(-)
+
+commit c46196d09c4ea879bf45182e8a0d649d4c750c39
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Dec 27 20:05:16 2006 -0500
+
+ Use union for Coverage
+
+ src/harfbuzz-ng.cc | 21 +++++++++++----------
+ 1 files changed, 11 insertions(+), 10 deletions(-)
+
+commit 86f450243dbaa82f187cf2d36364e9a59c0e64c7
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Dec 27 19:59:07 2006 -0500
+
+ Add GPOS stub
+
+ src/harfbuzz-ng.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 133466177e104ddcd2501a88735670540252167c
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Dec 27 19:58:32 2006 -0500
+
+ s/OpenTypeFont/OpenTypeFontFace/g
+
+ src/harfbuzz-ng.cc | 44 +++++++++++++++++++++++---------------------
+ 1 files changed, 23 insertions(+), 21 deletions(-)
+
+commit 71d62baab0429cdf56ba4019fd2a205f08188503
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Dec 27 01:29:24 2006 -0500
+
+ GSUBGPOSHeader
+
+ src/harfbuzz-ng.cc | 103
+ +++++++++++++++++++++++++++++++++++++++++++++++++---
+ 1 files changed, 98 insertions(+), 5 deletions(-)
+
+commit eebabd8b2ec5296deba6b09d7755933da0a7d9dc
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed Dec 27 00:21:31 2006 -0500
+
+ Finished OpenType Common Table Formats
+
+ src/harfbuzz-ng.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 2b7374519766825971f9f4ff5b1cb49b74cfcaf8
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Dec 26 20:55:37 2006 -0500
+
+ Device tables.
+
+ src/harfbuzz-ng.cc | 49
+ +++++++++++++++++++++++++++++++++++++++++++++----
+ 1 files changed, 45 insertions(+), 4 deletions(-)
+
+commit eb32e374f4d6de8d428d36144f6eef93514820d2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Dec 26 20:00:33 2006 -0500
+
+ ClassDef
+
+ src/harfbuzz-ng.cc | 121
+ +++++++++++++++++++++++++++++++++++++++++----------
+ 1 files changed, 97 insertions(+), 24 deletions(-)
+
+commit 53502c6723dbf9cd3b6ba91b733678b3c7871715
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Dec 26 19:29:08 2006 -0500
+
+ Rename CoverageFormat to Coverage
+
+ src/harfbuzz-ng.cc | 18 +++++++++++++-----
+ 1 files changed, 13 insertions(+), 5 deletions(-)
+
+commit 0d6db2abcbe98456569ccf7934ba0a8b37c7f6f3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Dec 26 18:53:55 2006 -0500
+
+ Define more structs using DEFINE_INT_TYPE.
+
+ src/harfbuzz-ng.cc | 39 +++++++++++++++++++--------------------
+ 1 files changed, 19 insertions(+), 20 deletions(-)
+
+commit 915931b74a30e8652fac5fec153d499485513f63
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Dec 26 15:30:14 2006 -0500
+
+ s/DEFINE_NOT_INSTANTIABLE/DEFINE_NON_INSTANTIABLE/
+
+ src/harfbuzz-ng.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 0c0d55330ef4090f3e4864538e83a4344caaf3ba
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Tue Dec 26 15:29:38 2006 -0500
+
+ Coverage.
+
+ src/harfbuzz-ng.cc | 91
+ +++++++++++++++++++++++++++++++++++++++++++++-------
+ 1 files changed, 79 insertions(+), 12 deletions(-)
+
+commit 882e52f59196535495af8ca8069df32308ad52cf
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Dec 25 10:28:31 2006 -0500
+
+ Rename to harfbuzz-ng.cc
+
+ src/Makefile | 2 +-
+ src/harfbuzz-ng.cc | 513
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-types-private.cc | 513
+ -----------------------------------------------
+ 3 files changed, 514 insertions(+), 514 deletions(-)
+
+commit f8ba99f6f322800a915428ffc3b5eaf1be2e6c21
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Dec 25 09:58:02 2006 -0500
+
+ LookupFlags
+
+ src/hb-types-private.cc | 52
+ ++++++++++++++++++++++++++++++++++++++++++----
+ 1 files changed, 47 insertions(+), 5 deletions(-)
+
+commit 25ad92c8a68bf72464601a644ed57b9213126a78
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Dec 25 09:35:06 2006 -0500
+
+ Implement Feature
+
+ src/hb-types-private.cc | 46
+ ++++++++++++++++++++++++++++++++++++++++++----
+ 1 files changed, 42 insertions(+), 4 deletions(-)
+
+commit befc022affd2386b3f46cd7d11e4262f6c8bce9f
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Dec 25 09:14:52 2006 -0500
+
+ LangSys
+
+ src/hb-types-private.cc | 51
+ ++++++++++++++++++++++++++++++++++++++++------
+ 1 files changed, 44 insertions(+), 7 deletions(-)
+
+commit c81efca149b08832d5d96a944fb5f303f3d0ca42
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Dec 25 06:22:08 2006 -0500
+
+ Use CamelCaseTags.
+
+ src/hb-types-private.cc | 29 ++++++++++++++---------------
+ 1 files changed, 14 insertions(+), 15 deletions(-)
+
+commit 808dbe283c1ad66091f2cb67380888b7cf265c01
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Dec 25 06:18:52 2006 -0500
+
+ Make types not instantiable
+
+ src/hb-types-private.cc | 104
+ ++++++++++++++++++++++++++---------------------
+ 1 files changed, 57 insertions(+), 47 deletions(-)
+
+commit b739c05ca4b7acfa45bd4b0812ecbb3747f726f0
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Dec 25 05:39:20 2006 -0500
+
+ Add OpenTypeFontFile.
+
+ src/Makefile | 2 +-
+ src/hb-types-private.cc | 113
+ ++++++++++++++++++++++++++++++++++++++++++++---
+ 2 files changed, 107 insertions(+), 8 deletions(-)
+
+commit 8596944b7421f982960e825019fc0263442520cb
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Dec 23 17:49:25 2006 -0500
+
+ Add Makefile
+
+ src/Makefile | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit b6e62bc5db76ae342177b2b646c37f45eccad975
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Dec 22 02:21:55 2006 -0500
+
+ After DEFINE_SCRIPT_ARRAY
+
+ src/hb-types-private.cc | 215
+ ++++++++++++++++++++++++++++++----------------
+ 1 files changed, 140 insertions(+), 75 deletions(-)
+
+commit 01e4fcb032be601f272e62228881e2aabfb9d925
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Dec 21 22:31:31 2006 -0500
+
+ Remove the annoying HB_ prefix.
+
+ src/hb-types-private.cc | 107
+ +++++++++++++++++++++++------------------------
+ 1 files changed, 52 insertions(+), 55 deletions(-)
+
+commit 6b4ce01da121e12e1c78ad7eaedf469f35f3568d
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Dec 21 22:31:10 2006 -0500
+
+ Second version. Complete redesign, based on C++ classes to ensure
+ endian
+ correctness.
+
+ src/hb-types-private.cc | 300
+ ++++++++++++++++++++++++++++++++---------------
+ 1 files changed, 205 insertions(+), 95 deletions(-)
+
+commit f78e70c301311ffcfb007c7fc4125d71cbcff1e2
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Dec 21 22:30:38 2006 -0500
+
+ First version.
+
+ src/hb-types-private.cc | 116
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 116 insertions(+), 0 deletions(-)
+
+commit f726b20e56e8b1106dfde0bf8d575c73e83957c4
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Tue Jul 25 01:02:27 2006 +0000
+
+ Bug 347073 – Allow empty GPOS table
+
+ 2006-07-24 Behdad Esfahbod <behdad@gnome.org>
+
+ Bug 347073 – Allow empty GPOS table
+
+ * pango/opentype/harfbuzz-open.c (_HB_OPEN_Load_ScriptList):
+ Don't
+ err on empty GPOS/GSUB tables.
+
+ src/harfbuzz-open.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 52481a5c55d466f41654dcdc67245d0ca8cefbcf
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Jun 22 18:09:04 2006 +0000
+
+ Bug 345600 – cvs build error in pango/opentype/Makefile
+
+ 2006-06-22 Behdad Esfahbod <behdad@gnome.org>
+
+ Bug 345600 – cvs build error in pango/opentype/Makefile
+
+ * pango/opentype/Makefile.am: Rename variable SOURCES to
+ MAINSOURCES.
+ Some automake versions seem to use it or something.
+
+ src/Makefile.am | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit ffb2d5c1e7af33644d0a4058befa4b8358c9a7bf
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Wed May 31 07:42:55 2006 +0000
+
+ Bug 341138 – Using TTC font, Gtk2 programs begin to eating big
+ memory
+
+ 2006-05-31 Behdad Esfahbod <behdad@gnome.org>
+
+ Bug 341138 – Using TTC font, Gtk2 programs begin to eating
+ big memory
+ and have many cpu usage.
+ Patch from Yong Li.
+
+ * pango/opentype/ftglue.c (_hb_ftglue_face_goto_table):
+ TrueType table
+ offsets are absolute, not relative.
+
+ src/ftglue.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f8f7bd2451eeafb57f5c80c7b4e88a1e50b97c4f
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Wed May 31 07:23:02 2006 +0000
+
+ Bug 336153 – Mark to mark positioning (Lookup Type 6) isn't
+ correct when
+
+ 2006-05-31 Behdad Esfahbod <behdad@gnome.org>
+
+ Bug 336153 – Mark to mark positioning (Lookup Type 6)
+ isn't correct
+ when using MarkAttchmentType
+ Patch from Tin Myo Htet.
+
+ * pango/opentype/harfbuzz-gpos.c (Lookup_MarkMarkPos):
+ Ignore marks
+ of non-matchin attachment type.
+
+ src/harfbuzz-gpos.c | 37 ++++++++++++++++++++++---------------
+ 1 files changed, 22 insertions(+), 15 deletions(-)
+
+commit d2a613187c1257371d62153b55c89336965e0754
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Wed Apr 12 18:47:50 2006 +0000
+
+ Fix loop variables. (coverity found bug.)
+
+ 2006-04-12 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/harfbuzz-gpos.c: Fix loop
+ variables. (coverity
+ found bug.)
+
+ src/harfbuzz-gpos.c | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 14022e826f63c48b689f9037645c9a3a3302d9b6
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Tue Apr 11 08:31:44 2006 +0000
+
+ Bug 337924 – cleanups for issues reported by various compilers Patch
+
+ 2006-04-11 Behdad Esfahbod <behdad@gnome.org>
+
+ Bug 337924 – cleanups for issues reported by various
+ compilers
+ Patch from Kjartan Maraas.
+
+ * examples/viewer-x.c (update):
+ * modules/arabic/arabic-fc.c (fallback_shape),
+ (arabic_engine_shape):
+ * modules/basic/basic-fc.c (fallback_shape),
+ (basic_engine_shape):
+ * modules/basic/basic-x.c:
+ * modules/hangul/hangul-fc.c:
+ * modules/hebrew/hebrew-fc.c (hebrew_engine_shape):
+ * modules/indic/indic-fc.c:
+ * modules/khmer/khmer-fc.c:
+ * modules/syriac/syriac-fc.c:
+ * modules/thai/thai-fc.c:
+ * modules/tibetan/tibetan-fc.c:
+ * pango/break.c:
+ * pango/modules.c:
+ * pango/opentype/ftglue.c (_hb_ftglue_face_goto_table):
+ * pango/pango-attributes.c (pango_attr_list_filter):
+ * pango/pango-engine.c:
+ * pango/pango-fontset.c:
+ * pango/pango-layout.c (pango_layout_set_text),
+ (pango_layout_xy_to_index), (pango_layout_get_cursor_pos):
+ * pango/pango-markup.c (text_handler):
+ * pango/pango-utils.c (read_alias_file):
+ * pango/pangocairo-fcfont.c (G_DEFINE_TYPE_WITH_CODE):
+ * pango/pangocairo-fcfontmap.c (G_DEFINE_TYPE_WITH_CODE):
+ * pango/pangocairo-font.c
+ (_pango_cairo_font_get_hex_box_info):
+ * pango/pangox-fontmap.c (pango_x_make_matching_xlfd):
+ * tests/dump-boundaries.c (fail):
+ Remove unused variables. Remove excess semicolon after
+ DEFINE_TYPE
+ macros.
+
+ src/ftglue.c | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 59aafd07806a2f0d4f399eff13aec74557f60522
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Mon Apr 10 10:33:17 2006 +0000
+
+ Fix minor bugs reported by the Coverity scan report.
+
+ 2006-04-10 Behdad Esfahbod <behdad@gnome.org>
+
+ Fix minor bugs reported by the Coverity scan report.
+
+ * pango/opentype/harfbuzz-gdef.c
+ (HB_GDEF_Build_ClassDefinition):
+ * pango/opentype/harfbuzz-gpos.c (HB_GPOS_Query_Scripts),
+ (HB_GPOS_Query_Languages), (HB_GPOS_Query_Features): Do
+ not access
+ structs before we check them for nullity.
+
+ * pango/pango-layout.c (pango_layout_index_to_line),
+ (pango_layout_index_to_line_and_extents),
+ (pango_layout_index_to_pos): Check for invalid iterators
+ outside the
+ loop, so we don't crash.
+
+ * pango/pango-layout.c (pango_layout_line_x_to_index): Set
+ char_trailing instead of trailing in one of too many paths.
+ Should
+ have been a typo.
+
+ * pango/pangox.c (get_font_metrics_from_subfonts): Check
+ for nullity
+ somewhere.
+
+ src/harfbuzz-gdef.c | 3 ++-
+ src/harfbuzz-gpos.c | 9 ++++++---
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+commit b31d6def96ff99e89ba42e09661992498bda460d
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Apr 6 18:23:49 2006 +0000
+
+ Update from HarfBuzz. Lars Knoll fixed all the warnings.
+
+ 2006-04-06 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype: Update from HarfBuzz. Lars Knoll fixed
+ all the
+ warnings.
+
+ src/harfbuzz-dump.c | 94 +++++++++++++++++++++++++++---------------
+ src/harfbuzz-gpos.c | 80 ++++++++++++++++++++++-------------
+ src/harfbuzz-gsub.c | 114
+ ++++++++++++++++++++++++++++----------------------
+ src/harfbuzz-impl.h | 4 ++
+ 4 files changed, 179 insertions(+), 113 deletions(-)
+
+commit ca57250bc9d9f92c88a2ea516e251b9cbfdebda0
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Mon Apr 3 20:13:17 2006 +0000
+
+ Make sure TTAG_GDEF and frineds are defined, needed for FreeType
+ <= 2.1.7
+
+ 2006-04-03 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/harfbuzz-impl.h: Make sure TTAG_GDEF and
+ frineds are
+ defined, needed for FreeType <= 2.1.7 (pointed by Tim Janik).
+
+ src/harfbuzz-gdef.c | 3 ---
+ src/harfbuzz-gpos.c | 3 ---
+ src/harfbuzz-gsub.c | 3 ---
+ src/harfbuzz-impl.h | 11 +++++++++++
+ 4 files changed, 11 insertions(+), 9 deletions(-)
+
+commit f618288e00914b6606ec977d506c18e4abdd3ce4
+Author: Behdad Esfahbod <behdad@src.gnome.org>
+Date: Fri Mar 31 13:19:29 2006 +0000
+
+ .
+
+ src/.cvsignore | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 5f1f943b9e6d753722ceadba7eb7ce1f14526ea5
+Author: Behdad Esfahbod <behdad@src.gnome.org>
+Date: Fri Mar 31 13:18:23 2006 +0000
+
+ .
+
+ src/.cvsignore | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit bce3e0b0d4ee521767d80c5c21704337bf5ac716
+Author: Behdad Esfahbod <behdad@src.gnome.org>
+Date: Fri Mar 31 12:45:40 2006 +0000
+
+ Define NULL.
+
+ src/harfbuzz-impl.h | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 9f8da38cd108590514b71756b752d98952a9221f
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Fri Mar 31 12:28:09 2006 +0000
+
+ Convert pango/opentype to the new project called HarfBuzz.
+
+ 2006-03-31 Behdad Esfahbod <behdad@gnome.org>
+
+ Convert pango/opentype to the new project called HarfBuzz.
+
+ * pango/opentype/*: Restructured.
+
+ * pango/pango-ot-*: Updated to use HarfBuzz symbol names.
+
+ src/COPYING | 15 +
+ src/COPYING.FTL | 174 ++
+ src/COPYING.GPL | 340 +++
+ src/FT-license.txt | 28 -
+ src/FTL.TXT | 174 --
+ src/Makefile.am | 89 +-
+ src/README | 44 +-
+ src/disasm.c | 720 -----
+ src/disasm.h | 26 -
+ src/ftglue.c | 88 +-
+ src/ftglue.h | 68 +-
+ src/ftxgdef.c | 1225 ---------
+ src/ftxgdef.h | 224 --
+ src/ftxgpos.c | 6199
+ ------------------------------------------
+ src/ftxgpos.h | 838 ------
+ src/ftxgsub.c | 4533 -------------------------------
+ src/ftxgsub.h | 594 ----
+ src/ftxopen.c | 1552 -----------
+ src/ftxopen.h | 317 ---
+ src/ftxopenf.h | 166 --
+ src/harfbuzz-buffer.c | 227 ++
+ src/harfbuzz-buffer.h | 106 +
+ src/harfbuzz-dump-main.c | 272 ++
+ src/harfbuzz-dump.c | 720 +++++
+ src/harfbuzz-dump.h | 34 +
+ src/harfbuzz-gdef-private.h | 101 +
+ src/harfbuzz-gdef.c | 1228 +++++++++
+ src/harfbuzz-gdef.h | 127 +
+ src/harfbuzz-gpos-private.h | 683 +++++
+ src/harfbuzz-gpos.c | 6269
+ +++++++++++++++++++++++++++++++++++++++++++
+ src/harfbuzz-gpos.h | 168 ++
+ src/harfbuzz-gsub-private.h | 448 +++
+ src/harfbuzz-gsub.c | 4581 +++++++++++++++++++++++++++++++
+ src/harfbuzz-gsub.h | 132 +
+ src/harfbuzz-impl.h | 64 +
+ src/harfbuzz-open-private.h | 81 +
+ src/harfbuzz-open.c | 1426 ++++++++++
+ src/harfbuzz-open.h | 285 ++
+ src/harfbuzz.c | 19 +
+ src/harfbuzz.h | 23 +
+ src/otlbuffer.c | 238 --
+ src/otlbuffer.h | 103 -
+ src/ottest.c | 274 --
+ 43 files changed, 17635 insertions(+), 17388 deletions(-)
+
+commit dd2a8d4d490df1d310e7553ba6c7c8de661f28a1
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Sat Mar 25 23:52:30 2006 +0000
+
+ Don't err on Table_Missing.
+
+ 2006-03-25 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/ottest.c: Don't err on Table_Missing.
+
+ src/ottest.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 434833b1b7b01d85a143f9ad4b04e7044dd72567
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Mon Mar 13 05:06:05 2006 +0000
+
+ === Released 1.12.0 ===
+
+ 2006-03-13 Behdad Esfahbod <behdad@gnome.org>
+
+ * === Released 1.12.0 ===
+
+ * configure.in: Version 1.12.0
+
+ * NEWS, README: Updated.
+
+ src/README | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 8228828e1e4c8dd6f9435fb718ad4394bba95655
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Mon Jan 30 22:37:48 2006 +0000
+
+ Handle GSUB Lookup type 8, and ReverseChainContextualSubst table. (bug
+
+ 2006-01-30 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/ftxgsub.c: Handle GSUB Lookup type 8,
+ and ReverseChainContextualSubst table. (bug #149696,
+ patch from Aamir Wali)
+
+ src/ftxgsub.c | 545
+ +++++++++++++++++++++++++++++++++++++++++++++-----------
+ src/ftxgsub.h | 47 ++++--
+ src/ftxopen.c | 7 +
+ src/ftxopenf.h | 5 +-
+ 4 files changed, 487 insertions(+), 117 deletions(-)
+
+commit e040f681963d51eaadcd53a456100fde1a7addb6
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Sat Jan 28 20:29:18 2006 +0000
+
+ Removed.
+
+ 2006-01-28 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/pango-ot-*: Removed.
+
+ * pango/pango-ot-*: Added.
+
+ * pango/Makefile.am, pango/opentype/Makefile.am: Adjusted.
+
+ src/Makefile.am | 30 +--
+ src/pango-ot-buffer.c | 339 ------------------------
+ src/pango-ot-info.c | 681
+ ------------------------------------------------
+ src/pango-ot-private.h | 105 --------
+ src/pango-ot-ruleset.c | 225 ----------------
+ 5 files changed, 13 insertions(+), 1367 deletions(-)
+
+commit f45689bc655eb723f11a2eb65a41303221b80397
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Wed Jan 25 19:33:58 2006 +0000
+
+ If major.minor of required and available glib versions are the
+ same, add
+
+ 2006-01-25 Behdad Esfahbod <behdad@gnome.org>
+
+ * configure.in: If major.minor of required and available
+ glib versions
+ are the same, add -DG_DISABLE_DEPRECATED to GLIB_CFLAGS. (bug
+ #328617)
+
+ * */Makefile.am: Remove hardcoded -DG_DISABLE_DEPRECATED.
+
+ src/Makefile.am | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 6cc6c9a57c674787f278ea5b60705384fd72b4ad
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Sat Jan 14 07:00:13 2006 +0000
+
+ Make sure #include <config.h> is the first include in the file. (bug
+
+ 2006-01-14 Behdad Esfahbod <behdad@gnome.org>
+
+ * */*.c, */*/*.c: Make sure #include <config.h> is the
+ first include
+ in the file. (bug #158870, based on patch by Luis Menina)
+
+ src/disasm.c | 2 ++
+ src/ftglue.c | 1 +
+ src/ftxgdef.c | 1 +
+ src/ftxgpos.c | 2 ++
+ src/ftxgsub.c | 2 ++
+ src/ftxopen.c | 2 ++
+ src/otlbuffer.c | 3 +++
+ src/ottest.c | 1 +
+ src/pango-ot-buffer.c | 2 ++
+ src/pango-ot-info.c | 2 ++
+ src/pango-ot-ruleset.c | 2 ++
+ 11 files changed, 20 insertions(+), 0 deletions(-)
+
+commit ca07fcf6ef61c09825e67ca7e2574a90e4f5a9a0
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Jan 5 16:14:49 2006 +0000
+
+ pango/Makefile.am, pango/fonts.c, pango/glyphstring.c,
+
+ 2006-01-05 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/Makefile.am,
+ * pango/fonts.c,
+ * pango/glyphstring.c,
+ * pango/pango-attributes.c,
+ * pango/pango-color.c,
+ * pango/pango-impl-utils.h,
+ * pango/pango-item.c,
+ * pango/pango-layout.c,
+ * pango/pango-tabs.c,
+ * pango/pango-utils.c,
+ * pango/pango-utils.h,
+ * pango/pangoatsui-fontmap.c,
+ * pango/pangocairo-font.c,
+ * pango/pangocairo-fontmap.c,
+ * pango/pangofc-fontmap.c,
+ * pango/pangowin32-fontmap.c,
+ * pango/pangox-fontmap.c,
+ * pango/pangox.c,
+ * pango/opentype/pango-ot-info.c,
+ * pango/opentype/pango-ot-ruleset.c: Intern strings to avoid
+ unnecessary strdups in the type system. (bug #325832,
+ Matthias Clasen)
+
+ src/pango-ot-info.c | 3 ++-
+ src/pango-ot-ruleset.c | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 71524f1bc891bb4450507f769e5cc8f6f6cffa0c
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Tue Dec 27 09:55:48 2005 +0000
+
+ Use g_slice for PangoOTBuffer allocation. (bug #325026, Matthias
+ Clasen)
+
+ 2005-12-27 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/pango-ot-buffer.c: Use g_slice for
+ PangoOTBuffer
+ allocation. (bug #325026, Matthias Clasen)
+
+ src/pango-ot-buffer.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit b5baa43d3a972ebd3ef82ede14b54c185b723a71
+Author: Behdad Esfahbod <behdad@src.gnome.org>
+Date: Fri Nov 25 09:22:02 2005 +0000
+
+ Tiny doc improvement.
+
+ src/pango-ot-info.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 6f64314f7a031a5a5d6b7663c08b70c452961c89
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Wed Nov 23 19:48:10 2005 +0000
+
+ Fix typo in docs.
+
+ 2005-11-23 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentyp/pango-ot-buffer.c: Fix typo in docs.
+
+ src/pango-ot-buffer.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit f2bcf72296b57c8cd7d5a08228c3aef6c8f97d2d
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Wed Nov 23 17:54:55 2005 +0000
+
+ Added "Since:" tags to all interfaces added after Pango 1.0. (#319116,
+
+ 2005-11-23 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/fonts.c pango/pango-attributes.c pango/pango-context.c
+ pango/pango-glyph-item.c pango/pango-layout.c
+ pango/pango-script.c pango/pango-utils.c pango/pangofc-font.c
+ pango/pangoft2-fontmap.c pango/opentype/pango-ot-buffer.c
+ pango/opentype/pango-ot-ruleset.c: Added "Since:" tags to all
+ interfaces added after Pango 1.0. (#319116, Brian Cameron)
+
+ src/pango-ot-buffer.c | 49
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ src/pango-ot-ruleset.c | 14 +++++++++++++
+ 2 files changed, 63 insertions(+), 0 deletions(-)
+
+commit 682db81c23d2116072d8550657c914afb7c26d2b
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Wed Nov 23 15:19:48 2005 +0000
+
+ Protect against possible division by zeros (#316468, Steve Grubb)
+
+ 2005-11-23 Behdad Esfahbod <behdad@gnome.org>
+
+ Protect against possible division by zeros (#316468,
+ Steve Grubb)
+
+ * pango/pango-context.c (update_metrics_from_items),
+ pango/pango-fontset.c (pango_fontset_real_get_metrics):
+ If count is
+ zero, do not alter approximate_{char,digit}_width.
+
+ * pango/opentype/disasm.c: Err on invalid DeltaFormat.
+
+ src/disasm.c | 28 ++++++++++++++++++----------
+ 1 files changed, 18 insertions(+), 10 deletions(-)
+
+commit e6e15352d154e1350340f8045759e5f7b0d86dc7
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Wed Nov 23 11:53:03 2005 +0000
+
+ Reworked basic shaper with OpenType support. (#101079, based on
+ patch from
+
+ 2005-11-23 Behdad Esfahbod <behdad@gnome.org>
+
+ * modules/basic/basic-fc.c: Reworked basic shaper with
+ OpenType
+ support. (#101079, based on patch from Denis Jacquerye and
+ Noah Levitt)
+
+ * modules/basic/basic-fc.c (basic_scripts): Added Unicode
+ 4.1 addition
+ script PANGO_SCRIPT_GLAGOLITIC that is a "simple" script.
+
+ * modules/arabic/arabic-fc.c, modules/syriac/syriac-fc.c:
+ Replace
+ g_utf8_to_ucs4_fast() with g_utf8_strlen()!
+
+ * pango/opentype/pango-ot-ruleset.c
+ (pango_ot_ruleset_add_feature):
+ Remove reference in docs to pango_ot_ruleset_shape() that was
+ removed long ago.
+
+ src/pango-ot-ruleset.c | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 612b6cf60928b356f4bbb59bc9d64886574322c3
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Nov 17 06:28:11 2005 +0000
+
+ Part of #101079:
+
+ 2005-11-17 Behdad Esfahbod <behdad@gnome.org>
+
+ Part of #101079:
+
+ * pango/opentype/ftxopen.c (Load_Lookup): In extension
+ subtables,
+ offset is relative to the extension subtable, not the original
+ table. (Greg Aumann)
+
+ * pango/opentype/ftxgpos.c (Load_BaseArray): When reading
+ BaseAnchor,
+ skip offsets that are zero. Works around bug in Doulos
+ SIL Regular.
+
+ src/ftxgpos.c | 6 ++++++
+ src/ftxopen.c | 6 ++++--
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+commit 1b2c314b804da97b1d5e7adab64bdd4177702579
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Wed Nov 9 23:30:00 2005 +0000
+
+ Remove debug line that got in accidentally.
+
+ 2005-11-09 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/opentype/ftxgpos.c, pango/opentype/ftxopen.c:
+ Remove debug
+ line that got in accidentally.
+
+ src/ftxgpos.c | 1 -
+ src/ftxopen.c | 1 -
+ 2 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 9717127a5be037e26afe52332a8b07f13474557a
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Fri Nov 4 23:55:38 2005 +0000
+
+ Turn various gcc warnings off. Adding const, adding static, fully
+
+ 2005-11-04 Behdad Esfahbod <behdad@gnome.org>
+
+ * configure.in, examples/argcontext.c examples/cairoview.c,
+ examples/renderdemo.c, examples/renderdemo.h
+ examples/xftview.c,
+ modules/basic/basic-x.c, modules/hangul/hangul-fc.c,
+ modules/hebrew/hebrew-shaper.c,
+ modules/hebrew/hebrew-shaper.h,
+ modules/indic/indic-fc.c, modules/indic/mprefixups.c,
+ modules/syriac/syriac-fc.c, pango/break.c pango/fonts.c,
+ pango/modules.c, pango/pango-coverage.c pango/pango-engine.c,
+ pango/pango-engine.h, pango/pango-fontmap.c,
+ pango/pango-fontset.c, pango/pango-impl-utils.h,
+ pango/pango-layout.c, pango/pango-layout.h,
+ pango/pango-renderer.c, pango/pango-script.c,
+ pango/pango-utils.c, pango/pangocairo-fc.h,
+ pango/pangocairo-font.c, pango/pangocairo-fontmap.c,
+ pango/pangocairo-private.h, pango/pangofc-decoder.c,
+ pango/pangofc-font.c, pango/pangofc-fontmap.c
+ pango/pangoft2.c,
+ pango/pangox-fontcache.c, pango/pangox-fontmap.c
+ pango/pangox.c,
+ pango/pangoxft-font.c, pango/querymodules.c,
+ pango/opentype/ftglue.c, pango/opentype/ftxgpos.c,
+ pango/opentype/ftxopen.c, pango/opentype/pango-ot-buffer.c,
+ pango/opentype/pango-ot-info.c,
+ pango/opentype/pango-ot-ruleset.c, tests/dump-boundaries.c,
+ tests/testboundaries.c, tests/testcolor.c tests/testiter.c,
+ tests/testscript.c: Turn various gcc warnings off. Adding
+ const,
+ adding static, fully initializing structs, match signedness in
+ comparisons. (#317804)
+
+ * tests/testscript.c, tools/gen-script-for-lang.c:
+ (scripts_for_file): Pass error->message instead of error
+ to fail(),
+ which was wrong.
+ (compare_lang): Fix typo comparing a and a instead of a and b.
+
+ src/ftglue.c | 2 +-
+ src/ftxgpos.c | 4 ++++
+ src/ftxopen.c | 1 +
+ src/pango-ot-buffer.c | 4 ++--
+ src/pango-ot-info.c | 5 +++--
+ src/pango-ot-ruleset.c | 5 +++--
+ 6 files changed, 14 insertions(+), 7 deletions(-)
+
+commit c0505f3bb28feeba95b201e6464fb2fdac90194a
+Author: Behdad Esfahbod <behdad@gnome.org>
+Date: Thu Nov 3 20:13:40 2005 +0000
+
+ Patches from #170414. Reviewed by Matthias Clasen.
+
+ 2005-11-03 Behdad Esfahbod <behdad@gnome.org>
+
+ Patches from #170414. Reviewed by Matthias Clasen.
+
+ * pango/opentype/ftxgpos.c, pango/opentype/ftxgsub.c: Use
+ call table
+ to dispatch different lookup types.
+
+ * pango/opentype/pango-ot-buffer.c,
+ pango/opentype/pango-ot-ruleset.c:
+ Small cleanup.
+
+ src/ftxgpos.c | 143
+ +++++++++++++++++++++++-------------------------
+ src/ftxgsub.c | 115 +++++++++++++++++++++-----------------
+ src/pango-ot-buffer.c | 3 +-
+ src/pango-ot-ruleset.c | 75 ++++++++-----------------
+ 4 files changed, 159 insertions(+), 177 deletions(-)
+
+commit c6b22b9119ef54ea8d0d2f08b74fdeb024289d73
+Author: Behdad Esfahbod <pango@behdad.org>
+Date: Mon Aug 29 10:06:40 2005 +0000
+
+ Generate valid XML output. Dump LookupFlag too.
+
+ 2005-08-29 Behdad Esfahbod <pango@behdad.org>
+
+ * pango/opentype/ottest.c, pango/opentype/disasm.c:
+ Generate valid
+ XML output. Dump LookupFlag too.
+
+ src/disasm.c | 58
+ ++++++++++++++++++++++++++++++----------------------------
+ src/ottest.c | 23 ++++++++++++++---------
+ 2 files changed, 44 insertions(+), 37 deletions(-)
+
+commit 1e3747ca5d1a6f607f8e56fb94e3daaf6ad623cb
+Author: Behdad Esfahbod <pango@behdad.org>
+Date: Mon Aug 15 04:16:04 2005 +0000
+
+ Replace perror with perror_. Remove FT_BEGIN_STMNT and FT_END_STMNT.
+
+ 2005-08-15 Behdad Esfahbod <pango@behdad.org>
+
+ * pango/opentype/ftglue.h: Replace perror with perror_.
+ Remove FT_BEGIN_STMNT and FT_END_STMNT. (#313477)
+
+ src/ftglue.h | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 3c60250875fa9d04ca96dea35eba23fc70690ff5
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Tue Jul 26 18:33:27 2005 +0000
+
+ Skip lookups with lookup index out of range. (Patch from Behdad
+ Esfahbod,
+
+ 2005-07-26 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c, pango/opentype/ftxgpos.c:
+ Skip lookups
+ with lookup index out of range. (Patch from Behdad Esfahbod,
+ #171170)
+
+ src/ftxgpos.c | 30 ++++++++++++++++++++++++------
+ src/ftxgsub.c | 30 ++++++++++++++++++++++++------
+ 2 files changed, 48 insertions(+), 12 deletions(-)
+
+commit 91a3fa2e4bcdde8ae022d1264c783f133cd7e00d
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Fri Jul 22 18:03:58 2005 +0000
+
+ Remove an unecessary set of block2.
+
+ 2005-07-22 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftglue.c (ftglue_realloc): Remove
+ an unecessary set of block2.
+
+ src/ftglue.c | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit ff7034787d79dcd1bec58a4e02602039313da00e
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Fri Jul 22 17:56:37 2005 +0000
+
+ Patch from David Turner. Review and testing by Behdad Esfahbod
+
+ 2005-07-22 Owen Taylor <otaylor@redhat.com>
+
+ Patch from David Turner. Review and testing by Behdad Esfahbod
+
+ * pango/opentype/ftglue.[ch] Makefile.am: Glue layer that
+ provides
+ implementation of the internal functions that the opentype
+ code
+ expects in terms of publically exported FreeType API.
+
+ * pango/opentype/ftxgdef.c pango/opentype/ftxgpos.c
+ pango/opentype/ftxgsub.c pango/opentype/ftxopen.c
+ pango/opentype/otlbuffer.c pango/opentype/pango-ot-info.c
+ pango/opentype/pango-ot-ruleset.c: Remove includes of
+ internal headers. Small changes to work with ftglue.[ch]
+
+ * pango/opentype/fterrcompat.h: Remove: no longer needed.
+
+ * pango/opentype/ftxgpos.c: Use FT_IS_SFNT(face) rather
+ than poking at FT_MODULE_CLASS (face->driver)->module_name.
+
+ * pango/opentype/ftxopen.c (Free_FeatureList): Free
+ fl->ApplyOrder. (Found by Behdad)
+
+ src/Makefile.am | 3 +-
+ src/fterrcompat.h | 95 -------------
+ src/ftglue.c | 350
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ src/ftglue.h | 156 +++++++++++++++++++++
+ src/ftxgdef.c | 9 +-
+ src/ftxgpos.c | 9 +-
+ src/ftxgsub.c | 10 +-
+ src/ftxopen.c | 8 +-
+ src/otlbuffer.c | 4 +-
+ src/pango-ot-info.c | 6 +-
+ src/pango-ot-ruleset.c | 2 -
+ 11 files changed, 520 insertions(+), 132 deletions(-)
+
+commit 43dbec6f3a345ba0e4a43766610ed59622bbe4a0
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Thu Jul 21 18:15:45 2005 +0000
+
+ Fix up places where there is missing or incomplete Copyright and
+ License
+
+ 2005-07-21 Owen Taylor <otaylor@redhat.com>
+
+ Fix up places where there is missing or incomplete
+ Copyright and License information (Reported by William N. Ray)
+
+ * pango/opentype/fterrcompat.h: Mark as FreeType/GPL licensed.
+
+ * pango/opentype/FT-license.txt: Make this the dual-licensing
+ description that covers the FreeType code (FreeType's
+ LICENSE.TXT) rather than the FTL.
+
+ * pango/opentype/FTL.TXT: Move the FTL (referenced from
+ FT-license.txt) to here.
+
+ * modules/basic/basic-common.h modules/hebrew/hebrew-shaper.h
+ modules/thai/thai-charprop.c modules/thai/thai-shaper.h
+ tools/gen-script-for-lang.c tests/testcolor.c:
+ Add LGPL header and copyright information.
+
+ * modules/indic/indic-ot.[ch]
+ modules/indic/indic-ot-class-tables.c
+ modules/thai/thai-ot.[ch]: Add LGPL header.
+
+ * modules/thai/thai-shaper.c modules/thai/thai-charprop.h:
+ Minor fixes to copyright information.
+
+ * modules/arabic/arabic-ot.c: Add Freetype license
+ boilerplate.
+
+ src/FT-license.txt | 179
+ ++++++---------------------------------------------
+ src/FTL.TXT | 174
+ ++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/fterrcompat.h | 10 +++-
+ 3 files changed, 204 insertions(+), 159 deletions(-)
+
+commit c55850d36d208c7aae8f6ed5c9e1e7927b988d6c
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Tue Jun 14 19:54:19 2005 +0000
+
+ Chain up from finalize. (#307547, Paolo Borelli)
+
+ 2005-06-14 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/pango-ot-info.c (pango_ot_info_finalize)
+ pango/opentype/pango-ot-ruleset.c (pango_ot_ruleset_finalize):
+ Chain up from finalize. (#307547, Paolo Borelli)
+
+ * pango/opentype/pango-ot-info.c (pango_ot_info_finalizer):
+ make accidentally public function static.
+
+ src/pango-ot-info.c | 4 +++-
+ src/pango-ot-ruleset.c | 2 ++
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 44ff46a364fb7981804eb45329c4999b415711f9
+Author: Tor Lillqvist <tml@novell.com>
+Date: Tue Apr 12 01:27:21 2005 +0000
+
+ Rename LDADDS to libpango_ot_la_LIBADD to actually make libpango-ot.la
+
+ 2005-04-12 Tor Lillqvist <tml@novell.com>
+
+ * pango/opentype/Makefile.am: Rename LDADDS to
+ libpango_ot_la_LIBADD to actually make libpango-ot.la link with
+ it.
+
+ * pango/pangowin32.def: Rename get_scale_factor to
+ get_metrics_factor here, too. (#300222, Ivan Wong)
+
+ src/Makefile.am | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 0c349a032e5a52a9d0dcc8204f761b7cb28bfa6b
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Thu Mar 3 19:38:02 2005 +0000
+
+ For all binary searches, handle the case where the number of items
+ is 0.
+
+ 2005-03-03 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxopen.c (Coverage_Index1, Coverage_Index2,
+ Get_Class2): For all binary searches, handle the case where
+ the number of items is 0. (#162977, Nick Lamb)
+
+ * pango/opentype/ftxgdef.c (TT_GDEF_Build_ClassDefinition):
+ Handle the case where glyph_count == 0 properly. Fix a problem
+ with cleanups on memory allocation failure.
+ (Get_New_Count, Add_Glyph_Property): Avoid reading off the
+ end of the ClassRangeRecord array.
+
+ src/ftxgdef.c | 60
+ ++++++++++++++++++++++++++++++++++----------------------
+ src/ftxopen.c | 15 ++++++++++++++
+ 2 files changed, 51 insertions(+), 24 deletions(-)
+
+commit 03838daaa9d485bffcb7bc46453a9a4c32a1f32f
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Mon Nov 22 23:37:19 2004 +0000
+
+ Set G_LOG_DOMAIN.
+
+ Mon Nov 22 18:30:14 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/Makefile.am pango/Makefile.am
+ modules/*/Makefile.am: Set G_LOG_DOMAIN.
+
+ src/Makefile.am | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 346d3b3cac253d2db41205151c185bf2fd9dda16
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Wed Sep 22 18:14:55 2004 +0000
+
+ Cleanups from 'sparse', #149922, Kjartan Maraas
+
+ Wed Sep 22 14:07:47 2004 Owen Taylor <otaylor@redhat.com>
+
+ Cleanups from 'sparse', #149922, Kjartan Maraas
+
+ * pango/pango-utils.c (read_config): () => (void) in
+ definition.
+
+ * pango/pangofc-fontmap.c (pango_fc_font_map_list_families):
+ Initialize *n_families, not n_families.
+
+ * pango/pangofc-fontmap.c pango/pangoft2.c opentype/ftxgdef.c
+ opentype/ftxgpos.c opentype/ftxgsub.c: : Fix various 0/NULL
+ confusion.
+
+ src/ftxgdef.c | 2 +-
+ src/ftxgpos.c | 6 +++---
+ src/ftxgsub.c | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 8b654dfb5ad6137ee9c5a48f5abe04bf7d28d8cd
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Tue Sep 14 13:45:41 2004 +0000
+
+ === Released 1.6.0 ===
+
+ Mon Sep 13 17:38:58 2004 Owen Taylor <otaylor@redhat.com>
+
+ * === Released 1.6.0 ===
+
+ * configure.in: Update versions for 1.6.0
+
+ * NEWS: Update.
+
+ * README: Minor tweak.
+
+ * pango/fonts.c pango/pango-context.c pango/pango-types.h
+ pango/pango-utils.c pango/pangoft2.c pango/pango-layout.c
+ pango/opentype/pango-ot-buffer.c: Add a bunch of missing
+ Since: 1.6.
+
+ src/pango-ot-buffer.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit d41089a5b691967fdd622f47c8397a80af104396
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Fri Jul 30 21:23:04 2004 +0000
+
+ Finish extending properties flags from FT_UShort =>
+ FT_UInt. (OTLBuffer
+
+ Fri Jul 30 17:17:05 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgpos.[ch] pango/opentype/ftxgsub.[ch]
+ pango/opentype/ftxopen.[ch]: Finish extending properties
+ flags from FT_UShort => FT_UInt. (OTLBuffer was already
+ using an FT_UInt)
+
+ src/ftxgpos.c | 8 ++++----
+ src/ftxgpos.h | 2 +-
+ src/ftxgsub.c | 8 ++++----
+ src/ftxgsub.h | 2 +-
+ src/ftxopen.c | 2 +-
+ src/ftxopen.h | 2 +-
+ 6 files changed, 12 insertions(+), 12 deletions(-)
+
+commit f42d5eca291dcdfb27d7fbf88391d6d381b8e9c4
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Tue Jul 27 17:20:01 2004 +0000
+
+ Save the order in which features were added and use that when applying
+
+ Tue Jul 27 12:38:05 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxopen.[ch] pango/opentype/ftxgsub.c
+ pango/opentype/ftxpos.c: Save the order in which
+ features were added and use that when applying features.
+ (Patch from Soheil Hassas Yeganeh, #122330)
+
+ src/ftxgpos.c | 41 ++++++++++++++++++++++++-----------------
+ src/ftxgsub.c | 34 +++++++++++++++++++++-------------
+ src/ftxopen.c | 14 +++++++++++---
+ src/ftxopen.h | 2 ++
+ 4 files changed, 58 insertions(+), 33 deletions(-)
+
+commit ae2daa972d74c5ecfe1d2f0057ce12682ad30b00
+Author: Behdad Esfahbod <behdad@src.gnome.org>
+Date: Tue Jul 27 13:12:19 2004 +0000
+
+ Remove the unused parameter from the IN_CURITEM() and IN_CURGLYPH
+ macros.
+
+
+ * pango/opentype/ftxgpos.c: Remove the unused parameter
+ from the IN_CURITEM() and IN_CURGLYPH macros.
+
+ src/ftxgpos.c | 68
+ ++++++++++++++++++++++++++++----------------------------
+ src/ftxgsub.c | 2 +-
+ 2 files changed, 35 insertions(+), 35 deletions(-)
+
+commit 7d5435ea8cb345c79029b8a12d1bddbed28b1997
+Author: Behdad Esfahbod <behdad@src.gnome.org>
+Date: Tue Jul 27 10:43:58 2004 +0000
+
+ Fix bug to copy glyph from in_string, not out_string.
+
+
+ * pango/opentype/otlbuffer.c (otl_buffer_copy_output_glyph):
+ Fix bug to copy glyph from in_string, not out_string.
+
+ src/otlbuffer.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 2ea2a55bdf7ef1caebcd0c5922b0f542ed8bb5bf
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Mon Jul 26 23:14:53 2004 +0000
+
+ Fix allocation and indexing in NewGlyphClasses array. (#130661,
+ Masatake
+
+ Mon Jul 26 19:11:46 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgdef.c: Fix allocation and indexing
+ in NewGlyphClasses array. (#130661, Masatake YAMATO)
+
+ src/ftxgdef.c | 14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 5d42695e5ed89f73fbc665792ebec82c29ae04ae
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Mon Jul 26 19:25:45 2004 +0000
+
+ Remove the unused parameter from the IN_CURITEM() and IN_CURGLYPH
+ macros.
+
+ Mon Jul 26 15:24:11 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (ADD_Glyph): Remove the
+ unused parameter from the IN_CURITEM() and IN_CURGLYPH
+ macros.
+
+ src/ftxgsub.c | 56
+ ++++++++++++++++++++++++++++----------------------------
+ 1 files changed, 28 insertions(+), 28 deletions(-)
+
+commit a00c4ea5626526980139b122977e367b8434d24a
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Mon Jul 26 19:23:06 2004 +0000
+
+ Add missing macro to make the last change actually compile.
+
+ Mon Jul 26 15:21:23 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c: Add missing macro to make the
+ last change actually compile.
+
+ src/ftxgsub.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit ed3e1f278d3ebfd224f0b57388502d4bb9fb1441
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Mon Jul 26 19:20:27 2004 +0000
+
+ Match backtrack context against the output glyphs not the input glyphs
+
+ Mon Jul 26 15:16:07 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (Lookup_ChainContextSubst[123]):
+ Match backtrack context against the output glyphs not
+ the input glyphs (#145174, Aamir Wali)
+
+ src/ftxgsub.c | 24 ++++++++++++------------
+ 1 files changed, 12 insertions(+), 12 deletions(-)
+
+commit 78282cda004a88b2aadb2786dd3897884e22ed0b
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Mon Jul 26 18:59:02 2004 +0000
+
+ Make Check_Property() take a OTL_GlyphItem, add a gproperties field to
+
+ Mon Jul 26 14:49:22 2004 Owen Taylor <otaylor@redhat.com>
+
+ * ftxgdef.[ch] otlbuffer.[ch]: Make Check_Property() take a
+ OTL_GlyphItem, add a gproperties field to OTLGlyphItem,
+ and use that to cache the properties for a glyph.
+
+ * ftxgsub.c ftxgdef.c: Adapt to Check_Property() changes.
+
+ * otlbuffer.[ch] ftxgsub.c: Add otl_buffer_copy_output_glyph()
+ to use when we are copying an unmodified glyph from input
+ to output that preserves the cached properties.
+
+ src/ftxgdef.c | 16 ++++++++++------
+ src/ftxgpos.c | 52
+ +++++++++++++++++++++++++++-------------------------
+ src/ftxgsub.c | 54
+ ++++++++++++++++++++++++++++--------------------------
+ src/ftxopenf.h | 2 +-
+ src/otlbuffer.c | 21 +++++++++++++++++++--
+ src/otlbuffer.h | 6 ++++++
+ 6 files changed, 91 insertions(+), 60 deletions(-)
+
+commit 81b62af42313fb60db523374cd8c6901829f5c4e
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Mon Jul 19 21:13:23 2004 +0000
+
+ Add support for ChainContextSubstFormat3.
+
+ Mon Jul 19 17:09:11 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/disasm.c: Add support for
+ ChainContextSubstFormat3.
+
+ src/disasm.c | 16 +++++++++++++++-
+ 1 files changed, 15 insertions(+), 1 deletions(-)
+
+commit d4f773ef92fdbaa7e61e6577db5e9b2846a100a4
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Mon Jul 19 20:37:22 2004 +0000
+
+ Fix pervasive buffer overruns when skipping glyphs when matching
+ contexts.
+
+ Mon Jul 19 16:29:45 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c pango/opentype/ftxgpos.c:
+ Fix pervasive buffer overruns when skipping glyphs
+ when matching contexts. (#118592, Kailash C. Chowksey)
+
+ src/ftxgpos.c | 259 +++++++++++++++++----------------------
+ src/ftxgsub.c | 376
+ ++++++++++++++++++++++++++-------------------------------
+ 2 files changed, 284 insertions(+), 351 deletions(-)
+
+commit 99848cfafee8e598ef533f254cdb99fbae4c9364
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Wed Jun 23 20:33:35 2004 +0000
+
+ #143693, Sayamindu Dasgupta
+
+ Wed Jun 23 16:13:53 2004 Owen Taylor <otaylor@redhat.com>
+
+ #143693, Sayamindu Dasgupta
+
+ * pango/opentype/pango-ot-buffer.c
+ (pango_ot_buffer_set_zero_width_marks)
+ pango/opentype/pango-ot-private.h:
+ Allow setting for whether marks should be given zero width,
+ defaulting to FALSE.
+
+ * modules/arabic/arabic-fc.c (arabic_engine_shape): Turn
+ on zero-width-marks setting.
+
+ src/pango-ot-buffer.c | 22 +++++++++++++++++++++-
+ src/pango-ot-private.h | 5 +++--
+ 2 files changed, 24 insertions(+), 3 deletions(-)
+
+commit 68d4cedb8726fa239f56d62060d8fee7e09cb8be
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Mon Jun 21 18:04:02 2004 +0000
+
+ Use the gcc-3.3 strict-aliasing compatible macros from fterrcompat.h
+
+ Mon Jun 21 13:55:17 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/otlbuffer.c: Use the gcc-3.3
+ strict-aliasing compatible macros from fterrcompat.h
+ (#140495, reported by Stanislav Brabec)
+
+ src/otlbuffer.c | 22 ++++++++++++++--------
+ 1 files changed, 14 insertions(+), 8 deletions(-)
+
+commit b327765176dff81047f942ac56a1d206344e6039
+Author: Theppitak Karoonboonyanan <tkaroonb@src.gnome.org>
+Date: Fri May 28 16:41:36 2004 +0000
+
+ Negate y offset according to different conventions between
+
+ * pango/opentype/pango-ot-buffer.c (apply_gpos_ltr): Negate
+ y offset
+ according to different conventions between PangoGlyphString
+ and OTL
+ (#142544)
+
+ src/pango-ot-buffer.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 068763b547d791e28b892bcaee810f3d60a83018
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Thu May 27 21:55:50 2004 +0000
+
+ Revert error return changes from last commit.
+
+ Thu May 27 17:54:24 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/otlbuffer.c: Revert error return changes
+ from last commit.
+
+ src/otlbuffer.c | 16 ++++++----------
+ 1 files changed, 6 insertions(+), 10 deletions(-)
+
+commit ef07481025c5bbb9769b9f908d9dc78f44161bbb
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Thu May 27 21:03:42 2004 +0000
+
+ Free buffer->positions, clean up error returns that were returning
+
+ Thu May 27 16:57:30 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/otlbuffer.c: Free buffer->positions,
+ clean up error returns that were returning uninitialized
+ values. (#139239, Behdad Esfahbod)
+
+ src/otlbuffer.c | 21 +++++++++++++--------
+ 1 files changed, 13 insertions(+), 8 deletions(-)
+
+commit de568e7e6200c7a49bae1f78ac63858b8df01173
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Tue Mar 16 19:23:43 2004 +0000
+
+ === Released 1.4.0 ===
+
+ Tue Mar 16 11:24:46 2004 Owen Taylor <otaylor@redhat.com>
+
+ * === Released 1.4.0 ===
+
+ * configure.in: Version 1.4.0, interface ago 0. Require
+ glib-2.4.0.
+
+ * NEWS: Updates.
+
+ * README: Some updates; include details about the FreeType
+ license of the OpenType code.
+
+ src/FT-license.txt | 77
+ ++++++++++++++++++++++++++++-----------------------
+ 1 files changed, 42 insertions(+), 35 deletions(-)
+
+commit 8b3554b3afe7c125b1a53171b01ac87de9c486fe
+Author: Hans Breuer <hans@breuer.org>
+Date: Wed Mar 3 22:35:19 2004 +0000
+
+ if PANGO_MODULE_PREFIX is defined include the basic backend shaper
+ (should
+
+ 2004-03-03 Hans Breuer <hans@breuer.org>
+
+ * pango/module-defs-win32.c.win32 : if PANGO_MODULE_PREFIX is
+ defined include the basic backend shaper (should have been
+ commited at 2003-12-12, too)
+
+ * pango/makefile.msc : generate correct type for PangoFontMask
+ (bug #135892, John Ehresman)
+ * pango/opentype/makefile.msc : updated
+
+ * pango/pango.def pango/pangoft2.def : more updatd externals
+
+ src/makefile.msc | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit a7e096c5de3ec5319bf9333c9ace0732d97c52c3
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Sun Feb 29 15:44:50 2004 +0000
+
+ Rework opentype interfaces and other changes to make GPOS work
+ for Arabic.
+
+ Sun Feb 29 09:25:13 2004 Owen Taylor <otaylor@redhat.com>
+
+ Rework opentype interfaces and other changes to make GPOS
+ work for Arabic. (Most of #117282, #121060)
+
+ * pango/opentype/otlbuffer.[ch]: OTL_Buffer that
+ acts as a replacement for the separate GSUB and
+ GPOS string structures and hides many of the internal
+ details.
+
+ * pango/opentype/ftxgsub.[ch] pango/opentype/ftxgpos.[ch]:
+ Adapt to OTL_Buffer.
+
+ * pango/opentype/ftxgpos.c: Redo handling of cursive
+ chains so that it actually works.
+
+ * pango/pango-ot.h pango/opentype/pango-ot-buffer.c:
+ Pango wrapper around OTL_Buffer.
+
+ * pango/pango-ot.h pango/pango-ot-ruleset.c
+ pango/pango-ot-buffer.c:
+ Split pango_ot_ruleset_shape() into
+ pango_ot_ruleset_substitute(),
+ pango_ot_ruleset_position(), make them act on
+ PangoOTBuffer, add a separate pango_ot_buffer_output()
+ which does the default positioning and writes to a
+ PangoGlyphString.
+
+ * modules/arabic/arabic-fc.c modules/indic/indic-fc.c
+ modules/indic/mprefixups.[ch]: Adapt to new OpenType
+ interfaces; add GPOS features for Arabic.
+
+ * pango/opentype/pango-ot-info.c: Don't derive class
+ information
+ from Unicode properties for Arabic presentation forms,
+ let the shaping process derive the properties.
+
+ src/Makefile.am | 3 +
+ src/ftxgdef.c | 4 +-
+ src/ftxgpos.c | 573 +++++++++++++++-----------------------
+ src/ftxgpos.h | 23 +--
+ src/ftxgsub.c | 719
+ +++++++++++-------------------------------------
+ src/ftxgsub.h | 40 +---
+ src/ftxopen.h | 1 +
+ src/otlbuffer.c | 213 ++++++++++++++
+ src/otlbuffer.h | 97 +++++++
+ src/ottest.c | 2 +
+ src/pango-ot-buffer.c | 265 ++++++++++++++++++
+ src/pango-ot-info.c | 27 ++-
+ src/pango-ot-private.h | 8 +
+ src/pango-ot-ruleset.c | 148 +++--------
+ 14 files changed, 1039 insertions(+), 1084 deletions(-)
+
+commit d670ddf99192dd4999775a9215a818ae63fa3416
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Sat Feb 21 14:53:12 2004 +0000
+
+ Sign convention for y offsets is opposite between PangoGlyphString
+ and FT
+
+ Sat Feb 21 09:49:23 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/pango-ot-ruleset.c (pango_ot_ruleset_shape):
+ Sign convention for y offsets is opposite between
+ PangoGlyphString and FT code. (#132591)
+
+ src/pango-ot-ruleset.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b9b3c131c2b57c12a77124a52512fb19a1255f8e
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Fri Feb 13 16:11:40 2004 +0000
+
+ Memory leak fixes from Masatake YAMATO, #130652
+
+ Fri Feb 13 10:54:18 2004 Owen Taylor <otaylor@redhat.com>
+
+ Memory leak fixes from Masatake YAMATO, #130652
+
+ * pango/opentype/ftxgdef.c (TT_Done_GDEF_Table):
+ Free the gdef table as well as the contained data.
+
+ * pango/opentype/ftxgdef.c (TT_GDEF_Build_ClassDefinition):
+ Set gcd->loaded, so that the contents get freed later.
+
+ src/ftxgdef.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 926b8f322989298e43c8bac85f23e3525470a669
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Mon Jan 26 19:23:35 2004 +0000
+
+ Suport CFF fonts as well. (#131202, Manjunath Sripadarao)
+
+ Mon Jan 26 14:20:34 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/pango-ot-info.c (is_truetype): Suport
+ CFF fonts as well. (#131202, Manjunath Sripadarao)
+
+ src/pango-ot-info.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 945e479a3a35769e5e7c792fdcf306892523a5f9
+Author: Hans Breuer <hans@breuer.org>
+Date: Sat Dec 13 14:31:50 2003 +0000
+
+ moved pango_fc_* to the latter where they live on *nix too.
+
+ 2003-12-13 Hans Breuer <hans@breuer.org>
+
+ * pango/pango.def pangoft2.def : moved pango_fc_*
+ to the latter where they live on *nix too.
+
+ * pango/makefile.msc : make it build again (including
+ the Ft2 backend)
+
+ * pango/module-defs-fc.c.win32 : if PANGO_MODULE_PREFIX is defined
+ include the basic backend shaper
+
+ * pango/pangowin32.c (pango_win32_render_layout) :
+ initialize iter before first usage to avoid immediate crashing
+
+ * pango/opentype/makefile.msc
+ pango/modules/makefile.msc : finally build with mscv, too.
+ [completely untested cause I'm not able to type, write or read
+ any of these languages]
+
+ * modules/modules.def : follow module function renaming/changes
+
+ * modules/basic/basic-win32.c : register the right engine, i.e.
+ make it compile
+
+ src/makefile.msc | 21 +++++++++++++++++++++
+ 1 files changed, 21 insertions(+), 0 deletions(-)
+
+commit ba0ccd5cfcb514cdc45373158343138b7b190f9d
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Sat Nov 1 15:02:17 2003 +0000
+
+ Switch over to recommended Freetype system of include ft2build.h then
+
+ Sat Nov 1 09:32:15 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pango-ot.h pango/pangofc-font.h
+ modules/indic/indic-ot.h
+ pango/pangoft2.c pango/opentype/pango-ot-info.c
+ pango/opentype/pango-ot-ruleset.c pango/opentype/ottest.c
+ pango/opentype/ftxopen.[ch] pango/opentype/ftxgdef.c
+ pango/opentype/ftxgsub.c pango/opentype/ftxgpos.c:
+ Switch over to recommended Freetype system of
+ include ft2build.h then #include FT_FREETYPE_H.
+ Fixes ftmodule.h problem with current Freetype CVS.
+ (#125548)
+
+ src/ftxgdef.c | 14 +++++++-------
+ src/ftxgpos.c | 17 ++++++++---------
+ src/ftxgsub.c | 13 ++++++-------
+ src/ftxopen.c | 10 +++++-----
+ src/ftxopen.h | 3 ++-
+ src/ottest.c | 1 -
+ src/pango-ot-info.c | 4 ++--
+ src/pango-ot-private.h | 2 --
+ src/pango-ot-ruleset.c | 4 ++--
+ 9 files changed, 32 insertions(+), 36 deletions(-)
+
+commit 558171a7a3666999c679719ad0bfbdf7c6a52289
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Mon Sep 15 22:04:55 2003 +0000
+
+ Fix gcc-3.3 versions of macros to have the right return value.
+
+ Mon Sep 15 17:16:59 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/fterrcompat.h: Fix gcc-3.3 versions of
+ macros to have the right return value.
+
+ src/fterrcompat.h | 44 ++++++++++++++++++++++++++------------------
+ 1 files changed, 26 insertions(+), 18 deletions(-)
+
+commit c99259bf7e08ccdc4130d4983e8d186021ea8e1a
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Mon Aug 25 14:30:12 2003 +0000
+
+ pango/opentype/ftxgsub.c (Lookup_ChainContextSubst3) Fix problems
+ where
+
+ Mon Aug 25 10:17:21 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (Lookup_ChainContextSubst3)
+ * pango/opentype/ftxgpos.c (Lookup_ChainContextPos3):
+ Fix problems where the coverage wasn't being checked
+ for the first input glyph. (#118639, Kailash C. Chowksey)
+
+ src/ftxgpos.c | 7 +++----
+ src/ftxgsub.c | 7 +++----
+ 2 files changed, 6 insertions(+), 8 deletions(-)
+
+commit bcf81bcc80c6235dfbc7eeaa34ed21ea329c7a3d
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Fri Aug 22 22:52:08 2003 +0000
+
+ Add some macro definitions for gcc-3.3 that suppress the bogus
+
+ Fri Aug 22 18:09:52 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/fterrcompat.h: Add some macro definitions
+ for gcc-3.3 that suppress the bogus strict-aliasing
+ warnings.
+
+ * pango/pango-utils.c (read_config_file): Use
+ g_hash_table_new_full() to simplify code and fix
+ gcc-3.3 warnings.
+
+ * pango/pangox-fontmap.c (pango_x_real_get_coverage_win)
+ * pango/querymodules.c (query_module): Suppress gcc-3.3
+ warnings.
+
+ * pango/modules.c (pango_find_map): Fix warning from
+ missing declaration of pango_module_get_type().
+
+ * pango/pango-context.c/pango-engine.c: Fix name confusion
+ for pango_get_fallback_shaper().
+
+ src/fterrcompat.h | 36 ++++++++++++++++++++++++++++++++++--
+ 1 files changed, 34 insertions(+), 2 deletions(-)
+
+commit 46d379596d7292a3b2e51f35fc8044b366d413a3
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Tue Jul 29 14:21:54 2003 +0000
+
+ Rewrite handling of IGNORE_SPECIAL_MARKS to be properly "ignore
+ marks of
+
+ Tue Jul 29 09:58:13 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgdef.c (Check_Property): Rewrite
+ handling of IGNORE_SPECIAL_MARKS to be properly
+ "ignore marks of attachment type different than
+ specified. (#118456, Kailash C. Chowksey)
+
+ src/ftxgdef.c | 37 ++++++++++++++++++++++++++++---------
+ 1 files changed, 28 insertions(+), 9 deletions(-)
+
+commit 8247acad79c1a4154e9337aed453eb3e4d23063d
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Mon Jul 28 22:28:37 2003 +0000
+
+ Revert back out the FreeType patch preventing ligatures of
+ not-originally
+
+ Sat Jul 26 09:41:22 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (Lookup_LigatureSubst):
+ Revert back out the FreeType patch preventing
+ ligatures of not-originally adjacent glyphs;
+ it doesn't work for all scripts. (#118472,
+ Kailash C. Chowksey)
+
+ src/ftxgsub.c | 31 +++----------------------------
+ 1 files changed, 3 insertions(+), 28 deletions(-)
+
+commit 825e6d7e86cac310161648601b09291fa05d5ba5
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Sun Jul 27 02:40:31 2003 +0000
+
+ Check for lookahead glyphs in the right place. (Patch from #116860)
+
+ Sat Jul 26 22:30:59 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (Lookup_ChainContextSubst{1,2,3}):
+ Check for lookahead glyphs in the right place. (Patch
+ from #116860)
+
+ * pango/opentype/ftxgpos.c (Lookup_ChainContextPos{1,2,3}):
+ Same fix here.
+
+ src/ftxgpos.c | 6 +++---
+ src/ftxgsub.c | 6 +++---
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 03a0fe09c711b81c7eb4065fd4700b8cfd2c977a
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Sun Jul 27 02:19:52 2003 +0000
+
+ Fix return value to only contain TTO_Err_Not_Covered if *no* lookups
+
+ Sat Jul 26 22:12:46 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (Do_String_Lookup,
+ TT_GSUB_Apply_String): Fix return value to only
+ contain TTO_Err_Not_Covered if *no* lookups
+ matched. Fix memory leaks on error in Apply_String().
+
+ src/ftxgsub.c | 120
+ +++++++++++++++++++++++++++++++++++---------------------
+ 1 files changed, 75 insertions(+), 45 deletions(-)
+
+commit e10ea2afd9a5868d4ec1ff3a2b99bcd64ce45816
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Sun Jul 27 01:10:15 2003 +0000
+
+ Fix confusion between boolean and FT_Error return. (GSUB equivalent
+ of fix
+
+ Sat Jul 26 21:06:26 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (Load_EmptyOrClassDefinition):
+ Fix confusion between boolean and FT_Error return.
+ (GSUB equivalent of fix for #108358)
+
+ src/ftxgsub.c | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit a7305ab2624cbc08160dc11587ba3dc4e17781c2
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Sat Jul 26 15:02:13 2003 +0000
+
+ Move allocation afer initial checks, fixing memory leak.
+
+ Sat Jul 26 10:52:20 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgpos.c (Lookup_ContextPos2):
+ * pango/opentype/ftxgsub.c (Lookup_ContextSubst2): Move
+ allocation afer initial checks, fixing memory leak.
+
+ * pango/opentype/ftxgsub.c (Lookup_ChainContextSubst2):
+ Fix some more error return memory leaks that weren't
+ fixed in the Qt changes.
+
+ src/ftxgpos.c | 8 ++++----
+ src/ftxgsub.c | 12 ++++++------
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+commit f40b7c15e0bc4b71e706602c4e062f72d8f0fcdd
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Sat Jul 26 14:50:23 2003 +0000
+
+ Fix various memory leaks from error returns that should have been
+ jumps to
+
+ Sat Jul 26 10:43:20 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c pango/opentype/ftxgpos.c:
+ Fix various memory leaks from error returns that should
+ have been jumps to cleanup blocks. (From Qt, Lars Knoll)
+
+ src/ftxgpos.c | 8 ++++----
+ src/ftxgsub.c | 4 ++--
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 256d21970733483833b9cf31d5e0fa7ae853e944
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Sat Jul 26 14:35:29 2003 +0000
+
+ Fix additional places where TTO_Err_Not_Covered wasn't considered a
+
+ Sat Jul 26 10:30:24 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgpos.c: Fix additional places where
+ TTO_Err_Not_Covered wasn't considered a successful return
+ from Get_Class. (From Qt, Lars Knoll)
+
+ src/ftxgpos.c | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 374960681e2e36d0e4032623d8cb92a7910baf71
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Sat Jul 26 13:50:23 2003 +0000
+
+ If applying a ligature lookup makes adjacent two glyphs that were not
+
+ Sat Jul 26 09:41:22 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (Lookup_LigatureSubst):
+ If applying a ligature lookup makes adjacent two glyphs
+ that were not originally adjacent, avoid making
+ subsequent ligatures between those glyphs.
+ (From FreeType, Werner Lemberg, 2001-08-22, 2001-08-23)
+
+ src/ftxgsub.c | 31 ++++++++++++++++++++++++++++---
+ 1 files changed, 28 insertions(+), 3 deletions(-)
+
+commit b682482df77608d67eca8a050db5b36f44953c13
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Sat Jul 26 13:20:52 2003 +0000
+
+ Fix some FreeType1 variable declarations that snuck in from the last
+
+ Sat Jul 26 09:16:57 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgpos.c pango/opentype/ftxopen.c:
+ Fix some FreeType1 variable declarations that snuck
+ in from the last commits (Christophe Fergeau,
+ 118363)
+
+ src/ftxgpos.c | 6 +++---
+ src/ftxopen.c | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 06c12109de061c357f46dcec82c4bee7160afede
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Sat Jul 26 03:45:44 2003 +0000
+
+ OpenType-1.4 update: backtrack information is stored with the
+ item closest
+
+ Fri Jul 25 23:38:07 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgpos.c pango/opentype/ftxgsub.c:
+ OpenType-1.4 update: backtrack information is stored with the
+ item closest to the input first (From FreeType,
+ Werner Lemberg, 2002-09-26)
+
+ src/ftxgpos.c | 26 ++++++++++++++++++--------
+ src/ftxgsub.c | 24 +++++++++++++++++-------
+ 2 files changed, 35 insertions(+), 15 deletions(-)
+
+commit 15a69e4a12739e7392f2a38d6f7bfdd96c0dc3ba
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Sat Jul 26 03:14:23 2003 +0000
+
+ Update of GPOS and GSUB support to OpenType 1.3 (From FreeType, Werner
+
+ Fri Jul 25 23:07:06 2003 Owen Taylor <otaylor@redhat.com>
+
+ Update of GPOS and GSUB support to OpenType 1.3
+ (From FreeType, Werner Lemberg, 2001-08-08)
+
+ * pango/opentype/ftxopen.h: Add RIGHT_TO_LEFT LookupFlag
+
+ * pango/opentype/ftxgpos.c (GPOS_Instance): Add 'first'
+ member to mark the beginning of a chain of cursive
+ connections.
+
+ * pango/opentype/ftxgpos.c (Do_String_Lookup): If the
+ RIGHT_TO_FLAG flag is set, shift cursive chain up so
+ last glyph is on the baseline.
+
+ src/ftxgpos.c | 25 ++++++++++++++++++++++++-
+ src/ftxopen.h | 8 ++++++--
+ 2 files changed, 30 insertions(+), 3 deletions(-)
+
+commit 6f74f18b77402f3adf5bfbae26e8f44de6543b4e
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Sat Jul 26 03:03:40 2003 +0000
+
+ Add GPOS_LOOKUP_EXTENSION, GSUB_LOOKUP_EXTENSION, which allow lookup
+
+ Fri Jul 25 22:59:13 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftx{gpos,gsub}.h pango/opentype/ftxgdef.c:
+ Add GPOS_LOOKUP_EXTENSION, GSUB_LOOKUP_EXTENSION, which
+ allow lookup information to be stored at 32-bit offets
+ via a double indirection. (From FreeType, Werner Lemberg,
+ 2001-08-08)
+
+ src/ftxgpos.h | 17 +++++++++--------
+ src/ftxgsub.h | 1 +
+ src/ftxopen.c | 19 +++++++++++++++++++
+ 3 files changed, 29 insertions(+), 8 deletions(-)
+
+commit 375781c4546b5cfc453b99551ddf715bb162ffb9
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Sat Jul 26 02:44:19 2003 +0000
+
+ Fix a couple of places where TTO_Err_Not_Covered wasn't considered a
+
+ Fri Jul 25 22:25:48 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (Lookup_ContextSubst2,
+ Lookup_ChainContextSubst2): Fix a couple of
+ places where TTO_Err_Not_Covered wasn't considered
+ a successful return from Get_Class -- it means
+ use class index 0. (From FreeType, Werner Lemberg,
+ 2001-08-06)
+
+ src/ftxgsub.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 378e1889cd294cb77313ba7fdab3e52959bf2c40
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Sat Jul 26 02:10:42 2003 +0000
+
+ Improvements to OpenType-dumping code, based on changes in Qt by Lars
+
+ Fri Jul 25 20:12:00 2003 Owen Taylor <otaylor@redhat.com>
+
+ Improvements to OpenType-dumping code, based on
+ changes in Qt by Lars Knoll.
+
+ * pango/opentype/ottest.c: Tweak the debugging output,
+ suppress some warnings.
+
+ * pango/opentype/disasm.c: Add support for
+ GSUB Context/Chain GPOS MarkBase lookups, improve
+ output in various ways.
+
+ src/disasm.c | 242
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
+ src/ottest.c | 12 ++-
+ 2 files changed, 241 insertions(+), 13 deletions(-)
+
+commit 07bad0e77c42b5f2535e3b018bf9074d2f4ecc7c
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Thu Jul 24 21:05:29 2003 +0000
+
+ Fix uses of g_assert() around statements with side effects. (#115498,
+
+ Thu Jul 24 17:04:21 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/pango-ot-ruleset.c (pango_ot_ruleset_shape):
+ Fix uses of g_assert() around statements with side effects.
+ (#115498, patch from David Cuthbert)
+
+ src/pango-ot-ruleset.c | 14 +++++++++-----
+ 1 files changed, 9 insertions(+), 5 deletions(-)
+
+commit f91deef2c9473da5c3cb5e120f2d4fbf0d638166
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Wed Apr 16 21:48:29 2003 +0000
+
+ More careful handling of face->charmap; if is NULL, try to set
+ a unicode
+
+ Wed Apr 16 03:46:42 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/pango-ot-info.c (synthesize_class_def):
+ More careful handling of face->charmap; if is NULL,
+ try to set a unicode charmap, if that doesn't succeed,
+ return. (Hopefully fixes #106550)
+
+ src/pango-ot-info.c | 26 ++++++++++++++++++++++++--
+ 1 files changed, 24 insertions(+), 2 deletions(-)
+
+commit 587b3940f3ce71e8e1c9950086923d4eb78d62db
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Wed Apr 16 03:58:17 2003 +0000
+
+ When loading in Load_Chain{Sub,Pos}ClassRule, the limit we have only
+
+ Tue Apr 15 11:49:39 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxg{sub/pos}.c: When loading
+ in Load_Chain{Sub,Pos}ClassRule, the limit we
+ have only applies to the input ClassDef table.
+ Fixes problem with Arial Unicode. Much help from
+ Noah Levitt in tracing this down.
+
+ src/ftxgpos.c | 7 ++++---
+ src/ftxgsub.c | 7 ++++---
+ 2 files changed, 8 insertions(+), 6 deletions(-)
+
+commit 0d7567f8eaa1f8d0ec9cb89218ce3a1475d258ac
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Tue Apr 15 23:01:19 2003 +0000
+
+ Fix mispelled constant from last commit.
+
+ Tue Apr 15 06:57:02 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgpos.c: Fix mispelled constant
+ from last commit.
+
+ src/ftxgpos.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 73cd600798a9a7225b2ac8241ea371d48cf7baf3
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Tue Apr 15 22:15:41 2003 +0000
+
+ Fix confusion between boolean and FT_Error return. (#108358,
+ Noah Levitt)
+
+ Tue Apr 15 06:03:39 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgpos.c: Fix confusion between
+ boolean and FT_Error return. (#108358, Noah Levitt)
+
+ * pango/opentype/ftxopen.c (Get_Class1): index is
+ allowed to be NULL. (#108358, Noah Levitt)
+
+ src/ftxgpos.c | 5 +++--
+ src/ftxopen.c | 3 ++-
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+commit 462bd0be608c3d14e5b4c01099b02b3948a52369
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Tue Apr 15 21:05:53 2003 +0000
+
+ Fix infinite loop in the case where the charmap contains a character >
+
+ Tue Apr 15 05:00:39 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/pango-ot-info.c (synthesize_class_def):
+ Fix infinite loop in the case where the charmap contains
+ a character > 65535. (#106550, Morten Welinder.)
+
+ src/pango-ot-info.c | 14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 312e1c1cf9f2c1e2137b9aaa5181a541447923cb
+Author: James Henstridge <james@daa.com.au>
+Date: Tue Mar 11 12:31:16 2003 +0000
+
+ make similar changes to the ones on glib head (call gtk-docize, etc).
+
+ 2003-03-11 James Henstridge <james@daa.com.au>
+
+ * autogen.sh: make similar changes to the ones on glib head (call
+ gtk-docize, etc).
+
+ * configure.in: move some calculations into M4 macros, rather than
+ calculating them when configure runs.
+ Use AC_HELP_STRING where appropriate.
+ Replace gtk-doc checks with a call to GTK_DOC_CHECK.
+ Replace AC_OUTPUT_COMMANDS() call with a number of calls to
+ AC_CONFIG_COMMANDS (once per created file).
+ Get rid of the "chmod +x pango-config" bit, because there is no
+ pango-config anymore.
+
+ * Makefile.am: get rid of custom distcheck rule, and set
+ DISTCHECK_CONFIGURE_FLAGS, which is equivalent.
+ Use += to select which .pc files to install.
+
+ * pango/Makefile.am: Add rules to rebuild module-defs* files, and
+ remove them on clean.
+ Reorder so that rules related to each individual library are next
+ to each other.
+ Use BUILT_SOURCES for built sources.
+
+ * pango/opentype/Makefile.am: don't use STRIP_BEGIN/STRIP_END.
+
+ * modules/*/Makefile.am: simplify module makefiles through use of
+ +=, and regularise them a bit (fixed a few bugs in the process).
+
+ * docs/Makefile.am: remove common rules, and instead include
+ gtk-doc.make.
+
+ * examples/Makefile.am: add pango.modules to CLEANFILES.
+
+ * tests/Makefile.am: remove temporary files on clean.
+
+ src/Makefile.am | 11 +++++------
+ 1 files changed, 5 insertions(+), 6 deletions(-)
+
+commit 1aad15fd0c007c9075f2f7f4c4cacf576d726eea
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Mon Feb 17 22:04:29 2003 +0000
+
+ Add an --enable-debug configure argument defaulting to 'yes'
+ for unstable
+
+ Mon Feb 17 13:06:39 2003 Owen Taylor <otaylor@redhat.com>
+
+ * configure.in **/Makefile.am: Add an --enable-debug
+ configure argument defaulting to 'yes' for unstable
+ releases and 'minimum' for stable releases.
+ For minimum, -DG_DISABLE_CAST_CHECKS.
+
+ * pango/pangofc-fontmap.cI pango/pangoft2-fontmap.c
+ pango/pangoxft-fontmap.c: Add caching of fontsets
+ (#104495, initial patch and review by Soeren Sandmann)
+
+ * pango/pangofc-fontmap.cI pango/pangoft2-fontmap.c
+ pango/pangoxft-fontmap.c pango/pangoft2-private.h
+ pango/pangoxft-private.h: Remove cache of recently freed
+ fonts; not necessary now that we cache fontsets.
+
+ * pango/pangofc-fontmap.cI (pango_fc_pattern_set_free):
+ Rename from pango_fc_font_set_free to reflect
+ what it actually does.
+
+ * pango/pangofc-fontmap.cI pango/pangoft-fontmap.c
+ pango/pangoxft-fontmap.c: Combine clear-the-cache
+ functions; we didn't need separate clear-the-font-cache
+ and clear-the-pattern-cache functions.
+
+ src/Makefile.am | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 5febce1ffc956ea44526d50be7cf14c69c66cb34
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Wed Feb 12 22:12:55 2003 +0000
+
+ Up the FreeType version requirement to 2.0.9. (2.2.1 had a compilation
+
+ Wed Feb 12 16:59:23 2003 Owen Taylor <otaylor@redhat.com>
+
+ * configure.in pango/opentype/fterrcompat.h README:
+ Up the FreeType version requirement to 2.0.9.
+ (2.2.1 had a compilation failure with older versions,
+ this catches it more cleanly, and removes some unneeded
+ checks. #105302, problem reported by Will Partain.)
+
+ src/fterrcompat.h | 4 ----
+ 1 files changed, 0 insertions(+), 4 deletions(-)
+
+commit 54e85cc0cf3700d2c4af5396d79bd0e40df8f0da
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Sat Jan 11 00:16:26 2003 +0000
+
+ Export TT_New_GDEF_Table to create an empty GDEF table.
+
+ Fri Jan 10 18:56:36 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgdef.c: Export TT_New_GDEF_Table
+ to create an empty GDEF table.
+
+ * pango/opentype/pango-ot-info.c: If the font doesn't
+ have a class definition table, synthesize one using
+ the charmap and the unicode properties of characters
+ in the charmap. (Needed to make things work with various
+ old Arabic fonts, such as the KACST fonts)
+
+ src/ftxgdef.c | 46 +++++++++++++++-------
+ src/ftxgdef.h | 4 ++
+ src/pango-ot-info.c | 108
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 144 insertions(+), 14 deletions(-)
+
+commit db6bb4b034d4d8d546fc9bdc4ad28b16bb7f1bb7
+Author: Matthias Clasen <matthiasc@src.gnome.org>
+Date: Thu Nov 28 23:53:18 2002 +0000
+
+ Add docs.
+
+ * docs/tmpl/xft-fonts.sgml:
+ * docs/tmpl/freetype-fonts.sgml: Add docs.
+
+ * pango/pangoxft-fontmap.c (pango_xft_substitute_changed):
+ * pango/pangoft2-fontmap.c
+ (pango_ft2_font_map_set_default_substitute):
+ Fix doc typos.
+
+ src/pango-ot-info.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 226d9b67db852eb29ad37ec8121b79f3ea6f0b73
+Author: Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+Date: Tue Nov 26 13:37:10 2002 +0000
+
+ Do not add GLIB_CFLAGS to CFLAGS.
+
+
+ 2002-11-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Do not add GLIB_CFLAGS to CFLAGS.
+
+ * docs/Makefile.am, examples/Makefile.am,
+ modules/arabic/Makefile.am, modules/basic/Makefile.am,
+ modules/hangul/Makefile.am, modules/hebrew/Makefile.am,
+ modules/indic/Makefile.am, modules/tamil/Makefile.am,
+ modules/thai/Makefile.am, pango/Makefile.am,
+ pango/mini-fribidi/Makefile.am, pango/opentype/Makefile.am:
+ Instead add $(GLIB_CFLAGS) directly to INCLUDES (GTKDOC_CFLAGS for
+ docs/Makefile.am). Also some cosmetic line wrapping and
+ reindentation.
+
+ src/Makefile.am | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 80634a30b9abdf575320bc6fdacdba4e1ea3903d
+Author: Manish Singh <yosh@gimp.org>
+Date: Mon Oct 14 22:50:48 2002 +0000
+
+ Get rid of unnecessary casts for g_object_{ref,unref}
+
+ Mon Oct 14 15:39:41 2002 Manish Singh <yosh@gimp.org>
+
+ * pango/pango-context.c pango/pango-layout.c pango/pangoft2.c
+ pango/pangowin32-fontmap.c pango/pangowin32.c
+ pango/pangox-fontmap.c
+ pango/pangox.c pango/pangoxft-font.c pango/pangoxft-fontmap.c
+ pango/testfonts.c pango/opentype/pango-ot-ruleset.c:
+ Get rid of unnecessary casts for g_object_{ref,unref}
+
+ src/pango-ot-ruleset.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 741993e0b15b4df86d76fa8df5055bd764c42c71
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Sun Sep 29 19:06:58 2002 +0000
+
+ ligatures can be also used in MarkBasePos lookups. (2001-03-17 Werner
+
+ Sun Sep 29 14:55:36 2002 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgpos.c: ligatures can be also used in
+ MarkBasePos lookups. (2001-03-17 Werner Lemberg)
+
+ src/ftxgpos.c | 13 ++++++++++---
+ 1 files changed, 10 insertions(+), 3 deletions(-)
+
+commit a35dc445e86ab433fe9f3937c95f2c1f18f58110
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Sun Sep 29 19:05:01 2002 +0000
+
+ Start of merges from freetype1 of OpenType fixes.
+
+ Sun Sep 29 14:51:25 2002 Owen Taylor <otaylor@redhat.com>
+
+ Start of merges from freetype1 of OpenType fixes.
+
+ (2001-03-17 Werner Lemberg)
+
+ * pango/opentype/ftxgdef.c pango/opentype/ftxgpos.c
+ pango/opentype/ftxg\sub.c:
+ More fixes for special marks.
+
+ src/ftxgdef.c | 13 ++++++++-----
+ src/ftxgpos.c | 6 +++---
+ src/ftxgsub.c | 4 ++--
+ 3 files changed, 13 insertions(+), 10 deletions(-)
+
+commit 5c53f14f371b349da65dfa3a848b17ab89ce3ba8
+Author: Tor Lillqvist <tml@iki.fi>
+Date: Mon Sep 23 21:45:31 2002 +0000
+
+ Remove. Not used. (A static library is built here. Exported entries
+ are in
+
+ 2002-09-24 Tor Lillqvist <tml@iki.fi>
+
+ * pango/opentype/pango-ot.def: Remove. Not used. (A static library
+ is built here. Exported entries are in ../pangoft2.def.)
+
+ * pango/opentype/Makefile.am (EXTRA_DIST): Remove from here, too.
+
+ src/Makefile.am | 3 +--
+ src/pango-ot.def | 50
+ --------------------------------------------------
+ 2 files changed, 1 insertions(+), 52 deletions(-)
+
+commit 35e4593ccd9ea5ed78f1e6f32f04b3a13cee0145
+Author: Tor Lillqvist <tml@iki.fi>
+Date: Mon Sep 23 21:19:30 2002 +0000
+
+ pango/makefile.mingw.in pango/mini-fribidi/makefile.mingw Remove. Not
+
+ 2002-09-23 Tor Lillqvist <tml@iki.fi>
+
+ * pango/makefile.mingw.in
+ * pango/mini-fribidi/makefile.mingw
+ * pango/opentype/makefile.mingw.in: Remove. Not maintained.
+
+ * pango/Makefile.am (EXTRA_DIST)
+ * pango/mini-fribidi/Makefile.am (EXTRA_DIST)
+ * pango/opentype/Makefile.am (EXTRA_DIST): Remove
+ makefile.mingw(.in) from here, too.
+
+ * configure.in (AC_OUTPUT): Don't try to output above removed
+ files.
+
+ src/Makefile.am | 3 +--
+ src/makefile.mingw.in | 43 -------------------------------------------
+ 2 files changed, 1 insertions(+), 45 deletions(-)
+
+commit fb279cb0bf676bb1d225e6a296282523d839074d
+Author: Eric Mader <emader@src.gnome.org>
+Date: Mon Sep 9 18:11:55 2002 +0000
+
+ Correctly handle back, new_advance.
+
+ src/pango-ot-ruleset.c | 25 ++++++++++++++++---------
+ 1 files changed, 16 insertions(+), 9 deletions(-)
+
+commit c880e814a50100577811a8a51bc06b4275c55a7e
+Author: Eric Mader <emader@src.gnome.org>
+Date: Fri Sep 6 22:45:23 2002 +0000
+
+ Don't fail when reading an empty script.
+
+ src/ftxopen.c | 36 +++++++++++++++++++++++++-----------
+ src/ftxopen.h | 1 +
+ 2 files changed, 26 insertions(+), 11 deletions(-)
+
+commit 441e7d0292bf1a06396daac80fcbad23976a824d
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Wed Aug 7 17:01:52 2002 +0000
+
+ Offset to MarkAttachClassDef is offset to table, not offset to
+ offset to
+
+ Wed Aug 7 12:32:39 2002 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (TT_Load_GSUB_Table):
+ Offset to MarkAttachClassDef is offset to table,
+ not offset to offset to table.
+
+ * pango/opentype/ftxopen.c (Get_Device): Handle
+ NULL device tables which we represent with
+ d->DeltaValue == NULL.
+
+ src/ftxgsub.c | 13 -------------
+ src/ftxopen.c | 2 +-
+ 2 files changed, 1 insertions(+), 14 deletions(-)
+
+commit 48a16fa8090b67b046b2bb686ff4f6f038a2b8e8
+Author: Owen Taylor <otaylor@src.gnome.org>
+Date: Tue Jun 4 00:20:51 2002 +0000
+
+ on Jun 3 18:56:09 2002 Owen Taylor <otaylor@redhat.com>
+
+ Xft2 and fontconfig conversion, based largely on a patch
+ from Keith Packard.
+
+ * configure.in acconfig.h: Add checks for fontconfig, switch
+ Xft checks to switch for Xft2 using pkg-config.
+
+ * pangoxft.pc.in pangoxft.pc.in
+ modules/{arabic,basic,hebrew,indic,tamil}/Makefile.am
+ pango/Makefile.am: Reflect new Xft/fontconfig dependencies.
+
+ * pango/pangoxft-private.h pango/pangoxft-fontmap.c
+ modules/arabic/arabic-xft.c modules/indic/indic-xft.c:
+ Switch over to using Xft2 and fontconfig.
+
+ * pango/pangoft2.c pango/pangoft2-fontmap.c
+ pango/pangoft2-private.h
+ pango/pango/Makefile.am: Remove usage of mini-xft in
+ favor of fontconfig.
+
+ * pango/pango-ot.h pango/opentype/pango-ot-info.c
+ pango/pangoxft.h
+ modules/arabic/arabic-{xft,ft2}.c modules/indic/indic-xft.c:
+ Attach OpenType information directly to the FT_Face
+ structure using FT_Generic.
+
+ * modules/tamil/Makefile.am modules/tamil/tamil-xft.c
+ configure.in: Remove this module, no longer needed.
+
+ * pango/pangoxft-font.c (pango_xft_real_render): Coalesce
+ calls to Xft rendering functions.
+
+ src/pango-ot-info.c | 29 +++++++++++++++++++++++------
+ 1 files changed, 23 insertions(+), 6 deletions(-)
+
+commit 9df9af0b3615dc6a52d784233a3410a9080d9369
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Fri May 10 18:44:47 2002 +0000
+
+ Fix acess outside of a loaded frame and some memory leaks on failure.
+
+ Fri May 10 14:41:27 2002 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgdef.c (TT_Load_GDEF_Table): Fix acess
+ outside of a loaded frame and some memory leaks
+ on failure.
+
+ src/ftxgdef.c | 12 ++++++++++--
+ 1 files changed, 10 insertions(+), 2 deletions(-)
+
+commit a63dbbbeeb91ebf4ded2fc788f5810a3bd1e14fe
+Author: Eric Mader <mader@jtcsv.com>
+Date: Tue May 7 20:39:14 2002 +0000
+
+ Add modules modules/indic/indic-xft.c, indic-ot.c, indic-ot.h,
+
+ Mon May 06 15:07:39 2002 Eric Mader <mader@jtcsv.com>
+ * Add modules modules/indic/indic-xft.c, indic-ot.c, indic-ot.h,
+ indic-ot-class-tables.c
+
+ * pango/opentype/ftxgdef.c: Compute full offset for mark
+ attachment class table
+
+ * pango/opentype/ftxgpos.c: Only return TTO_Err_Not_Covered if
+ nothing matches
+
+ * pango/opentype/pango-ot-ruleset.c: enable GPOS processing
+
+ src/ftxgdef.c | 10 ++++++++--
+ src/ftxgpos.c | 33 ++++++++++++++-------------------
+ src/pango-ot-ruleset.c | 35 ++++++++++++++++++++++++++++++++++-
+ 3 files changed, 56 insertions(+), 22 deletions(-)
+
+commit cf00f8217c9dfcf50febbb06fad245d489a0abe6
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Tue Apr 23 20:20:29 2002 +0000
+
+ Add compatibility defines for changes in FreeType 2.1.0.
+
+ Tue Apr 23 16:15:07 2002 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/fterrcompat.h: Add compatibility
+ defines for changes in FreeType 2.1.0.
+
+ src/fterrcompat.h | 39 +++++++++++++++++++++++++++++++++++++--
+ 1 files changed, 37 insertions(+), 2 deletions(-)
+
+commit 6b1b04e3736fdca774052ac3cfbe9f027548c29d
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Fri Mar 15 06:46:05 2002 +0000
+
+ In Load_ChainContextSubst2, handle the case where an empty class
+
+ Fri Mar 15 01:35:56 2002 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c pango/opentype/ftxopen.c
+ pango/opentype/ftxopenf.h: In Load_ChainContextSubst2,
+ handle the case where an empty class definition
+ is represented by an offset of 0.
+
+ * pango/opentype/ftxgpos.c: Same for Load_ChainContextPos2.
+
+ * pango/opentype/{ftxopen.c,ftxgpos.c,ftxgsub.c,ftgdef.c}:
+ Fix pervasive bug where on cleanups on failure of loading
+ an array element, all array elements were freed, not
+ just the ones that had been succesfully loaded.
+
+ src/ftxgdef.c | 24 +++---
+ src/ftxgpos.c | 259
+ +++++++++++++++++++++++++++++++++++---------------------
+ src/ftxgsub.c | 159 ++++++++++++++++++++---------------
+ src/ftxopen.c | 53 ++++++++---
+ src/ftxopenf.h | 2 +
+ 5 files changed, 306 insertions(+), 191 deletions(-)
+
+commit 6050933f336f43453e35246525cfec362bd23acb
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Fri Mar 15 04:22:14 2002 +0000
+
+ Uncomment GPOS parts.
+
+ Thu Mar 14 23:05:18 2002 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxopen.c: Uncomment GPOS parts.
+
+ * pango/opentype/disasm.c: Start adding some GPOS
+ dumping.
+
+ src/disasm.c | 146
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/ftxopen.c | 20 +++-----
+ 2 files changed, 154 insertions(+), 12 deletions(-)
+
+commit 973bd60a2526666f68138255b8536d1eaee3c2c2
+Author: Sebastian Wilhelmi <wilhelmi@src.gnome.org>
+Date: Thu Dec 13 17:44:46 2001 +0000
+
+ Resuming aborted commit
+
+
+ Resuming aborted commit
+
+ src/Makefile.am | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 6926ca94255e5d52d99d0d64d126165fc725432d
+Author: Matthias Clasen <matthiasc@src.gnome.org>
+Date: Tue Oct 30 22:09:20 2001 +0000
+
+ Remove declarations of unimplemented functions
+
+ * docs/pango-sections.txt, pango/pango-ot.h: Remove
+ declarations
+ of unimplemented functions pango_ot_ruleset_set_glyph_loader
+ and
+ pango_ot_ruleset_set_alternate_func and the related typedefs
+ PangoOTGlyphLoader and PangoOTAlternateFunc.
+
+ * pango/opentype/pango-ot-info.c,
+ pango/opentype/pango-ot-ruleset.c: Documentation updates.
+
+ src/pango-ot-info.c | 76
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ src/pango-ot-ruleset.c | 27 +++++++++++++++++
+ 2 files changed, 103 insertions(+), 0 deletions(-)
+
+commit 87a475c09f6b9b391bca37de47a303a62a397b83
+Author: Havoc Pennington <hp@redhat.com>
+Date: Wed Sep 19 21:20:36 2001 +0000
+
+ header to abstract the difference between FreeType 2.0.3 and 2.0.4
+ error
+
+ 2001-09-19 Havoc Pennington <hp@redhat.com>
+
+ * pango/opentype/fterrcompat.h: header to abstract the difference
+ between FreeType 2.0.3 and 2.0.4 error codes, based on the
+ configure check.
+
+ * configure.in: check for the tterrors.h header in FreeType 2.0.3,
+ and define HAVE_FREETYPE_2_0_3 if we have it
+
+ src/Makefile.am | 1 +
+ src/fterrcompat.h | 16 ++++++++++++++++
+ src/ftxgdef.c | 3 ++-
+ src/ftxgpos.c | 3 ++-
+ src/ftxgsub.c | 3 ++-
+ src/ftxopen.c | 3 ++-
+ src/pango-ot-info.c | 2 +-
+ 7 files changed, 26 insertions(+), 5 deletions(-)
+
+commit 9c37226efe2489b4cf9618ec98f581c998aaf9e4
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Tue Sep 18 20:05:20 2001 +0000
+
+ Up to 0.19.
+
+ Tue Sep 18 15:47:08 2001 Owen Taylor <otaylor@redhat.com>
+
+ * configure.in (PANGO_MINOR_VERSION): Up to 0.19.
+
+ * pango/pango-font.h pango/pango-fontmap.[ch] pango/fonts.c
+ pango/pangoxft-fontmap.c pango/pangoft-fontmap.c
+ pango/pango-context.[ch]
+ pango/pangox-fontmap.c: Add new PangoFontFace and PangoFontFamily
+ object types, and change the font listing API to list faces and
+ families, instead of face names and font descriptions.
+
+ * pango/pango-font.h pango/fonts.c: Make PangoFontDescription
+ an opaque heap-allocated structure, add accessors and
+ convenience functions.
+
+ * pango/pango-font.h pango/pango-private.h: Make PangoFontMetrics
+ heap allocated, protect the structure definition with
+ #ifdef PANGO_ENABLE_BACKEND, and add getters for the fields.
+
+ * pango/pango-attributes.[ch] ( pango_attr_iterator_get_font):
+ instead of providing a base font description and one to fill
+ in, provide a single font description to modify based on
+ the attributes.
+
+ * pango/pango-attributes.[ch]: Fix PangoAttrFontDesc to have
+ a PangoFontDescription by reference, not by value.
+
+ * pango/pango-utils.[ch]: make pango_parse_style() and friends
+ take pointers to individual enumerations instead of to a
+ PangoFontDescription structure.
+
+ * pango/*.c: Fix for the PangoFontDescription and PangoFontMetrics
+ changes.
+
+ * pango/pango-{break,engine,indic,ot,xft}.h pango/Makefile.am
+ pango/opentype/Makefile.am: Protect portions with
+ PANGO_ENABLE_ENGINE to shrink the public API.
+
+ * modules/*/Makefile.am: -DPANGO_ENABLE_ENGINE.
+
+ * pango/{pangox.h,pangox-private.h} modules/basic/basic-x.c: Move
+ pango_x_font_get_unknown_glyph() into public header since it is
+ used from modules.
+
+ * pango/pango-{context,font,fontmap,modules.utils}.h
+ pango/Makefile.am:
+ Protect portions with PANGO_ENABLE_BACKEND to shrink the
+ public API.
+
+ * pango/*.h: Use G_BEGIN/END_DECLS
+
+ * examples/viewer-qt.[cc,h]: Fix for changes to font listing API,
+ PangoFontDescription.
+
+ * pango/pango-indic.h modules/indic/*: Since we install this
+ header fix it up to Pango conventions, namespece
+ ZERO_WIDTH_JOINER, ZERO_WIDTH_NON_JOINER.
+
+ * docs/pango-sections.txt: Updated.
+
+ src/Makefile.am | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 7dd0838863f65a8ff2e27d12679c9a289a76aec1
+Author: Darin Adler <darin@src.gnome.org>
+Date: Thu Jul 12 16:34:40 2001 +0000
+
+ Remove stray semicolon.
+
+ * modules/arabic/arabic-x.c: (arabic_engine_shape): Remove stray
+ semicolon.
+
+ * modules/arabic/arconv.h:
+ * modules/arabic/arconv.c: (shape), (doublelig), (arabic_reshape):
+ Use long* instead of int* for parameter to match what's passed in.
+
+ * modules/indic/bengali-x.c: Add missing <string.h> include.
+ (pango_indic_make_ligs): Use local variable that was added but not
+ ever used.
+ (pango_indic_engine_shape): Remove unused locals.
+
+ * modules/indic/devanagari-x.c: Add missing <string.h> include.
+ (pango_indic_engine_shape): Remove unused local.
+
+ * modules/indic/gujarati-x.c: Add missing <string.h> include.
+ (pango_indic_engine_shape): Remove unused local
+
+ * modules/tamil/tamil-x.c: (tamil_engine_shape): Initialize a
+ variable to quiet the compiler's unused warning.
+
+ * pango/.cvsignore: Ignore more generated files.
+
+ * pango/opentype/ftxgpos.c: (Get_Anchor): Add code to set up the
+ ap variable. The old code would just use the uninitialized value.
+
+ * pango/opentype/ftxopen.c: (Load_Coverage): Remove unused local.
+
+ * pango/opentype/pango-ot-ruleset.c: (pango_ot_ruleset_shape):
+ Remove unused local.
+
+ * pango/pango-attributes.c: (pango_attr_list_get_type),
+ (pango_color_get_type): Add needed function type casts (just
+ warnings under gcc, but could be errors in other compilers).
+
+ * pango/pangoxft-font.c: (pango_xft_font_get_metrics),
+ (pango_xft_font_get_coverage), (pango_xft_get_shaper_map),
+ (pango_xft_font_find_shaper): Switch from lang char* to
+ PangoLanguage*. The code was still compiling, but would not have
+ worked.
+
+ src/ftxgpos.c | 2 ++
+ src/ftxopen.c | 1 -
+ src/pango-ot-ruleset.c | 1 -
+ 3 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 68f8a64307441bd3b3d45971ac4dc93f63dedfe8
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Fri May 18 16:04:40 2001 +0000
+
+ Use ISO C99 varargs when available.
+
+ Fri May 18 11:30:57 2001 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/disasm.c: Use ISO C99 varargs when
+ available.
+
+ Thu May 17 11:16:23 2001 Owen Taylor <otaylor@redhat.com>
+
+ * pango/mapping.c: Fixup docs, remove some FIXMEs that are
+ no longer applicable.
+
+ * pango/pango-layout.c: Move by graphemes, not characters.
+
+ * pango/pango-layout.c (pango_layout_line_x_to_index):
+ Position at the closest grapheme boundary, not at character
+ boundaries.
+
+ * pango/pango-layout.c (pango_layout_line_index_to_x):
+ Return positions of grapheme boundaries, not character
+ boundaries.
+
+ src/Makefile.am | 2 ++
+ src/disasm.c | 5 +++++
+ 2 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 89eb36ebc6591025c063cb98f0e1b3badde73e9e
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Tue Apr 24 15:47:22 2001 +0000
+
+ Remove excess call to DONE_Stream left over from conversion from FT1.
+
+ Tue Apr 24 11:45:55 2001 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgdef.c (TT_Load_GDEF_Table): Remove
+ excess call to DONE_Stream left over from conversion
+ from FT1. (reported by Michael Jansson)
+
+ src/ftxgdef.c | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit c61a730aaebec751831f8423894de5f4b539d0ec
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Tue Apr 3 19:07:36 2001 +0000
+
+ Release 0.14
+
+ Tue Apr 3 15:05:19 2001 Owen Taylor <otaylor@redhat.com>
+
+ * Release 0.14
+
+ * NEWS: updated.
+
+ * pango/pango/opentype/Makefile.am: make dist fixes.
+
+ * configure.in (PANGO_MINOR_VERSION): Up to 0.14
+
+ src/Makefile.am | 10 ++++++++--
+ 1 files changed, 8 insertions(+), 2 deletions(-)
+
+commit 405b878923ed219617c6f643a9aec06175223d16
+Author: Tor Lillqvist <tml@iki.fi>
+Date: Thu Dec 21 19:55:23 2000 +0000
+
+ Only a script engine here.
+
+ 2000-12-21 Tor Lillqvist <tml@iki.fi>
+
+ * modules/basic/basic-win32.c (script_engine_load): Only a script
+ engine here.
+
+ * pango/makefile.mingw.in: Add the built pango-enum-types.[ch].
+
+ * pango/pango.def
+ * pango/pangoft2.def: Update.
+
+ * pango/opentype/pango-ot.def
+ * pango/opentype/makefile.mingw.in: New files.
+
+ * pango/opentype/Makefile.am (EXTRA_DIST): Add them.
+
+ * configure.in (included_modules): Generate
+ pango/opentype/makefile.mingw.
+
+ src/Makefile.am | 4 ++-
+ src/makefile.mingw.in | 43 ++++++++++++++++++++++++++++++++++++++++++
+ src/pango-ot.def | 50
+ +++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 96 insertions(+), 1 deletions(-)
+
+commit 80a15829135065e16ce5b129c715d10d14b829ba
+Author: Owen Taylor <otaylor@redhat.com>
+Date: Wed Dec 20 04:41:36 2000 +0000
+
+ Since Xft may only be available statically without shlib deps,
+ check for
+
+ Tue Dec 19 22:47:16 2000 Owen Taylor <otaylor@redhat.com>
+
+ * configure.in pango-config.in pangoxft.pc.in
+ modules/basic/Makefile.am: Since Xft may only be available
+ statically without shlib deps, check for FreeType libs explicitly
+ and include them when linking, otherwise things won't work. Also,
+ define FREETYPE_CFLAGS from freetype-config --cflags.
+
+ * modules/basic/basic-xft.c pango/pangoxft-font{,map}.c: Fool
+ Xft into not converting glyph indices by loading the
+ face unencoded then calling FT_Set_Charmap ourselves.
+
+ * pango/Makefile.am pango/pango-ot.h pango/opentype/* :Add start
+ of opentype handling - most of the actually meat of the code here
+ is the OpenType layout code from FreeType 1 ported to freetype2
+ and adapted slighlty for our purposes. Also, includes a
+ incomplete OpenType-table-dumping code useful for figuring
+ out what is going on.
+
+ * pango/pangoxft.h pango/pangoxft-font.h: Add calls for
+ getting FT_Face and PangoOTInfo from PangoXftFont.
+
+ * modules/arabic/{Makefile.am,arabic-ot.[ch],arabic-xft.c}:
+ Initial support for rendering Arabic with OpenType fonts.
+
+ src/.cvsignore | 8 +
+ src/FT-license.txt | 158 ++
+ src/Makefile.am | 39 +
+ src/README | 36 +
+ src/disasm.c | 317 +++
+ src/disasm.h | 26 +
+ src/ftxgdef.c | 1155 +++++++++
+ src/ftxgdef.h | 220 ++
+ src/ftxgpos.c | 6222
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ src/ftxgpos.h | 858 +++++++
+ src/ftxgsub.c | 4531 +++++++++++++++++++++++++++++++++++
+ src/ftxgsub.h | 612 +++++
+ src/ftxopen.c | 1467 ++++++++++++
+ src/ftxopen.h | 308 +++
+ src/ftxopenf.h | 161 ++
+ src/ottest.c | 265 ++
+ src/pango-ot-info.c | 438 ++++
+ src/pango-ot-private.h | 98 +
+ src/pango-ot-ruleset.c | 232 ++
+ 19 files changed, 17151 insertions(+), 0 deletions(-)
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..7d1c323
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,365 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+ Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package. Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below. The lack of an optional feature in a given package is not
+necessarily a bug. More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+ The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system.
+
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package, generally using the just-built uninstalled binaries.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation. When installing into a prefix owned by root, it is
+ recommended that the package be configured and built as a regular
+ user, and only the `make install' phase executed with root
+ privileges.
+
+ 5. Optionally, type `make installcheck' to repeat any self-tests, but
+ this time using the binaries in their final installed location.
+ This target does not install anything. Running this target as a
+ regular user, particularly if the prior `make install' required
+ root privileges, verifies that the installation completed
+ correctly.
+
+ 6. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+ 7. Often, you can also type `make uninstall' to remove the installed
+ files again. In practice, not all packages have tested that
+ uninstallation works correctly, even though it is required by the
+ GNU Coding Standards.
+
+ 8. Some packages, particularly those that use Automake, provide `make
+ distcheck', which can by used by developers to test that all other
+ targets like `make install' and `make uninstall' work correctly.
+ This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you can use GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'. This
+is known as a "VPATH" build.
+
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+ On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor. Like
+this:
+
+ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CPP="gcc -E" CXXCPP="g++ -E"
+
+ This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+ By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them. In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+ The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+ The first method involves providing an override variable for each
+affected directory. For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'. Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated. The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the `DESTDIR' variable. For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names. The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters. On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+ Some packages offer the ability to configure how verbose the
+execution of `make' will be. For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+ ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+ On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file. The option `-nodtk' can be used as
+a workaround. If GNU CC is not installed, it is therefore recommended
+to try
+
+ ./configure CC="cc"
+
+and if that doesn't work, try
+
+ ./configure CC="cc -nodtk"
+
+ On Solaris, don't put `/usr/ucb' early in your `PATH'. This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+ On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'. It is recommended to use the following options:
+
+ ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS
+ KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug. Until the bug is fixed you can use this workaround:
+
+ CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+ Print a summary of the options unique to this package's
+ `configure', and exit. The `short' variant lists options used
+ only in the top level, while the `recursive' variant lists options
+ also present in any nested packages.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+ Use DIR as the installation prefix. *note Installation Names::
+ for more details, including other options available for fine-tuning
+ the installation locations.
+
+`--no-create'
+`-n'
+ Run the configure checks, but stop before creating any output
+ files.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..ecaffd4
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,78 @@
+# Process this file with automake to produce Makefile.in
+
+NULL =
+
+SUBDIRS = src util test
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = harfbuzz.pc
+
+EXTRA_DIST = \
+ autogen.sh \
+ harfbuzz.doap \
+ $(NULL)
+
+MAINTAINERCLEANFILES = \
+ $(srcdir)/INSTALL \
+ $(srcdir)/aclocal.m4 \
+ $(srcdir)/autoscan.log \
+ $(srcdir)/compile \
+ $(srcdir)/config.guess \
+ $(srcdir)/config.h.in \
+ $(srcdir)/config.sub \
+ $(srcdir)/configure.scan \
+ $(srcdir)/depcomp \
+ $(srcdir)/install-sh \
+ $(srcdir)/ltmain.sh \
+ $(srcdir)/missing \
+ $(srcdir)/mkinstalldirs \
+ $(srcdir)/ChangeLog \
+ `find "$(srcdir)" -type f -name Makefile.in -print`
+
+
+#
+# ChangeLog generation
+#
+CHANGELOG_RANGE =
+ChangeLog:
+ $(AM_V_GEN) if test -d "$(top_srcdir)/.git"; then \
+ (GIT_DIR=$(top_srcdir)/.git $(top_srcdir)/missing --run \
+ git log $(CHANGELOG_RANGE) --stat) | fmt --split-only > $@.tmp \
+ && mv -f $@.tmp "$(srcdir)/ChangeLog" \
+ || ($(RM) $@.tmp; \
+ echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
+ (test -f $@ || echo git-log is required to generate this file >> "$(srcdir)/$@")); \
+ else \
+ test -f $@ || \
+ (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
+ echo A git checkout and git-log is required to generate this file >> "$(srcdir)/$@"); \
+ fi
+.PHONY: $(srcdir)/ChangeLog
+
+
+#
+# Release engineering
+#
+
+# TODO: Copy infrastructure from cairo
+
+TAR_OPTIONS = --owner=0 --group=0
+dist-hook: dist-clear-sticky-bits
+# Clean up any sticky bits we may inherit from parent dir
+dist-clear-sticky-bits:
+ chmod -R a-s $(distdir)
+
+
+tar_file = $(PACKAGE_TARNAME)-$(VERSION).tar.bz2
+sha256_file = $(tar_file).sha256
+gpg_file = $(sha256_file).asc
+$(sha256_file): $(tar_file)
+ sha256sum $^ > $@
+$(gpg_file): $(sha256_file)
+ @echo "Please enter your GPG password to sign the checksum."
+ gpg --armor --sign $^
+
+release-files: $(tar_file) $(sha256_file) $(gpg_file)
+
+
+-include $(top_srcdir)/git.mk
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..d17050f
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,881 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Process this file with automake to produce Makefile.in
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+ $(srcdir)/harfbuzz.pc.in $(top_srcdir)/configure AUTHORS \
+ COPYING ChangeLog INSTALL NEWS THANKS TODO compile \
+ config.guess config.sub depcomp install-sh ltmain.sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = harfbuzz.pc
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
+DATA = $(pkgconfig_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir dist dist-all distcheck
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d "$(distdir)" \
+ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr "$(distdir)"; }; }
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+GZIP_ENV = --best
+DIST_ARCHIVES = $(distdir).tar.bz2
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FT_CFLAGS = @CAIRO_FT_CFLAGS@
+CAIRO_FT_LIBS = @CAIRO_FT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CORETEXT_CFLAGS = @CORETEXT_CFLAGS@
+CORETEXT_LIBS = @CORETEXT_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GRAPHITE2_CFLAGS = @GRAPHITE2_CFLAGS@
+GRAPHITE2_LIBS = @GRAPHITE2_LIBS@
+GREP = @GREP@
+GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
+GTHREAD_LIBS = @GTHREAD_LIBS@
+HB_LIBTOOL_VERSION_INFO = @HB_LIBTOOL_VERSION_INFO@
+HB_VERSION = @HB_VERSION@
+HB_VERSION_MAJOR = @HB_VERSION_MAJOR@
+HB_VERSION_MICRO = @HB_VERSION_MICRO@
+HB_VERSION_MINOR = @HB_VERSION_MINOR@
+ICU_CFLAGS = @ICU_CFLAGS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UNISCRIBE_CFLAGS = @UNISCRIBE_CFLAGS@
+UNISCRIBE_LIBS = @UNISCRIBE_LIBS@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+SUBDIRS = src util test
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = harfbuzz.pc
+EXTRA_DIST = \
+ autogen.sh \
+ harfbuzz.doap \
+ $(NULL)
+
+MAINTAINERCLEANFILES = \
+ $(srcdir)/INSTALL \
+ $(srcdir)/aclocal.m4 \
+ $(srcdir)/autoscan.log \
+ $(srcdir)/compile \
+ $(srcdir)/config.guess \
+ $(srcdir)/config.h.in \
+ $(srcdir)/config.sub \
+ $(srcdir)/configure.scan \
+ $(srcdir)/depcomp \
+ $(srcdir)/install-sh \
+ $(srcdir)/ltmain.sh \
+ $(srcdir)/missing \
+ $(srcdir)/mkinstalldirs \
+ $(srcdir)/ChangeLog \
+ `find "$(srcdir)" -type f -name Makefile.in -print`
+
+
+#
+# ChangeLog generation
+#
+CHANGELOG_RANGE =
+
+#
+# Release engineering
+#
+
+# TODO: Copy infrastructure from cairo
+TAR_OPTIONS = --owner=0 --group=0
+tar_file = $(PACKAGE_TARNAME)-$(VERSION).tar.bz2
+sha256_file = $(tar_file).sha256
+gpg_file = $(sha256_file).asc
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnits'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnits \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnits Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+ @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+ else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f config.h stamp-h1
+harfbuzz.pc: $(top_builddir)/config.status $(srcdir)/harfbuzz.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool config.lt
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @case `sed 15q $(srcdir)/NEWS` in \
+ *"$(VERSION)"*) : ;; \
+ *) \
+ echo "NEWS not updated; not releasing" 1>&2; \
+ exit 1;; \
+ esac
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-lzma: distdir
+ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+ $(am__remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lzma*) \
+ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @$(am__cd) '$(distuninstallcheck_dir)' \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(DATA) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr \
+ distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-pkgconfigDATA
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-pkgconfigDATA
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
+ ctags-recursive install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am am--refresh check check-am clean clean-generic \
+ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
+ dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \
+ dist-zip distcheck distclean distclean-generic distclean-hdr \
+ distclean-libtool distclean-tags distcleancheck distdir \
+ distuninstallcheck dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-pkgconfigDATA install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-pkgconfigDATA
+
+ChangeLog:
+ $(AM_V_GEN) if test -d "$(top_srcdir)/.git"; then \
+ (GIT_DIR=$(top_srcdir)/.git $(top_srcdir)/missing --run \
+ git log $(CHANGELOG_RANGE) --stat) | fmt --split-only > $@.tmp \
+ && mv -f $@.tmp "$(srcdir)/ChangeLog" \
+ || ($(RM) $@.tmp; \
+ echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
+ (test -f $@ || echo git-log is required to generate this file >> "$(srcdir)/$@")); \
+ else \
+ test -f $@ || \
+ (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
+ echo A git checkout and git-log is required to generate this file >> "$(srcdir)/$@"); \
+ fi
+.PHONY: $(srcdir)/ChangeLog
+dist-hook: dist-clear-sticky-bits
+# Clean up any sticky bits we may inherit from parent dir
+dist-clear-sticky-bits:
+ chmod -R a-s $(distdir)
+$(sha256_file): $(tar_file)
+ sha256sum $^ > $@
+$(gpg_file): $(sha256_file)
+ @echo "Please enter your GPG password to sign the checksum."
+ gpg --armor --sign $^
+
+release-files: $(tar_file) $(sha256_file) $(gpg_file)
+
+-include $(top_srcdir)/git.mk
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..d3dbe1a
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,414 @@
+Overview of changes leading to 0.9.3
+Friday, Aug 18, 2012
+====================================
+
+- Fixed fallback mark positioning for left-to-right text.
+
+- Improve mark positioning for the remaining combining classes.
+
+- Unbreak Thai and fallback Arabic shaping.
+
+- Port Arabic shaper to shape-plan caching.
+
+- Use new ICU normalizer functions.
+
+
+
+Overview of changes leading to 0.9.2
+Friday, Aug 10, 2012
+====================================
+
+- Over a thousand commits! This is the first major release of HarfBuzz.
+
+- HarfBuzz is feature-complete now! It should be in par, or better, than
+ both Pango's shapers and old HarfBuzz / Qt shapers.
+
+- New Indic shaper, supporting main Indic scripts, Sinhala, and Khmer.
+
+- Improved Arabic shaper, with fallback Arabic shaping, supporting Arabic,
+ Sinhala, N'ko, Mongolian, and Mandaic.
+
+- New Thai / Lao shaper.
+
+- Tibetan / Hangul support in the generic shaper.
+
+- Synthetic GDEF support for fonts without a GDEF table.
+
+- Fallback mark positioning for fonts without a GPOS table.
+
+- Unicode normalization shaping heuristic during glyph mapping.
+
+- New experimental Graphite2 backend.
+
+- New Uniscribe backend (primarily for testing).
+
+- New CoreText backend (primarily for testing).
+
+- Major optimization and speedup.
+
+- Test suites and testing infrastructure (work in progress).
+
+- Greatly improved hb-view cmdline tool.
+
+- hb-shape cmdline tool.
+
+- Unicode 6.1 support.
+
+Summary of API changes:
+
+o Changed API:
+
+ - Users are expected to only include main header files now (ie. hb.h,
+ hb-glib.h, hb-ft.h, ...)
+
+ - All struct tag names had their initial underscore removed.
+ Ie. "struct _hb_buffer_t" is "struct hb_buffer_t" now.
+
+ - All set_user_data() functions now take a "replace" boolean parameter.
+
+ - hb_buffer_create() takes zero arguments now.
+ Use hb_buffer_pre_allocate() to pre-allocate.
+
+ - hb_buffer_add_utf*() now accept -1 for length parameteres,
+ meaning "nul-terminated".
+
+ - hb_direction_t enum values changed.
+
+ - All *_from_string() APIs now take a length parameter to allow for
+ non-nul-terminated strings. A -1 length means "nul-terminated".
+
+ - Typedef for hb_language_t changed.
+
+ - hb_get_table_func_t renamed to hb_reference_table_func_t.
+
+ - hb_ot_layout_table_choose_script()
+
+ - Various renames in hb-unicode.h.
+
+o New API:
+
+ - hb_buffer_guess_properties()
+ Automatically called by hb_shape().
+
+ - hb_buffer_normalize_glyphs()
+
+ - hb_tag_from_string()
+
+ - hb-coretext.h
+
+ - hb-uniscribe.h
+
+ - hb_face_reference_blob()
+ - hb_face_[sg]et_index()
+ - hb_face_set_upem()
+
+ - hb_font_get_glyph_name_func_t
+ hb_font_get_glyph_from_name_func_t
+ hb_font_funcs_set_glyph_name_func()
+ hb_font_funcs_set_glyph_from_name_func()
+ hb_font_get_glyph_name()
+ hb_font_get_glyph_from_name()
+ hb_font_glyph_to_string()
+ hb_font_glyph_from_string()
+
+ - hb_font_set_funcs_data()
+
+ - hb_ft_font_set_funcs()
+ - hb_ft_font_get_face()
+
+ - hb-gobject.h (work in progress)
+
+ - hb_ot_shape_glyphs_closure()
+ hb_ot_layout_substitute_closure_lookup()
+
+ - hb-set.h
+
+ - hb_shape_full()
+
+ - hb_unicode_combining_class_t
+
+ - hb_unicode_compose_func_t
+ hb_unicode_decompose_func_t
+ hb_unicode_decompose_compatibility_func_t
+ hb_unicode_funcs_set_compose_func()
+ hb_unicode_funcs_set_decompose_func()
+ hb_unicode_funcs_set_decompose_compatibility_func()
+ hb_unicode_compose()
+ hb_unicode_decompose()
+ hb_unicode_decompose_compatibility()
+
+o Removed API:
+
+ - hb_ft_get_font_funcs()
+
+ - hb_ot_layout_substitute_start()
+ hb_ot_layout_substitute_lookup()
+ hb_ot_layout_substitute_finish()
+ hb_ot_layout_position_start()
+ hb_ot_layout_position_lookup()
+ hb_ot_layout_position_finish()
+
+
+
+Overview of changes leading to 0.6.0
+Friday, May 27, 2011
+====================================
+
+- Vertical text support in GPOS
+- Almost all API entries have unit tests now, under test/
+- All thread-safety issues are fixed
+
+Summary of API changes follows.
+
+
+* Simple Types API:
+
+ o New API:
+ HB_LANGUAGE_INVALID
+ hb_language_get_default()
+ hb_direction_to_string()
+ hb_direction_from_string()
+ hb_script_get_horizontal_direction()
+ HB_UNTAG()
+
+ o Renamed API:
+ hb_category_t renamed to hb_unicode_general_category_t
+
+ o Changed API:
+ hb_language_t is a typed pointers now
+
+ o Removed API:
+ HB_TAG_STR()
+
+
+* Use ISO 15924 tags for hb_script_t:
+
+ o New API:
+ hb_script_from_iso15924_tag()
+ hb_script_to_iso15924_tag()
+ hb_script_from_string()
+
+ o Changed API:
+ HB_SCRIPT_* enum members changed value.
+
+
+* Buffer API streamlined:
+
+ o New API:
+ hb_buffer_reset()
+ hb_buffer_set_length()
+ hb_buffer_allocation_successful()
+
+ o Renamed API:
+ hb_buffer_ensure() renamed to hb_buffer_pre_allocate()
+ hb_buffer_add_glyph() renamed to hb_buffer_add()
+
+ o Removed API:
+ hb_buffer_clear()
+ hb_buffer_clear_positions()
+
+ o Changed API:
+ hb_buffer_get_glyph_infos() takes an out length parameter now
+ hb_buffer_get_glyph_positions() takes an out length parameter now
+
+
+* Blob API streamlined:
+
+ o New API:
+ hb_blob_get_data()
+ hb_blob_get_data_writable()
+
+ o Renamed API:
+ hb_blob_create_empty() renamed to hb_blob_get_empty()
+
+ o Removed API:
+ hb_blob_lock()
+ hb_blob_unlock()
+ hb_blob_is_writable()
+ hb_blob_try_writable()
+
+ o Changed API:
+ hb_blob_create() takes user_data before destroy now
+
+
+* Unicode functions API:
+
+ o Unicode function vectors can subclass other unicode function vectors now.
+ Unimplemented callbacks in the subclass automatically chainup to the parent.
+
+ o All hb_unicode_funcs_t callbacks take a user_data now. Their setters
+ take a user_data and its respective destroy callback.
+
+ o New API:
+ hb_unicode_funcs_get_empty()
+ hb_unicode_funcs_get_default()
+ hb_unicode_funcs_get_parent()
+
+ o Changed API:
+ hb_unicode_funcs_create() now takes a parent_funcs.
+
+ o Removed func getter functions:
+ hb_unicode_funcs_get_mirroring_func()
+ hb_unicode_funcs_get_general_category_func()
+ hb_unicode_funcs_get_script_func()
+ hb_unicode_funcs_get_combining_class_func()
+ hb_unicode_funcs_get_eastasian_width_func()
+
+
+* Face API:
+
+ o Renamed API:
+ hb_face_get_table() renamed to hb_face_reference_table()
+ hb_face_create_for_data() renamed to hb_face_create()
+
+ o Changed API:
+ hb_face_create_for_tables() takes user_data before destroy now
+ hb_face_reference_table() returns empty blob instead of NULL
+ hb_get_table_func_t accepts the face as first parameter now
+
+* Font API:
+
+ o Fonts can subclass other fonts now. Unimplemented callbacks in the
+ subclass automatically chainup to the parent. When chaining up,
+ scale is adjusted if the parent font has a different scale.
+
+ o All hb_font_funcs_t callbacks take a user_data now. Their setters
+ take a user_data and its respective destroy callback.
+
+ o New API:
+ hb_font_get_parent()
+ hb_font_funcs_get_empty()
+ hb_font_create_sub_font()
+
+ o Removed API:
+ hb_font_funcs_copy()
+ hb_font_unset_funcs()
+
+ o Removed func getter functions:
+ hb_font_funcs_get_glyph_func()
+ hb_font_funcs_get_glyph_advance_func()
+ hb_font_funcs_get_glyph_extents_func()
+ hb_font_funcs_get_contour_point_func()
+ hb_font_funcs_get_kerning_func()
+
+ o Changed API:
+ hb_font_create() takes a face and references it now
+ hb_font_set_funcs() takes user_data before destroy now
+ hb_font_set_scale() accepts signed integers now
+ hb_font_get_contour_point_func_t now takes glyph first, then point_index
+ hb_font_get_glyph_func_t returns a success boolean now
+
+
+* Changed object model:
+
+ o All object types have a _get_empty() now:
+ hb_blob_get_empty()
+ hb_buffer_get_empty()
+ hb_face_get_empty()
+ hb_font_get_empty()
+ hb_font_funcs_get_empty()
+ hb_unicode_funcs_get_empty()
+
+ o Added _set_user_data() and _get_user_data() for all object types:
+ hb_blob_get_user_data()
+ hb_blob_set_user_data()
+ hb_buffer_get_user_data()
+ hb_buffer_set_user_data()
+ hb_face_get_user_data()
+ hb_face_set_user_data()
+ hb_font_funcs_get_user_data()
+ hb_font_funcs_set_user_data()
+ hb_font_get_user_data()
+ hb_font_set_user_data()
+ hb_unicode_funcs_get_user_data()
+ hb_unicode_funcs_set_user_data()
+
+ o Removed the _get_reference_count() from all object types:
+ hb_blob_get_reference_count()
+ hb_buffer_get_reference_count()
+ hb_face_get_reference_count()
+ hb_font_funcs_get_reference_count()
+ hb_font_get_reference_count()
+ hb_unicode_funcs_get_reference_count()
+
+ o Added _make_immutable() and _is_immutable() for all object types except for buffer:
+ hb_blob_make_immutable()
+ hb_blob_is_immutable()
+ hb_face_make_immutable()
+ hb_face_is_immutable()
+
+
+* Changed API for vertical text support
+
+ o The following callbacks where removed:
+ hb_font_get_glyph_advance_func_t
+ hb_font_get_kerning_func_t
+
+ o The following new callbacks added instead:
+ hb_font_get_glyph_h_advance_func_t
+ hb_font_get_glyph_v_advance_func_t
+ hb_font_get_glyph_h_origin_func_t
+ hb_font_get_glyph_v_origin_func_t
+ hb_font_get_glyph_h_kerning_func_t
+ hb_font_get_glyph_v_kerning_func_t
+
+ o The following API removed as such:
+ hb_font_funcs_set_glyph_advance_func()
+ hb_font_funcs_set_kerning_func()
+ hb_font_get_glyph_advance()
+ hb_font_get_kerning()
+
+ o New API added instead:
+ hb_font_funcs_set_glyph_h_advance_func()
+ hb_font_funcs_set_glyph_v_advance_func()
+ hb_font_funcs_set_glyph_h_origin_func()
+ hb_font_funcs_set_glyph_v_origin_func()
+ hb_font_funcs_set_glyph_h_kerning_func()
+ hb_font_funcs_set_glyph_v_kerning_func()
+ hb_font_get_glyph_h_advance()
+ hb_font_get_glyph_v_advance()
+ hb_font_get_glyph_h_origin()
+ hb_font_get_glyph_v_origin()
+ hb_font_get_glyph_h_kerning()
+ hb_font_get_glyph_v_kerning()
+
+ o The following higher-leve API added for convenience:
+ hb_font_get_glyph_advance_for_direction()
+ hb_font_get_glyph_origin_for_direction()
+ hb_font_add_glyph_origin_for_direction()
+ hb_font_subtract_glyph_origin_for_direction()
+ hb_font_get_glyph_kerning_for_direction()
+ hb_font_get_glyph_extents_for_origin()
+ hb_font_get_glyph_contour_point_for_origin()
+
+
+* OpenType Layout API:
+
+ o New API:
+ hb_ot_layout_position_start()
+ hb_ot_layout_substitute_start()
+ hb_ot_layout_substitute_finish()
+
+
+* Glue code:
+
+ o New API:
+ hb_glib_script_to_script()
+ hb_glib_script_from_script()
+ hb_icu_script_to_script()
+ hb_icu_script_from_script()
+
+
+* Version API added:
+
+ o New API:
+ HB_VERSION_MAJOR
+ HB_VERSION_MINOR
+ HB_VERSION_MICRO
+ HB_VERSION_STRING
+ HB_VERSION_CHECK()
+ hb_version()
+ hb_version_string()
+ hb_version_check()
+
+
diff --git a/README b/README
new file mode 100644
index 0000000..74e739d
--- /dev/null
+++ b/README
@@ -0,0 +1,7 @@
+This is HarfBuzz, a text shaping library.
+
+For bug reports, mailing list, and other information please visit:
+
+ http://harfbuzz.org/
+
+For license information, see the file COPYING.
diff --git a/THANKS b/THANKS
new file mode 100644
index 0000000..940cfde
--- /dev/null
+++ b/THANKS
@@ -0,0 +1,7 @@
+Bradley Grainger
+Khaled Hosny
+Kenichi Ishibashi
+Ryan Lortie
+Jeff Muizelaar
+suzuki toshiya
+Philip Withnall
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..1344bf3
--- /dev/null
+++ b/TODO
@@ -0,0 +1,101 @@
+General fixes:
+=============
+
+- Ligature matching and match_input() of (Chain)Context should use the
+ same logic. Right now the Ligature logic is more involved. Possibly
+ merge, or duplicate.
+
+- mask propagation? (when ligation, "or" the masks).
+
+- Warn at compile time (and runtime with HB_DEBUG?) if no Unicode / font
+ funcs found / set.
+
+- Fix TT 'kern' on/off and GPOS interaction (move kerning before GPOS).
+
+- Do proper rounding when scaling from font space? May be a non-issue.
+
+- Misc features:
+ * init/medi/fina/isol for non-cursive scripts
+ * vkna,hkna etc for kana, etc
+ * smpl,trad for ZHS / ZHT
+
+- Add Pango backend?
+
+- Add ICUlayout backend?
+
+- Add ICUlayout API?
+
+
+API issues to fix before 1.0:
+============================
+
+- Add default font_funcs / Unicode funcs API and to utils.
+
+- Add init_func to font_funcs. Adjust ft.
+
+- Add pkg-config files for glue codes (harfbuzz-glib, etc)
+
+- Figure out how many .so objects, how to link, etc
+
+- 'const' for getter APIs? (use mutable internally)
+
+- blob_from_file?
+
+
+API additions
+=============
+
+- Language to/from script.
+
+- Buffer (de)serialize API ala hb-shape?
+
+- Move feature parsing from util into the library
+
+- Add hb-cairo glue
+
+- Add sanitize API (and a cached version, that saves result on blob user-data)
+
+- Add glib GBoxedType stuff and introspection
+
+- Finish Uniscribe / CoreText face / font get API
+
+- BCP 47 language handling / API (language_matches?)
+
+- Add hb_face_get_glyph_count()?
+
+- Add hb_font_create_linear()?
+
+- Add hb_shape_plan()/hb_shape_planned()
+
+- Add query API for aalt-like features?
+
+- SFNT api? get_num_faces? get_table_tags? (there's something in stash)
+
+- Add segmentation API
+
+- Add hb-fribidi glue?
+
+
+hb-view / hb-shape enhancements:
+===============================
+
+- --output-format should list available formats.
+- Add --width, --height, --auto-size, --align, etc?
+- Add XML and JSON formats to hb-shape
+- --features="init=medi=isol=fina=0"
+
+
+Tests to write:
+==============
+
+- ot-layout enumeration API (needs font)
+
+- Finish test-shape.c, grep for TODO
+
+- Finish test-unicode.c, grep for TODO
+
+- GObject, FreeType, etc
+
+- hb_set_t
+
+- hb_cache_t and relatives
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..5df2c98
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,9137 @@
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
+[m4_warning([this file was generated for autoconf 2.65.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+m4_define([_LT_COPYING], [dnl
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
+
+# serial 56 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+ [m4_default([$3],
+ [m4_fatal([Libtool version $1 or higher is required],
+ 63)])],
+ [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+ *\ * | *\ *)
+ AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+ case $cc_temp in
+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+_LT_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ _LT_PATH_MAGIC
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+ [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME. Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+ [m4_ifval([$1], [$1], [$2])])
+ lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+ m4_ifval([$4],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+ lt_dict_add_subkey([lt_decl_dict], [$2],
+ [tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+ [0], [m4_fatal([$0: too few arguments: $#])],
+ [1], [m4_fatal([$0: too few arguments: $#: $1])],
+ [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+ [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+ [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+ m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_if([$2], [],
+ m4_quote(lt_decl_varnames),
+ m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+ lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'. VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly. In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+ [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+# # Some comment about what VAR is for.
+# visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+ [description])))[]dnl
+m4_pushdef([_libtool_name],
+ m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+ [0], [_libtool_name=[$]$1],
+ [1], [_libtool_name=$lt_[]$1],
+ [2], [_libtool_name=$lt_[]$1],
+ [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+ m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'. Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+ dnl If the libtool generation code has been placed in $CONFIG_LT,
+ dnl instead of duplicating it all over again into config.status,
+ dnl then we will have config.status run $CONFIG_LT later, so it
+ dnl needs to know what name is stored there:
+ [AC_CONFIG_COMMANDS([libtool],
+ [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+ dnl If the libtool generation code is destined for config.status,
+ dnl expand the accumulated commands and init code now:
+ [AC_CONFIG_COMMANDS([libtool],
+ [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\[$]0 --fallback-echo"')dnl "
+ lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
+ ;;
+esac
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+cat >"$CONFIG_LT" <<_LTEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate a libtool stub with the current configuration.
+
+lt_cl_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AS_SHELL_SANITIZE
+_AS_PREPARE
+
+exec AS_MESSAGE_FD>&1
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+ echo
+ AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+ case $[1] in
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
+
+ -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+ *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+ esac
+ shift
+done
+
+if $lt_cl_silent; then
+ exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+if test "$no_create" != yes; then
+ lt_cl_success=:
+ test "$silent" = yes &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+ exec AS_MESSAGE_LOG_FD>/dev/null
+ $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+ exec AS_MESSAGE_LOG_FD>>config.log
+ $lt_cl_success || AS_EXIT(1)
+fi
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars. Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+ m4_if(_LT_TAG, [C], [
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+ _LT_PROG_LTMAIN
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ _LT_PROG_XSI_SHELLFNS
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+# autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+ [C], [_LT_LANG(C)],
+ [C++], [_LT_LANG(CXX)],
+ [Java], [_LT_LANG(GCJ)],
+ [Fortran 77], [_LT_LANG(F77)],
+ [Fortran], [_LT_LANG(FC)],
+ [Windows Resource], [_LT_LANG(RC)],
+ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+ [_LT_LANG($1)],
+ [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+ [LT_SUPPORTED_TAG([$1])dnl
+ m4_append([_LT_TAGS], [$1 ])dnl
+ m4_define([_LT_LANG_]$1[_enabled], [])dnl
+ _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [LT_LANG(CXX)],
+ [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+ [LT_LANG(F77)],
+ [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+ [LT_LANG(FC)],
+ [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [m4_ifdef([AC_PROG_GCJ],
+ [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([A][M_PROG_GCJ],
+ [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([LT_PROG_GCJ],
+ [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+ [LT_LANG(RC)],
+ [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+ case $host_os in
+ rhapsody* | darwin*)
+ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+ AC_CHECK_TOOL([LIPO], [lipo], [:])
+ AC_CHECK_TOOL([OTOOL], [otool], [:])
+ AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+ _LT_DECL([], [DSYMUTIL], [1],
+ [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+ _LT_DECL([], [NMEDIT], [1],
+ [Tool to change global to local symbols on Mac OS X])
+ _LT_DECL([], [LIPO], [1],
+ [Tool to manipulate fat objects and archives on Mac OS X])
+ _LT_DECL([], [OTOOL], [1],
+ [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+ _LT_DECL([], [OTOOL64], [1],
+ [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+ [lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi])
+ AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+ [lt_cv_ld_exported_symbols_list],
+ [lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [lt_cv_ld_exported_symbols_list=yes],
+ [lt_cv_ld_exported_symbols_list=no])
+ LDFLAGS="$save_LDFLAGS"
+ ])
+ case $host_os in
+ rhapsody* | darwin1.[[012]])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[[012]]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES
+# --------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+ m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=echo
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ m4_if([$1], [CXX],
+[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ fi
+],[])
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX
+# -----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+ [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+ [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_SHELL_INIT
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[_LT_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X[$]1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+[$]*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "[$]0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(lt_ECHO)
+])
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1],
+ [An echo program that does not interpret backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+ [AS_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_LANG_PUSH(C)
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LANG_POP])
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[AC_CHECK_TOOL(AR, ar, false)
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1])
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+ [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+ [Commands used to build an old-style archive])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ fi
+ $RM conftest*
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$5], , :, [$5])
+else
+ m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $3"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ else
+ $2=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$4], , :, [$4])
+else
+ m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+ [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+ [$4]
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}]
+_LT_EOF
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) $1 ;;
+ x$lt_dlneed_uscore) $2 ;;
+ x$lt_dlunknown|x*) $3 ;;
+ esac
+ else :
+ # compilation failed
+ $3
+ fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen="shl_load"],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen="dlopen"],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ AC_CACHE_CHECK([whether a program can dlopen itself],
+ lt_cv_dlopen_self, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+ ])
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+ ])
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+ [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ chmod u+w . 2>&AS_MESSAGE_LOG_FD
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+ [Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links="nottested"
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ AC_MSG_CHECKING([if we can lock with hard links])
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ AC_MSG_RESULT([$hard_links])
+ if test "$hard_links" = no; then
+ AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+ [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+ [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+ test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+ test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+ # Linking always hardcodes the temporary library directory.
+ _LT_TAGVAR(hardcode_action, $1)=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ _LT_TAGVAR(hardcode_action, $1)=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+ test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+ [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+ esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+ [], [
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[[4-9]]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[[01]] | aix4.[[01]].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[[45]]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[[123]]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[[3-9]]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+ [shlibpath_overrides_runpath=yes])])
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+ [Variables whose values should be saved in libtool wrapper scripts and
+ restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+ [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+ [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+ [[List of archive names. First name is the real one, the rest are links.
+ The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+ [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [postinstall_cmds], [2],
+ [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+ [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+ [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+ [[As "finish_cmds", except a single script fragment to be evaled but
+ not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+ [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+ [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+ [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="m4_if([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$1; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[[45]]*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[[3-9]]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+_LT_DECL([], [deplibs_check_method], [1],
+ [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+ [Command to use when deplibs_check_method == "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+ AC_SUBST([DUMPBIN])
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+ [lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+ cat conftest.out >&AS_MESSAGE_LOG_FD
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
+ ;;
+esac
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+ _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+ lt_cv_prog_compiler_rtti_exceptions,
+ [-fno-rtti -fno-exceptions], [],
+ [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+ [Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[[BCDT]]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[[ABCDGISTW]]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[[ABCDEGRST]]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[[BCDEGRST]]'
+ ;;
+osf*)
+ symcode='[[BCDEGQRST]]'
+ ;;
+solaris*)
+ symcode='[[BDRT]]'
+ ;;
+sco3.2v5*)
+ symcode='[[DT]]'
+ ;;
+sysv4.2uw2*)
+ symcode='[[DT]]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[[ABDT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK ['"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx]"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ AC_MSG_RESULT(failed)
+else
+ AC_MSG_RESULT(ok)
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+ [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+ [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+ [lt_cv_sys_global_symbol_to_c_name_address], [1],
+ [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+ [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+ [Transform the output of nm in a C name address pair when lib prefix is needed])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+m4_if([$1], [CXX], [
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[[4-9]]*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ aCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64 which still supported -KPIC.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xlc* | xlC*)
+ # IBM XL 8.0 on PPC
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd* | netbsdelf*-gnu)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+],
+[
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC (with -KPIC) is the default.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ ccc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All Alpha code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xl*)
+ # IBM XL C 8.0/Fortran 10.1 on PPC
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All OSF/1 code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ rdos*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ unicos*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+])
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+ ;;
+esac
+AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+ [How to pass a linker flag through the compiler])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+ [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+ [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+ "" | " "*) ;;
+ *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+ esac],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+ [Additional compiler flags for building library objects])
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+ _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+ $lt_tmp_static_flag,
+ [],
+ [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+ [Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ case $host_os in
+ aix[[4-9]]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+ ;;
+ cygwin* | mingw* | cegcc*)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ linux* | k*bsd*-gnu)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+], [
+ runpath_var=
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)=
+ _LT_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_TAGVAR(compiler_needs_object, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(hardcode_automatic, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(inherit_rpath, $1)=no
+ _LT_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_TAGVAR(module_cmds, $1)=
+ _LT_TAGVAR(module_expsym_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+ _LT_TAGVAR(thread_safe_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ _LT_TAGVAR(include_expsyms, $1)=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ linux* | k*bsd*-gnu)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
+ esac
+
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[[3-9]]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ tmp_sharedflag='--shared' ;;
+ xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+
+ if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+ runpath_var=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[[45]]*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ freebsd1*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ AC_LINK_IFELSE(int foo(void) {},
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ )
+ LDFLAGS="$save_LDFLAGS"
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ ;;
+ motorola)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+ [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+ # Assume -lc should be added
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $_LT_TAGVAR(archive_cmds, $1) in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+ pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+ then
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+ [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+ [enable_shared_with_static_runtimes], [0],
+ [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+ [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+ [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+ [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+ [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+ [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+ [Commands used to build a loadable module if different from building
+ a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+ [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+ [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+ [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+ [Flag to hardcode $libdir into a binary during linking.
+ This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
+ [[If ld is used when linking, flag to hardcode $libdir into a binary
+ during linking. This must work even if $libdir does not exist]])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+ [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary and the resulting library dependency is
+ "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+ library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+ [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+ [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+ [Set to "yes" if building a shared library automatically hardcodes DIR
+ into the library and all subsequent libraries and executables linked
+ against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+ [Set to yes if linker adds runtime paths of dependent libraries
+ to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+ [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [fix_srcfile_path], [1],
+ [Fix the shell variable $srcfile for the compiler])
+_LT_TAGDECL([], [always_export_symbols], [0],
+ [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+ [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+ [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+ [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+ [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [file_list_spec], [1],
+ [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+ LT_SYS_DLOPEN_SELF
+ _LT_CMD_STRIPLIB
+
+ # Report which library types will actually be built
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_PROG_CXX
+# ------------
+# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
+# compiler, we have our own version here.
+m4_defun([_LT_PROG_CXX],
+[
+pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
+AC_PROG_CXX
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ AC_PROG_CXXCPP
+else
+ _lt_caught_CXX_error=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_CXX
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_CXX], [])
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[AC_REQUIRE([_LT_PROG_CXX])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ else
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+ LT_PATH_LD
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ freebsd[[12]]*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ freebsd-elf*)
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ gnu*)
+ ;;
+
+ hpux9*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+ fi
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+ esac
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
+ _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+ _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+ $RANLIB $oldlib'
+ _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ *) # Version 6 will use weak symbols
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ xl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=echo
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ case $host in
+ osf3*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ fi
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+ test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+ _LT_TAGVAR(GCC, $1)="$GXX"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library. It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer*4 a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+ private int a;
+ public void bar (void) {
+ a = 0;
+ }
+};
+_LT_EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case $p in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" ||
+ test $p = "-R"; then
+ prev=$p
+ continue
+ else
+ prev=
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ case $p in
+ -L* | -R*)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+ _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+ fi
+ fi
+ ;;
+
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+ _LT_TAGVAR(predep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+ fi
+ else
+ if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+ _LT_TAGVAR(postdep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ _LT_TAGVAR(predep_objects,$1)=
+ _LT_TAGVAR(postdep_objects,$1)=
+ _LT_TAGVAR(postdeps,$1)=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+ [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+ [Dependencies to place before and after the objects being linked to
+ create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+ [The library search path used internally by the compiler when linking
+ a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_PROG_F77
+# ------------
+# Since AC_PROG_F77 is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_F77],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
+AC_PROG_F77
+if test -z "$F77" || test "X$F77" = "Xno"; then
+ _lt_disable_F77=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_F77
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_F77], [])
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_REQUIRE([_LT_PROG_F77])dnl
+AC_LANG_PUSH(Fortran 77)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ CC=${F77-"f77"}
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+ GCC=$G77
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$G77"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC="$lt_save_CC"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_PROG_FC
+# -----------
+# Since AC_PROG_FC is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_FC],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
+AC_PROG_FC
+if test -z "$FC" || test "X$FC" = "Xno"; then
+ _lt_disable_FC=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_FC
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_FC], [])
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_REQUIRE([_LT_PROG_FC])dnl
+AC_LANG_PUSH(Fortran)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ CC=${FC-"f95"}
+ compiler=$CC
+ GCC=$ac_cv_fc_compiler_gnu
+
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC="$lt_save_CC"
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC="$lt_save_CC"
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+ :
+ _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+ [AC_CHECK_TOOL(GCJ, gcj,)
+ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible. Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+ [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_SED. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_XSI_SHELLFNS
+# ---------------------
+# Bourne and XSI compatible variants of some useful shell functions.
+m4_defun([_LT_PROG_XSI_SHELLFNS],
+[case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=$(( $[*] ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=${#1}
+}
+
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+dnl func_dirname_and_basename
+dnl A portable version of this function is already defined in general.m4sh
+dnl so there is no need for it here.
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[[^=]]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "$[@]"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$[1]+=\$[2]"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$[1]=\$$[1]\$[2]"
+}
+
+_LT_EOF
+ ;;
+ esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it. Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+ _LT_MANGLE_DEFUN([$1], [$2]),
+ [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+ [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME. If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+ dnl
+ dnl Simply set some default values (i.e off) if boolean options were not
+ dnl specified:
+ _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+ ])
+ _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+ ])
+ dnl
+ dnl If no reference was made to various pairs of opposing options, then
+ dnl we run the default mode handler for the pair. For example, if neither
+ dnl `shared' nor `disable-shared' was passed, we enable building of shared
+ dnl archives by default:
+ _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+ _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+ [_LT_ENABLE_FAST_INSTALL])
+ ])
+])# _LT_SET_OPTIONS
+
+
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS], [0], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+ [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+ _LT_DECL([build_libtool_libs], [enable_shared], [0],
+ [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+ [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+ _LT_DECL([build_old_libs], [enable_static], [0],
+ [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+ [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+ [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+ [AS_HELP_STRING([--with-pic],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [pic_mode="$withval"],
+ [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+ [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+ [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+ [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+ [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+ [m4_define([_LTDL_TYPE], [convenience])])
+
+# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+ [$#], [2], [[$2]],
+ [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+ [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+ [$#], 1, [],
+ [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+ m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+ [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+ [m4_foreach([_Lt_suffix],
+ ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+ [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+ [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+ [lt_append([$1], [$2], [$3])$4],
+ [$5])],
+ [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+ m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+ m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+ [$5],
+ [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+ [lt_join(m4_quote(m4_default([$4], [[, ]])),
+ lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+ [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
+
+# ltversion.m4 -- version numbers -*- Autoconf -*-
+#
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# Generated from ltversion.in.
+
+# serial 3017 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.2.6b])
+m4_define([LT_PACKAGE_REVISION], [1.3017])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.2.6b'
+macro_revision='1.3017'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
+
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 4 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else. This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+#
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$PKG_CONFIG"; then
+ if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ else
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+ [pkg_failed=yes])
+ fi
+else
+ pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+ [AC_MSG_RESULT([no])
+ $4])
+elif test $pkg_failed = untried; then
+ ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+ [$4])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.11.1], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 10
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 16
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+ [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no) AM_DEFAULT_VERBOSITY=1;;
+*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..833a621
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+test -n "$srcdir" || srcdir=`dirname "$0"`
+test -n "$srcdir" || srcdir=.
+
+olddir=`pwd`
+cd $srcdir
+
+echo -n "checking for ragel... "
+which ragel || {
+ echo "You need to install ragel... See http://www.complang.org/ragel/"
+ exit 1
+}
+
+echo -n "checking for pkg-config... "
+which pkg-config || {
+ echo "*** No pkg-config found, please install it ***"
+ exit 1
+}
+
+echo -n "checking for autoreconf... "
+which autoreconf || {
+ echo "*** No autoreconf found, please install it ***"
+ exit 1
+}
+
+echo "running autoreconf --force --install --verbose"
+autoreconf --force --install --verbose || exit $?
+
+cd $olddir
+echo "running configure $@"
+test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
diff --git a/compile b/compile
new file mode 100755
index 0000000..c0096a7
--- /dev/null
+++ b/compile
@@ -0,0 +1,143 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2009-10-06.20; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
+# Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as `compile cc -o foo foo.c'.
+ # So we strip `-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no `-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # `.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/config.guess b/config.guess
new file mode 100755
index 0000000..e3a2116
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1533 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# Free Software Foundation, Inc.
+
+timestamp='2009-06-10'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[456])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:[3456]*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T | authenticamd | genuineintel)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
+ test x"${LIBC}" != x && {
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..0b5876e
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,144 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if you have the <ApplicationServices/ApplicationServices.h>
+ header file. */
+#undef HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H
+
+/* Define to 1 if you have the `atexit' function. */
+#undef HAVE_ATEXIT
+
+/* Have cairo graphics library */
+#undef HAVE_CAIRO
+
+/* Have cairo-ft support in cairo graphics library */
+#undef HAVE_CAIRO_FT
+
+/* Have Core Text backend */
+#undef HAVE_CORETEXT
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Have FreeType 2 library */
+#undef HAVE_FREETYPE
+
+/* Define to 1 if you have the `FT_Face_GetCharVariantIndex' function. */
+#undef HAVE_FT_FACE_GETCHARVARIANTINDEX
+
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
+/* Have glib2 library */
+#undef HAVE_GLIB
+
+/* Have gobject2 library */
+#undef HAVE_GOBJECT
+
+/* Have Graphite library */
+#undef HAVE_GRAPHITE2
+
+/* Have gthread2 library */
+#undef HAVE_GTHREAD
+
+/* Have Old HarfBuzz backend */
+#undef HAVE_HB_OLD
+
+/* Have ICU library */
+#undef HAVE_ICU
+
+/* Have Intel __sync_* atomic primitives */
+#undef HAVE_INTEL_ATOMIC_PRIMITIVES
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <io.h> header file. */
+#undef HAVE_IO_H
+
+/* Define to 1 if you have the `isatty' function. */
+#undef HAVE_ISATTY
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `mmap' function. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the `mprotect' function. */
+#undef HAVE_MPROTECT
+
+/* Have native OpenType Layout backend */
+#undef HAVE_OT
+
+/* Define to 1 if you have the <sched.h> header file. */
+#undef HAVE_SCHED_H
+
+/* Define to 1 if you have the `sched_yield' function. */
+#undef HAVE_SCHED_YIELD
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `sysconf' function. */
+#undef HAVE_SYSCONF
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#undef HAVE_SYS_MMAN_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Have Uniscribe backend */
+#undef HAVE_UNISCRIBE
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the <usp10.h> header file. */
+#undef HAVE_USP10_H
+
+/* Define to 1 if you have the <windows.h> header file. */
+#undef HAVE_WINDOWS_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
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
diff --git a/config.sub b/config.sub
new file mode 100755
index 0000000..eb0389a
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1693 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# Free Software Foundation, Inc.
+
+timestamp='2009-06-11'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
+ tile*)
+ basic_machine=tile-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -kopensolaris* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/configure b/configure
new file mode 100755
index 0000000..816acb6
--- /dev/null
+++ b/configure
@@ -0,0 +1,18935 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.65 for HarfBuzz 0.9.3.
+#
+# Report bugs to <http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz>.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error ERROR [LINENO LOG_FD]
+# ---------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with status $?, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$?; test $as_status -eq 0 && as_status=1
+ if test "$3"; then
+ as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ fi
+ $as_echo "$as_me: error: $1" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+$*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "$0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='HarfBuzz'
+PACKAGE_TARNAME='harfbuzz'
+PACKAGE_VERSION='0.9.3'
+PACKAGE_STRING='HarfBuzz 0.9.3'
+PACKAGE_BUGREPORT='http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz'
+PACKAGE_URL='http://harfbuzz.org/'
+
+ac_unique_file="harfbuzz.pc.in"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+HAVE_CORETEXT_FALSE
+HAVE_CORETEXT_TRUE
+CORETEXT_LIBS
+CORETEXT_CFLAGS
+HAVE_UNISCRIBE_FALSE
+HAVE_UNISCRIBE_TRUE
+UNISCRIBE_LIBS
+UNISCRIBE_CFLAGS
+HAVE_FREETYPE_FALSE
+HAVE_FREETYPE_TRUE
+FREETYPE_LIBS
+FREETYPE_CFLAGS
+HAVE_GRAPHITE2_FALSE
+HAVE_GRAPHITE2_TRUE
+GRAPHITE2_LIBS
+GRAPHITE2_CFLAGS
+HAVE_ICU_FALSE
+HAVE_ICU_TRUE
+ICU_LIBS
+ICU_CFLAGS
+HAVE_CAIRO_FT_FALSE
+HAVE_CAIRO_FT_TRUE
+CAIRO_FT_LIBS
+CAIRO_FT_CFLAGS
+HAVE_CAIRO_FALSE
+HAVE_CAIRO_TRUE
+CAIRO_LIBS
+CAIRO_CFLAGS
+HAVE_GOBJECT_FALSE
+HAVE_GOBJECT_TRUE
+GLIB_MKENUMS
+GOBJECT_LIBS
+GOBJECT_CFLAGS
+HAVE_GTHREAD_FALSE
+HAVE_GTHREAD_TRUE
+GTHREAD_LIBS
+GTHREAD_CFLAGS
+HAVE_GLIB_FALSE
+HAVE_GLIB_TRUE
+GLIB_LIBS
+GLIB_CFLAGS
+PKG_CONFIG
+HAVE_HB_OLD_FALSE
+HAVE_HB_OLD_TRUE
+HAVE_OT_FALSE
+HAVE_OT_TRUE
+OS_WIN32_FALSE
+OS_WIN32_TRUE
+HB_LIBTOOL_VERSION_INFO
+HB_VERSION
+HB_VERSION_MICRO
+HB_VERSION_MINOR
+HB_VERSION_MAJOR
+CXXCPP
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+ac_ct_CXX
+CXXFLAGS
+CXX
+CPP
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+lt_ECHO
+RANLIB
+AR
+OBJDUMP
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+EGREP
+GREP
+SED
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+LIBTOOL
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_silent_rules
+enable_static
+enable_shared
+with_pic
+enable_fast_install
+enable_dependency_tracking
+with_gnu_ld
+enable_libtool_lock
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+CXX
+CXXFLAGS
+CCC
+CXXCPP
+PKG_CONFIG
+GLIB_CFLAGS
+GLIB_LIBS
+GTHREAD_CFLAGS
+GTHREAD_LIBS
+GOBJECT_CFLAGS
+GOBJECT_LIBS
+CAIRO_CFLAGS
+CAIRO_LIBS
+CAIRO_FT_CFLAGS
+CAIRO_FT_LIBS
+ICU_CFLAGS
+ICU_LIBS
+GRAPHITE2_CFLAGS
+GRAPHITE2_LIBS
+FREETYPE_CFLAGS
+FREETYPE_LIBS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information."
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures HarfBuzz 0.9.3 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/harfbuzz]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of HarfBuzz 0.9.3:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')
+ --enable-static[=PKGS] build static libraries [default=no]
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --disable-libtool-lock avoid locking (might break parallel builds)
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pic try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+ CXXCPP C++ preprocessor
+ PKG_CONFIG path to pkg-config utility
+ GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config
+ GLIB_LIBS linker flags for GLIB, overriding pkg-config
+ GTHREAD_CFLAGS
+ C compiler flags for GTHREAD, overriding pkg-config
+ GTHREAD_LIBS
+ linker flags for GTHREAD, overriding pkg-config
+ GOBJECT_CFLAGS
+ C compiler flags for GOBJECT, overriding pkg-config
+ GOBJECT_LIBS
+ linker flags for GOBJECT, overriding pkg-config
+ CAIRO_CFLAGS
+ C compiler flags for CAIRO, overriding pkg-config
+ CAIRO_LIBS linker flags for CAIRO, overriding pkg-config
+ CAIRO_FT_CFLAGS
+ C compiler flags for CAIRO_FT, overriding pkg-config
+ CAIRO_FT_LIBS
+ linker flags for CAIRO_FT, overriding pkg-config
+ ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
+ ICU_LIBS linker flags for ICU, overriding pkg-config
+ GRAPHITE2_CFLAGS
+ C compiler flags for GRAPHITE2, overriding pkg-config
+ GRAPHITE2_LIBS
+ linker flags for GRAPHITE2, overriding pkg-config
+ FREETYPE_CFLAGS
+ C compiler flags for FREETYPE, overriding pkg-config
+ FREETYPE_LIBS
+ linker flags for FREETYPE, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz>.
+HarfBuzz home page: <http://harfbuzz.org/>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+HarfBuzz configure 0.9.3
+generated by GNU Autoconf 2.65
+
+Copyright (C) 2009 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_func
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_cxx_try_cpp LINENO
+# ------------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } >/dev/null && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_cpp
+
+# ac_fn_cxx_try_link LINENO
+# -------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_link
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( cat <<\_ASBOX
+## ------------------------------------------------------------------------- ##
+## Report this to http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz ##
+## ------------------------------------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_mongrel
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by HarfBuzz $as_me 0.9.3, which was
+generated by GNU Autoconf 2.65. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ ac_site_file1=$CONFIG_SITE
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+am__api_version='1.11'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ for ac_t in install-sh install.sh shtool; do
+ if test -f "$ac_dir/$ac_t"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/$ac_t -c"
+ break 2
+ fi
+ done
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if test "${ac_cv_path_mkdir+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='harfbuzz'
+ VERSION='0.9.3'
+
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no) AM_DEFAULT_VERBOSITY=1;;
+*) AM_DEFAULT_VERBOSITY=0;;
+esac
+AM_BACKSLASH='\'
+
+
+# Initialize libtool
+
+case `pwd` in
+ *\ * | *\ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.2.6b'
+macro_revision='1.3017'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "no acceptable C compiler found in \$PATH
+See \`config.log' for more details." "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "C compiler cannot create executables
+See \`config.log' for more details." "$LINENO" 5; }; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if test "${ac_cv_path_SED+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if test "${ac_cv_path_FGREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+ then ac_cv_path_FGREP="$GREP -F"
+ else
+ if test -z "$FGREP"; then
+ ac_path_FGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in fgrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+ # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'FGREP' >> "conftest.nl"
+ "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_FGREP="$ac_path_FGREP"
+ ac_path_FGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_FGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_FGREP"; then
+ as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_FGREP=$FGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test "${lt_cv_path_NM+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_DUMPBIN" && break
+done
+
+ if test "x$ac_ct_DUMPBIN" = x; then
+ DUMPBIN=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DUMPBIN=$ac_ct_DUMPBIN
+ fi
+fi
+
+
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if test "${lt_cv_nm_interface+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:4715: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:4718: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:4721: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if test "${lt_cv_ld_reload_flag+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if test "${lt_cv_deplibs_check_method+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[45]*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
+ (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+ enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line 5927 "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if test "${lt_cv_cc_needs_belf+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_cc_needs_belf=yes
+else
+ lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+
+ case $host_os in
+ rhapsody* | darwin*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DSYMUTIL"; then
+ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+ ac_ct_DSYMUTIL=$DSYMUTIL
+ # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DSYMUTIL"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DSYMUTIL" = x; then
+ DSYMUTIL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DSYMUTIL=$ac_ct_DSYMUTIL
+ fi
+else
+ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_NMEDIT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NMEDIT"; then
+ ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+ ac_ct_NMEDIT=$NMEDIT
+ # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_NMEDIT"; then
+ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_NMEDIT="nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_NMEDIT" = x; then
+ NMEDIT=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ NMEDIT=$ac_ct_NMEDIT
+ fi
+else
+ NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_LIPO+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LIPO"; then
+ ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+ ac_ct_LIPO=$LIPO
+ # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_LIPO"; then
+ ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_LIPO="lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_LIPO" = x; then
+ LIPO=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LIPO=$ac_ct_LIPO
+ fi
+else
+ LIPO="$ac_cv_prog_LIPO"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL"; then
+ ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+ ac_ct_OTOOL=$OTOOL
+ # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL"; then
+ ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OTOOL="otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL" = x; then
+ OTOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL=$ac_ct_OTOOL
+ fi
+else
+ OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL64+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL64"; then
+ ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+ ac_ct_OTOOL64=$OTOOL64
+ # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL64"; then
+ ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OTOOL64="otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL64" = x; then
+ OTOOL64=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL64=$ac_ct_OTOOL64
+ fi
+else
+ OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_ld_exported_symbols_list=yes
+else
+ lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[012]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in dlfcn.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+# Set options
+# Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+ enableval=$enable_static; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_static=no
+fi
+
+
+
+
+
+
+
+
+
+
+ enable_dlopen=no
+
+
+ enable_win32_dll=no
+
+
+ # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then :
+ withval=$with_pic; pic_mode="$withval"
+else
+ pic_mode=default
+fi
+
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+ # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+ enableval=$enable_fast_install; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if test "${lt_cv_objdir+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:7452: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:7456: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+
+ if test "$GCC" = yes; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='--shared'
+ lt_prog_compiler_static='--static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ xl*)
+ # IBM XL C 8.0/Fortran 10.1 on PPC
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
+$as_echo "$lt_prog_compiler_pic" >&6; }
+
+
+
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:7791: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:7795: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_static_works=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:7896: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:7900: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:7951: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:7955: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+ if test "$hard_links" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ linux* | k*bsd*-gnu)
+ link_all_deplibs=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec=
+ tmp_sharedflag='--shared' ;;
+ xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld='-rpath $libdir'
+ archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" = no; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ link_all_deplibs=no
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ export_dynamic_flag_spec='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ always_export_symbols=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' ${wl}-bernotok'
+ allow_undefined_flag=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ archive_cmds_need_lc=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ whole_archive_flag_spec=''
+ link_all_deplibs=yes
+ allow_undefined_flag="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=echo
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+
+ else
+ ld_shlibs=no
+ fi
+
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_ld='+b $libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo(void) {}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='${wl}-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='${wl}-z,text'
+ allow_undefined_flag='${wl}-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ archive_cmds_need_lc=no
+ else
+ archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
+$as_echo "$archive_cmds_need_lc" >&6; }
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+ shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test "X$hardcode_automatic" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+ test "$hardcode_minus_L" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink ||
+ test "$inherit_rpath" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+ if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+
+fi
+
+ ;;
+
+ *)
+ ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = x""yes; then :
+ lt_cv_dlopen="shl_load"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_shl_load=yes
+else
+ ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_svld_dlopen=yes
+else
+ ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_dld_link=yes
+else
+ ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 10335 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self_static+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self_static=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 10431 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report which library types will actually be built
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+# Check for programs
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "no acceptable C compiler found in \$PATH
+See \`config.log' for more details." "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test "x$CC" != xcc; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+fi
+set dummy $CC; ac_cc=`$as_echo "$2" |
+ sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; };
+then
+ eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+ if test "x$CC" != xcc; then
+ # Test first that cc exists at all.
+ if { ac_try='cc -c conftest.$ac_ext >&5'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+ rm -f conftest2.*
+ if { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; };
+ then
+ # cc works too.
+ :
+ else
+ # cc exists but doesn't like -o.
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+ fi
+ fi
+ fi
+else
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
+
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
+
+fi
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+else
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CXX_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CXX_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+ am__fastdepCXX_TRUE=
+ am__fastdepCXX_FALSE='#'
+else
+ am__fastdepCXX_TRUE='#'
+ am__fastdepCXX_FALSE=
+fi
+
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+else
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CXX_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CXX_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+ am__fastdepCXX_TRUE=
+ am__fastdepCXX_FALSE='#'
+else
+ am__fastdepCXX_TRUE='#'
+ am__fastdepCXX_FALSE=
+fi
+
+
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
+$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
+if test -z "$CXXCPP"; then
+ if test "${ac_cv_prog_CXXCPP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CXXCPP needs to be expanded
+ for CXXCPP in "$CXX -E" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+ CXXCPP=$ac_cv_prog_CXXCPP
+else
+ ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+_lt_caught_CXX_error=yes; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+else
+ _lt_caught_CXX_error=yes
+fi
+
+
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+compiler_needs_object_CXX=no
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_direct_absolute_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+inherit_rpath_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+ # save warnings/boilerplate of simple test code
+ ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ compiler=$CC
+ compiler_CXX=$CC
+ for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+ else
+ lt_prog_compiler_no_builtin_flag_CXX=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec_CXX=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+ ld_shlibs_CXX=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds_CXX=''
+ hardcode_direct_CXX=yes
+ hardcode_direct_absolute_CXX=yes
+ hardcode_libdir_separator_CXX=':'
+ link_all_deplibs_CXX=yes
+ file_list_spec_CXX='${wl}-f,'
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct_CXX=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L_CXX=yes
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ hardcode_libdir_separator_CXX=
+ fi
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ export_dynamic_flag_spec_CXX='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ always_export_symbols_CXX=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag_CXX='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag_CXX="-z nodefs"
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag_CXX=' ${wl}-bernotok'
+ allow_undefined_flag_CXX=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec_CXX='$convenience'
+ archive_cmds_need_lc_CXX=yes
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag_CXX=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ allow_undefined_flag_CXX=unsupported
+ always_export_symbols_CXX=no
+ enable_shared_with_static_runtimes_CXX=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc_CXX=no
+ hardcode_direct_CXX=no
+ hardcode_automatic_CXX=yes
+ hardcode_shlibpath_var_CXX=unsupported
+ whole_archive_flag_spec_CXX=''
+ link_all_deplibs_CXX=yes
+ allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=echo
+ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ fi
+
+ else
+ ld_shlibs_CXX=no
+ fi
+
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ freebsd[12]*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ ld_shlibs_CXX=no
+ ;;
+
+ freebsd-elf*)
+ archive_cmds_need_lc_CXX=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ ld_shlibs_CXX=yes
+ ;;
+
+ gnu*)
+ ;;
+
+ hpux9*)
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ hardcode_direct_CXX=yes
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aCC*)
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ ;;
+ *)
+ hardcode_direct_CXX=yes
+ hardcode_direct_absolute_CXX=yes
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+ fi
+ fi
+ link_all_deplibs_CXX=yes
+ ;;
+ esac
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+ inherit_rpath_CXX=yes
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ archive_cmds_need_lc_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [1-5]* | *pgcpp\ [1-5]*)
+ prelink_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+ old_archive_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+ $RANLIB $oldlib'
+ archive_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ archive_expsym_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ *) # Version 6 will use weak symbols
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+
+ hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ xl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object_CXX=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ ld_shlibs_CXX=yes
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ ld_shlibs_CXX=no
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ hardcode_direct_absolute_CXX=yes
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=echo
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ ;;
+ *)
+ allow_undefined_flag_CXX=' -expect_unresolved \*'
+ archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+ ;;
+ esac
+
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+ case $host in
+ osf3*)
+ archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ esac
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ archive_cmds_need_lc_CXX=yes
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ hardcode_shlibpath_var_CXX=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ link_all_deplibs_CXX=yes
+
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag_CXX='${wl}-z,text'
+ archive_cmds_need_lc_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag_CXX='${wl}-z,text'
+ allow_undefined_flag_CXX='${wl}-z,nodefs'
+ archive_cmds_need_lc_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
+ hardcode_libdir_separator_CXX=':'
+ link_all_deplibs_CXX=yes
+ export_dynamic_flag_spec_CXX='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+ test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+ GCC_CXX="$GXX"
+ LD_CXX="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ # Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+
+if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case $p in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" ||
+ test $p = "-R"; then
+ prev=$p
+ continue
+ else
+ prev=
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ case $p in
+ -L* | -R*)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$compiler_lib_search_path_CXX"; then
+ compiler_lib_search_path_CXX="${prev}${p}"
+ else
+ compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$postdeps_CXX"; then
+ postdeps_CXX="${prev}${p}"
+ else
+ postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+ fi
+ fi
+ ;;
+
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$predep_objects_CXX"; then
+ predep_objects_CXX="$p"
+ else
+ predep_objects_CXX="$predep_objects_CXX $p"
+ fi
+ else
+ if test -z "$postdep_objects_CXX"; then
+ postdep_objects_CXX="$p"
+ else
+ postdep_objects_CXX="$postdep_objects_CXX $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix[3-9]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ predep_objects_CXX=
+ postdep_objects_CXX=
+ postdeps_CXX=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+esac
+
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+ compiler_lib_search_dirs_CXX=
+if test -n "${compiler_lib_search_path_CXX}"; then
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic_CXX='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ lt_prog_compiler_pic_CXX=
+ ;;
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic_CXX=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[4-9]*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ else
+ lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
+ lt_prog_compiler_pic_CXX='+Z'
+ fi
+ ;;
+ aCC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64 which still supported -KPIC.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fpic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ xlc* | xlC*)
+ # IBM XL 8.0 on PPC
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-qpic'
+ lt_prog_compiler_static_CXX='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ lt_prog_compiler_pic_CXX='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd* | netbsdelf*-gnu)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ lt_prog_compiler_wl_CXX='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ lt_prog_compiler_pic_CXX='-pic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ lt_prog_compiler_can_build_shared_CXX=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic_CXX=
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5
+$as_echo "$lt_prog_compiler_pic_CXX" >&6; }
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_works_CXX=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:14112: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:14116: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works_CXX=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+ case $lt_prog_compiler_pic_CXX in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+ esac
+else
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_static_works_CXX=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
+ :
+else
+ lt_prog_compiler_static_CXX=
+fi
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o_CXX=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:14211: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:14215: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o_CXX=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o_CXX=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:14263: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:14267: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o_CXX=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+ if test "$hard_links" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ case $host_os in
+ aix[4-9]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ export_symbols_cmds_CXX="$ltdll_cmds"
+ ;;
+ cygwin* | mingw* | cegcc*)
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ linux* | k*bsd*-gnu)
+ link_all_deplibs_CXX=no
+ ;;
+ *)
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+with_gnu_ld_CXX=$with_gnu_ld
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc_CXX=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds_CXX in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl_CXX
+ pic_flag=$lt_prog_compiler_pic_CXX
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+ allow_undefined_flag_CXX=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ archive_cmds_need_lc_CXX=no
+ else
+ archive_cmds_need_lc_CXX=yes
+ fi
+ allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5
+$as_echo "$archive_cmds_need_lc_CXX" >&6; }
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+ shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" ||
+ test -n "$runpath_var_CXX" ||
+ test "X$hardcode_automatic_CXX" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct_CXX" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+ test "$hardcode_minus_L_CXX" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action_CXX=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action_CXX=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action_CXX=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
+$as_echo "$hardcode_action_CXX" >&6; }
+
+if test "$hardcode_action_CXX" = relink ||
+ test "$inherit_rpath_CXX" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# Version
+
+
+
+
+HB_VERSION_MAJOR=0
+HB_VERSION_MINOR=9
+HB_VERSION_MICRO=3
+HB_VERSION=0.9.3
+
+
+
+
+
+# Libtool version
+
+
+
+
+HB_LIBTOOL_VERSION_INFO=903:0:903
+
+
+
+# Functions and headers
+for ac_func in atexit mprotect sysconf getpagesize sched_yield mmap _setmode 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"
+eval as_val=\$$as_ac_var
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+for ac_header in unistd.h sys/mman.h sched.h io.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"
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+# Compiler flags
+
+if test "x$GCC" = "xyes"; then
+
+ # Make symbols link locally
+ LDFLAGS="$LDFLAGS -Bsymbolic-functions"
+
+ # Make sure we don't link to libstdc++
+ CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions"
+
+ # Assorted warnings
+ CXXFLAGS="$CXXFLAGS -Wcast-align"
+
+ case "$host" in
+ *-*-mingw*)
+ ;;
+ *)
+ # Hide inline methods
+ CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
+ ;;
+ esac
+
+ case "$host" in
+ arm-*-*)
+ # Request byte alignment on arm
+ CXXFLAGS="$CXXFLAGS -mstructure-size-boundary=8"
+ ;;
+ esac
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native Win32" >&5
+$as_echo_n "checking for native Win32... " >&6; }
+case "$host" in
+ *-*-mingw*)
+ hb_os_win32=yes
+ ;;
+ *)
+ hb_os_win32=no
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hb_os_win32" >&5
+$as_echo "$hb_os_win32" >&6; }
+ if test "$hb_os_win32" = "yes"; then
+ OS_WIN32_TRUE=
+ OS_WIN32_FALSE='#'
+else
+ OS_WIN32_TRUE='#'
+ OS_WIN32_FALSE=
+fi
+
+
+
+have_ot=true
+if $have_ot; then
+
+$as_echo "#define HAVE_OT 1" >>confdefs.h
+
+fi
+ if $have_ot; then
+ HAVE_OT_TRUE=
+ HAVE_OT_FALSE='#'
+else
+ HAVE_OT_TRUE='#'
+ HAVE_OT_FALSE=
+fi
+
+
+
+have_hb_old=true
+if $have_hb_old; then
+
+$as_echo "#define HAVE_HB_OLD 1" >>confdefs.h
+
+fi
+ if $have_hb_old; then
+ HAVE_HB_OLD_TRUE=
+ HAVE_HB_OLD_FALSE='#'
+else
+ HAVE_HB_OLD_TRUE='#'
+ HAVE_HB_OLD_FALSE=
+fi
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+
+fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5
+$as_echo_n "checking for GLIB... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GLIB_CFLAGS"; then
+ pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.16" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GLIB_LIBS"; then
+ pkg_cv_GLIB_LIBS="$GLIB_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.16" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= 2.16"`
+ else
+ GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 2.16"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GLIB_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_glib=false
+elif test $pkg_failed = untried; then
+ have_glib=false
+else
+ GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS
+ GLIB_LIBS=$pkg_cv_GLIB_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_glib=true
+fi
+if $have_glib; then
+
+$as_echo "#define HAVE_GLIB 1" >>confdefs.h
+
+fi
+ if $have_glib; then
+ HAVE_GLIB_TRUE=
+ HAVE_GLIB_FALSE='#'
+else
+ HAVE_GLIB_TRUE='#'
+ HAVE_GLIB_FALSE=
+fi
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTHREAD" >&5
+$as_echo_n "checking for GTHREAD... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GTHREAD_CFLAGS"; then
+ pkg_cv_GTHREAD_CFLAGS="$GTHREAD_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gthread-2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gthread-2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GTHREAD_CFLAGS=`$PKG_CONFIG --cflags "gthread-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GTHREAD_LIBS"; then
+ pkg_cv_GTHREAD_LIBS="$GTHREAD_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gthread-2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gthread-2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GTHREAD_LIBS=`$PKG_CONFIG --libs "gthread-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ GTHREAD_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gthread-2.0"`
+ else
+ GTHREAD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gthread-2.0"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GTHREAD_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_gthread=false
+elif test $pkg_failed = untried; then
+ have_gthread=false
+else
+ GTHREAD_CFLAGS=$pkg_cv_GTHREAD_CFLAGS
+ GTHREAD_LIBS=$pkg_cv_GTHREAD_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_gthread=true
+fi
+if $have_gthread; then
+
+$as_echo "#define HAVE_GTHREAD 1" >>confdefs.h
+
+fi
+ if $have_gthread; then
+ HAVE_GTHREAD_TRUE=
+ HAVE_GTHREAD_FALSE='#'
+else
+ HAVE_GTHREAD_TRUE='#'
+ HAVE_GTHREAD_FALSE=
+fi
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GOBJECT" >&5
+$as_echo_n "checking for GOBJECT... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GOBJECT_CFLAGS"; then
+ pkg_cv_GOBJECT_CFLAGS="$GOBJECT_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0 glib-2.0 >= 2.16\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gobject-2.0 glib-2.0 >= 2.16") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0 glib-2.0 >= 2.16" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GOBJECT_LIBS"; then
+ pkg_cv_GOBJECT_LIBS="$GOBJECT_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0 glib-2.0 >= 2.16\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gobject-2.0 glib-2.0 >= 2.16") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0 glib-2.0 >= 2.16" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ GOBJECT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gobject-2.0 glib-2.0 >= 2.16"`
+ else
+ GOBJECT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gobject-2.0 glib-2.0 >= 2.16"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GOBJECT_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_gobject=false
+elif test $pkg_failed = untried; then
+ have_gobject=false
+else
+ GOBJECT_CFLAGS=$pkg_cv_GOBJECT_CFLAGS
+ GOBJECT_LIBS=$pkg_cv_GOBJECT_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_gobject=true
+fi
+if $have_gobject; then
+
+$as_echo "#define HAVE_GOBJECT 1" >>confdefs.h
+
+ GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
+
+fi
+ if $have_gobject; then
+ HAVE_GOBJECT_TRUE=
+ HAVE_GOBJECT_FALSE='#'
+else
+ HAVE_GOBJECT_TRUE='#'
+ HAVE_GOBJECT_FALSE=
+fi
+
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAIRO" >&5
+$as_echo_n "checking for CAIRO... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$CAIRO_CFLAGS"; then
+ pkg_cv_CAIRO_CFLAGS="$CAIRO_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.8.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "cairo >= 1.8.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= 1.8.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$CAIRO_LIBS"; then
+ pkg_cv_CAIRO_LIBS="$CAIRO_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.8.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "cairo >= 1.8.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo >= 1.8.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cairo >= 1.8.0"`
+ else
+ CAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo >= 1.8.0"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$CAIRO_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_cairo=false
+elif test $pkg_failed = untried; then
+ have_cairo=false
+else
+ CAIRO_CFLAGS=$pkg_cv_CAIRO_CFLAGS
+ CAIRO_LIBS=$pkg_cv_CAIRO_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_cairo=true
+fi
+if $have_cairo; then
+
+$as_echo "#define HAVE_CAIRO 1" >>confdefs.h
+
+fi
+ if $have_cairo; then
+ HAVE_CAIRO_TRUE=
+ HAVE_CAIRO_FALSE='#'
+else
+ HAVE_CAIRO_TRUE='#'
+ HAVE_CAIRO_FALSE=
+fi
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAIRO_FT" >&5
+$as_echo_n "checking for CAIRO_FT... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$CAIRO_FT_CFLAGS"; then
+ pkg_cv_CAIRO_FT_CFLAGS="$CAIRO_FT_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo-ft\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "cairo-ft") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_CAIRO_FT_CFLAGS=`$PKG_CONFIG --cflags "cairo-ft" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$CAIRO_FT_LIBS"; then
+ pkg_cv_CAIRO_FT_LIBS="$CAIRO_FT_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo-ft\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "cairo-ft") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_CAIRO_FT_LIBS=`$PKG_CONFIG --libs "cairo-ft" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ CAIRO_FT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cairo-ft"`
+ else
+ CAIRO_FT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo-ft"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$CAIRO_FT_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_cairo_ft=false
+elif test $pkg_failed = untried; then
+ have_cairo_ft=false
+else
+ CAIRO_FT_CFLAGS=$pkg_cv_CAIRO_FT_CFLAGS
+ CAIRO_FT_LIBS=$pkg_cv_CAIRO_FT_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_cairo_ft=true
+fi
+if $have_cairo_ft; then
+
+$as_echo "#define HAVE_CAIRO_FT 1" >>confdefs.h
+
+fi
+ if $have_cairo_ft; then
+ HAVE_CAIRO_FT_TRUE=
+ HAVE_CAIRO_FT_FALSE='#'
+else
+ HAVE_CAIRO_FT_TRUE='#'
+ HAVE_CAIRO_FT_FALSE=
+fi
+
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU" >&5
+$as_echo_n "checking for ICU... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$ICU_CFLAGS"; then
+ pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "icu-uc") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$ICU_LIBS"; then
+ pkg_cv_ICU_LIBS="$ICU_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "icu-uc") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "icu-uc"`
+ else
+ ICU_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "icu-uc"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$ICU_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_icu=false
+elif test $pkg_failed = untried; then
+ have_icu=false
+else
+ ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
+ ICU_LIBS=$pkg_cv_ICU_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_icu=true
+fi
+if $have_icu; then
+
+$as_echo "#define HAVE_ICU 1" >>confdefs.h
+
+fi
+ if $have_icu; then
+ HAVE_ICU_TRUE=
+ HAVE_ICU_FALSE='#'
+else
+ HAVE_ICU_TRUE='#'
+ HAVE_ICU_FALSE=
+fi
+
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GRAPHITE2" >&5
+$as_echo_n "checking for GRAPHITE2... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GRAPHITE2_CFLAGS"; then
+ pkg_cv_GRAPHITE2_CFLAGS="$GRAPHITE2_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"graphite2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "graphite2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GRAPHITE2_CFLAGS=`$PKG_CONFIG --cflags "graphite2" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GRAPHITE2_LIBS"; then
+ pkg_cv_GRAPHITE2_LIBS="$GRAPHITE2_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"graphite2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "graphite2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GRAPHITE2_LIBS=`$PKG_CONFIG --libs "graphite2" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ GRAPHITE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "graphite2"`
+ else
+ GRAPHITE2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "graphite2"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GRAPHITE2_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_graphite=false
+elif test $pkg_failed = untried; then
+ have_graphite=false
+else
+ GRAPHITE2_CFLAGS=$pkg_cv_GRAPHITE2_CFLAGS
+ GRAPHITE2_LIBS=$pkg_cv_GRAPHITE2_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_graphite=true
+fi
+if $have_graphite; then
+
+$as_echo "#define HAVE_GRAPHITE2 1" >>confdefs.h
+
+fi
+ if $have_graphite; then
+ HAVE_GRAPHITE2_TRUE=
+ HAVE_GRAPHITE2_FALSE='#'
+else
+ HAVE_GRAPHITE2_TRUE='#'
+ HAVE_GRAPHITE2_FALSE=
+fi
+
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
+$as_echo_n "checking for FREETYPE... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$FREETYPE_CFLAGS"; then
+ pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2 >= 2.3.8\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "freetype2 >= 2.3.8") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2 >= 2.3.8" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$FREETYPE_LIBS"; then
+ pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2 >= 2.3.8\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "freetype2 >= 2.3.8") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2 >= 2.3.8" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "freetype2 >= 2.3.8"`
+ else
+ FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2 >= 2.3.8"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$FREETYPE_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_freetype=false
+elif test $pkg_failed = untried; then
+ have_freetype=false
+else
+ FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
+ FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_freetype=true
+fi
+if $have_freetype; then
+
+$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
+
+ _save_libs="$LIBS"
+ _save_cflags="$CFLAGS"
+ LIBS="$LIBS $FREETYPE_LIBS"
+ CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
+ for ac_func in FT_Face_GetCharVariantIndex
+do :
+ ac_fn_c_check_func "$LINENO" "FT_Face_GetCharVariantIndex" "ac_cv_func_FT_Face_GetCharVariantIndex"
+if test "x$ac_cv_func_FT_Face_GetCharVariantIndex" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_FT_FACE_GETCHARVARIANTINDEX 1
+_ACEOF
+
+fi
+done
+
+ LIBS="$_save_libs"
+ CFLAGS="$_save_cflags"
+fi
+ if $have_freetype; then
+ HAVE_FREETYPE_TRUE=
+ HAVE_FREETYPE_FALSE='#'
+else
+ HAVE_FREETYPE_TRUE='#'
+ HAVE_FREETYPE_FALSE=
+fi
+
+
+
+for ac_header in usp10.h windows.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"
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ have_uniscribe=true
+else
+ have_uniscribe=false
+fi
+
+done
+
+if $have_uniscribe; then
+ UNISCRIBE_CFLAGS=
+ UNISCRIBE_LIBS="-lusp10 -lgdi32"
+
+
+
+$as_echo "#define HAVE_UNISCRIBE 1" >>confdefs.h
+
+fi
+ if $have_uniscribe; then
+ HAVE_UNISCRIBE_TRUE=
+ HAVE_UNISCRIBE_FALSE='#'
+else
+ HAVE_UNISCRIBE_TRUE='#'
+ HAVE_UNISCRIBE_FALSE=
+fi
+
+
+
+for ac_header in ApplicationServices/ApplicationServices.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "ApplicationServices/ApplicationServices.h" "ac_cv_header_ApplicationServices_ApplicationServices_h" "$ac_includes_default"
+if test "x$ac_cv_header_ApplicationServices_ApplicationServices_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H 1
+_ACEOF
+ have_coretext=true
+else
+ have_coretext=false
+fi
+
+done
+
+if $have_coretext; then
+ CORETEXT_CFLAGS=
+ CORETEXT_LIBS=
+
+
+
+$as_echo "#define HAVE_CORETEXT 1" >>confdefs.h
+
+fi
+ if $have_coretext; then
+ HAVE_CORETEXT_TRUE=
+ HAVE_CORETEXT_FALSE='#'
+else
+ HAVE_CORETEXT_TRUE='#'
+ HAVE_CORETEXT_FALSE=
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Intel atomic primitives" >&5
+$as_echo_n "checking for Intel atomic primitives... " >&6; }
+if test "${hb_cv_have_intel_atomic_primitives+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ hb_cv_have_intel_atomic_primitives=false
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ void memory_barrier (void) { __sync_synchronize (); }
+ int atomic_add (int *i) { return __sync_fetch_and_add (i, 1); }
+ int mutex_trylock (int *m) { return __sync_lock_test_and_set (m, 1); }
+ void mutex_unlock (int *m) { __sync_lock_release (m); }
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ hb_cv_have_intel_atomic_primitives=true
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hb_cv_have_intel_atomic_primitives" >&5
+$as_echo "$hb_cv_have_intel_atomic_primitives" >&6; }
+if $hb_cv_have_intel_atomic_primitives; then
+
+$as_echo "#define HAVE_INTEL_ATOMIC_PRIMITIVES 1" >>confdefs.h
+
+fi
+
+
+ac_config_files="$ac_config_files Makefile harfbuzz.pc src/Makefile src/hb-version.h src/hb-old/Makefile util/Makefile test/Makefile test/api/Makefile test/shaping/Makefile"
+
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+ as_fn_error "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+ as_fn_error "conditional \"am__fastdepCXX\" 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
+fi
+if test -z "${HAVE_OT_TRUE}" && test -z "${HAVE_OT_FALSE}"; then
+ as_fn_error "conditional \"HAVE_OT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_HB_OLD_TRUE}" && test -z "${HAVE_HB_OLD_FALSE}"; then
+ as_fn_error "conditional \"HAVE_HB_OLD\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_GLIB_TRUE}" && test -z "${HAVE_GLIB_FALSE}"; then
+ as_fn_error "conditional \"HAVE_GLIB\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_GTHREAD_TRUE}" && test -z "${HAVE_GTHREAD_FALSE}"; then
+ as_fn_error "conditional \"HAVE_GTHREAD\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_GOBJECT_TRUE}" && test -z "${HAVE_GOBJECT_FALSE}"; then
+ as_fn_error "conditional \"HAVE_GOBJECT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_CAIRO_TRUE}" && test -z "${HAVE_CAIRO_FALSE}"; then
+ as_fn_error "conditional \"HAVE_CAIRO\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_CAIRO_FT_TRUE}" && test -z "${HAVE_CAIRO_FT_FALSE}"; then
+ as_fn_error "conditional \"HAVE_CAIRO_FT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_ICU_TRUE}" && test -z "${HAVE_ICU_FALSE}"; then
+ as_fn_error "conditional \"HAVE_ICU\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_GRAPHITE2_TRUE}" && test -z "${HAVE_GRAPHITE2_FALSE}"; then
+ as_fn_error "conditional \"HAVE_GRAPHITE2\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_FREETYPE_TRUE}" && test -z "${HAVE_FREETYPE_FALSE}"; then
+ as_fn_error "conditional \"HAVE_FREETYPE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_UNISCRIBE_TRUE}" && test -z "${HAVE_UNISCRIBE_FALSE}"; then
+ as_fn_error "conditional \"HAVE_UNISCRIBE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_CORETEXT_TRUE}" && test -z "${HAVE_CORETEXT_FALSE}"; then
+ as_fn_error "conditional \"HAVE_CORETEXT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error ERROR [LINENO LOG_FD]
+# ---------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with status $?, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$?; test $as_status -eq 0 && as_status=1
+ if test "$3"; then
+ as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ fi
+ $as_echo "$as_me: error: $1" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# 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.3, which was
+generated by GNU Autoconf 2.65. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz>.
+HarfBuzz home page: <http://harfbuzz.org/>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+HarfBuzz config.status 0.9.3
+configured by $0, generated by GNU Autoconf 2.65,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2009 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
+LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`'
+predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`'
+postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`'
+predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`'
+postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`'
+LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+OBJDUMP \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib \
+compiler_lib_search_dirs \
+predep_objects \
+postdep_objects \
+predeps \
+postdeps \
+compiler_lib_search_path \
+LD_CXX \
+compiler_CXX \
+lt_prog_compiler_no_builtin_flag_CXX \
+lt_prog_compiler_wl_CXX \
+lt_prog_compiler_pic_CXX \
+lt_prog_compiler_static_CXX \
+lt_cv_prog_compiler_c_o_CXX \
+export_dynamic_flag_spec_CXX \
+whole_archive_flag_spec_CXX \
+compiler_needs_object_CXX \
+with_gnu_ld_CXX \
+allow_undefined_flag_CXX \
+no_undefined_flag_CXX \
+hardcode_libdir_flag_spec_CXX \
+hardcode_libdir_flag_spec_ld_CXX \
+hardcode_libdir_separator_CXX \
+fix_srcfile_path_CXX \
+exclude_expsyms_CXX \
+include_expsyms_CXX \
+file_list_spec_CXX \
+compiler_lib_search_dirs_CXX \
+predep_objects_CXX \
+postdep_objects_CXX \
+predeps_CXX \
+postdeps_CXX \
+compiler_lib_search_path_CXX; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec \
+old_archive_cmds_CXX \
+old_archive_from_new_cmds_CXX \
+old_archive_from_expsyms_cmds_CXX \
+archive_cmds_CXX \
+archive_expsym_cmds_CXX \
+module_cmds_CXX \
+module_expsym_cmds_CXX \
+export_symbols_cmds_CXX \
+prelink_cmds_CXX; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+ ;;
+esac
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "harfbuzz.pc") CONFIG_FILES="$CONFIG_FILES harfbuzz.pc" ;;
+ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "src/hb-version.h") CONFIG_FILES="$CONFIG_FILES src/hb-version.h" ;;
+ "src/hb-old/Makefile") CONFIG_FILES="$CONFIG_FILES src/hb-old/Makefile" ;;
+ "util/Makefile") CONFIG_FILES="$CONFIG_FILES util/Makefile" ;;
+ "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
+ "test/api/Makefile") CONFIG_FILES="$CONFIG_FILES test/api/Makefile" ;;
+ "test/shaping/Makefile") CONFIG_FILES="$CONFIG_FILES test/shaping/Makefile" ;;
+
+ *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+ || as_fn_error "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_t"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin" \
+ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+ } >"$tmp/config.h" \
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$tmp/config.h" "$ac_file" \
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "libtool":C)
+
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags="CXX "
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# An object symbol dumper.
+OBJDUMP=$lt_OBJDUMP
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects
+postdep_objects=$lt_postdep_objects
+predeps=$lt_predeps
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=$(( $* ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=${#1}
+}
+
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "$@"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1+=\$2"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1=\$$1\$2"
+}
+
+_LT_EOF
+ ;;
+ esac
+
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+
+ cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_CXX
+
+# A language specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_CXX
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_CXX
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_CXX
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_CXX
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path_CXX
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_CXX
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_CXX
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_CXX
+postdep_objects=$lt_postdep_objects_CXX
+predeps=$lt_predeps_CXX
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# ### END LIBTOOL TAG CONFIG: CXX
+_LT_EOF
+
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit $?
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..916a5d4
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,238 @@
+AC_PREREQ([2.64])
+AC_INIT([HarfBuzz],
+ [0.9.3],
+ [http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz],
+ [harfbuzz],
+ [http://harfbuzz.org/])
+
+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_SILENT_RULES([yes])
+
+# Initialize libtool
+LT_PREREQ([2.2])
+LT_INIT([disable-static])
+
+# Check for programs
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_CXX
+
+# Version
+m4_define(hb_version_triplet,m4_split(AC_PACKAGE_VERSION,[[.]]))
+m4_define(hb_version_major,m4_argn(1,hb_version_triplet))
+m4_define(hb_version_minor,m4_argn(2,hb_version_triplet))
+m4_define(hb_version_micro,m4_argn(3,hb_version_triplet))
+HB_VERSION_MAJOR=hb_version_major
+HB_VERSION_MINOR=hb_version_minor
+HB_VERSION_MICRO=hb_version_micro
+HB_VERSION=AC_PACKAGE_VERSION
+AC_SUBST(HB_VERSION_MAJOR)
+AC_SUBST(HB_VERSION_MINOR)
+AC_SUBST(HB_VERSION_MICRO)
+AC_SUBST(HB_VERSION)
+
+# Libtool version
+m4_define([hb_version_int],
+ m4_eval(hb_version_major*10000 + hb_version_minor*100 + hb_version_micro))
+m4_if(m4_eval(hb_version_minor % 2), [1],
+ dnl for unstable releases
+ [m4_define([hb_libtool_revision], 0)],
+ dnl for stable releases
+ [m4_define([hb_libtool_revision], hb_version_micro)])
+m4_define([hb_libtool_age],
+ m4_eval(hb_version_int - hb_libtool_revision))
+m4_define([hb_libtool_current],
+ m4_eval(hb_version_major + hb_libtool_age))
+HB_LIBTOOL_VERSION_INFO=hb_libtool_current:hb_libtool_revision:hb_libtool_age
+AC_SUBST(HB_LIBTOOL_VERSION_INFO)
+
+dnl GOBJECT_INTROSPECTION_CHECK([0.9.0])
+dnl GTK_DOC_CHECK([1.15],[--flavour no-tmpl])
+
+# Functions and headers
+AC_CHECK_FUNCS(atexit mprotect sysconf getpagesize sched_yield mmap _setmode isatty)
+AC_CHECK_HEADERS(unistd.h sys/mman.h sched.h io.h)
+
+# Compiler flags
+AC_CANONICAL_HOST
+if test "x$GCC" = "xyes"; then
+
+ # Make symbols link locally
+ LDFLAGS="$LDFLAGS -Bsymbolic-functions"
+
+ # Make sure we don't link to libstdc++
+ CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions"
+
+ # Assorted warnings
+ CXXFLAGS="$CXXFLAGS -Wcast-align"
+
+ case "$host" in
+ *-*-mingw*)
+ ;;
+ *)
+ # Hide inline methods
+ CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
+ ;;
+ esac
+
+ case "$host" in
+ arm-*-*)
+ # Request byte alignment on arm
+ CXXFLAGS="$CXXFLAGS -mstructure-size-boundary=8"
+ ;;
+ esac
+fi
+
+AC_MSG_CHECKING([for native Win32])
+case "$host" in
+ *-*-mingw*)
+ hb_os_win32=yes
+ ;;
+ *)
+ hb_os_win32=no
+ ;;
+esac
+AC_MSG_RESULT([$hb_os_win32])
+AM_CONDITIONAL(OS_WIN32, test "$hb_os_win32" = "yes")
+
+dnl ==========================================================================
+
+have_ot=true
+if $have_ot; then
+ AC_DEFINE(HAVE_OT, 1, [Have native OpenType Layout backend])
+fi
+AM_CONDITIONAL(HAVE_OT, $have_ot)
+
+dnl ===========================================================================
+
+have_hb_old=true
+if $have_hb_old; then
+ AC_DEFINE(HAVE_HB_OLD, 1, [Have Old HarfBuzz backend])
+fi
+AM_CONDITIONAL(HAVE_HB_OLD, $have_hb_old)
+
+dnl ===========================================================================
+
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, have_glib=true, have_glib=false)
+if $have_glib; then
+ AC_DEFINE(HAVE_GLIB, 1, [Have glib2 library])
+fi
+AM_CONDITIONAL(HAVE_GLIB, $have_glib)
+
+PKG_CHECK_MODULES(GTHREAD, gthread-2.0, have_gthread=true, have_gthread=false)
+if $have_gthread; then
+ AC_DEFINE(HAVE_GTHREAD, 1, [Have gthread2 library])
+fi
+AM_CONDITIONAL(HAVE_GTHREAD, $have_gthread)
+
+PKG_CHECK_MODULES(GOBJECT, gobject-2.0 glib-2.0 >= 2.16, have_gobject=true, have_gobject=false)
+if $have_gobject; then
+ AC_DEFINE(HAVE_GOBJECT, 1, [Have gobject2 library])
+ GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
+ AC_SUBST(GLIB_MKENUMS)
+fi
+AM_CONDITIONAL(HAVE_GOBJECT, $have_gobject)
+
+dnl ==========================================================================
+
+PKG_CHECK_MODULES(CAIRO, cairo >= 1.8.0, have_cairo=true, have_cairo=false)
+if $have_cairo; then
+ AC_DEFINE(HAVE_CAIRO, 1, [Have cairo graphics library])
+fi
+AM_CONDITIONAL(HAVE_CAIRO, $have_cairo)
+
+PKG_CHECK_MODULES(CAIRO_FT, cairo-ft, have_cairo_ft=true, have_cairo_ft=false)
+if $have_cairo_ft; then
+ AC_DEFINE(HAVE_CAIRO_FT, 1, [Have cairo-ft support in cairo graphics library])
+fi
+AM_CONDITIONAL(HAVE_CAIRO_FT, $have_cairo_ft)
+
+dnl ==========================================================================
+
+PKG_CHECK_MODULES(ICU, icu-uc, have_icu=true, have_icu=false)
+if $have_icu; then
+ AC_DEFINE(HAVE_ICU, 1, [Have ICU library])
+fi
+AM_CONDITIONAL(HAVE_ICU, $have_icu)
+
+dnl ==========================================================================
+
+PKG_CHECK_MODULES(GRAPHITE2, graphite2, have_graphite=true, have_graphite=false)
+if $have_graphite; then
+ AC_DEFINE(HAVE_GRAPHITE2, 1, [Have Graphite library])
+fi
+AM_CONDITIONAL(HAVE_GRAPHITE2, $have_graphite)
+
+dnl ==========================================================================
+
+PKG_CHECK_MODULES(FREETYPE, freetype2 >= 2.3.8, have_freetype=true, have_freetype=false)
+if $have_freetype; then
+ AC_DEFINE(HAVE_FREETYPE, 1, [Have FreeType 2 library])
+ _save_libs="$LIBS"
+ _save_cflags="$CFLAGS"
+ LIBS="$LIBS $FREETYPE_LIBS"
+ CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
+ AC_CHECK_FUNCS(FT_Face_GetCharVariantIndex)
+ LIBS="$_save_libs"
+ CFLAGS="$_save_cflags"
+fi
+AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype)
+
+dnl ===========================================================================
+
+AC_CHECK_HEADERS(usp10.h windows.h, have_uniscribe=true, have_uniscribe=false)
+if $have_uniscribe; then
+ UNISCRIBE_CFLAGS=
+ UNISCRIBE_LIBS="-lusp10 -lgdi32"
+ AC_SUBST(UNISCRIBE_CFLAGS)
+ AC_SUBST(UNISCRIBE_LIBS)
+ AC_DEFINE(HAVE_UNISCRIBE, 1, [Have Uniscribe backend])
+fi
+AM_CONDITIONAL(HAVE_UNISCRIBE, $have_uniscribe)
+
+dnl ===========================================================================
+
+AC_CHECK_HEADERS(ApplicationServices/ApplicationServices.h, have_coretext=true, have_coretext=false)
+if $have_coretext; then
+ CORETEXT_CFLAGS=
+ CORETEXT_LIBS=
+ AC_SUBST(CORETEXT_CFLAGS)
+ AC_SUBST(CORETEXT_LIBS)
+ AC_DEFINE(HAVE_CORETEXT, 1, [Have Core Text backend])
+fi
+AM_CONDITIONAL(HAVE_CORETEXT, $have_coretext)
+
+dnl ===========================================================================
+
+AC_CACHE_CHECK([for Intel atomic primitives], hb_cv_have_intel_atomic_primitives, [
+ hb_cv_have_intel_atomic_primitives=false
+ AC_TRY_LINK([
+ void memory_barrier (void) { __sync_synchronize (); }
+ int atomic_add (int *i) { return __sync_fetch_and_add (i, 1); }
+ int mutex_trylock (int *m) { return __sync_lock_test_and_set (m, 1); }
+ void mutex_unlock (int *m) { __sync_lock_release (m); }
+ ], [], hb_cv_have_intel_atomic_primitives=true
+ )
+])
+if $hb_cv_have_intel_atomic_primitives; then
+ AC_DEFINE(HAVE_INTEL_ATOMIC_PRIMITIVES, 1, [Have Intel __sync_* atomic primitives])
+fi
+
+dnl ===========================================================================
+
+AC_CONFIG_FILES([
+Makefile
+harfbuzz.pc
+src/Makefile
+src/hb-version.h
+src/hb-old/Makefile
+util/Makefile
+test/Makefile
+test/api/Makefile
+test/shaping/Makefile
+])
+
+AC_OUTPUT
diff --git a/depcomp b/depcomp
new file mode 100755
index 0000000..df8eea7
--- /dev/null
+++ b/depcomp
@@ -0,0 +1,630 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
+# Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by `PROGRAMS ARGS'.
+ object Object file output by `PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputing dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u="sed s,\\\\\\\\,/,g"
+ depmode=msvisualcpp
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+ tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'. On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like `#:fec' to the end of the
+ # dependency line.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+ tr '
+' ' ' >> "$depfile"
+ echo >> "$depfile"
+
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts `$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
+ "$@" -Wc,-M
+ else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
+ "$@" -M
+ fi
+ stat=$?
+
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form `foo.o: dependent.h'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+icc)
+ # Intel's C compiler understands `-MD -MF file'. However on
+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+ # ICC 7.0 will fill foo.d with something like
+ # foo.o: sub/foo.c
+ # foo.o: sub/foo.h
+ # which is wrong. We want:
+ # sub/foo.o: sub/foo.c
+ # sub/foo.o: sub/foo.h
+ # sub/foo.c:
+ # sub/foo.h:
+ # ICC 7.1 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add `dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in `foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+ if test "$libtool" = yes; then
+ # With Tru64 cc, shared objects can also be used to make a
+ # static library. This mechanism is used in libtool 1.4 series to
+ # handle both shared and static libraries in a single compilation.
+ # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+ #
+ # With libtool 1.5 this exception was removed, and libtool now
+ # generates 2 separate objects for the 2 libraries. These two
+ # compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
+ tmpdepfile2=$dir$base.o.d # libtool 1.5
+ tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
+ tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.o.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ tmpdepfile4=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for `:'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no eat=no
+ for arg
+ do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E |
+ sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ echo " " >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/harfbuzz.doap b/harfbuzz.doap
new file mode 100644
index 0000000..d2896eb
--- /dev/null
+++ b/harfbuzz.doap
@@ -0,0 +1,24 @@
+<Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+ xmlns:foaf="http://xmlns.com/foaf/0.1/"
+ xmlns="http://usefulinc.com/ns/doap#">
+
+ <name xml:lang="en">harfbuzz</name>
+ <shortdesc xml:lang="en">Text shaping library</shortdesc>
+
+ <homepage
+ rdf:resource="http://harfbuzz.org/" />
+ <mailing-list
+ rdf:resource="http://lists.freedesktop.org/mailman/listinfo/harfbuzz" />
+ <!--download-page
+ rdf:resource=""/-->
+ <bug-database
+ rdf:resource="http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz"/>
+
+ <maintainer>
+ <foaf:Person>
+ <foaf:name>Behdad Esfahbod</foaf:name>
+ <foaf:mbox rdf:resource="mailto:harfbuzz@behdad.org" />
+ </foaf:Person>
+ </maintainer>
+</Project>
diff --git a/harfbuzz.pc.in b/harfbuzz.pc.in
new file mode 100644
index 0000000..e92319e
--- /dev/null
+++ b/harfbuzz.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: harfbuzz
+Description: Text shaping library
+Version: @VERSION@
+
+Libs: -L${libdir} -lharfbuzz
+Cflags: -I${includedir}/harfbuzz
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..6781b98
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,520 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2009-04-28.21; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t) dst_arg=$2
+ shift;;
+
+ -T) no_target_directory=true;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dst_arg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst;;
+ esac
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ -*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
+ shift
+ $posix_glob set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test -z "$d" && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/ltmain.sh b/ltmain.sh
new file mode 100755
index 0000000..7ed280b
--- /dev/null
+++ b/ltmain.sh
@@ -0,0 +1,8413 @@
+# Generated from ltmain.m4sh.
+
+# ltmain.sh (GNU libtool) 2.2.6b
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+# --config show all configuration variables
+# --debug enable verbose shell tracing
+# -n, --dry-run display commands without modifying any files
+# --features display basic configuration information and exit
+# --mode=MODE use operation mode MODE
+# --preserve-dup-deps don't remove duplicate dependency libraries
+# --quiet, --silent don't print informational messages
+# --tag=TAG use configuration variables from tag TAG
+# -v, --verbose print informational messages (default)
+# --version print version information
+# -h, --help print short or long help message
+#
+# MODE must be one of the following:
+#
+# clean remove files from the build directory
+# compile compile a source file into a libtool object
+# execute automatically set library path, then run a program
+# finish complete the installation of libtool libraries
+# install install libraries or executables
+# link create a library or an executable
+# uninstall remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+# host-triplet: $host
+# shell: $SHELL
+# compiler: $LTCC
+# compiler flags: $LTCFLAGS
+# linker: $LD (gnu? $with_gnu_ld)
+# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1
+# automake: $automake_version
+# autoconf: $autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION="2.2.6b Debian-2.2.6b-2ubuntu1"
+TIMESTAMP=""
+package_revision=1.3017
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# NLS nuisances: We save the old values to restore during execute mode.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+ fi"
+done
+
+$lt_unset CDPATH
+
+
+
+
+
+: ${CP="cp -f"}
+: ${ECHO="echo"}
+: ${EGREP="/bin/grep -E"}
+: ${FGREP="/bin/grep -F"}
+: ${GREP="/bin/grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="/bin/sed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" $lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# Generated shell functions inserted here.
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+# In the unlikely event $progname began with a '-', it would play havoc with
+# func_echo (imagine progname=-n), so we prepend ./ in that case:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+case $progname in
+ -*) progname=./$progname ;;
+esac
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=$func_dirname_result
+ progdir=`cd "$progdir" && pwd`
+ progpath="$progdir/$progname"
+ ;;
+ *)
+ save_IFS="$IFS"
+ IFS=:
+ for progdir in $PATH; do
+ IFS="$save_IFS"
+ test -x "$progdir/$progname" && break
+ done
+ IFS="$save_IFS"
+ test -n "$progdir" || progdir=`pwd`
+ progpath="$progdir/$progname"
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+ s/$bs4/&\\
+/g
+ s/^$bs2$dollar/$bs&/
+ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+ s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+ $ECHO "$progname${mode+: }$mode: $*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $opt_verbose && func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+ $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
+
+ # bash bug again:
+ :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ func_error ${1+"$@"}
+ func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information." ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ my_directory_path="$1"
+ my_dir_list=
+
+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+ # Protect directory names starting with `-'
+ case $my_directory_path in
+ -*) my_directory_path="./$my_directory_path" ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$my_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ my_dir_list="$my_directory_path:$my_dir_list"
+
+ # If the last portion added has no slash in it, the list is done
+ case $my_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
+ done
+ my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
+
+ save_mkdir_p_IFS="$IFS"; IFS=':'
+ for my_dir in $my_dir_list; do
+ IFS="$save_mkdir_p_IFS"
+ # mkdir can fail with a `File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$my_dir" 2>/dev/null || :
+ done
+ IFS="$save_mkdir_p_IFS"
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$my_directory_path" || \
+ func_fatal_error "Failed to create \`$1'"
+ fi
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$opt_dry_run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$my_tmpdir"
+ umask $save_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$my_tmpdir" || \
+ func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+ fi
+
+ $ECHO "X$my_tmpdir" | $Xsed
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+ case $1 in
+ *[\\\`\"\$]*)
+ func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
+ *)
+ func_quote_for_eval_unquoted_result="$1" ;;
+ esac
+
+ case $func_quote_for_eval_unquoted_result in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and and variable
+ # expansion for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+ ;;
+ *)
+ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+ esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ case $1 in
+ *[\\\`\"]*)
+ my_arg=`$ECHO "X$1" | $Xsed \
+ -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ my_arg="$1" ;;
+ esac
+
+ case $my_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ my_arg="\"$my_arg\""
+ ;;
+ esac
+
+ func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$my_cmd"
+ my_status=$?
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it. Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$lt_user_locale
+ $my_cmd"
+ my_status=$?
+ eval "$lt_safe_locale"
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
+ s/^# //
+ s/^# *$//
+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $SED -n '/^# Usage:/,/# -h/ {
+ s/^# //
+ s/^# *$//
+ s/\$progname/'$progname'/
+ p
+ }' < "$progpath"
+ $ECHO
+ $ECHO "run \`$progname --help | more' for full usage"
+ exit $?
+}
+
+# func_help
+# Echo long help message to standard output and exit.
+func_help ()
+{
+ $SED -n '/^# Usage:/,/# Report bugs to/ {
+ s/^# //
+ s/^# *$//
+ s*\$progname*'$progname'*
+ s*\$host*'"$host"'*
+ s*\$SHELL*'"$SHELL"'*
+ s*\$LTCC*'"$LTCC"'*
+ s*\$LTCFLAGS*'"$LTCFLAGS"'*
+ s*\$LD*'"$LD"'*
+ s/\$with_gnu_ld/'"$with_gnu_ld"'/
+ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ func_error "missing argument for $1"
+ exit_cmd=exit
+}
+
+exit_cmd=:
+
+
+
+
+
+# Check that we have a working $ECHO.
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell, and then maybe $ECHO will work.
+ exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit $EXIT_SUCCESS
+fi
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+# $mode is unset
+nonopt=
+execute_dlfiles=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+opt_dry_run=false
+opt_duplicate_deps=false
+opt_silent=false
+opt_debug=:
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func_error ${1+"$@"}
+ func_error "See the $PACKAGE documentation for more information."
+ func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
+
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+
+ exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+ $ECHO "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ $ECHO "enable shared libraries"
+ else
+ $ECHO "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; then
+ $ECHO "enable static libraries"
+ else
+ $ECHO "disable static libraries"
+ fi
+
+ exit $?
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+ # Global variable:
+ tagname="$1"
+
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
+
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
+ *)
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
+
+# Parse options once, thoroughly. This comes as soon as possible in
+# the script to make things like `libtool --version' happen quickly.
+{
+
+ # Shorthand for --mode=foo, only valid as the first argument
+ case $1 in
+ clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+ compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+ execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+ finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+ link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+ esac
+
+ # Parse non-mode specific arguments:
+ while test "$#" -gt 0; do
+ opt="$1"
+ shift
+
+ case $opt in
+ --config) func_config ;;
+
+ --debug) preserve_args="$preserve_args $opt"
+ func_echo "enabling shell trace mode"
+ opt_debug='set -x'
+ $opt_debug
+ ;;
+
+ -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ execute_dlfiles="$execute_dlfiles $1"
+ shift
+ ;;
+
+ --dry-run | -n) opt_dry_run=: ;;
+ --features) func_features ;;
+ --finish) mode="finish" ;;
+
+ --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ case $1 in
+ # Valid mode arguments:
+ clean) ;;
+ compile) ;;
+ execute) ;;
+ finish) ;;
+ install) ;;
+ link) ;;
+ relink) ;;
+ uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $opt"
+ exit_cmd=exit
+ break
+ ;;
+ esac
+
+ mode="$1"
+ shift
+ ;;
+
+ --preserve-dup-deps)
+ opt_duplicate_deps=: ;;
+
+ --quiet|--silent) preserve_args="$preserve_args $opt"
+ opt_silent=:
+ ;;
+
+ --verbose| -v) preserve_args="$preserve_args $opt"
+ opt_silent=false
+ ;;
+
+ --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ preserve_args="$preserve_args $opt $1"
+ func_enable_tag "$1" # tagname is set here
+ shift
+ ;;
+
+ # Separate optargs to long options:
+ -dlopen=*|--mode=*|--tag=*)
+ func_opt_split "$opt"
+ set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
+ shift
+ ;;
+
+ -\?|-h) func_usage ;;
+ --help) opt_help=: ;;
+ --version) func_version ;;
+
+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
+
+ *) nonopt="$opt"
+ break
+ ;;
+ esac
+ done
+
+
+ case $host in
+ *cygwin* | *mingw* | *pw32* | *cegcc*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
+ ;;
+ esac
+
+ # Having warned about all mis-specified options, bail out if
+ # anything was wrong.
+ $exit_cmd $EXIT_FAILURE
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+$opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ func_fatal_configuration "not configured to build any kind of library"
+ fi
+
+ test -z "$mode" && func_fatal_error "error: you must specify a MODE."
+
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$execute_dlfiles" && test "$mode" != execute; then
+ func_error "unrecognized option \`-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$progname --help --mode=$mode' for more information."
+}
+
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ test -f "$1" &&
+ $SED -e 4q "$1" 2>/dev/null \
+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case "$lalib_p_line" in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+ func_ltwrapper_scriptname_result=""
+ if func_ltwrapper_executable_p "$1"; then
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+ fi
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $opt_debug
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$save_ifs
+ eval cmd=\"$cmd\"
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $opt_debug
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
+ esac
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $opt_debug
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ func_quote_for_eval "$arg"
+ CC_quoted="$CC_quoted $func_quote_for_eval_result"
+ done
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ func_quote_for_eval "$arg"
+ CC_quoted="$CC_quoted $func_quote_for_eval_result"
+ done
+ case "$@ " in
+ " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with \`--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+ write_libobj=${1}
+ if test "$build_libtool_libs" = yes; then
+ write_lobj=\'${2}\'
+ else
+ write_lobj=none
+ fi
+
+ if test "$build_old_libs" = yes; then
+ write_oldobj=\'${3}\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "${write_libobj}"
+ }
+}
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $opt_debug
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+ pie_flag=
+
+ for arg
+ do
+ case $arg_mode in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg="$arg"
+ arg_mode=normal
+ ;;
+
+ target )
+ libobj="$arg"
+ arg_mode=normal
+ continue
+ ;;
+
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify \`-o' more than once"
+ arg_mode=target
+ continue
+ ;;
+
+ -pie | -fpie | -fPIE)
+ pie_flag="$pie_flag $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ later="$later $arg"
+ continue
+ ;;
+
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ lastarg=
+ save_ifs="$IFS"; IFS=','
+ for arg in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$arg"
+ lastarg="$lastarg $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ base_compile="$base_compile $lastarg"
+ continue
+ ;;
+
+ *)
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg="$srcfile"
+ srcfile="$arg"
+ ;;
+ esac # case $arg
+ ;;
+ esac # case $arg_mode
+
+ # Aesthetically quote the previous argument.
+ func_quote_for_eval "$lastarg"
+ base_compile="$base_compile $func_quote_for_eval_result"
+ done # for arg
+
+ case $arg_mode in
+ arg)
+ func_fatal_error "you must specify an argument for -Xcompile"
+ ;;
+ target)
+ func_fatal_error "you must specify a target with \`-o'"
+ ;;
+ *)
+ # Get the name of the library object.
+ test -z "$libobj" && {
+ func_basename "$srcfile"
+ libobj="$func_basename_result"
+ }
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ case $libobj in
+ *.[cCFSifmso] | \
+ *.ada | *.adb | *.ads | *.asm | \
+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+ *.[fF][09]? | *.for | *.java | *.obj | *.sx)
+ func_xform "$libobj"
+ libobj=$func_xform_result
+ ;;
+ esac
+
+ case $libobj in
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+ *)
+ func_fatal_error "cannot determine name of library object from \`$libobj'"
+ ;;
+ esac
+
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
+ -static)
+ build_libtool_libs=no
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && func_warning "libobj name \`$libobj' may not contain shell special characters."
+ func_dirname_and_basename "$obj" "/" ""
+ objname="$func_basename_result"
+ xdir="$func_dirname_result"
+ lobj=${xdir}$objdir/$objname
+
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" = yes; then
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+ removelist="$removelist $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ removelist="$removelist $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+ if test -n "$fix_srcfile_path"; then
+ eval srcfile=\"$fix_srcfile_path\"
+ fi
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test "$pic_mode" != no; then
+ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $qsrcfile"
+ fi
+
+ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ command="$command -o $lobj"
+ fi
+
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+ # Allow error messages only from the first compilation.
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ if test "$pic_mode" != yes; then
+ # Don't build PIC code
+ command="$base_compile $qsrcfile$pie_flag"
+ else
+ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test "$compiler_c_o" = yes; then
+ command="$command -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ command="$command$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+test "$mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to building PIC objects only
+ -prefer-non-pic try to building non-PIC objects only
+ -shared do not build a \`.o' file suitable for static linking
+ -static only build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE Use a list of object files found in FILE to specify objects
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode \`$mode'"
+ ;;
+ esac
+
+ $ECHO
+ $ECHO "Try \`$progname --help' for more information about other modes."
+
+ exit $?
+}
+
+ # Now that we've collected a possible --mode arg, show help if necessary
+ $opt_help && func_mode_help
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $opt_debug
+ # The first argument is the command name.
+ cmd="$nonopt"
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $execute_dlfiles; do
+ test -f "$file" \
+ || func_fatal_help "\`$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "\`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+
+ if test -f "$dir/$objdir/$dlname"; then
+ dir="$dir/$objdir"
+ else
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ ;;
+
+ *)
+ func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -*) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ elif func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ func_source "$func_ltwrapper_scriptname_result"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_quote_for_eval "$file"
+ args="$args $func_quote_for_eval_result"
+ done
+
+ if test "X$opt_dry_run" = Xfalse; then
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd="\$cmd$args"
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ $ECHO "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $opt_debug
+ libdirs="$nonopt"
+ admincmds=
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for dir
+ do
+ libdirs="$libdirs $dir"
+ done
+
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || admincmds="$admincmds
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_silent && exit $EXIT_SUCCESS
+
+ $ECHO "X----------------------------------------------------------------------" | $Xsed
+ $ECHO "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ $ECHO
+ $ECHO "If you ever happen to want to link against installed libraries"
+ $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
+ $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
+ $ECHO "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ $ECHO " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
+ $ECHO " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $ECHO " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ $ECHO
+
+ $ECHO "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ $ECHO "pages."
+ ;;
+ *)
+ $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ $ECHO "X----------------------------------------------------------------------" | $Xsed
+ exit $EXIT_SUCCESS
+}
+
+test "$mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $opt_debug
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+ # Allow the use of GNU shtool's install command.
+ $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_for_eval "$arg"
+ install_prog="$install_prog$func_quote_for_eval_result"
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ for arg
+ do
+ if test -n "$dest"; then
+ files="$files $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=yes ;;
+ -f)
+ case " $install_prog " in
+ *[\\\ /]cp\ *) ;;
+ *) prev=$arg ;;
+ esac
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ install_prog="$install_prog $func_quote_for_eval_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prev' option requires an argument"
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ destdir="$func_dirname_result"
+ destname="$func_basename_result"
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "\`$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "\`$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ staticlibs="$staticlibs $file"
+ ;;
+
+ *.la)
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) current_libdirs="$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) future_libdirs="$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir="$func_dirname_result"
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking \`$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname="$1"
+ shift
+
+ srcname="$realname"
+ test -n "$relink_command" && srcname="$realname"T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme="$stripme"
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=""
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try `ln -sf' first, because the `ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name="$func_basename_result"
+ instname="$dir/$name"i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to \`$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=""
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=".exe"
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+ finalize=yes
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "\`$lib' has not been installed in \`$libdir'"
+ finalize=no
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if test "$finalize" = yes; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file="$func_basename_result"
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_silent || {
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink \`$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ func_warning "cannot relink \`$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name="$func_basename_result"
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $opt_debug
+ my_outputname="$1"
+ my_originator="$2"
+ my_pic_p="${3-no}"
+ my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms="${my_outputname}S.c"
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${my_outputname}.nm"
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_verbose "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; then
+ func_verbose "generating symbol list for \`$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_verbose "extracting global C symbols from \`$progfile'"
+ $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$output_objdir/$outputname.exp"
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ func_verbose "extracting global C symbols from \`$dlprefile'"
+ func_basename "$dlprefile"
+ name="$func_basename_result"
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+/* DATA imports from DLLs on WIN32 con't be const, because
+ runtime relocations are performed -- see ld's documentation
+ on pseudo-relocs. */"
+ lt_dlsym_const= ;;
+ *osf5*)
+ echo >> "$output_objdir/$my_dlsyms" "\
+/* This system does not cope well with relocations in const data */"
+ lt_dlsym_const= ;;
+ *)
+ lt_dlsym_const=const ;;
+ esac
+
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+extern $lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+$lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+ { \"$my_originator\", (void *) 0 },"
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ if test "X$my_pic_p" != Xno; then
+ pic_flag_for_symtable=" $pic_flag"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) symtab_cflags="$symtab_cflags $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj="$output_objdir/${my_outputname}S.$objext"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *)
+ func_fatal_error "unknown suffix for \`$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+ $opt_debug
+ win32_libid_type="unknown"
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+ win32_nmres=`eval $NM -f posix -A $1 |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s,.*,import,
+ p
+ q
+ }
+ }'`
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $opt_debug
+ f_ex_an_ar_dir="$1"; shift
+ f_ex_an_ar_oldlib="$1"
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $opt_debug
+ my_gentop="$1"; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=""
+ my_xlib=""
+ my_xabs=""
+ my_xdir=""
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib="$func_basename_result"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ darwin_base_archive=`basename "$darwin_archive"`
+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches ; do
+ func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+ done
+
+ func_extract_archives_result="$my_oldobjs"
+}
+
+
+
+# func_emit_wrapper_part1 [arg=no]
+#
+# Emit the first part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part1 ()
+{
+ func_emit_wrapper_part1_arg1=no
+ if test -n "$1" ; then
+ func_emit_wrapper_part1_arg1=$1
+ fi
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ ECHO=\"$qecho\"
+ file=\"\$0\"
+ # Make sure echo works.
+ if test \"X\$1\" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+ elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
+ # Yippee, \$ECHO works!
+ :
+ else
+ # Restart under the correct shell, and then maybe \$ECHO will work.
+ exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+ fi
+ fi\
+"
+ $ECHO "\
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+ done
+"
+}
+# end: func_emit_wrapper_part1
+
+# func_emit_wrapper_part2 [arg=no]
+#
+# Emit the second part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part2 ()
+{
+ func_emit_wrapper_part2_arg1=no
+ if test -n "$1" ; then
+ func_emit_wrapper_part2_arg1=$1
+ fi
+
+ $ECHO "\
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ $ECHO "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ $ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ # fixup the dll searchpath if we need to.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2* | *-cegcc*)
+ $ECHO "\
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+ fi
+ else
+ # The program doesn't exist.
+ \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+}
+# end: func_emit_wrapper_part2
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take. If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=no
+ if test -n "$1" ; then
+ func_emit_wrapper_arg1=$1
+ fi
+
+ # split this up so that func_emit_cwrapperexe_src
+ # can call each part independently.
+ func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
+ func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
+}
+
+
+# func_to_host_path arg
+#
+# Convert paths to host format when used with build tools.
+# Intended for use with "native" mingw (where libtool itself
+# is running under the msys shell), or in the following cross-
+# build environments:
+# $build $host
+# mingw (msys) mingw [e.g. native]
+# cygwin mingw
+# *nix + wine mingw
+# where wine is equipped with the `winepath' executable.
+# In the native mingw case, the (msys) shell automatically
+# converts paths for any non-msys applications it launches,
+# but that facility isn't available from inside the cwrapper.
+# Similar accommodations are necessary for $host mingw and
+# $build cygwin. Calling this function does no harm for other
+# $host/$build combinations not listed above.
+#
+# ARG is the path (on $build) that should be converted to
+# the proper representation for $host. The result is stored
+# in $func_to_host_path_result.
+func_to_host_path ()
+{
+ func_to_host_path_result="$1"
+ if test -n "$1" ; then
+ case $host in
+ *mingw* )
+ lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+ case $build in
+ *mingw* ) # actually, msys
+ # awkward: cmd appends spaces to result
+ lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+ func_to_host_path_tmp1=`( cmd //c echo "$1" |\
+ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ *cygwin* )
+ func_to_host_path_tmp1=`cygpath -w "$1"`
+ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ * )
+ # Unfortunately, winepath does not exit with a non-zero
+ # error code, so we are forced to check the contents of
+ # stdout. On the other hand, if the command is not
+ # found, the shell will set an exit code of 127 and print
+ # *an error message* to stdout. So we must check for both
+ # error code of zero AND non-empty stdout, which explains
+ # the odd construction:
+ func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
+ if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
+ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ else
+ # Allow warning below.
+ func_to_host_path_result=""
+ fi
+ ;;
+ esac
+ if test -z "$func_to_host_path_result" ; then
+ func_error "Could not determine host path corresponding to"
+ func_error " '$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback:
+ func_to_host_path_result="$1"
+ fi
+ ;;
+ esac
+ fi
+}
+# end: func_to_host_path
+
+# func_to_host_pathlist arg
+#
+# Convert pathlists to host format when used with build tools.
+# See func_to_host_path(), above. This function supports the
+# following $build/$host combinations (but does no harm for
+# combinations not listed here):
+# $build $host
+# mingw (msys) mingw [e.g. native]
+# cygwin mingw
+# *nix + wine mingw
+#
+# Path separators are also converted from $build format to
+# $host format. If ARG begins or ends with a path separator
+# character, it is preserved (but converted to $host format)
+# on output.
+#
+# ARG is a pathlist (on $build) that should be converted to
+# the proper representation on $host. The result is stored
+# in $func_to_host_pathlist_result.
+func_to_host_pathlist ()
+{
+ func_to_host_pathlist_result="$1"
+ if test -n "$1" ; then
+ case $host in
+ *mingw* )
+ lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+ # Remove leading and trailing path separator characters from
+ # ARG. msys behavior is inconsistent here, cygpath turns them
+ # into '.;' and ';.', and winepath ignores them completely.
+ func_to_host_pathlist_tmp2="$1"
+ # Once set for this call, this variable should not be
+ # reassigned. It is used in tha fallback case.
+ func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
+ $SED -e 's|^:*||' -e 's|:*$||'`
+ case $build in
+ *mingw* ) # Actually, msys.
+ # Awkward: cmd appends spaces to result.
+ lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+ func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
+ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ *cygwin* )
+ func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
+ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ * )
+ # unfortunately, winepath doesn't convert pathlists
+ func_to_host_pathlist_result=""
+ func_to_host_pathlist_oldIFS=$IFS
+ IFS=:
+ for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
+ IFS=$func_to_host_pathlist_oldIFS
+ if test -n "$func_to_host_pathlist_f" ; then
+ func_to_host_path "$func_to_host_pathlist_f"
+ if test -n "$func_to_host_path_result" ; then
+ if test -z "$func_to_host_pathlist_result" ; then
+ func_to_host_pathlist_result="$func_to_host_path_result"
+ else
+ func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
+ fi
+ fi
+ fi
+ IFS=:
+ done
+ IFS=$func_to_host_pathlist_oldIFS
+ ;;
+ esac
+ if test -z "$func_to_host_pathlist_result" ; then
+ func_error "Could not determine the host path(s) corresponding to"
+ func_error " '$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback. This may break if $1 contains DOS-style drive
+ # specifications. The fix is not to complicate the expression
+ # below, but for the user to provide a working wine installation
+ # with winepath so that path translation in the cross-to-mingw
+ # case works properly.
+ lt_replace_pathsep_nix_to_dos="s|:|;|g"
+ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
+ $SED -e "$lt_replace_pathsep_nix_to_dos"`
+ fi
+ # Now, add the leading and trailing path separators back
+ case "$1" in
+ :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
+ ;;
+ esac
+ case "$1" in
+ *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+}
+# end: func_to_host_pathlist
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+
+ Currently, it simply execs the wrapper *script* "$SHELL $output",
+ but could eventually absorb all of the scripts functionality and
+ exec $objdir/$outputname directly.
+*/
+EOF
+ cat <<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+# define setmode _setmode
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# define HAVE_SETENV
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+#ifdef _MSC_VER
+# define S_IXUSR _S_IEXEC
+# define stat _stat
+# ifndef _INTPTR_T_DEFINED
+# define intptr_t int
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifdef __CYGWIN__
+# define FOPEN_WB "wb"
+#endif
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#undef LTWRAPPER_DEBUGPRINTF
+#if defined DEBUGWRAPPER
+# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
+static void
+ltwrapper_debugprintf (const char *fmt, ...)
+{
+ va_list args;
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+}
+#else
+# define LTWRAPPER_DEBUGPRINTF(args)
+#endif
+
+const char *program_name = NULL;
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_opt_process_env_set (const char *arg);
+void lt_opt_process_env_prepend (const char *arg);
+void lt_opt_process_env_append (const char *arg);
+int lt_split_name_value (const char *arg, char** name, char** value);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+
+static const char *script_text_part1 =
+EOF
+
+ func_emit_wrapper_part1 yes |
+ $SED -e 's/\([\\"]\)/\\\1/g' \
+ -e 's/^/ "/' -e 's/$/\\n"/'
+ echo ";"
+ cat <<EOF
+
+static const char *script_text_part2 =
+EOF
+ func_emit_wrapper_part2 yes |
+ $SED -e 's/\([\\"]\)/\\\1/g' \
+ -e 's/^/ "/' -e 's/$/\\n"/'
+ echo ";"
+
+ cat <<EOF
+const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ func_to_host_pathlist "$temp_rpath"
+ cat <<EOF
+const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result";
+EOF
+ else
+ cat <<"EOF"
+const char * LIB_PATH_VALUE = "";
+EOF
+ fi
+
+ if test -n "$dllsearchpath"; then
+ func_to_host_pathlist "$dllsearchpath:"
+ cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result";
+EOF
+ else
+ cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE = "";
+EOF
+ fi
+
+ if test "$fast_install" = yes; then
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+ else
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+ fi
+
+
+ cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX "--lt-"
+#define LTWRAPPER_OPTION_PREFIX_LENGTH 5
+
+static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH;
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+
+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
+
+static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
+static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set";
+ /* argument is putenv-style "foo=bar", value of foo is set to bar */
+
+static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
+static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend";
+ /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
+
+static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
+static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append";
+ /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int newargc;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *actual_cwrapper_name;
+ char *target_name;
+ char *lt_argv_zero;
+ intptr_t rval = 127;
+
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
+ LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
+
+ /* very simple arg parsing; don't want to rely on getopt */
+ for (i = 1; i < argc; i++)
+ {
+ if (strcmp (argv[i], dumpscript_opt) == 0)
+ {
+EOF
+ case "$host" in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<"EOF"
+ printf ("%s", script_text_part1);
+ printf ("%s", script_text_part2);
+ return 0;
+ }
+ }
+
+ newargz = XMALLOC (char *, argc + 1);
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal ("Couldn't find %s", argv[0]);
+ LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
+ tmp_pathspec));
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
+ actual_cwrapper_path));
+ XFREE (tmp_pathspec);
+
+ actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+ /* wrapper name transforms */
+ strendzap (actual_cwrapper_name, ".exe");
+ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+ XFREE (actual_cwrapper_name);
+ actual_cwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ /* target_name transforms -- use actual target program name; might have lt- prefix */
+ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+ strendzap (target_name, ".exe");
+ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+ XFREE (target_name);
+ target_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
+ target_name));
+EOF
+
+ cat <<EOF
+ newargz[0] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+ strcpy (newargz[0], actual_cwrapper_path);
+ strcat (newargz[0], "$objdir");
+ strcat (newargz[0], "/");
+EOF
+
+ cat <<"EOF"
+ /* stop here, and copy so we don't have to do this twice */
+ tmp_pathspec = xstrdup (newargz[0]);
+
+ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+ strcat (newargz[0], actual_cwrapper_name);
+
+ /* DO want the lt- prefix here if it exists, so use target_name */
+ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+ XFREE (tmp_pathspec);
+ tmp_pathspec = NULL;
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[0], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (target_name);
+ XFREE (actual_cwrapper_path);
+ XFREE (actual_cwrapper_name);
+
+ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+
+ newargc=0;
+ for (i = 1; i < argc; i++)
+ {
+ if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
+ {
+ if (argv[i][env_set_opt_len] == '=')
+ {
+ const char *p = argv[i] + env_set_opt_len + 1;
+ lt_opt_process_env_set (p);
+ }
+ else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
+ {
+ lt_opt_process_env_set (argv[++i]); /* don't copy */
+ }
+ else
+ lt_fatal ("%s missing required argument", env_set_opt);
+ continue;
+ }
+ if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
+ {
+ if (argv[i][env_prepend_opt_len] == '=')
+ {
+ const char *p = argv[i] + env_prepend_opt_len + 1;
+ lt_opt_process_env_prepend (p);
+ }
+ else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
+ {
+ lt_opt_process_env_prepend (argv[++i]); /* don't copy */
+ }
+ else
+ lt_fatal ("%s missing required argument", env_prepend_opt);
+ continue;
+ }
+ if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
+ {
+ if (argv[i][env_append_opt_len] == '=')
+ {
+ const char *p = argv[i] + env_append_opt_len + 1;
+ lt_opt_process_env_append (p);
+ }
+ else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
+ {
+ lt_opt_process_env_append (argv[++i]); /* don't copy */
+ }
+ else
+ lt_fatal ("%s missing required argument", env_append_opt);
+ continue;
+ }
+ if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
+ {
+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+ namespace, but it is not one of the ones we know about and
+ have already dealt with, above (inluding dump-script), then
+ report an error. Otherwise, targets might begin to believe
+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+ namespace. The first time any user complains about this, we'll
+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+ or a configure.ac-settable value.
+ */
+ lt_fatal ("Unrecognized option in %s namespace: '%s'",
+ ltwrapper_option_prefix, argv[i]);
+ }
+ /* otherwise ... */
+ newargz[++newargc] = xstrdup (argv[i]);
+ }
+ newargz[++newargc] = NULL;
+
+ LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
+ for (i = 0; i < newargc; i++)
+ {
+ LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ /* execv doesn't actually work on mingw as expected on unix */
+ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
+ return 127;
+ }
+ return rval;
+EOF
+ ;;
+ *)
+ cat <<"EOF"
+ execv (lt_argv_zero, newargz);
+ return rval; /* =127, but avoids unused variable warning */
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal ("Memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
+ path ? (*path ? path : "EMPTY!") : "NULL!"));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
+ path ? (*path ? path : "EMPTY!") : "NULL!"));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ int tmp_len;
+ char *concat_name;
+
+ LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
+ wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
+ tmp_pathspec));
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ char *errstr = strerror (errno);
+ lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal ("Could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (strcmp (str, pat) == 0)
+ *str = '\0';
+ }
+ return str;
+}
+
+static void
+lt_error_core (int exit_status, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s: %s: ", program_name, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+ va_end (ap);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+ LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
+ (name ? name : "<NULL>"),
+ (value ? value : "<NULL>")));
+ {
+#ifdef HAVE_SETENV
+ /* always make a copy, for consistency with !HAVE_SETENV */
+ char *str = xstrdup (value);
+ setenv (name, str, 1);
+#else
+ int len = strlen (name) + 1 + strlen (value) + 1;
+ char *str = XMALLOC (char, len);
+ sprintf (str, "%s=%s", name, value);
+ if (putenv (str) != EXIT_SUCCESS)
+ {
+ XFREE (str);
+ }
+#endif
+ }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+ char *new_value;
+ if (orig_value && *orig_value)
+ {
+ int orig_value_len = strlen (orig_value);
+ int add_len = strlen (add);
+ new_value = XMALLOC (char, add_len + orig_value_len + 1);
+ if (to_end)
+ {
+ strcpy (new_value, orig_value);
+ strcpy (new_value + orig_value_len, add);
+ }
+ else
+ {
+ strcpy (new_value, add);
+ strcpy (new_value + add_len, orig_value);
+ }
+ }
+ else
+ {
+ new_value = xstrdup (add);
+ }
+ return new_value;
+}
+
+int
+lt_split_name_value (const char *arg, char** name, char** value)
+{
+ const char *p;
+ int len;
+ if (!arg || !*arg)
+ return 1;
+
+ p = strchr (arg, (int)'=');
+
+ if (!p)
+ return 1;
+
+ *value = xstrdup (++p);
+
+ len = strlen (arg) - strlen (*value);
+ *name = XMALLOC (char, len);
+ strncpy (*name, arg, len-1);
+ (*name)[len - 1] = '\0';
+
+ return 0;
+}
+
+void
+lt_opt_process_env_set (const char *arg)
+{
+ char *name = NULL;
+ char *value = NULL;
+
+ if (lt_split_name_value (arg, &name, &value) != 0)
+ {
+ XFREE (name);
+ XFREE (value);
+ lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
+ }
+
+ lt_setenv (name, value);
+ XFREE (name);
+ XFREE (value);
+}
+
+void
+lt_opt_process_env_prepend (const char *arg)
+{
+ char *name = NULL;
+ char *value = NULL;
+ char *new_value = NULL;
+
+ if (lt_split_name_value (arg, &name, &value) != 0)
+ {
+ XFREE (name);
+ XFREE (value);
+ lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
+ }
+
+ new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ XFREE (name);
+ XFREE (value);
+}
+
+void
+lt_opt_process_env_append (const char *arg)
+{
+ char *name = NULL;
+ char *value = NULL;
+ char *new_value = NULL;
+
+ if (lt_split_name_value (arg, &name, &value) != 0)
+ {
+ XFREE (name);
+ XFREE (value);
+ lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
+ }
+
+ new_value = lt_extend_str (getenv (name), value, 1);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ XFREE (name);
+ XFREE (value);
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+ LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+ (name ? name : "<NULL>"),
+ (value ? value : "<NULL>")));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ /* some systems can't cope with a ':'-terminated path #' */
+ int len = strlen (new_value);
+ while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ {
+ new_value[len-1] = '\0';
+ }
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+ LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+ (name ? name : "<NULL>"),
+ (value ? value : "<NULL>")));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $opt_debug
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invocation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
+
+ avoid_version=no
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=no
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module="${wl}-single_module"
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ func_warning "complete static linking is impossible in this configuration"
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ -static)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg="$1"
+ shift
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=yes
+ fi
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" = no; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ else
+ dlprefiles="$dlprefiles $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ test -f "$arg" \
+ || func_fatal_error "symbol file \`$arg' does not exist"
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir="$arg"
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat "$save_arg"`
+ do
+# moreargs="$moreargs $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ done
+ else
+ func_fatal_error "link input file \`$arg' does not exist"
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ if test "$prev" = rpath; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) rpath="$rpath $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) xrpath="$xrpath $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds="$arg"
+ prev=
+ continue
+ ;;
+ weak)
+ weak_libs="$weak_libs $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xlinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $wl$qarg"
+ prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg="$arg"
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
+ fi
+ if test "X$arg" = "X-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ func_stripname '-L' '' "$arg"
+ dir=$func_stripname_result
+ if test -z "$dir"; then
+ if test "$#" -gt 0; then
+ func_fatal_error "require no space between \`-L' and \`$1'"
+ else
+ func_fatal_error "need path for \`-L' option"
+ fi
+ fi
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of \`$dir'"
+ dir="$absdir"
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "*) ;;
+ *)
+ deplibs="$deplibs -L$dir"
+ lib_search_path="$lib_search_path $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ ::) dllsearchpath=$dir;;
+ *) dllsearchpath="$dllsearchpath:$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ deplibs="$deplibs System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
+ esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot)
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module="${wl}-multi_module"
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "\`-no-install' is ignored for $host"
+ func_warning "assuming \`-no-fast-install' instead"
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ continue
+ ;;
+
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ arg="$arg $wl$func_quote_for_eval_result"
+ compiler_flags="$compiler_flags $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ arg="$arg $wl$func_quote_for_eval_result"
+ compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
+ linker_flags="$linker_flags $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+ # -r[0-9][0-9]* specifies the processor on the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+ # +DA*, +DD* enable 64-bit mode on the HP compiler
+ # -q* pass through compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* pass through architecture-specific
+ # compiler args for GCC
+ # -F/path gives path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+ # @file GCC response files
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ compiler_flags="$compiler_flags $arg"
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ *.$objext)
+ # A standard object.
+ objs="$objs $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ deplibs="$deplibs $arg"
+ old_deplibs="$old_deplibs $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ if test "$prev" = dlfiles; then
+ # This library was specified with -dlopen.
+ dlfiles="$dlfiles $arg"
+ prev=
+ elif test "$prev" = dlprefiles; then
+ # The library was specified with -dlpreopen.
+ dlprefiles="$dlprefiles $arg"
+ prev=
+ else
+ deplibs="$deplibs $arg"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+ done # argument parsing loop
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prevarg' option requires an argument"
+
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ func_basename "$output"
+ outputname="$func_basename_result"
+ libobjs_save="$libobjs"
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ func_dirname "$output" "/" ""
+ output_objdir="$func_dirname_result$objdir"
+ # Create the object directory.
+ func_mkdir_p "$output_objdir"
+
+ # Determine the type of output
+ case $output in
+ "")
+ func_fatal_help "you must specify an output file"
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ if $opt_duplicate_deps ; then
+ case "$libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ libs="$libs $deplib"
+ done
+
+ if test "$linkmode" = lib; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if $opt_duplicate_compiler_generated_deps; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+ esac
+ pre_post_deps="$pre_post_deps $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
+ case $linkmode in
+ lib)
+ passes="conv dlpreopen link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=no
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+
+ for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test "$linkmode,$pass" = "lib,link"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs="$tmp_deplibs"
+ fi
+
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan"; then
+ libs="$deplibs"
+ deplibs=
+ fi
+ if test "$linkmode" = prog; then
+ case $pass in
+ dlopen) libs="$dlfiles" ;;
+ dlpreopen) libs="$dlprefiles" ;;
+ link)
+ libs="$deplibs %DEPLIBS%"
+ test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
+ ;;
+ esac
+ fi
+ if test "$linkmode,$pass" = "lib,dlpreopen"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ case $lib in
+ *.la) func_source "$lib" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) deplibs="$deplibs $deplib" ;;
+ esac
+ done
+ done
+ libs="$dlprefiles"
+ fi
+ if test "$pass" = dlopen; then
+ # Collect dlpreopened libraries
+ save_deplibs="$deplibs"
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags $deplib"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -l*)
+ if test "$linkmode" != lib && test "$linkmode" != prog; then
+ func_warning "\`-l' is ignored for archives/objects"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test "$linkmode" = lib; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib="$searchdir/lib${name}${search_ext}"
+ if test -f "$lib"; then
+ if test "$search_ext" = ".la"; then
+ found=yes
+ else
+ found=no
+ fi
+ break 2
+ fi
+ done
+ done
+ if test "$found" != yes; then
+ # deplib doesn't seem to be a libtool library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ else # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll="$l"
+ done
+ if test "X$ll" = "X$old_library" ; then # only static version available
+ found=no
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+ lib=$ladir/$old_library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ fi
+ ;; # -l
+ *.ltframework)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test "$pass" = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ prog)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test "$pass" = scan; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ *)
+ func_warning "\`-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test "$pass" = link; then
+ func_stripname '-R' '' "$deplib"
+ dir=$func_stripname_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la) lib="$deplib" ;;
+ *.$libext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=no
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=yes
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
+ $ECHO
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because the file extensions .$libext of this argument makes me believe"
+ $ECHO "*** that it is just a static archive that I should not use here."
+ else
+ $ECHO
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ prog)
+ if test "$pass" != link; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ elif test "$linkmode" = prog; then
+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ newdlprefiles="$newdlprefiles $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ newdlfiles="$newdlfiles $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=yes
+ continue
+ ;;
+ esac # case $deplib
+
+ if test "$found" = yes || test -f "$lib"; then :
+ else
+ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+ fi
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ inherited_linker_flags=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+
+
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan" ||
+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+ test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+ test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+ fi
+
+ if test "$pass" = conv; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ convenience="$convenience $ladir/$objdir/$old_library"
+ old_convenience="$old_convenience $ladir/$objdir/$old_library"
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+ elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ func_fatal_error "\`$lib' is not a convenience library"
+ fi
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+ if test -z "$linklib"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+
+ # This library was specified with -dlopen.
+ if test "$pass" = dlopen; then
+ if test -z "$libdir"; then
+ func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+ fi
+ if test -z "$dlname" ||
+ test "$dlopen_support" != yes ||
+ test "$build_libtool_libs" = no; then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ dlprefiles="$dlprefiles $lib $dependency_libs"
+ else
+ newdlfiles="$newdlfiles $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ func_warning "cannot determine absolute directory name of \`$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
+ abs_ladir="$ladir"
+ fi
+ ;;
+ esac
+ func_basename "$lib"
+ laname="$func_basename_result"
+
+ # Find the relevant object directory and library name.
+ if test "X$installed" = Xyes; then
+ if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library \`$lib' was moved."
+ dir="$ladir"
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+ dir="$libdir"
+ absdir="$libdir"
+ fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+ else
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir="$ladir"
+ absdir="$abs_ladir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ fi
+ fi # $installed = yes
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
+
+ # This library was specified with -dlpreopen.
+ if test "$pass" = dlpreopen; then
+ if test -z "$libdir" && test "$linkmode" = prog; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+ fi
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ newdlprefiles="$newdlprefiles $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ newdlprefiles="$newdlprefiles $dir/$dlname"
+ else
+ newdlprefiles="$newdlprefiles $dir/$linklib"
+ fi
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test "$linkmode" = lib; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test "$linkmode" = prog && test "$pass" != link; then
+ newlib_search_path="$newlib_search_path $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=no
+ if test "$link_all_deplibs" != no || test -z "$library_names" ||
+ test "$build_libtool_libs" = no; then
+ linkalldeplibs=yes
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ esac
+ # Need to link against all dependency_libs?
+ if test "$linkalldeplibs" = yes; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test "$linkmode,$pass" = "prog,link"; then
+ if test -n "$library_names" &&
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath:" in
+ *"$absdir:"*) ;;
+ *) temp_rpath="$temp_rpath$absdir:" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test "$use_static_libs" = built && test "$installed" = yes; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw* | *cegcc*)
+ # No point in relinking DLLs because paths are not encoded
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=no
+ ;;
+ *)
+ if test "$installed" = no; then
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=""
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule="$dlpremoduletest"
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+ $ECHO
+ if test "$linkmode" = prog; then
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $ECHO "*** $linklib is not portable!"
+ fi
+ if test "$linkmode" = lib &&
+ test "$hardcode_into_libs" = yes; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname="$dlname"
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw* | *cegcc*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot="$soname"
+ func_basename "$soroot"
+ soname="$func_basename_result"
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ func_verbose "extracting exported symbol list from \`$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ func_verbose "generating import library for \`$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test "$linkmode" = prog || test "$mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ add="$dir/$linklib"
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir="-L$dir" ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we can not
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $GREP ": [^:]* bundle" >/dev/null ; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library" ; then
+ $ECHO
+ $ECHO "*** And there doesn't seem to be a static archive available"
+ $ECHO "*** The link will probably fail, sorry"
+ else
+ add="$dir/$old_library"
+ fi
+ elif test -n "$old_library"; then
+ add="$dir/$old_library"
+ fi
+ fi
+ esac
+ elif test "$hardcode_minus_L" = no; then
+ case $host in
+ *-*-sunos*) add_shlibpath="$dir" ;;
+ esac
+ add_dir="-L$dir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$dir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ func_fatal_configuration "unsupported hardcode properties"
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+ esac
+ fi
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test "$hardcode_direct" != yes &&
+ test "$hardcode_minus_L" != yes &&
+ test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test "$linkmode" = prog || test "$mode" = relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ add="-l$name"
+ elif test "$hardcode_automatic" = yes; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then
+ add="$inst_prefix_dir$libdir/$linklib"
+ else
+ add="$libdir/$linklib"
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ fi
+
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test "$linkmode" = prog; then
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test "$hardcode_direct" != unsupported; then
+ test -n "$old_library" && linklib="$old_library"
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test "$build_libtool_libs" = yes; then
+ # Not a shared library
+ if test "$deplibs_check_method" != pass_all; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ $ECHO
+ $ECHO "*** Warning: This system can not link to static lib archive $lib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have."
+ if test "$module" = yes; then
+ $ECHO "*** But as you try to build a module library, libtool will still create "
+ $ECHO "*** a static module, that should work as long as the dlopening application"
+ $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ if test -z "$global_symbol_pipe"; then
+ $ECHO
+ $ECHO "*** However, this would only work if libtool was able to extract symbol"
+ $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $ECHO "*** not find such a program. So, this module is probably useless."
+ $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test "$linkmode" = lib; then
+ if test -n "$dependency_libs" &&
+ { test "$hardcode_into_libs" != yes ||
+ test "$build_old_libs" = yes ||
+ test "$link_static" = yes; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) xrpath="$xrpath $temp_xrpath";;
+ esac;;
+ *) temp_deplibs="$temp_deplibs $libdir";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ newlib_search_path="$newlib_search_path $absdir"
+ # Link against this library
+ test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+
+ if test "$link_all_deplibs" != no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ path=
+ case $deplib in
+ -L*) path="$deplib" ;;
+ *.la)
+ func_dirname "$deplib" "" "."
+ dir="$func_dirname_result"
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ func_warning "cannot determine absolute directory name of \`$dir'"
+ absdir="$dir"
+ fi
+ ;;
+ esac
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ case $host in
+ *-*-darwin*)
+ depdepl=
+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names" ; then
+ for tmp in $deplibrary_names ; do
+ depdepl=$tmp
+ done
+ if test -f "$absdir/$objdir/$depdepl" ; then
+ depdepl="$absdir/$objdir/$depdepl"
+ darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ fi
+ compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+ linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
+ path=
+ fi
+ fi
+ ;;
+ *)
+ path="-L$absdir/$objdir"
+ ;;
+ esac
+ else
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "\`$deplib' seems to be moved"
+
+ path="-L$absdir"
+ fi
+ ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test "$pass" = link; then
+ if test "$linkmode" = "prog"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
+ fi
+ dependency_libs="$newdependency_libs"
+ if test "$pass" = dlpreopen; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test "$pass" != dlopen; then
+ if test "$pass" != conv; then
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) lib_search_path="$lib_search_path $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ fi
+
+ if test "$linkmode,$pass" != "prog,link"; then
+ vars="deplibs"
+ else
+ vars="compile_deplibs finalize_deplibs"
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs ; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=""
+ ;;
+ esac
+ if test -n "$i" ; then
+ tmp_libs="$tmp_libs $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test "$linkmode" = prog; then
+ dlfiles="$newdlfiles"
+ fi
+ if test "$linkmode" = prog || test "$linkmode" = lib; then
+ dlprefiles="$newdlprefiles"
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for archives"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for archives" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for archives"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for archives"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "\`-export-symbols' is ignored for archives"
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs="$output"
+ objs="$objs$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case $outputname in
+ lib*)
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ test "$module" = no && \
+ func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test "$deplibs_check_method" != pass_all; then
+ func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+ else
+ $ECHO
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ libobjs="$libobjs $objs"
+ fi
+ fi
+
+ test "$dlself" != no && \
+ func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+ set dummy $rpath
+ shift
+ test "$#" -gt 1 && \
+ func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+ install_libdir="$1"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ # Some compilers have problems with a `.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for convenience libraries"
+ else
+
+ # Parse the version information argument.
+ save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ shift
+ IFS="$save_ifs"
+
+ test -n "$7" && \
+ func_fatal_help "too many parameters to \`-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major="$1"
+ number_minor="$2"
+ number_revision="$3"
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # which has an extra 1 added just for fun
+ #
+ case $version_type in
+ darwin|linux|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|sunos)
+ current="$number_major"
+ revision="$number_minor"
+ age="0"
+ ;;
+ irix|nonstopux)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_minor"
+ lt_irix_increment=no
+ ;;
+ *)
+ func_fatal_configuration "$modename: unknown library version type \`$version_type'"
+ ;;
+ esac
+ ;;
+ no)
+ current="$1"
+ revision="$2"
+ age="$3"
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "CURRENT \`$current' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $revision in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "REVISION \`$revision' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $age in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "AGE \`$age' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ if test "$age" -gt "$current"; then
+ func_error "AGE \`$age' is greater than the current interface number \`$current'"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ # Darwin ld doesn't like 0 for these options...
+ func_arith $current + 1
+ minor_current=$func_arith_result
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ irix | nonstopux)
+ if test "X$lt_irix_increment" = "Xno"; then
+ func_arith $current - $age
+ else
+ func_arith $current - $age + 1
+ fi
+ major=$func_arith_result
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring="$verstring_prefix$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test "$loop" -ne 0; do
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring_prefix$major.$iface:$verstring"
+ done
+
+ # Before this point, $major must not contain `.'.
+ major=.$major
+ versuffix="$major.$revision"
+ ;;
+
+ linux)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test "$loop" -ne 0; do
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ verstring="$verstring:${current}.0"
+ ;;
+
+ qnx)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 filesystems.
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+
+ *)
+ func_fatal_configuration "unknown library version type \`$version_type'"
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring="0.0"
+ ;;
+ esac
+ if test "$need_version" = no; then
+ versuffix=
+ else
+ versuffix=".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ func_warning "undefined symbols not allowed in $host shared libraries"
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" "yes"
+ libobjs="$libobjs $symfileobj"
+ test "X$libobjs" = "X " && libobjs=
+
+ if test "$mode" != relink; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext | *.gcno)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+ if test "X$precious_files_regex" != "X"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ removelist="$removelist $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
+ # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
+ #done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ temp_xrpath="$temp_xrpath -R$libdir"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles="$dlfiles"
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) dlfiles="$dlfiles $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles="$dlprefiles"
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) dlprefiles="$dlprefiles $lib" ;;
+ esac
+ done
+
+ if test "$build_libtool_libs" = yes; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ deplibs="$deplibs System.ltframework"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test "$build_libtool_need_lc" = "yes"; then
+ deplibs="$deplibs -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $opt_dry_run || $RM conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which I believe you do not have"
+ $ECHO "*** because a test_compile did reveal that the linker did not use it for"
+ $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ ;;
+ *)
+ newdeplibs="$newdeplibs $i"
+ ;;
+ esac
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ ldd_output=`ldd conftest`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because a test_compile did reveal that the linker did not use this one"
+ $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ $ECHO "*** make it link in! You will probably need to install it or some"
+ $ECHO "*** library that it depends on before this library will be fully"
+ $ECHO "*** functional. Installing it before continuing would be even better."
+ fi
+ ;;
+ *)
+ newdeplibs="$newdeplibs $i"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+ *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib="$potent_lib" # see symlink-check above in file_magic test
+ if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=""
+ tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
+ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ for i in $predeps $postdeps ; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
+ done
+ fi
+ if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
+ $GREP . >/dev/null; then
+ $ECHO
+ if test "X$deplibs_check_method" = "Xnone"; then
+ $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ $ECHO "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ $ECHO "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ fi
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ $ECHO
+ $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ $ECHO "*** a static module, that should work as long as the dlopening"
+ $ECHO "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ $ECHO
+ $ECHO "*** However, this would only work if libtool was able to extract symbol"
+ $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $ECHO "*** not find such a program. So, this module is probably useless."
+ $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ $ECHO "*** The inter-library dependencies that have been dropped here will be"
+ $ECHO "*** automatically added whenever a program is linked with this library"
+ $ECHO "*** or is declared to -dlopen it."
+
+ if test "$allow_undefined" = no; then
+ $ECHO
+ $ECHO "*** Since this library must not contain undefined symbols,"
+ $ECHO "*** because either the platform does not support them or"
+ $ECHO "*** it was explicitly requested with -no-undefined,"
+ $ECHO "*** libtool will only create a static version of it."
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ deplibs="$new_libs"
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" = yes; then
+ if test "$hardcode_into_libs" = yes; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath="$finalize_rpath"
+ test "$mode" != relink && rpath="$compile_rpath$rpath"
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ dep_rpath="$dep_rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ if test -n "$hardcode_libdir_flag_spec_ld"; then
+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+ else
+ eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ fi
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath="$finalize_shlibpath"
+ test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib="$output_objdir/$realname"
+ linknames=
+ for link
+ do
+ linknames="$linknames $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols="$output_objdir/$libname.uexp"
+ delfiles="$delfiles $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw* | cegcc*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols="$export_symbols"
+ export_symbols=
+ always_export_symbols=yes
+ fi
+ fi
+ ;;
+ esac
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ func_len " $cmd"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ tmp_deplibs="$tmp_deplibs $test_deplib"
+ ;;
+ esac
+ done
+ deplibs="$tmp_deplibs"
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test "$compiler_needs_object" = yes &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ else
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $convenience
+ libobjs="$libobjs $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ fi
+
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ linker_flags="$linker_flags $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test "$mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test "X$skipped_export" != "X:" &&
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+ output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ last_robj=
+ k=1
+
+ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+ output=${output_objdir}/${output_la}.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ $ECHO 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ $ECHO "$obj" >> $output
+ done
+ $ECHO ')' >> $output
+ delfiles="$delfiles $output"
+ elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+ output=${output_objdir}/${output_la}.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test "$compiler_needs_object" = yes; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ $ECHO "$obj" >> $output
+ done
+ delfiles="$delfiles $output"
+ output=$firstobj\"$file_list_spec$output\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-${k}.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test "X$objlist" = X ||
+ test "$len" -lt "$max_cmd_len"; then
+ func_append objlist " $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test "$k" -eq 1 ; then
+ # The first file doesn't have a previous command to add.
+ eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-${k}.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-${k}.$objext
+ objlist=$obj
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+ fi
+ delfiles="$delfiles $output"
+
+ else
+ output=
+ fi
+
+ if ${skipped_export-false}; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ fi
+
+ test -n "$save_libobjs" &&
+ func_verbose "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS="$save_ifs"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ if ${skipped_export-false}; then
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ fi
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ libobjs="$libobjs $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for objects"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for objects" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for objects"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for objects"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for objects"
+
+ case $output in
+ *.lo)
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $opt_dry_run || $RM $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+ else
+ gentop="$output_objdir/${obj}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # Create the old-style object.
+ reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+ output="$obj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$build_libtool_libs" != yes; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $show "echo timestamp > $libobj"
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
+ fi
+
+ if test -n "$pic_flag" || test "$pic_mode" != default; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output="$libobj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+ fi
+
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for programs"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for programs"
+
+ test "$preload" = yes \
+ && test "$dlopen_support" = unknown \
+ && test "$dlopen_self" = unknown \
+ && test "$dlopen_self_static" = unknown && \
+ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test "$tagname" = CXX ; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ compile_command="$compile_command ${wl}-bind_at_load"
+ finalize_command="$finalize_command ${wl}-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
+ compile_command="$compile_command $compile_deplibs"
+ finalize_command="$finalize_command $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ ::) dllsearchpath=$libdir;;
+ *) dllsearchpath="$dllsearchpath:$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath="$rpath"
+
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ fi
+
+ func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=yes
+ case $host in
+ *cygwin* | *mingw* )
+ if test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ *cegcc)
+ # Disable wrappers for cegcc, we are cross compiling anyway.
+ wrappers_required=no
+ ;;
+ *)
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ esac
+ if test "$wrappers_required" = no; then
+ # Replace the output file specification.
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
+
+ # Delete the generated files.
+ if test -f "$output_objdir/${outputname}S.${objext}"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+ fi
+
+ exit $exit_status
+ fi
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test "$no_install" = yes; then
+ # We don't need to create a wrapper script.
+ link_command="$compile_var$compile_command$compile_rpath"
+ # Replace the output file specification.
+ link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $opt_dry_run || $RM $output
+ # Link the executable and exit
+ func_show_eval "$link_command" 'exit $?'
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "\`$output' will be relinked during installation"
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+
+ # Replace the output file specification.
+ link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
+
+ # Now create the wrapper script.
+ func_verbose "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Quote $ECHO for shipping.
+ if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
+ case $progpath in
+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+ *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+ esac
+ qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
+ else
+ qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # The wrapper executable is built using the $host compiler,
+ # because it contains $host paths and files. If cross-
+ # compiling, it, like the target executable, must be
+ # executed on the $host or under an emulation environment.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
+
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+ $opt_dry_run || {
+ # note: this script will not be executed, so do not chmod.
+ if test "x$build" = "x$host" ; then
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
+ ;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_wrapper no > $output
+ chmod +x $output
+ ;;
+ esac
+ }
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$old_deplibs $non_pic_objects"
+ if test "$preload" = yes && test -f "$symfileobj"; then
+ oldobjs="$oldobjs $symfileobj"
+ fi
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $addlibs
+ oldobjs="$oldobjs $func_extract_archives_result"
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+ cmds=$old_archive_from_new_cmds
+ else
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ oldobjs="$oldobjs $func_extract_archives_result"
+ fi
+
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $ECHO "copying selected object files to avoid basename conflicts..."
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+ func_mkdir_p "$gentop"
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ func_basename "$obj"
+ objbase="$func_basename_result"
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ func_arith $counter + 1
+ counter=$func_arith_result
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ oldobjs="$oldobjs $gentop/$newobj"
+ ;;
+ *) oldobjs="$oldobjs $obj" ;;
+ esac
+ done
+ fi
+ eval cmds=\"$old_archive_cmds\"
+
+ func_len " $cmds"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ func_verbose "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ oldobjs=
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+ for obj in $save_oldobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj" ; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+ objlist=
+ len=$len0
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test "X$oldobjs" = "X" ; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ func_execute_cmds "$cmds" 'exit $?'
+ done
+
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
+ func_verbose "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ if test "$hardcode_automatic" = yes ; then
+ relink_command=
+ fi
+
+ # Only create the output if not a dry run.
+ $opt_dry_run || {
+ for installed in no yes; do
+ if test "$installed" = yes; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output="$output_objdir/$outputname"i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ func_basename "$deplib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ newdependency_libs="$newdependency_libs $libdir/$name"
+ ;;
+ *) newdependency_libs="$newdependency_libs $deplib" ;;
+ esac
+ done
+ dependency_libs="$newdependency_libs"
+ newdlfiles=
+
+ for lib in $dlfiles; do
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ newdlfiles="$newdlfiles $libdir/$name"
+ ;;
+ *) newdlfiles="$newdlfiles $lib" ;;
+ esac
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ newdlprefiles="$newdlprefiles $libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles="$newdlprefiles"
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlfiles="$newdlfiles $abs"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlprefiles="$newdlprefiles $abs"
+ done
+ dlprefiles="$newdlprefiles"
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+ esac
+ $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test "$installed" = no && test "$need_relink" = yes; then
+ $ECHO >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ }
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+}
+
+{ test "$mode" = link || test "$mode" = relink; } &&
+ func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $opt_debug
+ RM="$nonopt"
+ files=
+ rmforce=
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ for arg
+ do
+ case $arg in
+ -f) RM="$RM $arg"; rmforce=yes ;;
+ -*) RM="$RM $arg" ;;
+ *) files="$files $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ origobjdir="$objdir"
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ if test "X$dir" = X.; then
+ objdir="$origobjdir"
+ else
+ objdir="$dir/$origobjdir"
+ fi
+ func_basename "$file"
+ name="$func_basename_result"
+ test "$mode" = uninstall && objdir="$dir"
+
+ # Remember objdir for removal later, being careful to avoid duplicates
+ if test "$mode" = clean; then
+ case " $rmdirs " in
+ *" $objdir "*) ;;
+ *) rmdirs="$rmdirs $objdir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif test "$rmforce" = yes; then
+ continue
+ fi
+
+ rmfiles="$file"
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ rmfiles="$rmfiles $objdir/$n"
+ done
+ test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+
+ case "$mode" in
+ clean)
+ case " $library_names " in
+ # " " in the beginning catches empty $dlname
+ *" $dlname "*) ;;
+ *) rmfiles="$rmfiles $objdir/$dlname" ;;
+ esac
+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+ ;;
+ uninstall)
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ ;;
+ esac
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if func_lalib_p "$file"; then
+
+ # Read the .lo file
+ func_source $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" &&
+ test "$pic_object" != none; then
+ rmfiles="$rmfiles $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" &&
+ test "$non_pic_object" != none; then
+ rmfiles="$rmfiles $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test "$mode" = clean ; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ rmfiles="$rmfiles $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
+
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
+ rmfiles="$rmfiles $objdir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name" ; then
+ rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
+ done
+ objdir="$origobjdir"
+
+ # Try to remove the ${objdir}s in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
+ fi
+ done
+
+ exit $exit_status
+}
+
+{ test "$mode" = uninstall || test "$mode" = clean; } &&
+ func_mode_uninstall ${1+"$@"}
+
+test -z "$mode" && {
+ help="$generic_help"
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode \`$mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
diff --git a/missing b/missing
new file mode 100755
index 0000000..28055d2
--- /dev/null
+++ b/missing
@@ -0,0 +1,376 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program). This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+ lex*|yacc*)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ tar*)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
+ *)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
+ fi
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+ aclocal*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case $f in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te*)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison*|yacc*)
+ echo 1>&2 "\
+WARNING: \`$1' $msg. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if test $# -ne 1; then
+ eval LASTARG="\${$#}"
+ case $LASTARG in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f y.tab.h; then
+ echo >y.tab.h
+ fi
+ if test ! -f y.tab.c; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex*|flex*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if test $# -ne 1; then
+ eval LASTARG="\${$#}"
+ case $LASTARG in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f lex.yy.c; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit $?
+ fi
+ ;;
+
+ makeinfo*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ # The file to touch is that specified with -o ...
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -z "$file"; then
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+ fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
+ touch $file
+ ;;
+
+ tar*)
+ shift
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case $firstarg in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case $firstarg in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequisites for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..5894b20
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,285 @@
+# Process this file with automake to produce Makefile.in
+
+NULL =
+SUBDIRS =
+DIST_SUBDIRS =
+BUILT_SOURCES =
+EXTRA_DIST =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
+
+# The following warning options are useful for debugging: -Wpadded
+#AM_CXXFLAGS =
+
+lib_LTLIBRARIES = libharfbuzz.la
+
+HBCFLAGS =
+HBLIBS =
+HBSOURCES = \
+ hb-atomic-private.hh \
+ hb-blob.cc \
+ hb-buffer-private.hh \
+ hb-buffer.cc \
+ hb-cache-private.hh \
+ hb-common.cc \
+ hb-fallback-shape.cc \
+ hb-font-private.hh \
+ hb-font.cc \
+ hb-mutex-private.hh \
+ hb-object-private.hh \
+ hb-open-file-private.hh \
+ hb-open-type-private.hh \
+ hb-ot-head-table.hh \
+ hb-ot-hhea-table.hh \
+ hb-ot-hmtx-table.hh \
+ hb-ot-maxp-table.hh \
+ hb-ot-name-table.hh \
+ hb-ot-tag.cc \
+ hb-private.hh \
+ hb-set-private.hh \
+ hb-set.cc \
+ hb-shape.cc \
+ hb-shape-plan-private.hh \
+ hb-shape-plan.cc \
+ hb-shape-plan.h \
+ hb-shaper-list.hh \
+ hb-shaper-impl-private.hh \
+ hb-shaper-private.hh \
+ hb-shaper.cc \
+ hb-tt-font.cc \
+ hb-unicode-private.hh \
+ hb-unicode.cc \
+ hb-warning.cc \
+ $(NULL)
+HBHEADERS = \
+ hb.h \
+ hb-blob.h \
+ hb-buffer.h \
+ hb-common.h \
+ hb-font.h \
+ hb-set.h \
+ hb-shape.h \
+ hb-unicode.h \
+ hb-version.h \
+ $(NULL)
+
+if HAVE_OT
+HBSOURCES += \
+ hb-ot-layout.cc \
+ hb-ot-layout-common-private.hh \
+ hb-ot-layout-gdef-table.hh \
+ hb-ot-layout-gpos-table.hh \
+ hb-ot-layout-gsubgpos-private.hh \
+ hb-ot-layout-gsub-table.hh \
+ hb-ot-layout-private.hh \
+ hb-ot-map.cc \
+ hb-ot-map-private.hh \
+ hb-ot-shape.cc \
+ hb-ot-shape-complex-arabic.cc \
+ hb-ot-shape-complex-arabic-table.hh \
+ 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-misc.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 \
+ $(NULL)
+HBHEADERS += \
+ hb-ot.h \
+ hb-ot-layout.h \
+ hb-ot-tag.h \
+ $(NULL)
+endif
+
+if HAVE_GLIB
+HBCFLAGS += $(GLIB_CFLAGS)
+HBLIBS += $(GLIB_LIBS)
+HBSOURCES += hb-glib.cc
+HBHEADERS += hb-glib.h
+endif
+
+if HAVE_GOBJECT
+HBCFLAGS += $(GOBJECT_CFLAGS)
+HBLIBS += $(GOBJECT_LIBS)
+HBSOURCES += hb-gobject-structs.cc
+nodist_HBSOURCES = hb-gobject-enums.cc
+HBHEADERS += hb-gobject.h
+BUILT_SOURCES += hb-gobject-enums.cc
+EXTRA_DIST += hb-gobject-enums.cc.tmpl
+DISTCLEANFILES += hb-gobject-enums.cc
+
+hb-gobject-enums.cc: hb-gobject-enums.cc.tmpl $(HBHEADERS)
+ $(AM_V_GEN) $(GLIB_MKENUMS) --template $^ > "$@.tmp" && \
+ mv "$@.tmp" "$@" || ( $(RM) "@.tmp" && false )
+endif
+
+if HAVE_ICU
+HBCFLAGS += $(ICU_CFLAGS)
+HBLIBS += $(ICU_LIBS)
+HBSOURCES += hb-icu.cc
+HBHEADERS += hb-icu.h
+endif
+
+if HAVE_FREETYPE
+HBCFLAGS += $(FREETYPE_CFLAGS)
+HBLIBS += $(FREETYPE_LIBS)
+HBSOURCES += hb-ft.cc
+HBHEADERS += hb-ft.h
+endif
+
+if HAVE_GRAPHITE2
+HBCFLAGS += $(GRAPHITE2_CFLAGS)
+HBLIBS += $(GRAPHITE2_LIBS)
+HBSOURCES += hb-graphite2.cc
+HBHEADERS += hb-graphite2.h
+endif
+
+if HAVE_UNISCRIBE
+HBCFLAGS += $(UNISCRIBE_CFLAGS)
+HBLIBS += $(UNISCRIBE_LIBS)
+HBSOURCES += hb-uniscribe.cc
+HBHEADERS += hb-uniscribe.h
+endif
+
+if HAVE_CORETEXT
+HBCFLAGS += $(CORETEXT_CFLAGS)
+HBLIBS += $(CORETEXT_LIBS)
+HBSOURCES += hb-coretext.cc
+HBHEADERS += hb-coretext.h
+endif
+
+if HAVE_HB_OLD
+SUBDIRS += hb-old
+HBCFLAGS += -I$(srcdir)/hb-old
+HBLIBS += hb-old/libhb-old.la
+HBSOURCES += hb-old.cc
+endif
+DIST_SUBDIRS += hb-old
+
+
+
+# Put the library together
+
+if OS_WIN32
+export_symbols = -export-symbols harfbuzz.def
+harfbuzz_def_dependency = harfbuzz.def
+endif
+
+# Use a C linker, not C++; Don't link to libstdc++
+libharfbuzz_la_LINK = $(LINK) $(libharfbuzz_la_LDFLAGS)
+libharfbuzz_la_SOURCES = $(HBSOURCES) $(HBHEADERS)
+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)
+libharfbuzz_la_DEPENDENCIES = $(harfbuzz_def_dependency)
+pkginclude_HEADERS = $(HBHEADERS)
+nodist_pkginclude_HEADERS = hb-version.h
+
+CLEANFILES += harfbuzz.def
+harfbuzz.def: $(HBHEADERS)
+ $(AM_V_GEN) (echo EXPORTS; \
+ (cat $^ || echo 'hb_ERROR ()' ) | \
+ $(EGREP) '^hb_.* \(' | \
+ sed -e 's/ (.*//' | \
+ LANG=C sort; \
+ echo LIBRARY libharfbuzz-$(HB_VERSION_MAJOR).dll; \
+ ) >"$@.tmp"
+ @ ! grep -q hb_ERROR "$@.tmp" && mv "$@.tmp" "$@" || ($(RM) "$@"; false)
+
+
+GENERATORS = \
+ gen-arabic-table.py \
+ gen-indic-table.py \
+ $(NULL)
+
+EXTRA_DIST += $(GENERATORS)
+
+unicode-tables: arabic-table indic-table
+
+indic-table: gen-indic-table.py IndicSyllabicCategory.txt IndicMatraCategory.txt Blocks.txt
+ $(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-indic-table.hh.tmp && \
+ mv hb-ot-shape-complex-indic-table.hh.tmp $(srcdir)/hb-ot-shape-complex-indic-table.hh || \
+ ($(RM) hb-ot-shape-complex-indic-table.hh.tmp; false)
+
+arabic-table: gen-arabic-table.py ArabicShaping.txt UnicodeData.txt
+ $(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-arabic-table.hh.tmp && \
+ mv hb-ot-shape-complex-arabic-table.hh.tmp $(srcdir)/hb-ot-shape-complex-arabic-table.hh || \
+ ($(RM) hb-ot-shape-complex-arabic-table.hh.tmp; false)
+
+
+.PHONY: unicode-tables arabic-table indic-table
+
+BUILT_SOURCES += hb-ot-shape-complex-indic-machine.hh
+EXTRA_DIST += hb-ot-shape-complex-indic-machine.rl
+hb-ot-shape-complex-indic-machine.hh: hb-ot-shape-complex-indic-machine.rl
+ $(AM_V_GEN)$(top_srcdir)/missing --run ragel -e -F1 -o "$@.tmp" "$<" && \
+ mv "$@.tmp" "$@" || ( $(RM) "$@.tmp" && false )
+
+noinst_PROGRAMS = main indic test-would-substitute
+bin_PROGRAMS =
+
+main_SOURCES = main.cc
+main_CPPFLAGS = $(HBCFLAGS)
+main_LDADD = libharfbuzz.la $(HBLIBS)
+
+indic_SOURCES = indic.cc
+indic_CPPFLAGS = $(HBCFLAGS)
+indic_LDADD = libharfbuzz.la $(HBLIBS)
+
+test_would_substitute_SOURCES = test-would-substitute.cc
+test_would_substitute_CPPFLAGS = $(HBCFLAGS) $(FREETYPE_CFLAGS)
+test_would_substitute_LDADD = libharfbuzz.la $(HBLIBS) $(FREETYPE_LIBS)
+
+dist_check_SCRIPTS = \
+ check-c-linkage-decls.sh \
+ check-header-guards.sh \
+ check-exported-symbols.sh \
+ check-includes.sh \
+ check-internal-symbols.sh \
+ check-static-inits.sh \
+ $(NULL)
+
+if HAVE_ICU
+else
+dist_check_SCRIPTS += check-libstdc++.sh
+endif
+
+TESTS = $(dist_check_SCRIPTS)
+TESTS_ENVIRONMENT = \
+ srcdir="$(srcdir)" \
+ MAKE="$(MAKE) $(AM_MAKEFLAGS)" \
+ HBSOURCES="$(HBSOURCES)" \
+ HBHEADERS="$(HBHEADERS)" \
+ $(NULL)
+
+#-include $(INTROSPECTION_MAKEFILE)
+#INTROSPECTION_GIRS = hb-1.0.gir
+#INTROSPECTION_SCANNER_ARGS = -I$(srcdir) -n hb --identifier-prefix=hb_
+#INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+#
+#if HAVE_INTROSPECTION
+#
+#hb-1.0.gir: libharfbuzz.la
+#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)
+#
+#girdir = $(datadir)/gir-1.0
+#gir_DATA = $(INTROSPECTION_GIRS)
+#
+#typelibdir = $(libdir)/girepository-1.0
+#typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+#
+#CLEANFILES += $(gir_DATA) $(typelib_DATA)
+#endif
+
+-include $(top_srcdir)/git.mk
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..fb755d6
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,1604 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Process this file with automake to produce Makefile.in
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@HAVE_OT_TRUE@am__append_1 = \
+@HAVE_OT_TRUE@ hb-ot-layout.cc \
+@HAVE_OT_TRUE@ hb-ot-layout-common-private.hh \
+@HAVE_OT_TRUE@ hb-ot-layout-gdef-table.hh \
+@HAVE_OT_TRUE@ hb-ot-layout-gpos-table.hh \
+@HAVE_OT_TRUE@ hb-ot-layout-gsubgpos-private.hh \
+@HAVE_OT_TRUE@ hb-ot-layout-gsub-table.hh \
+@HAVE_OT_TRUE@ hb-ot-layout-private.hh \
+@HAVE_OT_TRUE@ hb-ot-map.cc \
+@HAVE_OT_TRUE@ hb-ot-map-private.hh \
+@HAVE_OT_TRUE@ hb-ot-shape.cc \
+@HAVE_OT_TRUE@ hb-ot-shape-complex-arabic.cc \
+@HAVE_OT_TRUE@ hb-ot-shape-complex-arabic-table.hh \
+@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-misc.cc \
+@HAVE_OT_TRUE@ hb-ot-shape-complex-private.hh \
+@HAVE_OT_TRUE@ hb-ot-shape-normalize-private.hh \
+@HAVE_OT_TRUE@ hb-ot-shape-normalize.cc \
+@HAVE_OT_TRUE@ hb-ot-shape-fallback-private.hh \
+@HAVE_OT_TRUE@ hb-ot-shape-fallback.cc \
+@HAVE_OT_TRUE@ hb-ot-shape-private.hh \
+@HAVE_OT_TRUE@ $(NULL)
+
+@HAVE_OT_TRUE@am__append_2 = \
+@HAVE_OT_TRUE@ hb-ot.h \
+@HAVE_OT_TRUE@ hb-ot-layout.h \
+@HAVE_OT_TRUE@ hb-ot-tag.h \
+@HAVE_OT_TRUE@ $(NULL)
+
+@HAVE_GLIB_TRUE@am__append_3 = $(GLIB_CFLAGS)
+@HAVE_GLIB_TRUE@am__append_4 = $(GLIB_LIBS)
+@HAVE_GLIB_TRUE@am__append_5 = hb-glib.cc
+@HAVE_GLIB_TRUE@am__append_6 = hb-glib.h
+@HAVE_GOBJECT_TRUE@am__append_7 = $(GOBJECT_CFLAGS)
+@HAVE_GOBJECT_TRUE@am__append_8 = $(GOBJECT_LIBS)
+@HAVE_GOBJECT_TRUE@am__append_9 = hb-gobject-structs.cc
+@HAVE_GOBJECT_TRUE@am__append_10 = hb-gobject.h
+@HAVE_GOBJECT_TRUE@am__append_11 = hb-gobject-enums.cc
+@HAVE_GOBJECT_TRUE@am__append_12 = hb-gobject-enums.cc.tmpl
+@HAVE_GOBJECT_TRUE@am__append_13 = hb-gobject-enums.cc
+@HAVE_ICU_TRUE@am__append_14 = $(ICU_CFLAGS)
+@HAVE_ICU_TRUE@am__append_15 = $(ICU_LIBS)
+@HAVE_ICU_TRUE@am__append_16 = hb-icu.cc
+@HAVE_ICU_TRUE@am__append_17 = hb-icu.h
+@HAVE_FREETYPE_TRUE@am__append_18 = $(FREETYPE_CFLAGS)
+@HAVE_FREETYPE_TRUE@am__append_19 = $(FREETYPE_LIBS)
+@HAVE_FREETYPE_TRUE@am__append_20 = hb-ft.cc
+@HAVE_FREETYPE_TRUE@am__append_21 = hb-ft.h
+@HAVE_GRAPHITE2_TRUE@am__append_22 = $(GRAPHITE2_CFLAGS)
+@HAVE_GRAPHITE2_TRUE@am__append_23 = $(GRAPHITE2_LIBS)
+@HAVE_GRAPHITE2_TRUE@am__append_24 = hb-graphite2.cc
+@HAVE_GRAPHITE2_TRUE@am__append_25 = hb-graphite2.h
+@HAVE_UNISCRIBE_TRUE@am__append_26 = $(UNISCRIBE_CFLAGS)
+@HAVE_UNISCRIBE_TRUE@am__append_27 = $(UNISCRIBE_LIBS)
+@HAVE_UNISCRIBE_TRUE@am__append_28 = hb-uniscribe.cc
+@HAVE_UNISCRIBE_TRUE@am__append_29 = hb-uniscribe.h
+@HAVE_CORETEXT_TRUE@am__append_30 = $(CORETEXT_CFLAGS)
+@HAVE_CORETEXT_TRUE@am__append_31 = $(CORETEXT_LIBS)
+@HAVE_CORETEXT_TRUE@am__append_32 = hb-coretext.cc
+@HAVE_CORETEXT_TRUE@am__append_33 = hb-coretext.h
+@HAVE_HB_OLD_TRUE@am__append_34 = hb-old
+@HAVE_HB_OLD_TRUE@am__append_35 = -I$(srcdir)/hb-old
+@HAVE_HB_OLD_TRUE@am__append_36 = hb-old/libhb-old.la
+@HAVE_HB_OLD_TRUE@am__append_37 = hb-old.cc
+noinst_PROGRAMS = main$(EXEEXT) indic$(EXEEXT) \
+ test-would-substitute$(EXEEXT)
+bin_PROGRAMS =
+@HAVE_ICU_FALSE@am__append_38 = check-libstdc++.sh
+TESTS = $(am__EXEEXT_2)
+subdir = src
+DIST_COMMON = $(am__dist_check_SCRIPTS_DIST) \
+ $(am__pkginclude_HEADERS_DIST) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/hb-version.h.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = hb-version.h
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
+ "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+@HAVE_GLIB_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
+@HAVE_GOBJECT_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1)
+@HAVE_ICU_TRUE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1)
+@HAVE_FREETYPE_TRUE@am__DEPENDENCIES_5 = $(am__DEPENDENCIES_1)
+@HAVE_GRAPHITE2_TRUE@am__DEPENDENCIES_6 = $(am__DEPENDENCIES_1)
+@HAVE_UNISCRIBE_TRUE@am__DEPENDENCIES_7 = $(am__DEPENDENCIES_1)
+@HAVE_CORETEXT_TRUE@am__DEPENDENCIES_8 = $(am__DEPENDENCIES_1)
+am__DEPENDENCIES_9 = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_5) \
+ $(am__DEPENDENCIES_6) $(am__DEPENDENCIES_7) \
+ $(am__DEPENDENCIES_8) $(am__append_36)
+am__libharfbuzz_la_SOURCES_DIST = hb-atomic-private.hh hb-blob.cc \
+ hb-buffer-private.hh hb-buffer.cc hb-cache-private.hh \
+ hb-common.cc hb-fallback-shape.cc hb-font-private.hh \
+ hb-font.cc hb-mutex-private.hh hb-object-private.hh \
+ hb-open-file-private.hh hb-open-type-private.hh \
+ hb-ot-head-table.hh hb-ot-hhea-table.hh hb-ot-hmtx-table.hh \
+ hb-ot-maxp-table.hh hb-ot-name-table.hh hb-ot-tag.cc \
+ hb-private.hh hb-set-private.hh hb-set.cc hb-shape.cc \
+ hb-shape-plan-private.hh hb-shape-plan.cc hb-shape-plan.h \
+ hb-shaper-list.hh hb-shaper-impl-private.hh \
+ hb-shaper-private.hh hb-shaper.cc hb-tt-font.cc \
+ hb-unicode-private.hh hb-unicode.cc hb-warning.cc \
+ hb-ot-layout.cc hb-ot-layout-common-private.hh \
+ hb-ot-layout-gdef-table.hh hb-ot-layout-gpos-table.hh \
+ hb-ot-layout-gsubgpos-private.hh hb-ot-layout-gsub-table.hh \
+ hb-ot-layout-private.hh hb-ot-map.cc hb-ot-map-private.hh \
+ hb-ot-shape.cc hb-ot-shape-complex-arabic.cc \
+ hb-ot-shape-complex-arabic-table.hh \
+ 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-misc.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.h hb-blob.h hb-buffer.h \
+ hb-common.h hb-font.h hb-set.h hb-shape.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
+am__objects_1 =
+@HAVE_OT_TRUE@am__objects_2 = libharfbuzz_la-hb-ot-layout.lo \
+@HAVE_OT_TRUE@ libharfbuzz_la-hb-ot-map.lo \
+@HAVE_OT_TRUE@ libharfbuzz_la-hb-ot-shape.lo \
+@HAVE_OT_TRUE@ libharfbuzz_la-hb-ot-shape-complex-arabic.lo \
+@HAVE_OT_TRUE@ libharfbuzz_la-hb-ot-shape-complex-indic.lo \
+@HAVE_OT_TRUE@ libharfbuzz_la-hb-ot-shape-complex-misc.lo \
+@HAVE_OT_TRUE@ libharfbuzz_la-hb-ot-shape-normalize.lo \
+@HAVE_OT_TRUE@ libharfbuzz_la-hb-ot-shape-fallback.lo \
+@HAVE_OT_TRUE@ $(am__objects_1)
+@HAVE_GLIB_TRUE@am__objects_3 = libharfbuzz_la-hb-glib.lo
+@HAVE_GOBJECT_TRUE@am__objects_4 = \
+@HAVE_GOBJECT_TRUE@ libharfbuzz_la-hb-gobject-structs.lo
+@HAVE_ICU_TRUE@am__objects_5 = libharfbuzz_la-hb-icu.lo
+@HAVE_FREETYPE_TRUE@am__objects_6 = libharfbuzz_la-hb-ft.lo
+@HAVE_GRAPHITE2_TRUE@am__objects_7 = libharfbuzz_la-hb-graphite2.lo
+@HAVE_UNISCRIBE_TRUE@am__objects_8 = libharfbuzz_la-hb-uniscribe.lo
+@HAVE_CORETEXT_TRUE@am__objects_9 = libharfbuzz_la-hb-coretext.lo
+@HAVE_HB_OLD_TRUE@am__objects_10 = libharfbuzz_la-hb-old.lo
+am__objects_11 = libharfbuzz_la-hb-blob.lo libharfbuzz_la-hb-buffer.lo \
+ libharfbuzz_la-hb-common.lo \
+ libharfbuzz_la-hb-fallback-shape.lo libharfbuzz_la-hb-font.lo \
+ libharfbuzz_la-hb-ot-tag.lo libharfbuzz_la-hb-set.lo \
+ libharfbuzz_la-hb-shape.lo libharfbuzz_la-hb-shape-plan.lo \
+ libharfbuzz_la-hb-shaper.lo libharfbuzz_la-hb-tt-font.lo \
+ libharfbuzz_la-hb-unicode.lo libharfbuzz_la-hb-warning.lo \
+ $(am__objects_1) $(am__objects_2) $(am__objects_3) \
+ $(am__objects_4) $(am__objects_5) $(am__objects_6) \
+ $(am__objects_7) $(am__objects_8) $(am__objects_9) \
+ $(am__objects_10)
+@HAVE_OT_TRUE@am__objects_12 = $(am__objects_1)
+am__objects_13 = $(am__objects_1) $(am__objects_12) $(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_11) $(am__objects_13)
+@HAVE_GOBJECT_TRUE@am__objects_14 = \
+@HAVE_GOBJECT_TRUE@ libharfbuzz_la-hb-gobject-enums.lo
+nodist_libharfbuzz_la_OBJECTS = $(am__objects_14)
+libharfbuzz_la_OBJECTS = $(am_libharfbuzz_la_OBJECTS) \
+ $(nodist_libharfbuzz_la_OBJECTS)
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+am_indic_OBJECTS = indic-indic.$(OBJEXT)
+indic_OBJECTS = $(am_indic_OBJECTS)
+indic_DEPENDENCIES = libharfbuzz.la $(am__DEPENDENCIES_9)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am_main_OBJECTS = main-main.$(OBJEXT)
+main_OBJECTS = $(am_main_OBJECTS)
+main_DEPENDENCIES = libharfbuzz.la $(am__DEPENDENCIES_9)
+am_test_would_substitute_OBJECTS = \
+ test_would_substitute-test-would-substitute.$(OBJEXT)
+test_would_substitute_OBJECTS = $(am_test_would_substitute_OBJECTS)
+test_would_substitute_DEPENDENCIES = libharfbuzz.la \
+ $(am__DEPENDENCIES_9) $(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-static-inits.sh check-libstdc++.sh
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(libharfbuzz_la_SOURCES) $(nodist_libharfbuzz_la_SOURCES) \
+ $(indic_SOURCES) $(main_SOURCES) \
+ $(test_would_substitute_SOURCES)
+DIST_SOURCES = $(am__libharfbuzz_la_SOURCES_DIST) $(indic_SOURCES) \
+ $(main_SOURCES) $(test_would_substitute_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ 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-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
+HEADERS = $(nodist_pkginclude_HEADERS) $(pkginclude_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+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 check-static-inits.sh \
+ $(am__EXEEXT_1) $(am__append_38)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FT_CFLAGS = @CAIRO_FT_CFLAGS@
+CAIRO_FT_LIBS = @CAIRO_FT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CORETEXT_CFLAGS = @CORETEXT_CFLAGS@
+CORETEXT_LIBS = @CORETEXT_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GRAPHITE2_CFLAGS = @GRAPHITE2_CFLAGS@
+GRAPHITE2_LIBS = @GRAPHITE2_LIBS@
+GREP = @GREP@
+GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
+GTHREAD_LIBS = @GTHREAD_LIBS@
+HB_LIBTOOL_VERSION_INFO = @HB_LIBTOOL_VERSION_INFO@
+HB_VERSION = @HB_VERSION@
+HB_VERSION_MAJOR = @HB_VERSION_MAJOR@
+HB_VERSION_MICRO = @HB_VERSION_MICRO@
+HB_VERSION_MINOR = @HB_VERSION_MINOR@
+ICU_CFLAGS = @ICU_CFLAGS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UNISCRIBE_CFLAGS = @UNISCRIBE_CFLAGS@
+UNISCRIBE_LIBS = @UNISCRIBE_LIBS@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+SUBDIRS = $(am__append_34)
+DIST_SUBDIRS = hb-old
+BUILT_SOURCES = $(am__append_11) hb-ot-shape-complex-indic-machine.hh
+EXTRA_DIST = $(am__append_12) $(GENERATORS) \
+ hb-ot-shape-complex-indic-machine.rl
+CLEANFILES = harfbuzz.def
+DISTCLEANFILES = $(am__append_13)
+MAINTAINERCLEANFILES =
+DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
+
+# The following warning options are useful for debugging: -Wpadded
+#AM_CXXFLAGS =
+lib_LTLIBRARIES = libharfbuzz.la
+HBCFLAGS = $(am__append_3) $(am__append_7) $(am__append_14) \
+ $(am__append_18) $(am__append_22) $(am__append_26) \
+ $(am__append_30) $(am__append_35)
+HBLIBS = $(am__append_4) $(am__append_8) $(am__append_15) \
+ $(am__append_19) $(am__append_23) $(am__append_27) \
+ $(am__append_31) $(am__append_36)
+HBSOURCES = hb-atomic-private.hh hb-blob.cc hb-buffer-private.hh \
+ hb-buffer.cc hb-cache-private.hh hb-common.cc \
+ hb-fallback-shape.cc hb-font-private.hh hb-font.cc \
+ hb-mutex-private.hh hb-object-private.hh \
+ hb-open-file-private.hh hb-open-type-private.hh \
+ hb-ot-head-table.hh hb-ot-hhea-table.hh hb-ot-hmtx-table.hh \
+ hb-ot-maxp-table.hh hb-ot-name-table.hh hb-ot-tag.cc \
+ hb-private.hh hb-set-private.hh hb-set.cc hb-shape.cc \
+ hb-shape-plan-private.hh hb-shape-plan.cc hb-shape-plan.h \
+ hb-shaper-list.hh hb-shaper-impl-private.hh \
+ hb-shaper-private.hh hb-shaper.cc hb-tt-font.cc \
+ hb-unicode-private.hh hb-unicode.cc hb-warning.cc $(NULL) \
+ $(am__append_1) $(am__append_5) $(am__append_9) \
+ $(am__append_16) $(am__append_20) $(am__append_24) \
+ $(am__append_28) $(am__append_32) $(am__append_37)
+HBHEADERS = hb.h hb-blob.h hb-buffer.h hb-common.h hb-font.h hb-set.h \
+ hb-shape.h hb-unicode.h hb-version.h $(NULL) $(am__append_2) \
+ $(am__append_6) $(am__append_10) $(am__append_17) \
+ $(am__append_21) $(am__append_25) $(am__append_29) \
+ $(am__append_33)
+@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++
+libharfbuzz_la_LINK = $(LINK) $(libharfbuzz_la_LDFLAGS)
+libharfbuzz_la_SOURCES = $(HBSOURCES) $(HBHEADERS)
+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)
+libharfbuzz_la_DEPENDENCIES = $(harfbuzz_def_dependency)
+pkginclude_HEADERS = $(HBHEADERS)
+nodist_pkginclude_HEADERS = hb-version.h
+GENERATORS = \
+ gen-arabic-table.py \
+ gen-indic-table.py \
+ $(NULL)
+
+main_SOURCES = main.cc
+main_CPPFLAGS = $(HBCFLAGS)
+main_LDADD = libharfbuzz.la $(HBLIBS)
+indic_SOURCES = indic.cc
+indic_CPPFLAGS = $(HBCFLAGS)
+indic_LDADD = libharfbuzz.la $(HBLIBS)
+test_would_substitute_SOURCES = test-would-substitute.cc
+test_would_substitute_CPPFLAGS = $(HBCFLAGS) $(FREETYPE_CFLAGS)
+test_would_substitute_LDADD = libharfbuzz.la $(HBLIBS) $(FREETYPE_LIBS)
+dist_check_SCRIPTS = check-c-linkage-decls.sh check-header-guards.sh \
+ check-exported-symbols.sh check-includes.sh \
+ check-internal-symbols.sh check-static-inits.sh $(NULL) \
+ $(am__append_38)
+TESTS_ENVIRONMENT = \
+ srcdir="$(srcdir)" \
+ MAKE="$(MAKE) $(AM_MAKEFLAGS)" \
+ HBSOURCES="$(HBSOURCES)" \
+ HBHEADERS="$(HBHEADERS)" \
+ $(NULL)
+
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits src/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnits src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+hb-version.h: $(top_builddir)/config.status $(srcdir)/hb-version.h.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libharfbuzz.la: $(libharfbuzz_la_OBJECTS) $(libharfbuzz_la_DEPENDENCIES)
+ $(AM_V_GEN)$(libharfbuzz_la_LINK) -rpath $(libdir) $(libharfbuzz_la_OBJECTS) $(libharfbuzz_la_LIBADD) $(LIBS)
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+installcheck-binPROGRAMS: $(bin_PROGRAMS)
+ bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \
+ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
+ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
+ esac; \
+ f=`echo "$$p" | \
+ sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ for opt in --help --version; do \
+ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \
+ 2>c$${pid}_.err </dev/null \
+ && test -n "`cat c$${pid}_.out`" \
+ && test -z "`cat c$${pid}_.err`"; then :; \
+ else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
+ done; \
+ done; rm -f c$${pid}_.???; exit $$bad
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+indic$(EXEEXT): $(indic_OBJECTS) $(indic_DEPENDENCIES)
+ @rm -f indic$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(indic_OBJECTS) $(indic_LDADD) $(LIBS)
+main$(EXEEXT): $(main_OBJECTS) $(main_DEPENDENCIES)
+ @rm -f main$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(main_OBJECTS) $(main_LDADD) $(LIBS)
+test-would-substitute$(EXEEXT): $(test_would_substitute_OBJECTS) $(test_would_substitute_DEPENDENCIES)
+ @rm -f test-would-substitute$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(test_would_substitute_OBJECTS) $(test_would_substitute_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indic-indic.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-blob.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-buffer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-common.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-coretext.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-fallback-shape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-font.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-ft.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-glib.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-gobject-enums.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-gobject-structs.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-graphite2.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-icu.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-old.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-ot-layout.Plo@am__quote@
+@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-indic.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-misc.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@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-ot-shape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-ot-tag.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-set.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-shape-plan.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-shape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-shaper.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-tt-font.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-unicode.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-uniscribe.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libharfbuzz_la-hb-warning.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main-main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_would_substitute-test-would-substitute.Po@am__quote@
+
+.cc.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+libharfbuzz_la-hb-blob.lo: hb-blob.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-blob.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-blob.Tpo -c -o libharfbuzz_la-hb-blob.lo `test -f 'hb-blob.cc' || echo '$(srcdir)/'`hb-blob.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-blob.Tpo $(DEPDIR)/libharfbuzz_la-hb-blob.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-blob.cc' object='libharfbuzz_la-hb-blob.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-blob.lo `test -f 'hb-blob.cc' || echo '$(srcdir)/'`hb-blob.cc
+
+libharfbuzz_la-hb-buffer.lo: hb-buffer.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-buffer.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-buffer.Tpo -c -o libharfbuzz_la-hb-buffer.lo `test -f 'hb-buffer.cc' || echo '$(srcdir)/'`hb-buffer.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-buffer.Tpo $(DEPDIR)/libharfbuzz_la-hb-buffer.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-buffer.cc' object='libharfbuzz_la-hb-buffer.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-buffer.lo `test -f 'hb-buffer.cc' || echo '$(srcdir)/'`hb-buffer.cc
+
+libharfbuzz_la-hb-common.lo: hb-common.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-common.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-common.Tpo -c -o libharfbuzz_la-hb-common.lo `test -f 'hb-common.cc' || echo '$(srcdir)/'`hb-common.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-common.Tpo $(DEPDIR)/libharfbuzz_la-hb-common.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-common.cc' object='libharfbuzz_la-hb-common.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-common.lo `test -f 'hb-common.cc' || echo '$(srcdir)/'`hb-common.cc
+
+libharfbuzz_la-hb-fallback-shape.lo: hb-fallback-shape.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-fallback-shape.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-fallback-shape.Tpo -c -o libharfbuzz_la-hb-fallback-shape.lo `test -f 'hb-fallback-shape.cc' || echo '$(srcdir)/'`hb-fallback-shape.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-fallback-shape.Tpo $(DEPDIR)/libharfbuzz_la-hb-fallback-shape.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-fallback-shape.cc' object='libharfbuzz_la-hb-fallback-shape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-fallback-shape.lo `test -f 'hb-fallback-shape.cc' || echo '$(srcdir)/'`hb-fallback-shape.cc
+
+libharfbuzz_la-hb-font.lo: hb-font.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-font.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-font.Tpo -c -o libharfbuzz_la-hb-font.lo `test -f 'hb-font.cc' || echo '$(srcdir)/'`hb-font.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-font.Tpo $(DEPDIR)/libharfbuzz_la-hb-font.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-font.cc' object='libharfbuzz_la-hb-font.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-font.lo `test -f 'hb-font.cc' || echo '$(srcdir)/'`hb-font.cc
+
+libharfbuzz_la-hb-ot-tag.lo: hb-ot-tag.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-tag.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-ot-tag.Tpo -c -o libharfbuzz_la-hb-ot-tag.lo `test -f 'hb-ot-tag.cc' || echo '$(srcdir)/'`hb-ot-tag.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-ot-tag.Tpo $(DEPDIR)/libharfbuzz_la-hb-ot-tag.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-ot-tag.cc' object='libharfbuzz_la-hb-ot-tag.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-tag.lo `test -f 'hb-ot-tag.cc' || echo '$(srcdir)/'`hb-ot-tag.cc
+
+libharfbuzz_la-hb-set.lo: hb-set.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-set.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-set.Tpo -c -o libharfbuzz_la-hb-set.lo `test -f 'hb-set.cc' || echo '$(srcdir)/'`hb-set.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-set.Tpo $(DEPDIR)/libharfbuzz_la-hb-set.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-set.cc' object='libharfbuzz_la-hb-set.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-set.lo `test -f 'hb-set.cc' || echo '$(srcdir)/'`hb-set.cc
+
+libharfbuzz_la-hb-shape.lo: hb-shape.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-shape.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-shape.Tpo -c -o libharfbuzz_la-hb-shape.lo `test -f 'hb-shape.cc' || echo '$(srcdir)/'`hb-shape.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-shape.Tpo $(DEPDIR)/libharfbuzz_la-hb-shape.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-shape.cc' object='libharfbuzz_la-hb-shape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-shape.lo `test -f 'hb-shape.cc' || echo '$(srcdir)/'`hb-shape.cc
+
+libharfbuzz_la-hb-shape-plan.lo: hb-shape-plan.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-shape-plan.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-shape-plan.Tpo -c -o libharfbuzz_la-hb-shape-plan.lo `test -f 'hb-shape-plan.cc' || echo '$(srcdir)/'`hb-shape-plan.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-shape-plan.Tpo $(DEPDIR)/libharfbuzz_la-hb-shape-plan.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-shape-plan.cc' object='libharfbuzz_la-hb-shape-plan.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-shape-plan.lo `test -f 'hb-shape-plan.cc' || echo '$(srcdir)/'`hb-shape-plan.cc
+
+libharfbuzz_la-hb-shaper.lo: hb-shaper.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-shaper.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-shaper.Tpo -c -o libharfbuzz_la-hb-shaper.lo `test -f 'hb-shaper.cc' || echo '$(srcdir)/'`hb-shaper.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-shaper.Tpo $(DEPDIR)/libharfbuzz_la-hb-shaper.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-shaper.cc' object='libharfbuzz_la-hb-shaper.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-shaper.lo `test -f 'hb-shaper.cc' || echo '$(srcdir)/'`hb-shaper.cc
+
+libharfbuzz_la-hb-tt-font.lo: hb-tt-font.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-tt-font.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-tt-font.Tpo -c -o libharfbuzz_la-hb-tt-font.lo `test -f 'hb-tt-font.cc' || echo '$(srcdir)/'`hb-tt-font.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-tt-font.Tpo $(DEPDIR)/libharfbuzz_la-hb-tt-font.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-tt-font.cc' object='libharfbuzz_la-hb-tt-font.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-tt-font.lo `test -f 'hb-tt-font.cc' || echo '$(srcdir)/'`hb-tt-font.cc
+
+libharfbuzz_la-hb-unicode.lo: hb-unicode.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-unicode.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-unicode.Tpo -c -o libharfbuzz_la-hb-unicode.lo `test -f 'hb-unicode.cc' || echo '$(srcdir)/'`hb-unicode.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-unicode.Tpo $(DEPDIR)/libharfbuzz_la-hb-unicode.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-unicode.cc' object='libharfbuzz_la-hb-unicode.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-unicode.lo `test -f 'hb-unicode.cc' || echo '$(srcdir)/'`hb-unicode.cc
+
+libharfbuzz_la-hb-warning.lo: hb-warning.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-warning.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-warning.Tpo -c -o libharfbuzz_la-hb-warning.lo `test -f 'hb-warning.cc' || echo '$(srcdir)/'`hb-warning.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-warning.Tpo $(DEPDIR)/libharfbuzz_la-hb-warning.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-warning.cc' object='libharfbuzz_la-hb-warning.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-warning.lo `test -f 'hb-warning.cc' || echo '$(srcdir)/'`hb-warning.cc
+
+libharfbuzz_la-hb-ot-layout.lo: hb-ot-layout.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-layout.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-ot-layout.Tpo -c -o libharfbuzz_la-hb-ot-layout.lo `test -f 'hb-ot-layout.cc' || echo '$(srcdir)/'`hb-ot-layout.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-ot-layout.Tpo $(DEPDIR)/libharfbuzz_la-hb-ot-layout.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-ot-layout.cc' object='libharfbuzz_la-hb-ot-layout.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-layout.lo `test -f 'hb-ot-layout.cc' || echo '$(srcdir)/'`hb-ot-layout.cc
+
+libharfbuzz_la-hb-ot-map.lo: hb-ot-map.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-map.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-ot-map.Tpo -c -o libharfbuzz_la-hb-ot-map.lo `test -f 'hb-ot-map.cc' || echo '$(srcdir)/'`hb-ot-map.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-ot-map.Tpo $(DEPDIR)/libharfbuzz_la-hb-ot-map.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-ot-map.cc' object='libharfbuzz_la-hb-ot-map.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-map.lo `test -f 'hb-ot-map.cc' || echo '$(srcdir)/'`hb-ot-map.cc
+
+libharfbuzz_la-hb-ot-shape.lo: hb-ot-shape.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.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-ot-shape.Tpo -c -o libharfbuzz_la-hb-ot-shape.lo `test -f 'hb-ot-shape.cc' || echo '$(srcdir)/'`hb-ot-shape.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-ot-shape.Tpo $(DEPDIR)/libharfbuzz_la-hb-ot-shape.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-ot-shape.cc' object='libharfbuzz_la-hb-ot-shape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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.lo `test -f 'hb-ot-shape.cc' || echo '$(srcdir)/'`hb-ot-shape.cc
+
+libharfbuzz_la-hb-ot-shape-complex-arabic.lo: hb-ot-shape-complex-arabic.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-arabic.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-arabic.Tpo -c -o libharfbuzz_la-hb-ot-shape-complex-arabic.lo `test -f 'hb-ot-shape-complex-arabic.cc' || echo '$(srcdir)/'`hb-ot-shape-complex-arabic.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-arabic.Tpo $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-arabic.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-ot-shape-complex-arabic.cc' object='libharfbuzz_la-hb-ot-shape-complex-arabic.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-arabic.lo `test -f 'hb-ot-shape-complex-arabic.cc' || echo '$(srcdir)/'`hb-ot-shape-complex-arabic.cc
+
+libharfbuzz_la-hb-ot-shape-complex-indic.lo: hb-ot-shape-complex-indic.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.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-indic.Tpo -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
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-indic.Tpo $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-indic.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-ot-shape-complex-indic.cc' object='libharfbuzz_la-hb-ot-shape-complex-indic.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-misc.lo: hb-ot-shape-complex-misc.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-misc.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-misc.Tpo -c -o libharfbuzz_la-hb-ot-shape-complex-misc.lo `test -f 'hb-ot-shape-complex-misc.cc' || echo '$(srcdir)/'`hb-ot-shape-complex-misc.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-misc.Tpo $(DEPDIR)/libharfbuzz_la-hb-ot-shape-complex-misc.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-ot-shape-complex-misc.cc' object='libharfbuzz_la-hb-ot-shape-complex-misc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-misc.lo `test -f 'hb-ot-shape-complex-misc.cc' || echo '$(srcdir)/'`hb-ot-shape-complex-misc.cc
+
+libharfbuzz_la-hb-ot-shape-normalize.lo: hb-ot-shape-normalize.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-normalize.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-ot-shape-normalize.Tpo -c -o libharfbuzz_la-hb-ot-shape-normalize.lo `test -f 'hb-ot-shape-normalize.cc' || echo '$(srcdir)/'`hb-ot-shape-normalize.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-ot-shape-normalize.Tpo $(DEPDIR)/libharfbuzz_la-hb-ot-shape-normalize.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-ot-shape-normalize.cc' object='libharfbuzz_la-hb-ot-shape-normalize.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-normalize.lo `test -f 'hb-ot-shape-normalize.cc' || echo '$(srcdir)/'`hb-ot-shape-normalize.cc
+
+libharfbuzz_la-hb-ot-shape-fallback.lo: hb-ot-shape-fallback.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-fallback.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-ot-shape-fallback.Tpo -c -o libharfbuzz_la-hb-ot-shape-fallback.lo `test -f 'hb-ot-shape-fallback.cc' || echo '$(srcdir)/'`hb-ot-shape-fallback.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-ot-shape-fallback.Tpo $(DEPDIR)/libharfbuzz_la-hb-ot-shape-fallback.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-ot-shape-fallback.cc' object='libharfbuzz_la-hb-ot-shape-fallback.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-fallback.lo `test -f 'hb-ot-shape-fallback.cc' || echo '$(srcdir)/'`hb-ot-shape-fallback.cc
+
+libharfbuzz_la-hb-glib.lo: hb-glib.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-glib.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-glib.Tpo -c -o libharfbuzz_la-hb-glib.lo `test -f 'hb-glib.cc' || echo '$(srcdir)/'`hb-glib.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-glib.Tpo $(DEPDIR)/libharfbuzz_la-hb-glib.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-glib.cc' object='libharfbuzz_la-hb-glib.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-glib.lo `test -f 'hb-glib.cc' || echo '$(srcdir)/'`hb-glib.cc
+
+libharfbuzz_la-hb-gobject-structs.lo: hb-gobject-structs.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-gobject-structs.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-gobject-structs.Tpo -c -o libharfbuzz_la-hb-gobject-structs.lo `test -f 'hb-gobject-structs.cc' || echo '$(srcdir)/'`hb-gobject-structs.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-gobject-structs.Tpo $(DEPDIR)/libharfbuzz_la-hb-gobject-structs.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-gobject-structs.cc' object='libharfbuzz_la-hb-gobject-structs.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-gobject-structs.lo `test -f 'hb-gobject-structs.cc' || echo '$(srcdir)/'`hb-gobject-structs.cc
+
+libharfbuzz_la-hb-icu.lo: hb-icu.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-icu.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-icu.Tpo -c -o libharfbuzz_la-hb-icu.lo `test -f 'hb-icu.cc' || echo '$(srcdir)/'`hb-icu.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-icu.Tpo $(DEPDIR)/libharfbuzz_la-hb-icu.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-icu.cc' object='libharfbuzz_la-hb-icu.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-icu.lo `test -f 'hb-icu.cc' || echo '$(srcdir)/'`hb-icu.cc
+
+libharfbuzz_la-hb-ft.lo: hb-ft.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-ft.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-ft.Tpo -c -o libharfbuzz_la-hb-ft.lo `test -f 'hb-ft.cc' || echo '$(srcdir)/'`hb-ft.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-ft.Tpo $(DEPDIR)/libharfbuzz_la-hb-ft.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-ft.cc' object='libharfbuzz_la-hb-ft.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-ft.lo `test -f 'hb-ft.cc' || echo '$(srcdir)/'`hb-ft.cc
+
+libharfbuzz_la-hb-graphite2.lo: hb-graphite2.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-graphite2.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-graphite2.Tpo -c -o libharfbuzz_la-hb-graphite2.lo `test -f 'hb-graphite2.cc' || echo '$(srcdir)/'`hb-graphite2.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-graphite2.Tpo $(DEPDIR)/libharfbuzz_la-hb-graphite2.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-graphite2.cc' object='libharfbuzz_la-hb-graphite2.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-graphite2.lo `test -f 'hb-graphite2.cc' || echo '$(srcdir)/'`hb-graphite2.cc
+
+libharfbuzz_la-hb-uniscribe.lo: hb-uniscribe.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-uniscribe.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-uniscribe.Tpo -c -o libharfbuzz_la-hb-uniscribe.lo `test -f 'hb-uniscribe.cc' || echo '$(srcdir)/'`hb-uniscribe.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-uniscribe.Tpo $(DEPDIR)/libharfbuzz_la-hb-uniscribe.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-uniscribe.cc' object='libharfbuzz_la-hb-uniscribe.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-uniscribe.lo `test -f 'hb-uniscribe.cc' || echo '$(srcdir)/'`hb-uniscribe.cc
+
+libharfbuzz_la-hb-coretext.lo: hb-coretext.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-coretext.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-coretext.Tpo -c -o libharfbuzz_la-hb-coretext.lo `test -f 'hb-coretext.cc' || echo '$(srcdir)/'`hb-coretext.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-coretext.Tpo $(DEPDIR)/libharfbuzz_la-hb-coretext.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-coretext.cc' object='libharfbuzz_la-hb-coretext.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-coretext.lo `test -f 'hb-coretext.cc' || echo '$(srcdir)/'`hb-coretext.cc
+
+libharfbuzz_la-hb-old.lo: hb-old.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-old.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-old.Tpo -c -o libharfbuzz_la-hb-old.lo `test -f 'hb-old.cc' || echo '$(srcdir)/'`hb-old.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-old.Tpo $(DEPDIR)/libharfbuzz_la-hb-old.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-old.cc' object='libharfbuzz_la-hb-old.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-old.lo `test -f 'hb-old.cc' || echo '$(srcdir)/'`hb-old.cc
+
+libharfbuzz_la-hb-gobject-enums.lo: hb-gobject-enums.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-gobject-enums.lo -MD -MP -MF $(DEPDIR)/libharfbuzz_la-hb-gobject-enums.Tpo -c -o libharfbuzz_la-hb-gobject-enums.lo `test -f 'hb-gobject-enums.cc' || echo '$(srcdir)/'`hb-gobject-enums.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libharfbuzz_la-hb-gobject-enums.Tpo $(DEPDIR)/libharfbuzz_la-hb-gobject-enums.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hb-gobject-enums.cc' object='libharfbuzz_la-hb-gobject-enums.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(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-gobject-enums.lo `test -f 'hb-gobject-enums.cc' || echo '$(srcdir)/'`hb-gobject-enums.cc
+
+indic-indic.o: indic.cc
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(indic_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT indic-indic.o -MD -MP -MF $(DEPDIR)/indic-indic.Tpo -c -o indic-indic.o `test -f 'indic.cc' || echo '$(srcdir)/'`indic.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indic-indic.Tpo $(DEPDIR)/indic-indic.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='indic.cc' object='indic-indic.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(indic_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o indic-indic.o `test -f 'indic.cc' || echo '$(srcdir)/'`indic.cc
+
+indic-indic.obj: indic.cc
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(indic_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT indic-indic.obj -MD -MP -MF $(DEPDIR)/indic-indic.Tpo -c -o indic-indic.obj `if test -f 'indic.cc'; then $(CYGPATH_W) 'indic.cc'; else $(CYGPATH_W) '$(srcdir)/indic.cc'; fi`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indic-indic.Tpo $(DEPDIR)/indic-indic.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='indic.cc' object='indic-indic.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(indic_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o indic-indic.obj `if test -f 'indic.cc'; then $(CYGPATH_W) 'indic.cc'; else $(CYGPATH_W) '$(srcdir)/indic.cc'; fi`
+
+main-main.o: main.cc
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT main-main.o -MD -MP -MF $(DEPDIR)/main-main.Tpo -c -o main-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/main-main.Tpo $(DEPDIR)/main-main.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='main.cc' object='main-main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o main-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+
+main-main.obj: main.cc
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT main-main.obj -MD -MP -MF $(DEPDIR)/main-main.Tpo -c -o main-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/main-main.Tpo $(DEPDIR)/main-main.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='main.cc' object='main-main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(main_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o main-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+
+test_would_substitute-test-would-substitute.o: test-would-substitute.cc
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_would_substitute_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test_would_substitute-test-would-substitute.o -MD -MP -MF $(DEPDIR)/test_would_substitute-test-would-substitute.Tpo -c -o test_would_substitute-test-would-substitute.o `test -f 'test-would-substitute.cc' || echo '$(srcdir)/'`test-would-substitute.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_would_substitute-test-would-substitute.Tpo $(DEPDIR)/test_would_substitute-test-would-substitute.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test-would-substitute.cc' object='test_would_substitute-test-would-substitute.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_would_substitute_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test_would_substitute-test-would-substitute.o `test -f 'test-would-substitute.cc' || echo '$(srcdir)/'`test-would-substitute.cc
+
+test_would_substitute-test-would-substitute.obj: test-would-substitute.cc
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_would_substitute_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test_would_substitute-test-would-substitute.obj -MD -MP -MF $(DEPDIR)/test_would_substitute-test-would-substitute.Tpo -c -o test_would_substitute-test-would-substitute.obj `if test -f 'test-would-substitute.cc'; then $(CYGPATH_W) 'test-would-substitute.cc'; else $(CYGPATH_W) '$(srcdir)/test-would-substitute.cc'; fi`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_would_substitute-test-would-substitute.Tpo $(DEPDIR)/test_would_substitute-test-would-substitute.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test-would-substitute.cc' object='test_would_substitute-test-would-substitute.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_would_substitute_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test_would_substitute-test-would-substitute.obj `if test -f 'test-would-substitute.cc'; then $(CYGPATH_W) 'test-would-substitute.cc'; else $(CYGPATH_W) '$(srcdir)/test-would-substitute.cc'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-nodist_pkgincludeHEADERS: $(nodist_pkginclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
+ @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
+ done
+
+uninstall-nodist_pkgincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files
+install-pkgincludeHEADERS: $(pkginclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
+ @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
+ done
+
+uninstall-pkgincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ echo "$$grn$$dashes"; \
+ else \
+ echo "$$red$$dashes"; \
+ fi; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes$$std"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(dist_check_SCRIPTS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
+install-binPROGRAMS: install-libLTLIBRARIES
+
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
+ clean-libtool clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-nodist_pkgincludeHEADERS \
+ install-pkgincludeHEADERS
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am: installcheck-binPROGRAMS
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES \
+ uninstall-nodist_pkgincludeHEADERS uninstall-pkgincludeHEADERS
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
+ check-am ctags-recursive install install-am install-strip \
+ tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-TESTS check-am clean clean-binPROGRAMS \
+ clean-generic clean-libLTLIBRARIES clean-libtool \
+ clean-noinstPROGRAMS ctags ctags-recursive distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-binPROGRAMS install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-libLTLIBRARIES install-man \
+ install-nodist_pkgincludeHEADERS install-pdf install-pdf-am \
+ install-pkgincludeHEADERS install-ps install-ps-am \
+ install-strip installcheck installcheck-am \
+ installcheck-binPROGRAMS installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-libLTLIBRARIES \
+ uninstall-nodist_pkgincludeHEADERS uninstall-pkgincludeHEADERS
+
+
+@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)
+ $(AM_V_GEN) (echo EXPORTS; \
+ (cat $^ || echo 'hb_ERROR ()' ) | \
+ $(EGREP) '^hb_.* \(' | \
+ sed -e 's/ (.*//' | \
+ LANG=C sort; \
+ echo LIBRARY libharfbuzz-$(HB_VERSION_MAJOR).dll; \
+ ) >"$@.tmp"
+ @ ! grep -q hb_ERROR "$@.tmp" && mv "$@.tmp" "$@" || ($(RM) "$@"; false)
+
+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)
+
+arabic-table: gen-arabic-table.py ArabicShaping.txt UnicodeData.txt
+ $(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-arabic-table.hh.tmp && \
+ mv hb-ot-shape-complex-arabic-table.hh.tmp $(srcdir)/hb-ot-shape-complex-arabic-table.hh || \
+ ($(RM) hb-ot-shape-complex-arabic-table.hh.tmp; false)
+
+.PHONY: unicode-tables arabic-table indic-table
+hb-ot-shape-complex-indic-machine.hh: hb-ot-shape-complex-indic-machine.rl
+ $(AM_V_GEN)$(top_srcdir)/missing --run ragel -e -F1 -o "$@.tmp" "$<" && \
+ mv "$@.tmp" "$@" || ( $(RM) "$@.tmp" && false )
+
+#-include $(INTROSPECTION_MAKEFILE)
+#INTROSPECTION_GIRS = hb-1.0.gir
+#INTROSPECTION_SCANNER_ARGS = -I$(srcdir) -n hb --identifier-prefix=hb_
+#INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+#
+#if HAVE_INTROSPECTION
+#
+#hb-1.0.gir: libharfbuzz.la
+#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)
+#
+#girdir = $(datadir)/gir-1.0
+#gir_DATA = $(INTROSPECTION_GIRS)
+#
+#typelibdir = $(libdir)/girepository-1.0
+#typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+#
+#CLEANFILES += $(gir_DATA) $(typelib_DATA)
+#endif
+
+-include $(top_srcdir)/git.mk
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/check-c-linkage-decls.sh b/src/check-c-linkage-decls.sh
new file mode 100755
index 0000000..44cdfa0
--- /dev/null
+++ b/src/check-c-linkage-decls.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+LC_ALL=C
+export LC_ALL
+
+test -z "$srcdir" && srcdir=.
+stat=0
+
+test "x$HBHEADERS" = x && HBHEADERS=`find . -maxdepth 1 -name 'hb*.h'`
+test "x$HBSOURCES" = x && HBSOURCES=`find . -maxdepth 1 -name 'hb*.h'`
+
+
+for x in $HBHEADERS; do
+ test -f $srcdir/$x && x=$srcdir/$x
+ if ! grep -q HB_BEGIN_DECLS "$x" || ! grep -q HB_END_DECLS "$x"; then
+ echo "Ouch, file $x does not have HB_BEGIN_DECLS / HB_END_DECLS, but it should"
+ stat=1
+ fi
+done
+for x in $HBSOURCES; do
+ test -f $srcdir/$x && x=$srcdir/$x
+ if grep -q HB_BEGIN_DECLS "$x" || grep -q HB_END_DECLS "$x"; then
+ echo "Ouch, file $x has HB_BEGIN_DECLS / HB_END_DECLS, but it shouldn't"
+ stat=1
+ fi
+done
+
+exit $stat
diff --git a/src/check-exported-symbols.sh b/src/check-exported-symbols.sh
new file mode 100755
index 0000000..a7d6f9b
--- /dev/null
+++ b/src/check-exported-symbols.sh
@@ -0,0 +1,40 @@
+#!/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\>' | 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 --git a/src/check-header-guards.sh b/src/check-header-guards.sh
new file mode 100755
index 0000000..af9fa7f
--- /dev/null
+++ b/src/check-header-guards.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+LC_ALL=C
+export LC_ALL
+
+test -z "$srcdir" && srcdir=.
+stat=0
+
+test "x$HBHEADERS" = x && HBHEADERS=`find . -maxdepth 1 -name 'hb*.h'`
+test "x$HBSOURCES" = x && HBSOURCES=`find . -maxdepth 1 -name 'hb-*.cc' -or -name 'hb-*.hh'`
+
+
+for x in $HBHEADERS $HBSOURCES; do
+ test -f "$srcdir/$x" && x="$srcdir/$x"
+ echo "$x" | grep '[^h]$' -q && continue;
+ xx=`echo "$x" | sed 's@.*/@@'`
+ tag=`echo "$xx" | tr 'a-z.-' 'A-Z_'`
+ lines=`grep "\<$tag\>" "$x" | wc -l | sed 's/[ ]*//g'`
+ if test "x$lines" != x3; then
+ echo "Ouch, header file $x does not have correct preprocessor guards"
+ stat=1
+ fi
+done
+
+exit $stat
diff --git a/src/check-includes.sh b/src/check-includes.sh
new file mode 100755
index 0000000..79323a7
--- /dev/null
+++ b/src/check-includes.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+LC_ALL=C
+export LC_ALL
+
+test -z "$srcdir" && srcdir=.
+stat=0
+
+test "x$HBHEADERS" = x && HBHEADERS=`find . -maxdepth 1 -name 'hb*.h'`
+test "x$HBSOURCES" = x && HBSOURCES=`find . -maxdepth 1 -name 'hb-*.cc' -or -name 'hb-*.hh'`
+
+
+cd "$srcdir"
+
+
+echo 'Checking that public header files #include "hb-common.h" or "hb.h" first (or none)'
+
+for x in $HBHEADERS; do
+ grep '#.*\<include\>' "$x" /dev/null | head -n 1
+done |
+grep -v '"hb-common[.]h"' |
+grep -v '"hb[.]h"' |
+grep -v 'hb-common[.]h:' |
+grep -v 'hb[.]h:' |
+grep . >&2 && stat=1
+
+
+echo 'Checking that source files #include "hb-*private.hh" first (or none)'
+
+for x in $HBSOURCES; do
+ grep '#.*\<include\>' "$x" /dev/null | head -n 1
+done |
+grep -v '"hb-.*private[.]hh"' |
+grep -v 'hb-private[.]hh:' |
+grep . >&2 && stat=1
+
+
+echo 'Checking that there is no #include <hb.*.h>'
+grep '#.*\<include\>.*<.*hb' $HBHEADERS $HBSOURCES >&2 && stat=1
+
+
+exit $stat
diff --git a/src/check-internal-symbols.sh b/src/check-internal-symbols.sh
new file mode 100755
index 0000000..f48d144
--- /dev/null
+++ b/src/check-internal-symbols.sh
@@ -0,0 +1,34 @@
+#!/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_'; then
+ echo "Ouch, internal symbols exposed"
+ stat=1
+ fi
+ tested=true
+ fi
+done
+if ! $tested; then
+ echo "check-internal-symbols.sh: libharfbuzz shared library not found; skipping test"
+ exit 77
+fi
+
+exit $stat
diff --git a/src/check-libstdc++.sh b/src/check-libstdc++.sh
new file mode 100755
index 0000000..0521532
--- /dev/null
+++ b/src/check-libstdc++.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+LC_ALL=C
+export LC_ALL
+
+test -z "$srcdir" && srcdir=.
+stat=0
+
+
+if which ldd 2>/dev/null >/dev/null; then
+ :
+else
+ echo "check-libstdc++.sh: 'ldd' not found; skipping test"
+ exit 77
+fi
+
+tested=false
+for suffix in so dylib; do
+ so=.libs/libharfbuzz.$suffix
+ if test -f "$so"; then
+ echo "Checking that we are not linking to libstdc++"
+ if ldd $so | grep 'libstdc[+][+]'; then
+ echo "Ouch, linked to libstdc++"
+ stat=1
+ fi
+ tested=true
+ fi
+done
+if ! $tested; then
+ echo "check-internal-symbols.sh: libharfbuzz shared library not found; skipping test"
+ exit 77
+fi
+
+exit $stat
diff --git a/src/check-static-inits.sh b/src/check-static-inits.sh
new file mode 100755
index 0000000..1eceb1b
--- /dev/null
+++ b/src/check-static-inits.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+LC_ALL=C
+export LC_ALL
+
+test -z "$srcdir" && srcdir=.
+stat=0
+
+
+if which objdump 2>/dev/null >/dev/null; then
+ :
+else
+ echo "check-static-inits.sh: 'objdump' not found; skipping test"
+ exit 77
+fi
+
+OBJS=.libs/*.o
+if test "x`echo $OBJS`" = "x$OBJS" 2>/dev/null >/dev/null; then
+ echo "check-static-inits.sh: object files not found; skipping test"
+ exit 77
+fi
+
+echo "Checking that no object file has static initializers"
+for obj in $OBJS; do
+ if objdump -t "$obj" | grep '[.]ctors'; then
+ echo "Ouch, $obj has static initializers"
+ stat=1
+ fi
+done
+
+echo "Checking that no object file has lazy static C++ constructors/destructors"
+for obj in $OBJS; do
+ if objdump -t "$obj" | grep '__c'; then
+ echo "Ouch, $obj has lazy static C++ constructors/destructors"
+ stat=1
+ fi
+done
+
+exit $stat
diff --git a/src/gen-arabic-table.py b/src/gen-arabic-table.py
new file mode 100755
index 0000000..2d3c881
--- /dev/null
+++ b/src/gen-arabic-table.py
@@ -0,0 +1,197 @@
+#!/usr/bin/python
+
+import sys
+import os.path
+
+if len (sys.argv) != 3:
+ print >>sys.stderr, "usage: ./gen-arabic-table.py ArabicShaping.txt UnicodeData.txt"
+ sys.exit (1)
+
+files = [file (x) for x in sys.argv[1:]]
+
+headers = [[files[0].readline (), files[0].readline ()]]
+headers.append (["UnicodeData.txt does not have a header."])
+while files[0].readline ().find ('##################') < 0:
+ pass
+
+
+def print_joining_table(f):
+
+ print
+ print "static const uint8_t joining_table[] ="
+ print "{"
+
+ min_u = 0x110000
+ max_u = 0
+ num = 0
+ last = -1
+ block = ''
+ for line in f:
+
+ if line[0] == '#':
+ if line.find (" characters"):
+ block = line[2:].strip ()
+ continue
+
+ fields = [x.strip () for x in line.split (';')]
+ if len (fields) == 1:
+ continue
+
+ u = int (fields[0], 16)
+ if u == 0x200C or u == 0x200D:
+ continue
+ if u < last:
+ raise Exception ("Input data character not sorted", u)
+ min_u = min (min_u, u)
+ max_u = max (max_u, u)
+ num += 1
+
+ if block:
+ print "\n /* %s */\n" % block
+ block = ''
+
+ if last != -1:
+ last += 1
+ while last < u:
+ print " JOINING_TYPE_X, /* %04X */" % last
+ last += 1
+ else:
+ last = u
+
+ if fields[3] in ["ALAPH", "DALATH RISH"]:
+ value = "JOINING_GROUP_" + fields[3].replace(' ', '_')
+ else:
+ value = "JOINING_TYPE_" + fields[2]
+ print " %s, /* %s */" % (value, '; '.join(fields))
+
+ print
+ print "};"
+ print
+ print "#define JOINING_TABLE_FIRST 0x%04X" % min_u
+ print "#define JOINING_TABLE_LAST 0x%04X" % max_u
+ print
+
+ occupancy = num * 100 / (max_u - min_u + 1)
+ # Maintain at least 40% occupancy in the table */
+ if occupancy < 40:
+ raise Exception ("Table too sparse, please investigate: ", occupancy)
+
+def print_shaping_table(f):
+
+ shapes = {}
+ ligatures = {}
+ names = {}
+ for line in f:
+
+ fields = [x.strip () for x in line.split (';')]
+ if fields[5][0:1] != '<':
+ continue
+
+ items = fields[5].split (' ')
+ shape, items = items[0][1:-1], tuple (int (x, 16) for x in items[1:])
+
+ if not shape in ['initial', 'medial', 'isolated', 'final']:
+ continue
+
+ c = int (fields[0], 16)
+ if len (items) != 1:
+ # We only care about lam-alef ligatures
+ if len (items) != 2 or items[0] != 0x0644 or items[1] not in [0x0622, 0x0623, 0x0625, 0x0627]:
+ continue
+
+ # Save ligature
+ names[c] = fields[1]
+ if items not in ligatures:
+ ligatures[items] = {}
+ ligatures[items][shape] = c
+ pass
+ else:
+ # Save shape
+ if items[0] not in names:
+ names[items[0]] = fields[1]
+ else:
+ names[items[0]] = os.path.commonprefix ([names[items[0]], fields[1]]).strip ()
+ if items[0] not in shapes:
+ shapes[items[0]] = {}
+ shapes[items[0]][shape] = c
+
+ print
+ print "static const uint16_t shaping_table[][4] ="
+ print "{"
+
+ keys = shapes.keys ()
+ min_u, max_u = min (keys), max (keys)
+ for u in range (min_u, max_u + 1):
+ s = [shapes[u][shape] if u in shapes and shape in shapes[u] else u
+ for shape in ['initial', 'medial', 'final', 'isolated']]
+ value = ', '.join ("0x%04X" % c for c in s)
+ print " {%s}, /* U+%04X %s */" % (value, u, names[u] if u in names else "")
+
+ print "};"
+ print
+ print "#define SHAPING_TABLE_FIRST 0x%04X" % min_u
+ print "#define SHAPING_TABLE_LAST 0x%04X" % max_u
+ print
+
+ ligas = {}
+ for pair in ligatures.keys ():
+ for shape in ligatures[pair]:
+ c = ligatures[pair][shape]
+ if shape == 'isolated':
+ liga = (shapes[pair[0]]['initial'], shapes[pair[1]]['final'])
+ elif shape == 'final':
+ liga = (shapes[pair[0]]['medial'], shapes[pair[1]]['final'])
+ else:
+ raise Exception ("Unexpected shape", shape)
+ if liga[0] not in ligas:
+ ligas[liga[0]] = []
+ ligas[liga[0]].append ((liga[1], c))
+ max_i = max (len (ligas[l]) for l in ligas)
+ print
+ print "static const struct {"
+ print " uint16_t first;"
+ print " struct {"
+ print " uint16_t second;"
+ print " uint16_t ligature;"
+ print " } ligatures[%d];" % max_i
+ print "} ligature_table[] ="
+ print "{"
+ keys = ligas.keys ()
+ keys.sort ()
+ for first in keys:
+
+ print " { 0x%04X, {" % (first)
+ for liga in ligas[first]:
+ print " { 0x%04X, 0x%04X }, /* %s */" % (liga[0], liga[1], names[liga[1]])
+ print " }},"
+
+ print "};"
+ print
+
+
+
+print "/* == Start of generated table == */"
+print "/*"
+print " * The following table is generated by running:"
+print " *"
+print " * ./gen-arabic-table.py ArabicShaping.txt UnicodeData.txt"
+print " *"
+print " * on files with these headers:"
+print " *"
+for h in headers:
+ for l in h:
+ print " * %s" % (l.strip())
+print " */"
+print
+print "#ifndef HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH"
+print "#define HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH"
+print
+
+print_joining_table (files[0])
+print_shaping_table (files[1])
+
+print
+print "#endif /* HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH */"
+print
+print "/* == End of generated table == */"
+
diff --git a/src/gen-indic-table.py b/src/gen-indic-table.py
new file mode 100755
index 0000000..94aa2ab
--- /dev/null
+++ b/src/gen-indic-table.py
@@ -0,0 +1,211 @@
+#!/usr/bin/python
+
+import sys
+
+if len (sys.argv) != 4:
+ print >>sys.stderr, "usage: ./gen-indic-table.py IndicSyllabicCategory.txt IndicMatraCategory.txt Blocks.txt"
+ sys.exit (1)
+
+files = [file (x) for x in sys.argv[1:]]
+
+headers = [[f.readline () for i in range (2)] for f in files]
+
+blocks = {}
+data = [{} for f in files]
+values = [{} for f in files]
+for i, f in enumerate (files):
+ for line in f:
+
+ j = line.find ('#')
+ if j >= 0:
+ line = line[:j]
+
+ fields = [x.strip () for x in line.split (';')]
+ if len (fields) == 1:
+ continue
+
+ uu = fields[0].split ('..')
+ start = int (uu[0], 16)
+ if len (uu) == 1:
+ end = start
+ else:
+ end = int (uu[1], 16)
+
+ t = fields[1]
+
+ for u in range (start, end + 1):
+ data[i][u] = t
+ values[i][t] = values[i].get (t, 0) + 1
+
+ if i == 2:
+ blocks[t] = (start, end)
+
+# Merge data into one dict:
+defaults = ('Other', 'Not_Applicable', 'No_Block')
+for i,v in enumerate (defaults):
+ values[i][v] = values[i].get (v, 0) + 1
+combined = {}
+for i,d in enumerate (data):
+ for u,v in d.items ():
+ if i == 2 and not u in combined:
+ continue
+ if not u in combined:
+ combined[u] = list (defaults)
+ combined[u][i] = v
+data = combined
+del combined
+num = len (data)
+
+# Move the outliers NO-BREAK SPACE and DOTTED CIRCLE out
+singles = {}
+for u in [0x00A0, 0x25CC]:
+ singles[u] = data[u]
+ del data[u]
+
+print "/* == Start of generated table == */"
+print "/*"
+print " * The following table is generated by running:"
+print " *"
+print " * ./gen-indic-table.py IndicSyllabicCategory.txt IndicMatraCategory.txt Blocks.txt"
+print " *"
+print " * on files with these headers:"
+print " *"
+for h in headers:
+ for l in h:
+ 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
+
+# Shorten values
+short = [{
+ "Bindu": 'Bi',
+ "Visarga": 'Vs',
+ "Vowel": 'Vo',
+ "Vowel_Dependent": 'M',
+ "Other": 'x',
+},{
+ "Not_Applicable": 'x',
+}]
+all_shorts = [[],[]]
+
+# Add some of the values, to make them more readable, and to avoid duplicates
+
+
+for i in range (2):
+ for v,s in short[i].items ():
+ all_shorts[i].append (s)
+
+what = ["INDIC_SYLLABIC_CATEGORY", "INDIC_MATRA_CATEGORY"]
+what_short = ["ISC", "IMC"]
+for i in range (2):
+ print
+ vv = values[i].keys ()
+ vv.sort ()
+ for v in vv:
+ v_no_and = v.replace ('_And_', '_')
+ if v in short[i]:
+ s = short[i][v]
+ else:
+ s = ''.join ([c for c in v_no_and if ord ('A') <= ord (c) <= ord ('Z')])
+ if s in all_shorts[i]:
+ raise Exception ("Duplicate short value alias", v, s)
+ all_shorts[i].append (s)
+ short[i][v] = s
+ print "#define %s_%s %s_%s %s/* %3d chars; %s */" % \
+ (what_short[i], s, what[i], v.upper (), \
+ ' '* ((48-1 - len (what[i]) - 1 - len (v)) / 8), \
+ values[i][v], v)
+print
+print "#define _(S,M) INDIC_COMBINE_CATEGORIES (ISC_##S, IMC_##M)"
+print
+print
+
+total = 0
+used = 0
+def print_block (block, start, end, data):
+ print
+ print
+ print " /* %s (%04X..%04X) */" % (block, start, end)
+ num = 0
+ for u in range (start, end+1):
+ if u % 8 == 0:
+ print
+ print " /* %04X */" % u,
+ if u in data:
+ num += 1
+ d = data.get (u, defaults)
+ sys.stdout.write ("%9s" % ("_(%s,%s)," % (short[0][d[0]], short[1][d[1]])))
+
+ global total, used
+ total += end - start + 1
+ used += num
+
+uu = data.keys ()
+uu.sort ()
+
+last = -1
+num = 0
+offset = 0
+starts = []
+ends = []
+print "static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = {"
+for u in uu:
+ if u <= last:
+ continue
+ block = data[u][2]
+ (start, end) = blocks[block]
+
+ if start != last + 1:
+ if start - last <= 33:
+ print_block ("FILLER", last+1, start-1, data)
+ last = start-1
+ else:
+ if last >= 0:
+ ends.append (last + 1)
+ offset += ends[-1] - starts[-1]
+ print
+ print
+ print "#define indic_offset_0x%04x %d" % (start, offset)
+ starts.append (start)
+
+ print_block (block, start, end, data)
+ last = end
+ends.append (last + 1)
+offset += ends[-1] - starts[-1]
+print
+print
+print "#define indic_offset_total %d" % offset
+print
+occupancy = used * 100. / total
+print "}; /* Table occupancy: %d%% */" % occupancy
+print
+print "static INDIC_TABLE_ELEMENT_TYPE"
+print "get_indic_categories (hb_codepoint_t u)"
+print "{"
+for (start,end) in zip (starts, ends):
+ offset = "indic_offset_0x%04x" % start
+ print " if (0x%04X <= u && u <= 0x%04X) return indic_table[u - 0x%04X + %s];" % (start, end, start, offset)
+for u,d in singles.items ():
+ print " if (unlikely (u == 0x%04X)) return _(%s,%s);" % (u, short[0][d[0]], short[1][d[1]])
+print " return _(x,x);"
+print "}"
+print
+print "#undef _"
+for i in range (2):
+ print
+ vv = values[i].keys ()
+ vv.sort ()
+ for v in vv:
+ 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 */
+if occupancy < 30:
+ raise Exception ("Table too sparse, please investigate: ", occupancy)
diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh
new file mode 100644
index 0000000..0f70641
--- /dev/null
+++ b/src/hb-atomic-private.hh
@@ -0,0 +1,113 @@
+/*
+ * Copyright © 2007 Chris Wilson
+ * Copyright © 2009,2010 Red Hat, Inc.
+ * 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.
+ *
+ * Contributor(s):
+ * Chris Wilson <chris@chris-wilson.co.uk>
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_ATOMIC_PRIVATE_HH
+#define HB_ATOMIC_PRIVATE_HH
+
+#include "hb-private.hh"
+
+
+/* atomic_int */
+
+/* We need external help for these */
+
+#if 0
+
+
+#elif !defined(HB_NO_MT) && defined(_MSC_VER) && _MSC_VER >= 1600
+
+#include <intrin.h>
+/* On x86, _InterlockedCompareExchangePointer is a macro defined in concrt.h */
+#include <concrt.h>
+
+typedef long hb_atomic_int_t;
+#define hb_atomic_int_add(AI, V) _InterlockedExchangeAdd (&(AI), (V))
+
+#define hb_atomic_ptr_get(P) (MemoryBarrier (), (void *) *(P))
+#define hb_atomic_ptr_cmpexch(P,O,N) (_InterlockedCompareExchangePointer ((void **) (P), (void *) (N), (void *) (O)) == (void *) (O))
+
+
+#elif !defined(HB_NO_MT) && defined(__APPLE__)
+
+#include <libkern/OSAtomic.h>
+
+typedef int32_t hb_atomic_int_t;
+#define hb_atomic_int_add(AI, V) (OSAtomicAdd32Barrier ((V), &(AI)) - (V))
+
+#define hb_atomic_ptr_get(P) (OSMemoryBarrier (), (void *) *(P))
+#define hb_atomic_ptr_cmpexch(P,O,N) OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P))
+
+
+#elif !defined(HB_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES)
+
+typedef int hb_atomic_int_t;
+#define hb_atomic_int_add(AI, V) __sync_fetch_and_add (&(AI), (V))
+
+#define hb_atomic_ptr_get(P) (void *) (__sync_synchronize (), *(P))
+#define hb_atomic_ptr_cmpexch(P,O,N) __sync_bool_compare_and_swap ((P), (O), (N))
+
+#elif !defined(HB_NO_MT) && defined(HAVE_GLIB)
+
+#include <glib.h>
+typedef int hb_atomic_int_t;
+#if GLIB_CHECK_VERSION(2,29,5)
+#define hb_atomic_int_add(AI, V) g_atomic_int_add (&(AI), (V))
+#else
+#define hb_atomic_int_add(AI, V) g_atomic_int_exchange_and_add (&(AI), (V))
+#endif
+
+#define hb_atomic_ptr_get(P) g_atomic_pointer_get (P)
+#define hb_atomic_ptr_cmpexch(P,O,N) g_atomic_pointer_compare_and_exchange ((void **) (P), (void *) (O), (void *) (N))
+
+
+#elif !defined(HB_NO_MT)
+
+#define HB_ATOMIC_INT_NIL 1 /* Warn that fallback implementation is in use. */
+typedef volatile int hb_atomic_int_t;
+#define hb_atomic_int_add(AI, V) (((AI) += (V)) - (V))
+
+#define hb_atomic_ptr_get(P) ((void *) *(P))
+#define hb_atomic_ptr_cmpexch(P,O,N) (* (void * volatile *) (P) == (void *) (O) ? (* (void * volatile *) (P) = (void *) (N), true) : false)
+
+
+#else /* HB_NO_MT */
+
+typedef int hb_atomic_int_t;
+#define hb_atomic_int_add(AI, V) (((AI) += (V)) - (V))
+
+#define hb_atomic_ptr_get(P) ((void *) *(P))
+#define hb_atomic_ptr_cmpexch(P,O,N) (* (void **) (P) == (void *) (O) ? (* (void **) (P) = (void *) (N), true) : false)
+
+#endif
+
+/* TODO Add tracing. */
+
+#endif /* HB_ATOMIC_PRIVATE_HH */
diff --git a/src/hb-blob.cc b/src/hb-blob.cc
new file mode 100644
index 0000000..b6e696b
--- /dev/null
+++ b/src/hb-blob.cc
@@ -0,0 +1,325 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#include "hb-private.hh"
+
+#include "hb-blob.h"
+#include "hb-object-private.hh"
+
+#ifdef HAVE_SYS_MMAN_H
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#include <sys/mman.h>
+#endif /* HAVE_SYS_MMAN_H */
+
+#include <stdio.h>
+#include <errno.h>
+
+
+
+#ifndef HB_DEBUG_BLOB
+#define HB_DEBUG_BLOB (HB_DEBUG+0)
+#endif
+
+
+struct hb_blob_t {
+ hb_object_header_t header;
+ ASSERT_POD ();
+
+ bool immutable;
+
+ const char *data;
+ unsigned int length;
+ hb_memory_mode_t mode;
+
+ void *user_data;
+ hb_destroy_func_t destroy;
+};
+
+
+static bool _try_writable (hb_blob_t *blob);
+
+static void
+_hb_blob_destroy_user_data (hb_blob_t *blob)
+{
+ if (blob->destroy) {
+ blob->destroy (blob->user_data);
+ blob->user_data = NULL;
+ blob->destroy = NULL;
+ }
+}
+
+hb_blob_t *
+hb_blob_create (const char *data,
+ unsigned int length,
+ hb_memory_mode_t mode,
+ void *user_data,
+ hb_destroy_func_t destroy)
+{
+ hb_blob_t *blob;
+
+ if (!length || !(blob = hb_object_create<hb_blob_t> ())) {
+ if (destroy)
+ destroy (user_data);
+ return hb_blob_get_empty ();
+ }
+
+ blob->data = data;
+ blob->length = length;
+ blob->mode = mode;
+
+ blob->user_data = user_data;
+ blob->destroy = destroy;
+
+ if (blob->mode == HB_MEMORY_MODE_DUPLICATE) {
+ blob->mode = HB_MEMORY_MODE_READONLY;
+ if (!_try_writable (blob)) {
+ hb_blob_destroy (blob);
+ return hb_blob_get_empty ();
+ }
+ }
+
+ return blob;
+}
+
+hb_blob_t *
+hb_blob_create_sub_blob (hb_blob_t *parent,
+ unsigned int offset,
+ unsigned int length)
+{
+ hb_blob_t *blob;
+
+ if (!length || offset >= parent->length)
+ return hb_blob_get_empty ();
+
+ hb_blob_make_immutable (parent);
+
+ blob = hb_blob_create (parent->data + offset,
+ MIN (length, parent->length - offset),
+ parent->mode,
+ hb_blob_reference (parent),
+ (hb_destroy_func_t) hb_blob_destroy);
+
+ return blob;
+}
+
+hb_blob_t *
+hb_blob_get_empty (void)
+{
+ static const hb_blob_t _hb_blob_nil = {
+ HB_OBJECT_HEADER_STATIC,
+
+ true, /* immutable */
+
+ NULL, /* data */
+ 0, /* length */
+ HB_MEMORY_MODE_READONLY, /* mode */
+
+ NULL, /* user_data */
+ NULL /* destroy */
+ };
+
+ return const_cast<hb_blob_t *> (&_hb_blob_nil);
+}
+
+hb_blob_t *
+hb_blob_reference (hb_blob_t *blob)
+{
+ return hb_object_reference (blob);
+}
+
+void
+hb_blob_destroy (hb_blob_t *blob)
+{
+ if (!hb_object_destroy (blob)) return;
+
+ _hb_blob_destroy_user_data (blob);
+
+ free (blob);
+}
+
+hb_bool_t
+hb_blob_set_user_data (hb_blob_t *blob,
+ hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy,
+ hb_bool_t replace)
+{
+ return hb_object_set_user_data (blob, key, data, destroy, replace);
+}
+
+void *
+hb_blob_get_user_data (hb_blob_t *blob,
+ hb_user_data_key_t *key)
+{
+ return hb_object_get_user_data (blob, key);
+}
+
+
+void
+hb_blob_make_immutable (hb_blob_t *blob)
+{
+ if (hb_object_is_inert (blob))
+ return;
+
+ blob->immutable = true;
+}
+
+hb_bool_t
+hb_blob_is_immutable (hb_blob_t *blob)
+{
+ return blob->immutable;
+}
+
+
+unsigned int
+hb_blob_get_length (hb_blob_t *blob)
+{
+ return blob->length;
+}
+
+const char *
+hb_blob_get_data (hb_blob_t *blob, unsigned int *length)
+{
+ if (length)
+ *length = blob->length;
+
+ return blob->data;
+}
+
+char *
+hb_blob_get_data_writable (hb_blob_t *blob, unsigned int *length)
+{
+ if (!_try_writable (blob)) {
+ if (length)
+ *length = 0;
+
+ return NULL;
+ }
+
+ if (length)
+ *length = blob->length;
+
+ return const_cast<char *> (blob->data);
+}
+
+
+static hb_bool_t
+_try_make_writable_inplace_unix (hb_blob_t *blob)
+{
+#if defined(HAVE_SYS_MMAN_H) && defined(HAVE_MPROTECT)
+ uintptr_t pagesize = -1, mask, length;
+ const char *addr;
+
+#if defined(HAVE_SYSCONF) && defined(_SC_PAGE_SIZE)
+ pagesize = (uintptr_t) sysconf (_SC_PAGE_SIZE);
+#elif defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE)
+ pagesize = (uintptr_t) sysconf (_SC_PAGESIZE);
+#elif defined(HAVE_GETPAGESIZE)
+ pagesize = (uintptr_t) getpagesize ();
+#endif
+
+ if ((uintptr_t) -1L == pagesize) {
+ DEBUG_MSG_FUNC (BLOB, blob, "failed to get pagesize: %s", strerror (errno));
+ return false;
+ }
+ DEBUG_MSG_FUNC (BLOB, blob, "pagesize is %lu", (unsigned long) pagesize);
+
+ mask = ~(pagesize-1);
+ addr = (const char *) (((uintptr_t) blob->data) & mask);
+ length = (const char *) (((uintptr_t) blob->data + blob->length + pagesize-1) & mask) - addr;
+ DEBUG_MSG_FUNC (BLOB, blob,
+ "calling mprotect on [%p..%p] (%lu bytes)",
+ addr, addr+length, (unsigned long) length);
+ if (-1 == mprotect ((void *) addr, length, PROT_READ | PROT_WRITE)) {
+ DEBUG_MSG_FUNC (BLOB, blob, "mprotect failed: %s", strerror (errno));
+ return false;
+ }
+
+ blob->mode = HB_MEMORY_MODE_WRITABLE;
+
+ DEBUG_MSG_FUNC (BLOB, blob,
+ "successfully made [%p..%p] (%lu bytes) writable\n",
+ addr, addr+length, (unsigned long) length);
+ return true;
+#else
+ return false;
+#endif
+}
+
+static bool
+_try_writable_inplace (hb_blob_t *blob)
+{
+ DEBUG_MSG_FUNC (BLOB, blob, "making writable inplace\n");
+
+ if (_try_make_writable_inplace_unix (blob))
+ return true;
+
+ DEBUG_MSG_FUNC (BLOB, blob, "making writable -> FAILED\n");
+
+ /* Failed to make writable inplace, mark that */
+ blob->mode = HB_MEMORY_MODE_READONLY;
+ return false;
+}
+
+static bool
+_try_writable (hb_blob_t *blob)
+{
+ if (blob->immutable)
+ return false;
+
+ if (blob->mode == HB_MEMORY_MODE_WRITABLE)
+ return true;
+
+ if (blob->mode == HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE && _try_writable_inplace (blob))
+ return true;
+
+ if (blob->mode == HB_MEMORY_MODE_WRITABLE)
+ return true;
+
+
+ DEBUG_MSG_FUNC (BLOB, blob, "current data is -> %p\n", blob->data);
+
+ char *new_data;
+
+ new_data = (char *) malloc (blob->length);
+ if (unlikely (!new_data))
+ return false;
+
+ DEBUG_MSG_FUNC (BLOB, blob, "dupped successfully -> %p\n", blob->data);
+
+ memcpy (new_data, blob->data, blob->length);
+ _hb_blob_destroy_user_data (blob);
+ blob->mode = HB_MEMORY_MODE_WRITABLE;
+ blob->data = new_data;
+ blob->user_data = new_data;
+ blob->destroy = free;
+
+ return true;
+}
+
+
diff --git a/src/hb-blob.h b/src/hb-blob.h
new file mode 100644
index 0000000..1a93baa
--- /dev/null
+++ b/src/hb-blob.h
@@ -0,0 +1,101 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_H_IN
+#error "Include <hb.h> instead."
+#endif
+
+#ifndef HB_BLOB_H
+#define HB_BLOB_H
+
+#include "hb-common.h"
+
+HB_BEGIN_DECLS
+
+
+typedef enum {
+ HB_MEMORY_MODE_DUPLICATE,
+ HB_MEMORY_MODE_READONLY,
+ HB_MEMORY_MODE_WRITABLE,
+ HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE
+} hb_memory_mode_t;
+
+typedef struct hb_blob_t hb_blob_t;
+
+hb_blob_t *
+hb_blob_create (const char *data,
+ unsigned int length,
+ hb_memory_mode_t mode,
+ void *user_data,
+ hb_destroy_func_t destroy);
+
+hb_blob_t *
+hb_blob_create_sub_blob (hb_blob_t *parent,
+ unsigned int offset,
+ unsigned int length);
+
+hb_blob_t *
+hb_blob_get_empty (void);
+
+hb_blob_t *
+hb_blob_reference (hb_blob_t *blob);
+
+void
+hb_blob_destroy (hb_blob_t *blob);
+
+hb_bool_t
+hb_blob_set_user_data (hb_blob_t *blob,
+ hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy,
+ hb_bool_t replace);
+
+
+void *
+hb_blob_get_user_data (hb_blob_t *blob,
+ hb_user_data_key_t *key);
+
+
+void
+hb_blob_make_immutable (hb_blob_t *blob);
+
+hb_bool_t
+hb_blob_is_immutable (hb_blob_t *blob);
+
+
+unsigned int
+hb_blob_get_length (hb_blob_t *blob);
+
+const char *
+hb_blob_get_data (hb_blob_t *blob, unsigned int *length);
+
+char *
+hb_blob_get_data_writable (hb_blob_t *blob, unsigned int *length);
+
+
+HB_END_DECLS
+
+#endif /* HB_BLOB_H */
diff --git a/src/hb-buffer-private.hh b/src/hb-buffer-private.hh
new file mode 100644
index 0000000..9864ca2
--- /dev/null
+++ b/src/hb-buffer-private.hh
@@ -0,0 +1,203 @@
+/*
+ * Copyright © 1998-2004 David Turner and Werner Lemberg
+ * Copyright © 2004,2007,2009,2010 Red Hat, Inc.
+ * Copyright © 2011 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Owen Taylor, Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_BUFFER_PRIVATE_HH
+#define HB_BUFFER_PRIVATE_HH
+
+#include "hb-private.hh"
+#include "hb-buffer.h"
+#include "hb-object-private.hh"
+#include "hb-unicode-private.hh"
+
+
+
+ASSERT_STATIC (sizeof (hb_glyph_info_t) == 20);
+ASSERT_STATIC (sizeof (hb_glyph_info_t) == sizeof (hb_glyph_position_t));
+
+
+/*
+ * hb_segment_properties_t
+ */
+
+typedef struct hb_segment_properties_t {
+ hb_direction_t direction;
+ hb_script_t script;
+ hb_language_t language;
+ ASSERT_POD ();
+} hb_segment_properties_t;
+
+#define _HB_BUFFER_PROPS_DEFAULT { HB_DIRECTION_INVALID, HB_SCRIPT_INVALID, HB_LANGUAGE_INVALID }
+
+static inline hb_bool_t
+hb_segment_properties_equal (const hb_segment_properties_t *a,
+ const hb_segment_properties_t *b)
+{
+ return a->direction == b->direction &&
+ a->script == b->script &&
+ a->language == b->language;
+}
+
+
+#if 0
+static inline unsigned int
+hb_segment_properties_hash (const hb_segment_properties_t *p)
+{
+ /* TODO improve */
+ return (unsigned int) p->direction +
+ (unsigned int) p->script +
+ (intptr_t) (p->language);
+}
+#endif
+
+
+
+/*
+ * hb_buffer_t
+ */
+
+struct hb_buffer_t {
+ hb_object_header_t header;
+ ASSERT_POD ();
+
+ /* Information about how the text in the buffer should be treated */
+
+ hb_unicode_funcs_t *unicode; /* Unicode functions */
+ hb_segment_properties_t props; /* Script, language, direction */
+
+ /* Buffer contents */
+
+ bool in_error; /* Allocation failed */
+ bool have_output; /* Whether we have an output buffer going on */
+ bool have_positions; /* Whether we have positions */
+
+ unsigned int idx; /* Cursor into ->info and ->pos arrays */
+ unsigned int len; /* Length of ->info and ->pos arrays */
+ unsigned int out_len; /* Length of ->out array if have_output */
+
+ unsigned int allocated; /* Length of allocated arrays */
+ hb_glyph_info_t *info;
+ hb_glyph_info_t *out_info;
+ hb_glyph_position_t *pos;
+
+ inline hb_glyph_info_t &cur (unsigned int i = 0) { return info[idx + i]; }
+ inline hb_glyph_info_t cur (unsigned int i = 0) const { return info[idx + i]; }
+
+ inline hb_glyph_position_t &cur_pos (unsigned int i = 0) { return pos[idx + i]; }
+ inline hb_glyph_position_t cur_pos (unsigned int i = 0) const { return pos[idx + i]; }
+
+ inline hb_glyph_info_t &prev (void) { return out_info[out_len - 1]; }
+ inline hb_glyph_info_t prev (void) const { return info[out_len - 1]; }
+
+ unsigned int serial;
+ uint8_t allocated_var_bytes[8];
+ const char *allocated_var_owner[8];
+
+
+ /* Methods */
+
+ HB_INTERNAL void reset (void);
+
+ inline unsigned int backtrack_len (void) const
+ { return have_output? out_len : idx; }
+ inline unsigned int next_serial (void) { return serial++; }
+
+ HB_INTERNAL void allocate_var (unsigned int byte_i, unsigned int count, const char *owner);
+ HB_INTERNAL void deallocate_var (unsigned int byte_i, unsigned int count, const char *owner);
+ HB_INTERNAL void deallocate_var_all (void);
+
+ HB_INTERNAL void add (hb_codepoint_t codepoint,
+ hb_mask_t mask,
+ unsigned int cluster);
+
+ HB_INTERNAL void reverse_range (unsigned int start, unsigned int end);
+ HB_INTERNAL void reverse (void);
+ HB_INTERNAL void reverse_clusters (void);
+ HB_INTERNAL void guess_properties (void);
+
+ HB_INTERNAL void swap_buffers (void);
+ HB_INTERNAL void clear_output (void);
+ HB_INTERNAL void clear_positions (void);
+
+ HB_INTERNAL void replace_glyphs (unsigned int num_in,
+ unsigned int num_out,
+ const hb_codepoint_t *glyph_data);
+
+ HB_INTERNAL void replace_glyph (hb_codepoint_t glyph_index);
+ /* Makes a copy of the glyph at idx to output and replace glyph_index */
+ HB_INTERNAL void output_glyph (hb_codepoint_t glyph_index);
+ /* Copies glyph at idx to output but doesn't advance idx */
+ HB_INTERNAL void copy_glyph (void);
+ /* Copies glyph at idx to output and advance idx.
+ * If there's no output, just advance idx. */
+ HB_INTERNAL void next_glyph (void);
+ /* Advance idx without copying to output. */
+ inline void skip_glyph (void) { idx++; }
+
+ inline void reset_masks (hb_mask_t mask)
+ {
+ for (unsigned int j = 0; j < len; j++)
+ info[j].mask = mask;
+ }
+ inline void add_masks (hb_mask_t mask)
+ {
+ for (unsigned int j = 0; j < len; j++)
+ info[j].mask |= mask;
+ }
+ HB_INTERNAL void set_masks (hb_mask_t value,
+ hb_mask_t mask,
+ unsigned int cluster_start,
+ unsigned int cluster_end);
+
+ HB_INTERNAL void merge_clusters (unsigned int start,
+ unsigned int end);
+ HB_INTERNAL void merge_out_clusters (unsigned int start,
+ unsigned int end);
+
+ /* Internal methods */
+ HB_INTERNAL bool enlarge (unsigned int size);
+
+ inline bool ensure (unsigned int size)
+ { return likely (size < allocated) ? true : enlarge (size); }
+
+ HB_INTERNAL bool make_room_for (unsigned int num_in, unsigned int num_out);
+
+ HB_INTERNAL void *get_scratch_buffer (unsigned int *size);
+};
+
+
+#define HB_BUFFER_XALLOCATE_VAR(b, func, var, owner) \
+ b->func (offsetof (hb_glyph_info_t, var) - offsetof(hb_glyph_info_t, var1), \
+ sizeof (b->info[0].var), owner)
+#define HB_BUFFER_ALLOCATE_VAR(b, var) \
+ HB_BUFFER_XALLOCATE_VAR (b, allocate_var, var (), #var)
+#define HB_BUFFER_DEALLOCATE_VAR(b, var) \
+ HB_BUFFER_XALLOCATE_VAR (b, deallocate_var, var (), #var)
+
+
+#endif /* HB_BUFFER_PRIVATE_HH */
diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc
new file mode 100644
index 0000000..eddd5d0
--- /dev/null
+++ b/src/hb-buffer.cc
@@ -0,0 +1,968 @@
+/*
+ * Copyright © 1998-2004 David Turner and Werner Lemberg
+ * Copyright © 2004,2007,2009,2010 Red Hat, Inc.
+ * Copyright © 2011 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Owen Taylor, Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-buffer-private.hh"
+
+#include <string.h>
+
+
+
+#ifndef HB_DEBUG_BUFFER
+#define HB_DEBUG_BUFFER (HB_DEBUG+0)
+#endif
+
+/* Here is how the buffer works internally:
+ *
+ * There are two info pointers: info and out_info. They always have
+ * the same allocated size, but different lengths.
+ *
+ * As an optimization, both info and out_info may point to the
+ * same piece of memory, which is owned by info. This remains the
+ * case as long as out_len doesn't exceed i at any time.
+ * In that case, swap_buffers() is no-op and the glyph operations operate
+ * mostly in-place.
+ *
+ * As soon as out_info gets longer than info, out_info is moved over
+ * to an alternate buffer (which we reuse the pos buffer for!), and its
+ * current contents (out_len entries) are copied to the new place.
+ * This should all remain transparent to the user. swap_buffers() then
+ * switches info and out_info.
+ */
+
+
+
+/* Internal API */
+
+bool
+hb_buffer_t::enlarge (unsigned int size)
+{
+ if (unlikely (in_error))
+ return false;
+
+ unsigned int new_allocated = allocated;
+ hb_glyph_position_t *new_pos = NULL;
+ hb_glyph_info_t *new_info = NULL;
+ bool separate_out = out_info != info;
+
+ if (unlikely (_hb_unsigned_int_mul_overflows (size, sizeof (info[0]))))
+ goto done;
+
+ while (size > new_allocated)
+ new_allocated += (new_allocated >> 1) + 32;
+
+ ASSERT_STATIC (sizeof (info[0]) == sizeof (pos[0]));
+ if (unlikely (_hb_unsigned_int_mul_overflows (new_allocated, sizeof (info[0]))))
+ goto done;
+
+ new_pos = (hb_glyph_position_t *) realloc (pos, new_allocated * sizeof (pos[0]));
+ new_info = (hb_glyph_info_t *) realloc (info, new_allocated * sizeof (info[0]));
+
+done:
+ if (unlikely (!new_pos || !new_info))
+ in_error = true;
+
+ if (likely (new_pos))
+ pos = new_pos;
+
+ if (likely (new_info))
+ info = new_info;
+
+ out_info = separate_out ? (hb_glyph_info_t *) pos : info;
+ if (likely (!in_error))
+ allocated = new_allocated;
+
+ return likely (!in_error);
+}
+
+bool
+hb_buffer_t::make_room_for (unsigned int num_in,
+ unsigned int num_out)
+{
+ if (unlikely (!ensure (out_len + num_out))) return false;
+
+ if (out_info == info &&
+ out_len + num_out > idx + num_in)
+ {
+ assert (have_output);
+
+ out_info = (hb_glyph_info_t *) pos;
+ memcpy (out_info, info, out_len * sizeof (out_info[0]));
+ }
+
+ return true;
+}
+
+void *
+hb_buffer_t::get_scratch_buffer (unsigned int *size)
+{
+ have_output = false;
+ have_positions = false;
+
+ out_len = 0;
+ out_info = info;
+
+ *size = allocated * sizeof (pos[0]);
+ return pos;
+}
+
+
+
+/* HarfBuzz-Internal API */
+
+void
+hb_buffer_t::reset (void)
+{
+ if (unlikely (hb_object_is_inert (this)))
+ return;
+
+ hb_unicode_funcs_destroy (unicode);
+ unicode = hb_unicode_funcs_get_default ();
+
+ hb_segment_properties_t default_props = _HB_BUFFER_PROPS_DEFAULT;
+ props = default_props;
+
+ in_error = false;
+ have_output = false;
+ have_positions = false;
+
+ idx = 0;
+ len = 0;
+ out_len = 0;
+ out_info = info;
+
+ serial = 0;
+ memset (allocated_var_bytes, 0, sizeof allocated_var_bytes);
+ memset (allocated_var_owner, 0, sizeof allocated_var_owner);
+}
+
+void
+hb_buffer_t::add (hb_codepoint_t codepoint,
+ hb_mask_t mask,
+ unsigned int cluster)
+{
+ hb_glyph_info_t *glyph;
+
+ if (unlikely (!ensure (len + 1))) return;
+
+ glyph = &info[len];
+
+ memset (glyph, 0, sizeof (*glyph));
+ glyph->codepoint = codepoint;
+ glyph->mask = mask;
+ glyph->cluster = cluster;
+
+ len++;
+}
+
+void
+hb_buffer_t::clear_output (void)
+{
+ if (unlikely (hb_object_is_inert (this)))
+ return;
+
+ have_output = true;
+ have_positions = false;
+
+ out_len = 0;
+ out_info = info;
+}
+
+void
+hb_buffer_t::clear_positions (void)
+{
+ if (unlikely (hb_object_is_inert (this)))
+ return;
+
+ have_output = false;
+ have_positions = true;
+
+ out_len = 0;
+ out_info = info;
+
+ memset (pos, 0, sizeof (pos[0]) * len);
+}
+
+void
+hb_buffer_t::swap_buffers (void)
+{
+ if (unlikely (in_error)) return;
+
+ assert (have_output);
+ have_output = false;
+
+ if (out_info != info)
+ {
+ hb_glyph_info_t *tmp_string;
+ tmp_string = info;
+ info = out_info;
+ out_info = tmp_string;
+ pos = (hb_glyph_position_t *) out_info;
+ }
+
+ unsigned int tmp;
+ tmp = len;
+ len = out_len;
+ out_len = tmp;
+
+ idx = 0;
+}
+
+
+void
+hb_buffer_t::replace_glyphs (unsigned int num_in,
+ unsigned int num_out,
+ const uint32_t *glyph_data)
+{
+ if (unlikely (!make_room_for (num_in, num_out))) return;
+
+ merge_clusters (idx, idx + num_in);
+
+ hb_glyph_info_t orig_info = info[idx];
+ hb_glyph_info_t *pinfo = &out_info[out_len];
+ for (unsigned int i = 0; i < num_out; i++)
+ {
+ *pinfo = orig_info;
+ pinfo->codepoint = glyph_data[i];
+ pinfo++;
+ }
+
+ idx += num_in;
+ out_len += num_out;
+}
+
+void
+hb_buffer_t::output_glyph (hb_codepoint_t glyph_index)
+{
+ if (unlikely (!make_room_for (0, 1))) return;
+
+ out_info[out_len] = info[idx];
+ out_info[out_len].codepoint = glyph_index;
+
+ out_len++;
+}
+
+void
+hb_buffer_t::copy_glyph (void)
+{
+ if (unlikely (!make_room_for (0, 1))) return;
+
+ out_info[out_len] = info[idx];
+
+ out_len++;
+}
+
+void
+hb_buffer_t::replace_glyph (hb_codepoint_t glyph_index)
+{
+ if (unlikely (out_info != info || out_len != idx)) {
+ if (unlikely (!make_room_for (1, 1))) return;
+ out_info[out_len] = info[idx];
+ }
+ out_info[out_len].codepoint = glyph_index;
+
+ idx++;
+ out_len++;
+}
+
+void
+hb_buffer_t::next_glyph (void)
+{
+ if (have_output)
+ {
+ if (unlikely (out_info != info || out_len != idx)) {
+ if (unlikely (!make_room_for (1, 1))) return;
+ out_info[out_len] = info[idx];
+ }
+ out_len++;
+ }
+
+ idx++;
+}
+
+
+void
+hb_buffer_t::set_masks (hb_mask_t value,
+ hb_mask_t mask,
+ unsigned int cluster_start,
+ unsigned int cluster_end)
+{
+ hb_mask_t not_mask = ~mask;
+ value &= mask;
+
+ if (!mask)
+ return;
+
+ if (cluster_start == 0 && cluster_end == (unsigned int)-1) {
+ unsigned int count = len;
+ for (unsigned int i = 0; i < count; i++)
+ info[i].mask = (info[i].mask & not_mask) | value;
+ return;
+ }
+
+ unsigned int count = len;
+ for (unsigned int i = 0; i < count; i++)
+ if (cluster_start <= info[i].cluster && info[i].cluster < cluster_end)
+ info[i].mask = (info[i].mask & not_mask) | value;
+}
+
+void
+hb_buffer_t::reverse_range (unsigned int start,
+ unsigned int end)
+{
+ unsigned int i, j;
+
+ if (start == end - 1)
+ return;
+
+ for (i = start, j = end - 1; i < j; i++, j--) {
+ hb_glyph_info_t t;
+
+ t = info[i];
+ info[i] = info[j];
+ info[j] = t;
+ }
+
+ if (pos) {
+ for (i = start, j = end - 1; i < j; i++, j--) {
+ hb_glyph_position_t t;
+
+ t = pos[i];
+ pos[i] = pos[j];
+ pos[j] = t;
+ }
+ }
+}
+
+void
+hb_buffer_t::reverse (void)
+{
+ if (unlikely (!len))
+ return;
+
+ reverse_range (0, len);
+}
+
+void
+hb_buffer_t::reverse_clusters (void)
+{
+ unsigned int i, start, count, last_cluster;
+
+ if (unlikely (!len))
+ return;
+
+ reverse ();
+
+ count = len;
+ start = 0;
+ last_cluster = info[0].cluster;
+ for (i = 1; i < count; i++) {
+ if (last_cluster != info[i].cluster) {
+ reverse_range (start, i);
+ start = i;
+ last_cluster = info[i].cluster;
+ }
+ }
+ reverse_range (start, i);
+}
+
+void
+hb_buffer_t::merge_clusters (unsigned int start,
+ unsigned int end)
+{
+ if (unlikely (end - start < 2))
+ return;
+
+ unsigned int cluster = info[start].cluster;
+
+ for (unsigned int i = start + 1; i < end; i++)
+ cluster = MIN (cluster, info[i].cluster);
+
+ /* Extend end */
+ while (end < len && info[end - 1].cluster == info[end].cluster)
+ end++;
+
+ /* Extend start */
+ while (idx < start && info[start - 1].cluster == info[start].cluster)
+ start--;
+
+ /* If we hit the start of buffer, continue in out-buffer. */
+ if (idx == start)
+ for (unsigned i = out_len; i && out_info[i - 1].cluster == info[start].cluster; i--)
+ out_info[i - 1].cluster = cluster;
+
+ for (unsigned int i = start; i < end; i++)
+ info[i].cluster = cluster;
+}
+void
+hb_buffer_t::merge_out_clusters (unsigned int start,
+ unsigned int end)
+{
+ if (unlikely (end - start < 2))
+ return;
+
+ unsigned int cluster = out_info[start].cluster;
+
+ for (unsigned int i = start + 1; i < end; i++)
+ cluster = MIN (cluster, out_info[i].cluster);
+
+ /* Extend start */
+ while (start && out_info[start - 1].cluster == out_info[start].cluster)
+ start--;
+
+ /* Extend end */
+ while (end < out_len && out_info[end - 1].cluster == out_info[end].cluster)
+ end++;
+
+ /* If we hit the end of out-buffer, continue in buffer. */
+ if (end == out_len)
+ for (unsigned i = idx; i < len && info[i].cluster == out_info[end - 1].cluster; i++)
+ info[i].cluster = cluster;
+
+ for (unsigned int i = start; i < end; i++)
+ out_info[i].cluster = cluster;
+}
+
+void
+hb_buffer_t::guess_properties (void)
+{
+ /* If script is set to INVALID, guess from buffer contents */
+ if (props.script == HB_SCRIPT_INVALID) {
+ for (unsigned int i = 0; i < len; i++) {
+ hb_script_t script = unicode->script (info[i].codepoint);
+ if (likely (script != HB_SCRIPT_COMMON &&
+ script != HB_SCRIPT_INHERITED &&
+ script != HB_SCRIPT_UNKNOWN)) {
+ props.script = script;
+ break;
+ }
+ }
+ }
+
+ /* If direction is set to INVALID, guess from script */
+ if (props.direction == HB_DIRECTION_INVALID) {
+ props.direction = hb_script_get_horizontal_direction (props.script);
+ }
+
+ /* If language is not set, use default language from locale */
+ if (props.language == HB_LANGUAGE_INVALID) {
+ /* TODO get_default_for_script? using $LANGUAGE */
+ props.language = hb_language_get_default ();
+ }
+}
+
+
+static inline void
+dump_var_allocation (const hb_buffer_t *buffer)
+{
+ char buf[80];
+ for (unsigned int i = 0; i < 8; i++)
+ buf[i] = '0' + buffer->allocated_var_bytes[7 - i];
+ buf[8] = '\0';
+ DEBUG_MSG (BUFFER, buffer,
+ "Current var allocation: %s",
+ buf);
+}
+
+void hb_buffer_t::allocate_var (unsigned int byte_i, unsigned int count, const char *owner)
+{
+ assert (byte_i < 8 && byte_i + count <= 8);
+
+ if (DEBUG (BUFFER))
+ dump_var_allocation (this);
+ DEBUG_MSG (BUFFER, this,
+ "Allocating var bytes %d..%d for %s",
+ byte_i, byte_i + count - 1, owner);
+
+ for (unsigned int i = byte_i; i < byte_i + count; i++) {
+ assert (!allocated_var_bytes[i]);
+ allocated_var_bytes[i]++;
+ allocated_var_owner[i] = owner;
+ }
+}
+
+void hb_buffer_t::deallocate_var (unsigned int byte_i, unsigned int count, const char *owner)
+{
+ if (DEBUG (BUFFER))
+ dump_var_allocation (this);
+
+ DEBUG_MSG (BUFFER, this,
+ "Deallocating var bytes %d..%d for %s",
+ byte_i, byte_i + count - 1, owner);
+
+ assert (byte_i < 8 && byte_i + count <= 8);
+ for (unsigned int i = byte_i; i < byte_i + count; i++) {
+ assert (allocated_var_bytes[i]);
+ assert (0 == strcmp (allocated_var_owner[i], owner));
+ allocated_var_bytes[i]--;
+ }
+}
+
+void hb_buffer_t::deallocate_var_all (void)
+{
+ memset (allocated_var_bytes, 0, sizeof (allocated_var_bytes));
+ memset (allocated_var_owner, 0, sizeof (allocated_var_owner));
+}
+
+/* Public API */
+
+hb_buffer_t *
+hb_buffer_create ()
+{
+ hb_buffer_t *buffer;
+
+ if (!(buffer = hb_object_create<hb_buffer_t> ()))
+ return hb_buffer_get_empty ();
+
+ buffer->reset ();
+
+ return buffer;
+}
+
+hb_buffer_t *
+hb_buffer_get_empty (void)
+{
+ static const hb_buffer_t _hb_buffer_nil = {
+ HB_OBJECT_HEADER_STATIC,
+
+ const_cast<hb_unicode_funcs_t *> (&_hb_unicode_funcs_nil),
+ _HB_BUFFER_PROPS_DEFAULT,
+
+ true, /* in_error */
+ true, /* have_output */
+ true /* have_positions */
+ };
+
+ return const_cast<hb_buffer_t *> (&_hb_buffer_nil);
+}
+
+hb_buffer_t *
+hb_buffer_reference (hb_buffer_t *buffer)
+{
+ return hb_object_reference (buffer);
+}
+
+void
+hb_buffer_destroy (hb_buffer_t *buffer)
+{
+ if (!hb_object_destroy (buffer)) return;
+
+ hb_unicode_funcs_destroy (buffer->unicode);
+
+ free (buffer->info);
+ free (buffer->pos);
+
+ free (buffer);
+}
+
+hb_bool_t
+hb_buffer_set_user_data (hb_buffer_t *buffer,
+ hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy,
+ hb_bool_t replace)
+{
+ return hb_object_set_user_data (buffer, key, data, destroy, replace);
+}
+
+void *
+hb_buffer_get_user_data (hb_buffer_t *buffer,
+ hb_user_data_key_t *key)
+{
+ return hb_object_get_user_data (buffer, key);
+}
+
+
+void
+hb_buffer_set_unicode_funcs (hb_buffer_t *buffer,
+ hb_unicode_funcs_t *unicode)
+{
+ if (unlikely (hb_object_is_inert (buffer)))
+ return;
+
+ if (!unicode)
+ unicode = hb_unicode_funcs_get_default ();
+
+
+ hb_unicode_funcs_reference (unicode);
+ hb_unicode_funcs_destroy (buffer->unicode);
+ buffer->unicode = unicode;
+}
+
+hb_unicode_funcs_t *
+hb_buffer_get_unicode_funcs (hb_buffer_t *buffer)
+{
+ return buffer->unicode;
+}
+
+void
+hb_buffer_set_direction (hb_buffer_t *buffer,
+ hb_direction_t direction)
+
+{
+ if (unlikely (hb_object_is_inert (buffer)))
+ return;
+
+ buffer->props.direction = direction;
+}
+
+hb_direction_t
+hb_buffer_get_direction (hb_buffer_t *buffer)
+{
+ return buffer->props.direction;
+}
+
+void
+hb_buffer_set_script (hb_buffer_t *buffer,
+ hb_script_t script)
+{
+ if (unlikely (hb_object_is_inert (buffer)))
+ return;
+
+ buffer->props.script = script;
+}
+
+hb_script_t
+hb_buffer_get_script (hb_buffer_t *buffer)
+{
+ return buffer->props.script;
+}
+
+void
+hb_buffer_set_language (hb_buffer_t *buffer,
+ hb_language_t language)
+{
+ if (unlikely (hb_object_is_inert (buffer)))
+ return;
+
+ buffer->props.language = language;
+}
+
+hb_language_t
+hb_buffer_get_language (hb_buffer_t *buffer)
+{
+ return buffer->props.language;
+}
+
+
+void
+hb_buffer_reset (hb_buffer_t *buffer)
+{
+ buffer->reset ();
+}
+
+hb_bool_t
+hb_buffer_pre_allocate (hb_buffer_t *buffer, unsigned int size)
+{
+ return buffer->ensure (size);
+}
+
+hb_bool_t
+hb_buffer_allocation_successful (hb_buffer_t *buffer)
+{
+ return !buffer->in_error;
+}
+
+void
+hb_buffer_add (hb_buffer_t *buffer,
+ hb_codepoint_t codepoint,
+ hb_mask_t mask,
+ unsigned int cluster)
+{
+ buffer->add (codepoint, mask, cluster);
+}
+
+hb_bool_t
+hb_buffer_set_length (hb_buffer_t *buffer,
+ unsigned int length)
+{
+ if (unlikely (hb_object_is_inert (buffer)))
+ return length == 0;
+
+ if (!buffer->ensure (length))
+ return false;
+
+ /* Wipe the new space */
+ if (length > buffer->len) {
+ memset (buffer->info + buffer->len, 0, sizeof (buffer->info[0]) * (length - buffer->len));
+ if (buffer->have_positions)
+ memset (buffer->pos + buffer->len, 0, sizeof (buffer->pos[0]) * (length - buffer->len));
+ }
+
+ buffer->len = length;
+ return true;
+}
+
+unsigned int
+hb_buffer_get_length (hb_buffer_t *buffer)
+{
+ return buffer->len;
+}
+
+/* Return value valid as long as buffer not modified */
+hb_glyph_info_t *
+hb_buffer_get_glyph_infos (hb_buffer_t *buffer,
+ unsigned int *length)
+{
+ if (length)
+ *length = buffer->len;
+
+ return (hb_glyph_info_t *) buffer->info;
+}
+
+/* Return value valid as long as buffer not modified */
+hb_glyph_position_t *
+hb_buffer_get_glyph_positions (hb_buffer_t *buffer,
+ unsigned int *length)
+{
+ if (!buffer->have_positions)
+ buffer->clear_positions ();
+
+ if (length)
+ *length = buffer->len;
+
+ return (hb_glyph_position_t *) buffer->pos;
+}
+
+void
+hb_buffer_reverse (hb_buffer_t *buffer)
+{
+ buffer->reverse ();
+}
+
+void
+hb_buffer_reverse_clusters (hb_buffer_t *buffer)
+{
+ buffer->reverse_clusters ();
+}
+
+void
+hb_buffer_guess_properties (hb_buffer_t *buffer)
+{
+ buffer->guess_properties ();
+}
+
+#define ADD_UTF(T) \
+ HB_STMT_START { \
+ if (text_length == -1) { \
+ text_length = 0; \
+ const T *p = (const T *) text; \
+ while (*p) { \
+ text_length++; \
+ p++; \
+ } \
+ } \
+ if (item_length == -1) \
+ item_length = text_length - item_offset; \
+ buffer->ensure (buffer->len + item_length * sizeof (T) / 4); \
+ const T *next = (const T *) text + item_offset; \
+ const T *end = next + item_length; \
+ while (next < end) { \
+ hb_codepoint_t u; \
+ const T *old_next = next; \
+ next = UTF_NEXT (next, end, u); \
+ hb_buffer_add (buffer, u, 1, old_next - (const T *) text); \
+ } \
+ } HB_STMT_END
+
+
+#define UTF8_COMPUTE(Char, Mask, Len) \
+ if (Char < 128) { Len = 1; Mask = 0x7f; } \
+ else if ((Char & 0xe0) == 0xc0) { Len = 2; Mask = 0x1f; } \
+ else if ((Char & 0xf0) == 0xe0) { Len = 3; Mask = 0x0f; } \
+ else if ((Char & 0xf8) == 0xf0) { Len = 4; Mask = 0x07; } \
+ else Len = 0;
+
+static inline const uint8_t *
+hb_utf8_next (const uint8_t *text,
+ const uint8_t *end,
+ hb_codepoint_t *unicode)
+{
+ uint8_t c = *text;
+ unsigned int mask, len;
+
+ /* TODO check for overlong sequences? */
+
+ UTF8_COMPUTE (c, mask, len);
+ if (unlikely (!len || (unsigned int) (end - text) < len)) {
+ *unicode = -1;
+ return text + 1;
+ } else {
+ hb_codepoint_t result;
+ unsigned int i;
+ result = c & mask;
+ for (i = 1; i < len; i++)
+ {
+ if (unlikely ((text[i] & 0xc0) != 0x80))
+ {
+ *unicode = -1;
+ return text + 1;
+ }
+ result <<= 6;
+ result |= (text[i] & 0x3f);
+ }
+ *unicode = result;
+ return text + len;
+ }
+}
+
+void
+hb_buffer_add_utf8 (hb_buffer_t *buffer,
+ const char *text,
+ int text_length,
+ unsigned int item_offset,
+ int item_length)
+{
+#define UTF_NEXT(S, E, U) hb_utf8_next (S, E, &(U))
+ ADD_UTF (uint8_t);
+#undef UTF_NEXT
+}
+
+static inline const uint16_t *
+hb_utf16_next (const uint16_t *text,
+ const uint16_t *end,
+ hb_codepoint_t *unicode)
+{
+ uint16_t c = *text++;
+
+ if (unlikely (c >= 0xd800 && c < 0xdc00)) {
+ /* high surrogate */
+ uint16_t l;
+ if (text < end && ((l = *text), likely (l >= 0xdc00 && l < 0xe000))) {
+ /* low surrogate */
+ *unicode = ((hb_codepoint_t) ((c) - 0xd800) * 0x400 + (l) - 0xdc00 + 0x10000);
+ text++;
+ } else
+ *unicode = -1;
+ } else
+ *unicode = c;
+
+ return text;
+}
+
+void
+hb_buffer_add_utf16 (hb_buffer_t *buffer,
+ const uint16_t *text,
+ int text_length,
+ unsigned int item_offset,
+ int item_length)
+{
+#define UTF_NEXT(S, E, U) hb_utf16_next (S, E, &(U))
+ ADD_UTF (uint16_t);
+#undef UTF_NEXT
+}
+
+void
+hb_buffer_add_utf32 (hb_buffer_t *buffer,
+ const uint32_t *text,
+ int text_length,
+ unsigned int item_offset,
+ int item_length)
+{
+#define UTF_NEXT(S, E, U) ((U) = *(S), (S)+1)
+ ADD_UTF (uint32_t);
+#undef UTF_NEXT
+}
+
+
+static int
+compare_info_codepoint (const hb_glyph_info_t *pa,
+ const hb_glyph_info_t *pb)
+{
+ return (int) pb->codepoint - (int) pa->codepoint;
+}
+
+static inline void
+normalize_glyphs_cluster (hb_buffer_t *buffer,
+ unsigned int start,
+ unsigned int end,
+ bool backward)
+{
+ hb_glyph_position_t *pos = buffer->pos;
+
+ /* Total cluster advance */
+ hb_position_t total_x_advance = 0, total_y_advance = 0;
+ for (unsigned int i = start; i < end; i++)
+ {
+ total_x_advance += pos[i].x_advance;
+ total_y_advance += pos[i].y_advance;
+ }
+
+ hb_position_t x_advance = 0, y_advance = 0;
+ for (unsigned int i = start; i < end; i++)
+ {
+ pos[i].x_offset += x_advance;
+ pos[i].y_offset += y_advance;
+
+ x_advance += pos[i].x_advance;
+ y_advance += pos[i].y_advance;
+
+ pos[i].x_advance = 0;
+ pos[i].y_advance = 0;
+ }
+
+ if (backward)
+ {
+ /* Transfer all cluster advance to the last glyph. */
+ pos[end - 1].x_advance = total_x_advance;
+ pos[end - 1].y_advance = total_y_advance;
+
+ hb_bubble_sort (buffer->info + start, end - start - 1, compare_info_codepoint, buffer->pos + start);
+ } else {
+ /* Transfer all cluster advance to the first glyph. */
+ pos[start].x_advance += total_x_advance;
+ pos[start].y_advance += total_y_advance;
+ for (unsigned int i = start + 1; i < end; i++) {
+ pos[i].x_offset -= total_x_advance;
+ pos[i].y_offset -= total_y_advance;
+ }
+ hb_bubble_sort (buffer->info + start + 1, end - start - 1, compare_info_codepoint, buffer->pos + start + 1);
+ }
+}
+
+void
+hb_buffer_normalize_glyphs (hb_buffer_t *buffer)
+{
+ assert (buffer->have_positions);
+ /* XXX assert (buffer->have_glyphs); */
+
+ bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction);
+
+ unsigned int count = buffer->len;
+ if (unlikely (!count)) return;
+ hb_glyph_info_t *info = buffer->info;
+
+ unsigned int start = 0;
+ unsigned int end;
+ for (end = start + 1; end < count; end++)
+ if (info[start].cluster != info[end].cluster) {
+ normalize_glyphs_cluster (buffer, start, end, backward);
+ start = end;
+ }
+ normalize_glyphs_cluster (buffer, start, end, backward);
+}
diff --git a/src/hb-buffer.h b/src/hb-buffer.h
new file mode 100644
index 0000000..aebf482
--- /dev/null
+++ b/src/hb-buffer.h
@@ -0,0 +1,211 @@
+/*
+ * Copyright © 1998-2004 David Turner and Werner Lemberg
+ * Copyright © 2004,2007,2009 Red Hat, Inc.
+ * Copyright © 2011 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Owen Taylor, Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_H_IN
+#error "Include <hb.h> instead."
+#endif
+
+#ifndef HB_BUFFER_H
+#define HB_BUFFER_H
+
+#include "hb-common.h"
+#include "hb-unicode.h"
+
+HB_BEGIN_DECLS
+
+
+typedef struct hb_buffer_t hb_buffer_t;
+
+typedef struct hb_glyph_info_t {
+ hb_codepoint_t codepoint;
+ hb_mask_t mask;
+ uint32_t cluster;
+
+ /*< private >*/
+ hb_var_int_t var1;
+ hb_var_int_t var2;
+} hb_glyph_info_t;
+
+typedef struct hb_glyph_position_t {
+ hb_position_t x_advance;
+ hb_position_t y_advance;
+ hb_position_t x_offset;
+ hb_position_t y_offset;
+
+ /*< private >*/
+ hb_var_int_t var;
+} hb_glyph_position_t;
+
+
+hb_buffer_t *
+hb_buffer_create (void);
+
+hb_buffer_t *
+hb_buffer_get_empty (void);
+
+hb_buffer_t *
+hb_buffer_reference (hb_buffer_t *buffer);
+
+void
+hb_buffer_destroy (hb_buffer_t *buffer);
+
+hb_bool_t
+hb_buffer_set_user_data (hb_buffer_t *buffer,
+ hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy,
+ hb_bool_t replace);
+
+void *
+hb_buffer_get_user_data (hb_buffer_t *buffer,
+ hb_user_data_key_t *key);
+
+
+void
+hb_buffer_set_unicode_funcs (hb_buffer_t *buffer,
+ hb_unicode_funcs_t *unicode_funcs);
+
+hb_unicode_funcs_t *
+hb_buffer_get_unicode_funcs (hb_buffer_t *buffer);
+
+void
+hb_buffer_set_direction (hb_buffer_t *buffer,
+ hb_direction_t direction);
+
+hb_direction_t
+hb_buffer_get_direction (hb_buffer_t *buffer);
+
+void
+hb_buffer_set_script (hb_buffer_t *buffer,
+ hb_script_t script);
+
+hb_script_t
+hb_buffer_get_script (hb_buffer_t *buffer);
+
+void
+hb_buffer_set_language (hb_buffer_t *buffer,
+ hb_language_t language);
+
+hb_language_t
+hb_buffer_get_language (hb_buffer_t *buffer);
+
+
+/* Resets the buffer. Afterwards it's as if it was just created,
+ * except that it has a larger buffer allocated perhaps... */
+void
+hb_buffer_reset (hb_buffer_t *buffer);
+
+/* Returns false if allocation failed */
+hb_bool_t
+hb_buffer_pre_allocate (hb_buffer_t *buffer,
+ unsigned int size);
+
+
+/* Returns false if allocation has failed before */
+hb_bool_t
+hb_buffer_allocation_successful (hb_buffer_t *buffer);
+
+void
+hb_buffer_reverse (hb_buffer_t *buffer);
+
+void
+hb_buffer_reverse_clusters (hb_buffer_t *buffer);
+
+void
+hb_buffer_guess_properties (hb_buffer_t *buffer);
+
+
+/* Filling the buffer in */
+
+void
+hb_buffer_add (hb_buffer_t *buffer,
+ hb_codepoint_t codepoint,
+ hb_mask_t mask,
+ unsigned int cluster);
+
+void
+hb_buffer_add_utf8 (hb_buffer_t *buffer,
+ const char *text,
+ int text_length,
+ unsigned int item_offset,
+ int item_length);
+
+void
+hb_buffer_add_utf16 (hb_buffer_t *buffer,
+ const uint16_t *text,
+ int text_length,
+ unsigned int item_offset,
+ int item_length);
+
+void
+hb_buffer_add_utf32 (hb_buffer_t *buffer,
+ const uint32_t *text,
+ int text_length,
+ unsigned int item_offset,
+ int item_length);
+
+
+/* Clears any new items added at the end */
+hb_bool_t
+hb_buffer_set_length (hb_buffer_t *buffer,
+ unsigned int length);
+
+/* Return value valid as long as buffer not modified */
+unsigned int
+hb_buffer_get_length (hb_buffer_t *buffer);
+
+/* Getting glyphs out of the buffer */
+
+/* Return value valid as long as buffer not modified */
+hb_glyph_info_t *
+hb_buffer_get_glyph_infos (hb_buffer_t *buffer,
+ unsigned int *length);
+
+/* Return value valid as long as buffer not modified */
+hb_glyph_position_t *
+hb_buffer_get_glyph_positions (hb_buffer_t *buffer,
+ unsigned int *length);
+
+
+/* Reorders a glyph buffer to have canonical in-cluster glyph order / position.
+ * The resulting clusters should behave identical to pre-reordering clusters.
+ * NOTE: This has nothing to do with Unicode normalization. */
+void
+hb_buffer_normalize_glyphs (hb_buffer_t *buffer);
+
+/*
+ * NOT IMPLEMENTED
+ void
+ hb_buffer_normalize_characters (hb_buffer_t *buffer);
+*/
+
+
+HB_END_DECLS
+
+#endif /* HB_BUFFER_H */
diff --git a/src/hb-cache-private.hh b/src/hb-cache-private.hh
new file mode 100644
index 0000000..19b70b7
--- /dev/null
+++ b/src/hb-cache-private.hh
@@ -0,0 +1,74 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_CACHE_PRIVATE_HH
+#define HB_CACHE_PRIVATE_HH
+
+#include "hb-private.hh"
+
+
+/* Implements a lock-free cache for int->int functions. */
+
+template <unsigned int key_bits, unsigned int value_bits, unsigned int cache_bits>
+struct hb_cache_t
+{
+ ASSERT_STATIC (key_bits >= cache_bits);
+ ASSERT_STATIC (key_bits + value_bits - cache_bits < 8 * sizeof (unsigned int));
+
+ inline void clear (void)
+ {
+ memset (values, 255, sizeof (values));
+ }
+
+ inline bool get (unsigned int key, unsigned int *value)
+ {
+ unsigned int k = key & ((1<<cache_bits)-1);
+ unsigned int v = values[k];
+ if ((v >> value_bits) != (key >> cache_bits))
+ return false;
+ *value = v & ((1<<value_bits)-1);
+ return true;
+ }
+
+ inline bool set (unsigned int key, unsigned int value)
+ {
+ if (unlikely ((key >> key_bits) || (value >> value_bits)))
+ return false; /* Overflows */
+ unsigned int k = key & ((1<<cache_bits)-1);
+ unsigned int v = ((key>>cache_bits)<<value_bits) | value;
+ values[k] = v;
+ return true;
+ }
+
+ private:
+ unsigned int values[1<<cache_bits];
+};
+
+typedef hb_cache_t<21, 16, 8> hb_cmap_cache_t;
+typedef hb_cache_t<16, 24, 8> hb_advance_cache_t;
+
+
+#endif /* HB_CACHE_PRIVATE_HH */
diff --git a/src/hb-common.cc b/src/hb-common.cc
new file mode 100644
index 0000000..1301ab2
--- /dev/null
+++ b/src/hb-common.cc
@@ -0,0 +1,417 @@
+/*
+ * Copyright © 2009,2010 Red Hat, Inc.
+ * 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.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-private.hh"
+
+#include "hb-version.h"
+
+#include "hb-mutex-private.hh"
+#include "hb-object-private.hh"
+
+#include <locale.h>
+
+
+
+/* hb_tag_t */
+
+hb_tag_t
+hb_tag_from_string (const char *s, int len)
+{
+ char tag[4];
+ unsigned int i;
+
+ if (!s || !len || !*s)
+ return HB_TAG_NONE;
+
+ if (len < 0 || len > 4)
+ len = 4;
+ for (i = 0; i < (unsigned) len && s[i]; i++)
+ tag[i] = s[i];
+ for (; i < 4; i++)
+ tag[i] = ' ';
+
+ return HB_TAG_CHAR4 (tag);
+}
+
+
+/* hb_direction_t */
+
+const char direction_strings[][4] = {
+ "ltr",
+ "rtl",
+ "ttb",
+ "btt"
+};
+
+hb_direction_t
+hb_direction_from_string (const char *str, int len)
+{
+ if (unlikely (!str || !len || !*str))
+ return HB_DIRECTION_INVALID;
+
+ /* Lets match loosely: just match the first letter, such that
+ * all of "ltr", "left-to-right", etc work!
+ */
+ char c = TOLOWER (str[0]);
+ for (unsigned int i = 0; i < ARRAY_LENGTH (direction_strings); i++)
+ if (c == direction_strings[i][0])
+ return (hb_direction_t) (HB_DIRECTION_LTR + i);
+
+ return HB_DIRECTION_INVALID;
+}
+
+const char *
+hb_direction_to_string (hb_direction_t direction)
+{
+ if (likely ((unsigned int) (direction - HB_DIRECTION_LTR)
+ < ARRAY_LENGTH (direction_strings)))
+ return direction_strings[direction - HB_DIRECTION_LTR];
+
+ return "invalid";
+}
+
+
+/* hb_language_t */
+
+struct hb_language_impl_t {
+ const char s[1];
+};
+
+static const char canon_map[256] = {
+ 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, 0, 0, '-', 0, 0,
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 0, 0, 0, 0, 0, 0,
+ '-', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
+ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 0, 0, 0, 0, '-',
+ 0, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
+ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 0, 0, 0, 0, 0
+};
+
+static hb_bool_t
+lang_equal (hb_language_t v1,
+ const void *v2)
+{
+ const unsigned char *p1 = (const unsigned char *) v1;
+ const unsigned char *p2 = (const unsigned char *) v2;
+
+ while (*p1 && *p1 == canon_map[*p2])
+ p1++, p2++;
+
+ return *p1 == canon_map[*p2];
+}
+
+#if 0
+static unsigned int
+lang_hash (const void *key)
+{
+ const unsigned char *p = key;
+ unsigned int h = 0;
+ while (canon_map[*p])
+ {
+ h = (h << 5) - h + canon_map[*p];
+ p++;
+ }
+
+ return h;
+}
+#endif
+
+
+struct hb_language_item_t {
+
+ struct hb_language_item_t *next;
+ hb_language_t lang;
+
+ inline bool operator == (const char *s) const {
+ return lang_equal (lang, s);
+ }
+
+ inline hb_language_item_t & operator = (const char *s) {
+ lang = (hb_language_t) strdup (s);
+ for (unsigned char *p = (unsigned char *) lang; *p; p++)
+ *p = canon_map[*p];
+
+ return *this;
+ }
+
+ void finish (void) { free (lang); }
+};
+
+
+/* Thread-safe lock-free language list */
+
+static hb_language_item_t *langs;
+
+static
+void free_langs (void)
+{
+ while (langs) {
+ hb_language_item_t *next = langs->next;
+ langs->finish ();
+ free (langs);
+ langs = next;
+ }
+}
+
+static hb_language_item_t *
+lang_find_or_insert (const char *key)
+{
+retry:
+ hb_language_item_t *first_lang = (hb_language_item_t *) hb_atomic_ptr_get (&langs);
+
+ for (hb_language_item_t *lang = first_lang; lang; lang = lang->next)
+ if (*lang == key)
+ return lang;
+
+ /* Not found; allocate one. */
+ hb_language_item_t *lang = (hb_language_item_t *) calloc (1, sizeof (hb_language_item_t));
+ if (unlikely (!lang))
+ return NULL;
+ lang->next = first_lang;
+ *lang = key;
+
+ if (!hb_atomic_ptr_cmpexch (&langs, first_lang, lang)) {
+ free (lang);
+ goto retry;
+ }
+
+#ifdef HAVE_ATEXIT
+ if (!first_lang)
+ atexit (free_langs); /* First person registers atexit() callback. */
+#endif
+
+ return lang;
+}
+
+
+hb_language_t
+hb_language_from_string (const char *str, int len)
+{
+ if (!str || !len || !*str)
+ return HB_LANGUAGE_INVALID;
+
+ char strbuf[32];
+ if (len >= 0) {
+ len = MIN (len, (int) sizeof (strbuf) - 1);
+ str = (char *) memcpy (strbuf, str, len);
+ strbuf[len] = '\0';
+ }
+
+ hb_language_item_t *item = lang_find_or_insert (str);
+
+ return likely (item) ? item->lang : HB_LANGUAGE_INVALID;
+}
+
+const char *
+hb_language_to_string (hb_language_t language)
+{
+ /* This is actually NULL-safe! */
+ return language->s;
+}
+
+hb_language_t
+hb_language_get_default (void)
+{
+ static hb_language_t default_language = HB_LANGUAGE_INVALID;
+
+ hb_language_t language = (hb_language_t) hb_atomic_ptr_get (&default_language);
+ if (unlikely (language == HB_LANGUAGE_INVALID)) {
+ language = hb_language_from_string (setlocale (LC_CTYPE, NULL), -1);
+ hb_atomic_ptr_cmpexch (&default_language, HB_LANGUAGE_INVALID, language);
+ }
+
+ return default_language;
+}
+
+
+/* hb_script_t */
+
+hb_script_t
+hb_script_from_iso15924_tag (hb_tag_t tag)
+{
+ if (unlikely (tag == HB_TAG_NONE))
+ return HB_SCRIPT_INVALID;
+
+ /* Be lenient, adjust case (one capital letter followed by three small letters) */
+ tag = (tag & 0xDFDFDFDF) | 0x00202020;
+
+ switch (tag) {
+
+ /* These graduated from the 'Q' private-area codes, but
+ * the old code is still aliased by Unicode, and the Qaai
+ * one in use by ICU. */
+ case HB_TAG('Q','a','a','i'): return HB_SCRIPT_INHERITED;
+ case HB_TAG('Q','a','a','c'): return HB_SCRIPT_COPTIC;
+
+ /* Script variants from http://unicode.org/iso15924/ */
+ case HB_TAG('C','y','r','s'): return HB_SCRIPT_CYRILLIC;
+ case HB_TAG('L','a','t','f'): return HB_SCRIPT_LATIN;
+ case HB_TAG('L','a','t','g'): return HB_SCRIPT_LATIN;
+ case HB_TAG('S','y','r','e'): return HB_SCRIPT_SYRIAC;
+ case HB_TAG('S','y','r','j'): return HB_SCRIPT_SYRIAC;
+ case HB_TAG('S','y','r','n'): return HB_SCRIPT_SYRIAC;
+ }
+
+ /* If it looks right, just use the tag as a script */
+ if (((uint32_t) tag & 0xE0E0E0E0) == 0x40606060)
+ return (hb_script_t) tag;
+
+ /* Otherwise, return unknown */
+ return HB_SCRIPT_UNKNOWN;
+}
+
+hb_script_t
+hb_script_from_string (const char *s, int len)
+{
+ return hb_script_from_iso15924_tag (hb_tag_from_string (s, len));
+}
+
+hb_tag_t
+hb_script_to_iso15924_tag (hb_script_t script)
+{
+ return (hb_tag_t) script;
+}
+
+hb_direction_t
+hb_script_get_horizontal_direction (hb_script_t script)
+{
+ /* http://goo.gl/x9ilM */
+ switch ((hb_tag_t) script)
+ {
+ /* Unicode-1.1 additions */
+ case HB_SCRIPT_ARABIC:
+ case HB_SCRIPT_HEBREW:
+
+ /* Unicode-3.0 additions */
+ case HB_SCRIPT_SYRIAC:
+ case HB_SCRIPT_THAANA:
+
+ /* Unicode-4.0 additions */
+ case HB_SCRIPT_CYPRIOT:
+
+ /* Unicode-4.1 additions */
+ case HB_SCRIPT_KHAROSHTHI:
+
+ /* Unicode-5.0 additions */
+ case HB_SCRIPT_PHOENICIAN:
+ case HB_SCRIPT_NKO:
+
+ /* Unicode-5.1 additions */
+ case HB_SCRIPT_LYDIAN:
+
+ /* Unicode-5.2 additions */
+ case HB_SCRIPT_AVESTAN:
+ case HB_SCRIPT_IMPERIAL_ARAMAIC:
+ case HB_SCRIPT_INSCRIPTIONAL_PAHLAVI:
+ case HB_SCRIPT_INSCRIPTIONAL_PARTHIAN:
+ case HB_SCRIPT_OLD_SOUTH_ARABIAN:
+ case HB_SCRIPT_OLD_TURKIC:
+ case HB_SCRIPT_SAMARITAN:
+
+ /* Unicode-6.0 additions */
+ case HB_SCRIPT_MANDAIC:
+
+ /* Unicode-6.1 additions */
+ case HB_SCRIPT_MEROITIC_CURSIVE:
+ case HB_SCRIPT_MEROITIC_HIEROGLYPHS:
+
+ return HB_DIRECTION_RTL;
+ }
+
+ return HB_DIRECTION_LTR;
+}
+
+
+/* hb_user_data_array_t */
+
+bool
+hb_user_data_array_t::set (hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy,
+ hb_bool_t replace,
+ hb_mutex_t &lock)
+{
+ if (!key)
+ return false;
+
+ if (replace) {
+ if (!data && !destroy) {
+ items.remove (key, lock);
+ return true;
+ }
+ }
+ hb_user_data_item_t item = {key, data, destroy};
+ bool ret = !!items.replace_or_insert (item, lock, replace);
+
+ return ret;
+}
+
+void *
+hb_user_data_array_t::get (hb_user_data_key_t *key,
+ hb_mutex_t &lock)
+{
+ hb_user_data_item_t item = {NULL };
+
+ return items.find (key, &item, lock) ? item.data : NULL;
+}
+
+void
+hb_user_data_array_t::finish (hb_mutex_t &lock)
+{
+ items.finish (lock);
+}
+
+
+/* hb_version */
+
+void
+hb_version (unsigned int *major,
+ unsigned int *minor,
+ unsigned int *micro)
+{
+ *major = HB_VERSION_MAJOR;
+ *minor = HB_VERSION_MINOR;
+ *micro = HB_VERSION_MICRO;
+}
+
+const char *
+hb_version_string (void)
+{
+ return HB_VERSION_STRING;
+}
+
+hb_bool_t
+hb_version_check (unsigned int major,
+ unsigned int minor,
+ unsigned int micro)
+{
+ return HB_VERSION_CHECK (major, minor, micro);
+}
+
+
diff --git a/src/hb-common.h b/src/hb-common.h
new file mode 100644
index 0000000..920bd32
--- /dev/null
+++ b/src/hb-common.h
@@ -0,0 +1,313 @@
+/*
+ * Copyright © 2007,2008,2009 Red Hat, Inc.
+ * 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.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_H_IN
+#error "Include <hb.h> instead."
+#endif
+
+#ifndef HB_COMMON_H
+#define HB_COMMON_H
+
+#ifndef HB_BEGIN_DECLS
+# ifdef __cplusplus
+# define HB_BEGIN_DECLS extern "C" {
+# define HB_END_DECLS }
+# else /* !__cplusplus */
+# define HB_BEGIN_DECLS
+# define HB_END_DECLS
+# endif /* !__cplusplus */
+#endif
+
+#if !defined (HB_DONT_DEFINE_STDINT)
+
+#if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || \
+ defined (_sgi) || defined (__sun) || defined (sun) || \
+ defined (__digital__) || defined (__HP_cc)
+# include <inttypes.h>
+#elif defined (_AIX)
+# include <sys/inttypes.h>
+/* VS 2010 (_MSC_VER 1600) has stdint.h */
+#elif defined (_MSC_VER) && _MSC_VER < 1600
+typedef __int8 int8_t;
+typedef unsigned __int8 uint8_t;
+typedef __int16 int16_t;
+typedef unsigned __int16 uint16_t;
+typedef __int32 int32_t;
+typedef unsigned __int32 uint32_t;
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#else
+# include <stdint.h>
+#endif
+
+#endif
+
+HB_BEGIN_DECLS
+
+
+typedef int hb_bool_t;
+
+typedef uint32_t hb_codepoint_t;
+typedef int32_t hb_position_t;
+typedef uint32_t hb_mask_t;
+
+typedef union _hb_var_int_t {
+ uint32_t u32;
+ int32_t i32;
+ uint16_t u16[2];
+ int16_t i16[2];
+ uint8_t u8[4];
+ int8_t i8[4];
+} hb_var_int_t;
+
+
+/* hb_tag_t */
+
+typedef uint32_t hb_tag_t;
+
+#define HB_TAG(a,b,c,d) ((hb_tag_t)((((uint8_t)(a))<<24)|(((uint8_t)(b))<<16)|(((uint8_t)(c))<<8)|((uint8_t)(d))))
+#define HB_UNTAG(tag) ((uint8_t)((tag)>>24)), ((uint8_t)((tag)>>16)), ((uint8_t)((tag)>>8)), ((uint8_t)(tag))
+
+#define HB_TAG_NONE HB_TAG(0,0,0,0)
+
+/* len=-1 means str is NUL-terminated */
+hb_tag_t
+hb_tag_from_string (const char *str, int len);
+
+
+/* hb_direction_t */
+
+typedef enum {
+ HB_DIRECTION_INVALID = 0,
+ HB_DIRECTION_LTR = 4,
+ HB_DIRECTION_RTL,
+ HB_DIRECTION_TTB,
+ HB_DIRECTION_BTT
+} hb_direction_t;
+
+/* len=-1 means str is NUL-terminated */
+hb_direction_t
+hb_direction_from_string (const char *str, int len);
+
+const char *
+hb_direction_to_string (hb_direction_t direction);
+
+#define HB_DIRECTION_IS_HORIZONTAL(dir) ((((unsigned int) (dir)) & ~1U) == 4)
+#define HB_DIRECTION_IS_VERTICAL(dir) ((((unsigned int) (dir)) & ~1U) == 6)
+#define HB_DIRECTION_IS_FORWARD(dir) ((((unsigned int) (dir)) & ~2U) == 4)
+#define HB_DIRECTION_IS_BACKWARD(dir) ((((unsigned int) (dir)) & ~2U) == 5)
+#define HB_DIRECTION_IS_VALID(dir) ((((unsigned int) (dir)) & ~3U) == 4)
+#define HB_DIRECTION_REVERSE(dir) ((hb_direction_t) (((unsigned int) (dir)) ^ 1)) /* Direction must be valid */
+
+
+/* hb_language_t */
+
+typedef struct hb_language_impl_t *hb_language_t;
+
+/* len=-1 means str is NUL-terminated */
+hb_language_t
+hb_language_from_string (const char *str, int len);
+
+const char *
+hb_language_to_string (hb_language_t language);
+
+#define HB_LANGUAGE_INVALID ((hb_language_t) NULL)
+
+hb_language_t
+hb_language_get_default (void);
+
+
+/* hb_script_t */
+
+/* http://unicode.org/iso15924/ */
+/* http://goo.gl/x9ilM */
+/* Unicode Character Database property: Script (sc) */
+typedef enum
+{
+ /* Unicode-1.1 additions */
+ HB_SCRIPT_COMMON = HB_TAG ('Z','y','y','y'),
+ HB_SCRIPT_ARABIC = HB_TAG ('A','r','a','b'),
+ HB_SCRIPT_ARMENIAN = HB_TAG ('A','r','m','n'),
+ HB_SCRIPT_BENGALI = HB_TAG ('B','e','n','g'),
+ HB_SCRIPT_BOPOMOFO = HB_TAG ('B','o','p','o'),
+ HB_SCRIPT_CANADIAN_ABORIGINAL = HB_TAG ('C','a','n','s'),
+ HB_SCRIPT_CHEROKEE = HB_TAG ('C','h','e','r'),
+ HB_SCRIPT_COPTIC = HB_TAG ('C','o','p','t'),
+ HB_SCRIPT_CYRILLIC = HB_TAG ('C','y','r','l'),
+ HB_SCRIPT_DEVANAGARI = HB_TAG ('D','e','v','a'),
+ HB_SCRIPT_GEORGIAN = HB_TAG ('G','e','o','r'),
+ HB_SCRIPT_GREEK = HB_TAG ('G','r','e','k'),
+ HB_SCRIPT_GUJARATI = HB_TAG ('G','u','j','r'),
+ HB_SCRIPT_GURMUKHI = HB_TAG ('G','u','r','u'),
+ HB_SCRIPT_HANGUL = HB_TAG ('H','a','n','g'),
+ HB_SCRIPT_HAN = HB_TAG ('H','a','n','i'),
+ HB_SCRIPT_HEBREW = HB_TAG ('H','e','b','r'),
+ HB_SCRIPT_HIRAGANA = HB_TAG ('H','i','r','a'),
+ HB_SCRIPT_INHERITED = HB_TAG ('Z','i','n','h'),
+ HB_SCRIPT_KANNADA = HB_TAG ('K','n','d','a'),
+ HB_SCRIPT_KATAKANA = HB_TAG ('K','a','n','a'),
+ HB_SCRIPT_LAO = HB_TAG ('L','a','o','o'),
+ HB_SCRIPT_LATIN = HB_TAG ('L','a','t','n'),
+ HB_SCRIPT_MALAYALAM = HB_TAG ('M','l','y','m'),
+ HB_SCRIPT_MONGOLIAN = HB_TAG ('M','o','n','g'),
+ HB_SCRIPT_OGHAM = HB_TAG ('O','g','a','m'),
+ HB_SCRIPT_ORIYA = HB_TAG ('O','r','y','a'),
+ HB_SCRIPT_RUNIC = HB_TAG ('R','u','n','r'),
+ HB_SCRIPT_SYRIAC = HB_TAG ('S','y','r','c'),
+ HB_SCRIPT_TAMIL = HB_TAG ('T','a','m','l'),
+ HB_SCRIPT_TELUGU = HB_TAG ('T','e','l','u'),
+ HB_SCRIPT_THAI = HB_TAG ('T','h','a','i'),
+ HB_SCRIPT_YI = HB_TAG ('Y','i','i','i'),
+
+ /* Unicode-2.0 additions */
+ HB_SCRIPT_TIBETAN = HB_TAG ('T','i','b','t'),
+
+ /* Unicode-3.0 additions */
+ HB_SCRIPT_ETHIOPIC = HB_TAG ('E','t','h','i'),
+ HB_SCRIPT_KHMER = HB_TAG ('K','h','m','r'),
+ HB_SCRIPT_MYANMAR = HB_TAG ('M','y','m','r'),
+ HB_SCRIPT_SINHALA = HB_TAG ('S','i','n','h'),
+ HB_SCRIPT_THAANA = HB_TAG ('T','h','a','a'),
+
+ /* Unicode-3.1 additions */
+ HB_SCRIPT_DESERET = HB_TAG ('D','s','r','t'),
+ HB_SCRIPT_GOTHIC = HB_TAG ('G','o','t','h'),
+ HB_SCRIPT_OLD_ITALIC = HB_TAG ('I','t','a','l'),
+
+ /* Unicode-3.2 additions */
+ HB_SCRIPT_BUHID = HB_TAG ('B','u','h','d'),
+ HB_SCRIPT_HANUNOO = HB_TAG ('H','a','n','o'),
+ HB_SCRIPT_TAGALOG = HB_TAG ('T','g','l','g'),
+ HB_SCRIPT_TAGBANWA = HB_TAG ('T','a','g','b'),
+
+ /* Unicode-4.0 additions */
+ HB_SCRIPT_BRAILLE = HB_TAG ('B','r','a','i'),
+ HB_SCRIPT_CYPRIOT = HB_TAG ('C','p','r','t'),
+ HB_SCRIPT_LIMBU = HB_TAG ('L','i','m','b'),
+ HB_SCRIPT_LINEAR_B = HB_TAG ('L','i','n','b'),
+ HB_SCRIPT_OSMANYA = HB_TAG ('O','s','m','a'),
+ HB_SCRIPT_SHAVIAN = HB_TAG ('S','h','a','w'),
+ HB_SCRIPT_TAI_LE = HB_TAG ('T','a','l','e'),
+ HB_SCRIPT_UGARITIC = HB_TAG ('U','g','a','r'),
+
+ /* Unicode-4.1 additions */
+ HB_SCRIPT_BUGINESE = HB_TAG ('B','u','g','i'),
+ HB_SCRIPT_GLAGOLITIC = HB_TAG ('G','l','a','g'),
+ HB_SCRIPT_KHAROSHTHI = HB_TAG ('K','h','a','r'),
+ HB_SCRIPT_NEW_TAI_LUE = HB_TAG ('T','a','l','u'),
+ HB_SCRIPT_OLD_PERSIAN = HB_TAG ('X','p','e','o'),
+ HB_SCRIPT_SYLOTI_NAGRI = HB_TAG ('S','y','l','o'),
+ HB_SCRIPT_TIFINAGH = HB_TAG ('T','f','n','g'),
+
+ /* Unicode-5.0 additions */
+ HB_SCRIPT_BALINESE = HB_TAG ('B','a','l','i'),
+ HB_SCRIPT_CUNEIFORM = HB_TAG ('X','s','u','x'),
+ HB_SCRIPT_NKO = HB_TAG ('N','k','o','o'),
+ HB_SCRIPT_PHAGS_PA = HB_TAG ('P','h','a','g'),
+ HB_SCRIPT_PHOENICIAN = HB_TAG ('P','h','n','x'),
+ HB_SCRIPT_UNKNOWN = HB_TAG ('Z','z','z','z'),
+
+ /* Unicode-5.1 additions */
+ HB_SCRIPT_CARIAN = HB_TAG ('C','a','r','i'),
+ HB_SCRIPT_CHAM = HB_TAG ('C','h','a','m'),
+ HB_SCRIPT_KAYAH_LI = HB_TAG ('K','a','l','i'),
+ HB_SCRIPT_LEPCHA = HB_TAG ('L','e','p','c'),
+ HB_SCRIPT_LYCIAN = HB_TAG ('L','y','c','i'),
+ HB_SCRIPT_LYDIAN = HB_TAG ('L','y','d','i'),
+ HB_SCRIPT_OL_CHIKI = HB_TAG ('O','l','c','k'),
+ HB_SCRIPT_REJANG = HB_TAG ('R','j','n','g'),
+ HB_SCRIPT_SAURASHTRA = HB_TAG ('S','a','u','r'),
+ HB_SCRIPT_SUNDANESE = HB_TAG ('S','u','n','d'),
+ HB_SCRIPT_VAI = HB_TAG ('V','a','i','i'),
+
+ /* Unicode-5.2 additions */
+ HB_SCRIPT_AVESTAN = HB_TAG ('A','v','s','t'),
+ HB_SCRIPT_BAMUM = HB_TAG ('B','a','m','u'),
+ HB_SCRIPT_EGYPTIAN_HIEROGLYPHS = HB_TAG ('E','g','y','p'),
+ HB_SCRIPT_IMPERIAL_ARAMAIC = HB_TAG ('A','r','m','i'),
+ HB_SCRIPT_INSCRIPTIONAL_PAHLAVI = HB_TAG ('P','h','l','i'),
+ HB_SCRIPT_INSCRIPTIONAL_PARTHIAN = HB_TAG ('P','r','t','i'),
+ HB_SCRIPT_JAVANESE = HB_TAG ('J','a','v','a'),
+ HB_SCRIPT_KAITHI = HB_TAG ('K','t','h','i'),
+ HB_SCRIPT_LISU = HB_TAG ('L','i','s','u'),
+ HB_SCRIPT_MEETEI_MAYEK = HB_TAG ('M','t','e','i'),
+ HB_SCRIPT_OLD_SOUTH_ARABIAN = HB_TAG ('S','a','r','b'),
+ HB_SCRIPT_OLD_TURKIC = HB_TAG ('O','r','k','h'),
+ HB_SCRIPT_SAMARITAN = HB_TAG ('S','a','m','r'),
+ HB_SCRIPT_TAI_THAM = HB_TAG ('L','a','n','a'),
+ HB_SCRIPT_TAI_VIET = HB_TAG ('T','a','v','t'),
+
+ /* Unicode-6.0 additions */
+ HB_SCRIPT_BATAK = HB_TAG ('B','a','t','k'),
+ HB_SCRIPT_BRAHMI = HB_TAG ('B','r','a','h'),
+ HB_SCRIPT_MANDAIC = HB_TAG ('M','a','n','d'),
+
+ /* Unicode-6.1 additions */
+ HB_SCRIPT_CHAKMA = HB_TAG ('C','a','k','m'),
+ HB_SCRIPT_MEROITIC_CURSIVE = HB_TAG ('M','e','r','c'),
+ HB_SCRIPT_MEROITIC_HIEROGLYPHS = HB_TAG ('M','e','r','o'),
+ HB_SCRIPT_MIAO = HB_TAG ('P','l','r','d'),
+ HB_SCRIPT_SHARADA = HB_TAG ('S','h','r','d'),
+ HB_SCRIPT_SORA_SOMPENG = HB_TAG ('S','o','r','a'),
+ HB_SCRIPT_TAKRI = HB_TAG ('T','a','k','r'),
+
+ /* No script set */
+ HB_SCRIPT_INVALID = HB_TAG_NONE
+} hb_script_t;
+
+
+/* Script functions */
+
+hb_script_t
+hb_script_from_iso15924_tag (hb_tag_t tag);
+
+/* suger for tag_from_string() then script_from_iso15924_tag */
+/* len=-1 means s is NUL-terminated */
+hb_script_t
+hb_script_from_string (const char *s, int len);
+
+hb_tag_t
+hb_script_to_iso15924_tag (hb_script_t script);
+
+hb_direction_t
+hb_script_get_horizontal_direction (hb_script_t script);
+
+
+/* User data */
+
+typedef struct hb_user_data_key_t {
+ /*< private >*/
+ char unused;
+} hb_user_data_key_t;
+
+typedef void (*hb_destroy_func_t) (void *user_data);
+
+
+HB_END_DECLS
+
+#endif /* HB_COMMON_H */
diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc
new file mode 100644
index 0000000..4152a39
--- /dev/null
+++ b/src/hb-coretext.cc
@@ -0,0 +1,357 @@
+/*
+ * Copyright © 2012 Mozilla Foundation.
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Mozilla Author(s): Jonathan Kew
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#define HB_SHAPER coretext
+#include "hb-shaper-impl-private.hh"
+
+#define GlyphID GlyphID_mac
+#include <ApplicationServices/ApplicationServices.h>
+#undef GlyphID
+
+#include "hb-coretext.h"
+
+
+#ifndef HB_DEBUG_CORETEXT
+#define HB_DEBUG_CORETEXT (HB_DEBUG+0)
+#endif
+
+
+HB_SHAPER_DATA_ENSURE_DECLARE(coretext, face)
+HB_SHAPER_DATA_ENSURE_DECLARE(coretext, font)
+
+
+/*
+ * shaper face data
+ */
+
+struct hb_coretext_shaper_face_data_t {
+ CGFontRef cg_font;
+};
+
+static void
+release_data (void *info, const void *data, size_t size)
+{
+ assert (hb_blob_get_length ((hb_blob_t *) info) == size &&
+ hb_blob_get_data ((hb_blob_t *) info, NULL) == data);
+
+ hb_blob_destroy ((hb_blob_t *) info);
+}
+
+hb_coretext_shaper_face_data_t *
+_hb_coretext_shaper_face_data_create (hb_face_t *face)
+{
+ hb_coretext_shaper_face_data_t *data = (hb_coretext_shaper_face_data_t *) calloc (1, sizeof (hb_coretext_shaper_face_data_t));
+ if (unlikely (!data))
+ return NULL;
+
+ hb_blob_t *blob = hb_face_reference_blob (face);
+ unsigned int blob_length;
+ const char *blob_data = hb_blob_get_data (blob, &blob_length);
+ if (unlikely (!blob_length))
+ DEBUG_MSG (CORETEXT, face, "Face has empty blob");
+
+ CGDataProviderRef provider = CGDataProviderCreateWithData (blob, blob_data, blob_length, &release_data);
+ data->cg_font = CGFontCreateWithDataProvider (provider);
+ CGDataProviderRelease (provider);
+
+ if (unlikely (!data->cg_font)) {
+ DEBUG_MSG (CORETEXT, face, "Face CGFontCreateWithDataProvider() failed");
+ free (data);
+ return NULL;
+ }
+
+ return data;
+}
+
+void
+_hb_coretext_shaper_face_data_destroy (hb_coretext_shaper_face_data_t *data)
+{
+ CFRelease (data->cg_font);
+ free (data);
+}
+
+
+/*
+ * shaper font data
+ */
+
+struct hb_coretext_shaper_font_data_t {
+ CTFontRef ct_font;
+};
+
+hb_coretext_shaper_font_data_t *
+_hb_coretext_shaper_font_data_create (hb_font_t *font)
+{
+ if (unlikely (!hb_coretext_shaper_face_data_ensure (font->face))) return NULL;
+
+ hb_coretext_shaper_font_data_t *data = (hb_coretext_shaper_font_data_t *) calloc (1, sizeof (hb_coretext_shaper_font_data_t));
+ if (unlikely (!data))
+ return NULL;
+
+ hb_face_t *face = font->face;
+ hb_coretext_shaper_face_data_t *face_data = HB_SHAPER_DATA_GET (face);
+
+ data->ct_font = CTFontCreateWithGraphicsFont (face_data->cg_font, font->y_scale, NULL, NULL);
+ if (unlikely (!data->ct_font)) {
+ DEBUG_MSG (CORETEXT, font, "Font CTFontCreateWithGraphicsFont() failed");
+ free (data);
+ return NULL;
+ }
+
+ return data;
+}
+
+void
+_hb_coretext_shaper_font_data_destroy (hb_coretext_shaper_font_data_t *data)
+{
+ CFRelease (data->ct_font);
+ free (data);
+}
+
+
+/*
+ * shaper shape_plan data
+ */
+
+struct hb_coretext_shaper_shape_plan_data_t {};
+
+hb_coretext_shaper_shape_plan_data_t *
+_hb_coretext_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan HB_UNUSED,
+ const hb_feature_t *user_features HB_UNUSED,
+ unsigned int num_user_features HB_UNUSED)
+{
+ return (hb_coretext_shaper_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED;
+}
+
+void
+_hb_coretext_shaper_shape_plan_data_destroy (hb_coretext_shaper_shape_plan_data_t *data HB_UNUSED)
+{
+}
+
+
+/*
+ * shaper
+ */
+
+CTFontRef
+hb_coretext_font_get_ct_font (hb_font_t *font)
+{
+ if (unlikely (!hb_coretext_shaper_font_data_ensure (font))) return 0;
+ hb_coretext_shaper_font_data_t *font_data = HB_SHAPER_DATA_GET (font);
+ return font_data->ct_font;
+}
+
+hb_bool_t
+_hb_coretext_shape (hb_shape_plan_t *shape_plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer,
+ const hb_feature_t *features,
+ unsigned int num_features)
+{
+ hb_face_t *face = font->face;
+ hb_coretext_shaper_face_data_t *face_data = HB_SHAPER_DATA_GET (face);
+ hb_coretext_shaper_font_data_t *font_data = HB_SHAPER_DATA_GET (font);
+
+#define FAIL(...) \
+ HB_STMT_START { \
+ DEBUG_MSG (CORETEXT, NULL, __VA_ARGS__); \
+ return false; \
+ } HB_STMT_END;
+
+ unsigned int scratch_size;
+ char *scratch = (char *) buffer->get_scratch_buffer (&scratch_size);
+
+#define utf16_index() var1.u32
+
+ UniChar *pchars = (UniChar *) scratch;
+ unsigned int chars_len = 0;
+ for (unsigned int i = 0; i < buffer->len; i++) {
+ hb_codepoint_t c = buffer->info[i].codepoint;
+ buffer->info[i].utf16_index() = chars_len;
+ if (likely (c < 0x10000))
+ pchars[chars_len++] = c;
+ else if (unlikely (c >= 0x110000))
+ pchars[chars_len++] = 0xFFFD;
+ else {
+ pchars[chars_len++] = 0xD800 + ((c - 0x10000) >> 10);
+ pchars[chars_len++] = 0xDC00 + ((c - 0x10000) & ((1 << 10) - 1));
+ }
+ }
+
+#undef utf16_index
+
+ CFStringRef string_ref = CFStringCreateWithCharactersNoCopy (kCFAllocatorDefault,
+ pchars, chars_len,
+ kCFAllocatorNull);
+
+ CFDictionaryRef attrs = CFDictionaryCreate (kCFAllocatorDefault,
+ (const void**) &kCTFontAttributeName,
+ (const void**) &font_data->ct_font,
+ 1, // count of attributes
+ &kCFTypeDictionaryKeyCallBacks,
+ &kCFTypeDictionaryValueCallBacks);
+
+ // TODO: support features
+
+ // Now we can create an attributed string
+ CFAttributedStringRef attr_string = CFAttributedStringCreate (kCFAllocatorDefault, string_ref, attrs);
+ CFRelease (string_ref);
+ CFRelease (attrs);
+
+ // Create the CoreText line from our string, then we're done with it
+ CTLineRef line = CTLineCreateWithAttributedString (attr_string);
+ CFRelease (attr_string);
+
+ // and finally retrieve the glyph data and store into the gfxTextRun
+ CFArrayRef glyph_runs = CTLineGetGlyphRuns (line);
+ unsigned int num_runs = CFArrayGetCount (glyph_runs);
+
+ // Iterate through the glyph runs.
+ bool success = true;
+ buffer->len = 0;
+
+ const CFRange range_all = CFRangeMake (0, 0);
+
+ for (unsigned int i = 0; i < num_runs; i++) {
+ CTRunRef run = (CTRunRef) CFArrayGetValueAtIndex (glyph_runs, i);
+
+ unsigned int num_glyphs = CTRunGetGlyphCount (run);
+ if (num_glyphs == 0)
+ continue;
+
+ buffer->ensure (buffer->len + num_glyphs);
+
+ // retrieve the laid-out glyph data from the CTRun
+
+ // Testing indicates that CTRunGetGlyphsPtr (almost?) always succeeds,
+ // and so copying data to our own buffer with CTRunGetGlyphs will be
+ // extremely rare.
+
+ unsigned int scratch_size;
+ char *scratch = (char *) buffer->get_scratch_buffer (&scratch_size);
+
+#define ALLOCATE_ARRAY(Type, name, len) \
+ Type *name = (Type *) scratch; \
+ scratch += (len) * sizeof ((name)[0]); \
+ scratch_size -= (len) * sizeof ((name)[0]);
+
+ const CGGlyph* glyphs = CTRunGetGlyphsPtr (run);
+ if (!glyphs) {
+ ALLOCATE_ARRAY (CGGlyph, glyph_buf, num_glyphs);
+ CTRunGetGlyphs (run, range_all, glyph_buf);
+ glyphs = glyph_buf;
+ }
+
+ const CGPoint* positions = CTRunGetPositionsPtr (run);
+ if (!positions) {
+ ALLOCATE_ARRAY (CGPoint, position_buf, num_glyphs);
+ CTRunGetPositions (run, range_all, position_buf);
+ positions = position_buf;
+ }
+
+ const CFIndex* string_indices = CTRunGetStringIndicesPtr (run);
+ if (!string_indices) {
+ ALLOCATE_ARRAY (CFIndex, index_buf, num_glyphs);
+ CTRunGetStringIndices (run, range_all, index_buf);
+ string_indices = index_buf;
+ }
+
+#undef ALLOCATE_ARRAY
+
+ double run_width = CTRunGetTypographicBounds (run, range_all, NULL, NULL, NULL);
+
+ for (unsigned int j = 0; j < num_glyphs; j++) {
+ double advance = (j + 1 < num_glyphs ? positions[j + 1].x : positions[0].x + run_width) - positions[j].x;
+
+ hb_glyph_info_t *info = &buffer->info[buffer->len];
+ hb_glyph_position_t *pos = &buffer->pos[buffer->len];
+
+ info->codepoint = glyphs[j];
+ info->cluster = string_indices[j];
+
+ // currently, we do all x-positioning by setting the advance, we never use x-offset
+ info->mask = advance;
+ info->var1.u32 = 0;
+ info->var2.u32 = positions[j].y;
+
+ buffer->len++;
+ }
+ }
+
+ buffer->clear_positions ();
+
+ unsigned int count = buffer->len;
+ for (unsigned int i = 0; i < count; ++i) {
+ hb_glyph_info_t *info = &buffer->info[i];
+ hb_glyph_position_t *pos = &buffer->pos[i];
+
+ /* TODO vertical */
+ pos->x_advance = info->mask;
+ pos->x_offset = info->var1.u32;
+ pos->y_offset = info->var2.u32;
+ }
+
+ // Fix up clusters so that we never return out-of-order indices;
+ // if core text has reordered glyphs, we'll merge them to the
+ // beginning of the reordered cluster.
+ // This does *not* mean we'll form the same clusters as Uniscribe
+ // or the native OT backend, only that the cluster indices will be
+ // non-decreasing in the output buffer.
+ if (HB_DIRECTION_IS_FORWARD (buffer->props.direction)) {
+ unsigned int prev_cluster = 0;
+ for (unsigned int i = 0; i < count; i++) {
+ unsigned int curr_cluster = buffer->info[i].cluster;
+ if (curr_cluster < prev_cluster) {
+ for (unsigned int j = i; j > 0; j--) {
+ if (buffer->info[j - 1].cluster > curr_cluster)
+ buffer->info[j - 1].cluster = curr_cluster;
+ else
+ break;
+ }
+ }
+ prev_cluster = curr_cluster;
+ }
+ } else {
+ // For RTL runs, we make them non-increasing instead.
+ unsigned int prev_cluster = (unsigned int)-1;
+ for (unsigned int i = 0; i < count; i++) {
+ unsigned int curr_cluster = buffer->info[i].cluster;
+ if (curr_cluster > prev_cluster) {
+ for (unsigned int j = i; j > 0; j--) {
+ if (buffer->info[j - 1].cluster < curr_cluster)
+ buffer->info[j - 1].cluster = curr_cluster;
+ else
+ break;
+ }
+ }
+ prev_cluster = curr_cluster;
+ }
+ }
+
+ return true;
+}
diff --git a/src/hb-coretext.h b/src/hb-coretext.h
new file mode 100644
index 0000000..0b34203
--- /dev/null
+++ b/src/hb-coretext.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright © 2012 Mozilla Foundation.
+ *
+ * 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.
+ *
+ * Mozilla Author(s): Jonathan Kew
+ */
+
+#ifndef HB_CORETEXT_H
+#define HB_CORETEXT_H
+
+#include "hb.h"
+
+#include <ApplicationServices/ApplicationServices.h>
+
+HB_BEGIN_DECLS
+
+
+CTFontRef
+hb_coretext_font_get_ct_font (hb_font_t *font);
+
+
+HB_END_DECLS
+
+#endif /* HB_CORETEXT_H */
diff --git a/src/hb-fallback-shape.cc b/src/hb-fallback-shape.cc
new file mode 100644
index 0000000..d7bde09
--- /dev/null
+++ b/src/hb-fallback-shape.cc
@@ -0,0 +1,129 @@
+/*
+ * Copyright © 2011 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
+ */
+
+#define HB_SHAPER fallback
+#include "hb-shaper-impl-private.hh"
+
+
+/*
+ * shaper face data
+ */
+
+struct hb_fallback_shaper_face_data_t {};
+
+hb_fallback_shaper_face_data_t *
+_hb_fallback_shaper_face_data_create (hb_face_t *face)
+{
+ return (hb_fallback_shaper_face_data_t *) HB_SHAPER_DATA_SUCCEEDED;
+}
+
+void
+_hb_fallback_shaper_face_data_destroy (hb_fallback_shaper_face_data_t *data)
+{
+}
+
+
+/*
+ * shaper font data
+ */
+
+struct hb_fallback_shaper_font_data_t {};
+
+hb_fallback_shaper_font_data_t *
+_hb_fallback_shaper_font_data_create (hb_font_t *font)
+{
+ return (hb_fallback_shaper_font_data_t *) HB_SHAPER_DATA_SUCCEEDED;
+}
+
+void
+_hb_fallback_shaper_font_data_destroy (hb_fallback_shaper_font_data_t *data)
+{
+}
+
+
+/*
+ * shaper shape_plan data
+ */
+
+struct hb_fallback_shaper_shape_plan_data_t {};
+
+hb_fallback_shaper_shape_plan_data_t *
+_hb_fallback_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan HB_UNUSED,
+ const hb_feature_t *user_features HB_UNUSED,
+ unsigned int num_user_features HB_UNUSED)
+{
+ return (hb_fallback_shaper_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED;
+}
+
+void
+_hb_fallback_shaper_shape_plan_data_destroy (hb_fallback_shaper_shape_plan_data_t *data HB_UNUSED)
+{
+}
+
+
+/*
+ * shaper
+ */
+
+hb_bool_t
+_hb_fallback_shape (hb_shape_plan_t *shape_plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer,
+ const hb_feature_t *features HB_UNUSED,
+ unsigned int num_features HB_UNUSED)
+{
+ hb_codepoint_t space;
+ font->get_glyph (' ', 0, &space);
+
+ buffer->guess_properties ();
+ buffer->clear_positions ();
+
+ unsigned int count = buffer->len;
+
+ for (unsigned int i = 0; i < count; i++)
+ {
+ if (buffer->unicode->is_zero_width (buffer->info[i].codepoint)) {
+ buffer->info[i].codepoint = space;
+ buffer->pos[i].x_advance = 0;
+ buffer->pos[i].y_advance = 0;
+ continue;
+ }
+ font->get_glyph (buffer->info[i].codepoint, 0, &buffer->info[i].codepoint);
+ font->get_glyph_advance_for_direction (buffer->info[i].codepoint,
+ buffer->props.direction,
+ &buffer->pos[i].x_advance,
+ &buffer->pos[i].y_advance);
+ font->subtract_glyph_origin_for_direction (buffer->info[i].codepoint,
+ buffer->props.direction,
+ &buffer->pos[i].x_offset,
+ &buffer->pos[i].y_offset);
+ }
+
+ if (HB_DIRECTION_IS_BACKWARD (buffer->props.direction))
+ hb_buffer_reverse (buffer);
+
+ return true;
+}
diff --git a/src/hb-font-private.hh b/src/hb-font-private.hh
new file mode 100644
index 0000000..b6dafbf
--- /dev/null
+++ b/src/hb-font-private.hh
@@ -0,0 +1,460 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ * Copyright © 2011 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_FONT_PRIVATE_HH
+#define HB_FONT_PRIVATE_HH
+
+#include "hb-private.hh"
+
+#include "hb-font.h"
+#include "hb-object-private.hh"
+#include "hb-shaper-private.hh"
+#include "hb-shape-plan-private.hh"
+
+
+
+/*
+ * hb_font_funcs_t
+ */
+
+#define HB_FONT_FUNCS_IMPLEMENT_CALLBACKS \
+ HB_FONT_FUNC_IMPLEMENT (glyph) \
+ HB_FONT_FUNC_IMPLEMENT (glyph_h_advance) \
+ HB_FONT_FUNC_IMPLEMENT (glyph_v_advance) \
+ HB_FONT_FUNC_IMPLEMENT (glyph_h_origin) \
+ HB_FONT_FUNC_IMPLEMENT (glyph_v_origin) \
+ HB_FONT_FUNC_IMPLEMENT (glyph_h_kerning) \
+ HB_FONT_FUNC_IMPLEMENT (glyph_v_kerning) \
+ HB_FONT_FUNC_IMPLEMENT (glyph_extents) \
+ HB_FONT_FUNC_IMPLEMENT (glyph_contour_point) \
+ HB_FONT_FUNC_IMPLEMENT (glyph_name) \
+ HB_FONT_FUNC_IMPLEMENT (glyph_from_name) \
+ /* ^--- Add new callbacks here */
+
+struct hb_font_funcs_t {
+ hb_object_header_t header;
+ ASSERT_POD ();
+
+ hb_bool_t immutable;
+
+ /* Don't access these directly. Call hb_font_get_*() instead. */
+
+ struct {
+#define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_func_t name;
+ HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
+ } get;
+
+ struct {
+#define HB_FONT_FUNC_IMPLEMENT(name) void *name;
+ HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
+ } user_data;
+
+ struct {
+#define HB_FONT_FUNC_IMPLEMENT(name) hb_destroy_func_t name;
+ HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
+ } destroy;
+};
+
+
+/*
+ * hb_face_t
+ */
+
+struct hb_face_t {
+ hb_object_header_t header;
+ ASSERT_POD ();
+
+ hb_bool_t immutable;
+
+ hb_reference_table_func_t reference_table_func;
+ void *user_data;
+ hb_destroy_func_t destroy;
+
+ unsigned int index;
+ mutable unsigned int upem;
+
+ struct hb_shaper_data_t shaper_data;
+
+ struct plan_node_t {
+ hb_shape_plan_t *shape_plan;
+ plan_node_t *next;
+ } *shape_plans;
+
+
+ inline hb_blob_t *reference_table (hb_tag_t tag) const
+ {
+ hb_blob_t *blob;
+
+ if (unlikely (!this || !reference_table_func))
+ return hb_blob_get_empty ();
+
+ blob = reference_table_func (/*XXX*/const_cast<hb_face_t *> (this), tag, user_data);
+ if (unlikely (!blob))
+ return hb_blob_get_empty ();
+
+ return blob;
+ }
+
+ inline unsigned int get_upem (void) const
+ {
+ if (unlikely (!upem))
+ load_upem ();
+ return upem;
+ }
+
+ private:
+ HB_INTERNAL void load_upem (void) const;
+};
+
+#define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS
+#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_PROTOTYPE(shaper, face);
+#include "hb-shaper-list.hh"
+#undef HB_SHAPER_IMPLEMENT
+#undef HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS
+
+
+/*
+ * hb_font_t
+ */
+
+struct hb_font_t {
+ hb_object_header_t header;
+ ASSERT_POD ();
+
+ hb_bool_t immutable;
+
+ hb_font_t *parent;
+ hb_face_t *face;
+
+ int x_scale;
+ int y_scale;
+
+ unsigned int x_ppem;
+ unsigned int y_ppem;
+
+ hb_font_funcs_t *klass;
+ void *user_data;
+ hb_destroy_func_t destroy;
+
+ struct hb_shaper_data_t shaper_data;
+
+
+ /* Convert from font-space to user-space */
+ inline hb_position_t em_scale_x (int16_t v) { return em_scale (v, this->x_scale); }
+ inline hb_position_t em_scale_y (int16_t v) { return em_scale (v, this->y_scale); }
+
+ /* Convert from parent-font user-space to our user-space */
+ inline hb_position_t parent_scale_x_distance (hb_position_t v) {
+ if (unlikely (parent && parent->x_scale != x_scale))
+ return v * (int64_t) this->x_scale / this->parent->x_scale;
+ return v;
+ }
+ inline hb_position_t parent_scale_y_distance (hb_position_t v) {
+ if (unlikely (parent && parent->y_scale != y_scale))
+ return v * (int64_t) this->y_scale / this->parent->y_scale;
+ return v;
+ }
+ inline hb_position_t parent_scale_x_position (hb_position_t v) {
+ return parent_scale_x_distance (v);
+ }
+ inline hb_position_t parent_scale_y_position (hb_position_t v) {
+ return parent_scale_y_distance (v);
+ }
+
+ inline void parent_scale_distance (hb_position_t *x, hb_position_t *y) {
+ *x = parent_scale_x_distance (*x);
+ *y = parent_scale_y_distance (*y);
+ }
+ inline void parent_scale_position (hb_position_t *x, hb_position_t *y) {
+ *x = parent_scale_x_position (*x);
+ *y = parent_scale_y_position (*y);
+ }
+
+
+ /* Public getters */
+
+ inline hb_bool_t get_glyph (hb_codepoint_t unicode, hb_codepoint_t variation_selector,
+ hb_codepoint_t *glyph)
+ {
+ *glyph = 0;
+ return klass->get.glyph (this, user_data,
+ unicode, variation_selector, glyph,
+ klass->user_data.glyph);
+ }
+
+ inline hb_position_t get_glyph_h_advance (hb_codepoint_t glyph)
+ {
+ return klass->get.glyph_h_advance (this, user_data,
+ glyph,
+ klass->user_data.glyph_h_advance);
+ }
+
+ inline hb_position_t get_glyph_v_advance (hb_codepoint_t glyph)
+ {
+ return klass->get.glyph_v_advance (this, user_data,
+ glyph,
+ klass->user_data.glyph_v_advance);
+ }
+
+ inline hb_bool_t get_glyph_h_origin (hb_codepoint_t glyph,
+ hb_position_t *x, hb_position_t *y)
+ {
+ *x = *y = 0;
+ return klass->get.glyph_h_origin (this, user_data,
+ glyph, x, y,
+ klass->user_data.glyph_h_origin);
+ }
+
+ inline hb_bool_t get_glyph_v_origin (hb_codepoint_t glyph,
+ hb_position_t *x, hb_position_t *y)
+ {
+ *x = *y = 0;
+ return klass->get.glyph_v_origin (this, user_data,
+ glyph, x, y,
+ klass->user_data.glyph_v_origin);
+ }
+
+ inline hb_position_t get_glyph_h_kerning (hb_codepoint_t left_glyph, hb_codepoint_t right_glyph)
+ {
+ return klass->get.glyph_h_kerning (this, user_data,
+ left_glyph, right_glyph,
+ klass->user_data.glyph_h_kerning);
+ }
+
+ inline hb_position_t get_glyph_v_kerning (hb_codepoint_t left_glyph, hb_codepoint_t right_glyph)
+ {
+ return klass->get.glyph_v_kerning (this, user_data,
+ left_glyph, right_glyph,
+ klass->user_data.glyph_v_kerning);
+ }
+
+ inline hb_bool_t get_glyph_extents (hb_codepoint_t glyph,
+ hb_glyph_extents_t *extents)
+ {
+ memset (extents, 0, sizeof (*extents));
+ return klass->get.glyph_extents (this, user_data,
+ glyph,
+ extents,
+ klass->user_data.glyph_extents);
+ }
+
+ inline hb_bool_t get_glyph_contour_point (hb_codepoint_t glyph, unsigned int point_index,
+ hb_position_t *x, hb_position_t *y)
+ {
+ *x = *y = 0;
+ return klass->get.glyph_contour_point (this, user_data,
+ glyph, point_index,
+ x, y,
+ klass->user_data.glyph_contour_point);
+ }
+
+ inline hb_bool_t get_glyph_name (hb_codepoint_t glyph,
+ char *name, unsigned int size)
+ {
+ if (size) *name = '\0';
+ return klass->get.glyph_name (this, user_data,
+ glyph,
+ name, size,
+ klass->user_data.glyph_name);
+ }
+
+ inline hb_bool_t get_glyph_from_name (const char *name, int len, /* -1 means nul-terminated */
+ hb_codepoint_t *glyph)
+ {
+ *glyph = 0;
+ if (len == -1) len = strlen (name);
+ return klass->get.glyph_from_name (this, user_data,
+ name, len,
+ glyph,
+ klass->user_data.glyph_from_name);
+ }
+
+
+ /* A bit higher-level, and with fallback */
+
+ inline void get_glyph_advance_for_direction (hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y)
+ {
+ if (likely (HB_DIRECTION_IS_HORIZONTAL (direction))) {
+ *x = get_glyph_h_advance (glyph);
+ *y = 0;
+ } else {
+ *x = 0;
+ *y = get_glyph_v_advance (glyph);
+ }
+ }
+
+ /* Internal only */
+ inline void guess_v_origin_minus_h_origin (hb_codepoint_t glyph,
+ hb_position_t *x, hb_position_t *y)
+ {
+ *x = get_glyph_h_advance (glyph) / 2;
+
+ /* TODO use font_metics.ascent */
+ *y = y_scale;
+ }
+
+ inline void get_glyph_origin_for_direction (hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y)
+ {
+ if (likely (HB_DIRECTION_IS_HORIZONTAL (direction))) {
+ hb_bool_t ret = get_glyph_h_origin (glyph, x, y);
+ if (!ret && (ret = get_glyph_v_origin (glyph, x, y))) {
+ hb_position_t dx, dy;
+ guess_v_origin_minus_h_origin (glyph, &dx, &dy);
+ *x -= dx; *y -= dy;
+ }
+ } else {
+ hb_bool_t ret = get_glyph_v_origin (glyph, x, y);
+ if (!ret && (ret = get_glyph_h_origin (glyph, x, y))) {
+ hb_position_t dx, dy;
+ guess_v_origin_minus_h_origin (glyph, &dx, &dy);
+ *x += dx; *y += dy;
+ }
+ }
+ }
+
+ inline void add_glyph_origin_for_direction (hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y)
+ {
+ hb_position_t origin_x, origin_y;
+
+ get_glyph_origin_for_direction (glyph, direction, &origin_x, &origin_y);
+
+ *x += origin_x;
+ *y += origin_y;
+ }
+
+ inline void subtract_glyph_origin_for_direction (hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y)
+ {
+ hb_position_t origin_x, origin_y;
+
+ get_glyph_origin_for_direction (glyph, direction, &origin_x, &origin_y);
+
+ *x -= origin_x;
+ *y -= origin_y;
+ }
+
+ inline void get_glyph_kerning_for_direction (hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y)
+ {
+ if (likely (HB_DIRECTION_IS_HORIZONTAL (direction))) {
+ *x = get_glyph_h_kerning (first_glyph, second_glyph);
+ *y = 0;
+ } else {
+ *x = 0;
+ *y = get_glyph_v_kerning (first_glyph, second_glyph);
+ }
+ }
+
+ inline hb_bool_t get_glyph_extents_for_origin (hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_glyph_extents_t *extents)
+ {
+ hb_bool_t ret = get_glyph_extents (glyph, extents);
+
+ if (ret)
+ subtract_glyph_origin_for_direction (glyph, direction, &extents->x_bearing, &extents->y_bearing);
+
+ return ret;
+ }
+
+ inline hb_bool_t get_glyph_contour_point_for_origin (hb_codepoint_t glyph, unsigned int point_index,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y)
+ {
+ hb_bool_t ret = get_glyph_contour_point (glyph, point_index, x, y);
+
+ if (ret)
+ subtract_glyph_origin_for_direction (glyph, direction, x, y);
+
+ return ret;
+ }
+
+ /* Generates gidDDD if glyph has no name. */
+ inline void
+ glyph_to_string (hb_codepoint_t glyph,
+ char *s, unsigned int size)
+ {
+ if (get_glyph_name (glyph, s, size)) return;
+
+ snprintf (s, size, "gid%u", glyph);
+ }
+
+ /* Parses gidDDD and uniUUUU strings automatically. */
+ inline hb_bool_t
+ glyph_from_string (const char *s, int len, /* -1 means nul-terminated */
+ hb_codepoint_t *glyph)
+ {
+ if (get_glyph_from_name (s, len, glyph)) return true;
+
+ if (len == -1) len = strlen (s);
+
+ /* Straight glyph index. */
+ if (hb_codepoint_parse (s, len, 10, glyph))
+ return true;
+
+ if (len > 3)
+ {
+ /* gidDDD syntax for glyph indices. */
+ if (0 == strncmp (s, "gid", 3) &&
+ hb_codepoint_parse (s + 3, len - 3, 10, glyph))
+ return true;
+
+ /* uniUUUU and other Unicode character indices. */
+ hb_codepoint_t unichar;
+ if (0 == strncmp (s, "uni", 3) &&
+ hb_codepoint_parse (s + 3, len - 3, 16, &unichar) &&
+ get_glyph (unichar, 0, glyph))
+ return true;
+ }
+
+ return false;
+ }
+
+ private:
+ inline hb_position_t em_scale (int16_t v, int scale) { return v * (int64_t) scale / hb_face_get_upem (this->face); }
+};
+
+#define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS
+#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_PROTOTYPE(shaper, font);
+#include "hb-shaper-list.hh"
+#undef HB_SHAPER_IMPLEMENT
+#undef HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS
+
+
+#endif /* HB_FONT_PRIVATE_HH */
diff --git a/src/hb-font.cc b/src/hb-font.cc
new file mode 100644
index 0000000..922dee3
--- /dev/null
+++ b/src/hb-font.cc
@@ -0,0 +1,981 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-private.hh"
+
+#include "hb-ot-layout-private.hh"
+
+#include "hb-font-private.hh"
+#include "hb-blob.h"
+#include "hb-open-file-private.hh"
+#include "hb-ot-head-table.hh"
+
+#include "hb-cache-private.hh"
+
+#include <string.h>
+
+
+
+/*
+ * hb_font_funcs_t
+ */
+
+static hb_bool_t
+hb_font_get_glyph_nil (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t unicode,
+ hb_codepoint_t variation_selector,
+ hb_codepoint_t *glyph,
+ void *user_data HB_UNUSED)
+{
+ if (font->parent)
+ return font->parent->get_glyph (unicode, variation_selector, glyph);
+
+ *glyph = 0;
+ return false;
+}
+
+static hb_position_t
+hb_font_get_glyph_h_advance_nil (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t glyph,
+ void *user_data HB_UNUSED)
+{
+ if (font->parent)
+ return font->parent_scale_x_distance (font->parent->get_glyph_h_advance (glyph));
+
+ return font->x_scale;
+}
+
+static hb_position_t
+hb_font_get_glyph_v_advance_nil (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t glyph,
+ void *user_data HB_UNUSED)
+{
+ if (font->parent)
+ return font->parent_scale_y_distance (font->parent->get_glyph_v_advance (glyph));
+
+ return font->y_scale;
+}
+
+static hb_bool_t
+hb_font_get_glyph_h_origin_nil (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t glyph,
+ hb_position_t *x,
+ hb_position_t *y,
+ void *user_data HB_UNUSED)
+{
+ if (font->parent) {
+ hb_bool_t ret = font->parent->get_glyph_h_origin (glyph, x, y);
+ if (ret)
+ font->parent_scale_position (x, y);
+ return ret;
+ }
+
+ *x = *y = 0;
+ return false;
+}
+
+static hb_bool_t
+hb_font_get_glyph_v_origin_nil (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t glyph,
+ hb_position_t *x,
+ hb_position_t *y,
+ void *user_data HB_UNUSED)
+{
+ if (font->parent) {
+ hb_bool_t ret = font->parent->get_glyph_v_origin (glyph, x, y);
+ if (ret)
+ font->parent_scale_position (x, y);
+ return ret;
+ }
+
+ *x = *y = 0;
+ return false;
+}
+
+static hb_position_t
+hb_font_get_glyph_h_kerning_nil (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t left_glyph,
+ hb_codepoint_t right_glyph,
+ void *user_data HB_UNUSED)
+{
+ if (font->parent)
+ return font->parent_scale_x_distance (font->parent->get_glyph_h_kerning (left_glyph, right_glyph));
+
+ return 0;
+}
+
+static hb_position_t
+hb_font_get_glyph_v_kerning_nil (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t top_glyph,
+ hb_codepoint_t bottom_glyph,
+ void *user_data HB_UNUSED)
+{
+ if (font->parent)
+ return font->parent_scale_y_distance (font->parent->get_glyph_v_kerning (top_glyph, bottom_glyph));
+
+ return 0;
+}
+
+static hb_bool_t
+hb_font_get_glyph_extents_nil (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t glyph,
+ hb_glyph_extents_t *extents,
+ void *user_data HB_UNUSED)
+{
+ if (font->parent) {
+ hb_bool_t ret = font->parent->get_glyph_extents (glyph, extents);
+ if (ret) {
+ font->parent_scale_position (&extents->x_bearing, &extents->y_bearing);
+ font->parent_scale_distance (&extents->width, &extents->height);
+ }
+ return ret;
+ }
+
+ memset (extents, 0, sizeof (*extents));
+ return false;
+}
+
+static hb_bool_t
+hb_font_get_glyph_contour_point_nil (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t glyph,
+ unsigned int point_index,
+ hb_position_t *x,
+ hb_position_t *y,
+ void *user_data HB_UNUSED)
+{
+ if (font->parent) {
+ hb_bool_t ret = font->parent->get_glyph_contour_point (glyph, point_index, x, y);
+ if (ret)
+ font->parent_scale_position (x, y);
+ return ret;
+ }
+
+ *x = *y = 0;
+ return false;
+}
+
+static hb_bool_t
+hb_font_get_glyph_name_nil (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t glyph,
+ char *name, unsigned int size,
+ void *user_data HB_UNUSED)
+{
+ if (font->parent)
+ return font->parent->get_glyph_name (glyph, name, size);
+
+ if (size) *name = '\0';
+ return false;
+}
+
+static hb_bool_t
+hb_font_get_glyph_from_name_nil (hb_font_t *font,
+ void *font_data HB_UNUSED,
+ const char *name, int len, /* -1 means nul-terminated */
+ hb_codepoint_t *glyph,
+ void *user_data HB_UNUSED)
+{
+ if (font->parent)
+ return font->parent->get_glyph_from_name (name, len, glyph);
+
+ *glyph = 0;
+ return false;
+}
+
+
+static const hb_font_funcs_t _hb_font_funcs_nil = {
+ HB_OBJECT_HEADER_STATIC,
+
+ true, /* immutable */
+
+ {
+#define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_nil,
+ HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
+ }
+};
+
+
+hb_font_funcs_t *
+hb_font_funcs_create (void)
+{
+ hb_font_funcs_t *ffuncs;
+
+ if (!(ffuncs = hb_object_create<hb_font_funcs_t> ()))
+ return hb_font_funcs_get_empty ();
+
+ ffuncs->get = _hb_font_funcs_nil.get;
+
+ return ffuncs;
+}
+
+hb_font_funcs_t *
+hb_font_funcs_get_empty (void)
+{
+ return const_cast<hb_font_funcs_t *> (&_hb_font_funcs_nil);
+}
+
+hb_font_funcs_t *
+hb_font_funcs_reference (hb_font_funcs_t *ffuncs)
+{
+ return hb_object_reference (ffuncs);
+}
+
+void
+hb_font_funcs_destroy (hb_font_funcs_t *ffuncs)
+{
+ if (!hb_object_destroy (ffuncs)) return;
+
+#define HB_FONT_FUNC_IMPLEMENT(name) if (ffuncs->destroy.name) \
+ ffuncs->destroy.name (ffuncs->user_data.name);
+ HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
+
+ free (ffuncs);
+}
+
+hb_bool_t
+hb_font_funcs_set_user_data (hb_font_funcs_t *ffuncs,
+ hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy,
+ hb_bool_t replace)
+{
+ return hb_object_set_user_data (ffuncs, key, data, destroy, replace);
+}
+
+void *
+hb_font_funcs_get_user_data (hb_font_funcs_t *ffuncs,
+ hb_user_data_key_t *key)
+{
+ return hb_object_get_user_data (ffuncs, key);
+}
+
+
+void
+hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs)
+{
+ if (hb_object_is_inert (ffuncs))
+ return;
+
+ ffuncs->immutable = true;
+}
+
+hb_bool_t
+hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs)
+{
+ return ffuncs->immutable;
+}
+
+
+#define HB_FONT_FUNC_IMPLEMENT(name) \
+ \
+void \
+hb_font_funcs_set_##name##_func (hb_font_funcs_t *ffuncs, \
+ hb_font_get_##name##_func_t func, \
+ void *user_data, \
+ hb_destroy_func_t destroy) \
+{ \
+ if (ffuncs->immutable) { \
+ if (destroy) \
+ destroy (user_data); \
+ return; \
+ } \
+ \
+ if (ffuncs->destroy.name) \
+ ffuncs->destroy.name (ffuncs->user_data.name); \
+ \
+ if (func) { \
+ ffuncs->get.name = func; \
+ ffuncs->user_data.name = user_data; \
+ ffuncs->destroy.name = destroy; \
+ } else { \
+ ffuncs->get.name = hb_font_get_##name##_nil; \
+ ffuncs->user_data.name = NULL; \
+ ffuncs->destroy.name = NULL; \
+ } \
+}
+
+HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
+
+
+/* Public getters */
+
+hb_bool_t
+hb_font_get_glyph (hb_font_t *font,
+ hb_codepoint_t unicode, hb_codepoint_t variation_selector,
+ hb_codepoint_t *glyph)
+{
+ return font->get_glyph (unicode, variation_selector, glyph);
+}
+
+hb_position_t
+hb_font_get_glyph_h_advance (hb_font_t *font,
+ hb_codepoint_t glyph)
+{
+ return font->get_glyph_h_advance (glyph);
+}
+
+hb_position_t
+hb_font_get_glyph_v_advance (hb_font_t *font,
+ hb_codepoint_t glyph)
+{
+ return font->get_glyph_v_advance (glyph);
+}
+
+hb_bool_t
+hb_font_get_glyph_h_origin (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_position_t *x, hb_position_t *y)
+{
+ return font->get_glyph_h_origin (glyph, x, y);
+}
+
+hb_bool_t
+hb_font_get_glyph_v_origin (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_position_t *x, hb_position_t *y)
+{
+ return font->get_glyph_v_origin (glyph, x, y);
+}
+
+hb_position_t
+hb_font_get_glyph_h_kerning (hb_font_t *font,
+ hb_codepoint_t left_glyph, hb_codepoint_t right_glyph)
+{
+ return font->get_glyph_h_kerning (left_glyph, right_glyph);
+}
+
+hb_position_t
+hb_font_get_glyph_v_kerning (hb_font_t *font,
+ hb_codepoint_t left_glyph, hb_codepoint_t right_glyph)
+{
+ return font->get_glyph_v_kerning (left_glyph, right_glyph);
+}
+
+hb_bool_t
+hb_font_get_glyph_extents (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_glyph_extents_t *extents)
+{
+ return font->get_glyph_extents (glyph, extents);
+}
+
+hb_bool_t
+hb_font_get_glyph_contour_point (hb_font_t *font,
+ hb_codepoint_t glyph, unsigned int point_index,
+ hb_position_t *x, hb_position_t *y)
+{
+ return font->get_glyph_contour_point (glyph, point_index, x, y);
+}
+
+hb_bool_t
+hb_font_get_glyph_name (hb_font_t *font,
+ hb_codepoint_t glyph,
+ char *name, unsigned int size)
+{
+ return font->get_glyph_name (glyph, name, size);
+}
+
+hb_bool_t
+hb_font_get_glyph_from_name (hb_font_t *font,
+ const char *name, int len, /* -1 means nul-terminated */
+ hb_codepoint_t *glyph)
+{
+ return font->get_glyph_from_name (name, len, glyph);
+}
+
+
+/* A bit higher-level, and with fallback */
+
+void
+hb_font_get_glyph_advance_for_direction (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y)
+{
+ return font->get_glyph_advance_for_direction (glyph, direction, x, y);
+}
+
+void
+hb_font_get_glyph_origin_for_direction (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y)
+{
+ return font->get_glyph_origin_for_direction (glyph, direction, x, y);
+}
+
+void
+hb_font_add_glyph_origin_for_direction (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y)
+{
+ return font->add_glyph_origin_for_direction (glyph, direction, x, y);
+}
+
+void
+hb_font_subtract_glyph_origin_for_direction (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y)
+{
+ return font->subtract_glyph_origin_for_direction (glyph, direction, x, y);
+}
+
+void
+hb_font_get_glyph_kerning_for_direction (hb_font_t *font,
+ hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y)
+{
+ return font->get_glyph_kerning_for_direction (first_glyph, second_glyph, direction, x, y);
+}
+
+hb_bool_t
+hb_font_get_glyph_extents_for_origin (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_glyph_extents_t *extents)
+{
+ return font->get_glyph_extents_for_origin (glyph, direction, extents);
+}
+
+hb_bool_t
+hb_font_get_glyph_contour_point_for_origin (hb_font_t *font,
+ hb_codepoint_t glyph, unsigned int point_index,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y)
+{
+ return font->get_glyph_contour_point_for_origin (glyph, point_index, direction, x, y);
+}
+
+/* Generates gidDDD if glyph has no name. */
+void
+hb_font_glyph_to_string (hb_font_t *font,
+ hb_codepoint_t glyph,
+ char *s, unsigned int size)
+{
+ font->glyph_to_string (glyph, s, size);
+}
+
+/* Parses gidDDD and uniUUUU strings automatically. */
+hb_bool_t
+hb_font_glyph_from_string (hb_font_t *font,
+ const char *s, int len, /* -1 means nul-terminated */
+ hb_codepoint_t *glyph)
+{
+ return font->glyph_from_string (s, len, glyph);
+}
+
+
+/*
+ * hb_face_t
+ */
+
+static const hb_face_t _hb_face_nil = {
+ HB_OBJECT_HEADER_STATIC,
+
+ true, /* immutable */
+
+ NULL, /* reference_table_func */
+ NULL, /* user_data */
+ NULL, /* destroy */
+
+ 0, /* index */
+ 1000, /* upem */
+
+ {
+#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_INVALID,
+#include "hb-shaper-list.hh"
+#undef HB_SHAPER_IMPLEMENT
+ },
+
+ NULL, /* shape_plans */
+};
+
+
+hb_face_t *
+hb_face_create_for_tables (hb_reference_table_func_t reference_table_func,
+ void *user_data,
+ hb_destroy_func_t destroy)
+{
+ hb_face_t *face;
+
+ if (!reference_table_func || !(face = hb_object_create<hb_face_t> ())) {
+ if (destroy)
+ destroy (user_data);
+ return hb_face_get_empty ();
+ }
+
+ face->reference_table_func = reference_table_func;
+ face->user_data = user_data;
+ face->destroy = destroy;
+
+ face->upem = 0;
+
+ return face;
+}
+
+
+typedef struct hb_face_for_data_closure_t {
+ hb_blob_t *blob;
+ unsigned int index;
+} hb_face_for_data_closure_t;
+
+static hb_face_for_data_closure_t *
+_hb_face_for_data_closure_create (hb_blob_t *blob, unsigned int index)
+{
+ hb_face_for_data_closure_t *closure;
+
+ closure = (hb_face_for_data_closure_t *) malloc (sizeof (hb_face_for_data_closure_t));
+ if (unlikely (!closure))
+ return NULL;
+
+ closure->blob = blob;
+ closure->index = index;
+
+ return closure;
+}
+
+static void
+_hb_face_for_data_closure_destroy (hb_face_for_data_closure_t *closure)
+{
+ hb_blob_destroy (closure->blob);
+ free (closure);
+}
+
+static hb_blob_t *
+_hb_face_for_data_reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data)
+{
+ hb_face_for_data_closure_t *data = (hb_face_for_data_closure_t *) user_data;
+
+ if (tag == HB_TAG_NONE)
+ return hb_blob_reference (data->blob);
+
+ const OpenTypeFontFile &ot_file = *Sanitizer<OpenTypeFontFile>::lock_instance (data->blob);
+ const OpenTypeFontFace &ot_face = ot_file.get_face (data->index);
+
+ const OpenTypeTable &table = ot_face.get_table_by_tag (tag);
+
+ hb_blob_t *blob = hb_blob_create_sub_blob (data->blob, table.offset, table.length);
+
+ return blob;
+}
+
+hb_face_t *
+hb_face_create (hb_blob_t *blob,
+ unsigned int index)
+{
+ hb_face_t *face;
+
+ if (unlikely (!blob || !hb_blob_get_length (blob)))
+ return hb_face_get_empty ();
+
+ hb_face_for_data_closure_t *closure = _hb_face_for_data_closure_create (Sanitizer<OpenTypeFontFile>::sanitize (hb_blob_reference (blob)), index);
+
+ if (unlikely (!closure))
+ return hb_face_get_empty ();
+
+ face = hb_face_create_for_tables (_hb_face_for_data_reference_table,
+ closure,
+ (hb_destroy_func_t) _hb_face_for_data_closure_destroy);
+
+ hb_face_set_index (face, index);
+
+ return face;
+}
+
+hb_face_t *
+hb_face_get_empty (void)
+{
+ return const_cast<hb_face_t *> (&_hb_face_nil);
+}
+
+
+hb_face_t *
+hb_face_reference (hb_face_t *face)
+{
+ return hb_object_reference (face);
+}
+
+void
+hb_face_destroy (hb_face_t *face)
+{
+ if (!hb_object_destroy (face)) return;
+
+ for (hb_face_t::plan_node_t *node = face->shape_plans; node; )
+ {
+ hb_face_t::plan_node_t *next = node->next;
+ hb_shape_plan_destroy (node->shape_plan);
+ free (node);
+ node = next;
+ }
+
+#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_DESTROY(shaper, face);
+#include "hb-shaper-list.hh"
+#undef HB_SHAPER_IMPLEMENT
+
+ if (face->destroy)
+ face->destroy (face->user_data);
+
+ free (face);
+}
+
+hb_bool_t
+hb_face_set_user_data (hb_face_t *face,
+ hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy,
+ hb_bool_t replace)
+{
+ return hb_object_set_user_data (face, key, data, destroy, replace);
+}
+
+void *
+hb_face_get_user_data (hb_face_t *face,
+ hb_user_data_key_t *key)
+{
+ return hb_object_get_user_data (face, key);
+}
+
+void
+hb_face_make_immutable (hb_face_t *face)
+{
+ if (hb_object_is_inert (face))
+ return;
+
+ face->immutable = true;
+}
+
+hb_bool_t
+hb_face_is_immutable (hb_face_t *face)
+{
+ return face->immutable;
+}
+
+
+hb_blob_t *
+hb_face_reference_table (hb_face_t *face,
+ hb_tag_t tag)
+{
+ return face->reference_table (tag);
+}
+
+hb_blob_t *
+hb_face_reference_blob (hb_face_t *face)
+{
+ return face->reference_table (HB_TAG_NONE);
+}
+
+void
+hb_face_set_index (hb_face_t *face,
+ unsigned int index)
+{
+ if (hb_object_is_inert (face))
+ return;
+
+ face->index = index;
+}
+
+unsigned int
+hb_face_get_index (hb_face_t *face)
+{
+ return face->index;
+}
+
+void
+hb_face_set_upem (hb_face_t *face,
+ unsigned int upem)
+{
+ if (hb_object_is_inert (face))
+ return;
+
+ face->upem = upem;
+}
+
+unsigned int
+hb_face_get_upem (hb_face_t *face)
+{
+ return face->get_upem ();
+}
+
+
+void
+hb_face_t::load_upem (void) const
+{
+ hb_blob_t *head_blob = Sanitizer<head>::sanitize (reference_table (HB_OT_TAG_head));
+ const head *head_table = Sanitizer<head>::lock_instance (head_blob);
+ upem = head_table->get_upem ();
+ hb_blob_destroy (head_blob);
+}
+
+
+/*
+ * hb_font_t
+ */
+
+hb_font_t *
+hb_font_create (hb_face_t *face)
+{
+ hb_font_t *font;
+
+ if (unlikely (!face))
+ face = hb_face_get_empty ();
+ if (unlikely (hb_object_is_inert (face)))
+ return hb_font_get_empty ();
+ if (!(font = hb_object_create<hb_font_t> ()))
+ return hb_font_get_empty ();
+
+ hb_face_make_immutable (face);
+ font->face = hb_face_reference (face);
+ font->klass = hb_font_funcs_get_empty ();
+
+ return font;
+}
+
+hb_font_t *
+hb_font_create_sub_font (hb_font_t *parent)
+{
+ if (unlikely (!parent))
+ return hb_font_get_empty ();
+
+ hb_font_t *font = hb_font_create (parent->face);
+
+ if (unlikely (hb_object_is_inert (font)))
+ return font;
+
+ hb_font_make_immutable (parent);
+ font->parent = hb_font_reference (parent);
+
+ font->x_scale = parent->x_scale;
+ font->y_scale = parent->y_scale;
+ font->x_ppem = parent->x_ppem;
+ font->y_ppem = parent->y_ppem;
+
+ return font;
+}
+
+hb_font_t *
+hb_font_get_empty (void)
+{
+ static const hb_font_t _hb_font_nil = {
+ HB_OBJECT_HEADER_STATIC,
+
+ true, /* immutable */
+
+ NULL, /* parent */
+ const_cast<hb_face_t *> (&_hb_face_nil),
+
+ 0, /* x_scale */
+ 0, /* y_scale */
+
+ 0, /* x_ppem */
+ 0, /* y_ppem */
+
+ const_cast<hb_font_funcs_t *> (&_hb_font_funcs_nil), /* klass */
+ NULL, /* user_data */
+ NULL, /* destroy */
+
+ {
+#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_INVALID,
+#include "hb-shaper-list.hh"
+#undef HB_SHAPER_IMPLEMENT
+ }
+ };
+
+ return const_cast<hb_font_t *> (&_hb_font_nil);
+}
+
+hb_font_t *
+hb_font_reference (hb_font_t *font)
+{
+ return hb_object_reference (font);
+}
+
+void
+hb_font_destroy (hb_font_t *font)
+{
+ if (!hb_object_destroy (font)) return;
+
+#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_DESTROY(shaper, font);
+#include "hb-shaper-list.hh"
+#undef HB_SHAPER_IMPLEMENT
+
+ if (font->destroy)
+ font->destroy (font->user_data);
+
+ hb_font_destroy (font->parent);
+ hb_face_destroy (font->face);
+ hb_font_funcs_destroy (font->klass);
+
+ free (font);
+}
+
+hb_bool_t
+hb_font_set_user_data (hb_font_t *font,
+ hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy,
+ hb_bool_t replace)
+{
+ return hb_object_set_user_data (font, key, data, destroy, replace);
+}
+
+void *
+hb_font_get_user_data (hb_font_t *font,
+ hb_user_data_key_t *key)
+{
+ return hb_object_get_user_data (font, key);
+}
+
+void
+hb_font_make_immutable (hb_font_t *font)
+{
+ if (hb_object_is_inert (font))
+ return;
+
+ font->immutable = true;
+}
+
+hb_bool_t
+hb_font_is_immutable (hb_font_t *font)
+{
+ return font->immutable;
+}
+
+hb_font_t *
+hb_font_get_parent (hb_font_t *font)
+{
+ return font->parent;
+}
+
+hb_face_t *
+hb_font_get_face (hb_font_t *font)
+{
+ return font->face;
+}
+
+
+void
+hb_font_set_funcs (hb_font_t *font,
+ hb_font_funcs_t *klass,
+ void *user_data,
+ hb_destroy_func_t destroy)
+{
+ if (font->immutable) {
+ if (destroy)
+ destroy (user_data);
+ return;
+ }
+
+ if (font->destroy)
+ font->destroy (font->user_data);
+
+ if (!klass)
+ klass = hb_font_funcs_get_empty ();
+
+ hb_font_funcs_reference (klass);
+ hb_font_funcs_destroy (font->klass);
+ font->klass = klass;
+ font->user_data = user_data;
+ font->destroy = destroy;
+}
+
+void
+hb_font_set_funcs_data (hb_font_t *font,
+ void *user_data,
+ hb_destroy_func_t destroy)
+{
+ /* Destroy user_data? */
+ if (font->immutable) {
+ if (destroy)
+ destroy (user_data);
+ return;
+ }
+
+ if (font->destroy)
+ font->destroy (font->user_data);
+
+ font->user_data = user_data;
+ font->destroy = destroy;
+}
+
+
+void
+hb_font_set_scale (hb_font_t *font,
+ int x_scale,
+ int y_scale)
+{
+ if (font->immutable)
+ return;
+
+ font->x_scale = x_scale;
+ font->y_scale = y_scale;
+}
+
+void
+hb_font_get_scale (hb_font_t *font,
+ int *x_scale,
+ int *y_scale)
+{
+ if (x_scale) *x_scale = font->x_scale;
+ if (y_scale) *y_scale = font->y_scale;
+}
+
+void
+hb_font_set_ppem (hb_font_t *font,
+ unsigned int x_ppem,
+ unsigned int y_ppem)
+{
+ if (font->immutable)
+ return;
+
+ font->x_ppem = x_ppem;
+ font->y_ppem = y_ppem;
+}
+
+void
+hb_font_get_ppem (hb_font_t *font,
+ unsigned int *x_ppem,
+ unsigned int *y_ppem)
+{
+ if (x_ppem) *x_ppem = font->x_ppem;
+ if (y_ppem) *y_ppem = font->y_ppem;
+}
diff --git a/src/hb-font.h b/src/hb-font.h
new file mode 100644
index 0000000..d796856
--- /dev/null
+++ b/src/hb-font.h
@@ -0,0 +1,447 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_H_IN
+#error "Include <hb.h> instead."
+#endif
+
+#ifndef HB_FONT_H
+#define HB_FONT_H
+
+#include "hb-common.h"
+#include "hb-blob.h"
+
+HB_BEGIN_DECLS
+
+
+typedef struct hb_face_t hb_face_t;
+typedef struct hb_font_t hb_font_t;
+
+/*
+ * hb_face_t
+ */
+
+hb_face_t *
+hb_face_create (hb_blob_t *blob,
+ unsigned int index);
+
+typedef hb_blob_t * (*hb_reference_table_func_t) (hb_face_t *face, hb_tag_t tag, void *user_data);
+
+/* calls destroy() when not needing user_data anymore */
+hb_face_t *
+hb_face_create_for_tables (hb_reference_table_func_t reference_table_func,
+ void *user_data,
+ hb_destroy_func_t destroy);
+
+hb_face_t *
+hb_face_get_empty (void);
+
+hb_face_t *
+hb_face_reference (hb_face_t *face);
+
+void
+hb_face_destroy (hb_face_t *face);
+
+hb_bool_t
+hb_face_set_user_data (hb_face_t *face,
+ hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy,
+ hb_bool_t replace);
+
+
+void *
+hb_face_get_user_data (hb_face_t *face,
+ hb_user_data_key_t *key);
+
+void
+hb_face_make_immutable (hb_face_t *face);
+
+hb_bool_t
+hb_face_is_immutable (hb_face_t *face);
+
+
+hb_blob_t *
+hb_face_reference_table (hb_face_t *face,
+ hb_tag_t tag);
+
+hb_blob_t *
+hb_face_reference_blob (hb_face_t *face);
+
+void
+hb_face_set_index (hb_face_t *face,
+ unsigned int index);
+
+unsigned int
+hb_face_get_index (hb_face_t *face);
+
+void
+hb_face_set_upem (hb_face_t *face,
+ unsigned int upem);
+
+unsigned int
+hb_face_get_upem (hb_face_t *face);
+
+
+/*
+ * hb_font_funcs_t
+ */
+
+typedef struct hb_font_funcs_t hb_font_funcs_t;
+
+hb_font_funcs_t *
+hb_font_funcs_create (void);
+
+hb_font_funcs_t *
+hb_font_funcs_get_empty (void);
+
+hb_font_funcs_t *
+hb_font_funcs_reference (hb_font_funcs_t *ffuncs);
+
+void
+hb_font_funcs_destroy (hb_font_funcs_t *ffuncs);
+
+hb_bool_t
+hb_font_funcs_set_user_data (hb_font_funcs_t *ffuncs,
+ hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy,
+ hb_bool_t replace);
+
+
+void *
+hb_font_funcs_get_user_data (hb_font_funcs_t *ffuncs,
+ hb_user_data_key_t *key);
+
+
+void
+hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs);
+
+hb_bool_t
+hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs);
+
+
+/* glyph extents */
+
+typedef struct hb_glyph_extents_t
+{
+ hb_position_t x_bearing;
+ hb_position_t y_bearing;
+ hb_position_t width;
+ hb_position_t height;
+} hb_glyph_extents_t;
+
+
+/* func types */
+
+typedef hb_bool_t (*hb_font_get_glyph_func_t) (hb_font_t *font, void *font_data,
+ hb_codepoint_t unicode, hb_codepoint_t variation_selector,
+ hb_codepoint_t *glyph,
+ void *user_data);
+
+
+typedef hb_position_t (*hb_font_get_glyph_advance_func_t) (hb_font_t *font, void *font_data,
+ hb_codepoint_t glyph,
+ void *user_data);
+typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_h_advance_func_t;
+typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_v_advance_func_t;
+
+typedef hb_bool_t (*hb_font_get_glyph_origin_func_t) (hb_font_t *font, void *font_data,
+ hb_codepoint_t glyph,
+ hb_position_t *x, hb_position_t *y,
+ void *user_data);
+typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_h_origin_func_t;
+typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_v_origin_func_t;
+
+typedef hb_position_t (*hb_font_get_glyph_kerning_func_t) (hb_font_t *font, void *font_data,
+ hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
+ void *user_data);
+typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_h_kerning_func_t;
+typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_v_kerning_func_t;
+
+
+typedef hb_bool_t (*hb_font_get_glyph_extents_func_t) (hb_font_t *font, void *font_data,
+ hb_codepoint_t glyph,
+ hb_glyph_extents_t *extents,
+ void *user_data);
+typedef hb_bool_t (*hb_font_get_glyph_contour_point_func_t) (hb_font_t *font, void *font_data,
+ hb_codepoint_t glyph, unsigned int point_index,
+ hb_position_t *x, hb_position_t *y,
+ void *user_data);
+
+
+typedef hb_bool_t (*hb_font_get_glyph_name_func_t) (hb_font_t *font, void *font_data,
+ hb_codepoint_t glyph,
+ char *name, unsigned int size,
+ void *user_data);
+typedef hb_bool_t (*hb_font_get_glyph_from_name_func_t) (hb_font_t *font, void *font_data,
+ const char *name, int len, /* -1 means nul-terminated */
+ hb_codepoint_t *glyph,
+ void *user_data);
+
+
+/* func setters */
+
+void
+hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs,
+ hb_font_get_glyph_func_t glyph_func,
+ void *user_data, hb_destroy_func_t destroy);
+
+void
+hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t *ffuncs,
+ hb_font_get_glyph_h_advance_func_t func,
+ void *user_data, hb_destroy_func_t destroy);
+void
+hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t *ffuncs,
+ hb_font_get_glyph_v_advance_func_t func,
+ void *user_data, hb_destroy_func_t destroy);
+
+void
+hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs,
+ hb_font_get_glyph_h_origin_func_t func,
+ void *user_data, hb_destroy_func_t destroy);
+void
+hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs,
+ hb_font_get_glyph_v_origin_func_t func,
+ void *user_data, hb_destroy_func_t destroy);
+
+void
+hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t *ffuncs,
+ hb_font_get_glyph_h_kerning_func_t func,
+ void *user_data, hb_destroy_func_t destroy);
+void
+hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs,
+ hb_font_get_glyph_v_kerning_func_t func,
+ void *user_data, hb_destroy_func_t destroy);
+
+void
+hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs,
+ hb_font_get_glyph_extents_func_t func,
+ void *user_data, hb_destroy_func_t destroy);
+void
+hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs,
+ hb_font_get_glyph_contour_point_func_t func,
+ void *user_data, hb_destroy_func_t destroy);
+
+void
+hb_font_funcs_set_glyph_name_func (hb_font_funcs_t *ffuncs,
+ hb_font_get_glyph_name_func_t glyph_func,
+ void *user_data, hb_destroy_func_t destroy);
+void
+hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t *ffuncs,
+ hb_font_get_glyph_from_name_func_t glyph_func,
+ void *user_data, hb_destroy_func_t destroy);
+
+
+/* func dispatch */
+
+hb_bool_t
+hb_font_get_glyph (hb_font_t *font,
+ hb_codepoint_t unicode, hb_codepoint_t variation_selector,
+ hb_codepoint_t *glyph);
+
+hb_position_t
+hb_font_get_glyph_h_advance (hb_font_t *font,
+ hb_codepoint_t glyph);
+hb_position_t
+hb_font_get_glyph_v_advance (hb_font_t *font,
+ hb_codepoint_t glyph);
+
+hb_bool_t
+hb_font_get_glyph_h_origin (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_position_t *x, hb_position_t *y);
+hb_bool_t
+hb_font_get_glyph_v_origin (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_position_t *x, hb_position_t *y);
+
+hb_position_t
+hb_font_get_glyph_h_kerning (hb_font_t *font,
+ hb_codepoint_t left_glyph, hb_codepoint_t right_glyph);
+hb_position_t
+hb_font_get_glyph_v_kerning (hb_font_t *font,
+ hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph);
+
+hb_bool_t
+hb_font_get_glyph_extents (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_glyph_extents_t *extents);
+
+hb_bool_t
+hb_font_get_glyph_contour_point (hb_font_t *font,
+ hb_codepoint_t glyph, unsigned int point_index,
+ hb_position_t *x, hb_position_t *y);
+
+hb_bool_t
+hb_font_get_glyph_name (hb_font_t *font,
+ hb_codepoint_t glyph,
+ char *name, unsigned int size);
+hb_bool_t
+hb_font_get_glyph_from_name (hb_font_t *font,
+ const char *name, int len, /* -1 means nul-terminated */
+ hb_codepoint_t *glyph);
+
+
+/* high-level funcs, with fallback */
+
+void
+hb_font_get_glyph_advance_for_direction (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y);
+void
+hb_font_get_glyph_origin_for_direction (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y);
+void
+hb_font_add_glyph_origin_for_direction (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y);
+void
+hb_font_subtract_glyph_origin_for_direction (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y);
+
+void
+hb_font_get_glyph_kerning_for_direction (hb_font_t *font,
+ hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y);
+
+hb_bool_t
+hb_font_get_glyph_extents_for_origin (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_glyph_extents_t *extents);
+
+hb_bool_t
+hb_font_get_glyph_contour_point_for_origin (hb_font_t *font,
+ hb_codepoint_t glyph, unsigned int point_index,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y);
+
+/* Generates gidDDD if glyph has no name. */
+void
+hb_font_glyph_to_string (hb_font_t *font,
+ hb_codepoint_t glyph,
+ char *s, unsigned int size);
+/* Parses gidDDD and uniUUUU strings automatically. */
+hb_bool_t
+hb_font_glyph_from_string (hb_font_t *font,
+ const char *s, int len, /* -1 means nul-terminated */
+ hb_codepoint_t *glyph);
+
+
+/*
+ * hb_font_t
+ */
+
+/* Fonts are very light-weight objects */
+
+hb_font_t *
+hb_font_create (hb_face_t *face);
+
+hb_font_t *
+hb_font_create_sub_font (hb_font_t *parent);
+
+hb_font_t *
+hb_font_get_empty (void);
+
+hb_font_t *
+hb_font_reference (hb_font_t *font);
+
+void
+hb_font_destroy (hb_font_t *font);
+
+hb_bool_t
+hb_font_set_user_data (hb_font_t *font,
+ hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy,
+ hb_bool_t replace);
+
+
+void *
+hb_font_get_user_data (hb_font_t *font,
+ hb_user_data_key_t *key);
+
+void
+hb_font_make_immutable (hb_font_t *font);
+
+hb_bool_t
+hb_font_is_immutable (hb_font_t *font);
+
+hb_font_t *
+hb_font_get_parent (hb_font_t *font);
+
+hb_face_t *
+hb_font_get_face (hb_font_t *font);
+
+
+void
+hb_font_set_funcs (hb_font_t *font,
+ hb_font_funcs_t *klass,
+ void *font_data,
+ hb_destroy_func_t destroy);
+
+/* Be *very* careful with this function! */
+void
+hb_font_set_funcs_data (hb_font_t *font,
+ void *font_data,
+ hb_destroy_func_t destroy);
+
+
+void
+hb_font_set_scale (hb_font_t *font,
+ int x_scale,
+ int y_scale);
+
+void
+hb_font_get_scale (hb_font_t *font,
+ int *x_scale,
+ int *y_scale);
+
+/*
+ * A zero value means "no hinting in that direction"
+ */
+void
+hb_font_set_ppem (hb_font_t *font,
+ unsigned int x_ppem,
+ unsigned int y_ppem);
+
+void
+hb_font_get_ppem (hb_font_t *font,
+ unsigned int *x_ppem,
+ unsigned int *y_ppem);
+
+
+HB_END_DECLS
+
+#endif /* HB_FONT_H */
diff --git a/src/hb-ft.cc b/src/hb-ft.cc
new file mode 100644
index 0000000..9ac556e
--- /dev/null
+++ b/src/hb-ft.cc
@@ -0,0 +1,493 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ * Copyright © 2009 Keith Stribley
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#include "hb-private.hh"
+
+#include "hb-ft.h"
+
+#include "hb-font-private.hh"
+
+#include FT_ADVANCES_H
+#include FT_TRUETYPE_TABLES_H
+
+
+
+#ifndef HB_DEBUG_FT
+#define HB_DEBUG_FT (HB_DEBUG+0)
+#endif
+
+
+/* TODO:
+ *
+ * In general, this file does a fine job of what it's supposed to do.
+ * There are, however, things that need more work:
+ *
+ * - We don't handle any load_flags. That definitely has API implications. :(
+ * I believe hb_ft_font_create() should take load_flags input.
+ * In particular, FT_Get_Advance() without the NO_HINTING flag seems to be
+ * buggy.
+ *
+ * - We don't handle / allow for emboldening / obliqueing.
+ *
+ * - Rounding, etc?
+ *
+ * - In the future, we should add constructors to create fonts in font space.
+ *
+ * - I believe transforms are not correctly implemented. FreeType does not
+ * provide any API to get to the transform/delta set on the face. :(
+ *
+ * - Always use FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH?
+ *
+ * - FT_Load_Glyph() is exteremely costly. Do something about it?
+ */
+
+
+static hb_bool_t
+hb_ft_get_glyph (hb_font_t *font HB_UNUSED,
+ void *font_data,
+ hb_codepoint_t unicode,
+ hb_codepoint_t variation_selector,
+ hb_codepoint_t *glyph,
+ void *user_data HB_UNUSED)
+
+{
+ FT_Face ft_face = (FT_Face) font_data;
+
+#ifdef HAVE_FT_FACE_GETCHARVARIANTINDEX
+ if (unlikely (variation_selector)) {
+ *glyph = FT_Face_GetCharVariantIndex (ft_face, unicode, variation_selector);
+ if (*glyph)
+ return true;
+ }
+#endif
+
+ *glyph = FT_Get_Char_Index (ft_face, unicode);
+ return *glyph != 0;
+}
+
+static hb_position_t
+hb_ft_get_glyph_h_advance (hb_font_t *font HB_UNUSED,
+ void *font_data,
+ hb_codepoint_t glyph,
+ void *user_data HB_UNUSED)
+{
+ FT_Face ft_face = (FT_Face) font_data;
+ int load_flags = FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING;
+ FT_Fixed v;
+
+ if (unlikely (FT_Get_Advance (ft_face, glyph, load_flags, &v)))
+ return 0;
+
+ return v >> 10;
+}
+
+static hb_position_t
+hb_ft_get_glyph_v_advance (hb_font_t *font HB_UNUSED,
+ void *font_data,
+ hb_codepoint_t glyph,
+ void *user_data HB_UNUSED)
+{
+ FT_Face ft_face = (FT_Face) font_data;
+ int load_flags = FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING | FT_LOAD_VERTICAL_LAYOUT;
+ FT_Fixed v;
+
+ if (unlikely (FT_Get_Advance (ft_face, glyph, load_flags, &v)))
+ return 0;
+
+ /* Note: FreeType's vertical metrics grows downward while other FreeType coordinates
+ * have a Y growing upward. Hence the extra negation. */
+ return -v >> 10;
+}
+
+static hb_bool_t
+hb_ft_get_glyph_h_origin (hb_font_t *font HB_UNUSED,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t glyph HB_UNUSED,
+ hb_position_t *x HB_UNUSED,
+ hb_position_t *y HB_UNUSED,
+ void *user_data HB_UNUSED)
+{
+ /* We always work in the horizontal coordinates. */
+ return true;
+}
+
+static hb_bool_t
+hb_ft_get_glyph_v_origin (hb_font_t *font HB_UNUSED,
+ void *font_data,
+ hb_codepoint_t glyph,
+ hb_position_t *x,
+ hb_position_t *y,
+ void *user_data HB_UNUSED)
+{
+ FT_Face ft_face = (FT_Face) font_data;
+ int load_flags = FT_LOAD_DEFAULT;
+
+ if (unlikely (FT_Load_Glyph (ft_face, glyph, load_flags)))
+ return false;
+
+ /* Note: FreeType's vertical metrics grows downward while other FreeType coordinates
+ * have a Y growing upward. Hence the extra negation. */
+ *x = ft_face->glyph->metrics.horiBearingX - ft_face->glyph->metrics.vertBearingX;
+ *y = ft_face->glyph->metrics.horiBearingY - (-ft_face->glyph->metrics.vertBearingY);
+
+ return true;
+}
+
+static hb_position_t
+hb_ft_get_glyph_h_kerning (hb_font_t *font,
+ void *font_data,
+ hb_codepoint_t left_glyph,
+ hb_codepoint_t right_glyph,
+ void *user_data HB_UNUSED)
+{
+ FT_Face ft_face = (FT_Face) font_data;
+ FT_Vector kerningv;
+
+ FT_Kerning_Mode mode = font->x_ppem ? FT_KERNING_DEFAULT : FT_KERNING_UNFITTED;
+ if (FT_Get_Kerning (ft_face, left_glyph, right_glyph, mode, &kerningv))
+ return 0;
+
+ return kerningv.x;
+}
+
+static hb_position_t
+hb_ft_get_glyph_v_kerning (hb_font_t *font HB_UNUSED,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t top_glyph HB_UNUSED,
+ hb_codepoint_t bottom_glyph HB_UNUSED,
+ void *user_data HB_UNUSED)
+{
+ /* FreeType API doesn't support vertical kerning */
+ return 0;
+}
+
+static hb_bool_t
+hb_ft_get_glyph_extents (hb_font_t *font HB_UNUSED,
+ void *font_data,
+ hb_codepoint_t glyph,
+ hb_glyph_extents_t *extents,
+ void *user_data HB_UNUSED)
+{
+ FT_Face ft_face = (FT_Face) font_data;
+ int load_flags = FT_LOAD_DEFAULT;
+
+ if (unlikely (FT_Load_Glyph (ft_face, glyph, load_flags)))
+ return false;
+
+ extents->x_bearing = ft_face->glyph->metrics.horiBearingX;
+ extents->y_bearing = ft_face->glyph->metrics.horiBearingY;
+ extents->width = ft_face->glyph->metrics.width;
+ extents->height = -ft_face->glyph->metrics.height;
+ return true;
+}
+
+static hb_bool_t
+hb_ft_get_glyph_contour_point (hb_font_t *font HB_UNUSED,
+ void *font_data,
+ hb_codepoint_t glyph,
+ unsigned int point_index,
+ hb_position_t *x,
+ hb_position_t *y,
+ void *user_data HB_UNUSED)
+{
+ FT_Face ft_face = (FT_Face) font_data;
+ int load_flags = FT_LOAD_DEFAULT;
+
+ if (unlikely (FT_Load_Glyph (ft_face, glyph, load_flags)))
+ return false;
+
+ if (unlikely (ft_face->glyph->format != FT_GLYPH_FORMAT_OUTLINE))
+ return false;
+
+ if (unlikely (point_index >= (unsigned int) ft_face->glyph->outline.n_points))
+ return false;
+
+ *x = ft_face->glyph->outline.points[point_index].x;
+ *y = ft_face->glyph->outline.points[point_index].y;
+
+ return true;
+}
+
+static hb_bool_t
+hb_ft_get_glyph_name (hb_font_t *font HB_UNUSED,
+ void *font_data,
+ hb_codepoint_t glyph,
+ char *name, unsigned int size,
+ void *user_data HB_UNUSED)
+{
+ FT_Face ft_face = (FT_Face) font_data;
+
+ hb_bool_t ret = !FT_Get_Glyph_Name (ft_face, glyph, name, size);
+ if (!ret)
+ snprintf (name, size, "gid%u", glyph);
+
+ return ret;
+}
+
+static hb_bool_t
+hb_ft_get_glyph_from_name (hb_font_t *font HB_UNUSED,
+ void *font_data,
+ const char *name, int len, /* -1 means nul-terminated */
+ hb_codepoint_t *glyph,
+ void *user_data HB_UNUSED)
+{
+ FT_Face ft_face = (FT_Face) font_data;
+
+ if (len < 0)
+ *glyph = FT_Get_Name_Index (ft_face, (FT_String *) name);
+ else {
+ /* Make a nul-terminated version. */
+ char buf[128];
+ len = MIN (len, (int) sizeof (buf) - 1);
+ strncpy (buf, name, len);
+ buf[len] = '\0';
+ *glyph = FT_Get_Name_Index (ft_face, buf);
+ }
+
+ return *glyph != 0;
+}
+
+
+static hb_font_funcs_t *
+_hb_ft_get_font_funcs (void)
+{
+ static const hb_font_funcs_t ft_ffuncs = {
+ HB_OBJECT_HEADER_STATIC,
+
+ true, /* immutable */
+
+ {
+#define HB_FONT_FUNC_IMPLEMENT(name) hb_ft_get_##name,
+ HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
+ }
+ };
+
+ return const_cast<hb_font_funcs_t *> (&ft_ffuncs);
+}
+
+
+static hb_blob_t *
+reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data)
+{
+ FT_Face ft_face = (FT_Face) user_data;
+ FT_Byte *buffer;
+ FT_ULong length = 0;
+ FT_Error error;
+
+ /* Note: FreeType like HarfBuzz uses the NONE tag for fetching the entire blob */
+
+ error = FT_Load_Sfnt_Table (ft_face, tag, 0, NULL, &length);
+ if (error)
+ return NULL;
+
+ buffer = (FT_Byte *) malloc (length);
+ if (buffer == NULL)
+ return NULL;
+
+ error = FT_Load_Sfnt_Table (ft_face, tag, 0, buffer, &length);
+ if (error)
+ return NULL;
+
+ return hb_blob_create ((const char *) buffer, length,
+ HB_MEMORY_MODE_WRITABLE,
+ buffer, free);
+}
+
+
+hb_face_t *
+hb_ft_face_create (FT_Face ft_face,
+ hb_destroy_func_t destroy)
+{
+ hb_face_t *face;
+
+ if (ft_face->stream->read == NULL) {
+ hb_blob_t *blob;
+
+ blob = hb_blob_create ((const char *) ft_face->stream->base,
+ (unsigned int) ft_face->stream->size,
+ /* TODO: We assume that it's mmap()'ed, but FreeType code
+ * suggests that there are cases we reach here but font is
+ * not mmapped. For example, when mmap() fails. No idea
+ * how to deal with it better here. */
+ HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE,
+ ft_face, destroy);
+ face = hb_face_create (blob, ft_face->face_index);
+ hb_blob_destroy (blob);
+ } else {
+ face = hb_face_create_for_tables (reference_table, ft_face, destroy);
+ }
+
+ hb_face_set_index (face, ft_face->face_index);
+ hb_face_set_upem (face, ft_face->units_per_EM);
+
+ return face;
+}
+
+static void
+hb_ft_face_finalize (FT_Face ft_face)
+{
+ hb_face_destroy ((hb_face_t *) ft_face->generic.data);
+}
+
+hb_face_t *
+hb_ft_face_create_cached (FT_Face ft_face)
+{
+ if (unlikely (!ft_face->generic.data || ft_face->generic.finalizer != (FT_Generic_Finalizer) hb_ft_face_finalize))
+ {
+ if (ft_face->generic.finalizer)
+ ft_face->generic.finalizer (ft_face);
+
+ ft_face->generic.data = hb_ft_face_create (ft_face, NULL);
+ ft_face->generic.finalizer = (FT_Generic_Finalizer) hb_ft_face_finalize;
+ }
+
+ return hb_face_reference ((hb_face_t *) ft_face->generic.data);
+}
+
+static void
+_do_nothing (void)
+{
+}
+
+
+hb_font_t *
+hb_ft_font_create (FT_Face ft_face,
+ hb_destroy_func_t destroy)
+{
+ hb_font_t *font;
+ hb_face_t *face;
+
+ face = hb_ft_face_create (ft_face, destroy);
+ font = hb_font_create (face);
+ hb_face_destroy (face);
+ hb_font_set_funcs (font,
+ _hb_ft_get_font_funcs (),
+ ft_face, (hb_destroy_func_t) _do_nothing);
+ hb_font_set_scale (font,
+ ((uint64_t) ft_face->size->metrics.x_scale * (uint64_t) ft_face->units_per_EM) >> 16,
+ ((uint64_t) ft_face->size->metrics.y_scale * (uint64_t) ft_face->units_per_EM) >> 16);
+ hb_font_set_ppem (font,
+ ft_face->size->metrics.x_ppem,
+ ft_face->size->metrics.y_ppem);
+
+ return font;
+}
+
+
+/* Thread-safe, lock-free, FT_Library */
+
+static FT_Library ft_library;
+
+static
+void free_ft_library (void)
+{
+ FT_Done_FreeType (ft_library);
+}
+
+static FT_Library
+get_ft_library (void)
+{
+retry:
+ FT_Library library = (FT_Library) hb_atomic_ptr_get (&ft_library);
+
+ if (unlikely (!library))
+ {
+ /* Not found; allocate one. */
+ if (FT_Init_FreeType (&library))
+ return NULL;
+
+ if (!hb_atomic_ptr_cmpexch (&ft_library, NULL, library)) {
+ FT_Done_FreeType (library);
+ goto retry;
+ }
+
+#ifdef HAVE_ATEXIT
+ atexit (free_ft_library); /* First person registers atexit() callback. */
+#endif
+ }
+
+ return library;
+}
+
+static void
+_release_blob (FT_Face ft_face)
+{
+ hb_blob_destroy ((hb_blob_t *) ft_face->generic.data);
+}
+
+void
+hb_ft_font_set_funcs (hb_font_t *font)
+{
+ hb_blob_t *blob = hb_face_reference_blob (font->face);
+ unsigned int blob_length;
+ const char *blob_data = hb_blob_get_data (blob, &blob_length);
+ if (unlikely (!blob_length))
+ DEBUG_MSG (FT, font, "Font face has empty blob");
+
+ FT_Face ft_face = NULL;
+ FT_Error err = FT_New_Memory_Face (get_ft_library (),
+ (const FT_Byte *) blob_data,
+ blob_length,
+ hb_face_get_index (font->face),
+ &ft_face);
+
+ if (unlikely (err)) {
+ hb_blob_destroy (blob);
+ DEBUG_MSG (FT, font, "Font face FT_New_Memory_Face() failed");
+ return;
+ }
+
+ FT_Select_Charmap (ft_face, FT_ENCODING_UNICODE);
+
+ assert (font->y_scale >= 0);
+ FT_Set_Char_Size (ft_face,
+ font->x_scale, font->y_scale,
+ 0, 0);
+#if 0
+ font->x_ppem * 72 * 64 / font->x_scale,
+ font->y_ppem * 72 * 64 / font->y_scale);
+#endif
+
+ ft_face->generic.data = blob;
+ ft_face->generic.finalizer = (FT_Generic_Finalizer) _release_blob;
+
+ hb_font_set_funcs (font,
+ _hb_ft_get_font_funcs (),
+ ft_face,
+ (hb_destroy_func_t) FT_Done_Face);
+}
+
+FT_Face
+hb_ft_font_get_face (hb_font_t *font)
+{
+ if (font->destroy == (hb_destroy_func_t) FT_Done_Face ||
+ font->destroy == (hb_destroy_func_t) _do_nothing)
+ return (FT_Face) font->user_data;
+
+ return NULL;
+}
diff --git a/src/hb-ft.h b/src/hb-ft.h
new file mode 100644
index 0000000..696251e
--- /dev/null
+++ b/src/hb-ft.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_FT_H
+#define HB_FT_H
+
+#include "hb.h"
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+HB_BEGIN_DECLS
+
+/* Note: FreeType is not thread-safe. Hence, these functions are not either. */
+
+hb_face_t *
+hb_ft_face_create (FT_Face ft_face,
+ hb_destroy_func_t destroy);
+
+hb_face_t *
+hb_ft_face_create_cached (FT_Face ft_face);
+
+hb_font_t *
+hb_ft_font_create (FT_Face ft_face,
+ hb_destroy_func_t destroy);
+
+
+
+/* Makes an hb_font_t use FreeType internally to implement font functions. */
+void
+hb_ft_font_set_funcs (hb_font_t *font);
+
+FT_Face
+hb_ft_font_get_face (hb_font_t *font);
+
+
+HB_END_DECLS
+
+#endif /* HB_FT_H */
diff --git a/src/hb-glib.cc b/src/hb-glib.cc
new file mode 100644
index 0000000..0462758
--- /dev/null
+++ b/src/hb-glib.cc
@@ -0,0 +1,384 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ * Copyright © 2011 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-private.hh"
+
+#include "hb-glib.h"
+
+#include "hb-unicode-private.hh"
+
+
+#if !GLIB_CHECK_VERSION(2,29,14)
+static const hb_script_t
+glib_script_to_script[] =
+{
+ HB_SCRIPT_COMMON,
+ HB_SCRIPT_INHERITED,
+ HB_SCRIPT_ARABIC,
+ HB_SCRIPT_ARMENIAN,
+ HB_SCRIPT_BENGALI,
+ HB_SCRIPT_BOPOMOFO,
+ HB_SCRIPT_CHEROKEE,
+ HB_SCRIPT_COPTIC,
+ HB_SCRIPT_CYRILLIC,
+ HB_SCRIPT_DESERET,
+ HB_SCRIPT_DEVANAGARI,
+ HB_SCRIPT_ETHIOPIC,
+ HB_SCRIPT_GEORGIAN,
+ HB_SCRIPT_GOTHIC,
+ HB_SCRIPT_GREEK,
+ HB_SCRIPT_GUJARATI,
+ HB_SCRIPT_GURMUKHI,
+ HB_SCRIPT_HAN,
+ HB_SCRIPT_HANGUL,
+ HB_SCRIPT_HEBREW,
+ HB_SCRIPT_HIRAGANA,
+ HB_SCRIPT_KANNADA,
+ HB_SCRIPT_KATAKANA,
+ HB_SCRIPT_KHMER,
+ HB_SCRIPT_LAO,
+ HB_SCRIPT_LATIN,
+ HB_SCRIPT_MALAYALAM,
+ HB_SCRIPT_MONGOLIAN,
+ HB_SCRIPT_MYANMAR,
+ HB_SCRIPT_OGHAM,
+ HB_SCRIPT_OLD_ITALIC,
+ HB_SCRIPT_ORIYA,
+ HB_SCRIPT_RUNIC,
+ HB_SCRIPT_SINHALA,
+ HB_SCRIPT_SYRIAC,
+ HB_SCRIPT_TAMIL,
+ HB_SCRIPT_TELUGU,
+ HB_SCRIPT_THAANA,
+ HB_SCRIPT_THAI,
+ HB_SCRIPT_TIBETAN,
+ HB_SCRIPT_CANADIAN_ABORIGINAL,
+ HB_SCRIPT_YI,
+ HB_SCRIPT_TAGALOG,
+ HB_SCRIPT_HANUNOO,
+ HB_SCRIPT_BUHID,
+ HB_SCRIPT_TAGBANWA,
+
+ /* Unicode-4.0 additions */
+ HB_SCRIPT_BRAILLE,
+ HB_SCRIPT_CYPRIOT,
+ HB_SCRIPT_LIMBU,
+ HB_SCRIPT_OSMANYA,
+ HB_SCRIPT_SHAVIAN,
+ HB_SCRIPT_LINEAR_B,
+ HB_SCRIPT_TAI_LE,
+ HB_SCRIPT_UGARITIC,
+
+ /* Unicode-4.1 additions */
+ HB_SCRIPT_NEW_TAI_LUE,
+ HB_SCRIPT_BUGINESE,
+ HB_SCRIPT_GLAGOLITIC,
+ HB_SCRIPT_TIFINAGH,
+ HB_SCRIPT_SYLOTI_NAGRI,
+ HB_SCRIPT_OLD_PERSIAN,
+ HB_SCRIPT_KHAROSHTHI,
+
+ /* Unicode-5.0 additions */
+ HB_SCRIPT_UNKNOWN,
+ HB_SCRIPT_BALINESE,
+ HB_SCRIPT_CUNEIFORM,
+ HB_SCRIPT_PHOENICIAN,
+ HB_SCRIPT_PHAGS_PA,
+ HB_SCRIPT_NKO,
+
+ /* Unicode-5.1 additions */
+ HB_SCRIPT_KAYAH_LI,
+ HB_SCRIPT_LEPCHA,
+ HB_SCRIPT_REJANG,
+ HB_SCRIPT_SUNDANESE,
+ HB_SCRIPT_SAURASHTRA,
+ HB_SCRIPT_CHAM,
+ HB_SCRIPT_OL_CHIKI,
+ HB_SCRIPT_VAI,
+ HB_SCRIPT_CARIAN,
+ HB_SCRIPT_LYCIAN,
+ HB_SCRIPT_LYDIAN,
+
+ /* Unicode-5.2 additions */
+ HB_SCRIPT_AVESTAN,
+ HB_SCRIPT_BAMUM,
+ HB_SCRIPT_EGYPTIAN_HIEROGLYPHS,
+ HB_SCRIPT_IMPERIAL_ARAMAIC,
+ HB_SCRIPT_INSCRIPTIONAL_PAHLAVI,
+ HB_SCRIPT_INSCRIPTIONAL_PARTHIAN,
+ HB_SCRIPT_JAVANESE,
+ HB_SCRIPT_KAITHI,
+ HB_SCRIPT_TAI_THAM,
+ HB_SCRIPT_LISU,
+ HB_SCRIPT_MEETEI_MAYEK,
+ HB_SCRIPT_OLD_SOUTH_ARABIAN,
+ HB_SCRIPT_OLD_TURKIC,
+ HB_SCRIPT_SAMARITAN,
+ HB_SCRIPT_TAI_VIET,
+
+ /* Unicode-6.0 additions */
+ HB_SCRIPT_BATAK,
+ HB_SCRIPT_BRAHMI,
+ HB_SCRIPT_MANDAIC,
+
+ /* Unicode-6.1 additions */
+ HB_SCRIPT_CHAKMA,
+ HB_SCRIPT_MEROITIC_CURSIVE,
+ HB_SCRIPT_MEROITIC_HIEROGLYPHS,
+ HB_SCRIPT_MIAO,
+ HB_SCRIPT_SHARADA,
+ HB_SCRIPT_SORA_SOMPENG,
+ HB_SCRIPT_TAKRI
+};
+#endif
+
+hb_script_t
+hb_glib_script_to_script (GUnicodeScript script)
+{
+#if GLIB_CHECK_VERSION(2,29,14)
+ return (hb_script_t) g_unicode_script_to_iso15924 (script);
+#else
+ if (likely ((unsigned int) script < ARRAY_LENGTH (glib_script_to_script)))
+ return glib_script_to_script[script];
+
+ if (unlikely (script == G_UNICODE_SCRIPT_INVALID_CODE))
+ return HB_SCRIPT_INVALID;
+
+ return HB_SCRIPT_UNKNOWN;
+#endif
+}
+
+GUnicodeScript
+hb_glib_script_from_script (hb_script_t script)
+{
+#if GLIB_CHECK_VERSION(2,29,14)
+ return g_unicode_script_from_iso15924 (script);
+#else
+ unsigned int count = ARRAY_LENGTH (glib_script_to_script);
+ for (unsigned int i = 0; i < count; i++)
+ if (glib_script_to_script[i] == script)
+ return (GUnicodeScript) i;
+
+ if (unlikely (script == HB_SCRIPT_INVALID))
+ return G_UNICODE_SCRIPT_INVALID_CODE;
+
+ return G_UNICODE_SCRIPT_UNKNOWN;
+#endif
+}
+
+
+static hb_unicode_combining_class_t
+hb_glib_unicode_combining_class (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t unicode,
+ void *user_data HB_UNUSED)
+
+{
+ return (hb_unicode_combining_class_t) g_unichar_combining_class (unicode);
+}
+
+static unsigned int
+hb_glib_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t unicode,
+ void *user_data HB_UNUSED)
+{
+ return g_unichar_iswide (unicode) ? 2 : 1;
+}
+
+static hb_unicode_general_category_t
+hb_glib_unicode_general_category (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t unicode,
+ void *user_data HB_UNUSED)
+
+{
+ /* hb_unicode_general_category_t and GUnicodeType are identical */
+ return (hb_unicode_general_category_t) g_unichar_type (unicode);
+}
+
+static hb_codepoint_t
+hb_glib_unicode_mirroring (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t unicode,
+ void *user_data HB_UNUSED)
+{
+ g_unichar_get_mirror_char (unicode, &unicode);
+ return unicode;
+}
+
+static hb_script_t
+hb_glib_unicode_script (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t unicode,
+ void *user_data HB_UNUSED)
+{
+ return hb_glib_script_to_script (g_unichar_get_script (unicode));
+}
+
+static hb_bool_t
+hb_glib_unicode_compose (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t a,
+ hb_codepoint_t b,
+ hb_codepoint_t *ab,
+ void *user_data HB_UNUSED)
+{
+#if GLIB_CHECK_VERSION(2,29,12)
+ return g_unichar_compose (a, b, ab);
+#endif
+
+ /* We don't ifdef-out the fallback code such that compiler always
+ * sees it and makes sure it's compilable. */
+
+ gchar utf8[12];
+ gchar *normalized;
+ int len;
+ hb_bool_t ret;
+
+ len = g_unichar_to_utf8 (a, utf8);
+ len += g_unichar_to_utf8 (b, utf8 + len);
+ normalized = g_utf8_normalize (utf8, len, G_NORMALIZE_NFC);
+ len = g_utf8_strlen (normalized, -1);
+ if (unlikely (!len))
+ return false;
+
+ if (len == 1) {
+ *ab = g_utf8_get_char (normalized);
+ ret = true;
+ } else {
+ ret = false;
+ }
+
+ g_free (normalized);
+ return ret;
+}
+
+static hb_bool_t
+hb_glib_unicode_decompose (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t ab,
+ hb_codepoint_t *a,
+ hb_codepoint_t *b,
+ void *user_data HB_UNUSED)
+{
+#if GLIB_CHECK_VERSION(2,29,12)
+ return g_unichar_decompose (ab, a, b);
+#endif
+
+ /* We don't ifdef-out the fallback code such that compiler always
+ * sees it and makes sure it's compilable. */
+
+ gchar utf8[6];
+ gchar *normalized;
+ int len;
+ hb_bool_t ret;
+
+ len = g_unichar_to_utf8 (ab, utf8);
+ normalized = g_utf8_normalize (utf8, len, G_NORMALIZE_NFD);
+ len = g_utf8_strlen (normalized, -1);
+ if (unlikely (!len))
+ return false;
+
+ if (len == 1) {
+ *a = g_utf8_get_char (normalized);
+ *b = 0;
+ ret = *a != ab;
+ } else if (len == 2) {
+ *a = g_utf8_get_char (normalized);
+ *b = g_utf8_get_char (g_utf8_next_char (normalized));
+ /* Here's the ugly part: if ab decomposes to a single character and
+ * that character decomposes again, we have to detect that and undo
+ * the second part :-(. */
+ gchar *recomposed = g_utf8_normalize (normalized, -1, G_NORMALIZE_NFC);
+ hb_codepoint_t c = g_utf8_get_char (recomposed);
+ if (c != ab && c != *a) {
+ *a = c;
+ *b = 0;
+ }
+ g_free (recomposed);
+ ret = true;
+ } else {
+ /* If decomposed to more than two characters, take the last one,
+ * and recompose the rest to get the first component. */
+ gchar *end = g_utf8_offset_to_pointer (normalized, len - 1);
+ gchar *recomposed;
+ *b = g_utf8_get_char (end);
+ recomposed = g_utf8_normalize (normalized, end - normalized, G_NORMALIZE_NFC);
+ /* We expect that recomposed has exactly one character now. */
+ *a = g_utf8_get_char (recomposed);
+ g_free (recomposed);
+ ret = true;
+ }
+
+ g_free (normalized);
+ return ret;
+}
+
+static unsigned int
+hb_glib_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t u,
+ hb_codepoint_t *decomposed,
+ void *user_data HB_UNUSED)
+{
+#if GLIB_CHECK_VERSION(2,29,12)
+ return g_unichar_fully_decompose (u, TRUE, decomposed, HB_UNICODE_MAX_DECOMPOSITION_LEN);
+#endif
+
+ /* If the user doesn't have GLib >= 2.29.12 we have to perform
+ * a round trip to UTF-8 and the associated memory management dance. */
+ gchar utf8[6];
+ gchar *utf8_decomposed, *c;
+ gsize utf8_len, utf8_decomposed_len, i;
+
+ /* Convert @u to UTF-8 and normalise it in NFKD mode. This performs the compatibility decomposition. */
+ utf8_len = g_unichar_to_utf8 (u, utf8);
+ utf8_decomposed = g_utf8_normalize (utf8, utf8_len, G_NORMALIZE_NFKD);
+ utf8_decomposed_len = g_utf8_strlen (utf8_decomposed, -1);
+
+ assert (utf8_decomposed_len <= HB_UNICODE_MAX_DECOMPOSITION_LEN);
+
+ for (i = 0, c = utf8_decomposed; i < utf8_decomposed_len; i++, c = g_utf8_next_char (c))
+ *decomposed++ = g_utf8_get_char (c);
+
+ g_free (utf8_decomposed);
+
+ return utf8_decomposed_len;
+}
+
+hb_unicode_funcs_t *
+hb_glib_get_unicode_funcs (void)
+{
+ static const hb_unicode_funcs_t _hb_glib_unicode_funcs = {
+ HB_OBJECT_HEADER_STATIC,
+
+ NULL, /* parent */
+ true, /* immutable */
+ {
+#define HB_UNICODE_FUNC_IMPLEMENT(name) hb_glib_unicode_##name,
+ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_UNICODE_FUNC_IMPLEMENT
+ }
+ };
+
+ return const_cast<hb_unicode_funcs_t *> (&_hb_glib_unicode_funcs);
+}
+
diff --git a/src/hb-glib.h b/src/hb-glib.h
new file mode 100644
index 0000000..63a9d33
--- /dev/null
+++ b/src/hb-glib.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ * Copyright © 2011 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_GLIB_H
+#define HB_GLIB_H
+
+#include "hb.h"
+
+#include <glib.h>
+
+HB_BEGIN_DECLS
+
+
+hb_script_t
+hb_glib_script_to_script (GUnicodeScript script);
+
+GUnicodeScript
+hb_glib_script_from_script (hb_script_t script);
+
+
+hb_unicode_funcs_t *
+hb_glib_get_unicode_funcs (void);
+
+
+HB_END_DECLS
+
+#endif /* HB_GLIB_H */
diff --git a/src/hb-gobject-enums.cc.tmpl b/src/hb-gobject-enums.cc.tmpl
new file mode 100644
index 0000000..05abd89
--- /dev/null
+++ b/src/hb-gobject-enums.cc.tmpl
@@ -0,0 +1,74 @@
+/*** BEGIN file-header ***/
+/*
+ * Copyright © 2011 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-private.hh"
+
+/* g++ didn't like older gtype.h gcc-only code path. */
+#include <glib.h>
+#if !GLIB_CHECK_VERSION(2,29,16)
+#undef __GNUC__
+#undef __GNUC_MINOR__
+#define __GNUC__ 2
+#define __GNUC_MINOR__ 6
+#endif
+
+#include "hb-gobject.h"
+
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+/* enumerations from "@filename@" */
+/*** END file-production ***/
+
+/*** BEGIN value-header ***/
+inline static /* TODO(behdad) disable these for now until we fix them... */
+GType
+@enum_name@_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const G@Type@Value values[] = {
+/*** END value-header ***/
+
+/*** BEGIN value-production ***/
+ { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
+/*** END value-production ***/
+
+/*** BEGIN value-tail ***/
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+/*** END value-tail ***/
diff --git a/src/hb-gobject-structs.cc b/src/hb-gobject-structs.cc
new file mode 100644
index 0000000..cec4854
--- /dev/null
+++ b/src/hb-gobject-structs.cc
@@ -0,0 +1,63 @@
+/*
+ * Copyright © 2011 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-private.hh"
+
+/* g++ didn't like older gtype.h gcc-only code path. */
+#include <glib.h>
+#if !GLIB_CHECK_VERSION(2,29,16)
+#undef __GNUC__
+#undef __GNUC_MINOR__
+#define __GNUC__ 2
+#define __GNUC_MINOR__ 6
+#endif
+
+#include "hb-gobject.h"
+
+#define _HB_DEFINE_BOXED_TYPE(Name,underscore_name,copy_func,free_func) \
+GType \
+underscore_name##_get_type (void) \
+{ \
+ static volatile gsize type = 0; \
+ if (g_once_init_enter (&type)) { \
+ GType t = g_boxed_type_register_static (g_intern_static_string (#Name), \
+ (GBoxedCopyFunc) copy_func, \
+ (GBoxedFreeFunc) free_func); \
+ g_once_init_leave (&type, t); \
+ } \
+ return type; \
+}
+
+#define HB_DEFINE_BOXED_TYPE(name) \
+ _HB_DEFINE_BOXED_TYPE (hb_##name, hb_gobject_##name, hb_##name##_reference, hb_##name##_destroy);
+
+HB_DEFINE_BOXED_TYPE (buffer)
+HB_DEFINE_BOXED_TYPE (blob)
+HB_DEFINE_BOXED_TYPE (face)
+HB_DEFINE_BOXED_TYPE (font)
+HB_DEFINE_BOXED_TYPE (font_funcs)
+HB_DEFINE_BOXED_TYPE (unicode_funcs)
+
diff --git a/src/hb-gobject.h b/src/hb-gobject.h
new file mode 100644
index 0000000..4f23fdd
--- /dev/null
+++ b/src/hb-gobject.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright © 2011 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_GOBJECT_H
+#define HB_GOBJECT_H
+
+#include "hb.h"
+
+#include <glib-object.h>
+
+HB_BEGIN_DECLS
+
+
+/* Objects */
+
+#define HB_GOBJECT_TYPE_BLOB hb_gobject_blob_get_type ()
+GType
+hb_gobject_blob_get_type (void);
+
+#define HB_GOBJECT_TYPE_BUFFER hb_gobject_buffer_get_type ()
+GType
+hb_gobject_buffer_get_type (void);
+
+#define HB_GOBJECT_TYPE_FACE hb_gobject_face_get_type ()
+GType
+hb_gobject_face_get_type (void);
+
+#define HB_GOBJECT_TYPE_FONT hb_gobject_font_get_type ()
+GType
+hb_gobject_font_get_type (void);
+
+#define HB_GOBJECT_TYPE_FONT_FUNCS hb_gobject_font_funcs_get_type ()
+GType
+hb_gobject_font_funcs_get_type (void);
+
+#define HB_GOBJECT_TYPE_UNICODE_FUNCS hb_gobject_unicode_funcs_get_type ()
+GType
+hb_gobject_unicode_funcs_get_type (void);
+
+
+/* Enums */
+
+
+HB_END_DECLS
+
+#endif /* HB_GOBJECT_H */
diff --git a/src/hb-graphite2.cc b/src/hb-graphite2.cc
new file mode 100644
index 0000000..a30c42e
--- /dev/null
+++ b/src/hb-graphite2.cc
@@ -0,0 +1,337 @@
+/*
+ * Copyright © 2011 Martin Hosken
+ * Copyright © 2011 SIL International
+ * 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
+ */
+
+#define HB_SHAPER graphite2
+#define hb_graphite2_shaper_font_data_t gr_font
+#include "hb-shaper-impl-private.hh"
+
+#include <graphite2/Font.h>
+#include <graphite2/Segment.h>
+
+#include "hb-graphite2.h"
+
+#include "hb-ot-tag.h"
+
+
+HB_SHAPER_DATA_ENSURE_DECLARE(graphite2, face)
+HB_SHAPER_DATA_ENSURE_DECLARE(graphite2, font)
+
+
+/*
+ * shaper face data
+ */
+
+typedef struct hb_graphite2_tablelist_t {
+ struct hb_graphite2_tablelist_t *next;
+ hb_blob_t *blob;
+ unsigned int tag;
+} hb_graphite2_tablelist_t;
+
+struct hb_graphite2_shaper_face_data_t {
+ hb_face_t *face;
+ gr_face *grface;
+ hb_graphite2_tablelist_t *tlist;
+};
+
+static const void *hb_graphite2_get_table (const void *data, unsigned int tag, size_t *len)
+{
+ hb_graphite2_shaper_face_data_t *face_data = (hb_graphite2_shaper_face_data_t *) data;
+ hb_graphite2_tablelist_t *tlist = face_data->tlist;
+
+ hb_blob_t *blob = NULL;
+
+ for (hb_graphite2_tablelist_t *p = tlist; p; p = p->next)
+ if (p->tag == tag) {
+ blob = p->blob;
+ break;
+ }
+
+ if (unlikely (!blob))
+ {
+ blob = face_data->face->reference_table (tag);
+
+ hb_graphite2_tablelist_t *p = (hb_graphite2_tablelist_t *) calloc (1, sizeof (hb_graphite2_tablelist_t));
+ if (unlikely (!p)) {
+ hb_blob_destroy (blob);
+ return NULL;
+ }
+ p->blob = blob;
+ p->tag = tag;
+
+ /* TODO Not thread-safe, but fairly harmless.
+ * We can do the double-chcked pointer cmpexch thing here. */
+ p->next = face_data->tlist;
+ face_data->tlist = p;
+ }
+
+ unsigned int tlen;
+ const char *d = hb_blob_get_data (blob, &tlen);
+ *len = tlen;
+ return d;
+}
+
+hb_graphite2_shaper_face_data_t *
+_hb_graphite2_shaper_face_data_create (hb_face_t *face)
+{
+ hb_blob_t *silf_blob = face->reference_table (HB_GRAPHITE2_TAG_SILF);
+ /* Umm, we just reference the table to check whether it exists.
+ * Maybe add better API for this? */
+ if (!hb_blob_get_length (silf_blob))
+ {
+ hb_blob_destroy (silf_blob);
+ return NULL;
+ }
+ hb_blob_destroy (silf_blob);
+
+ hb_graphite2_shaper_face_data_t *data = (hb_graphite2_shaper_face_data_t *) calloc (1, sizeof (hb_graphite2_shaper_face_data_t));
+ if (unlikely (!data))
+ hb_blob_destroy (silf_blob);
+
+ data->face = face;
+ data->grface = gr_make_face (data, &hb_graphite2_get_table, gr_face_default);
+
+ if (unlikely (!data->grface)) {
+ free (data);
+ return NULL;
+ }
+
+ return data;
+}
+
+void
+_hb_graphite2_shaper_face_data_destroy (hb_graphite2_shaper_face_data_t *data)
+{
+ hb_graphite2_tablelist_t *tlist = data->tlist;
+
+ while (tlist)
+ {
+ hb_graphite2_tablelist_t *old = tlist;
+ hb_blob_destroy (tlist->blob);
+ tlist = tlist->next;
+ free (old);
+ }
+
+ gr_face_destroy (data->grface);
+
+ free (data);
+}
+
+
+/*
+ * shaper font data
+ */
+
+static float hb_graphite2_get_advance (const void *hb_font, unsigned short gid)
+{
+ return ((hb_font_t *) hb_font)->get_glyph_h_advance (gid);
+}
+
+hb_graphite2_shaper_font_data_t *
+_hb_graphite2_shaper_font_data_create (hb_font_t *font)
+{
+ if (unlikely (!hb_graphite2_shaper_face_data_ensure (font->face))) return NULL;
+
+ hb_face_t *face = font->face;
+ hb_graphite2_shaper_face_data_t *face_data = HB_SHAPER_DATA_GET (face);
+
+ return gr_make_font_with_advance_fn (font->x_scale, font, &hb_graphite2_get_advance, face_data->grface);
+}
+
+void
+_hb_graphite2_shaper_font_data_destroy (hb_graphite2_shaper_font_data_t *data)
+{
+ gr_font_destroy (data);
+}
+
+
+/*
+ * shaper shape_plan data
+ */
+
+struct hb_graphite2_shaper_shape_plan_data_t {};
+
+hb_graphite2_shaper_shape_plan_data_t *
+_hb_graphite2_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan HB_UNUSED,
+ const hb_feature_t *user_features HB_UNUSED,
+ unsigned int num_user_features HB_UNUSED)
+{
+ return (hb_graphite2_shaper_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED;
+}
+
+void
+_hb_graphite2_shaper_shape_plan_data_destroy (hb_graphite2_shaper_shape_plan_data_t *data HB_UNUSED)
+{
+}
+
+
+/*
+ * shaper
+ */
+
+struct hb_graphite2_cluster_t {
+ unsigned int base_char;
+ unsigned int num_chars;
+ unsigned int base_glyph;
+ unsigned int num_glyphs;
+};
+
+hb_bool_t
+_hb_graphite2_shape (hb_shape_plan_t *shape_plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer,
+ const hb_feature_t *features,
+ unsigned int num_features)
+{
+ hb_face_t *face = font->face;
+ gr_face *grface = HB_SHAPER_DATA_GET (face)->grface;
+ gr_font *grfont = HB_SHAPER_DATA_GET (font);
+
+ unsigned int charlen;
+ hb_glyph_info_t *bufferi = hb_buffer_get_glyph_infos (buffer, &charlen);
+
+ int success = 0;
+
+ const char *lang = hb_language_to_string (hb_buffer_get_language (buffer));
+ const char *lang_end = strchr (lang, '-');
+ int lang_len = lang_end ? lang_end - lang : -1;
+ gr_feature_val *feats = gr_face_featureval_for_lang (grface, lang ? hb_tag_from_string (lang, lang_len) : 0);
+
+ while (num_features--)
+ {
+ const gr_feature_ref *fref = gr_face_find_fref (grface, features->tag);
+ if (fref)
+ gr_fref_set_feature_value (fref, features->value, feats);
+ features++;
+ }
+
+ /* TODO Use scratch buffer for these. */
+ hb_codepoint_t *gids = NULL, *pg;
+ hb_graphite2_cluster_t *clusters = NULL;
+ gr_segment *seg = NULL;
+ uint32_t *text = NULL;
+ const gr_slot *is;
+ unsigned int ci = 0, ic = 0;
+ float curradvx = 0., curradvy = 0.;
+ unsigned int glyphlen = 0;
+ unsigned int *p;
+
+ text = (uint32_t *) malloc ((charlen + 1) * sizeof (uint32_t));
+ if (!text) goto dieout;
+
+ p = text;
+ for (unsigned int i = 0; i < charlen; ++i)
+ *p++ = bufferi++->codepoint;
+ *p = 0;
+
+ hb_tag_t script_tag[2];
+ hb_ot_tags_from_script (hb_buffer_get_script (buffer), &script_tag[0], &script_tag[1]);
+
+ seg = gr_make_seg (grfont, grface,
+ script_tag[1] == HB_TAG_NONE ? script_tag[0] : script_tag[1],
+ feats,
+ gr_utf32, text, charlen,
+ 2 | (hb_buffer_get_direction (buffer) == HB_DIRECTION_RTL ? 1 : 0));
+ if (!seg) goto dieout;
+
+ glyphlen = gr_seg_n_slots (seg);
+ clusters = (hb_graphite2_cluster_t *) calloc (charlen, sizeof (hb_graphite2_cluster_t));
+ if (!glyphlen || !clusters) goto dieout;
+
+ gids = (hb_codepoint_t *) malloc (glyphlen * sizeof (hb_codepoint_t));
+ if (!gids) goto dieout;
+
+ pg = gids;
+ for (is = gr_seg_first_slot (seg), ic = 0; is; is = gr_slot_next_in_segment (is), ic++)
+ {
+ unsigned int before = gr_slot_before (is);
+ unsigned int after = gr_slot_after (is);
+ *pg = gr_slot_gid (is);
+ pg++;
+ while (clusters[ci].base_char > before && ci)
+ {
+ clusters[ci-1].num_chars += clusters[ci].num_chars;
+ clusters[ci-1].num_glyphs += clusters[ci].num_glyphs;
+ ci--;
+ }
+
+ if (gr_slot_can_insert_before (is) && clusters[ci].num_chars && before >= clusters[ci].base_char + clusters[ci].num_chars)
+ {
+ hb_graphite2_cluster_t *c = clusters + ci + 1;
+ c->base_char = clusters[ci].base_char + clusters[ci].num_chars;
+ c->num_chars = before - c->base_char;
+ c->base_glyph = ic;
+ c->num_glyphs = 0;
+ ci++;
+ }
+ clusters[ci].num_glyphs++;
+
+ if (clusters[ci].base_char + clusters[ci].num_chars < after + 1)
+ clusters[ci].num_chars = after + 1 - clusters[ci].base_char;
+ }
+ ci++;
+
+ buffer->clear_output ();
+ for (unsigned int i = 0; i < ci; ++i)
+ buffer->replace_glyphs (clusters[i].num_chars, clusters[i].num_glyphs, gids + clusters[i].base_glyph);
+ buffer->swap_buffers ();
+
+ if (HB_DIRECTION_IS_BACKWARD(buffer->props.direction))
+ curradvx = gr_seg_advance_X(seg);
+
+ hb_glyph_position_t *pPos;
+ for (pPos = hb_buffer_get_glyph_positions (buffer, NULL), is = gr_seg_first_slot (seg);
+ is; pPos++, is = gr_slot_next_in_segment (is))
+ {
+ pPos->x_offset = gr_slot_origin_X (is) - curradvx;
+ pPos->y_offset = gr_slot_origin_Y (is) - curradvy;
+ pPos->x_advance = gr_slot_advance_X (is, grface, grfont);
+ pPos->y_advance = gr_slot_advance_Y (is, grface, grfont);
+ if (HB_DIRECTION_IS_BACKWARD (buffer->props.direction))
+ curradvx -= pPos->x_advance;
+ pPos->x_offset = gr_slot_origin_X (is) - curradvx;
+ if (!HB_DIRECTION_IS_BACKWARD (buffer->props.direction))
+ curradvx += pPos->x_advance;
+ pPos->y_offset = gr_slot_origin_Y (is) - curradvy;
+ curradvy += pPos->y_advance;
+ }
+ if (!HB_DIRECTION_IS_BACKWARD (buffer->props.direction))
+ pPos[-1].x_advance += gr_seg_advance_X(seg) - curradvx;
+
+ if (HB_DIRECTION_IS_BACKWARD (buffer->props.direction))
+ hb_buffer_reverse_clusters (buffer);
+
+ success = 1;
+
+dieout:
+ if (feats) gr_featureval_destroy (feats);
+ if (gids) free (gids);
+ if (clusters) free (clusters);
+ if (seg) gr_seg_destroy (seg);
+ if (text) free (text);
+ return success;
+}
diff --git a/src/hb-graphite2.h b/src/hb-graphite2.h
new file mode 100644
index 0000000..8122495
--- /dev/null
+++ b/src/hb-graphite2.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Martin Hosken
+ * Copyright (C) 2011 SIL International
+ *
+ * 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.
+ */
+
+#ifndef HB_GRAPHITE2_H
+#define HB_GRAPHITE2_H
+
+#include "hb.h"
+
+HB_BEGIN_DECLS
+
+
+#define HB_GRAPHITE2_TAG_SILF HB_TAG('S','i','l','f')
+
+/* TODO add gr_font/face etc getters and other glue API */
+
+HB_END_DECLS
+
+#endif /* HB_GRAPHITE2_H */
diff --git a/src/hb-icu.cc b/src/hb-icu.cc
new file mode 100644
index 0000000..c177be2
--- /dev/null
+++ b/src/hb-icu.cc
@@ -0,0 +1,372 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ * Copyright © 2009 Keith Stribley
+ * Copyright © 2011 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-private.hh"
+
+#include "hb-icu.h"
+
+#include "hb-unicode-private.hh"
+
+#include <unicode/uchar.h>
+#include <unicode/unorm.h>
+#include <unicode/ustring.h>
+#include <unicode/uversion.h>
+
+
+hb_script_t
+hb_icu_script_to_script (UScriptCode script)
+{
+ if (unlikely (script == USCRIPT_INVALID_CODE))
+ return HB_SCRIPT_INVALID;
+
+ return hb_script_from_string (uscript_getShortName (script), -1);
+}
+
+UScriptCode
+hb_icu_script_from_script (hb_script_t script)
+{
+ if (unlikely (script == HB_SCRIPT_INVALID))
+ return USCRIPT_INVALID_CODE;
+
+ for (unsigned int i = 0; i < USCRIPT_CODE_LIMIT; i++)
+ if (unlikely (hb_icu_script_to_script ((UScriptCode) i) == script))
+ return (UScriptCode) i;
+
+ return USCRIPT_UNKNOWN;
+}
+
+
+static hb_unicode_combining_class_t
+hb_icu_unicode_combining_class (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t unicode,
+ void *user_data HB_UNUSED)
+
+{
+ return (hb_unicode_combining_class_t) u_getCombiningClass (unicode);
+}
+
+static unsigned int
+hb_icu_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t unicode,
+ void *user_data HB_UNUSED)
+{
+ switch (u_getIntPropertyValue(unicode, UCHAR_EAST_ASIAN_WIDTH))
+ {
+ case U_EA_WIDE:
+ case U_EA_FULLWIDTH:
+ return 2;
+ case U_EA_NEUTRAL:
+ case U_EA_AMBIGUOUS:
+ case U_EA_HALFWIDTH:
+ case U_EA_NARROW:
+ return 1;
+ }
+ return 1;
+}
+
+static hb_unicode_general_category_t
+hb_icu_unicode_general_category (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t unicode,
+ void *user_data HB_UNUSED)
+{
+ switch (u_getIntPropertyValue(unicode, UCHAR_GENERAL_CATEGORY))
+ {
+ case U_UNASSIGNED: return HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED;
+
+ case U_UPPERCASE_LETTER: return HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER;
+ case U_LOWERCASE_LETTER: return HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER;
+ case U_TITLECASE_LETTER: return HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER;
+ case U_MODIFIER_LETTER: return HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER;
+ case U_OTHER_LETTER: return HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER;
+
+ case U_NON_SPACING_MARK: return HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK;
+ case U_ENCLOSING_MARK: return HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK;
+ case U_COMBINING_SPACING_MARK: return HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK;
+
+ case U_DECIMAL_DIGIT_NUMBER: return HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER;
+ case U_LETTER_NUMBER: return HB_UNICODE_GENERAL_CATEGORY_LETTER_NUMBER;
+ case U_OTHER_NUMBER: return HB_UNICODE_GENERAL_CATEGORY_OTHER_NUMBER;
+
+ case U_SPACE_SEPARATOR: return HB_UNICODE_GENERAL_CATEGORY_SPACE_SEPARATOR;
+ case U_LINE_SEPARATOR: return HB_UNICODE_GENERAL_CATEGORY_LINE_SEPARATOR;
+ case U_PARAGRAPH_SEPARATOR: return HB_UNICODE_GENERAL_CATEGORY_PARAGRAPH_SEPARATOR;
+
+ case U_CONTROL_CHAR: return HB_UNICODE_GENERAL_CATEGORY_CONTROL;
+ case U_FORMAT_CHAR: return HB_UNICODE_GENERAL_CATEGORY_FORMAT;
+ case U_PRIVATE_USE_CHAR: return HB_UNICODE_GENERAL_CATEGORY_PRIVATE_USE;
+ case U_SURROGATE: return HB_UNICODE_GENERAL_CATEGORY_SURROGATE;
+
+
+ case U_DASH_PUNCTUATION: return HB_UNICODE_GENERAL_CATEGORY_DASH_PUNCTUATION;
+ case U_START_PUNCTUATION: return HB_UNICODE_GENERAL_CATEGORY_OPEN_PUNCTUATION;
+ case U_END_PUNCTUATION: return HB_UNICODE_GENERAL_CATEGORY_CLOSE_PUNCTUATION;
+ case U_CONNECTOR_PUNCTUATION: return HB_UNICODE_GENERAL_CATEGORY_CONNECT_PUNCTUATION;
+ case U_OTHER_PUNCTUATION: return HB_UNICODE_GENERAL_CATEGORY_OTHER_PUNCTUATION;
+
+ case U_MATH_SYMBOL: return HB_UNICODE_GENERAL_CATEGORY_MATH_SYMBOL;
+ case U_CURRENCY_SYMBOL: return HB_UNICODE_GENERAL_CATEGORY_CURRENCY_SYMBOL;
+ case U_MODIFIER_SYMBOL: return HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL;
+ case U_OTHER_SYMBOL: return HB_UNICODE_GENERAL_CATEGORY_OTHER_SYMBOL;
+
+ case U_INITIAL_PUNCTUATION: return HB_UNICODE_GENERAL_CATEGORY_INITIAL_PUNCTUATION;
+ case U_FINAL_PUNCTUATION: return HB_UNICODE_GENERAL_CATEGORY_FINAL_PUNCTUATION;
+ }
+
+ return HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED;
+}
+
+static hb_codepoint_t
+hb_icu_unicode_mirroring (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t unicode,
+ void *user_data HB_UNUSED)
+{
+ return u_charMirror(unicode);
+}
+
+static hb_script_t
+hb_icu_unicode_script (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t unicode,
+ void *user_data HB_UNUSED)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UScriptCode scriptCode = uscript_getScript(unicode, &status);
+
+ if (unlikely (U_FAILURE (status)))
+ return HB_SCRIPT_UNKNOWN;
+
+ return hb_icu_script_to_script (scriptCode);
+}
+
+#if U_ICU_VERSION_MAJOR_NUM >= 49
+static const UNormalizer2 *normalizer;
+#endif
+
+static hb_bool_t
+hb_icu_unicode_compose (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t a,
+ hb_codepoint_t b,
+ hb_codepoint_t *ab,
+ void *user_data HB_UNUSED)
+{
+#if U_ICU_VERSION_MAJOR_NUM >= 49
+ {
+ UChar32 ret = unorm2_composePair (normalizer, a, b);
+ if (ret < 0) return false;
+ *ab = ret;
+ return true;
+ }
+#endif
+
+ /* We don't ifdef-out the fallback code such that compiler always
+ * sees it and makes sure it's compilable. */
+
+ UChar utf16[4], normalized[5];
+ unsigned int len;
+ hb_bool_t ret, err;
+ UErrorCode icu_err;
+
+ len = 0;
+ err = false;
+ U16_APPEND (utf16, len, ARRAY_LENGTH (utf16), a, err);
+ if (err) return false;
+ U16_APPEND (utf16, len, ARRAY_LENGTH (utf16), b, err);
+ if (err) return false;
+
+ icu_err = U_ZERO_ERROR;
+ len = unorm_normalize (utf16, len, UNORM_NFC, 0, normalized, ARRAY_LENGTH (normalized), &icu_err);
+ if (U_FAILURE (icu_err))
+ return false;
+ if (u_countChar32 (normalized, len) == 1) {
+ U16_GET_UNSAFE (normalized, 0, *ab);
+ ret = true;
+ } else {
+ ret = false;
+ }
+
+ return ret;
+}
+
+static hb_bool_t
+hb_icu_unicode_decompose (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t ab,
+ hb_codepoint_t *a,
+ hb_codepoint_t *b,
+ void *user_data HB_UNUSED)
+{
+#if U_ICU_VERSION_MAJOR_NUM >= 49
+ {
+ UChar decomposed[4];
+ int len;
+ UErrorCode icu_err = U_ZERO_ERROR;
+ len = unorm2_getRawDecomposition (normalizer, ab, decomposed,
+ ARRAY_LENGTH (decomposed), &icu_err);
+ if (U_FAILURE (icu_err) || len < 0) return false;
+
+ len = u_countChar32 (decomposed, len);
+ if (len == 1) {
+ U16_GET_UNSAFE (decomposed, 0, *a);
+ *b = 0;
+ return *a != ab;
+ } else if (len == 2) {
+ len =0;
+ U16_NEXT_UNSAFE (decomposed, len, *a);
+ U16_NEXT_UNSAFE (decomposed, len, *b);
+ }
+ return true;
+ }
+#endif
+
+ /* We don't ifdef-out the fallback code such that compiler always
+ * sees it and makes sure it's compilable. */
+
+ UChar utf16[2], normalized[2 * HB_UNICODE_MAX_DECOMPOSITION_LEN + 1];
+ unsigned int len;
+ hb_bool_t ret, err;
+ UErrorCode icu_err;
+
+ /* This function is a monster! Maybe it wasn't a good idea adding a
+ * pairwise decompose API... */
+ /* Watchout for the dragons. Err, watchout for macros changing len. */
+
+ len = 0;
+ err = false;
+ U16_APPEND (utf16, len, ARRAY_LENGTH (utf16), ab, err);
+ if (err) return false;
+
+ icu_err = U_ZERO_ERROR;
+ len = unorm_normalize (utf16, len, UNORM_NFD, 0, normalized, ARRAY_LENGTH (normalized), &icu_err);
+ if (U_FAILURE (icu_err))
+ return false;
+
+ len = u_countChar32 (normalized, len);
+
+ if (len == 1) {
+ U16_GET_UNSAFE (normalized, 0, *a);
+ *b = 0;
+ ret = *a != ab;
+ } else if (len == 2) {
+ len =0;
+ U16_NEXT_UNSAFE (normalized, len, *a);
+ U16_NEXT_UNSAFE (normalized, len, *b);
+
+ /* Here's the ugly part: if ab decomposes to a single character and
+ * that character decomposes again, we have to detect that and undo
+ * the second part :-(. */
+ UChar recomposed[20];
+ icu_err = U_ZERO_ERROR;
+ unorm_normalize (normalized, len, UNORM_NFC, 0, recomposed, ARRAY_LENGTH (recomposed), &icu_err);
+ if (U_FAILURE (icu_err))
+ return false;
+ hb_codepoint_t c;
+ U16_GET_UNSAFE (recomposed, 0, c);
+ if (c != *a && c != ab) {
+ *a = c;
+ *b = 0;
+ }
+ ret = true;
+ } else {
+ /* If decomposed to more than two characters, take the last one,
+ * and recompose the rest to get the first component. */
+ U16_PREV_UNSAFE (normalized, len, *b); /* Changes len in-place. */
+ UChar recomposed[18 * 2];
+ icu_err = U_ZERO_ERROR;
+ len = unorm_normalize (normalized, len, UNORM_NFC, 0, recomposed, ARRAY_LENGTH (recomposed), &icu_err);
+ if (U_FAILURE (icu_err))
+ return false;
+ /* We expect that recomposed has exactly one character now. */
+ if (unlikely (u_countChar32 (recomposed, len) != 1))
+ return false;
+ U16_GET_UNSAFE (recomposed, 0, *a);
+ ret = true;
+ }
+
+ return ret;
+}
+
+static unsigned int
+hb_icu_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t u,
+ hb_codepoint_t *decomposed,
+ void *user_data HB_UNUSED)
+{
+ UChar utf16[2], normalized[2 * HB_UNICODE_MAX_DECOMPOSITION_LEN + 1];
+ unsigned int len;
+ int32_t utf32_len;
+ hb_bool_t err;
+ UErrorCode icu_err;
+
+ /* Copy @u into a UTF-16 array to be passed to ICU. */
+ len = 0;
+ err = FALSE;
+ U16_APPEND (utf16, len, ARRAY_LENGTH (utf16), u, err);
+ if (err)
+ return 0;
+
+ /* Normalise the codepoint using NFKD mode. */
+ icu_err = U_ZERO_ERROR;
+ len = unorm_normalize (utf16, len, UNORM_NFKD, 0, normalized, ARRAY_LENGTH (normalized), &icu_err);
+ if (icu_err)
+ return 0;
+
+ /* Convert the decomposed form from UTF-16 to UTF-32. */
+ icu_err = U_ZERO_ERROR;
+ u_strToUTF32 ((UChar32*) decomposed, HB_UNICODE_MAX_DECOMPOSITION_LEN, &utf32_len, normalized, len, &icu_err);
+ if (icu_err)
+ return 0;
+
+ return utf32_len;
+}
+
+
+hb_unicode_funcs_t *
+hb_icu_get_unicode_funcs (void)
+{
+ static const hb_unicode_funcs_t _hb_icu_unicode_funcs = {
+ HB_OBJECT_HEADER_STATIC,
+
+ NULL, /* parent */
+ true, /* immutable */
+ {
+#define HB_UNICODE_FUNC_IMPLEMENT(name) hb_icu_unicode_##name,
+ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_UNICODE_FUNC_IMPLEMENT
+ }
+ };
+
+#if U_ICU_VERSION_MAJOR_NUM >= 49
+ if (!hb_atomic_ptr_get (&normalizer)) {
+ UErrorCode icu_err = U_ZERO_ERROR;
+ /* We ignore failure in getNFCInstace(). */
+ hb_atomic_ptr_cmpexch (&normalizer, NULL, unorm2_getNFCInstance (&icu_err));
+ }
+#endif
+ return const_cast<hb_unicode_funcs_t *> (&_hb_icu_unicode_funcs);
+}
+
+
diff --git a/src/hb-icu.h b/src/hb-icu.h
new file mode 100644
index 0000000..f2f35f0
--- /dev/null
+++ b/src/hb-icu.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ * Copyright © 2011 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_ICU_H
+#define HB_ICU_H
+
+#include "hb.h"
+
+#include <unicode/uscript.h>
+
+HB_BEGIN_DECLS
+
+
+hb_script_t
+hb_icu_script_to_script (UScriptCode script);
+
+UScriptCode
+hb_icu_script_from_script (hb_script_t script);
+
+
+hb_unicode_funcs_t *
+hb_icu_get_unicode_funcs (void);
+
+
+HB_END_DECLS
+
+#endif /* HB_ICU_H */
diff --git a/src/hb-mutex-private.hh b/src/hb-mutex-private.hh
new file mode 100644
index 0000000..fc8ef49
--- /dev/null
+++ b/src/hb-mutex-private.hh
@@ -0,0 +1,150 @@
+/*
+ * Copyright © 2007 Chris Wilson
+ * Copyright © 2009,2010 Red Hat, Inc.
+ * 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.
+ *
+ * Contributor(s):
+ * Chris Wilson <chris@chris-wilson.co.uk>
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_MUTEX_PRIVATE_HH
+#define HB_MUTEX_PRIVATE_HH
+
+#include "hb-private.hh"
+
+
+/* mutex */
+
+/* We need external help for these */
+
+#if 0
+
+
+#elif !defined(HB_NO_MT) && defined(_MSC_VER) || defined(__MINGW32__)
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+typedef CRITICAL_SECTION hb_mutex_impl_t;
+#define HB_MUTEX_IMPL_INIT { NULL, 0, 0, NULL, NULL, 0 }
+#define hb_mutex_impl_init(M) InitializeCriticalSection (M)
+#define hb_mutex_impl_lock(M) EnterCriticalSection (M)
+#define hb_mutex_impl_unlock(M) LeaveCriticalSection (M)
+#define hb_mutex_impl_finish(M) DeleteCriticalSection (M)
+
+
+#elif !defined(HB_NO_MT) && (defined(HAVE_PTHREAD) || defined(__APPLE__))
+
+#include <pthread.h>
+typedef pthread_mutex_t hb_mutex_impl_t;
+#define HB_MUTEX_IMPL_INIT PTHREAD_MUTEX_INITIALIZER
+#define hb_mutex_impl_init(M) pthread_mutex_init (M, NULL)
+#define hb_mutex_impl_lock(M) pthread_mutex_lock (M)
+#define hb_mutex_impl_unlock(M) pthread_mutex_unlock (M)
+#define hb_mutex_impl_finish(M) pthread_mutex_destroy (M)
+
+
+#elif !defined(HB_NO_MT) && defined(HAVE_GLIB)
+
+#include <glib.h>
+#if !GLIB_CHECK_VERSION(2,32,0)
+typedef GStaticMutex hb_mutex_impl_t;
+#define HB_MUTEX_IMPL_INIT G_STATIC_MUTEX_INIT
+#define hb_mutex_impl_init(M) g_static_mutex_init (M)
+#define hb_mutex_impl_lock(M) g_static_mutex_lock (M)
+#define hb_mutex_impl_unlock(M) g_static_mutex_unlock (M)
+#define hb_mutex_impl_finish(M) g_static_mutex_free (M)
+#else
+typedef GMutex hb_mutex_impl_t;
+#define HB_MUTEX_IMPL_INIT {0}
+#define hb_mutex_impl_init(M) g_mutex_init (M)
+#define hb_mutex_impl_lock(M) g_mutex_lock (M)
+#define hb_mutex_impl_unlock(M) g_mutex_unlock (M)
+#define hb_mutex_impl_finish(M) g_mutex_clear (M)
+#endif
+
+
+#elif !defined(HB_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES)
+
+#if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_YIELD)
+# include <sched.h>
+# define HB_SCHED_YIELD() sched_yield ()
+#else
+# define HB_SCHED_YIELD() HB_STMT_START {} HB_STMT_END
+#endif
+
+/* This actually is not a totally awful implementation. */
+typedef volatile int hb_mutex_impl_t;
+#define HB_MUTEX_IMPL_INIT 0
+#define hb_mutex_impl_init(M) *(M) = 0
+#define hb_mutex_impl_lock(M) HB_STMT_START { while (__sync_lock_test_and_set((M), 1)) HB_SCHED_YIELD (); } HB_STMT_END
+#define hb_mutex_impl_unlock(M) __sync_lock_release (M)
+#define hb_mutex_impl_finish(M) HB_STMT_START {} HB_STMT_END
+
+
+#elif !defined(HB_NO_MT)
+
+#if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_YIELD)
+# include <sched.h>
+# define HB_SCHED_YIELD() sched_yield ()
+#else
+# define HB_SCHED_YIELD() HB_STMT_START {} HB_STMT_END
+#endif
+
+#define HB_MUTEX_INT_NIL 1 /* Warn that fallback implementation is in use. */
+typedef volatile int hb_mutex_impl_t;
+#define HB_MUTEX_IMPL_INIT 0
+#define hb_mutex_impl_init(M) *(M) = 0
+#define hb_mutex_impl_lock(M) HB_STMT_START { while (*(M)) HB_SCHED_YIELD (); (*(M))++; } HB_STMT_END
+#define hb_mutex_impl_unlock(M) (*(M))--;
+#define hb_mutex_impl_finish(M) HB_STMT_START {} HB_STMT_END
+
+
+#else /* HB_NO_MT */
+
+typedef int hb_mutex_impl_t;
+#define HB_MUTEX_IMPL_INIT 0
+#define hb_mutex_impl_init(M) HB_STMT_START {} HB_STMT_END
+#define hb_mutex_impl_lock(M) HB_STMT_START {} HB_STMT_END
+#define hb_mutex_impl_unlock(M) HB_STMT_START {} HB_STMT_END
+#define hb_mutex_impl_finish(M) HB_STMT_START {} HB_STMT_END
+
+#endif
+
+
+#define HB_MUTEX_INIT {HB_MUTEX_IMPL_INIT}
+struct hb_mutex_t
+{
+ /* TODO Add tracing. */
+
+ hb_mutex_impl_t m;
+
+ inline void init (void) { hb_mutex_impl_init (&m); }
+ inline void lock (void) { hb_mutex_impl_lock (&m); }
+ inline void unlock (void) { hb_mutex_impl_unlock (&m); }
+ inline void finish (void) { hb_mutex_impl_finish (&m); }
+};
+
+
+#endif /* HB_MUTEX_PRIVATE_HH */
diff --git a/src/hb-object-private.hh b/src/hb-object-private.hh
new file mode 100644
index 0000000..c48f242
--- /dev/null
+++ b/src/hb-object-private.hh
@@ -0,0 +1,251 @@
+/*
+ * Copyright © 2007 Chris Wilson
+ * Copyright © 2009,2010 Red Hat, Inc.
+ * 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.
+ *
+ * Contributor(s):
+ * Chris Wilson <chris@chris-wilson.co.uk>
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OBJECT_PRIVATE_HH
+#define HB_OBJECT_PRIVATE_HH
+
+#include "hb-private.hh"
+
+#include "hb-atomic-private.hh"
+#include "hb-mutex-private.hh"
+
+
+/* Debug */
+
+#ifndef HB_DEBUG_OBJECT
+#define HB_DEBUG_OBJECT (HB_DEBUG+0)
+#endif
+
+
+/* reference_count */
+
+#define HB_REFERENCE_COUNT_INVALID_VALUE ((hb_atomic_int_t) -1)
+#define HB_REFERENCE_COUNT_INVALID {HB_REFERENCE_COUNT_INVALID_VALUE}
+struct hb_reference_count_t
+{
+ hb_atomic_int_t ref_count;
+
+ inline void init (int v) { ref_count = v; }
+ inline int inc (void) { return hb_atomic_int_add (const_cast<hb_atomic_int_t &> (ref_count), 1); }
+ inline int dec (void) { return hb_atomic_int_add (const_cast<hb_atomic_int_t &> (ref_count), -1); }
+ inline void finish (void) { ref_count = HB_REFERENCE_COUNT_INVALID_VALUE; }
+
+ inline bool is_invalid (void) const { return ref_count == HB_REFERENCE_COUNT_INVALID_VALUE; }
+
+};
+
+
+/* user_data */
+
+#define HB_USER_DATA_ARRAY_INIT {HB_LOCKABLE_SET_INIT}
+struct hb_user_data_array_t
+{
+ /* TODO Add tracing. */
+
+ struct hb_user_data_item_t {
+ hb_user_data_key_t *key;
+ void *data;
+ hb_destroy_func_t destroy;
+
+ inline bool operator == (hb_user_data_key_t *other_key) const { return key == other_key; }
+ inline bool operator == (hb_user_data_item_t &other) const { return key == other.key; }
+
+ void finish (void) { if (destroy) destroy (data); }
+ };
+
+ hb_lockable_set_t<hb_user_data_item_t, hb_mutex_t> items;
+
+ inline void init (void) { items.init (); }
+
+ HB_INTERNAL bool set (hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy,
+ hb_bool_t replace,
+ hb_mutex_t &lock);
+
+ HB_INTERNAL void *get (hb_user_data_key_t *key,
+ hb_mutex_t &lock);
+
+ HB_INTERNAL void finish (hb_mutex_t &lock);
+};
+
+
+/* object_header */
+
+struct hb_object_header_t
+{
+ hb_reference_count_t ref_count;
+ hb_mutex_t mutex;
+ hb_user_data_array_t user_data;
+
+#define HB_OBJECT_HEADER_STATIC {HB_REFERENCE_COUNT_INVALID, HB_MUTEX_INIT, HB_USER_DATA_ARRAY_INIT}
+
+ static inline void *create (unsigned int size) {
+ hb_object_header_t *obj = (hb_object_header_t *) calloc (1, size);
+
+ if (likely (obj))
+ obj->init ();
+
+ return obj;
+ }
+
+ inline void init (void) {
+ ref_count.init (1);
+ mutex.init ();
+ user_data.init ();
+ }
+
+ inline bool is_inert (void) const {
+ return unlikely (ref_count.is_invalid ());
+ }
+
+ inline void reference (void) {
+ if (unlikely (!this || this->is_inert ()))
+ return;
+ ref_count.inc ();
+ }
+
+ inline bool destroy (void) {
+ if (unlikely (!this || this->is_inert ()))
+ return false;
+ if (ref_count.dec () != 1)
+ return false;
+
+ ref_count.finish (); /* Do this before user_data */
+ user_data.finish (mutex);
+ mutex.finish ();
+
+ return true;
+ }
+
+ inline void lock (void) {
+ mutex.lock ();
+ }
+
+ inline void unlock (void) {
+ mutex.unlock ();
+ }
+
+ inline bool set_user_data (hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy_func,
+ hb_bool_t replace) {
+ if (unlikely (!this || this->is_inert ()))
+ return false;
+
+ return user_data.set (key, data, destroy_func, replace, mutex);
+ }
+
+ inline void *get_user_data (hb_user_data_key_t *key) {
+ if (unlikely (!this || this->is_inert ()))
+ return NULL;
+
+ return user_data.get (key, mutex);
+ }
+
+ inline void trace (const char *function) const {
+ if (unlikely (!this)) return;
+ /* TODO We cannot use DEBUG_MSG_FUNC here since that one currently only
+ * prints the class name and throws away the template info. */
+ DEBUG_MSG (OBJECT, (void *) this,
+ "%s refcount=%d",
+ function,
+ this ? ref_count.ref_count : 0);
+ }
+
+ private:
+ ASSERT_POD ();
+};
+
+
+/* object */
+
+template <typename Type>
+static inline void hb_object_trace (const Type *obj, const char *function)
+{
+ obj->header.trace (function);
+}
+template <typename Type>
+static inline Type *hb_object_create (void)
+{
+ Type *obj = (Type *) hb_object_header_t::create (sizeof (Type));
+ hb_object_trace (obj, HB_FUNC);
+ return obj;
+}
+template <typename Type>
+static inline bool hb_object_is_inert (const Type *obj)
+{
+ return unlikely (obj->header.is_inert ());
+}
+template <typename Type>
+static inline Type *hb_object_reference (Type *obj)
+{
+ hb_object_trace (obj, HB_FUNC);
+ obj->header.reference ();
+ return obj;
+}
+template <typename Type>
+static inline bool hb_object_destroy (Type *obj)
+{
+ hb_object_trace (obj, HB_FUNC);
+ return obj->header.destroy ();
+}
+template <typename Type>
+static inline void hb_object_lock (Type *obj)
+{
+ hb_object_trace (obj, HB_FUNC);
+ return obj->header.lock ();
+}
+template <typename Type>
+static inline void hb_object_unlock (Type *obj)
+{
+ hb_object_trace (obj, HB_FUNC);
+ return obj->header.unlock ();
+}
+template <typename Type>
+static inline bool hb_object_set_user_data (Type *obj,
+ hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy,
+ hb_bool_t replace)
+{
+ return obj->header.set_user_data (key, data, destroy, replace);
+}
+
+template <typename Type>
+static inline void *hb_object_get_user_data (Type *obj,
+ hb_user_data_key_t *key)
+{
+ return obj->header.get_user_data (key);
+}
+
+
+#endif /* HB_OBJECT_PRIVATE_HH */
diff --git a/src/hb-old.cc b/src/hb-old.cc
new file mode 100644
index 0000000..197e620
--- /dev/null
+++ b/src/hb-old.cc
@@ -0,0 +1,407 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#define HB_SHAPER old
+#define hb_old_shaper_face_data_t HB_FaceRec_
+#define hb_old_shaper_font_data_t HB_Font_
+#include "hb-shaper-impl-private.hh"
+
+#include <harfbuzz.h>
+
+
+#ifndef HB_DEBUG_OLD
+#define HB_DEBUG_OLD (HB_DEBUG+0)
+#endif
+
+
+static HB_Script
+hb_old_script_from_script (hb_script_t script)
+{
+ switch ((hb_tag_t) script)
+ {
+ default:
+ case HB_SCRIPT_COMMON: return HB_Script_Common;
+ case HB_SCRIPT_GREEK: return HB_Script_Greek;
+ case HB_SCRIPT_CYRILLIC: return HB_Script_Cyrillic;
+ case HB_SCRIPT_ARMENIAN: return HB_Script_Armenian;
+ case HB_SCRIPT_HEBREW: return HB_Script_Hebrew;
+ case HB_SCRIPT_ARABIC: return HB_Script_Arabic;
+ case HB_SCRIPT_SYRIAC: return HB_Script_Syriac;
+ case HB_SCRIPT_THAANA: return HB_Script_Thaana;
+ case HB_SCRIPT_DEVANAGARI: return HB_Script_Devanagari;
+ case HB_SCRIPT_BENGALI: return HB_Script_Bengali;
+ case HB_SCRIPT_GURMUKHI: return HB_Script_Gurmukhi;
+ case HB_SCRIPT_GUJARATI: return HB_Script_Gujarati;
+ case HB_SCRIPT_ORIYA: return HB_Script_Oriya;
+ case HB_SCRIPT_TAMIL: return HB_Script_Tamil;
+ case HB_SCRIPT_TELUGU: return HB_Script_Telugu;
+ case HB_SCRIPT_KANNADA: return HB_Script_Kannada;
+ case HB_SCRIPT_MALAYALAM: return HB_Script_Malayalam;
+ case HB_SCRIPT_SINHALA: return HB_Script_Sinhala;
+ case HB_SCRIPT_THAI: return HB_Script_Thai;
+ case HB_SCRIPT_LAO: return HB_Script_Lao;
+ case HB_SCRIPT_TIBETAN: return HB_Script_Tibetan;
+ case HB_SCRIPT_MYANMAR: return HB_Script_Myanmar;
+ case HB_SCRIPT_GEORGIAN: return HB_Script_Georgian;
+ case HB_SCRIPT_HANGUL: return HB_Script_Hangul;
+ case HB_SCRIPT_OGHAM: return HB_Script_Ogham;
+ case HB_SCRIPT_RUNIC: return HB_Script_Runic;
+ case HB_SCRIPT_KHMER: return HB_Script_Khmer;
+ case HB_SCRIPT_NKO: return HB_Script_Nko;
+ case HB_SCRIPT_INHERITED: return HB_Script_Inherited;
+ }
+}
+
+
+static HB_Bool
+hb_old_convertStringToGlyphIndices (HB_Font old_font,
+ const HB_UChar16 *string,
+ hb_uint32 length,
+ HB_Glyph *glyphs,
+ hb_uint32 *numGlyphs,
+ HB_Bool rightToLeft)
+{
+ hb_font_t *font = (hb_font_t *) old_font->userData;
+
+ for (unsigned int i = 0; i < length; i++)
+ {
+ hb_codepoint_t u;
+
+ /* XXX Handle UTF-16. Ugh */
+ u = string[i];
+
+ if (rightToLeft)
+ u = hb_unicode_funcs_get_default ()->mirroring (u);
+
+ font->get_glyph (u, 0, &u); /* TODO Variation selectors */
+
+ glyphs[i] = u;
+ }
+ *numGlyphs = length; // XXX
+
+ return true;
+}
+
+static void
+hb_old_getGlyphAdvances (HB_Font old_font,
+ const HB_Glyph *glyphs,
+ hb_uint32 numGlyphs,
+ HB_Fixed *advances,
+ int flags /*HB_ShaperFlag*/)
+{
+ hb_font_t *font = (hb_font_t *) old_font->userData;
+
+ for (unsigned int i = 0; i < numGlyphs; i++)
+ advances[i] = font->get_glyph_h_advance (glyphs[i]);
+}
+
+static HB_Bool
+hb_old_canRender (HB_Font old_font,
+ const HB_UChar16 *string,
+ hb_uint32 length)
+{
+ return true; // TODO
+}
+
+static HB_Error
+hb_old_getPointInOutline (HB_Font old_font,
+ HB_Glyph glyph,
+ int flags /*HB_ShaperFlag*/,
+ hb_uint32 point,
+ HB_Fixed *xpos,
+ HB_Fixed *ypos,
+ hb_uint32 *nPoints)
+{
+ return HB_Err_Ok; // TODO
+}
+
+static void
+hb_old_getGlyphMetrics (HB_Font old_font,
+ HB_Glyph glyph,
+ HB_GlyphMetrics *metrics)
+{
+ hb_font_t *font = (hb_font_t *) old_font->userData;
+
+ hb_glyph_extents_t extents;
+
+ font->get_glyph_extents (glyph, &extents);
+
+ metrics->x = extents.x_bearing;
+ metrics->y = extents.y_bearing;
+ metrics->width = extents.width;
+ metrics->height = extents.height;
+ metrics->xOffset = font->get_glyph_h_advance (glyph);
+ metrics->yOffset = 0;
+}
+
+static HB_Fixed
+hb_old_getFontMetric (HB_Font old_font,
+ HB_FontMetric metric)
+{
+ hb_font_t *font = (hb_font_t *) old_font->userData;
+
+ switch (metric)
+ {
+ case HB_FontAscent:
+ return font->y_scale; /* XXX We don't have ascent data yet. */
+
+ default:
+ return 0;
+ }
+}
+
+static const HB_FontClass hb_old_font_class = {
+ hb_old_convertStringToGlyphIndices,
+ hb_old_getGlyphAdvances,
+ hb_old_canRender,
+ hb_old_getPointInOutline,
+ hb_old_getGlyphMetrics,
+ hb_old_getFontMetric
+};
+
+
+
+static HB_Error
+table_func (void *font, HB_Tag tag, HB_Byte *buffer, HB_UInt *length)
+{
+ hb_face_t *face = (hb_face_t *) font;
+ hb_blob_t *blob = face->reference_table ((hb_tag_t) tag);
+ unsigned int capacity = *length;
+ *length = hb_blob_get_length (blob);
+ memcpy (buffer, hb_blob_get_data (blob, NULL), MIN (capacity, *length));
+ hb_blob_destroy (blob);
+ return HB_Err_Ok;
+}
+
+
+/*
+ * shaper face data
+ */
+
+hb_old_shaper_face_data_t *
+_hb_old_shaper_face_data_create (hb_face_t *face)
+{
+ return HB_NewFace (face, table_func);
+}
+
+void
+_hb_old_shaper_face_data_destroy (hb_old_shaper_face_data_t *data)
+{
+ HB_FreeFace (data);
+}
+
+
+/*
+ * shaper font data
+ */
+
+hb_old_shaper_font_data_t *
+_hb_old_shaper_font_data_create (hb_font_t *font)
+{
+ HB_FontRec *data = (HB_FontRec *) calloc (1, sizeof (HB_FontRec));
+ if (unlikely (!data)) {
+ DEBUG_MSG (OLD, font, "malloc()ing HB_Font failed");
+ return NULL;
+ }
+
+ data->klass = &hb_old_font_class;
+ data->x_ppem = font->x_ppem;
+ data->y_ppem = font->y_ppem;
+ data->x_scale = font->x_scale; // XXX
+ data->y_scale = font->y_scale; // XXX
+ data->userData = font;
+
+ return data;
+}
+
+void
+_hb_old_shaper_font_data_destroy (hb_old_shaper_font_data_t *data)
+{
+ free (data);
+}
+
+
+/*
+ * shaper shape_plan data
+ */
+
+struct hb_old_shaper_shape_plan_data_t {};
+
+hb_old_shaper_shape_plan_data_t *
+_hb_old_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan,
+ const hb_feature_t *user_features,
+ unsigned int num_user_features)
+{
+ return (hb_old_shaper_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED;
+}
+
+void
+_hb_old_shaper_shape_plan_data_destroy (hb_old_shaper_shape_plan_data_t *data)
+{
+}
+
+
+/*
+ * shaper
+ */
+
+hb_bool_t
+_hb_old_shape (hb_shape_plan_t *shape_plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer,
+ const hb_feature_t *features,
+ unsigned int num_features)
+{
+ hb_face_t *face = font->face;
+ HB_Face old_face = HB_SHAPER_DATA_GET (face);
+ HB_Font old_font = HB_SHAPER_DATA_GET (font);
+
+ bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction);
+
+retry:
+
+ unsigned int scratch_size;
+ char *scratch = (char *) buffer->get_scratch_buffer (&scratch_size);
+
+#define utf16_index() var1.u32
+ HB_UChar16 *pchars = (HB_UChar16 *) scratch;
+ unsigned int chars_len = 0;
+ for (unsigned int i = 0; i < buffer->len; i++) {
+ hb_codepoint_t c = buffer->info[i].codepoint;
+ buffer->info[i].utf16_index() = chars_len;
+ if (likely (c < 0x10000))
+ pchars[chars_len++] = c;
+ else if (unlikely (c >= 0x110000))
+ pchars[chars_len++] = 0xFFFD;
+ else {
+ pchars[chars_len++] = 0xD800 + ((c - 0x10000) >> 10);
+ pchars[chars_len++] = 0xDC00 + ((c - 0x10000) & ((1 << 10) - 1));
+ }
+ }
+
+
+#define ALLOCATE_ARRAY(Type, name, len) \
+ name = (Type *) scratch; \
+ scratch += (len) * sizeof ((name)[0]); \
+ scratch_size -= (len) * sizeof ((name)[0]);
+
+
+ HB_ShaperItem item = {0};
+
+ ALLOCATE_ARRAY (const HB_UChar16, item.string, chars_len);
+ ALLOCATE_ARRAY (unsigned short, item.log_clusters, chars_len + 2);
+ item.stringLength = chars_len;
+ item.item.pos = 0;
+ item.item.length = item.stringLength;
+ item.item.script = hb_old_script_from_script (buffer->props.script);
+ item.item.bidiLevel = backward ? 1 : 0;
+
+ item.font = old_font;
+ item.face = old_face;
+ item.shaperFlags = 0;
+
+ item.glyphIndicesPresent = false;
+
+ /* TODO Alignment. */
+ unsigned int num_glyphs = scratch_size / (sizeof (HB_Glyph) +
+ sizeof (HB_GlyphAttributes) +
+ sizeof (HB_Fixed) +
+ sizeof (HB_FixedPoint) +
+ sizeof (uint32_t));
+
+ item.num_glyphs = num_glyphs;
+ ALLOCATE_ARRAY (HB_Glyph, item.glyphs, num_glyphs);
+ ALLOCATE_ARRAY (HB_GlyphAttributes, item.attributes, num_glyphs);
+ ALLOCATE_ARRAY (HB_Fixed, item.advances, num_glyphs);
+ ALLOCATE_ARRAY (HB_FixedPoint, item.offsets, num_glyphs);
+ uint32_t *vis_clusters;
+ ALLOCATE_ARRAY (uint32_t, vis_clusters, num_glyphs);
+
+#undef ALLOCATE_ARRAY
+
+ if (!HB_ShapeItem (&item))
+ {
+ if (unlikely (item.num_glyphs > num_glyphs))
+ {
+ buffer->ensure (buffer->allocated * 2);
+ if (buffer->in_error)
+ return false;
+ goto retry;
+ }
+ return false;
+ }
+ num_glyphs = item.num_glyphs;
+
+ /* Ok, we've got everything we need, now compose output buffer,
+ * very, *very*, carefully! */
+
+ /* Calculate visual-clusters. That's what we ship. */
+ for (unsigned int i = 0; i < num_glyphs; i++)
+ vis_clusters[i] = -1;
+ for (unsigned int i = 0; i < buffer->len; i++) {
+ uint32_t *p = &vis_clusters[item.log_clusters[buffer->info[i].utf16_index()]];
+ *p = MIN (*p, buffer->info[i].cluster);
+ }
+ for (unsigned int i = 1; i < num_glyphs; i++)
+ if (vis_clusters[i] == -1)
+ vis_clusters[i] = vis_clusters[i - 1];
+
+#undef utf16_index
+
+ buffer->ensure (num_glyphs);
+ if (buffer->in_error)
+ return false;
+
+
+ buffer->len = num_glyphs;
+ hb_glyph_info_t *info = buffer->info;
+ for (unsigned int i = 0; i < num_glyphs; i++)
+ {
+ info[i].codepoint = item.glyphs[i];
+ info[i].cluster = vis_clusters[i];
+
+ info[i].mask = item.advances[i];
+ info[i].var1.u32 = item.offsets[i].x;
+ info[i].var2.u32 = item.offsets[i].y;
+ }
+
+ buffer->clear_positions ();
+
+ for (unsigned int i = 0; i < num_glyphs; ++i) {
+ hb_glyph_info_t *info = &buffer->info[i];
+ hb_glyph_position_t *pos = &buffer->pos[i];
+
+ /* TODO vertical */
+ pos->x_advance = info->mask;
+ pos->x_offset = info->var1.u32;
+ pos->y_offset = info->var2.u32;
+ }
+
+ if (HB_DIRECTION_IS_BACKWARD (buffer->props.direction))
+ buffer->reverse ();
+
+ return true;
+}
diff --git a/src/hb-old/COPYING b/src/hb-old/COPYING
new file mode 100644
index 0000000..f7c0e97
--- /dev/null
+++ b/src/hb-old/COPYING
@@ -0,0 +1,24 @@
+HarfBuzz-old was previously licensed under different licenses. This was
+changed in January 2008. If you need to relicense your old copies,
+consult the announcement of the license change on the internet.
+Other than that, each copy of HarfBuzz-old is licensed under the COPYING
+file included with it. The actual license follows:
+
+
+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.
diff --git a/src/hb-old/Makefile.am b/src/hb-old/Makefile.am
new file mode 100644
index 0000000..39830a6
--- /dev/null
+++ b/src/hb-old/Makefile.am
@@ -0,0 +1,56 @@
+## Process this file with automake to produce Makefile.in
+
+noinst_LTLIBRARIES = libhb-old.la
+
+MAINSOURCES = \
+ harfbuzz-buffer.c \
+ harfbuzz-stream.c \
+ harfbuzz-gdef.c \
+ harfbuzz-gpos.c \
+ harfbuzz-gsub.c \
+ harfbuzz-impl.c \
+ harfbuzz-open.c \
+ harfbuzz-shaper.cpp \
+ harfbuzz-greek.c \
+ harfbuzz-tibetan.c \
+ harfbuzz-khmer.c \
+ harfbuzz-indic.cpp \
+ harfbuzz-hebrew.c \
+ harfbuzz-arabic.c \
+ harfbuzz-hangul.c \
+ harfbuzz-myanmar.c
+
+PUBLICHEADERS = \
+ harfbuzz.h \
+ harfbuzz-buffer.h \
+ harfbuzz-gdef.h \
+ harfbuzz-gpos.h \
+ harfbuzz-gsub.h \
+ harfbuzz-open.h \
+ harfbuzz-global.h \
+ harfbuzz-external.h \
+ harfbuzz-shaper.h \
+ harfbuzz-stream.h
+
+PRIVATEHEADERS = \
+ harfbuzz-impl.h \
+ harfbuzz-buffer-private.h \
+ harfbuzz-stream-private.h \
+ harfbuzz-gdef-private.h \
+ harfbuzz-gpos-private.h \
+ harfbuzz-gsub-private.h \
+ harfbuzz-open-private.h \
+ harfbuzz-shaper-private.h
+
+libhb_old_la_SOURCES = \
+ $(MAINSOURCES) \
+ $(PUBLICHEADERS) \
+ $(PRIVATEHEADERS)
+libhb_old_la_CPPFLAGS = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src \
+ -I$(top_builddir)/src
+
+EXTRA_DIST = README COPYING
+
+-include $(top_srcdir)/git.mk
diff --git a/src/hb-old/Makefile.in b/src/hb-old/Makefile.in
new file mode 100644
index 0000000..8cc0ff7
--- /dev/null
+++ b/src/hb-old/Makefile.in
@@ -0,0 +1,764 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/hb-old
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ COPYING
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libhb_old_la_LIBADD =
+am__objects_1 = libhb_old_la-harfbuzz-buffer.lo \
+ libhb_old_la-harfbuzz-stream.lo libhb_old_la-harfbuzz-gdef.lo \
+ libhb_old_la-harfbuzz-gpos.lo libhb_old_la-harfbuzz-gsub.lo \
+ libhb_old_la-harfbuzz-impl.lo libhb_old_la-harfbuzz-open.lo \
+ libhb_old_la-harfbuzz-shaper.lo libhb_old_la-harfbuzz-greek.lo \
+ libhb_old_la-harfbuzz-tibetan.lo \
+ libhb_old_la-harfbuzz-khmer.lo libhb_old_la-harfbuzz-indic.lo \
+ libhb_old_la-harfbuzz-hebrew.lo \
+ libhb_old_la-harfbuzz-arabic.lo \
+ libhb_old_la-harfbuzz-hangul.lo \
+ libhb_old_la-harfbuzz-myanmar.lo
+am__objects_2 =
+am_libhb_old_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
+ $(am__objects_2)
+libhb_old_la_OBJECTS = $(am_libhb_old_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(libhb_old_la_SOURCES)
+DIST_SOURCES = $(libhb_old_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FT_CFLAGS = @CAIRO_FT_CFLAGS@
+CAIRO_FT_LIBS = @CAIRO_FT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CORETEXT_CFLAGS = @CORETEXT_CFLAGS@
+CORETEXT_LIBS = @CORETEXT_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GRAPHITE2_CFLAGS = @GRAPHITE2_CFLAGS@
+GRAPHITE2_LIBS = @GRAPHITE2_LIBS@
+GREP = @GREP@
+GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
+GTHREAD_LIBS = @GTHREAD_LIBS@
+HB_LIBTOOL_VERSION_INFO = @HB_LIBTOOL_VERSION_INFO@
+HB_VERSION = @HB_VERSION@
+HB_VERSION_MAJOR = @HB_VERSION_MAJOR@
+HB_VERSION_MICRO = @HB_VERSION_MICRO@
+HB_VERSION_MINOR = @HB_VERSION_MINOR@
+ICU_CFLAGS = @ICU_CFLAGS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UNISCRIBE_CFLAGS = @UNISCRIBE_CFLAGS@
+UNISCRIBE_LIBS = @UNISCRIBE_LIBS@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LTLIBRARIES = libhb-old.la
+MAINSOURCES = \
+ harfbuzz-buffer.c \
+ harfbuzz-stream.c \
+ harfbuzz-gdef.c \
+ harfbuzz-gpos.c \
+ harfbuzz-gsub.c \
+ harfbuzz-impl.c \
+ harfbuzz-open.c \
+ harfbuzz-shaper.cpp \
+ harfbuzz-greek.c \
+ harfbuzz-tibetan.c \
+ harfbuzz-khmer.c \
+ harfbuzz-indic.cpp \
+ harfbuzz-hebrew.c \
+ harfbuzz-arabic.c \
+ harfbuzz-hangul.c \
+ harfbuzz-myanmar.c
+
+PUBLICHEADERS = \
+ harfbuzz.h \
+ harfbuzz-buffer.h \
+ harfbuzz-gdef.h \
+ harfbuzz-gpos.h \
+ harfbuzz-gsub.h \
+ harfbuzz-open.h \
+ harfbuzz-global.h \
+ harfbuzz-external.h \
+ harfbuzz-shaper.h \
+ harfbuzz-stream.h
+
+PRIVATEHEADERS = \
+ harfbuzz-impl.h \
+ harfbuzz-buffer-private.h \
+ harfbuzz-stream-private.h \
+ harfbuzz-gdef-private.h \
+ harfbuzz-gpos-private.h \
+ harfbuzz-gsub-private.h \
+ harfbuzz-open-private.h \
+ harfbuzz-shaper-private.h
+
+libhb_old_la_SOURCES = \
+ $(MAINSOURCES) \
+ $(PUBLICHEADERS) \
+ $(PRIVATEHEADERS)
+
+libhb_old_la_CPPFLAGS = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src \
+ -I$(top_builddir)/src
+
+EXTRA_DIST = README COPYING
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits src/hb-old/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnits src/hb-old/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libhb-old.la: $(libhb_old_la_OBJECTS) $(libhb_old_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(CXXLINK) $(libhb_old_la_OBJECTS) $(libhb_old_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhb_old_la-harfbuzz-arabic.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhb_old_la-harfbuzz-buffer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhb_old_la-harfbuzz-gdef.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhb_old_la-harfbuzz-gpos.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhb_old_la-harfbuzz-greek.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhb_old_la-harfbuzz-gsub.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhb_old_la-harfbuzz-hangul.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhb_old_la-harfbuzz-hebrew.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhb_old_la-harfbuzz-impl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhb_old_la-harfbuzz-indic.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhb_old_la-harfbuzz-khmer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhb_old_la-harfbuzz-myanmar.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhb_old_la-harfbuzz-open.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhb_old_la-harfbuzz-shaper.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhb_old_la-harfbuzz-stream.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhb_old_la-harfbuzz-tibetan.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+libhb_old_la-harfbuzz-buffer.lo: harfbuzz-buffer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhb_old_la-harfbuzz-buffer.lo -MD -MP -MF $(DEPDIR)/libhb_old_la-harfbuzz-buffer.Tpo -c -o libhb_old_la-harfbuzz-buffer.lo `test -f 'harfbuzz-buffer.c' || echo '$(srcdir)/'`harfbuzz-buffer.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhb_old_la-harfbuzz-buffer.Tpo $(DEPDIR)/libhb_old_la-harfbuzz-buffer.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='harfbuzz-buffer.c' object='libhb_old_la-harfbuzz-buffer.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhb_old_la-harfbuzz-buffer.lo `test -f 'harfbuzz-buffer.c' || echo '$(srcdir)/'`harfbuzz-buffer.c
+
+libhb_old_la-harfbuzz-stream.lo: harfbuzz-stream.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhb_old_la-harfbuzz-stream.lo -MD -MP -MF $(DEPDIR)/libhb_old_la-harfbuzz-stream.Tpo -c -o libhb_old_la-harfbuzz-stream.lo `test -f 'harfbuzz-stream.c' || echo '$(srcdir)/'`harfbuzz-stream.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhb_old_la-harfbuzz-stream.Tpo $(DEPDIR)/libhb_old_la-harfbuzz-stream.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='harfbuzz-stream.c' object='libhb_old_la-harfbuzz-stream.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhb_old_la-harfbuzz-stream.lo `test -f 'harfbuzz-stream.c' || echo '$(srcdir)/'`harfbuzz-stream.c
+
+libhb_old_la-harfbuzz-gdef.lo: harfbuzz-gdef.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhb_old_la-harfbuzz-gdef.lo -MD -MP -MF $(DEPDIR)/libhb_old_la-harfbuzz-gdef.Tpo -c -o libhb_old_la-harfbuzz-gdef.lo `test -f 'harfbuzz-gdef.c' || echo '$(srcdir)/'`harfbuzz-gdef.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhb_old_la-harfbuzz-gdef.Tpo $(DEPDIR)/libhb_old_la-harfbuzz-gdef.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='harfbuzz-gdef.c' object='libhb_old_la-harfbuzz-gdef.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhb_old_la-harfbuzz-gdef.lo `test -f 'harfbuzz-gdef.c' || echo '$(srcdir)/'`harfbuzz-gdef.c
+
+libhb_old_la-harfbuzz-gpos.lo: harfbuzz-gpos.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhb_old_la-harfbuzz-gpos.lo -MD -MP -MF $(DEPDIR)/libhb_old_la-harfbuzz-gpos.Tpo -c -o libhb_old_la-harfbuzz-gpos.lo `test -f 'harfbuzz-gpos.c' || echo '$(srcdir)/'`harfbuzz-gpos.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhb_old_la-harfbuzz-gpos.Tpo $(DEPDIR)/libhb_old_la-harfbuzz-gpos.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='harfbuzz-gpos.c' object='libhb_old_la-harfbuzz-gpos.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhb_old_la-harfbuzz-gpos.lo `test -f 'harfbuzz-gpos.c' || echo '$(srcdir)/'`harfbuzz-gpos.c
+
+libhb_old_la-harfbuzz-gsub.lo: harfbuzz-gsub.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhb_old_la-harfbuzz-gsub.lo -MD -MP -MF $(DEPDIR)/libhb_old_la-harfbuzz-gsub.Tpo -c -o libhb_old_la-harfbuzz-gsub.lo `test -f 'harfbuzz-gsub.c' || echo '$(srcdir)/'`harfbuzz-gsub.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhb_old_la-harfbuzz-gsub.Tpo $(DEPDIR)/libhb_old_la-harfbuzz-gsub.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='harfbuzz-gsub.c' object='libhb_old_la-harfbuzz-gsub.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhb_old_la-harfbuzz-gsub.lo `test -f 'harfbuzz-gsub.c' || echo '$(srcdir)/'`harfbuzz-gsub.c
+
+libhb_old_la-harfbuzz-impl.lo: harfbuzz-impl.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhb_old_la-harfbuzz-impl.lo -MD -MP -MF $(DEPDIR)/libhb_old_la-harfbuzz-impl.Tpo -c -o libhb_old_la-harfbuzz-impl.lo `test -f 'harfbuzz-impl.c' || echo '$(srcdir)/'`harfbuzz-impl.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhb_old_la-harfbuzz-impl.Tpo $(DEPDIR)/libhb_old_la-harfbuzz-impl.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='harfbuzz-impl.c' object='libhb_old_la-harfbuzz-impl.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhb_old_la-harfbuzz-impl.lo `test -f 'harfbuzz-impl.c' || echo '$(srcdir)/'`harfbuzz-impl.c
+
+libhb_old_la-harfbuzz-open.lo: harfbuzz-open.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhb_old_la-harfbuzz-open.lo -MD -MP -MF $(DEPDIR)/libhb_old_la-harfbuzz-open.Tpo -c -o libhb_old_la-harfbuzz-open.lo `test -f 'harfbuzz-open.c' || echo '$(srcdir)/'`harfbuzz-open.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhb_old_la-harfbuzz-open.Tpo $(DEPDIR)/libhb_old_la-harfbuzz-open.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='harfbuzz-open.c' object='libhb_old_la-harfbuzz-open.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhb_old_la-harfbuzz-open.lo `test -f 'harfbuzz-open.c' || echo '$(srcdir)/'`harfbuzz-open.c
+
+libhb_old_la-harfbuzz-greek.lo: harfbuzz-greek.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhb_old_la-harfbuzz-greek.lo -MD -MP -MF $(DEPDIR)/libhb_old_la-harfbuzz-greek.Tpo -c -o libhb_old_la-harfbuzz-greek.lo `test -f 'harfbuzz-greek.c' || echo '$(srcdir)/'`harfbuzz-greek.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhb_old_la-harfbuzz-greek.Tpo $(DEPDIR)/libhb_old_la-harfbuzz-greek.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='harfbuzz-greek.c' object='libhb_old_la-harfbuzz-greek.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhb_old_la-harfbuzz-greek.lo `test -f 'harfbuzz-greek.c' || echo '$(srcdir)/'`harfbuzz-greek.c
+
+libhb_old_la-harfbuzz-tibetan.lo: harfbuzz-tibetan.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhb_old_la-harfbuzz-tibetan.lo -MD -MP -MF $(DEPDIR)/libhb_old_la-harfbuzz-tibetan.Tpo -c -o libhb_old_la-harfbuzz-tibetan.lo `test -f 'harfbuzz-tibetan.c' || echo '$(srcdir)/'`harfbuzz-tibetan.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhb_old_la-harfbuzz-tibetan.Tpo $(DEPDIR)/libhb_old_la-harfbuzz-tibetan.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='harfbuzz-tibetan.c' object='libhb_old_la-harfbuzz-tibetan.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhb_old_la-harfbuzz-tibetan.lo `test -f 'harfbuzz-tibetan.c' || echo '$(srcdir)/'`harfbuzz-tibetan.c
+
+libhb_old_la-harfbuzz-khmer.lo: harfbuzz-khmer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhb_old_la-harfbuzz-khmer.lo -MD -MP -MF $(DEPDIR)/libhb_old_la-harfbuzz-khmer.Tpo -c -o libhb_old_la-harfbuzz-khmer.lo `test -f 'harfbuzz-khmer.c' || echo '$(srcdir)/'`harfbuzz-khmer.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhb_old_la-harfbuzz-khmer.Tpo $(DEPDIR)/libhb_old_la-harfbuzz-khmer.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='harfbuzz-khmer.c' object='libhb_old_la-harfbuzz-khmer.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhb_old_la-harfbuzz-khmer.lo `test -f 'harfbuzz-khmer.c' || echo '$(srcdir)/'`harfbuzz-khmer.c
+
+libhb_old_la-harfbuzz-hebrew.lo: harfbuzz-hebrew.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhb_old_la-harfbuzz-hebrew.lo -MD -MP -MF $(DEPDIR)/libhb_old_la-harfbuzz-hebrew.Tpo -c -o libhb_old_la-harfbuzz-hebrew.lo `test -f 'harfbuzz-hebrew.c' || echo '$(srcdir)/'`harfbuzz-hebrew.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhb_old_la-harfbuzz-hebrew.Tpo $(DEPDIR)/libhb_old_la-harfbuzz-hebrew.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='harfbuzz-hebrew.c' object='libhb_old_la-harfbuzz-hebrew.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhb_old_la-harfbuzz-hebrew.lo `test -f 'harfbuzz-hebrew.c' || echo '$(srcdir)/'`harfbuzz-hebrew.c
+
+libhb_old_la-harfbuzz-arabic.lo: harfbuzz-arabic.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhb_old_la-harfbuzz-arabic.lo -MD -MP -MF $(DEPDIR)/libhb_old_la-harfbuzz-arabic.Tpo -c -o libhb_old_la-harfbuzz-arabic.lo `test -f 'harfbuzz-arabic.c' || echo '$(srcdir)/'`harfbuzz-arabic.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhb_old_la-harfbuzz-arabic.Tpo $(DEPDIR)/libhb_old_la-harfbuzz-arabic.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='harfbuzz-arabic.c' object='libhb_old_la-harfbuzz-arabic.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhb_old_la-harfbuzz-arabic.lo `test -f 'harfbuzz-arabic.c' || echo '$(srcdir)/'`harfbuzz-arabic.c
+
+libhb_old_la-harfbuzz-hangul.lo: harfbuzz-hangul.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhb_old_la-harfbuzz-hangul.lo -MD -MP -MF $(DEPDIR)/libhb_old_la-harfbuzz-hangul.Tpo -c -o libhb_old_la-harfbuzz-hangul.lo `test -f 'harfbuzz-hangul.c' || echo '$(srcdir)/'`harfbuzz-hangul.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhb_old_la-harfbuzz-hangul.Tpo $(DEPDIR)/libhb_old_la-harfbuzz-hangul.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='harfbuzz-hangul.c' object='libhb_old_la-harfbuzz-hangul.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhb_old_la-harfbuzz-hangul.lo `test -f 'harfbuzz-hangul.c' || echo '$(srcdir)/'`harfbuzz-hangul.c
+
+libhb_old_la-harfbuzz-myanmar.lo: harfbuzz-myanmar.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhb_old_la-harfbuzz-myanmar.lo -MD -MP -MF $(DEPDIR)/libhb_old_la-harfbuzz-myanmar.Tpo -c -o libhb_old_la-harfbuzz-myanmar.lo `test -f 'harfbuzz-myanmar.c' || echo '$(srcdir)/'`harfbuzz-myanmar.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhb_old_la-harfbuzz-myanmar.Tpo $(DEPDIR)/libhb_old_la-harfbuzz-myanmar.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='harfbuzz-myanmar.c' object='libhb_old_la-harfbuzz-myanmar.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhb_old_la-harfbuzz-myanmar.lo `test -f 'harfbuzz-myanmar.c' || echo '$(srcdir)/'`harfbuzz-myanmar.c
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+libhb_old_la-harfbuzz-shaper.lo: harfbuzz-shaper.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libhb_old_la-harfbuzz-shaper.lo -MD -MP -MF $(DEPDIR)/libhb_old_la-harfbuzz-shaper.Tpo -c -o libhb_old_la-harfbuzz-shaper.lo `test -f 'harfbuzz-shaper.cpp' || echo '$(srcdir)/'`harfbuzz-shaper.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhb_old_la-harfbuzz-shaper.Tpo $(DEPDIR)/libhb_old_la-harfbuzz-shaper.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='harfbuzz-shaper.cpp' object='libhb_old_la-harfbuzz-shaper.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libhb_old_la-harfbuzz-shaper.lo `test -f 'harfbuzz-shaper.cpp' || echo '$(srcdir)/'`harfbuzz-shaper.cpp
+
+libhb_old_la-harfbuzz-indic.lo: harfbuzz-indic.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libhb_old_la-harfbuzz-indic.lo -MD -MP -MF $(DEPDIR)/libhb_old_la-harfbuzz-indic.Tpo -c -o libhb_old_la-harfbuzz-indic.lo `test -f 'harfbuzz-indic.cpp' || echo '$(srcdir)/'`harfbuzz-indic.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhb_old_la-harfbuzz-indic.Tpo $(DEPDIR)/libhb_old_la-harfbuzz-indic.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='harfbuzz-indic.cpp' object='libhb_old_la-harfbuzz-indic.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhb_old_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libhb_old_la-harfbuzz-indic.lo `test -f 'harfbuzz-indic.cpp' || echo '$(srcdir)/'`harfbuzz-indic.cpp
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+-include $(top_srcdir)/git.mk
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/hb-old/README b/src/hb-old/README
new file mode 100644
index 0000000..a29344a
--- /dev/null
+++ b/src/hb-old/README
@@ -0,0 +1,7 @@
+This is HarfBuzz-old, an OpenType Layout engine library.
+
+To report bugs or post to discussion mailing list, see:
+
+ http://freedesktop.org/wiki/Software/HarfBuzz
+
+For license information, see the file COPYING.
diff --git a/src/hb-old/harfbuzz-arabic.c b/src/hb-old/harfbuzz-arabic.c
new file mode 100644
index 0000000..51f839a
--- /dev/null
+++ b/src/hb-old/harfbuzz-arabic.c
@@ -0,0 +1,1150 @@
+/*
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#include "harfbuzz-shaper.h"
+#include "harfbuzz-shaper-private.h"
+
+#include <assert.h>
+
+static const HB_UChar16 ReplacementCharacter = 0xfffd;
+
+typedef struct {
+ unsigned char shape;
+ unsigned char justification;
+} HB_ArabicProperties;
+
+typedef enum {
+ XIsolated,
+ XFinal,
+ XInitial,
+ XMedial,
+ /* intermediate state */
+ XCausing
+} ArabicShape;
+
+/*
+// these groups correspond to the groups defined in the Unicode standard.
+// Some of these groups are equal with regards to both joining and line breaking behaviour,
+// and thus have the same enum value
+//
+// I'm not sure the mapping of syriac to arabic enums is correct with regards to justification, but as
+// I couldn't find any better document I'll hope for the best.
+*/
+typedef enum {
+ /* NonJoining */
+ ArabicNone,
+ ArabicSpace,
+ /* Transparent */
+ Transparent,
+ /* Causing */
+ Center,
+ Kashida,
+
+ /* Arabic */
+ /* Dual */
+ Beh,
+ Noon,
+ Meem = Noon,
+ Heh = Noon,
+ KnottedHeh = Noon,
+ HehGoal = Noon,
+ SwashKaf = Noon,
+ Yeh,
+ Hah,
+ Seen,
+ Sad = Seen,
+ Tah,
+ Kaf = Tah,
+ Gaf = Tah,
+ Lam = Tah,
+ Ain,
+ Feh = Ain,
+ Qaf = Ain,
+ /* Right */
+ Alef,
+ Waw,
+ Dal,
+ TehMarbuta = Dal,
+ Reh,
+ HamzaOnHehGoal,
+ YehWithTail = HamzaOnHehGoal,
+ YehBarre = HamzaOnHehGoal,
+
+ /* Syriac */
+ /* Dual */
+ Beth = Beh,
+ Gamal = Ain,
+ Heth = Noon,
+ Teth = Hah,
+ Yudh = Noon,
+ Kaph = Noon,
+ Lamadh = Lam,
+ Mim = Noon,
+ Nun = Noon,
+ Semakh = Noon,
+ FinalSemakh = Noon,
+ SyriacE = Ain,
+ Pe = Ain,
+ ReversedPe = Hah,
+ Qaph = Noon,
+ Shin = Noon,
+ Fe = Ain,
+
+ /* Right */
+ Alaph = Alef,
+ Dalath = Dal,
+ He = Dal,
+ SyriacWaw = Waw,
+ Zain = Alef,
+ YudhHe = Waw,
+ Sadhe = HamzaOnHehGoal,
+ Taw = Dal,
+
+ /* Compiler bug? Otherwise ArabicGroupsEnd would be equal to Dal + 1. */
+ Dummy = HamzaOnHehGoal,
+ ArabicGroupsEnd
+} ArabicGroup;
+
+static const unsigned char arabic_group[0x150] = {
+ ArabicNone, ArabicNone, ArabicNone, ArabicNone,
+ ArabicNone, ArabicNone, ArabicNone, ArabicNone,
+ ArabicNone, ArabicNone, ArabicNone, ArabicNone,
+ ArabicNone, ArabicNone, ArabicNone, ArabicNone,
+
+ Transparent, Transparent, Transparent, Transparent,
+ Transparent, Transparent, ArabicNone, ArabicNone,
+ ArabicNone, ArabicNone, ArabicNone, ArabicNone,
+ ArabicNone, ArabicNone, ArabicNone, ArabicNone,
+
+ ArabicNone, ArabicNone, Alef, Alef,
+ Waw, Alef, Yeh, Alef,
+ Beh, TehMarbuta, Beh, Beh,
+ Hah, Hah, Hah, Dal,
+
+ Dal, Reh, Reh, Seen,
+ Seen, Sad, Sad, Tah,
+ Tah, Ain, Ain, ArabicNone,
+ ArabicNone, ArabicNone, ArabicNone, ArabicNone,
+
+ /* 0x640 */
+ Kashida, Feh, Qaf, Kaf,
+ Lam, Meem, Noon, Heh,
+ Waw, Yeh, Yeh, Transparent,
+ Transparent, Transparent, Transparent, Transparent,
+
+ Transparent, Transparent, Transparent, Transparent,
+ Transparent, Transparent, Transparent, Transparent,
+ Transparent, ArabicNone, ArabicNone, ArabicNone,
+ ArabicNone, ArabicNone, ArabicNone, ArabicNone,
+
+ ArabicNone, ArabicNone, ArabicNone, ArabicNone,
+ ArabicNone, ArabicNone, ArabicNone, ArabicNone,
+ ArabicNone, ArabicNone, ArabicNone, ArabicNone,
+ ArabicNone, ArabicNone, Beh, Qaf,
+
+ Transparent, Alef, Alef, Alef,
+ ArabicNone, Alef, Waw, Waw,
+ Yeh, Beh, Beh, Beh,
+ Beh, Beh, Beh, Beh,
+
+ /* 0x680 */
+ Beh, Hah, Hah, Hah,
+ Hah, Hah, Hah, Hah,
+ Dal, Dal, Dal, Dal,
+ Dal, Dal, Dal, Dal,
+
+ Dal, Reh, Reh, Reh,
+ Reh, Reh, Reh, Reh,
+ Reh, Reh, Seen, Seen,
+ Seen, Sad, Sad, Tah,
+
+ Ain, Feh, Feh, Feh,
+ Feh, Feh, Feh, Qaf,
+ Qaf, Gaf, SwashKaf, Gaf,
+ Kaf, Kaf, Kaf, Gaf,
+
+ Gaf, Gaf, Gaf, Gaf,
+ Gaf, Lam, Lam, Lam,
+ Lam, Noon, Noon, Noon,
+ Noon, Noon, KnottedHeh, Hah,
+
+ /* 0x6c0 */
+ TehMarbuta, HehGoal, HamzaOnHehGoal, HamzaOnHehGoal,
+ Waw, Waw, Waw, Waw,
+ Waw, Waw, Waw, Waw,
+ Yeh, YehWithTail, Yeh, Waw,
+
+ Yeh, Yeh, YehBarre, YehBarre,
+ ArabicNone, TehMarbuta, Transparent, Transparent,
+ Transparent, Transparent, Transparent, Transparent,
+ Transparent, ArabicNone, ArabicNone, Transparent,
+
+ Transparent, Transparent, Transparent, Transparent,
+ Transparent, ArabicNone, ArabicNone, Transparent,
+ Transparent, ArabicNone, Transparent, Transparent,
+ Transparent, Transparent, Dal, Reh,
+
+ ArabicNone, ArabicNone, ArabicNone, ArabicNone,
+ ArabicNone, ArabicNone, ArabicNone, ArabicNone,
+ ArabicNone, ArabicNone, Seen, Sad,
+ Ain, ArabicNone, ArabicNone, KnottedHeh,
+
+ /* 0x700 */
+ ArabicNone, ArabicNone, ArabicNone, ArabicNone,
+ ArabicNone, ArabicNone, ArabicNone, ArabicNone,
+ ArabicNone, ArabicNone, ArabicNone, ArabicNone,
+ ArabicNone, ArabicNone, ArabicNone, ArabicNone,
+
+ Alaph, Transparent, Beth, Gamal,
+ Gamal, Dalath, Dalath, He,
+ SyriacWaw, Zain, Heth, Teth,
+ Teth, Yudh, YudhHe, Kaph,
+
+ Lamadh, Mim, Nun, Semakh,
+ FinalSemakh, SyriacE, Pe, ReversedPe,
+ Sadhe, Qaph, Dalath, Shin,
+ Taw, Beth, Gamal, Dalath,
+
+ Transparent, Transparent, Transparent, Transparent,
+ Transparent, Transparent, Transparent, Transparent,
+ Transparent, Transparent, Transparent, Transparent,
+ Transparent, Transparent, Transparent, Transparent,
+
+ Transparent, Transparent, Transparent, Transparent,
+ Transparent, Transparent, Transparent, Transparent,
+ Transparent, Transparent, Transparent, ArabicNone,
+ ArabicNone, Zain, Kaph, Fe,
+};
+
+static ArabicGroup arabicGroup(unsigned short uc)
+{
+ if (uc >= 0x0600 && uc < 0x750)
+ return (ArabicGroup) arabic_group[uc-0x600];
+ else if (uc == 0x200d)
+ return Center;
+ else if (HB_GetUnicodeCharCategory(uc) == HB_Separator_Space)
+ return ArabicSpace;
+ else
+ return ArabicNone;
+}
+
+
+/*
+ Arabic shaping obeys a number of rules according to the joining classes (see Unicode book, section on
+ arabic).
+
+ Each unicode char has a joining class (right, dual (left&right), center (joincausing) or transparent).
+ transparent joining is not encoded in HB_UChar16::joining(), but applies to all combining marks and format marks.
+
+ Right join-causing: dual + center
+ Left join-causing: dual + right + center
+
+ Rules are as follows (for a string already in visual order, as we have it here):
+
+ R1 Transparent characters do not affect joining behaviour.
+ R2 A right joining character, that has a right join-causing char on the right will get form XRight
+ (R3 A left joining character, that has a left join-causing char on the left will get form XLeft)
+ Note: the above rule is meaningless, as there are no pure left joining characters defined in Unicode
+ R4 A dual joining character, that has a left join-causing char on the left and a right join-causing char on
+ the right will get form XMedial
+ R5 A dual joining character, that has a right join causing char on the right, and no left join causing char on the left
+ will get form XRight
+ R6 A dual joining character, that has a left join causing char on the left, and no right join causing char on the right
+ will get form XLeft
+ R7 Otherwise the character will get form XIsolated
+
+ Additionally we have to do the minimal ligature support for lam-alef ligatures:
+
+ L1 Transparent characters do not affect ligature behaviour.
+ L2 Any sequence of Alef(XRight) + Lam(XMedial) will form the ligature Alef.Lam(XLeft)
+ L3 Any sequence of Alef(XRight) + Lam(XLeft) will form the ligature Alef.Lam(XIsolated)
+
+ The state table below handles rules R1-R7.
+*/
+
+typedef enum {
+ JNone,
+ JCausing,
+ JDual,
+ JRight,
+ JTransparent
+} Joining;
+
+static const Joining joining_for_group[ArabicGroupsEnd] = {
+ /* NonJoining */
+ JNone, /* ArabicNone */
+ JNone, /* ArabicSpace */
+ /* Transparent */
+ JTransparent, /* Transparent */
+ /* Causing */
+ JCausing, /* Center */
+ JCausing, /* Kashida */
+ /* Dual */
+ JDual, /* Beh */
+ JDual, /* Noon */
+ JDual, /* Yeh */
+ JDual, /* Hah */
+ JDual, /* Seen */
+ JDual, /* Tah */
+ JDual, /* Ain */
+ /* Right */
+ JRight, /* Alef */
+ JRight, /* Waw */
+ JRight, /* Dal */
+ JRight, /* Reh */
+ JRight /* HamzaOnHehGoal */
+};
+
+
+typedef struct {
+ ArabicShape form1;
+ ArabicShape form2;
+} JoiningPair;
+
+static const JoiningPair joining_table[5][4] =
+/* None, Causing, Dual, Right */
+{
+ { { XIsolated, XIsolated }, { XIsolated, XCausing }, { XIsolated, XInitial }, { XIsolated, XIsolated } }, /* XIsolated */
+ { { XFinal, XIsolated }, { XFinal, XCausing }, { XFinal, XInitial }, { XFinal, XIsolated } }, /* XFinal */
+ { { XIsolated, XIsolated }, { XInitial, XCausing }, { XInitial, XMedial }, { XInitial, XFinal } }, /* XInitial */
+ { { XFinal, XIsolated }, { XMedial, XCausing }, { XMedial, XMedial }, { XMedial, XFinal } }, /* XMedial */
+ { { XIsolated, XIsolated }, { XIsolated, XCausing }, { XIsolated, XMedial }, { XIsolated, XFinal } }, /* XCausing */
+};
+
+
+/*
+According to http://www.microsoft.com/middleeast/Arabicdev/IE6/KBase.asp
+
+1. Find the priority of the connecting opportunities in each word
+2. Add expansion at the highest priority connection opportunity
+3. If more than one connection opportunity have the same highest value,
+ use the opportunity closest to the end of the word.
+
+Following is a chart that provides the priority for connection
+opportunities and where expansion occurs. The character group names
+are those in table 6.6 of the UNICODE 2.0 book.
+
+
+PrioritY Glyph Condition Kashida Location
+
+Arabic_Kashida User inserted Kashida The user entered a Kashida in a position. After the user
+ (Shift+j or Shift+[E with hat]) Thus, it is the highest priority to insert an inserted kashida
+ automatic kashida.
+
+Arabic_Seen Seen, Sad Connecting to the next character. After the character.
+ (Initial or medial form).
+
+Arabic_HaaDal Teh Marbutah, Haa, Dal Connecting to previous character. Before the final form
+ of these characters.
+
+Arabic_Alef Alef, Tah, Lam, Connecting to previous character. Before the final form
+ Kaf and Gaf of these characters.
+
+Arabic_BaRa Reh, Yeh Connected to medial Beh Before preceding medial Baa
+
+Arabic_Waw Waw, Ain, Qaf, Feh Connecting to previous character. Before the final form of
+ these characters.
+
+Arabic_Normal Other connecting Connecting to previous character. Before the final form
+ characters of these characters.
+
+
+
+This seems to imply that we have at most one kashida point per arabic word.
+
+*/
+
+static void getArabicProperties(const unsigned short *chars, int len, HB_ArabicProperties *properties)
+{
+/* qDebug("arabicSyriacOpenTypeShape: properties:"); */
+ int lastPos = 0;
+ int lastGroup = ArabicNone;
+ int i = 0;
+
+ ArabicGroup group = arabicGroup(chars[0]);
+ Joining j = joining_for_group[group];
+ ArabicShape shape = joining_table[XIsolated][j].form2;
+ properties[0].justification = HB_NoJustification;
+
+ for (i = 1; i < len; ++i) {
+ /* #### fix handling for spaces and punktuation */
+ properties[i].justification = HB_NoJustification;
+
+ group = arabicGroup(chars[i]);
+ j = joining_for_group[group];
+
+ if (j == JTransparent) {
+ properties[i].shape = XIsolated;
+ continue;
+ }
+
+ properties[lastPos].shape = joining_table[shape][j].form1;
+ shape = joining_table[shape][j].form2;
+
+ switch(lastGroup) {
+ case Seen:
+ if (properties[lastPos].shape == XInitial || properties[lastPos].shape == XMedial)
+ properties[i-1].justification = HB_Arabic_Seen;
+ break;
+ case Hah:
+ if (properties[lastPos].shape == XFinal)
+ properties[lastPos-1].justification = HB_Arabic_HaaDal;
+ break;
+ case Alef:
+ if (properties[lastPos].shape == XFinal)
+ properties[lastPos-1].justification = HB_Arabic_Alef;
+ break;
+ case Ain:
+ if (properties[lastPos].shape == XFinal)
+ properties[lastPos-1].justification = HB_Arabic_Waw;
+ break;
+ case Noon:
+ if (properties[lastPos].shape == XFinal)
+ properties[lastPos-1].justification = HB_Arabic_Normal;
+ break;
+ case ArabicNone:
+ break;
+
+ default:
+ assert(FALSE);
+ }
+
+ lastGroup = ArabicNone;
+
+ switch(group) {
+ case ArabicNone:
+ case Transparent:
+ /* ### Center should probably be treated as transparent when it comes to justification. */
+ case Center:
+ break;
+ case ArabicSpace:
+ properties[i].justification = HB_Arabic_Space;
+ break;
+ case Kashida:
+ properties[i].justification = HB_Arabic_Kashida;
+ break;
+ case Seen:
+ lastGroup = Seen;
+ break;
+
+ case Hah:
+ case Dal:
+ lastGroup = Hah;
+ break;
+
+ case Alef:
+ case Tah:
+ lastGroup = Alef;
+ break;
+
+ case Yeh:
+ case Reh:
+ if (properties[lastPos].shape == XMedial && arabicGroup(chars[lastPos]) == Beh)
+ properties[lastPos-1].justification = HB_Arabic_BaRa;
+ break;
+
+ case Ain:
+ case Waw:
+ lastGroup = Ain;
+ break;
+
+ case Noon:
+ case Beh:
+ case HamzaOnHehGoal:
+ lastGroup = Noon;
+ break;
+ case ArabicGroupsEnd:
+ assert(FALSE);
+ }
+
+ lastPos = i;
+ }
+ properties[lastPos].shape = joining_table[shape][JNone].form1;
+
+
+ /*
+ for (int i = 0; i < len; ++i)
+ qDebug("arabic properties(%d): uc=%x shape=%d, justification=%d", i, chars[i], properties[i].shape, properties[i].justification);
+ */
+}
+
+static Joining getNkoJoining(unsigned short uc)
+{
+ if (uc < 0x7ca)
+ return JNone;
+ if (uc <= 0x7ea)
+ return JDual;
+ if (uc <= 0x7f3)
+ return JTransparent;
+ if (uc <= 0x7f9)
+ return JNone;
+ if (uc == 0x7fa)
+ return JCausing;
+ return JNone;
+}
+
+static void getNkoProperties(const unsigned short *chars, int len, HB_ArabicProperties *properties)
+{
+ int lastPos = 0;
+ int i = 0;
+
+ Joining j = getNkoJoining(chars[0]);
+ ArabicShape shape = joining_table[XIsolated][j].form2;
+ properties[0].justification = HB_NoJustification;
+
+ for (i = 1; i < len; ++i) {
+ properties[i].justification = (HB_GetUnicodeCharCategory(chars[i]) == HB_Separator_Space) ?
+ ArabicSpace : ArabicNone;
+
+ j = getNkoJoining(chars[i]);
+
+ if (j == JTransparent) {
+ properties[i].shape = XIsolated;
+ continue;
+ }
+
+ properties[lastPos].shape = joining_table[shape][j].form1;
+ shape = joining_table[shape][j].form2;
+
+
+ lastPos = i;
+ }
+ properties[lastPos].shape = joining_table[shape][JNone].form1;
+
+
+ /*
+ for (int i = 0; i < len; ++i)
+ qDebug("nko properties(%d): uc=%x shape=%d, justification=%d", i, chars[i], properties[i].shape, properties[i].justification);
+ */
+}
+
+/*
+// The unicode to unicode shaping codec.
+// does only presentation forms B at the moment, but that should be enough for
+// simple display
+*/
+static const hb_uint16 arabicUnicodeMapping[256][2] = {
+ /* base of shaped forms, and number-1 of them (0 for non shaping,
+ 1 for right binding and 3 for dual binding */
+
+ /* These are just the glyphs available in Unicode,
+ some characters are in R class, but have no glyphs in Unicode. */
+
+ { 0x0600, 0 }, /* 0x0600 */
+ { 0x0601, 0 }, /* 0x0601 */
+ { 0x0602, 0 }, /* 0x0602 */
+ { 0x0603, 0 }, /* 0x0603 */
+ { 0x0604, 0 }, /* 0x0604 */
+ { 0x0605, 0 }, /* 0x0605 */
+ { 0x0606, 0 }, /* 0x0606 */
+ { 0x0607, 0 }, /* 0x0607 */
+ { 0x0608, 0 }, /* 0x0608 */
+ { 0x0609, 0 }, /* 0x0609 */
+ { 0x060A, 0 }, /* 0x060A */
+ { 0x060B, 0 }, /* 0x060B */
+ { 0x060C, 0 }, /* 0x060C */
+ { 0x060D, 0 }, /* 0x060D */
+ { 0x060E, 0 }, /* 0x060E */
+ { 0x060F, 0 }, /* 0x060F */
+
+ { 0x0610, 0 }, /* 0x0610 */
+ { 0x0611, 0 }, /* 0x0611 */
+ { 0x0612, 0 }, /* 0x0612 */
+ { 0x0613, 0 }, /* 0x0613 */
+ { 0x0614, 0 }, /* 0x0614 */
+ { 0x0615, 0 }, /* 0x0615 */
+ { 0x0616, 0 }, /* 0x0616 */
+ { 0x0617, 0 }, /* 0x0617 */
+ { 0x0618, 0 }, /* 0x0618 */
+ { 0x0619, 0 }, /* 0x0619 */
+ { 0x061A, 0 }, /* 0x061A */
+ { 0x061B, 0 }, /* 0x061B */
+ { 0x061C, 0 }, /* 0x061C */
+ { 0x061D, 0 }, /* 0x061D */
+ { 0x061E, 0 }, /* 0x061E */
+ { 0x061F, 0 }, /* 0x061F */
+
+ { 0x0620, 0 }, /* 0x0620 */
+ { 0xFE80, 0 }, /* 0x0621 HAMZA */
+ { 0xFE81, 1 }, /* 0x0622 R ALEF WITH MADDA ABOVE */
+ { 0xFE83, 1 }, /* 0x0623 R ALEF WITH HAMZA ABOVE */
+ { 0xFE85, 1 }, /* 0x0624 R WAW WITH HAMZA ABOVE */
+ { 0xFE87, 1 }, /* 0x0625 R ALEF WITH HAMZA BELOW */
+ { 0xFE89, 3 }, /* 0x0626 D YEH WITH HAMZA ABOVE */
+ { 0xFE8D, 1 }, /* 0x0627 R ALEF */
+ { 0xFE8F, 3 }, /* 0x0628 D BEH */
+ { 0xFE93, 1 }, /* 0x0629 R TEH MARBUTA */
+ { 0xFE95, 3 }, /* 0x062A D TEH */
+ { 0xFE99, 3 }, /* 0x062B D THEH */
+ { 0xFE9D, 3 }, /* 0x062C D JEEM */
+ { 0xFEA1, 3 }, /* 0x062D D HAH */
+ { 0xFEA5, 3 }, /* 0x062E D KHAH */
+ { 0xFEA9, 1 }, /* 0x062F R DAL */
+
+ { 0xFEAB, 1 }, /* 0x0630 R THAL */
+ { 0xFEAD, 1 }, /* 0x0631 R REH */
+ { 0xFEAF, 1 }, /* 0x0632 R ZAIN */
+ { 0xFEB1, 3 }, /* 0x0633 D SEEN */
+ { 0xFEB5, 3 }, /* 0x0634 D SHEEN */
+ { 0xFEB9, 3 }, /* 0x0635 D SAD */
+ { 0xFEBD, 3 }, /* 0x0636 D DAD */
+ { 0xFEC1, 3 }, /* 0x0637 D TAH */
+ { 0xFEC5, 3 }, /* 0x0638 D ZAH */
+ { 0xFEC9, 3 }, /* 0x0639 D AIN */
+ { 0xFECD, 3 }, /* 0x063A D GHAIN */
+ { 0x063B, 0 }, /* 0x063B */
+ { 0x063C, 0 }, /* 0x063C */
+ { 0x063D, 0 }, /* 0x063D */
+ { 0x063E, 0 }, /* 0x063E */
+ { 0x063F, 0 }, /* 0x063F */
+
+ { 0x0640, 0 }, /* 0x0640 C TATWEEL // ### Join Causing, only one glyph */
+ { 0xFED1, 3 }, /* 0x0641 D FEH */
+ { 0xFED5, 3 }, /* 0x0642 D QAF */
+ { 0xFED9, 3 }, /* 0x0643 D KAF */
+ { 0xFEDD, 3 }, /* 0x0644 D LAM */
+ { 0xFEE1, 3 }, /* 0x0645 D MEEM */
+ { 0xFEE5, 3 }, /* 0x0646 D NOON */
+ { 0xFEE9, 3 }, /* 0x0647 D HEH */
+ { 0xFEED, 1 }, /* 0x0648 R WAW */
+ { 0x0649, 3 }, /* 0x0649 ALEF MAKSURA // ### Dual, glyphs not consecutive, handle in code. */
+ { 0xFEF1, 3 }, /* 0x064A D YEH */
+ { 0x064B, 0 }, /* 0x064B */
+ { 0x064C, 0 }, /* 0x064C */
+ { 0x064D, 0 }, /* 0x064D */
+ { 0x064E, 0 }, /* 0x064E */
+ { 0x064F, 0 }, /* 0x064F */
+
+ { 0x0650, 0 }, /* 0x0650 */
+ { 0x0651, 0 }, /* 0x0651 */
+ { 0x0652, 0 }, /* 0x0652 */
+ { 0x0653, 0 }, /* 0x0653 */
+ { 0x0654, 0 }, /* 0x0654 */
+ { 0x0655, 0 }, /* 0x0655 */
+ { 0x0656, 0 }, /* 0x0656 */
+ { 0x0657, 0 }, /* 0x0657 */
+ { 0x0658, 0 }, /* 0x0658 */
+ { 0x0659, 0 }, /* 0x0659 */
+ { 0x065A, 0 }, /* 0x065A */
+ { 0x065B, 0 }, /* 0x065B */
+ { 0x065C, 0 }, /* 0x065C */
+ { 0x065D, 0 }, /* 0x065D */
+ { 0x065E, 0 }, /* 0x065E */
+ { 0x065F, 0 }, /* 0x065F */
+
+ { 0x0660, 0 }, /* 0x0660 */
+ { 0x0661, 0 }, /* 0x0661 */
+ { 0x0662, 0 }, /* 0x0662 */
+ { 0x0663, 0 }, /* 0x0663 */
+ { 0x0664, 0 }, /* 0x0664 */
+ { 0x0665, 0 }, /* 0x0665 */
+ { 0x0666, 0 }, /* 0x0666 */
+ { 0x0667, 0 }, /* 0x0667 */
+ { 0x0668, 0 }, /* 0x0668 */
+ { 0x0669, 0 }, /* 0x0669 */
+ { 0x066A, 0 }, /* 0x066A */
+ { 0x066B, 0 }, /* 0x066B */
+ { 0x066C, 0 }, /* 0x066C */
+ { 0x066D, 0 }, /* 0x066D */
+ { 0x066E, 0 }, /* 0x066E */
+ { 0x066F, 0 }, /* 0x066F */
+
+ { 0x0670, 0 }, /* 0x0670 */
+ { 0xFB50, 1 }, /* 0x0671 R ALEF WASLA */
+ { 0x0672, 0 }, /* 0x0672 */
+ { 0x0673, 0 }, /* 0x0673 */
+ { 0x0674, 0 }, /* 0x0674 */
+ { 0x0675, 0 }, /* 0x0675 */
+ { 0x0676, 0 }, /* 0x0676 */
+ { 0x0677, 0 }, /* 0x0677 */
+ { 0x0678, 0 }, /* 0x0678 */
+ { 0xFB66, 3 }, /* 0x0679 D TTEH */
+ { 0xFB5E, 3 }, /* 0x067A D TTEHEH */
+ { 0xFB52, 3 }, /* 0x067B D BEEH */
+ { 0x067C, 0 }, /* 0x067C */
+ { 0x067D, 0 }, /* 0x067D */
+ { 0xFB56, 3 }, /* 0x067E D PEH */
+ { 0xFB62, 3 }, /* 0x067F D TEHEH */
+
+ { 0xFB5A, 3 }, /* 0x0680 D BEHEH */
+ { 0x0681, 0 }, /* 0x0681 */
+ { 0x0682, 0 }, /* 0x0682 */
+ { 0xFB76, 3 }, /* 0x0683 D NYEH */
+ { 0xFB72, 3 }, /* 0x0684 D DYEH */
+ { 0x0685, 0 }, /* 0x0685 */
+ { 0xFB7A, 3 }, /* 0x0686 D TCHEH */
+ { 0xFB7E, 3 }, /* 0x0687 D TCHEHEH */
+ { 0xFB88, 1 }, /* 0x0688 R DDAL */
+ { 0x0689, 0 }, /* 0x0689 */
+ { 0x068A, 0 }, /* 0x068A */
+ { 0x068B, 0 }, /* 0x068B */
+ { 0xFB84, 1 }, /* 0x068C R DAHAL */
+ { 0xFB82, 1 }, /* 0x068D R DDAHAL */
+ { 0xFB86, 1 }, /* 0x068E R DUL */
+ { 0x068F, 0 }, /* 0x068F */
+
+ { 0x0690, 0 }, /* 0x0690 */
+ { 0xFB8C, 1 }, /* 0x0691 R RREH */
+ { 0x0692, 0 }, /* 0x0692 */
+ { 0x0693, 0 }, /* 0x0693 */
+ { 0x0694, 0 }, /* 0x0694 */
+ { 0x0695, 0 }, /* 0x0695 */
+ { 0x0696, 0 }, /* 0x0696 */
+ { 0x0697, 0 }, /* 0x0697 */
+ { 0xFB8A, 1 }, /* 0x0698 R JEH */
+ { 0x0699, 0 }, /* 0x0699 */
+ { 0x069A, 0 }, /* 0x069A */
+ { 0x069B, 0 }, /* 0x069B */
+ { 0x069C, 0 }, /* 0x069C */
+ { 0x069D, 0 }, /* 0x069D */
+ { 0x069E, 0 }, /* 0x069E */
+ { 0x069F, 0 }, /* 0x069F */
+
+ { 0x06A0, 0 }, /* 0x06A0 */
+ { 0x06A1, 0 }, /* 0x06A1 */
+ { 0x06A2, 0 }, /* 0x06A2 */
+ { 0x06A3, 0 }, /* 0x06A3 */
+ { 0xFB6A, 3 }, /* 0x06A4 D VEH */
+ { 0x06A5, 0 }, /* 0x06A5 */
+ { 0xFB6E, 3 }, /* 0x06A6 D PEHEH */
+ { 0x06A7, 0 }, /* 0x06A7 */
+ { 0x06A8, 0 }, /* 0x06A8 */
+ { 0xFB8E, 3 }, /* 0x06A9 D KEHEH */
+ { 0x06AA, 0 }, /* 0x06AA */
+ { 0x06AB, 0 }, /* 0x06AB */
+ { 0x06AC, 0 }, /* 0x06AC */
+ { 0xFBD3, 3 }, /* 0x06AD D NG */
+ { 0x06AE, 0 }, /* 0x06AE */
+ { 0xFB92, 3 }, /* 0x06AF D GAF */
+
+ { 0x06B0, 0 }, /* 0x06B0 */
+ { 0xFB9A, 3 }, /* 0x06B1 D NGOEH */
+ { 0x06B2, 0 }, /* 0x06B2 */
+ { 0xFB96, 3 }, /* 0x06B3 D GUEH */
+ { 0x06B4, 0 }, /* 0x06B4 */
+ { 0x06B5, 0 }, /* 0x06B5 */
+ { 0x06B6, 0 }, /* 0x06B6 */
+ { 0x06B7, 0 }, /* 0x06B7 */
+ { 0x06B8, 0 }, /* 0x06B8 */
+ { 0x06B9, 0 }, /* 0x06B9 */
+ { 0xFB9E, 1 }, /* 0x06BA R NOON GHUNNA */
+ { 0xFBA0, 3 }, /* 0x06BB D RNOON */
+ { 0x06BC, 0 }, /* 0x06BC */
+ { 0x06BD, 0 }, /* 0x06BD */
+ { 0xFBAA, 3 }, /* 0x06BE D HEH DOACHASHMEE */
+ { 0x06BF, 0 }, /* 0x06BF */
+
+ { 0xFBA4, 1 }, /* 0x06C0 R HEH WITH YEH ABOVE */
+ { 0xFBA6, 3 }, /* 0x06C1 D HEH GOAL */
+ { 0x06C2, 0 }, /* 0x06C2 */
+ { 0x06C3, 0 }, /* 0x06C3 */
+ { 0x06C4, 0 }, /* 0x06C4 */
+ { 0xFBE0, 1 }, /* 0x06C5 R KIRGHIZ OE */
+ { 0xFBD9, 1 }, /* 0x06C6 R OE */
+ { 0xFBD7, 1 }, /* 0x06C7 R U */
+ { 0xFBDB, 1 }, /* 0x06C8 R YU */
+ { 0xFBE2, 1 }, /* 0x06C9 R KIRGHIZ YU */
+ { 0x06CA, 0 }, /* 0x06CA */
+ { 0xFBDE, 1 }, /* 0x06CB R VE */
+ { 0xFBFC, 3 }, /* 0x06CC D FARSI YEH */
+ { 0x06CD, 0 }, /* 0x06CD */
+ { 0x06CE, 0 }, /* 0x06CE */
+ { 0x06CF, 0 }, /* 0x06CF */
+
+ { 0xFBE4, 3 }, /* 0x06D0 D E */
+ { 0x06D1, 0 }, /* 0x06D1 */
+ { 0xFBAE, 1 }, /* 0x06D2 R YEH BARREE */
+ { 0xFBB0, 1 }, /* 0x06D3 R YEH BARREE WITH HAMZA ABOVE */
+ { 0x06D4, 0 }, /* 0x06D4 */
+ { 0x06D5, 0 }, /* 0x06D5 */
+ { 0x06D6, 0 }, /* 0x06D6 */
+ { 0x06D7, 0 }, /* 0x06D7 */
+ { 0x06D8, 0 }, /* 0x06D8 */
+ { 0x06D9, 0 }, /* 0x06D9 */
+ { 0x06DA, 0 }, /* 0x06DA */
+ { 0x06DB, 0 }, /* 0x06DB */
+ { 0x06DC, 0 }, /* 0x06DC */
+ { 0x06DD, 0 }, /* 0x06DD */
+ { 0x06DE, 0 }, /* 0x06DE */
+ { 0x06DF, 0 }, /* 0x06DF */
+
+ { 0x06E0, 0 }, /* 0x06E0 */
+ { 0x06E1, 0 }, /* 0x06E1 */
+ { 0x06E2, 0 }, /* 0x06E2 */
+ { 0x06E3, 0 }, /* 0x06E3 */
+ { 0x06E4, 0 }, /* 0x06E4 */
+ { 0x06E5, 0 }, /* 0x06E5 */
+ { 0x06E6, 0 }, /* 0x06E6 */
+ { 0x06E7, 0 }, /* 0x06E7 */
+ { 0x06E8, 0 }, /* 0x06E8 */
+ { 0x06E9, 0 }, /* 0x06E9 */
+ { 0x06EA, 0 }, /* 0x06EA */
+ { 0x06EB, 0 }, /* 0x06EB */
+ { 0x06EC, 0 }, /* 0x06EC */
+ { 0x06ED, 0 }, /* 0x06ED */
+ { 0x06EE, 0 }, /* 0x06EE */
+ { 0x06EF, 0 }, /* 0x06EF */
+
+ { 0x06F0, 0 }, /* 0x06F0 */
+ { 0x06F1, 0 }, /* 0x06F1 */
+ { 0x06F2, 0 }, /* 0x06F2 */
+ { 0x06F3, 0 }, /* 0x06F3 */
+ { 0x06F4, 0 }, /* 0x06F4 */
+ { 0x06F5, 0 }, /* 0x06F5 */
+ { 0x06F6, 0 }, /* 0x06F6 */
+ { 0x06F7, 0 }, /* 0x06F7 */
+ { 0x06F8, 0 }, /* 0x06F8 */
+ { 0x06F9, 0 }, /* 0x06F9 */
+ { 0x06FA, 0 }, /* 0x06FA */
+ { 0x06FB, 0 }, /* 0x06FB */
+ { 0x06FC, 0 }, /* 0x06FC */
+ { 0x06FD, 0 }, /* 0x06FD */
+ { 0x06FE, 0 }, /* 0x06FE */
+ { 0x06FF, 0 } /* 0x06FF */
+};
+
+/* the arabicUnicodeMapping does not work for U+0649 ALEF MAKSURA, this table does */
+static const hb_uint16 alefMaksura[4] = {0xFEEF, 0xFEF0, 0xFBE8, 0xFBE9};
+
+/*
+// this is a bit tricky. Alef always binds to the right, so the second parameter descibing the shape
+// of the lam can be either initial of medial. So initial maps to the isolated form of the ligature,
+// medial to the final form
+*/
+static const hb_uint16 arabicUnicodeLamAlefMapping[6][4] = {
+ { 0xfffd, 0xfffd, 0xfef5, 0xfef6 }, /* 0x622 R Alef with Madda above */
+ { 0xfffd, 0xfffd, 0xfef7, 0xfef8 }, /* 0x623 R Alef with Hamza above */
+ { 0xfffd, 0xfffd, 0xfffd, 0xfffd }, /* 0x624 // Just to fill the table ;-) */
+ { 0xfffd, 0xfffd, 0xfef9, 0xfefa }, /* 0x625 R Alef with Hamza below */
+ { 0xfffd, 0xfffd, 0xfffd, 0xfffd }, /* 0x626 // Just to fill the table ;-) */
+ { 0xfffd, 0xfffd, 0xfefb, 0xfefc } /* 0x627 R Alef */
+};
+
+static int getShape(hb_uint8 cell, int shape)
+{
+ /* the arabicUnicodeMapping does not work for U+0649 ALEF MAKSURA, handle this here */
+ int ch = (cell != 0x49)
+ ? (shape ? arabicUnicodeMapping[cell][0] + shape : 0x600+cell)
+ : alefMaksura[shape] ;
+ return ch;
+}
+
+
+/*
+ Two small helper functions for arabic shaping.
+*/
+static HB_UChar16 prevChar(const HB_UChar16 *str, int pos)
+{
+ /*qDebug("leftChar: pos=%d", pos); */
+ const HB_UChar16 *ch = str + pos - 1;
+ pos--;
+ while(pos > -1) {
+ if(HB_GetUnicodeCharCategory(*ch) != HB_Mark_NonSpacing)
+ return *ch;
+ pos--;
+ ch--;
+ }
+ return ReplacementCharacter;
+}
+
+static HB_UChar16 nextChar(const HB_UChar16 *str, hb_uint32 len, hb_uint32 pos)
+{
+ const HB_UChar16 *ch = str + pos + 1;
+ pos++;
+ while(pos < len) {
+ /*qDebug("rightChar: %d isLetter=%d, joining=%d", pos, ch.isLetter(), ch.joining()); */
+ if(HB_GetUnicodeCharCategory(*ch) != HB_Mark_NonSpacing)
+ return *ch;
+ /* assume it's a transparent char, this might not be 100% correct */
+ pos++;
+ ch++;
+ }
+ return ReplacementCharacter;
+}
+
+static void shapedString(const HB_UChar16 *uc, hb_uint32 stringLength, hb_uint32 from, hb_uint32 len, HB_UChar16 *shapeBuffer, int *shapedLength,
+ HB_Bool reverse, HB_GlyphAttributes *attributes, unsigned short *logClusters)
+{
+ HB_ArabicProperties *properties;
+ hb_int32 f = from;
+ hb_uint32 l = len;
+ const HB_UChar16 *ch;
+ HB_UChar16 *data;
+ int clusterStart;
+ hb_uint32 i;
+ HB_STACKARRAY(HB_ArabicProperties, props, len + 2);
+ properties = props;
+
+ assert(stringLength >= from + len);
+
+ if(len == 0) {
+ *shapedLength = 0;
+ return;
+ }
+
+ if (from > 0) {
+ --f;
+ ++l;
+ ++properties;
+ }
+ if (f + l < stringLength)
+ ++l;
+ getArabicProperties(uc+f, l, props);
+
+ ch = uc + from;
+ data = shapeBuffer;
+ clusterStart = 0;
+
+ for (i = 0; i < len; i++) {
+ hb_uint8 r = *ch >> 8;
+ int gpos = data - shapeBuffer;
+
+ if (r != 0x06) {
+ if (r == 0x20) {
+ if (*ch == 0x200c || *ch == 0x200d)
+ /* remove ZWJ and ZWNJ */
+ goto skip;
+ }
+ if (reverse)
+ *data = HB_GetMirroredChar(*ch);
+ else
+ *data = *ch;
+ } else {
+ hb_uint8 c = *ch & 0xff;
+ int pos = i + from;
+ int shape = properties[i].shape;
+/* qDebug("mapping U+%x to shape %d glyph=0x%x", ch->unicode(), shape, getShape(c, shape)); */
+ /* take care of lam-alef ligatures (lam right of alef) */
+ hb_uint16 map;
+ switch (c) {
+ case 0x44: { /* lam */
+ const HB_UChar16 pch = nextChar(uc, stringLength, pos);
+ if ((pch >> 8) == 0x06) {
+ switch (pch & 0xff) {
+ case 0x22:
+ case 0x23:
+ case 0x25:
+ case 0x27:
+/* qDebug(" lam of lam-alef ligature"); */
+ map = arabicUnicodeLamAlefMapping[(pch & 0xff) - 0x22][shape];
+ goto next;
+ default:
+ break;
+ }
+ }
+ break;
+ }
+ case 0x22: /* alef with madda */
+ case 0x23: /* alef with hamza above */
+ case 0x25: /* alef with hamza below */
+ case 0x27: /* alef */
+ if (prevChar(uc, pos) == 0x0644) {
+ /* have a lam alef ligature */
+ /*qDebug(" alef of lam-alef ligature"); */
+ goto skip;
+ }
+ default:
+ break;
+ }
+ map = getShape(c, shape);
+ next:
+ *data = map;
+ }
+ /* ##### Fixme */
+ /*glyphs[gpos].attributes.zeroWidth = zeroWidth; */
+ if (HB_GetUnicodeCharCategory(*ch) == HB_Mark_NonSpacing) {
+ attributes[gpos].mark = TRUE;
+/* qDebug("glyph %d (char %d) is mark!", gpos, i); */
+ } else {
+ attributes[gpos].mark = FALSE;
+ clusterStart = data - shapeBuffer;
+ }
+ attributes[gpos].clusterStart = !attributes[gpos].mark;
+ attributes[gpos].combiningClass = HB_GetUnicodeCharCombiningClass(*ch);
+ attributes[gpos].justification = properties[i].justification;
+/* qDebug("data[%d] = %x (from %x)", gpos, (uint)data->unicode(), ch->unicode());*/
+ data++;
+ skip:
+ ch++;
+ logClusters[i] = clusterStart;
+ }
+ *shapedLength = data - shapeBuffer;
+
+ HB_FREE_STACKARRAY(props);
+}
+
+#ifndef NO_OPENTYPE
+
+static const HB_OpenTypeFeature arabic_features[] = {
+ { HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty },
+ { HB_MAKE_TAG('i', 's', 'o', 'l'), IsolProperty },
+ { HB_MAKE_TAG('f', 'i', 'n', 'a'), FinaProperty },
+ { HB_MAKE_TAG('m', 'e', 'd', 'i'), MediProperty },
+ { HB_MAKE_TAG('i', 'n', 'i', 't'), InitProperty },
+ { HB_MAKE_TAG('r', 'l', 'i', 'g'), RligProperty },
+ { HB_MAKE_TAG('c', 'a', 'l', 't'), CaltProperty },
+ { HB_MAKE_TAG('l', 'i', 'g', 'a'), LigaProperty },
+ { HB_MAKE_TAG('d', 'l', 'i', 'g'), DligProperty },
+ { HB_MAKE_TAG('c', 's', 'w', 'h'), CswhProperty },
+ /* mset is used in old Win95 fonts that don't have a 'mark' positioning table. */
+ { HB_MAKE_TAG('m', 's', 'e', 't'), MsetProperty },
+ {0, 0}
+};
+
+static const HB_OpenTypeFeature syriac_features[] = {
+ { HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty },
+ { HB_MAKE_TAG('i', 's', 'o', 'l'), IsolProperty },
+ { HB_MAKE_TAG('f', 'i', 'n', 'a'), FinaProperty },
+ { HB_MAKE_TAG('f', 'i', 'n', '2'), FinaProperty },
+ { HB_MAKE_TAG('f', 'i', 'n', '3'), FinaProperty },
+ { HB_MAKE_TAG('m', 'e', 'd', 'i'), MediProperty },
+ { HB_MAKE_TAG('m', 'e', 'd', '2'), MediProperty },
+ { HB_MAKE_TAG('i', 'n', 'i', 't'), InitProperty },
+ { HB_MAKE_TAG('r', 'l', 'i', 'g'), RligProperty },
+ { HB_MAKE_TAG('c', 'a', 'l', 't'), CaltProperty },
+ { HB_MAKE_TAG('l', 'i', 'g', 'a'), LigaProperty },
+ { HB_MAKE_TAG('d', 'l', 'i', 'g'), DligProperty },
+ {0, 0}
+};
+
+static HB_Bool arabicSyriacOpenTypeShape(HB_ShaperItem *item, HB_Bool *ot_ok)
+{
+ const HB_UChar16 *uc;
+ const int nglyphs = item->num_glyphs;
+ hb_int32 f;
+ hb_uint32 l;
+ HB_ArabicProperties *properties;
+ HB_DECLARE_STACKARRAY(HB_ArabicProperties, props)
+ HB_DECLARE_STACKARRAY(hb_uint32, apply)
+ HB_Bool shaped;
+ int i = 0;
+
+ *ot_ok = TRUE;
+
+ if (!HB_ConvertStringToGlyphIndices(item))
+ return FALSE;
+ HB_HeuristicSetGlyphAttributes(item);
+
+ HB_INIT_STACKARRAY(HB_ArabicProperties, props, item->item.length + 2);
+ HB_INIT_STACKARRAY(hb_uint32, apply, item->num_glyphs);
+
+ uc = item->string + item->item.pos;
+
+ properties = props;
+ f = 0;
+ l = item->item.length;
+ if (item->item.pos > 0) {
+ --f;
+ ++l;
+ ++properties;
+ }
+ if (f + l + item->item.pos < item->stringLength) {
+ ++l;
+ }
+ if (item->item.script == HB_Script_Nko)
+ getNkoProperties(uc+f, l, props);
+ else
+ getArabicProperties(uc+f, l, props);
+
+ for (i = 0; i < (int)item->num_glyphs; i++) {
+ apply[i] = 0;
+
+ if (properties[i].shape == XIsolated)
+ apply[i] |= MediProperty|FinaProperty|InitProperty;
+ else if (properties[i].shape == XMedial)
+ apply[i] |= IsolProperty|FinaProperty|InitProperty;
+ else if (properties[i].shape == XFinal)
+ apply[i] |= IsolProperty|MediProperty|InitProperty;
+ else if (properties[i].shape == XInitial)
+ apply[i] |= IsolProperty|MediProperty|FinaProperty;
+
+ item->attributes[i].justification = properties[i].justification;
+ }
+
+ HB_FREE_STACKARRAY(props);
+
+ shaped = HB_OpenTypeShape(item, apply);
+
+ HB_FREE_STACKARRAY(apply);
+
+ if (!shaped) {
+ *ot_ok = FALSE;
+ return FALSE;
+ }
+ return HB_OpenTypePosition(item, nglyphs, /*doLogClusters*/TRUE);
+}
+
+#endif
+
+/* #### stil missing: identify invalid character combinations */
+HB_Bool HB_ArabicShape(HB_ShaperItem *item)
+{
+ int slen;
+ HB_Bool haveGlyphs;
+ HB_STACKARRAY(HB_UChar16, shapedChars, item->item.length);
+
+ assert(item->item.script == HB_Script_Arabic || item->item.script == HB_Script_Syriac
+ || item->item.script == HB_Script_Nko);
+
+#ifndef NO_OPENTYPE
+
+ if (HB_SelectScript(item, item->item.script == HB_Script_Arabic ? arabic_features : syriac_features)) {
+ HB_Bool ot_ok;
+ if (arabicSyriacOpenTypeShape(item, &ot_ok)) {
+ HB_FREE_STACKARRAY(shapedChars);
+ return TRUE;
+ }
+ if (ot_ok) {
+ HB_FREE_STACKARRAY(shapedChars);
+ return FALSE;
+ /* fall through to the non OT code*/
+ }
+ }
+#endif
+
+ if (item->item.script != HB_Script_Arabic) {
+ HB_FREE_STACKARRAY(shapedChars);
+ return HB_BasicShape(item);
+ }
+
+ shapedString(item->string, item->stringLength, item->item.pos, item->item.length, shapedChars, &slen,
+ item->item.bidiLevel % 2,
+ item->attributes, item->log_clusters);
+
+ haveGlyphs = item->font->klass
+ ->convertStringToGlyphIndices(item->font,
+ shapedChars, slen,
+ item->glyphs, &item->num_glyphs,
+ item->item.bidiLevel % 2);
+
+ HB_FREE_STACKARRAY(shapedChars);
+
+ if (!haveGlyphs)
+ return FALSE;
+
+ HB_HeuristicPosition(item);
+ return TRUE;
+}
+
+
diff --git a/src/hb-old/harfbuzz-buffer-private.h b/src/hb-old/harfbuzz-buffer-private.h
new file mode 100644
index 0000000..5065f2e
--- /dev/null
+++ b/src/hb-old/harfbuzz-buffer-private.h
@@ -0,0 +1,107 @@
+/*
+ * Copyright (C) 1998-2004 David Turner and Werner Lemberg
+ * Copyright (C) 2004,2007 Red Hat, Inc.
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Owen Taylor, Behdad Esfahbod
+ */
+
+#ifndef HARFBUZZ_BUFFER_PRIVATE_H
+#define HARFBUZZ_BUFFER_PRIVATE_H
+
+#include "harfbuzz-impl.h"
+#include "harfbuzz-buffer.h"
+
+HB_BEGIN_HEADER
+
+#define HB_GLYPH_PROPERTIES_UNKNOWN 0xFFFF
+
+HB_INTERNAL void
+_hb_buffer_swap( HB_Buffer buffer );
+
+HB_INTERNAL void
+_hb_buffer_clear_output( HB_Buffer buffer );
+
+HB_INTERNAL HB_Error
+_hb_buffer_clear_positions( HB_Buffer buffer );
+
+HB_INTERNAL HB_Error
+_hb_buffer_add_output_glyphs( HB_Buffer buffer,
+ HB_UShort num_in,
+ HB_UShort num_out,
+ HB_UShort *glyph_data,
+ HB_UShort component,
+ HB_UShort ligID );
+
+HB_INTERNAL HB_Error
+_hb_buffer_add_output_glyph ( HB_Buffer buffer,
+ HB_UInt glyph_index,
+ HB_UShort component,
+ HB_UShort ligID );
+
+HB_INTERNAL HB_Error
+_hb_buffer_copy_output_glyph ( HB_Buffer buffer );
+
+HB_INTERNAL HB_Error
+_hb_buffer_replace_output_glyph ( HB_Buffer buffer,
+ HB_UInt glyph_index,
+ HB_Bool inplace );
+
+HB_INTERNAL HB_UShort
+_hb_buffer_allocate_ligid( HB_Buffer buffer );
+
+
+/* convenience macros */
+
+#define IN_GLYPH( pos ) (buffer->in_string[(pos)].gindex)
+#define IN_ITEM( pos ) (&buffer->in_string[(pos)])
+#define IN_CURGLYPH() (buffer->in_string[buffer->in_pos].gindex)
+#define IN_CURITEM() (&buffer->in_string[buffer->in_pos])
+#define IN_PROPERTIES( pos ) (buffer->in_string[(pos)].properties)
+#define IN_LIGID( pos ) (buffer->in_string[(pos)].ligID)
+#define IN_COMPONENT( pos ) (buffer->in_string[(pos)].component)
+#define POSITION( pos ) (&buffer->positions[(pos)])
+#define OUT_GLYPH( pos ) (buffer->out_string[(pos)].gindex)
+#define OUT_ITEM( pos ) (&buffer->out_string[(pos)])
+
+#define CHECK_Property( gdef, index, flags, property ) \
+ ( ( error = _HB_GDEF_Check_Property( (gdef), (index), (flags), \
+ (property) ) ) != HB_Err_Ok )
+
+#define ADD_String( buffer, num_in, num_out, glyph_data, component, ligID ) \
+ ( ( error = _hb_buffer_add_output_glyphs( (buffer), \
+ (num_in), (num_out), \
+ (glyph_data), (component), (ligID) \
+ ) ) != HB_Err_Ok )
+#define ADD_Glyph( buffer, glyph_index, component, ligID ) \
+ ( ( error = _hb_buffer_add_output_glyph( (buffer), \
+ (glyph_index), (component), (ligID) \
+ ) ) != HB_Err_Ok )
+#define REPLACE_Glyph( buffer, glyph_index, nesting_level ) \
+ ( ( error = _hb_buffer_replace_output_glyph( (buffer), (glyph_index), \
+ (nesting_level) == 1 ) ) != HB_Err_Ok )
+#define COPY_Glyph( buffer ) \
+ ( (error = _hb_buffer_copy_output_glyph ( buffer ) ) != HB_Err_Ok )
+
+HB_END_HEADER
+
+#endif /* HARFBUZZ_BUFFER_PRIVATE_H */
diff --git a/src/hb-old/harfbuzz-buffer.c b/src/hb-old/harfbuzz-buffer.c
new file mode 100644
index 0000000..a85ee8d
--- /dev/null
+++ b/src/hb-old/harfbuzz-buffer.c
@@ -0,0 +1,383 @@
+/*
+ * Copyright (C) 1998-2004 David Turner and Werner Lemberg
+ * Copyright (C) 2004,2007 Red Hat, Inc.
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Owen Taylor, Behdad Esfahbod
+ */
+
+#include "harfbuzz-impl.h"
+#include "harfbuzz-buffer-private.h"
+#include "harfbuzz-gsub-private.h"
+#include "harfbuzz-gpos-private.h"
+
+/* Here is how the buffer works internally:
+ *
+ * There are two string pointers: in_string and out_string. They
+ * always have same allocated size, but different length and positions.
+ *
+ * As an optimization, both in_string and out_string may point to the
+ * same piece of memory, which is owned by in_string. This remains the
+ * case as long as:
+ *
+ * - copy_glyph() is called
+ * - replace_glyph() is called with inplace=TRUE
+ * - add_output_glyph() and add_output_glyphs() are not called
+ *
+ * In that case swap(), and copy_glyph(), and replace_glyph() are all
+ * mostly no-op.
+ *
+ * As soon an add_output_glyph[s]() or replace_glyph() with inplace=FALSE is
+ * called, out_string is moved over to an alternate buffer (alt_string), and
+ * its current contents (out_length entries) are copied to the alt buffer.
+ * This should all remain transparent to the user. swap() then switches
+ * in_string and alt_string. alt_string is not allocated until its needed,
+ * but after that it's grown with in_string unconditionally.
+ *
+ * The buffer->separate_out boolean keeps status of whether out_string points
+ * to in_string (FALSE) or alt_string (TRUE).
+ */
+
+/* Internal API */
+
+static HB_Error
+HB_Buffer_ensure( HB_Buffer buffer,
+ HB_UInt size )
+{
+ HB_UInt new_allocated = buffer->allocated;
+
+ if (size > new_allocated)
+ {
+ HB_Error error;
+
+ while (size > new_allocated)
+ new_allocated += (new_allocated >> 1) + 8;
+
+ if ( buffer->positions )
+ {
+ if ( REALLOC_ARRAY( buffer->positions, new_allocated, HB_PositionRec ) )
+ return error;
+ }
+
+ if ( REALLOC_ARRAY( buffer->in_string, new_allocated, HB_GlyphItemRec ) )
+ return error;
+
+ if ( buffer->separate_out )
+ {
+ if ( REALLOC_ARRAY( buffer->alt_string, new_allocated, HB_GlyphItemRec ) )
+ return error;
+
+ buffer->out_string = buffer->alt_string;
+ }
+ else
+ {
+ buffer->out_string = buffer->in_string;
+
+ if ( buffer->alt_string )
+ {
+ if ( REALLOC_ARRAY( buffer->alt_string, new_allocated, HB_GlyphItemRec ) )
+ return error;
+ }
+ }
+
+ buffer->allocated = new_allocated;
+ }
+
+ return HB_Err_Ok;
+}
+
+static HB_Error
+HB_Buffer_duplicate_out_buffer( HB_Buffer buffer )
+{
+ if ( !buffer->alt_string )
+ {
+ HB_Error error;
+
+ if ( ALLOC_ARRAY( buffer->alt_string, buffer->allocated, HB_GlyphItemRec ) )
+ return error;
+ }
+
+ buffer->out_string = buffer->alt_string;
+ memcpy( buffer->out_string, buffer->in_string, buffer->out_length * sizeof (buffer->out_string[0]) );
+ buffer->separate_out = TRUE;
+
+ return HB_Err_Ok;
+}
+
+/* Public API */
+
+HB_Error
+HB_Buffer_new( HB_Buffer *pbuffer )
+{
+ HB_Buffer buffer;
+ HB_Error error;
+
+ if ( ALLOC( buffer, sizeof( HB_BufferRec ) ) )
+ return error;
+
+ buffer->allocated = 0;
+ buffer->in_string = NULL;
+ buffer->alt_string = NULL;
+ buffer->positions = NULL;
+
+ HB_Buffer_clear( buffer );
+
+ *pbuffer = buffer;
+
+ return HB_Err_Ok;
+}
+
+void
+HB_Buffer_free( HB_Buffer buffer )
+{
+ FREE( buffer->in_string );
+ FREE( buffer->alt_string );
+ buffer->out_string = NULL;
+ FREE( buffer->positions );
+ FREE( buffer );
+}
+
+void
+HB_Buffer_clear( HB_Buffer buffer )
+{
+ buffer->in_length = 0;
+ buffer->out_length = 0;
+ buffer->in_pos = 0;
+ buffer->out_pos = 0;
+ buffer->out_string = buffer->in_string;
+ buffer->separate_out = FALSE;
+ buffer->max_ligID = 0;
+}
+
+HB_Error
+HB_Buffer_add_glyph( HB_Buffer buffer,
+ HB_UInt glyph_index,
+ HB_UInt properties,
+ HB_UInt cluster )
+{
+ HB_Error error;
+ HB_GlyphItem glyph;
+
+ error = HB_Buffer_ensure( buffer, buffer->in_length + 1 );
+ if ( error )
+ return error;
+
+ glyph = &buffer->in_string[buffer->in_length];
+ glyph->gindex = glyph_index;
+ glyph->properties = properties;
+ glyph->cluster = cluster;
+ glyph->component = 0;
+ glyph->ligID = 0;
+ glyph->gproperties = HB_GLYPH_PROPERTIES_UNKNOWN;
+
+ buffer->in_length++;
+
+ return HB_Err_Ok;
+}
+
+/* HarfBuzz-Internal API */
+
+HB_INTERNAL void
+_hb_buffer_clear_output( HB_Buffer buffer )
+{
+ buffer->out_length = 0;
+ buffer->out_pos = 0;
+ buffer->out_string = buffer->in_string;
+ buffer->separate_out = FALSE;
+}
+
+HB_INTERNAL HB_Error
+_hb_buffer_clear_positions( HB_Buffer buffer )
+{
+ if ( !buffer->positions )
+ {
+ HB_Error error;
+
+ if ( ALLOC_ARRAY( buffer->positions, buffer->allocated, HB_PositionRec ) )
+ return error;
+ }
+
+ memset (buffer->positions, 0, sizeof (buffer->positions[0]) * buffer->in_length);
+
+ return HB_Err_Ok;
+}
+
+HB_INTERNAL void
+_hb_buffer_swap( HB_Buffer buffer )
+{
+ HB_GlyphItem tmp_string;
+ int tmp_length;
+ int tmp_pos;
+
+ if ( buffer->separate_out )
+ {
+ tmp_string = buffer->in_string;
+ buffer->in_string = buffer->out_string;
+ buffer->out_string = tmp_string;
+ buffer->alt_string = buffer->out_string;
+ }
+
+ tmp_length = buffer->in_length;
+ buffer->in_length = buffer->out_length;
+ buffer->out_length = tmp_length;
+
+ tmp_pos = buffer->in_pos;
+ buffer->in_pos = buffer->out_pos;
+ buffer->out_pos = tmp_pos;
+}
+
+/* The following function copies `num_out' elements from `glyph_data'
+ to `buffer->out_string', advancing the in array pointer in the structure
+ by `num_in' elements, and the out array pointer by `num_out' elements.
+ Finally, it sets the `length' field of `out' equal to
+ `pos' of the `out' structure.
+
+ If `component' is 0xFFFF, the component value from buffer->in_pos
+ will copied `num_out' times, otherwise `component' itself will
+ be used to fill the `component' fields.
+
+ If `ligID' is 0xFFFF, the ligID value from buffer->in_pos
+ will copied `num_out' times, otherwise `ligID' itself will
+ be used to fill the `ligID' fields.
+
+ The properties for all replacement glyphs are taken
+ from the glyph at position `buffer->in_pos'.
+
+ The cluster value for the glyph at position buffer->in_pos is used
+ for all replacement glyphs */
+HB_INTERNAL HB_Error
+_hb_buffer_add_output_glyphs( HB_Buffer buffer,
+ HB_UShort num_in,
+ HB_UShort num_out,
+ HB_UShort *glyph_data,
+ HB_UShort component,
+ HB_UShort ligID )
+{
+ HB_Error error;
+ HB_UShort i;
+ HB_UInt properties;
+ HB_UInt cluster;
+
+ error = HB_Buffer_ensure( buffer, buffer->out_pos + num_out );
+ if ( error )
+ return error;
+
+ if ( !buffer->separate_out )
+ {
+ error = HB_Buffer_duplicate_out_buffer( buffer );
+ if ( error )
+ return error;
+ }
+
+ properties = buffer->in_string[buffer->in_pos].properties;
+ cluster = buffer->in_string[buffer->in_pos].cluster;
+ if ( component == 0xFFFF )
+ component = buffer->in_string[buffer->in_pos].component;
+ if ( ligID == 0xFFFF )
+ ligID = buffer->in_string[buffer->in_pos].ligID;
+
+ for ( i = 0; i < num_out; i++ )
+ {
+ HB_GlyphItem item = &buffer->out_string[buffer->out_pos + i];
+
+ item->gindex = glyph_data[i];
+ item->properties = properties;
+ item->cluster = cluster;
+ item->component = component;
+ item->ligID = ligID;
+ item->gproperties = HB_GLYPH_PROPERTIES_UNKNOWN;
+ }
+
+ buffer->in_pos += num_in;
+ buffer->out_pos += num_out;
+
+ buffer->out_length = buffer->out_pos;
+
+ return HB_Err_Ok;
+}
+
+HB_INTERNAL HB_Error
+_hb_buffer_add_output_glyph( HB_Buffer buffer,
+ HB_UInt glyph_index,
+ HB_UShort component,
+ HB_UShort ligID )
+{
+ HB_UShort glyph_data = glyph_index;
+
+ return _hb_buffer_add_output_glyphs ( buffer, 1, 1,
+ &glyph_data, component, ligID );
+}
+
+HB_INTERNAL HB_Error
+_hb_buffer_copy_output_glyph ( HB_Buffer buffer )
+{
+ HB_Error error;
+
+ error = HB_Buffer_ensure( buffer, buffer->out_pos + 1 );
+ if ( error )
+ return error;
+
+ if ( buffer->separate_out )
+ {
+ buffer->out_string[buffer->out_pos] = buffer->in_string[buffer->in_pos];
+ }
+
+ buffer->in_pos++;
+ buffer->out_pos++;
+ buffer->out_length = buffer->out_pos;
+
+ return HB_Err_Ok;
+}
+
+HB_INTERNAL HB_Error
+_hb_buffer_replace_output_glyph( HB_Buffer buffer,
+ HB_UInt glyph_index,
+ HB_Bool inplace )
+{
+
+ HB_Error error;
+
+ if ( inplace )
+ {
+ error = _hb_buffer_copy_output_glyph ( buffer );
+ if ( error )
+ return error;
+
+ buffer->out_string[buffer->out_pos-1].gindex = glyph_index;
+ }
+ else
+ {
+ return _hb_buffer_add_output_glyph( buffer, glyph_index, 0xFFFF, 0xFFFF );
+ }
+
+ return HB_Err_Ok;
+}
+
+HB_INTERNAL HB_UShort
+_hb_buffer_allocate_ligid( HB_Buffer buffer )
+{
+ buffer->max_ligID++;
+ if (HB_UNLIKELY (buffer->max_ligID == 0))
+ buffer->max_ligID++;
+
+ return buffer->max_ligID;
+}
diff --git a/src/hb-old/harfbuzz-buffer.h b/src/hb-old/harfbuzz-buffer.h
new file mode 100644
index 0000000..ea5d404
--- /dev/null
+++ b/src/hb-old/harfbuzz-buffer.h
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 1998-2004 David Turner and Werner Lemberg
+ * Copyright (C) 2004,2007 Red Hat, Inc.
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Owen Taylor, Behdad Esfahbod
+ */
+
+#ifndef HARFBUZZ_BUFFER_H
+#define HARFBUZZ_BUFFER_H
+
+#include "harfbuzz-global.h"
+
+HB_BEGIN_HEADER
+
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(push, 1)
+#endif
+
+typedef struct HB_GlyphItemRec_ {
+ HB_UInt gindex;
+ HB_UInt properties;
+ HB_UInt cluster;
+ HB_UShort component;
+ HB_UShort ligID;
+ HB_UShort gproperties;
+} HB_GlyphItemRec, *HB_GlyphItem;
+
+typedef struct HB_PositionRec_ {
+ HB_Fixed x_pos;
+ HB_Fixed y_pos;
+ HB_Fixed x_advance;
+ HB_Fixed y_advance;
+ HB_UShort back; /* number of glyphs to go back
+ for drawing current glyph */
+ HB_Short cursive_chain; /* character to which this connects,
+ may be positive or negative; used
+ only internally */
+ HB_Bool new_advance; /* if set, the advance width values are
+ absolute, i.e., they won't be
+ added to the original glyph's value
+ but rather replace them. */
+} HB_PositionRec, *HB_Position;
+
+
+typedef struct HB_BufferRec_{
+ HB_UInt allocated;
+
+ HB_UInt in_length;
+ HB_UInt out_length;
+ HB_UInt in_pos;
+ HB_UInt out_pos;
+
+ HB_GlyphItem in_string;
+ HB_GlyphItem out_string;
+ HB_GlyphItem alt_string;
+ HB_Position positions;
+ HB_UShort max_ligID;
+ HB_Bool separate_out;
+} HB_BufferRec, *HB_Buffer;
+
+HB_Error
+HB_Buffer_new( HB_Buffer *buffer );
+
+void
+HB_Buffer_free( HB_Buffer buffer );
+
+void
+HB_Buffer_clear( HB_Buffer buffer );
+
+HB_Error
+HB_Buffer_add_glyph( HB_Buffer buffer,
+ HB_UInt glyph_index,
+ HB_UInt properties,
+ HB_UInt cluster );
+
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(pop)
+#endif
+
+HB_END_HEADER
+
+#endif /* HARFBUZZ_BUFFER_H */
diff --git a/src/hb-old/harfbuzz-external.h b/src/hb-old/harfbuzz-external.h
new file mode 100644
index 0000000..13ec15f
--- /dev/null
+++ b/src/hb-old/harfbuzz-external.h
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#ifndef HARFBUZZ_EXTERNAL_H
+#define HARFBUZZ_EXTERNAL_H
+
+#define HB_H_IN
+#include <hb-unicode.h>
+#include "harfbuzz-global.h"
+
+HB_BEGIN_HEADER
+
+/* This header contains some methods that are not part of
+ Harfbuzz itself, but referenced by it.
+ They need to be provided by the application/library
+*/
+
+
+typedef enum
+{
+ HB_Mark_NonSpacing = HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK, /* Mn */
+ HB_Mark_SpacingCombining = HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK, /* Mc */
+ HB_Mark_Enclosing = HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK, /* Me */
+
+ HB_Number_DecimalDigit = HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER, /* Nd */
+ HB_Number_Letter = HB_UNICODE_GENERAL_CATEGORY_LETTER_NUMBER, /* Nl */
+ HB_Number_Other = HB_UNICODE_GENERAL_CATEGORY_OTHER_NUMBER, /* No */
+
+ HB_Separator_Space = HB_UNICODE_GENERAL_CATEGORY_SPACE_SEPARATOR, /* Zs */
+ HB_Separator_Line = HB_UNICODE_GENERAL_CATEGORY_LINE_SEPARATOR, /* Zl */
+ HB_Separator_Paragraph = HB_UNICODE_GENERAL_CATEGORY_PARAGRAPH_SEPARATOR, /* Zp */
+
+ HB_Other_Control = HB_UNICODE_GENERAL_CATEGORY_CONTROL, /* Cc */
+ HB_Other_Format = HB_UNICODE_GENERAL_CATEGORY_FORMAT, /* Cf */
+ HB_Other_Surrogate = HB_UNICODE_GENERAL_CATEGORY_SURROGATE, /* Cs */
+ HB_Other_PrivateUse = HB_UNICODE_GENERAL_CATEGORY_PRIVATE_USE, /* Co */
+ HB_Other_NotAssigned = HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED, /* Cn */
+
+ HB_Letter_Uppercase = HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER, /* Lu */
+ HB_Letter_Lowercase = HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER, /* Ll */
+ HB_Letter_Titlecase = HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER, /* Lt */
+ HB_Letter_Modifier = HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER, /* Lm */
+ HB_Letter_Other = HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER, /* Lo */
+
+ HB_Punctuation_Connector = HB_UNICODE_GENERAL_CATEGORY_CONNECT_PUNCTUATION, /* Pc */
+ HB_Punctuation_Dash = HB_UNICODE_GENERAL_CATEGORY_DASH_PUNCTUATION, /* Pd */
+ HB_Punctuation_Open = HB_UNICODE_GENERAL_CATEGORY_OPEN_PUNCTUATION, /* Ps */
+ HB_Punctuation_Close = HB_UNICODE_GENERAL_CATEGORY_CLOSE_PUNCTUATION, /* Pe */
+ HB_Punctuation_InitialQuote = HB_UNICODE_GENERAL_CATEGORY_INITIAL_PUNCTUATION, /* Pi */
+ HB_Punctuation_FinalQuote = HB_UNICODE_GENERAL_CATEGORY_FINAL_PUNCTUATION, /* Pf */
+ HB_Punctuation_Other = HB_UNICODE_GENERAL_CATEGORY_OTHER_PUNCTUATION, /* Po */
+
+ HB_Symbol_Math = HB_UNICODE_GENERAL_CATEGORY_MATH_SYMBOL, /* Sm */
+ HB_Symbol_Currency = HB_UNICODE_GENERAL_CATEGORY_CURRENCY_SYMBOL, /* Sc */
+ HB_Symbol_Modifier = HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL, /* Sk */
+ HB_Symbol_Other = HB_UNICODE_GENERAL_CATEGORY_OTHER_SYMBOL /* So */
+} HB_CharCategory;
+
+
+static inline HB_CharCategory HB_GetUnicodeCharCategory(HB_UChar32 ch)
+{
+ return (HB_CharCategory) hb_unicode_general_category (hb_unicode_funcs_get_default (), ch);
+}
+
+static inline int HB_GetUnicodeCharCombiningClass(HB_UChar32 ch)
+{
+ return hb_unicode_combining_class (hb_unicode_funcs_get_default (), ch);
+}
+
+static inline HB_UChar16 HB_GetMirroredChar(HB_UChar16 ch)
+{
+ return hb_unicode_mirroring (hb_unicode_funcs_get_default (), ch);
+}
+
+static inline void HB_GetUnicodeCharProperties(HB_UChar32 ch, HB_CharCategory *category, int *combiningClass)
+{
+ if (category)
+ *category = HB_GetUnicodeCharCategory (ch);
+ if (combiningClass)
+ *combiningClass = HB_GetUnicodeCharCombiningClass (ch);
+}
+
+HB_END_HEADER
+
+#endif
diff --git a/src/hb-old/harfbuzz-gdef-private.h b/src/hb-old/harfbuzz-gdef-private.h
new file mode 100644
index 0000000..2a6d958
--- /dev/null
+++ b/src/hb-old/harfbuzz-gdef-private.h
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 1998-2004 David Turner and Werner Lemberg
+ * Copyright (C) 2006 Behdad Esfahbod
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#ifndef HARFBUZZ_GDEF_PRIVATE_H
+#define HARFBUZZ_GDEF_PRIVATE_H
+
+#include "harfbuzz-impl.h"
+#include "harfbuzz-stream-private.h"
+#include "harfbuzz-buffer-private.h"
+#include "harfbuzz-gdef.h"
+
+HB_BEGIN_HEADER
+
+
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(push, 1)
+#endif
+
+/* Attachment related structures */
+
+struct HB_AttachPoint_
+{
+ HB_UShort* PointIndex; /* array of contour points */
+ HB_UShort PointCount; /* size of the PointIndex array */
+};
+
+/* Ligature Caret related structures */
+
+struct HB_CaretValueFormat1_
+{
+ HB_Short Coordinate; /* x or y value (in design units) */
+};
+
+typedef struct HB_CaretValueFormat1_ HB_CaretValueFormat1;
+
+
+struct HB_CaretValueFormat2_
+{
+ HB_UShort CaretValuePoint; /* contour point index on glyph */
+};
+
+typedef struct HB_CaretValueFormat2_ HB_CaretValueFormat2;
+
+
+struct HB_CaretValueFormat3_
+{
+ HB_Device* Device; /* Device table for x or y value */
+ HB_Short Coordinate; /* x or y value (in design units) */
+};
+
+typedef struct HB_CaretValueFormat3_ HB_CaretValueFormat3;
+
+
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+struct HB_CaretValueFormat4_
+{
+ HB_UShort IdCaretValue; /* metric ID */
+};
+
+typedef struct HB_CaretValueFormat4_ HB_CaretValueFormat4;
+#endif
+
+
+struct HB_CaretValue_
+{
+ union
+ {
+ HB_CaretValueFormat1 cvf1;
+ HB_CaretValueFormat2 cvf2;
+ HB_CaretValueFormat3 cvf3;
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+ HB_CaretValueFormat4 cvf4;
+#endif
+ } cvf;
+
+ HB_Byte CaretValueFormat; /* 1, 2, 3, or 4 */
+};
+
+typedef struct HB_CaretValue_ HB_CaretValue;
+
+
+struct HB_LigGlyph_
+{
+ HB_CaretValue* CaretValue; /* array of caret values */
+ HB_UShort CaretCount; /* number of caret values */
+ HB_Bool loaded;
+};
+
+
+HB_INTERNAL HB_Error
+_HB_GDEF_Add_Glyph_Property( HB_GDEFHeader* gdef,
+ HB_UShort glyphID,
+ HB_UShort property );
+
+HB_INTERNAL HB_Error
+_HB_GDEF_Check_Property( HB_GDEFHeader* gdef,
+ HB_GlyphItem item,
+ HB_UShort flags,
+ HB_UShort* property );
+
+HB_INTERNAL HB_Error
+_HB_GDEF_LoadMarkAttachClassDef_From_LookupFlags( HB_GDEFHeader* gdef,
+ HB_Stream input,
+ HB_Lookup* lo,
+ HB_UShort num_lookups );
+
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(pop)
+#endif
+
+HB_END_HEADER
+
+#endif /* HARFBUZZ_GDEF_PRIVATE_H */
diff --git a/src/hb-old/harfbuzz-gdef.c b/src/hb-old/harfbuzz-gdef.c
new file mode 100644
index 0000000..966b167
--- /dev/null
+++ b/src/hb-old/harfbuzz-gdef.c
@@ -0,0 +1,1163 @@
+/*
+ * Copyright (C) 1998-2004 David Turner and Werner Lemberg
+ * Copyright (C) 2006 Behdad Esfahbod
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#include "harfbuzz-impl.h"
+#include "harfbuzz-gdef-private.h"
+#include "harfbuzz-open-private.h"
+
+static HB_Error Load_AttachList( HB_AttachList* al,
+ HB_Stream stream );
+static HB_Error Load_LigCaretList( HB_LigCaretList* lcl,
+ HB_Stream stream );
+
+static void Free_AttachList( HB_AttachList* al);
+static void Free_LigCaretList( HB_LigCaretList* lcl);
+
+static void Free_NewGlyphClasses( HB_GDEFHeader* gdef);
+
+
+
+/* GDEF glyph classes */
+
+#define UNCLASSIFIED_GLYPH 0
+#define SIMPLE_GLYPH 1
+#define LIGATURE_GLYPH 2
+#define MARK_GLYPH 3
+#define COMPONENT_GLYPH 4
+
+
+
+
+
+
+HB_Error HB_New_GDEF_Table( HB_GDEFHeader** retptr )
+{
+ HB_Error error;
+
+ HB_GDEFHeader* gdef;
+
+ if ( !retptr )
+ return ERR(HB_Err_Invalid_Argument);
+
+ if ( ALLOC( gdef, sizeof( *gdef ) ) )
+ return error;
+
+ gdef->GlyphClassDef.loaded = FALSE;
+ gdef->AttachList.loaded = FALSE;
+ gdef->LigCaretList.loaded = FALSE;
+ gdef->MarkAttachClassDef_offset = 0;
+ gdef->MarkAttachClassDef.loaded = FALSE;
+
+ gdef->LastGlyph = 0;
+ gdef->NewGlyphClasses = NULL;
+
+ *retptr = gdef;
+
+ return HB_Err_Ok;
+}
+
+
+HB_Error HB_Load_GDEF_Table( HB_Stream stream,
+ HB_GDEFHeader** retptr )
+{
+ HB_Error error;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_GDEFHeader* gdef;
+
+
+ if ( !retptr )
+ return ERR(HB_Err_Invalid_Argument);
+
+ if ( GOTO_Table( TTAG_GDEF ) )
+ return error;
+
+ if (( error = HB_New_GDEF_Table ( &gdef ) ))
+ return error;
+
+ base_offset = FILE_Pos();
+
+ /* skip version */
+
+ if ( FILE_Seek( base_offset + 4L ) ||
+ ACCESS_Frame( 2L ) )
+ goto Fail0;
+
+ new_offset = GET_UShort();
+
+ FORGET_Frame();
+
+ /* all GDEF subtables are optional */
+
+ if ( new_offset )
+ {
+ new_offset += base_offset;
+
+ /* only classes 1-4 are allowed here */
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_ClassDefinition( &gdef->GlyphClassDef, 5,
+ stream ) ) != HB_Err_Ok )
+ goto Fail0;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+ new_offset = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( new_offset )
+ {
+ new_offset += base_offset;
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_AttachList( &gdef->AttachList,
+ stream ) ) != HB_Err_Ok )
+ goto Fail1;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ new_offset = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( new_offset )
+ {
+ new_offset += base_offset;
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_LigCaretList( &gdef->LigCaretList,
+ stream ) ) != HB_Err_Ok )
+ goto Fail2;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ /* OpenType 1.2 has introduced the `MarkAttachClassDef' field. We
+ first have to scan the LookupFlag values to find out whether we
+ must load it or not. Here we only store the offset of the table. */
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail3;
+
+ new_offset = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( new_offset )
+ gdef->MarkAttachClassDef_offset = new_offset + base_offset;
+ else
+ gdef->MarkAttachClassDef_offset = 0;
+
+ *retptr = gdef;
+
+ return HB_Err_Ok;
+
+Fail3:
+ Free_LigCaretList( &gdef->LigCaretList );
+
+Fail2:
+ Free_AttachList( &gdef->AttachList );
+
+Fail1:
+ _HB_OPEN_Free_ClassDefinition( &gdef->GlyphClassDef );
+
+Fail0:
+ FREE( gdef );
+
+ return error;
+}
+
+
+HB_Error HB_Done_GDEF_Table ( HB_GDEFHeader* gdef )
+{
+ Free_LigCaretList( &gdef->LigCaretList );
+ Free_AttachList( &gdef->AttachList );
+ _HB_OPEN_Free_ClassDefinition( &gdef->GlyphClassDef );
+ _HB_OPEN_Free_ClassDefinition( &gdef->MarkAttachClassDef );
+
+ Free_NewGlyphClasses( gdef );
+
+ FREE( gdef );
+
+ return HB_Err_Ok;
+}
+
+
+
+
+/*******************************
+ * AttachList related functions
+ *******************************/
+
+
+/* AttachPoint */
+
+static HB_Error Load_AttachPoint( HB_AttachPoint* ap,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, count;
+ HB_UShort* pi;
+
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = ap->PointCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ap->PointIndex = NULL;
+
+ if ( count )
+ {
+ if ( ALLOC_ARRAY( ap->PointIndex, count, HB_UShort ) )
+ return error;
+
+ pi = ap->PointIndex;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ {
+ FREE( pi );
+ return error;
+ }
+
+ for ( n = 0; n < count; n++ )
+ pi[n] = GET_UShort();
+
+ FORGET_Frame();
+ }
+
+ return HB_Err_Ok;
+}
+
+
+static void Free_AttachPoint( HB_AttachPoint* ap )
+{
+ FREE( ap->PointIndex );
+}
+
+
+/* AttachList */
+
+static HB_Error Load_AttachList( HB_AttachList* al,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_AttachPoint* ap;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &al->Coverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ count = al->GlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ al->AttachPoint = NULL;
+
+ if ( ALLOC_ARRAY( al->AttachPoint, count, HB_AttachPoint ) )
+ goto Fail2;
+
+ ap = al->AttachPoint;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_AttachPoint( &ap[n], stream ) ) != HB_Err_Ok )
+ goto Fail1;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ al->loaded = TRUE;
+
+ return HB_Err_Ok;
+
+Fail1:
+ for ( m = 0; m < n; m++ )
+ Free_AttachPoint( &ap[m] );
+
+ FREE( ap );
+
+Fail2:
+ _HB_OPEN_Free_Coverage( &al->Coverage );
+ return error;
+}
+
+
+static void Free_AttachList( HB_AttachList* al)
+{
+ HB_UShort n, count;
+
+ HB_AttachPoint* ap;
+
+
+ if ( !al->loaded )
+ return;
+
+ if ( al->AttachPoint )
+ {
+ count = al->GlyphCount;
+ ap = al->AttachPoint;
+
+ for ( n = 0; n < count; n++ )
+ Free_AttachPoint( &ap[n] );
+
+ FREE( ap );
+ }
+
+ _HB_OPEN_Free_Coverage( &al->Coverage );
+}
+
+
+
+/*********************************
+ * LigCaretList related functions
+ *********************************/
+
+
+/* CaretValueFormat1 */
+/* CaretValueFormat2 */
+/* CaretValueFormat3 */
+/* CaretValueFormat4 */
+
+static HB_Error Load_CaretValue( HB_CaretValue* cv,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UInt cur_offset, new_offset, base_offset;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ cv->CaretValueFormat = GET_UShort();
+
+ FORGET_Frame();
+
+ switch ( cv->CaretValueFormat )
+ {
+ case 1:
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ cv->cvf.cvf1.Coordinate = GET_Short();
+
+ FORGET_Frame();
+
+ break;
+
+ case 2:
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ cv->cvf.cvf2.CaretValuePoint = GET_UShort();
+
+ FORGET_Frame();
+
+ break;
+
+ case 3:
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+ cv->cvf.cvf3.Coordinate = GET_Short();
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Device( &cv->cvf.cvf3.Device,
+ stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ break;
+
+ case 4:
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+ cv->cvf.cvf4.IdCaretValue = GET_UShort();
+#else
+ (void) GET_UShort();
+#endif
+
+ FORGET_Frame();
+ break;
+
+ default:
+ return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+
+ return HB_Err_Ok;
+}
+
+
+static void Free_CaretValue( HB_CaretValue* cv)
+{
+ if ( cv->CaretValueFormat == 3 )
+ _HB_OPEN_Free_Device( cv->cvf.cvf3.Device );
+}
+
+
+/* LigGlyph */
+
+static HB_Error Load_LigGlyph( HB_LigGlyph* lg,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_CaretValue* cv;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = lg->CaretCount = GET_UShort();
+
+ FORGET_Frame();
+
+ lg->CaretValue = NULL;
+
+ if ( ALLOC_ARRAY( lg->CaretValue, count, HB_CaretValue ) )
+ return error;
+
+ cv = lg->CaretValue;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_CaretValue( &cv[n], stream ) ) != HB_Err_Ok )
+ goto Fail;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ for ( m = 0; m < n; m++ )
+ Free_CaretValue( &cv[m] );
+
+ FREE( cv );
+ return error;
+}
+
+
+static void Free_LigGlyph( HB_LigGlyph* lg)
+{
+ HB_UShort n, count;
+
+ HB_CaretValue* cv;
+
+
+ if ( lg->CaretValue )
+ {
+ count = lg->CaretCount;
+ cv = lg->CaretValue;
+
+ for ( n = 0; n < count; n++ )
+ Free_CaretValue( &cv[n] );
+
+ FREE( cv );
+ }
+}
+
+
+/* LigCaretList */
+
+static HB_Error Load_LigCaretList( HB_LigCaretList* lcl,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort m, n, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_LigGlyph* lg;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &lcl->Coverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ count = lcl->LigGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ lcl->LigGlyph = NULL;
+
+ if ( ALLOC_ARRAY( lcl->LigGlyph, count, HB_LigGlyph ) )
+ goto Fail2;
+
+ lg = lcl->LigGlyph;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_LigGlyph( &lg[n], stream ) ) != HB_Err_Ok )
+ goto Fail1;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ lcl->loaded = TRUE;
+
+ return HB_Err_Ok;
+
+Fail1:
+ for ( m = 0; m < n; m++ )
+ Free_LigGlyph( &lg[m] );
+
+ FREE( lg );
+
+Fail2:
+ _HB_OPEN_Free_Coverage( &lcl->Coverage );
+ return error;
+}
+
+
+static void Free_LigCaretList( HB_LigCaretList* lcl )
+{
+ HB_UShort n, count;
+
+ HB_LigGlyph* lg;
+
+
+ if ( !lcl->loaded )
+ return;
+
+ if ( lcl->LigGlyph )
+ {
+ count = lcl->LigGlyphCount;
+ lg = lcl->LigGlyph;
+
+ for ( n = 0; n < count; n++ )
+ Free_LigGlyph( &lg[n] );
+
+ FREE( lg );
+ }
+
+ _HB_OPEN_Free_Coverage( &lcl->Coverage );
+}
+
+
+
+/***********
+ * GDEF API
+ ***********/
+
+
+static HB_UShort Get_New_Class( HB_GDEFHeader* gdef,
+ HB_UShort glyphID,
+ HB_UShort index )
+{
+ HB_UShort glyph_index, array_index, count;
+ HB_UShort byte, bits;
+
+ HB_ClassRangeRecord* gcrr;
+ HB_UShort** ngc;
+
+
+ if ( glyphID >= gdef->LastGlyph )
+ return 0;
+
+ count = gdef->GlyphClassDef.cd.cd2.ClassRangeCount;
+ gcrr = gdef->GlyphClassDef.cd.cd2.ClassRangeRecord;
+ ngc = gdef->NewGlyphClasses;
+
+ if ( index < count && glyphID < gcrr[index].Start )
+ {
+ array_index = index;
+ if ( index == 0 )
+ glyph_index = glyphID;
+ else
+ glyph_index = glyphID - gcrr[index - 1].End - 1;
+ }
+ else
+ {
+ array_index = index + 1;
+ glyph_index = glyphID - gcrr[index].End - 1;
+ }
+
+ byte = ngc[array_index][glyph_index / 4];
+ bits = byte >> ( 16 - ( glyph_index % 4 + 1 ) * 4 );
+
+ return bits & 0x000F;
+}
+
+
+
+HB_Error HB_GDEF_Get_Glyph_Property( HB_GDEFHeader* gdef,
+ HB_UShort glyphID,
+ HB_UShort* property )
+{
+ HB_UShort class = 0, index = 0; /* shut compiler up */
+
+ HB_Error error;
+
+
+ if ( !gdef || !property )
+ return ERR(HB_Err_Invalid_Argument);
+
+ /* first, we check for mark attach classes */
+
+ if ( gdef->MarkAttachClassDef.loaded )
+ {
+ error = _HB_OPEN_Get_Class( &gdef->MarkAttachClassDef, glyphID, &class, &index );
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+ if ( !error )
+ {
+ *property = class << 8;
+ return HB_Err_Ok;
+ }
+ }
+
+ error = _HB_OPEN_Get_Class( &gdef->GlyphClassDef, glyphID, &class, &index );
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ /* if we have a constructed class table, check whether additional
+ values have been assigned */
+
+ if ( error == HB_Err_Not_Covered && gdef->NewGlyphClasses )
+ class = Get_New_Class( gdef, glyphID, index );
+
+ switch ( class )
+ {
+ default:
+ case UNCLASSIFIED_GLYPH:
+ *property = 0;
+ break;
+
+ case SIMPLE_GLYPH:
+ *property = HB_GDEF_BASE_GLYPH;
+ break;
+
+ case LIGATURE_GLYPH:
+ *property = HB_GDEF_LIGATURE;
+ break;
+
+ case MARK_GLYPH:
+ *property = HB_GDEF_MARK;
+ break;
+
+ case COMPONENT_GLYPH:
+ *property = HB_GDEF_COMPONENT;
+ break;
+ }
+
+ return HB_Err_Ok;
+}
+
+
+static HB_Error Make_ClassRange( HB_ClassDefinition* cd,
+ HB_UShort start,
+ HB_UShort end,
+ HB_UShort class )
+{
+ HB_Error error;
+ HB_UShort index;
+
+ HB_ClassDefFormat2* cdf2;
+ HB_ClassRangeRecord* crr;
+
+
+ cdf2 = &cd->cd.cd2;
+
+ if ( REALLOC_ARRAY( cdf2->ClassRangeRecord,
+ cdf2->ClassRangeCount + 1 ,
+ HB_ClassRangeRecord ) )
+ return error;
+
+ cdf2->ClassRangeCount++;
+
+ crr = cdf2->ClassRangeRecord;
+ index = cdf2->ClassRangeCount - 1;
+
+ crr[index].Start = start;
+ crr[index].End = end;
+ crr[index].Class = class;
+
+ return HB_Err_Ok;
+}
+
+
+
+HB_Error HB_GDEF_Build_ClassDefinition( HB_GDEFHeader* gdef,
+ HB_UShort num_glyphs,
+ HB_UShort glyph_count,
+ HB_UShort* glyph_array,
+ HB_UShort* class_array )
+{
+ HB_UShort start, curr_glyph, curr_class;
+ HB_UShort n, m, count;
+ HB_Error error;
+
+ HB_ClassDefinition* gcd;
+ HB_ClassRangeRecord* gcrr;
+ HB_UShort** ngc;
+
+
+ if ( !gdef || !glyph_array || !class_array )
+ return ERR(HB_Err_Invalid_Argument);
+
+ gcd = &gdef->GlyphClassDef;
+
+ /* We build a format 2 table */
+
+ gcd->ClassFormat = 2;
+
+ gcd->cd.cd2.ClassRangeCount = 0;
+ gcd->cd.cd2.ClassRangeRecord = NULL;
+
+ start = glyph_array[0];
+ curr_class = class_array[0];
+ curr_glyph = start;
+
+ if ( curr_class >= 5 )
+ {
+ error = ERR(HB_Err_Invalid_Argument);
+ goto Fail4;
+ }
+
+ glyph_count--;
+
+ for ( n = 0; n < glyph_count + 1; n++ )
+ {
+ if ( curr_glyph == glyph_array[n] && curr_class == class_array[n] )
+ {
+ if ( n == glyph_count )
+ {
+ if ( ( error = Make_ClassRange( gcd, start,
+ curr_glyph,
+ curr_class) ) != HB_Err_Ok )
+ goto Fail3;
+ }
+ else
+ {
+ if ( curr_glyph == 0xFFFF )
+ {
+ error = ERR(HB_Err_Invalid_Argument);
+ goto Fail3;
+ }
+ else
+ curr_glyph++;
+ }
+ }
+ else
+ {
+ if ( ( error = Make_ClassRange( gcd, start,
+ curr_glyph - 1,
+ curr_class) ) != HB_Err_Ok )
+ goto Fail3;
+
+ if ( curr_glyph > glyph_array[n] )
+ {
+ error = ERR(HB_Err_Invalid_Argument);
+ goto Fail3;
+ }
+
+ start = glyph_array[n];
+ curr_class = class_array[n];
+ curr_glyph = start;
+
+ if ( curr_class >= 5 )
+ {
+ error = ERR(HB_Err_Invalid_Argument);
+ goto Fail3;
+ }
+
+ if ( n == glyph_count )
+ {
+ if ( ( error = Make_ClassRange( gcd, start,
+ curr_glyph,
+ curr_class) ) != HB_Err_Ok )
+ goto Fail3;
+ }
+ else
+ {
+ if ( curr_glyph == 0xFFFF )
+ {
+ error = ERR(HB_Err_Invalid_Argument);
+ goto Fail3;
+ }
+ else
+ curr_glyph++;
+ }
+ }
+ }
+
+ /* now prepare the arrays for class values assigned during the lookup
+ process */
+
+ if ( ALLOC_ARRAY( gdef->NewGlyphClasses,
+ gcd->cd.cd2.ClassRangeCount + 1, HB_UShort* ) )
+ goto Fail3;
+
+ count = gcd->cd.cd2.ClassRangeCount;
+ gcrr = gcd->cd.cd2.ClassRangeRecord;
+ ngc = gdef->NewGlyphClasses;
+
+ /* We allocate arrays for all glyphs not covered by the class range
+ records. Each element holds four class values. */
+
+ if ( count > 0 )
+ {
+ if ( gcrr[0].Start )
+ {
+ if ( ALLOC_ARRAY( ngc[0], ( gcrr[0].Start + 3 ) / 4, HB_UShort ) )
+ goto Fail2;
+ }
+
+ for ( n = 1; n < count; n++ )
+ {
+ if ( gcrr[n].Start - gcrr[n - 1].End > 1 )
+ if ( ALLOC_ARRAY( ngc[n],
+ ( gcrr[n].Start - gcrr[n - 1].End + 2 ) / 4,
+ HB_UShort ) )
+ goto Fail1;
+ }
+
+ if ( gcrr[count - 1].End != num_glyphs - 1 )
+ {
+ if ( ALLOC_ARRAY( ngc[count],
+ ( num_glyphs - gcrr[count - 1].End + 2 ) / 4,
+ HB_UShort ) )
+ goto Fail1;
+ }
+ }
+ else if ( num_glyphs > 0 )
+ {
+ if ( ALLOC_ARRAY( ngc[count],
+ ( num_glyphs + 3 ) / 4,
+ HB_UShort ) )
+ goto Fail2;
+ }
+
+ gdef->LastGlyph = num_glyphs - 1;
+
+ gdef->MarkAttachClassDef_offset = 0L;
+ gdef->MarkAttachClassDef.loaded = FALSE;
+
+ gcd->loaded = TRUE;
+
+ return HB_Err_Ok;
+
+Fail1:
+ for ( m = 0; m < n; m++ )
+ FREE( ngc[m] );
+
+Fail2:
+ FREE( gdef->NewGlyphClasses );
+
+Fail3:
+ FREE( gcd->cd.cd2.ClassRangeRecord );
+
+Fail4:
+ return error;
+}
+
+
+static void Free_NewGlyphClasses( HB_GDEFHeader* gdef )
+{
+ HB_UShort** ngc;
+ HB_UShort n, count;
+
+
+ if ( gdef->NewGlyphClasses )
+ {
+ count = gdef->GlyphClassDef.cd.cd2.ClassRangeCount + 1;
+ ngc = gdef->NewGlyphClasses;
+
+ for ( n = 0; n < count; n++ )
+ FREE( ngc[n] );
+
+ FREE( ngc );
+ }
+}
+
+
+HB_INTERNAL HB_Error
+_HB_GDEF_Add_Glyph_Property( HB_GDEFHeader* gdef,
+ HB_UShort glyphID,
+ HB_UShort property )
+{
+ HB_Error error;
+ HB_UShort class, new_class, index = 0; /* shut compiler up */
+ HB_UShort byte, bits, mask;
+ HB_UShort array_index, glyph_index, count;
+
+ HB_ClassRangeRecord* gcrr;
+ HB_UShort** ngc;
+
+
+ error = _HB_OPEN_Get_Class( &gdef->GlyphClassDef, glyphID, &class, &index );
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ /* we don't accept glyphs covered in `GlyphClassDef' */
+
+ if ( !error )
+ return HB_Err_Not_Covered;
+
+ switch ( property )
+ {
+ case 0:
+ new_class = UNCLASSIFIED_GLYPH;
+ break;
+
+ case HB_GDEF_BASE_GLYPH:
+ new_class = SIMPLE_GLYPH;
+ break;
+
+ case HB_GDEF_LIGATURE:
+ new_class = LIGATURE_GLYPH;
+ break;
+
+ case HB_GDEF_MARK:
+ new_class = MARK_GLYPH;
+ break;
+
+ case HB_GDEF_COMPONENT:
+ new_class = COMPONENT_GLYPH;
+ break;
+
+ default:
+ return ERR(HB_Err_Invalid_Argument);
+ }
+
+ count = gdef->GlyphClassDef.cd.cd2.ClassRangeCount;
+ gcrr = gdef->GlyphClassDef.cd.cd2.ClassRangeRecord;
+ ngc = gdef->NewGlyphClasses;
+
+ if ( index < count && glyphID < gcrr[index].Start )
+ {
+ array_index = index;
+ if ( index == 0 )
+ glyph_index = glyphID;
+ else
+ glyph_index = glyphID - gcrr[index - 1].End - 1;
+ }
+ else
+ {
+ array_index = index + 1;
+ glyph_index = glyphID - gcrr[index].End - 1;
+ }
+
+ byte = ngc[array_index][glyph_index / 4];
+ bits = byte >> ( 16 - ( glyph_index % 4 + 1 ) * 4 );
+ class = bits & 0x000F;
+
+ /* we don't overwrite existing entries */
+
+ if ( !class )
+ {
+ bits = new_class << ( 16 - ( glyph_index % 4 + 1 ) * 4 );
+ mask = ~( 0x000F << ( 16 - ( glyph_index % 4 + 1 ) * 4 ) );
+
+ ngc[array_index][glyph_index / 4] &= mask;
+ ngc[array_index][glyph_index / 4] |= bits;
+ }
+
+ return HB_Err_Ok;
+}
+
+
+HB_INTERNAL HB_Error
+_HB_GDEF_Check_Property( HB_GDEFHeader* gdef,
+ HB_GlyphItem gitem,
+ HB_UShort flags,
+ HB_UShort* property )
+{
+ HB_Error error;
+
+ if ( gdef )
+ {
+ HB_UShort basic_glyph_class;
+ HB_UShort desired_attachment_class;
+
+ if ( gitem->gproperties == HB_GLYPH_PROPERTIES_UNKNOWN )
+ {
+ error = HB_GDEF_Get_Glyph_Property( gdef, gitem->gindex, &gitem->gproperties );
+ if ( error )
+ return error;
+ }
+
+ *property = gitem->gproperties;
+
+ /* If the glyph was found in the MarkAttachmentClass table,
+ * then that class value is the high byte of the result,
+ * otherwise the low byte contains the basic type of the glyph
+ * as defined by the GlyphClassDef table.
+ */
+ if ( *property & HB_LOOKUP_FLAG_IGNORE_SPECIAL_MARKS )
+ basic_glyph_class = HB_GDEF_MARK;
+ else
+ basic_glyph_class = *property;
+
+ /* Return Not_Covered, if, for example, basic_glyph_class
+ * is HB_GDEF_LIGATURE and LookFlags includes HB_LOOKUP_FLAG_IGNORE_LIGATURES
+ */
+ if ( flags & basic_glyph_class )
+ return HB_Err_Not_Covered;
+
+ /* The high byte of LookupFlags has the meaning
+ * "ignore marks of attachment type different than
+ * the attachment type specified."
+ */
+ desired_attachment_class = flags & HB_LOOKUP_FLAG_IGNORE_SPECIAL_MARKS;
+ if ( desired_attachment_class )
+ {
+ if ( basic_glyph_class == HB_GDEF_MARK &&
+ *property != desired_attachment_class )
+ return HB_Err_Not_Covered;
+ }
+ } else {
+ *property = 0;
+ }
+
+ return HB_Err_Ok;
+}
+
+HB_INTERNAL HB_Error
+_HB_GDEF_LoadMarkAttachClassDef_From_LookupFlags( HB_GDEFHeader* gdef,
+ HB_Stream stream,
+ HB_Lookup* lo,
+ HB_UShort num_lookups)
+{
+ HB_Error error = HB_Err_Ok;
+ HB_UShort i;
+
+ /* We now check the LookupFlags for values larger than 0xFF to find
+ out whether we need to load the `MarkAttachClassDef' field of the
+ GDEF table -- this hack is necessary for OpenType 1.2 tables since
+ the version field of the GDEF table hasn't been incremented.
+
+ For constructed GDEF tables, we only load it if
+ `MarkAttachClassDef_offset' is not zero (nevertheless, a build of
+ a constructed mark attach table is not supported currently). */
+
+ if ( gdef &&
+ gdef->MarkAttachClassDef_offset && !gdef->MarkAttachClassDef.loaded )
+ {
+ for ( i = 0; i < num_lookups; i++ )
+ {
+
+ if ( lo[i].LookupFlag & HB_LOOKUP_FLAG_IGNORE_SPECIAL_MARKS )
+ {
+ if ( FILE_Seek( gdef->MarkAttachClassDef_offset ) ||
+ ( error = _HB_OPEN_Load_ClassDefinition( &gdef->MarkAttachClassDef,
+ 256, stream ) ) != HB_Err_Ok )
+ goto Done;
+
+ break;
+ }
+ }
+ }
+
+Done:
+ return error;
+}
+
+/* END */
diff --git a/src/hb-old/harfbuzz-gdef.h b/src/hb-old/harfbuzz-gdef.h
new file mode 100644
index 0000000..f9a03dd
--- /dev/null
+++ b/src/hb-old/harfbuzz-gdef.h
@@ -0,0 +1,140 @@
+/*
+ * Copyright (C) 1998-2004 David Turner and Werner Lemberg
+ * Copyright (C) 2006 Behdad Esfahbod
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#ifndef HARFBUZZ_GDEF_H
+#define HARFBUZZ_GDEF_H
+
+#include "harfbuzz-open.h"
+#include "harfbuzz-stream.h"
+
+HB_BEGIN_HEADER
+
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(push, 1)
+#endif
+
+/* GDEF glyph properties. Note that HB_GDEF_COMPONENT has no corresponding
+ * flag in the LookupFlag field. */
+#define HB_GDEF_BASE_GLYPH 0x0002
+#define HB_GDEF_LIGATURE 0x0004
+#define HB_GDEF_MARK 0x0008
+#define HB_GDEF_COMPONENT 0x0010
+
+
+typedef struct HB_AttachPoint_ HB_AttachPoint;
+
+
+struct HB_AttachList_
+{
+ HB_AttachPoint* AttachPoint; /* array of AttachPoint tables */
+ HB_Coverage Coverage; /* Coverage table */
+ HB_UShort GlyphCount; /* number of glyphs with
+ attachments */
+ HB_Bool loaded;
+};
+
+typedef struct HB_AttachList_ HB_AttachList;
+
+typedef struct HB_LigGlyph_ HB_LigGlyph;
+
+struct HB_LigCaretList_
+{
+ HB_LigGlyph* LigGlyph; /* array of LigGlyph tables */
+ HB_Coverage Coverage; /* Coverage table */
+ HB_UShort LigGlyphCount; /* number of ligature glyphs */
+ HB_Bool loaded;
+};
+
+typedef struct HB_LigCaretList_ HB_LigCaretList;
+
+
+
+/* The `NewGlyphClasses' field is not defined in the TTO specification.
+ We use it for fonts with a constructed `GlyphClassDef' structure
+ (i.e., which don't have a GDEF table) to collect glyph classes
+ assigned during the lookup process. The number of arrays in this
+ pointer array is GlyphClassDef->cd.cd2.ClassRangeCount+1; the nth
+ array then contains the glyph class values of the glyphs not covered
+ by the ClassRangeRecords structures with index n-1 and n. We store
+ glyph class values for four glyphs in a single array element.
+
+ `LastGlyph' is identical to the number of glyphs minus one in the
+ font; we need it only if `NewGlyphClasses' is not NULL (to have an
+ upper bound for the last array).
+
+ Note that we first store the file offset to the `MarkAttachClassDef'
+ field (which has been introduced in OpenType 1.2) -- since the
+ `Version' field value hasn't been increased to indicate that we have
+ one more field for some obscure reason, we must parse the GSUB table
+ to find out whether class values refer to this table. Only then we
+ can finally load the MarkAttachClassDef structure if necessary. */
+
+struct HB_GDEFHeader_
+{
+ HB_UShort** NewGlyphClasses;
+ HB_UInt offset;
+ HB_UInt MarkAttachClassDef_offset;
+
+ HB_16Dot16 Version;
+
+ HB_ClassDefinition GlyphClassDef;
+ HB_AttachList AttachList;
+ HB_LigCaretList LigCaretList;
+ HB_ClassDefinition MarkAttachClassDef; /* new in OT 1.2 */
+
+ HB_UShort LastGlyph;
+};
+
+typedef struct HB_GDEFHeader_ HB_GDEFHeader;
+typedef struct HB_GDEFHeader_* HB_GDEF;
+
+
+HB_Error HB_New_GDEF_Table( HB_GDEFHeader** retptr );
+
+
+HB_Error HB_Load_GDEF_Table( HB_Stream stream,
+ HB_GDEFHeader** gdef );
+
+
+HB_Error HB_Done_GDEF_Table ( HB_GDEFHeader* gdef );
+
+
+HB_Error HB_GDEF_Get_Glyph_Property( HB_GDEFHeader* gdef,
+ HB_UShort glyphID,
+ HB_UShort* property );
+
+HB_Error HB_GDEF_Build_ClassDefinition( HB_GDEFHeader* gdef,
+ HB_UShort num_glyphs,
+ HB_UShort glyph_count,
+ HB_UShort* glyph_array,
+ HB_UShort* class_array );
+
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(pop)
+#endif
+
+HB_END_HEADER
+
+#endif /* HARFBUZZ_GDEF_H */
diff --git a/src/hb-old/harfbuzz-global.h b/src/hb-old/harfbuzz-global.h
new file mode 100644
index 0000000..9ba5841
--- /dev/null
+++ b/src/hb-old/harfbuzz-global.h
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2007 Red Hat, Inc.
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#ifndef HARFBUZZ_GLOBAL_H
+#define HARFBUZZ_GLOBAL_H
+
+#include <stdlib.h>
+#include <string.h>
+
+#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__MINGW32__)
+# define HB_BEGIN_VISIBILITY _Pragma ("GCC visibility push(hidden)")
+# define HB_END_VISIBILITY _Pragma ("GCC visibility pop")
+#else
+# define HB_BEGIN_VISIBILITY
+# define HB_END_VISIBILITY
+#endif
+#ifdef __cplusplus
+# define HB_BEGIN_HEADER extern "C" { HB_BEGIN_VISIBILITY
+# define HB_END_HEADER HB_END_VISIBILITY }
+#else
+# define HB_BEGIN_HEADER HB_BEGIN_VISIBILITY
+# define HB_END_HEADER HB_END_VISIBILITY
+#endif
+
+HB_BEGIN_HEADER
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#ifndef TRUE
+#define TRUE (!FALSE)
+#endif
+
+#define HB_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
+ ( ( (HB_UInt)_x1 << 24 ) | \
+ ( (HB_UInt)_x2 << 16 ) | \
+ ( (HB_UInt)_x3 << 8 ) | \
+ (HB_UInt)_x4 )
+
+typedef char hb_int8;
+typedef unsigned char hb_uint8;
+typedef short hb_int16;
+typedef unsigned short hb_uint16;
+typedef int hb_int32;
+typedef unsigned int hb_uint32;
+
+typedef hb_uint8 HB_Bool;
+
+typedef hb_uint8 HB_Byte;
+typedef hb_uint16 HB_UShort;
+typedef hb_uint32 HB_UInt;
+typedef hb_int8 HB_Char;
+typedef hb_int16 HB_Short;
+typedef hb_int32 HB_Int;
+
+typedef hb_uint16 HB_UChar16;
+typedef hb_uint32 HB_UChar32;
+typedef hb_uint32 HB_Glyph;
+typedef hb_int32 HB_Fixed; /* 26.6 */
+
+#define HB_FIXED_CONSTANT(v) ((v) * 64)
+#define HB_FIXED_ROUND(v) (((v)+32) & -64)
+
+typedef hb_int32 HB_16Dot16; /* 16.16 */
+
+typedef void * HB_Pointer;
+typedef hb_uint32 HB_Tag;
+
+typedef enum {
+ /* no error */
+ HB_Err_Ok = 0x0000,
+ HB_Err_Not_Covered = 0xFFFF,
+
+ /* _hb_err() is called whenever returning the following errors,
+ * and in a couple places for HB_Err_Not_Covered too. */
+
+ /* programmer error */
+ HB_Err_Invalid_Argument = 0x1A66,
+
+ /* font error */
+ HB_Err_Invalid_SubTable_Format = 0x157F,
+ HB_Err_Invalid_SubTable = 0x1570,
+ HB_Err_Read_Error = 0x6EAD,
+
+ /* system error */
+ HB_Err_Out_Of_Memory = 0xDEAD
+} HB_Error;
+
+typedef struct {
+ HB_Fixed x;
+ HB_Fixed y;
+} HB_FixedPoint;
+
+typedef struct HB_Font_ *HB_Font;
+typedef struct HB_StreamRec_ *HB_Stream;
+typedef struct HB_FaceRec_ *HB_Face;
+
+HB_END_HEADER
+
+#endif
diff --git a/src/hb-old/harfbuzz-gpos-private.h b/src/hb-old/harfbuzz-gpos-private.h
new file mode 100644
index 0000000..39f3159
--- /dev/null
+++ b/src/hb-old/harfbuzz-gpos-private.h
@@ -0,0 +1,729 @@
+/*
+ * Copyright (C) 1998-2004 David Turner and Werner Lemberg
+ * Copyright (C) 2006 Behdad Esfahbod
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#ifndef HARFBUZZ_GPOS_PRIVATE_H
+#define HARFBUZZ_GPOS_PRIVATE_H
+
+#include "harfbuzz-impl.h"
+#include "harfbuzz-stream-private.h"
+#include "harfbuzz-gpos.h"
+
+HB_BEGIN_HEADER
+
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(push, 1)
+#endif
+
+/* shared tables */
+
+#define VR_X_PLACEMENT_DEVICE 0
+#define VR_Y_PLACEMENT_DEVICE 1
+#define VR_X_ADVANCE_DEVICE 2
+#define VR_Y_ADVANCE_DEVICE 3
+
+struct HB_ValueRecord_
+{
+ HB_Short XPlacement; /* horizontal adjustment for
+ placement */
+ HB_Short YPlacement; /* vertical adjustment for
+ placement */
+ HB_Short XAdvance; /* horizontal adjustment for
+ advance */
+ HB_Short YAdvance; /* vertical adjustment for
+ advance */
+
+ HB_Device** DeviceTables; /* device tables for placement
+ and advance */
+
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+ HB_UShort XIdPlacement; /* horizontal placement metric ID */
+ HB_UShort YIdPlacement; /* vertical placement metric ID */
+ HB_UShort XIdAdvance; /* horizontal advance metric ID */
+ HB_UShort YIdAdvance; /* vertical advance metric ID */
+#endif
+};
+
+typedef struct HB_ValueRecord_ HB_ValueRecord;
+
+
+/* Mask values to scan the value format of the ValueRecord structure.
+ We always expand compressed ValueRecords of the font. */
+
+#define HB_GPOS_FORMAT_HAVE_DEVICE_TABLES 0x00F0
+
+#define HB_GPOS_FORMAT_HAVE_X_PLACEMENT 0x0001
+#define HB_GPOS_FORMAT_HAVE_Y_PLACEMENT 0x0002
+#define HB_GPOS_FORMAT_HAVE_X_ADVANCE 0x0004
+#define HB_GPOS_FORMAT_HAVE_Y_ADVANCE 0x0008
+#define HB_GPOS_FORMAT_HAVE_X_PLACEMENT_DEVICE 0x0010
+#define HB_GPOS_FORMAT_HAVE_Y_PLACEMENT_DEVICE 0x0020
+#define HB_GPOS_FORMAT_HAVE_X_ADVANCE_DEVICE 0x0040
+#define HB_GPOS_FORMAT_HAVE_Y_ADVANCE_DEVICE 0x0080
+#define HB_GPOS_FORMAT_HAVE_X_ID_PLACEMENT 0x0100
+#define HB_GPOS_FORMAT_HAVE_Y_ID_PLACEMENT 0x0200
+#define HB_GPOS_FORMAT_HAVE_X_ID_ADVANCE 0x0400
+#define HB_GPOS_FORMAT_HAVE_Y_ID_ADVANCE 0x0800
+
+
+struct HB_AnchorFormat1_
+{
+ HB_Short XCoordinate; /* horizontal value */
+ HB_Short YCoordinate; /* vertical value */
+};
+
+typedef struct HB_AnchorFormat1_ HB_AnchorFormat1;
+
+
+struct HB_AnchorFormat2_
+{
+ HB_Short XCoordinate; /* horizontal value */
+ HB_Short YCoordinate; /* vertical value */
+ HB_UShort AnchorPoint; /* index to glyph contour point */
+};
+
+typedef struct HB_AnchorFormat2_ HB_AnchorFormat2;
+
+#define AF3_X_DEVICE_TABLE 0
+#define AF3_Y_DEVICE_TABLE 1
+
+struct HB_AnchorFormat3_
+{
+ HB_Short XCoordinate; /* horizontal value */
+ HB_Short YCoordinate; /* vertical value */
+ HB_Device** DeviceTables; /* device tables for coordinates */
+};
+
+typedef struct HB_AnchorFormat3_ HB_AnchorFormat3;
+
+
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+struct HB_AnchorFormat4_
+{
+ HB_UShort XIdAnchor; /* horizontal metric ID */
+ HB_UShort YIdAnchor; /* vertical metric ID */
+};
+
+typedef struct HB_AnchorFormat4_ HB_AnchorFormat4;
+#endif
+
+
+struct HB_Anchor_
+{
+ HB_Byte PosFormat; /* 1, 2, 3, or 4 -- 0 indicates
+ that there is no Anchor table */
+
+ union
+ {
+ HB_AnchorFormat1 af1;
+ HB_AnchorFormat2 af2;
+ HB_AnchorFormat3 af3;
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+ HB_AnchorFormat4 af4;
+#endif
+ } af;
+};
+
+typedef struct HB_Anchor_ HB_Anchor;
+
+
+struct HB_MarkRecord_
+{
+ HB_UShort Class; /* mark class */
+ HB_Anchor MarkAnchor; /* anchor table */
+};
+
+typedef struct HB_MarkRecord_ HB_MarkRecord;
+
+
+struct HB_MarkArray_
+{
+ HB_UShort MarkCount; /* number of MarkRecord tables */
+ HB_MarkRecord* MarkRecord; /* array of MarkRecord tables */
+};
+
+typedef struct HB_MarkArray_ HB_MarkArray;
+
+
+/* LookupType 1 */
+
+struct HB_SinglePosFormat1_
+{
+ HB_ValueRecord Value; /* ValueRecord for all covered
+ glyphs */
+};
+
+typedef struct HB_SinglePosFormat1_ HB_SinglePosFormat1;
+
+
+struct HB_SinglePosFormat2_
+{
+ HB_UShort ValueCount; /* number of ValueRecord tables */
+ HB_ValueRecord* Value; /* array of ValueRecord tables */
+};
+
+typedef struct HB_SinglePosFormat2_ HB_SinglePosFormat2;
+
+
+struct HB_SinglePos_
+{
+ HB_Byte PosFormat; /* 1 or 2 */
+ HB_Coverage Coverage; /* Coverage table */
+
+ HB_UShort ValueFormat; /* format of ValueRecord table */
+
+ union
+ {
+ HB_SinglePosFormat1 spf1;
+ HB_SinglePosFormat2 spf2;
+ } spf;
+};
+
+typedef struct HB_SinglePos_ HB_SinglePos;
+
+
+/* LookupType 2 */
+
+struct HB_PairValueRecord_
+{
+ HB_UShort SecondGlyph; /* glyph ID for second glyph */
+ HB_ValueRecord Value1; /* pos. data for first glyph */
+ HB_ValueRecord Value2; /* pos. data for second glyph */
+};
+
+typedef struct HB_PairValueRecord_ HB_PairValueRecord;
+
+
+struct HB_PairSet_
+{
+ HB_UShort PairValueCount;
+ /* number of PairValueRecord tables */
+ HB_PairValueRecord* PairValueRecord;
+ /* array of PairValueRecord tables */
+};
+
+typedef struct HB_PairSet_ HB_PairSet;
+
+
+struct HB_PairPosFormat1_
+{
+ HB_UShort PairSetCount; /* number of PairSet tables */
+ HB_PairSet* PairSet; /* array of PairSet tables */
+};
+
+typedef struct HB_PairPosFormat1_ HB_PairPosFormat1;
+
+
+struct HB_Class2Record_
+{
+ HB_ValueRecord Value1; /* pos. data for first glyph */
+ HB_ValueRecord Value2; /* pos. data for second glyph */
+};
+
+typedef struct HB_Class2Record_ HB_Class2Record;
+
+
+struct HB_Class1Record_
+{
+ HB_Class2Record* Class2Record; /* array of Class2Record tables */
+};
+
+typedef struct HB_Class1Record_ HB_Class1Record;
+
+
+struct HB_PairPosFormat2_
+{
+ HB_ClassDefinition ClassDef1; /* class def. for first glyph */
+ HB_ClassDefinition ClassDef2; /* class def. for second glyph */
+ HB_UShort Class1Count; /* number of classes in ClassDef1
+ table */
+ HB_UShort Class2Count; /* number of classes in ClassDef2
+ table */
+ HB_Class1Record* Class1Record; /* array of Class1Record tables */
+};
+
+typedef struct HB_PairPosFormat2_ HB_PairPosFormat2;
+
+
+struct HB_PairPos_
+{
+ HB_Byte PosFormat; /* 1 or 2 */
+ HB_Coverage Coverage; /* Coverage table */
+ HB_UShort ValueFormat1; /* format of ValueRecord table
+ for first glyph */
+ HB_UShort ValueFormat2; /* format of ValueRecord table
+ for second glyph */
+
+ union
+ {
+ HB_PairPosFormat1 ppf1;
+ HB_PairPosFormat2 ppf2;
+ } ppf;
+};
+
+typedef struct HB_PairPos_ HB_PairPos;
+
+
+/* LookupType 3 */
+
+struct HB_EntryExitRecord_
+{
+ HB_Anchor EntryAnchor; /* entry Anchor table */
+ HB_Anchor ExitAnchor; /* exit Anchor table */
+};
+
+
+typedef struct HB_EntryExitRecord_ HB_EntryExitRecord;
+
+struct HB_CursivePos_
+{
+ HB_UShort PosFormat; /* always 1 */
+ HB_Coverage Coverage; /* Coverage table */
+ HB_UShort EntryExitCount;
+ /* number of EntryExitRecord tables */
+ HB_EntryExitRecord* EntryExitRecord;
+ /* array of EntryExitRecord tables */
+};
+
+typedef struct HB_CursivePos_ HB_CursivePos;
+
+
+/* LookupType 4 */
+
+struct HB_BaseRecord_
+{
+ HB_Anchor* BaseAnchor; /* array of base glyph anchor
+ tables */
+};
+
+typedef struct HB_BaseRecord_ HB_BaseRecord;
+
+
+struct HB_BaseArray_
+{
+ HB_UShort BaseCount; /* number of BaseRecord tables */
+ HB_BaseRecord* BaseRecord; /* array of BaseRecord tables */
+};
+
+typedef struct HB_BaseArray_ HB_BaseArray;
+
+
+struct HB_MarkBasePos_
+{
+ HB_UShort PosFormat; /* always 1 */
+ HB_Coverage MarkCoverage; /* mark glyph coverage table */
+ HB_Coverage BaseCoverage; /* base glyph coverage table */
+ HB_UShort ClassCount; /* number of mark classes */
+ HB_MarkArray MarkArray; /* mark array table */
+ HB_BaseArray BaseArray; /* base array table */
+};
+
+typedef struct HB_MarkBasePos_ HB_MarkBasePos;
+
+
+/* LookupType 5 */
+
+struct HB_ComponentRecord_
+{
+ HB_Anchor* LigatureAnchor; /* array of ligature glyph anchor
+ tables */
+};
+
+typedef struct HB_ComponentRecord_ HB_ComponentRecord;
+
+
+struct HB_LigatureAttach_
+{
+ HB_UShort ComponentCount;
+ /* number of ComponentRecord tables */
+ HB_ComponentRecord* ComponentRecord;
+ /* array of ComponentRecord tables */
+};
+
+typedef struct HB_LigatureAttach_ HB_LigatureAttach;
+
+
+struct HB_LigatureArray_
+{
+ HB_UShort LigatureCount; /* number of LigatureAttach tables */
+ HB_LigatureAttach* LigatureAttach;
+ /* array of LigatureAttach tables */
+};
+
+typedef struct HB_LigatureArray_ HB_LigatureArray;
+
+
+struct HB_MarkLigPos_
+{
+ HB_UShort PosFormat; /* always 1 */
+ HB_Coverage MarkCoverage; /* mark glyph coverage table */
+ HB_Coverage LigatureCoverage;
+ /* ligature glyph coverage table */
+ HB_UShort ClassCount; /* number of mark classes */
+ HB_MarkArray MarkArray; /* mark array table */
+ HB_LigatureArray LigatureArray; /* ligature array table */
+};
+
+typedef struct HB_MarkLigPos_ HB_MarkLigPos;
+
+
+/* LookupType 6 */
+
+struct HB_Mark2Record_
+{
+ HB_Anchor* Mark2Anchor; /* array of mark glyph anchor
+ tables */
+};
+
+typedef struct HB_Mark2Record_ HB_Mark2Record;
+
+
+struct HB_Mark2Array_
+{
+ HB_UShort Mark2Count; /* number of Mark2Record tables */
+ HB_Mark2Record* Mark2Record; /* array of Mark2Record tables */
+};
+
+typedef struct HB_Mark2Array_ HB_Mark2Array;
+
+
+struct HB_MarkMarkPos_
+{
+ HB_UShort PosFormat; /* always 1 */
+ HB_Coverage Mark1Coverage; /* first mark glyph coverage table */
+ HB_Coverage Mark2Coverage; /* second mark glyph coverave table */
+ HB_UShort ClassCount; /* number of combining mark classes */
+ HB_MarkArray Mark1Array; /* MarkArray table for first mark */
+ HB_Mark2Array Mark2Array; /* MarkArray table for second mark */
+};
+
+typedef struct HB_MarkMarkPos_ HB_MarkMarkPos;
+
+
+/* needed by both lookup type 7 and 8 */
+
+struct HB_PosLookupRecord_
+{
+ HB_UShort SequenceIndex; /* index into current
+ glyph sequence */
+ HB_UShort LookupListIndex; /* Lookup to apply to that pos. */
+};
+
+typedef struct HB_PosLookupRecord_ HB_PosLookupRecord;
+
+
+/* LookupType 7 */
+
+struct HB_PosRule_
+{
+ HB_UShort GlyphCount; /* total number of input glyphs */
+ HB_UShort PosCount; /* number of PosLookupRecord tables */
+ HB_UShort* Input; /* array of input glyph IDs */
+ HB_PosLookupRecord* PosLookupRecord;
+ /* array of PosLookupRecord tables */
+};
+
+typedef struct HB_PosRule_ HB_PosRule;
+
+
+struct HB_PosRuleSet_
+{
+ HB_UShort PosRuleCount; /* number of PosRule tables */
+ HB_PosRule* PosRule; /* array of PosRule tables */
+};
+
+typedef struct HB_PosRuleSet_ HB_PosRuleSet;
+
+
+struct HB_ContextPosFormat1_
+{
+ HB_Coverage Coverage; /* Coverage table */
+ HB_UShort PosRuleSetCount; /* number of PosRuleSet tables */
+ HB_PosRuleSet* PosRuleSet; /* array of PosRuleSet tables */
+};
+
+typedef struct HB_ContextPosFormat1_ HB_ContextPosFormat1;
+
+
+struct HB_PosClassRule_
+{
+ HB_UShort GlyphCount; /* total number of context classes */
+ HB_UShort PosCount; /* number of PosLookupRecord tables */
+ HB_UShort* Class; /* array of classes */
+ HB_PosLookupRecord* PosLookupRecord;
+ /* array of PosLookupRecord tables */
+};
+
+typedef struct HB_PosClassRule_ HB_PosClassRule;
+
+
+struct HB_PosClassSet_
+{
+ HB_UShort PosClassRuleCount;
+ /* number of PosClassRule tables */
+ HB_PosClassRule* PosClassRule; /* array of PosClassRule tables */
+};
+
+typedef struct HB_PosClassSet_ HB_PosClassSet;
+
+
+/* The `MaxContextLength' field is not defined in the TTO specification
+ but simplifies the implementation of this format. It holds the
+ maximal context length used in the context rules. */
+
+struct HB_ContextPosFormat2_
+{
+ HB_UShort MaxContextLength;
+ /* maximal context length */
+ HB_Coverage Coverage; /* Coverage table */
+ HB_ClassDefinition ClassDef; /* ClassDef table */
+ HB_UShort PosClassSetCount;
+ /* number of PosClassSet tables */
+ HB_PosClassSet* PosClassSet; /* array of PosClassSet tables */
+};
+
+typedef struct HB_ContextPosFormat2_ HB_ContextPosFormat2;
+
+
+struct HB_ContextPosFormat3_
+{
+ HB_UShort GlyphCount; /* number of input glyphs */
+ HB_UShort PosCount; /* number of PosLookupRecord tables */
+ HB_Coverage* Coverage; /* array of Coverage tables */
+ HB_PosLookupRecord* PosLookupRecord;
+ /* array of PosLookupRecord tables */
+};
+
+typedef struct HB_ContextPosFormat3_ HB_ContextPosFormat3;
+
+
+struct HB_ContextPos_
+{
+ HB_Byte PosFormat; /* 1, 2, or 3 */
+
+ union
+ {
+ HB_ContextPosFormat1 cpf1;
+ HB_ContextPosFormat2 cpf2;
+ HB_ContextPosFormat3 cpf3;
+ } cpf;
+};
+
+typedef struct HB_ContextPos_ HB_ContextPos;
+
+
+/* LookupType 8 */
+
+struct HB_ChainPosRule_
+{
+ HB_UShort* Backtrack; /* array of backtrack glyph IDs */
+ HB_UShort* Input; /* array of input glyph IDs */
+ HB_UShort* Lookahead; /* array of lookahead glyph IDs */
+ HB_PosLookupRecord* PosLookupRecord;
+ /* array of PosLookupRecords */
+ HB_UShort BacktrackGlyphCount;
+ /* total number of backtrack glyphs */
+ HB_UShort InputGlyphCount;
+ /* total number of input glyphs */
+ HB_UShort LookaheadGlyphCount;
+ /* total number of lookahead glyphs */
+ HB_UShort PosCount; /* number of PosLookupRecords */
+};
+
+typedef struct HB_ChainPosRule_ HB_ChainPosRule;
+
+
+struct HB_ChainPosRuleSet_
+{
+ HB_UShort ChainPosRuleCount;
+ /* number of ChainPosRule tables */
+ HB_ChainPosRule* ChainPosRule; /* array of ChainPosRule tables */
+};
+
+typedef struct HB_ChainPosRuleSet_ HB_ChainPosRuleSet;
+
+
+struct HB_ChainContextPosFormat1_
+{
+ HB_Coverage Coverage; /* Coverage table */
+ HB_UShort ChainPosRuleSetCount;
+ /* number of ChainPosRuleSet tables */
+ HB_ChainPosRuleSet* ChainPosRuleSet;
+ /* array of ChainPosRuleSet tables */
+};
+
+typedef struct HB_ChainContextPosFormat1_ HB_ChainContextPosFormat1;
+
+
+struct HB_ChainPosClassRule_
+{
+ HB_UShort* Backtrack; /* array of backtrack classes */
+ HB_UShort* Input; /* array of context classes */
+ HB_UShort* Lookahead; /* array of lookahead classes */
+ HB_PosLookupRecord* PosLookupRecord;
+ /* array of substitution lookups */
+ HB_UShort BacktrackGlyphCount;
+ /* total number of backtrack
+ classes */
+ HB_UShort InputGlyphCount;
+ /* total number of context classes */
+ HB_UShort LookaheadGlyphCount;
+ /* total number of lookahead
+ classes */
+ HB_UShort PosCount; /* number of PosLookupRecords */
+};
+
+typedef struct HB_ChainPosClassRule_ HB_ChainPosClassRule;
+
+
+struct HB_ChainPosClassSet_
+{
+ HB_UShort ChainPosClassRuleCount;
+ /* number of ChainPosClassRule
+ tables */
+ HB_ChainPosClassRule* ChainPosClassRule;
+ /* array of ChainPosClassRule
+ tables */
+};
+
+typedef struct HB_ChainPosClassSet_ HB_ChainPosClassSet;
+
+
+/* The `MaxXXXLength' fields are not defined in the TTO specification
+ but simplifies the implementation of this format. It holds the
+ maximal context length used in the specific context rules. */
+
+struct HB_ChainContextPosFormat2_
+{
+ HB_Coverage Coverage; /* Coverage table */
+
+ HB_UShort MaxBacktrackLength;
+ /* maximal backtrack length */
+ HB_ClassDefinition BacktrackClassDef;
+ /* BacktrackClassDef table */
+ HB_UShort MaxInputLength;
+ /* maximal input length */
+ HB_ClassDefinition InputClassDef;
+ /* InputClassDef table */
+ HB_UShort MaxLookaheadLength;
+ /* maximal lookahead length */
+ HB_ClassDefinition LookaheadClassDef;
+ /* LookaheadClassDef table */
+
+ HB_UShort ChainPosClassSetCount;
+ /* number of ChainPosClassSet
+ tables */
+ HB_ChainPosClassSet* ChainPosClassSet;
+ /* array of ChainPosClassSet
+ tables */
+};
+
+typedef struct HB_ChainContextPosFormat2_ HB_ChainContextPosFormat2;
+
+
+struct HB_ChainContextPosFormat3_
+{
+ HB_UShort BacktrackGlyphCount;
+ /* number of backtrack glyphs */
+ HB_Coverage* BacktrackCoverage;
+ /* array of backtrack Coverage
+ tables */
+ HB_UShort InputGlyphCount;
+ /* number of input glyphs */
+ HB_Coverage* InputCoverage;
+ /* array of input coverage
+ tables */
+ HB_UShort LookaheadGlyphCount;
+ /* number of lookahead glyphs */
+ HB_Coverage* LookaheadCoverage;
+ /* array of lookahead coverage
+ tables */
+ HB_UShort PosCount; /* number of PosLookupRecords */
+ HB_PosLookupRecord* PosLookupRecord;
+ /* array of substitution lookups */
+};
+
+typedef struct HB_ChainContextPosFormat3_ HB_ChainContextPosFormat3;
+
+
+struct HB_ChainContextPos_
+{
+ HB_Byte PosFormat; /* 1, 2, or 3 */
+
+ union
+ {
+ HB_ChainContextPosFormat1 ccpf1;
+ HB_ChainContextPosFormat2 ccpf2;
+ HB_ChainContextPosFormat3 ccpf3;
+ } ccpf;
+};
+
+typedef struct HB_ChainContextPos_ HB_ChainContextPos;
+
+
+#if 0
+/* LookupType 10 */
+struct HB_ExtensionPos_
+{
+ HB_UShort PosFormat; /* always 1 */
+ HB_UShort LookuptType; /* lookup-type of referenced subtable */
+ HB_GPOS_SubTable *subtable; /* referenced subtable */
+};
+
+typedef struct HB_ExtensionPos_ HB_ExtensionPos;
+#endif
+
+
+union HB_GPOS_SubTable_
+{
+ HB_SinglePos single;
+ HB_PairPos pair;
+ HB_CursivePos cursive;
+ HB_MarkBasePos markbase;
+ HB_MarkLigPos marklig;
+ HB_MarkMarkPos markmark;
+ HB_ContextPos context;
+ HB_ChainContextPos chain;
+};
+
+typedef union HB_GPOS_SubTable_ HB_GPOS_SubTable;
+
+
+
+HB_INTERNAL HB_Error
+_HB_GPOS_Load_SubTable( HB_GPOS_SubTable* st,
+ HB_Stream stream,
+ HB_UShort lookup_type );
+
+HB_INTERNAL void
+_HB_GPOS_Free_SubTable( HB_GPOS_SubTable* st,
+ HB_UShort lookup_type );
+
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(pop)
+#endif
+
+HB_END_HEADER
+
+#endif /* HARFBUZZ_GPOS_PRIVATE_H */
diff --git a/src/hb-old/harfbuzz-gpos.c b/src/hb-old/harfbuzz-gpos.c
new file mode 100644
index 0000000..e969a01
--- /dev/null
+++ b/src/hb-old/harfbuzz-gpos.c
@@ -0,0 +1,6094 @@
+/*
+ * Copyright (C) 1998-2004 David Turner and Werner Lemberg
+ * Copyright (C) 2006 Behdad Esfahbod
+ * Copyright (C) 2007 Red Hat, Inc.
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#include "harfbuzz-impl.h"
+#include "harfbuzz-gpos-private.h"
+#include "harfbuzz-open-private.h"
+#include "harfbuzz-gdef-private.h"
+#include "harfbuzz-shaper.h"
+
+struct GPOS_Instance_
+{
+ HB_GPOSHeader* gpos;
+ HB_Font font;
+ HB_Bool dvi;
+ HB_UShort load_flags; /* how the glyph should be loaded */
+ HB_Bool r2l;
+
+ HB_UShort last; /* the last valid glyph -- used
+ with cursive positioning */
+ HB_Fixed anchor_x; /* the coordinates of the anchor point */
+ HB_Fixed anchor_y; /* of the last valid glyph */
+};
+
+typedef struct GPOS_Instance_ GPOS_Instance;
+
+
+static HB_Error GPOS_Do_Glyph_Lookup( GPOS_Instance* gpi,
+ HB_UShort lookup_index,
+ HB_Buffer buffer,
+ HB_UShort context_length,
+ int nesting_level );
+
+
+
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+/* the client application must replace this with something more
+ meaningful if multiple master fonts are to be supported. */
+
+static HB_Error default_mmfunc( HB_Font font,
+ HB_UShort metric_id,
+ HB_Fixed* metric_value,
+ void* data )
+{
+ HB_UNUSED(font);
+ HB_UNUSED(metric_id);
+ HB_UNUSED(metric_value);
+ HB_UNUSED(data);
+ return ERR(HB_Err_Not_Covered); /* ERR() call intended */
+}
+#endif
+
+
+
+HB_Error HB_Load_GPOS_Table( HB_Stream stream,
+ HB_GPOSHeader** retptr,
+ HB_GDEFHeader* gdef,
+ HB_Stream gdefStream )
+{
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_GPOSHeader* gpos;
+
+ HB_Error error;
+
+
+ if ( !retptr )
+ return ERR(HB_Err_Invalid_Argument);
+
+ if ( GOTO_Table( TTAG_GPOS ) )
+ return error;
+
+ base_offset = FILE_Pos();
+
+ if ( ALLOC ( gpos, sizeof( *gpos ) ) )
+ return error;
+
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+ gpos->mmfunc = default_mmfunc;
+#endif
+
+ /* skip version */
+
+ if ( FILE_Seek( base_offset + 4L ) ||
+ ACCESS_Frame( 2L ) )
+ goto Fail4;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_ScriptList( &gpos->ScriptList,
+ stream ) ) != HB_Err_Ok )
+ goto Fail4;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail3;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_FeatureList( &gpos->FeatureList,
+ stream ) ) != HB_Err_Ok )
+ goto Fail3;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_LookupList( &gpos->LookupList,
+ stream, HB_Type_GPOS ) ) != HB_Err_Ok )
+ goto Fail2;
+
+ gpos->gdef = gdef; /* can be NULL */
+
+ if ( ( error = _HB_GDEF_LoadMarkAttachClassDef_From_LookupFlags( gdef, gdefStream,
+ gpos->LookupList.Lookup,
+ gpos->LookupList.LookupCount ) ) )
+ goto Fail1;
+
+ *retptr = gpos;
+
+ return HB_Err_Ok;
+
+Fail1:
+ _HB_OPEN_Free_LookupList( &gpos->LookupList, HB_Type_GPOS );
+
+Fail2:
+ _HB_OPEN_Free_FeatureList( &gpos->FeatureList );
+
+Fail3:
+ _HB_OPEN_Free_ScriptList( &gpos->ScriptList );
+
+Fail4:
+ FREE( gpos );
+
+ return error;
+}
+
+
+HB_Error HB_Done_GPOS_Table( HB_GPOSHeader* gpos )
+{
+ _HB_OPEN_Free_LookupList( &gpos->LookupList, HB_Type_GPOS );
+ _HB_OPEN_Free_FeatureList( &gpos->FeatureList );
+ _HB_OPEN_Free_ScriptList( &gpos->ScriptList );
+
+ FREE( gpos );
+
+ return HB_Err_Ok;
+}
+
+
+/*****************************
+ * SubTable related functions
+ *****************************/
+
+/* shared tables */
+
+/* ValueRecord */
+
+/* There is a subtle difference in the specs between a `table' and a
+ `record' -- offsets for device tables in ValueRecords are taken from
+ the parent table and not the parent record. */
+
+static HB_Error Load_ValueRecord( HB_ValueRecord* vr,
+ HB_UShort format,
+ HB_UInt base_offset,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UInt cur_offset, new_offset;
+
+
+ if ( format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ vr->XPlacement = GET_Short();
+
+ FORGET_Frame();
+ }
+ else
+ vr->XPlacement = 0;
+
+ if ( format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ vr->YPlacement = GET_Short();
+
+ FORGET_Frame();
+ }
+ else
+ vr->YPlacement = 0;
+
+ if ( format & HB_GPOS_FORMAT_HAVE_X_ADVANCE )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ vr->XAdvance = GET_Short();
+
+ FORGET_Frame();
+ }
+ else
+ vr->XAdvance = 0;
+
+ if ( format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ vr->YAdvance = GET_Short();
+
+ FORGET_Frame();
+ }
+ else
+ vr->YAdvance = 0;
+
+ if ( format & HB_GPOS_FORMAT_HAVE_DEVICE_TABLES )
+ {
+ if ( ALLOC_ARRAY( vr->DeviceTables, 4, HB_Device ) )
+ return error;
+ vr->DeviceTables[VR_X_ADVANCE_DEVICE] = 0;
+ vr->DeviceTables[VR_Y_ADVANCE_DEVICE] = 0;
+ vr->DeviceTables[VR_X_PLACEMENT_DEVICE] = 0;
+ vr->DeviceTables[VR_Y_PLACEMENT_DEVICE] = 0;
+ }
+ else
+ {
+ vr->DeviceTables = 0;
+ }
+
+ if ( format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT_DEVICE )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail4;
+
+ new_offset = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( new_offset )
+ {
+ new_offset += base_offset;
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[VR_X_PLACEMENT_DEVICE],
+ stream ) ) != HB_Err_Ok )
+ goto Fail4;
+ (void)FILE_Seek( cur_offset );
+ }
+ }
+
+ if ( format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT_DEVICE )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail3;
+
+ new_offset = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( new_offset )
+ {
+ new_offset += base_offset;
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[VR_Y_PLACEMENT_DEVICE],
+ stream ) ) != HB_Err_Ok )
+ goto Fail3;
+ (void)FILE_Seek( cur_offset );
+ }
+ }
+
+ if ( format & HB_GPOS_FORMAT_HAVE_X_ADVANCE_DEVICE )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ new_offset = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( new_offset )
+ {
+ new_offset += base_offset;
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[VR_X_ADVANCE_DEVICE],
+ stream ) ) != HB_Err_Ok )
+ goto Fail2;
+ (void)FILE_Seek( cur_offset );
+ }
+ }
+
+ if ( format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE_DEVICE )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+ new_offset = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( new_offset )
+ {
+ new_offset += base_offset;
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[VR_Y_ADVANCE_DEVICE],
+ stream ) ) != HB_Err_Ok )
+ goto Fail1;
+ (void)FILE_Seek( cur_offset );
+ }
+ }
+
+ if ( format & HB_GPOS_FORMAT_HAVE_X_ID_PLACEMENT )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+ vr->XIdPlacement = GET_UShort();
+#else
+ (void) GET_UShort();
+#endif
+
+ FORGET_Frame();
+ }
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+ else
+ vr->XIdPlacement = 0;
+#endif
+
+ if ( format & HB_GPOS_FORMAT_HAVE_Y_ID_PLACEMENT )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+ vr->YIdPlacement = GET_UShort();
+#else
+ (void) GET_UShort();
+#endif
+
+ FORGET_Frame();
+ }
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+ else
+ vr->YIdPlacement = 0;
+#endif
+
+ if ( format & HB_GPOS_FORMAT_HAVE_X_ID_ADVANCE )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+ vr->XIdAdvance = GET_UShort();
+#else
+ (void) GET_UShort();
+#endif
+
+ FORGET_Frame();
+ }
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+ else
+ vr->XIdAdvance = 0;
+#endif
+
+ if ( format & HB_GPOS_FORMAT_HAVE_Y_ID_ADVANCE )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+ vr->YIdAdvance = GET_UShort();
+#else
+ (void) GET_UShort();
+#endif
+
+ FORGET_Frame();
+ }
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+ else
+ vr->YIdAdvance = 0;
+#endif
+
+ return HB_Err_Ok;
+
+Fail1:
+ if ( vr->DeviceTables )
+ _HB_OPEN_Free_Device( vr->DeviceTables[VR_Y_ADVANCE_DEVICE] );
+
+Fail2:
+ if ( vr->DeviceTables )
+ _HB_OPEN_Free_Device( vr->DeviceTables[VR_X_ADVANCE_DEVICE] );
+
+Fail3:
+ if ( vr->DeviceTables )
+ _HB_OPEN_Free_Device( vr->DeviceTables[VR_Y_PLACEMENT_DEVICE] );
+
+Fail4:
+ FREE( vr->DeviceTables );
+ return error;
+}
+
+
+static void Free_ValueRecord( HB_ValueRecord* vr,
+ HB_UShort format )
+{
+ if ( format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE_DEVICE )
+ _HB_OPEN_Free_Device( vr->DeviceTables[VR_Y_ADVANCE_DEVICE] );
+ if ( format & HB_GPOS_FORMAT_HAVE_X_ADVANCE_DEVICE )
+ _HB_OPEN_Free_Device( vr->DeviceTables[VR_X_ADVANCE_DEVICE] );
+ if ( format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT_DEVICE )
+ _HB_OPEN_Free_Device( vr->DeviceTables[VR_Y_PLACEMENT_DEVICE] );
+ if ( format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT_DEVICE )
+ _HB_OPEN_Free_Device( vr->DeviceTables[VR_X_PLACEMENT_DEVICE] );
+ FREE( vr->DeviceTables );
+}
+
+
+static HB_Error Get_ValueRecord( GPOS_Instance* gpi,
+ HB_ValueRecord* vr,
+ HB_UShort format,
+ HB_Position gd )
+{
+ HB_Short pixel_value;
+ HB_Error error = HB_Err_Ok;
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+ HB_GPOSHeader* gpos = gpi->gpos;
+ HB_Fixed value;
+#endif
+
+ HB_UShort x_ppem, y_ppem;
+ HB_16Dot16 x_scale, y_scale;
+
+
+ if ( !format )
+ return HB_Err_Ok;
+
+ x_ppem = gpi->font->x_ppem;
+ y_ppem = gpi->font->y_ppem;
+ x_scale = gpi->font->x_scale;
+ y_scale = gpi->font->y_scale;
+
+ /* design units -> fractional pixel */
+
+ if ( format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT )
+ gd->x_pos += x_scale * vr->XPlacement / 0x10000;
+ if ( format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT )
+ gd->y_pos += y_scale * vr->YPlacement / 0x10000;
+ if ( format & HB_GPOS_FORMAT_HAVE_X_ADVANCE )
+ gd->x_advance += x_scale * vr->XAdvance / 0x10000;
+ if ( format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE )
+ gd->y_advance += y_scale * vr->YAdvance / 0x10000;
+
+ if ( !gpi->dvi )
+ {
+ /* pixel -> fractional pixel */
+
+ if ( format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT_DEVICE )
+ {
+ _HB_OPEN_Get_Device( vr->DeviceTables[VR_X_PLACEMENT_DEVICE], x_ppem, &pixel_value );
+ gd->x_pos += pixel_value << 6;
+ }
+ if ( format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT_DEVICE )
+ {
+ _HB_OPEN_Get_Device( vr->DeviceTables[VR_Y_PLACEMENT_DEVICE], y_ppem, &pixel_value );
+ gd->y_pos += pixel_value << 6;
+ }
+ if ( format & HB_GPOS_FORMAT_HAVE_X_ADVANCE_DEVICE )
+ {
+ _HB_OPEN_Get_Device( vr->DeviceTables[VR_X_ADVANCE_DEVICE], x_ppem, &pixel_value );
+ gd->x_advance += pixel_value << 6;
+ }
+ if ( format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE_DEVICE )
+ {
+ _HB_OPEN_Get_Device( vr->DeviceTables[VR_Y_ADVANCE_DEVICE], y_ppem, &pixel_value );
+ gd->y_advance += pixel_value << 6;
+ }
+ }
+
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+ /* values returned from mmfunc() are already in fractional pixels */
+
+ if ( format & HB_GPOS_FORMAT_HAVE_X_ID_PLACEMENT )
+ {
+ error = (gpos->mmfunc)( gpi->font, vr->XIdPlacement,
+ &value, gpos->data );
+ if ( error )
+ return error;
+ gd->x_pos += value;
+ }
+ if ( format & HB_GPOS_FORMAT_HAVE_Y_ID_PLACEMENT )
+ {
+ error = (gpos->mmfunc)( gpi->font, vr->YIdPlacement,
+ &value, gpos->data );
+ if ( error )
+ return error;
+ gd->y_pos += value;
+ }
+ if ( format & HB_GPOS_FORMAT_HAVE_X_ID_ADVANCE )
+ {
+ error = (gpos->mmfunc)( gpi->font, vr->XIdAdvance,
+ &value, gpos->data );
+ if ( error )
+ return error;
+ gd->x_advance += value;
+ }
+ if ( format & HB_GPOS_FORMAT_HAVE_Y_ID_ADVANCE )
+ {
+ error = (gpos->mmfunc)( gpi->font, vr->YIdAdvance,
+ &value, gpos->data );
+ if ( error )
+ return error;
+ gd->y_advance += value;
+ }
+#endif
+
+ return error;
+}
+
+
+/* AnchorFormat1 */
+/* AnchorFormat2 */
+/* AnchorFormat3 */
+/* AnchorFormat4 */
+
+static HB_Error Load_Anchor( HB_Anchor* an,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UInt cur_offset, new_offset, base_offset;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ an->PosFormat = GET_UShort();
+
+ FORGET_Frame();
+
+ switch ( an->PosFormat )
+ {
+ case 1:
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+ an->af.af1.XCoordinate = GET_Short();
+ an->af.af1.YCoordinate = GET_Short();
+
+ FORGET_Frame();
+ break;
+
+ case 2:
+ if ( ACCESS_Frame( 6L ) )
+ return error;
+
+ an->af.af2.XCoordinate = GET_Short();
+ an->af.af2.YCoordinate = GET_Short();
+ an->af.af2.AnchorPoint = GET_UShort();
+
+ FORGET_Frame();
+ break;
+
+ case 3:
+ if ( ACCESS_Frame( 6L ) )
+ return error;
+
+ an->af.af3.XCoordinate = GET_Short();
+ an->af.af3.YCoordinate = GET_Short();
+
+ new_offset = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( new_offset )
+ {
+ if ( ALLOC_ARRAY( an->af.af3.DeviceTables, 2, HB_Device ) )
+ return error;
+
+ an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE] = 0;
+ an->af.af3.DeviceTables[AF3_Y_DEVICE_TABLE] = 0;
+
+ new_offset += base_offset;
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Device( &an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE],
+ stream ) ) != HB_Err_Ok )
+ goto Fail2;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail;
+
+ new_offset = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( new_offset )
+ {
+ if ( !an->af.af3.DeviceTables )
+ {
+ if ( ALLOC_ARRAY( an->af.af3.DeviceTables, 2, HB_Device ) )
+ return error;
+
+ an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE] = 0;
+ an->af.af3.DeviceTables[AF3_Y_DEVICE_TABLE] = 0;
+ }
+
+ new_offset += base_offset;
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Device( &an->af.af3.DeviceTables[AF3_Y_DEVICE_TABLE],
+ stream ) ) != HB_Err_Ok )
+ goto Fail;
+ (void)FILE_Seek( cur_offset );
+ }
+ break;
+
+ case 4:
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+ an->af.af4.XIdAnchor = GET_UShort();
+ an->af.af4.YIdAnchor = GET_UShort();
+#else
+ (void) GET_UShort();
+ (void) GET_UShort();
+#endif
+
+ FORGET_Frame();
+ break;
+
+ default:
+ return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ if ( an->af.af3.DeviceTables )
+ _HB_OPEN_Free_Device( an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE] );
+
+Fail2:
+ FREE( an->af.af3.DeviceTables );
+ return error;
+}
+
+
+static void Free_Anchor( HB_Anchor* an)
+{
+ if ( an->PosFormat == 3 && an->af.af3.DeviceTables )
+ {
+ _HB_OPEN_Free_Device( an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE] );
+ _HB_OPEN_Free_Device( an->af.af3.DeviceTables[AF3_Y_DEVICE_TABLE] );
+ FREE( an->af.af3.DeviceTables );
+ }
+}
+
+
+static HB_Error Get_Anchor( GPOS_Instance* gpi,
+ HB_Anchor* an,
+ HB_UShort glyph_index,
+ HB_Fixed* x_value,
+ HB_Fixed* y_value )
+{
+ HB_Error error = HB_Err_Ok;
+
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+ HB_GPOSHeader* gpos = gpi->gpos;
+#endif
+ HB_UShort ap;
+
+ HB_Short pixel_value;
+
+ HB_UShort x_ppem, y_ppem;
+ HB_16Dot16 x_scale, y_scale;
+
+
+ x_ppem = gpi->font->x_ppem;
+ y_ppem = gpi->font->y_ppem;
+ x_scale = gpi->font->x_scale;
+ y_scale = gpi->font->y_scale;
+
+ switch ( an->PosFormat )
+ {
+ case 0:
+ /* The special case of an empty AnchorTable */
+ default:
+
+ return HB_Err_Not_Covered;
+
+ case 1:
+ *x_value = x_scale * an->af.af1.XCoordinate / 0x10000;
+ *y_value = y_scale * an->af.af1.YCoordinate / 0x10000;
+ break;
+
+ case 2:
+ if ( !gpi->dvi )
+ {
+ hb_uint32 n_points = 0;
+ ap = an->af.af2.AnchorPoint;
+ if (!gpi->font->klass->getPointInOutline)
+ goto no_contour_point;
+ error = gpi->font->klass->getPointInOutline(gpi->font, glyph_index, gpi->load_flags, ap, x_value, y_value, &n_points);
+ if (error)
+ return error;
+ /* if n_points is set to zero, we use the design coordinate value pair.
+ * This can happen e.g. for sbit glyphs. */
+ if (!n_points)
+ goto no_contour_point;
+ }
+ else
+ {
+ no_contour_point:
+ *x_value = x_scale * an->af.af3.XCoordinate / 0x10000;
+ *y_value = y_scale * an->af.af3.YCoordinate / 0x10000;
+ }
+ break;
+
+ case 3:
+ if ( !gpi->dvi )
+ {
+ _HB_OPEN_Get_Device( an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE], x_ppem, &pixel_value );
+ *x_value = pixel_value << 6;
+ _HB_OPEN_Get_Device( an->af.af3.DeviceTables[AF3_Y_DEVICE_TABLE], y_ppem, &pixel_value );
+ *y_value = pixel_value << 6;
+ }
+ else
+ *x_value = *y_value = 0;
+
+ *x_value += x_scale * an->af.af3.XCoordinate / 0x10000;
+ *y_value += y_scale * an->af.af3.YCoordinate / 0x10000;
+ break;
+
+ case 4:
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+ error = (gpos->mmfunc)( gpi->font, an->af.af4.XIdAnchor,
+ x_value, gpos->data );
+ if ( error )
+ return error;
+
+ error = (gpos->mmfunc)( gpi->font, an->af.af4.YIdAnchor,
+ y_value, gpos->data );
+ if ( error )
+ return error;
+ break;
+#else
+ return ERR(HB_Err_Not_Covered);
+#endif
+ }
+
+ return error;
+}
+
+
+/* MarkArray */
+
+static HB_Error Load_MarkArray ( HB_MarkArray* ma,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_MarkRecord* mr;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = ma->MarkCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ma->MarkRecord = NULL;
+
+ if ( ALLOC_ARRAY( ma->MarkRecord, count, HB_MarkRecord ) )
+ return error;
+
+ mr = ma->MarkRecord;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 4L ) )
+ goto Fail;
+
+ mr[n].Class = GET_UShort();
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_Anchor( &mr[n].MarkAnchor, stream ) ) != HB_Err_Ok )
+ goto Fail;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ for ( m = 0; m < n; m++ )
+ Free_Anchor( &mr[m].MarkAnchor );
+
+ FREE( mr );
+ return error;
+}
+
+
+static void Free_MarkArray( HB_MarkArray* ma )
+{
+ HB_UShort n, count;
+
+ HB_MarkRecord* mr;
+
+
+ if ( ma->MarkRecord )
+ {
+ count = ma->MarkCount;
+ mr = ma->MarkRecord;
+
+ for ( n = 0; n < count; n++ )
+ Free_Anchor( &mr[n].MarkAnchor );
+
+ FREE( mr );
+ }
+}
+
+
+/* LookupType 1 */
+
+/* SinglePosFormat1 */
+/* SinglePosFormat2 */
+
+static HB_Error Load_SinglePos( HB_GPOS_SubTable* st,
+ HB_Stream stream )
+{
+ HB_Error error;
+ HB_SinglePos* sp = &st->single;
+
+ HB_UShort n, m, count, format;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_ValueRecord* vr;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 6L ) )
+ return error;
+
+ sp->PosFormat = GET_UShort();
+ new_offset = GET_UShort() + base_offset;
+
+ format = sp->ValueFormat = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( !format )
+ return ERR(HB_Err_Invalid_SubTable);
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &sp->Coverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ switch ( sp->PosFormat )
+ {
+ case 1:
+ error = Load_ValueRecord( &sp->spf.spf1.Value, format,
+ base_offset, stream );
+ if ( error )
+ goto Fail2;
+ break;
+
+ case 2:
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ count = sp->spf.spf2.ValueCount = GET_UShort();
+
+ FORGET_Frame();
+
+ sp->spf.spf2.Value = NULL;
+
+ if ( ALLOC_ARRAY( sp->spf.spf2.Value, count, HB_ValueRecord ) )
+ goto Fail2;
+
+ vr = sp->spf.spf2.Value;
+
+ for ( n = 0; n < count; n++ )
+ {
+ error = Load_ValueRecord( &vr[n], format, base_offset, stream );
+ if ( error )
+ goto Fail1;
+ }
+ break;
+
+ default:
+ return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+
+ return HB_Err_Ok;
+
+Fail1:
+ for ( m = 0; m < n; m++ )
+ Free_ValueRecord( &vr[m], format );
+
+ FREE( vr );
+
+Fail2:
+ _HB_OPEN_Free_Coverage( &sp->Coverage );
+ return error;
+}
+
+
+static void Free_SinglePos( HB_GPOS_SubTable* st )
+{
+ HB_UShort n, count, format;
+ HB_SinglePos* sp = &st->single;
+
+ HB_ValueRecord* v;
+
+
+ format = sp->ValueFormat;
+
+ switch ( sp->PosFormat )
+ {
+ case 1:
+ Free_ValueRecord( &sp->spf.spf1.Value, format );
+ break;
+
+ case 2:
+ if ( sp->spf.spf2.Value )
+ {
+ count = sp->spf.spf2.ValueCount;
+ v = sp->spf.spf2.Value;
+
+ for ( n = 0; n < count; n++ )
+ Free_ValueRecord( &v[n], format );
+
+ FREE( v );
+ }
+ break;
+ default:
+ break;
+ }
+
+ _HB_OPEN_Free_Coverage( &sp->Coverage );
+}
+
+static HB_Error Lookup_SinglePos( GPOS_Instance* gpi,
+ HB_GPOS_SubTable* st,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_UShort index, property;
+ HB_Error error;
+ HB_GPOSHeader* gpos = gpi->gpos;
+ HB_SinglePos* sp = &st->single;
+
+ HB_UNUSED(nesting_level);
+
+ if ( context_length != 0xFFFF && context_length < 1 )
+ return HB_Err_Not_Covered;
+
+ if ( CHECK_Property( gpos->gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ error = _HB_OPEN_Coverage_Index( &sp->Coverage, IN_CURGLYPH(), &index );
+ if ( error )
+ return error;
+
+ switch ( sp->PosFormat )
+ {
+ case 1:
+ error = Get_ValueRecord( gpi, &sp->spf.spf1.Value,
+ sp->ValueFormat, POSITION( buffer->in_pos ) );
+ if ( error )
+ return error;
+ break;
+
+ case 2:
+ if ( index >= sp->spf.spf2.ValueCount )
+ return ERR(HB_Err_Invalid_SubTable);
+ error = Get_ValueRecord( gpi, &sp->spf.spf2.Value[index],
+ sp->ValueFormat, POSITION( buffer->in_pos ) );
+ if ( error )
+ return error;
+ break;
+
+ default:
+ return ERR(HB_Err_Invalid_SubTable);
+ }
+
+ (buffer->in_pos)++;
+
+ return HB_Err_Ok;
+}
+
+
+/* LookupType 2 */
+
+/* PairSet */
+
+static HB_Error Load_PairSet ( HB_PairSet* ps,
+ HB_UShort format1,
+ HB_UShort format2,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, m, count;
+ HB_UInt base_offset;
+
+ HB_PairValueRecord* pvr;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = ps->PairValueCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ps->PairValueRecord = NULL;
+
+ if ( ALLOC_ARRAY( ps->PairValueRecord, count, HB_PairValueRecord ) )
+ return error;
+
+ pvr = ps->PairValueRecord;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail;
+
+ pvr[n].SecondGlyph = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( format1 )
+ {
+ error = Load_ValueRecord( &pvr[n].Value1, format1,
+ base_offset, stream );
+ if ( error )
+ goto Fail;
+ }
+ if ( format2 )
+ {
+ error = Load_ValueRecord( &pvr[n].Value2, format2,
+ base_offset, stream );
+ if ( error )
+ {
+ if ( format1 )
+ Free_ValueRecord( &pvr[n].Value1, format1 );
+ goto Fail;
+ }
+ }
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ for ( m = 0; m < n; m++ )
+ {
+ if ( format1 )
+ Free_ValueRecord( &pvr[m].Value1, format1 );
+ if ( format2 )
+ Free_ValueRecord( &pvr[m].Value2, format2 );
+ }
+
+ FREE( pvr );
+ return error;
+}
+
+
+static void Free_PairSet( HB_PairSet* ps,
+ HB_UShort format1,
+ HB_UShort format2 )
+{
+ HB_UShort n, count;
+
+ HB_PairValueRecord* pvr;
+
+
+ if ( ps->PairValueRecord )
+ {
+ count = ps->PairValueCount;
+ pvr = ps->PairValueRecord;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( format1 )
+ Free_ValueRecord( &pvr[n].Value1, format1 );
+ if ( format2 )
+ Free_ValueRecord( &pvr[n].Value2, format2 );
+ }
+
+ FREE( pvr );
+ }
+}
+
+
+/* PairPosFormat1 */
+
+static HB_Error Load_PairPos1( HB_PairPosFormat1* ppf1,
+ HB_UShort format1,
+ HB_UShort format2,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_PairSet* ps;
+
+
+ base_offset = FILE_Pos() - 8L;
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = ppf1->PairSetCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ppf1->PairSet = NULL;
+
+ if ( ALLOC_ARRAY( ppf1->PairSet, count, HB_PairSet ) )
+ return error;
+
+ ps = ppf1->PairSet;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_PairSet( &ps[n], format1,
+ format2, stream ) ) != HB_Err_Ok )
+ goto Fail;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ for ( m = 0; m < n; m++ )
+ Free_PairSet( &ps[m], format1, format2 );
+
+ FREE( ps );
+ return error;
+}
+
+
+static void Free_PairPos1( HB_PairPosFormat1* ppf1,
+ HB_UShort format1,
+ HB_UShort format2 )
+{
+ HB_UShort n, count;
+
+ HB_PairSet* ps;
+
+
+ if ( ppf1->PairSet )
+ {
+ count = ppf1->PairSetCount;
+ ps = ppf1->PairSet;
+
+ for ( n = 0; n < count; n++ )
+ Free_PairSet( &ps[n], format1, format2 );
+
+ FREE( ps );
+ }
+}
+
+
+/* PairPosFormat2 */
+
+static HB_Error Load_PairPos2( HB_PairPosFormat2* ppf2,
+ HB_UShort format1,
+ HB_UShort format2,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort m, n, k, count1, count2;
+ HB_UInt cur_offset, new_offset1, new_offset2, base_offset;
+
+ HB_Class1Record* c1r;
+ HB_Class2Record* c2r;
+
+
+ base_offset = FILE_Pos() - 8L;
+
+ if ( ACCESS_Frame( 8L ) )
+ return error;
+
+ new_offset1 = GET_UShort() + base_offset;
+ new_offset2 = GET_UShort() + base_offset;
+
+ /* `Class1Count' and `Class2Count' are the upper limits for class
+ values, thus we read it now to make additional safety checks. */
+
+ count1 = ppf2->Class1Count = GET_UShort();
+ count2 = ppf2->Class2Count = GET_UShort();
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset1 ) ||
+ ( error = _HB_OPEN_Load_ClassDefinition( &ppf2->ClassDef1, count1,
+ stream ) ) != HB_Err_Ok )
+ return error;
+ if ( FILE_Seek( new_offset2 ) ||
+ ( error = _HB_OPEN_Load_ClassDefinition( &ppf2->ClassDef2, count2,
+ stream ) ) != HB_Err_Ok )
+ goto Fail3;
+ (void)FILE_Seek( cur_offset );
+
+ ppf2->Class1Record = NULL;
+
+ if ( ALLOC_ARRAY( ppf2->Class1Record, count1, HB_Class1Record ) )
+ goto Fail2;
+
+ c1r = ppf2->Class1Record;
+
+ for ( m = 0; m < count1; m++ )
+ {
+ c1r[m].Class2Record = NULL;
+
+ if ( ALLOC_ARRAY( c1r[m].Class2Record, count2, HB_Class2Record ) )
+ goto Fail1;
+
+ c2r = c1r[m].Class2Record;
+
+ for ( n = 0; n < count2; n++ )
+ {
+ if ( format1 )
+ {
+ error = Load_ValueRecord( &c2r[n].Value1, format1,
+ base_offset, stream );
+ if ( error )
+ goto Fail0;
+ }
+ if ( format2 )
+ {
+ error = Load_ValueRecord( &c2r[n].Value2, format2,
+ base_offset, stream );
+ if ( error )
+ {
+ if ( format1 )
+ Free_ValueRecord( &c2r[n].Value1, format1 );
+ goto Fail0;
+ }
+ }
+ }
+
+ continue;
+
+ Fail0:
+ for ( k = 0; k < n; k++ )
+ {
+ if ( format1 )
+ Free_ValueRecord( &c2r[k].Value1, format1 );
+ if ( format2 )
+ Free_ValueRecord( &c2r[k].Value2, format2 );
+ }
+ goto Fail1;
+ }
+
+ return HB_Err_Ok;
+
+Fail1:
+ for ( k = 0; k < m; k++ )
+ {
+ c2r = c1r[k].Class2Record;
+
+ for ( n = 0; n < count2; n++ )
+ {
+ if ( format1 )
+ Free_ValueRecord( &c2r[n].Value1, format1 );
+ if ( format2 )
+ Free_ValueRecord( &c2r[n].Value2, format2 );
+ }
+
+ FREE( c2r );
+ }
+
+ FREE( c1r );
+Fail2:
+
+ _HB_OPEN_Free_ClassDefinition( &ppf2->ClassDef2 );
+
+Fail3:
+ _HB_OPEN_Free_ClassDefinition( &ppf2->ClassDef1 );
+ return error;
+}
+
+
+static void Free_PairPos2( HB_PairPosFormat2* ppf2,
+ HB_UShort format1,
+ HB_UShort format2)
+{
+ HB_UShort m, n, count1, count2;
+
+ HB_Class1Record* c1r;
+ HB_Class2Record* c2r;
+
+
+ if ( ppf2->Class1Record )
+ {
+ c1r = ppf2->Class1Record;
+ count1 = ppf2->Class1Count;
+ count2 = ppf2->Class2Count;
+
+ for ( m = 0; m < count1; m++ )
+ {
+ c2r = c1r[m].Class2Record;
+
+ for ( n = 0; n < count2; n++ )
+ {
+ if ( format1 )
+ Free_ValueRecord( &c2r[n].Value1, format1 );
+ if ( format2 )
+ Free_ValueRecord( &c2r[n].Value2, format2 );
+ }
+
+ FREE( c2r );
+ }
+
+ FREE( c1r );
+
+ _HB_OPEN_Free_ClassDefinition( &ppf2->ClassDef2 );
+ _HB_OPEN_Free_ClassDefinition( &ppf2->ClassDef1 );
+ }
+}
+
+
+static HB_Error Load_PairPos( HB_GPOS_SubTable* st,
+ HB_Stream stream )
+{
+ HB_Error error;
+ HB_PairPos* pp = &st->pair;
+
+ HB_UShort format1, format2;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 8L ) )
+ return error;
+
+ pp->PosFormat = GET_UShort();
+ new_offset = GET_UShort() + base_offset;
+
+ format1 = pp->ValueFormat1 = GET_UShort();
+ format2 = pp->ValueFormat2 = GET_UShort();
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &pp->Coverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ switch ( pp->PosFormat )
+ {
+ case 1:
+ error = Load_PairPos1( &pp->ppf.ppf1, format1, format2, stream );
+ if ( error )
+ goto Fail;
+ break;
+
+ case 2:
+ error = Load_PairPos2( &pp->ppf.ppf2, format1, format2, stream );
+ if ( error )
+ goto Fail;
+ break;
+
+ default:
+ return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ _HB_OPEN_Free_Coverage( &pp->Coverage );
+ return error;
+}
+
+
+static void Free_PairPos( HB_GPOS_SubTable* st )
+{
+ HB_UShort format1, format2;
+ HB_PairPos* pp = &st->pair;
+
+
+ format1 = pp->ValueFormat1;
+ format2 = pp->ValueFormat2;
+
+ switch ( pp->PosFormat )
+ {
+ case 1:
+ Free_PairPos1( &pp->ppf.ppf1, format1, format2 );
+ break;
+
+ case 2:
+ Free_PairPos2( &pp->ppf.ppf2, format1, format2 );
+ break;
+
+ default:
+ break;
+ }
+
+ _HB_OPEN_Free_Coverage( &pp->Coverage );
+}
+
+
+static HB_Error Lookup_PairPos1( GPOS_Instance* gpi,
+ HB_PairPosFormat1* ppf1,
+ HB_Buffer buffer,
+ HB_UInt first_pos,
+ HB_UShort index,
+ HB_UShort format1,
+ HB_UShort format2 )
+{
+ HB_Error error;
+ HB_UShort numpvr, glyph2;
+
+ HB_PairValueRecord* pvr;
+
+
+ if ( index >= ppf1->PairSetCount )
+ return ERR(HB_Err_Invalid_SubTable);
+
+ pvr = ppf1->PairSet[index].PairValueRecord;
+ if ( !pvr )
+ return ERR(HB_Err_Invalid_SubTable);
+
+ glyph2 = IN_CURGLYPH();
+
+ for ( numpvr = ppf1->PairSet[index].PairValueCount;
+ numpvr;
+ numpvr--, pvr++ )
+ {
+ if ( glyph2 == pvr->SecondGlyph )
+ {
+ error = Get_ValueRecord( gpi, &pvr->Value1, format1,
+ POSITION( first_pos ) );
+ if ( error )
+ return error;
+ return Get_ValueRecord( gpi, &pvr->Value2, format2,
+ POSITION( buffer->in_pos ) );
+ }
+ }
+
+ return HB_Err_Not_Covered;
+}
+
+
+static HB_Error Lookup_PairPos2( GPOS_Instance* gpi,
+ HB_PairPosFormat2* ppf2,
+ HB_Buffer buffer,
+ HB_UInt first_pos,
+ HB_UShort format1,
+ HB_UShort format2 )
+{
+ HB_Error error;
+ HB_UShort cl1 = 0, cl2 = 0; /* shut compiler up */
+
+ HB_Class1Record* c1r;
+ HB_Class2Record* c2r;
+
+
+ error = _HB_OPEN_Get_Class( &ppf2->ClassDef1, IN_GLYPH( first_pos ),
+ &cl1, NULL );
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+ error = _HB_OPEN_Get_Class( &ppf2->ClassDef2, IN_CURGLYPH(),
+ &cl2, NULL );
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ c1r = &ppf2->Class1Record[cl1];
+ if ( !c1r )
+ return ERR(HB_Err_Invalid_SubTable);
+ c2r = &c1r->Class2Record[cl2];
+
+ error = Get_ValueRecord( gpi, &c2r->Value1, format1, POSITION( first_pos ) );
+ if ( error )
+ return error;
+ return Get_ValueRecord( gpi, &c2r->Value2, format2, POSITION( buffer->in_pos ) );
+}
+
+
+static HB_Error Lookup_PairPos( GPOS_Instance* gpi,
+ HB_GPOS_SubTable* st,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_Error error;
+ HB_UShort index, property;
+ HB_UInt first_pos;
+ HB_GPOSHeader* gpos = gpi->gpos;
+ HB_PairPos* pp = &st->pair;
+
+ HB_UNUSED(nesting_level);
+
+ if ( buffer->in_pos >= buffer->in_length - 1 )
+ return HB_Err_Not_Covered; /* Not enough glyphs in stream */
+
+ if ( context_length != 0xFFFF && context_length < 2 )
+ return HB_Err_Not_Covered;
+
+ if ( CHECK_Property( gpos->gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ error = _HB_OPEN_Coverage_Index( &pp->Coverage, IN_CURGLYPH(), &index );
+ if ( error )
+ return error;
+
+ /* second glyph */
+
+ first_pos = buffer->in_pos;
+ (buffer->in_pos)++;
+
+ while ( CHECK_Property( gpos->gdef, IN_CURITEM(),
+ flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( buffer->in_pos == buffer->in_length )
+ {
+ buffer->in_pos = first_pos;
+ return HB_Err_Not_Covered;
+ }
+ (buffer->in_pos)++;
+
+ }
+
+ switch ( pp->PosFormat )
+ {
+ case 1:
+ error = Lookup_PairPos1( gpi, &pp->ppf.ppf1, buffer,
+ first_pos, index,
+ pp->ValueFormat1, pp->ValueFormat2 );
+ break;
+
+ case 2:
+ error = Lookup_PairPos2( gpi, &pp->ppf.ppf2, buffer, first_pos,
+ pp->ValueFormat1, pp->ValueFormat2 );
+ break;
+
+ default:
+ return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+
+ /* if we don't have coverage for the second glyph don't skip it for
+ further lookups but reset in_pos back to the first_glyph and let
+ the caller in Do_String_Lookup increment in_pos */
+ if ( error == HB_Err_Not_Covered )
+ buffer->in_pos = first_pos;
+
+ /* adjusting the `next' glyph */
+
+ if ( pp->ValueFormat2 )
+ (buffer->in_pos)++;
+
+ return error;
+}
+
+
+/* LookupType 3 */
+
+/* CursivePosFormat1 */
+
+static HB_Error Load_CursivePos( HB_GPOS_SubTable* st,
+ HB_Stream stream )
+{
+ HB_Error error;
+ HB_CursivePos* cp = &st->cursive;
+
+ HB_UShort n, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_EntryExitRecord* eer;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+ cp->PosFormat = GET_UShort();
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &cp->Coverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ count = cp->EntryExitCount = GET_UShort();
+
+ FORGET_Frame();
+
+ cp->EntryExitRecord = NULL;
+
+ if ( ALLOC_ARRAY( cp->EntryExitRecord, count, HB_EntryExitRecord ) )
+ goto Fail2;
+
+ eer = cp->EntryExitRecord;
+
+ for ( n = 0; n < count; n++ )
+ {
+ HB_UInt entry_offset;
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ entry_offset = new_offset = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( new_offset )
+ {
+ new_offset += base_offset;
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_Anchor( &eer[n].EntryAnchor,
+ stream ) ) != HB_Err_Ok )
+ goto Fail1;
+ (void)FILE_Seek( cur_offset );
+ }
+ else
+ eer[n].EntryAnchor.PosFormat = 0;
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ new_offset = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( new_offset )
+ {
+ new_offset += base_offset;
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_Anchor( &eer[n].ExitAnchor,
+ stream ) ) != HB_Err_Ok )
+ {
+ if ( entry_offset )
+ Free_Anchor( &eer[n].EntryAnchor );
+ goto Fail1;
+ }
+ (void)FILE_Seek( cur_offset );
+ }
+ else
+ eer[n].ExitAnchor.PosFormat = 0;
+ }
+
+ return HB_Err_Ok;
+
+Fail1:
+ for ( m = 0; m < n; m++ )
+ {
+ Free_Anchor( &eer[m].EntryAnchor );
+ Free_Anchor( &eer[m].ExitAnchor );
+ }
+
+ FREE( eer );
+
+Fail2:
+ _HB_OPEN_Free_Coverage( &cp->Coverage );
+ return error;
+}
+
+
+static void Free_CursivePos( HB_GPOS_SubTable* st )
+{
+ HB_UShort n, count;
+ HB_CursivePos* cp = &st->cursive;
+
+ HB_EntryExitRecord* eer;
+
+
+ if ( cp->EntryExitRecord )
+ {
+ count = cp->EntryExitCount;
+ eer = cp->EntryExitRecord;
+
+ for ( n = 0; n < count; n++ )
+ {
+ Free_Anchor( &eer[n].EntryAnchor );
+ Free_Anchor( &eer[n].ExitAnchor );
+ }
+
+ FREE( eer );
+ }
+
+ _HB_OPEN_Free_Coverage( &cp->Coverage );
+}
+
+
+static HB_Error Lookup_CursivePos( GPOS_Instance* gpi,
+ HB_GPOS_SubTable* st,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_UShort index, property;
+ HB_Error error;
+ HB_GPOSHeader* gpos = gpi->gpos;
+ HB_CursivePos* cp = &st->cursive;
+
+ HB_EntryExitRecord* eer;
+ HB_Fixed entry_x, entry_y;
+ HB_Fixed exit_x, exit_y;
+
+ HB_UNUSED(nesting_level);
+
+ if ( context_length != 0xFFFF && context_length < 1 )
+ {
+ gpi->last = 0xFFFF;
+ return HB_Err_Not_Covered;
+ }
+
+ /* Glyphs not having the right GDEF properties will be ignored, i.e.,
+ gpi->last won't be reset (contrary to user defined properties). */
+
+ if ( CHECK_Property( gpos->gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ /* We don't handle mark glyphs here. According to Andrei, this isn't
+ possible, but who knows... */
+
+ if ( property == HB_GDEF_MARK )
+ {
+ gpi->last = 0xFFFF;
+ return HB_Err_Not_Covered;
+ }
+
+ error = _HB_OPEN_Coverage_Index( &cp->Coverage, IN_CURGLYPH(), &index );
+ if ( error )
+ {
+ gpi->last = 0xFFFF;
+ return error;
+ }
+
+ if ( index >= cp->EntryExitCount )
+ return ERR(HB_Err_Invalid_SubTable);
+
+ eer = &cp->EntryExitRecord[index];
+
+ /* Now comes the messiest part of the whole OpenType
+ specification. At first glance, cursive connections seem easy
+ to understand, but there are pitfalls! The reason is that
+ the specs don't mention how to compute the advance values
+ resp. glyph offsets. I was told it would be an omission, to
+ be fixed in the next OpenType version... Again many thanks to
+ Andrei Burago <andreib@microsoft.com> for clarifications.
+
+ Consider the following example:
+
+ | xadv1 |
+ +---------+
+ | |
+ +-----+--+ 1 |
+ | | .| |
+ | 0+--+------+
+ | 2 |
+ | |
+ 0+--------+
+ | xadv2 |
+
+ glyph1: advance width = 12
+ anchor point = (3,1)
+
+ glyph2: advance width = 11
+ anchor point = (9,4)
+
+ LSB is 1 for both glyphs (so the boxes drawn above are glyph
+ bboxes). Writing direction is R2L; `0' denotes the glyph's
+ coordinate origin.
+
+ Now the surprising part: The advance width of the *left* glyph
+ (resp. of the *bottom* glyph) will be modified, no matter
+ whether the writing direction is L2R or R2L (resp. T2B or
+ B2T)! This assymetry is caused by the fact that the glyph's
+ coordinate origin is always the lower left corner for all
+ writing directions.
+
+ Continuing the above example, we can compute the new
+ (horizontal) advance width of glyph2 as
+
+ 9 - 3 = 6 ,
+
+ and the new vertical offset of glyph2 as
+
+ 1 - 4 = -3 .
+
+
+ Vertical writing direction is far more complicated:
+
+ a) Assuming that we recompute the advance height of the lower glyph:
+
+ --
+ +---------+
+ -- | |
+ +-----+--+ 1 | yadv1
+ | | .| |
+ yadv2 | 0+--+------+ -- BSB1 --
+ | 2 | -- -- y_offset
+ | |
+ BSB2 -- 0+--------+ --
+ -- --
+
+ glyph1: advance height = 6
+ anchor point = (3,1)
+
+ glyph2: advance height = 7
+ anchor point = (9,4)
+
+ TSB is 1 for both glyphs; writing direction is T2B.
+
+
+ BSB1 = yadv1 - (TSB1 + ymax1)
+ BSB2 = yadv2 - (TSB2 + ymax2)
+ y_offset = y2 - y1
+
+ vertical advance width of glyph2
+ = y_offset + BSB2 - BSB1
+ = (y2 - y1) + (yadv2 - (TSB2 + ymax2)) - (yadv1 - (TSB1 + ymax1))
+ = y2 - y1 + yadv2 - TSB2 - ymax2 - (yadv1 - TSB1 - ymax1)
+ = y2 - y1 + yadv2 - TSB2 - ymax2 - yadv1 + TSB1 + ymax1
+
+
+ b) Assuming that we recompute the advance height of the upper glyph:
+
+ -- --
+ +---------+ -- TSB1
+ -- -- | |
+ TSB2 -- +-----+--+ 1 | yadv1 ymax1
+ | | .| |
+ yadv2 | 0+--+------+ -- --
+ ymax2 | 2 | -- y_offset
+ | |
+ -- 0+--------+ --
+ --
+
+ glyph1: advance height = 6
+ anchor point = (3,1)
+
+ glyph2: advance height = 7
+ anchor point = (9,4)
+
+ TSB is 1 for both glyphs; writing direction is T2B.
+
+ y_offset = y2 - y1
+
+ vertical advance width of glyph2
+ = TSB1 + ymax1 + y_offset - (TSB2 + ymax2)
+ = TSB1 + ymax1 + y2 - y1 - TSB2 - ymax2
+
+
+ Comparing a) with b) shows that b) is easier to compute. I'll wait
+ for a reply from Andrei to see what should really be implemented...
+
+ Since horizontal advance widths or vertical advance heights
+ can be used alone but not together, no ambiguity occurs. */
+
+ if ( gpi->last == 0xFFFF )
+ goto end;
+
+ /* Get_Anchor() returns HB_Err_Not_Covered if there is no anchor
+ table. */
+
+ error = Get_Anchor( gpi, &eer->EntryAnchor, IN_CURGLYPH(),
+ &entry_x, &entry_y );
+ if ( error == HB_Err_Not_Covered )
+ goto end;
+ if ( error )
+ return error;
+
+ if ( gpi->r2l )
+ {
+ POSITION( buffer->in_pos )->x_advance = entry_x - gpi->anchor_x;
+ POSITION( buffer->in_pos )->new_advance = TRUE;
+ }
+ else
+ {
+ POSITION( gpi->last )->x_advance = gpi->anchor_x - entry_x;
+ POSITION( gpi->last )->new_advance = TRUE;
+ }
+
+ if ( flags & HB_LOOKUP_FLAG_RIGHT_TO_LEFT )
+ {
+ POSITION( gpi->last )->cursive_chain = gpi->last - buffer->in_pos;
+ POSITION( gpi->last )->y_pos = entry_y - gpi->anchor_y;
+ }
+ else
+ {
+ POSITION( buffer->in_pos )->cursive_chain = buffer->in_pos - gpi->last;
+ POSITION( buffer->in_pos )->y_pos = gpi->anchor_y - entry_y;
+ }
+
+end:
+ error = Get_Anchor( gpi, &eer->ExitAnchor, IN_CURGLYPH(),
+ &exit_x, &exit_y );
+ if ( error == HB_Err_Not_Covered )
+ gpi->last = 0xFFFF;
+ else
+ {
+ gpi->last = buffer->in_pos;
+ gpi->anchor_x = exit_x;
+ gpi->anchor_y = exit_y;
+ }
+ if ( error )
+ return error;
+
+ (buffer->in_pos)++;
+
+ return HB_Err_Ok;
+}
+
+
+/* LookupType 4 */
+
+/* BaseArray */
+
+static HB_Error Load_BaseArray( HB_BaseArray* ba,
+ HB_UShort num_classes,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort m, n, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_BaseRecord *br;
+ HB_Anchor *ban, *bans;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = ba->BaseCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ba->BaseRecord = NULL;
+
+ if ( ALLOC_ARRAY( ba->BaseRecord, count, HB_BaseRecord ) )
+ return error;
+
+ br = ba->BaseRecord;
+
+ bans = NULL;
+
+ if ( ALLOC_ARRAY( bans, count * num_classes, HB_Anchor ) )
+ goto Fail;
+
+ for ( m = 0; m < count; m++ )
+ {
+ br[m].BaseAnchor = NULL;
+
+ ban = br[m].BaseAnchor = bans + m * num_classes;
+
+ for ( n = 0; n < num_classes; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ if (new_offset == base_offset) {
+ /* XXX
+ * Doulos SIL Regular is buggy and has zero offsets here.
+ * Skip it
+ */
+ ban[n].PosFormat = 0;
+ continue;
+ }
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_Anchor( &ban[n], stream ) ) != HB_Err_Ok )
+ goto Fail;
+ (void)FILE_Seek( cur_offset );
+ }
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ FREE( bans );
+ FREE( br );
+ return error;
+}
+
+
+static void Free_BaseArray( HB_BaseArray* ba,
+ HB_UShort num_classes )
+{
+ HB_BaseRecord *br;
+ HB_Anchor *bans;
+
+ if ( ba->BaseRecord )
+ {
+ br = ba->BaseRecord;
+
+ if ( ba->BaseCount )
+ {
+ HB_UShort i, count;
+ count = num_classes * ba->BaseCount;
+ bans = br[0].BaseAnchor;
+ for (i = 0; i < count; i++)
+ Free_Anchor (&bans[i]);
+ FREE( bans );
+ }
+
+ FREE( br );
+ }
+}
+
+
+/* MarkBasePosFormat1 */
+
+static HB_Error Load_MarkBasePos( HB_GPOS_SubTable* st,
+ HB_Stream stream )
+{
+ HB_Error error;
+ HB_MarkBasePos* mbp = &st->markbase;
+
+ HB_UInt cur_offset, new_offset, base_offset;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+ mbp->PosFormat = GET_UShort();
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ if (mbp->PosFormat != 1)
+ return ERR(HB_Err_Invalid_SubTable_Format);
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &mbp->MarkCoverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail3;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &mbp->BaseCoverage, stream ) ) != HB_Err_Ok )
+ goto Fail3;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 4L ) )
+ goto Fail2;
+
+ mbp->ClassCount = GET_UShort();
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_MarkArray( &mbp->MarkArray, stream ) ) != HB_Err_Ok )
+ goto Fail2;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_BaseArray( &mbp->BaseArray, mbp->ClassCount,
+ stream ) ) != HB_Err_Ok )
+ goto Fail1;
+
+ return HB_Err_Ok;
+
+Fail1:
+ Free_MarkArray( &mbp->MarkArray );
+
+Fail2:
+ _HB_OPEN_Free_Coverage( &mbp->BaseCoverage );
+
+Fail3:
+ _HB_OPEN_Free_Coverage( &mbp->MarkCoverage );
+ return error;
+}
+
+
+static void Free_MarkBasePos( HB_GPOS_SubTable* st )
+{
+ HB_MarkBasePos* mbp = &st->markbase;
+
+ Free_BaseArray( &mbp->BaseArray, mbp->ClassCount );
+ Free_MarkArray( &mbp->MarkArray );
+ _HB_OPEN_Free_Coverage( &mbp->BaseCoverage );
+ _HB_OPEN_Free_Coverage( &mbp->MarkCoverage );
+}
+
+
+static HB_Error Lookup_MarkBasePos( GPOS_Instance* gpi,
+ HB_GPOS_SubTable* st,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_UShort i, j, mark_index, base_index, property, class;
+ HB_Fixed x_mark_value, y_mark_value, x_base_value, y_base_value;
+ HB_Error error;
+ HB_GPOSHeader* gpos = gpi->gpos;
+ HB_MarkBasePos* mbp = &st->markbase;
+
+ HB_MarkArray* ma;
+ HB_BaseArray* ba;
+ HB_BaseRecord* br;
+ HB_Anchor* mark_anchor;
+ HB_Anchor* base_anchor;
+
+ HB_Position o;
+
+ HB_UNUSED(nesting_level);
+
+ if ( context_length != 0xFFFF && context_length < 1 )
+ return HB_Err_Not_Covered;
+
+ if ( flags & HB_LOOKUP_FLAG_IGNORE_BASE_GLYPHS )
+ return HB_Err_Not_Covered;
+
+ if ( CHECK_Property( gpos->gdef, IN_CURITEM(),
+ flags, &property ) )
+ return error;
+
+ error = _HB_OPEN_Coverage_Index( &mbp->MarkCoverage, IN_CURGLYPH(),
+ &mark_index );
+ if ( error )
+ return error;
+
+ /* now we search backwards for a non-mark glyph */
+
+ i = 1;
+ j = buffer->in_pos - 1;
+
+ while ( i <= buffer->in_pos )
+ {
+ error = HB_GDEF_Get_Glyph_Property( gpos->gdef, IN_GLYPH( j ),
+ &property );
+ if ( error )
+ return error;
+
+ if ( !( property == HB_GDEF_MARK || property & HB_LOOKUP_FLAG_IGNORE_SPECIAL_MARKS ) )
+ break;
+
+ i++;
+ j--;
+ }
+
+ /* The following assertion is too strong -- at least for mangal.ttf. */
+#if 0
+ if ( property != HB_GDEF_BASE_GLYPH )
+ return HB_Err_Not_Covered;
+#endif
+
+ if ( i > buffer->in_pos )
+ return HB_Err_Not_Covered;
+
+ error = _HB_OPEN_Coverage_Index( &mbp->BaseCoverage, IN_GLYPH( j ),
+ &base_index );
+ if ( error )
+ return error;
+
+ ma = &mbp->MarkArray;
+
+ if ( mark_index >= ma->MarkCount )
+ return ERR(HB_Err_Invalid_SubTable);
+
+ class = ma->MarkRecord[mark_index].Class;
+ mark_anchor = &ma->MarkRecord[mark_index].MarkAnchor;
+
+ if ( class >= mbp->ClassCount )
+ return ERR(HB_Err_Invalid_SubTable);
+
+ ba = &mbp->BaseArray;
+
+ if ( base_index >= ba->BaseCount )
+ return ERR(HB_Err_Invalid_SubTable);
+
+ br = &ba->BaseRecord[base_index];
+ base_anchor = &br->BaseAnchor[class];
+
+ error = Get_Anchor( gpi, mark_anchor, IN_CURGLYPH(),
+ &x_mark_value, &y_mark_value );
+ if ( error )
+ return error;
+
+ error = Get_Anchor( gpi, base_anchor, IN_GLYPH( j ),
+ &x_base_value, &y_base_value );
+ if ( error )
+ return error;
+
+ /* anchor points are not cumulative */
+
+ o = POSITION( buffer->in_pos );
+
+ o->x_pos = x_base_value - x_mark_value;
+ o->y_pos = y_base_value - y_mark_value;
+ o->x_advance = 0;
+ o->y_advance = 0;
+ o->back = i;
+
+ (buffer->in_pos)++;
+
+ return HB_Err_Ok;
+}
+
+
+/* LookupType 5 */
+
+/* LigatureAttach */
+
+static HB_Error Load_LigatureAttach( HB_LigatureAttach* lat,
+ HB_UShort num_classes,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort m, n, k, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_ComponentRecord* cr;
+ HB_Anchor* lan;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = lat->ComponentCount = GET_UShort();
+
+ FORGET_Frame();
+
+ lat->ComponentRecord = NULL;
+
+ if ( ALLOC_ARRAY( lat->ComponentRecord, count, HB_ComponentRecord ) )
+ return error;
+
+ cr = lat->ComponentRecord;
+
+ for ( m = 0; m < count; m++ )
+ {
+ cr[m].LigatureAnchor = NULL;
+
+ if ( ALLOC_ARRAY( cr[m].LigatureAnchor, num_classes, HB_Anchor ) )
+ goto Fail;
+
+ lan = cr[m].LigatureAnchor;
+
+ for ( n = 0; n < num_classes; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail0;
+
+ new_offset = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( new_offset )
+ {
+ new_offset += base_offset;
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_Anchor( &lan[n], stream ) ) != HB_Err_Ok )
+ goto Fail0;
+ (void)FILE_Seek( cur_offset );
+ }
+ else
+ lan[n].PosFormat = 0;
+ }
+
+ continue;
+ Fail0:
+ for ( k = 0; k < n; k++ )
+ Free_Anchor( &lan[k] );
+ goto Fail;
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ for ( k = 0; k < m; k++ )
+ {
+ lan = cr[k].LigatureAnchor;
+
+ for ( n = 0; n < num_classes; n++ )
+ Free_Anchor( &lan[n] );
+
+ FREE( lan );
+ }
+
+ FREE( cr );
+ return error;
+}
+
+
+static void Free_LigatureAttach( HB_LigatureAttach* lat,
+ HB_UShort num_classes )
+{
+ HB_UShort m, n, count;
+
+ HB_ComponentRecord* cr;
+ HB_Anchor* lan;
+
+
+ if ( lat->ComponentRecord )
+ {
+ count = lat->ComponentCount;
+ cr = lat->ComponentRecord;
+
+ for ( m = 0; m < count; m++ )
+ {
+ lan = cr[m].LigatureAnchor;
+
+ for ( n = 0; n < num_classes; n++ )
+ Free_Anchor( &lan[n] );
+
+ FREE( lan );
+ }
+
+ FREE( cr );
+ }
+}
+
+
+/* LigatureArray */
+
+static HB_Error Load_LigatureArray( HB_LigatureArray* la,
+ HB_UShort num_classes,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_LigatureAttach* lat;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = la->LigatureCount = GET_UShort();
+
+ FORGET_Frame();
+
+ la->LigatureAttach = NULL;
+
+ if ( ALLOC_ARRAY( la->LigatureAttach, count, HB_LigatureAttach ) )
+ return error;
+
+ lat = la->LigatureAttach;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_LigatureAttach( &lat[n], num_classes,
+ stream ) ) != HB_Err_Ok )
+ goto Fail;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ for ( m = 0; m < n; m++ )
+ Free_LigatureAttach( &lat[m], num_classes );
+
+ FREE( lat );
+ return error;
+}
+
+
+static void Free_LigatureArray( HB_LigatureArray* la,
+ HB_UShort num_classes )
+{
+ HB_UShort n, count;
+
+ HB_LigatureAttach* lat;
+
+
+ if ( la->LigatureAttach )
+ {
+ count = la->LigatureCount;
+ lat = la->LigatureAttach;
+
+ for ( n = 0; n < count; n++ )
+ Free_LigatureAttach( &lat[n], num_classes );
+
+ FREE( lat );
+ }
+}
+
+
+/* MarkLigPosFormat1 */
+
+static HB_Error Load_MarkLigPos( HB_GPOS_SubTable* st,
+ HB_Stream stream )
+{
+ HB_Error error;
+ HB_MarkLigPos* mlp = &st->marklig;
+
+ HB_UInt cur_offset, new_offset, base_offset;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+ mlp->PosFormat = GET_UShort();
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &mlp->MarkCoverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail3;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &mlp->LigatureCoverage,
+ stream ) ) != HB_Err_Ok )
+ goto Fail3;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 4L ) )
+ goto Fail2;
+
+ mlp->ClassCount = GET_UShort();
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_MarkArray( &mlp->MarkArray, stream ) ) != HB_Err_Ok )
+ goto Fail2;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_LigatureArray( &mlp->LigatureArray, mlp->ClassCount,
+ stream ) ) != HB_Err_Ok )
+ goto Fail1;
+
+ return HB_Err_Ok;
+
+Fail1:
+ Free_MarkArray( &mlp->MarkArray );
+
+Fail2:
+ _HB_OPEN_Free_Coverage( &mlp->LigatureCoverage );
+
+Fail3:
+ _HB_OPEN_Free_Coverage( &mlp->MarkCoverage );
+ return error;
+}
+
+
+static void Free_MarkLigPos( HB_GPOS_SubTable* st)
+{
+ HB_MarkLigPos* mlp = &st->marklig;
+
+ Free_LigatureArray( &mlp->LigatureArray, mlp->ClassCount );
+ Free_MarkArray( &mlp->MarkArray );
+ _HB_OPEN_Free_Coverage( &mlp->LigatureCoverage );
+ _HB_OPEN_Free_Coverage( &mlp->MarkCoverage );
+}
+
+
+static HB_Error Lookup_MarkLigPos( GPOS_Instance* gpi,
+ HB_GPOS_SubTable* st,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_UShort i, j, mark_index, lig_index, property, class;
+ HB_UShort mark_glyph;
+ HB_Fixed x_mark_value, y_mark_value, x_lig_value, y_lig_value;
+ HB_Error error;
+ HB_GPOSHeader* gpos = gpi->gpos;
+ HB_MarkLigPos* mlp = &st->marklig;
+
+ HB_MarkArray* ma;
+ HB_LigatureArray* la;
+ HB_LigatureAttach* lat;
+ HB_ComponentRecord* cr;
+ HB_UShort comp_index;
+ HB_Anchor* mark_anchor;
+ HB_Anchor* lig_anchor;
+
+ HB_Position o;
+
+ HB_UNUSED(nesting_level);
+
+ if ( context_length != 0xFFFF && context_length < 1 )
+ return HB_Err_Not_Covered;
+
+ if ( flags & HB_LOOKUP_FLAG_IGNORE_LIGATURES )
+ return HB_Err_Not_Covered;
+
+ mark_glyph = IN_CURGLYPH();
+
+ if ( CHECK_Property( gpos->gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ error = _HB_OPEN_Coverage_Index( &mlp->MarkCoverage, mark_glyph, &mark_index );
+ if ( error )
+ return error;
+
+ /* now we search backwards for a non-mark glyph */
+
+ i = 1;
+ j = buffer->in_pos - 1;
+
+ while ( i <= buffer->in_pos )
+ {
+ error = HB_GDEF_Get_Glyph_Property( gpos->gdef, IN_GLYPH( j ),
+ &property );
+ if ( error )
+ return error;
+
+ if ( !( property == HB_GDEF_MARK || property & HB_LOOKUP_FLAG_IGNORE_SPECIAL_MARKS ) )
+ break;
+
+ i++;
+ j--;
+ }
+
+ /* Similar to Lookup_MarkBasePos(), I suspect that this assertion is
+ too strong, thus it is commented out. */
+#if 0
+ if ( property != HB_GDEF_LIGATURE )
+ return HB_Err_Not_Covered;
+#endif
+
+ if ( i > buffer->in_pos )
+ return HB_Err_Not_Covered;
+
+ error = _HB_OPEN_Coverage_Index( &mlp->LigatureCoverage, IN_GLYPH( j ),
+ &lig_index );
+ if ( error )
+ return error;
+
+ ma = &mlp->MarkArray;
+
+ if ( mark_index >= ma->MarkCount )
+ return ERR(HB_Err_Invalid_SubTable);
+
+ class = ma->MarkRecord[mark_index].Class;
+ mark_anchor = &ma->MarkRecord[mark_index].MarkAnchor;
+
+ if ( class >= mlp->ClassCount )
+ return ERR(HB_Err_Invalid_SubTable);
+
+ la = &mlp->LigatureArray;
+
+ if ( lig_index >= la->LigatureCount )
+ return ERR(HB_Err_Invalid_SubTable);
+
+ lat = &la->LigatureAttach[lig_index];
+
+ /* We must now check whether the ligature ID of the current mark glyph
+ is identical to the ligature ID of the found ligature. If yes, we
+ can directly use the component index. If not, we attach the mark
+ glyph to the last component of the ligature. */
+
+ if ( IN_LIGID( j ) == IN_LIGID( buffer->in_pos) )
+ {
+ comp_index = IN_COMPONENT( buffer->in_pos );
+ if ( comp_index >= lat->ComponentCount )
+ return HB_Err_Not_Covered;
+ }
+ else
+ comp_index = lat->ComponentCount - 1;
+
+ cr = &lat->ComponentRecord[comp_index];
+ lig_anchor = &cr->LigatureAnchor[class];
+
+ error = Get_Anchor( gpi, mark_anchor, IN_CURGLYPH(),
+ &x_mark_value, &y_mark_value );
+ if ( error )
+ return error;
+ error = Get_Anchor( gpi, lig_anchor, IN_GLYPH( j ),
+ &x_lig_value, &y_lig_value );
+ if ( error )
+ return error;
+
+ /* anchor points are not cumulative */
+
+ o = POSITION( buffer->in_pos );
+
+ o->x_pos = x_lig_value - x_mark_value;
+ o->y_pos = y_lig_value - y_mark_value;
+ o->x_advance = 0;
+ o->y_advance = 0;
+ o->back = i;
+
+ (buffer->in_pos)++;
+
+ return HB_Err_Ok;
+}
+
+
+/* LookupType 6 */
+
+/* Mark2Array */
+
+static HB_Error Load_Mark2Array( HB_Mark2Array* m2a,
+ HB_UShort num_classes,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort m, n, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_Mark2Record *m2r;
+ HB_Anchor *m2an, *m2ans;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = m2a->Mark2Count = GET_UShort();
+
+ FORGET_Frame();
+
+ m2a->Mark2Record = NULL;
+
+ if ( ALLOC_ARRAY( m2a->Mark2Record, count, HB_Mark2Record ) )
+ return error;
+
+ m2r = m2a->Mark2Record;
+
+ m2ans = NULL;
+
+ if ( ALLOC_ARRAY( m2ans, count * num_classes, HB_Anchor ) )
+ goto Fail;
+
+ for ( m = 0; m < count; m++ )
+ {
+ m2an = m2r[m].Mark2Anchor = m2ans + m * num_classes;
+
+ for ( n = 0; n < num_classes; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ if (new_offset == base_offset) {
+ /* Anchor table not provided. Skip loading.
+ * Some versions of FreeSans hit this. */
+ m2an[n].PosFormat = 0;
+ continue;
+ }
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_Anchor( &m2an[n], stream ) ) != HB_Err_Ok )
+ goto Fail;
+ (void)FILE_Seek( cur_offset );
+ }
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ FREE( m2ans );
+ FREE( m2r );
+ return error;
+}
+
+
+static void Free_Mark2Array( HB_Mark2Array* m2a,
+ HB_UShort num_classes )
+{
+ HB_Mark2Record *m2r;
+ HB_Anchor *m2ans;
+
+ HB_UNUSED(num_classes);
+
+ if ( m2a->Mark2Record )
+ {
+ m2r = m2a->Mark2Record;
+
+ if ( m2a->Mark2Count )
+ {
+ m2ans = m2r[0].Mark2Anchor;
+ FREE( m2ans );
+ }
+
+ FREE( m2r );
+ }
+}
+
+
+/* MarkMarkPosFormat1 */
+
+static HB_Error Load_MarkMarkPos( HB_GPOS_SubTable* st,
+ HB_Stream stream )
+{
+ HB_Error error;
+ HB_MarkMarkPos* mmp = &st->markmark;
+
+ HB_UInt cur_offset, new_offset, base_offset;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+ mmp->PosFormat = GET_UShort();
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &mmp->Mark1Coverage,
+ stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail3;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &mmp->Mark2Coverage,
+ stream ) ) != HB_Err_Ok )
+ goto Fail3;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 4L ) )
+ goto Fail2;
+
+ mmp->ClassCount = GET_UShort();
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_MarkArray( &mmp->Mark1Array, stream ) ) != HB_Err_Ok )
+ goto Fail2;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_Mark2Array( &mmp->Mark2Array, mmp->ClassCount,
+ stream ) ) != HB_Err_Ok )
+ goto Fail1;
+
+ return HB_Err_Ok;
+
+Fail1:
+ Free_MarkArray( &mmp->Mark1Array );
+
+Fail2:
+ _HB_OPEN_Free_Coverage( &mmp->Mark2Coverage );
+
+Fail3:
+ _HB_OPEN_Free_Coverage( &mmp->Mark1Coverage );
+ return error;
+}
+
+
+static void Free_MarkMarkPos( HB_GPOS_SubTable* st)
+{
+ HB_MarkMarkPos* mmp = &st->markmark;
+
+ Free_Mark2Array( &mmp->Mark2Array, mmp->ClassCount );
+ Free_MarkArray( &mmp->Mark1Array );
+ _HB_OPEN_Free_Coverage( &mmp->Mark2Coverage );
+ _HB_OPEN_Free_Coverage( &mmp->Mark1Coverage );
+}
+
+
+static HB_Error Lookup_MarkMarkPos( GPOS_Instance* gpi,
+ HB_GPOS_SubTable* st,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_UShort i, j, mark1_index, mark2_index, property, class;
+ HB_Fixed x_mark1_value, y_mark1_value,
+ x_mark2_value, y_mark2_value;
+ HB_Error error;
+ HB_GPOSHeader* gpos = gpi->gpos;
+ HB_MarkMarkPos* mmp = &st->markmark;
+
+ HB_MarkArray* ma1;
+ HB_Mark2Array* ma2;
+ HB_Mark2Record* m2r;
+ HB_Anchor* mark1_anchor;
+ HB_Anchor* mark2_anchor;
+
+ HB_Position o;
+
+ HB_UNUSED(nesting_level);
+
+ if ( context_length != 0xFFFF && context_length < 1 )
+ return HB_Err_Not_Covered;
+
+ if ( flags & HB_LOOKUP_FLAG_IGNORE_MARKS )
+ return HB_Err_Not_Covered;
+
+ if ( CHECK_Property( gpos->gdef, IN_CURITEM(),
+ flags, &property ) )
+ return error;
+
+ error = _HB_OPEN_Coverage_Index( &mmp->Mark1Coverage, IN_CURGLYPH(),
+ &mark1_index );
+ if ( error )
+ return error;
+
+ /* now we search backwards for a suitable mark glyph until a non-mark
+ glyph */
+
+ if ( buffer->in_pos == 0 )
+ return HB_Err_Not_Covered;
+
+ i = 1;
+ j = buffer->in_pos - 1;
+ while ( i <= buffer->in_pos )
+ {
+ error = HB_GDEF_Get_Glyph_Property( gpos->gdef, IN_GLYPH( j ),
+ &property );
+ if ( error )
+ return error;
+
+ if ( !( property == HB_GDEF_MARK || property & HB_LOOKUP_FLAG_IGNORE_SPECIAL_MARKS ) )
+ return HB_Err_Not_Covered;
+
+ if ( flags & HB_LOOKUP_FLAG_IGNORE_SPECIAL_MARKS )
+ {
+ if ( property == (flags & 0xFF00) )
+ break;
+ }
+ else
+ break;
+
+ i++;
+ j--;
+ }
+
+ if ( i > buffer->in_pos )
+ return HB_Err_Not_Covered;
+
+ error = _HB_OPEN_Coverage_Index( &mmp->Mark2Coverage, IN_GLYPH( j ),
+ &mark2_index );
+ if ( error )
+ return error;
+
+ ma1 = &mmp->Mark1Array;
+
+ if ( mark1_index >= ma1->MarkCount )
+ return ERR(HB_Err_Invalid_SubTable);
+
+ class = ma1->MarkRecord[mark1_index].Class;
+ mark1_anchor = &ma1->MarkRecord[mark1_index].MarkAnchor;
+
+ if ( class >= mmp->ClassCount )
+ return ERR(HB_Err_Invalid_SubTable);
+
+ ma2 = &mmp->Mark2Array;
+
+ if ( mark2_index >= ma2->Mark2Count )
+ return ERR(HB_Err_Invalid_SubTable);
+
+ m2r = &ma2->Mark2Record[mark2_index];
+ mark2_anchor = &m2r->Mark2Anchor[class];
+
+ error = Get_Anchor( gpi, mark1_anchor, IN_CURGLYPH(),
+ &x_mark1_value, &y_mark1_value );
+ if ( error )
+ return error;
+ error = Get_Anchor( gpi, mark2_anchor, IN_GLYPH( j ),
+ &x_mark2_value, &y_mark2_value );
+ if ( error )
+ return error;
+
+ /* anchor points are not cumulative */
+
+ o = POSITION( buffer->in_pos );
+
+ o->x_pos = x_mark2_value - x_mark1_value;
+ o->y_pos = y_mark2_value - y_mark1_value;
+ o->x_advance = 0;
+ o->y_advance = 0;
+ o->back = 1;
+
+ (buffer->in_pos)++;
+
+ return HB_Err_Ok;
+}
+
+
+/* Do the actual positioning for a context positioning (either format
+ 7 or 8). This is only called after we've determined that the stream
+ matches the subrule. */
+
+static HB_Error Do_ContextPos( GPOS_Instance* gpi,
+ HB_UShort GlyphCount,
+ HB_UShort PosCount,
+ HB_PosLookupRecord* pos,
+ HB_Buffer buffer,
+ int nesting_level )
+{
+ HB_Error error;
+ HB_UInt i, old_pos;
+
+
+ i = 0;
+
+ while ( i < GlyphCount )
+ {
+ if ( PosCount && i == pos->SequenceIndex )
+ {
+ old_pos = buffer->in_pos;
+
+ /* Do a positioning */
+
+ error = GPOS_Do_Glyph_Lookup( gpi, pos->LookupListIndex, buffer,
+ GlyphCount, nesting_level );
+
+ if ( error )
+ return error;
+
+ pos++;
+ PosCount--;
+ i += buffer->in_pos - old_pos;
+ }
+ else
+ {
+ i++;
+ (buffer->in_pos)++;
+ }
+ }
+
+ return HB_Err_Ok;
+}
+
+
+/* LookupType 7 */
+
+/* PosRule */
+
+static HB_Error Load_PosRule( HB_PosRule* pr,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, count;
+ HB_UShort* i;
+
+ HB_PosLookupRecord* plr;
+
+
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+ pr->GlyphCount = GET_UShort();
+ pr->PosCount = GET_UShort();
+
+ FORGET_Frame();
+
+ pr->Input = NULL;
+
+ count = pr->GlyphCount - 1; /* only GlyphCount - 1 elements */
+
+ if ( ALLOC_ARRAY( pr->Input, count, HB_UShort ) )
+ return error;
+
+ i = pr->Input;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ goto Fail2;
+
+ for ( n = 0; n < count; n++ )
+ i[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ pr->PosLookupRecord = NULL;
+
+ count = pr->PosCount;
+
+ if ( ALLOC_ARRAY( pr->PosLookupRecord, count, HB_PosLookupRecord ) )
+ goto Fail2;
+
+ plr = pr->PosLookupRecord;
+
+ if ( ACCESS_Frame( count * 4L ) )
+ goto Fail1;
+
+ for ( n = 0; n < count; n++ )
+ {
+ plr[n].SequenceIndex = GET_UShort();
+ plr[n].LookupListIndex = GET_UShort();
+ }
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+
+Fail1:
+ FREE( plr );
+
+Fail2:
+ FREE( i );
+ return error;
+}
+
+
+static void Free_PosRule( HB_PosRule* pr )
+{
+ FREE( pr->PosLookupRecord );
+ FREE( pr->Input );
+}
+
+
+/* PosRuleSet */
+
+static HB_Error Load_PosRuleSet( HB_PosRuleSet* prs,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_PosRule* pr;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = prs->PosRuleCount = GET_UShort();
+
+ FORGET_Frame();
+
+ prs->PosRule = NULL;
+
+ if ( ALLOC_ARRAY( prs->PosRule, count, HB_PosRule ) )
+ return error;
+
+ pr = prs->PosRule;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_PosRule( &pr[n], stream ) ) != HB_Err_Ok )
+ goto Fail;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ for ( m = 0; m < n; m++ )
+ Free_PosRule( &pr[m] );
+
+ FREE( pr );
+ return error;
+}
+
+
+static void Free_PosRuleSet( HB_PosRuleSet* prs )
+{
+ HB_UShort n, count;
+
+ HB_PosRule* pr;
+
+
+ if ( prs->PosRule )
+ {
+ count = prs->PosRuleCount;
+ pr = prs->PosRule;
+
+ for ( n = 0; n < count; n++ )
+ Free_PosRule( &pr[n] );
+
+ FREE( pr );
+ }
+}
+
+
+/* ContextPosFormat1 */
+
+static HB_Error Load_ContextPos1( HB_ContextPosFormat1* cpf1,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_PosRuleSet* prs;
+
+
+ base_offset = FILE_Pos() - 2L;
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &cpf1->Coverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ count = cpf1->PosRuleSetCount = GET_UShort();
+
+ FORGET_Frame();
+
+ cpf1->PosRuleSet = NULL;
+
+ if ( ALLOC_ARRAY( cpf1->PosRuleSet, count, HB_PosRuleSet ) )
+ goto Fail2;
+
+ prs = cpf1->PosRuleSet;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_PosRuleSet( &prs[n], stream ) ) != HB_Err_Ok )
+ goto Fail1;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail1:
+ for ( m = 0; m < n; m++ )
+ Free_PosRuleSet( &prs[m] );
+
+ FREE( prs );
+
+Fail2:
+ _HB_OPEN_Free_Coverage( &cpf1->Coverage );
+ return error;
+}
+
+
+static void Free_ContextPos1( HB_ContextPosFormat1* cpf1 )
+{
+ HB_UShort n, count;
+
+ HB_PosRuleSet* prs;
+
+
+ if ( cpf1->PosRuleSet )
+ {
+ count = cpf1->PosRuleSetCount;
+ prs = cpf1->PosRuleSet;
+
+ for ( n = 0; n < count; n++ )
+ Free_PosRuleSet( &prs[n] );
+
+ FREE( prs );
+ }
+
+ _HB_OPEN_Free_Coverage( &cpf1->Coverage );
+}
+
+
+/* PosClassRule */
+
+static HB_Error Load_PosClassRule( HB_ContextPosFormat2* cpf2,
+ HB_PosClassRule* pcr,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, count;
+
+ HB_UShort* c;
+ HB_PosLookupRecord* plr;
+
+
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+ pcr->GlyphCount = GET_UShort();
+ pcr->PosCount = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( pcr->GlyphCount > cpf2->MaxContextLength )
+ cpf2->MaxContextLength = pcr->GlyphCount;
+
+ pcr->Class = NULL;
+
+ count = pcr->GlyphCount - 1; /* only GlyphCount - 1 elements */
+
+ if ( ALLOC_ARRAY( pcr->Class, count, HB_UShort ) )
+ return error;
+
+ c = pcr->Class;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ goto Fail2;
+
+ for ( n = 0; n < count; n++ )
+ c[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ pcr->PosLookupRecord = NULL;
+
+ count = pcr->PosCount;
+
+ if ( ALLOC_ARRAY( pcr->PosLookupRecord, count, HB_PosLookupRecord ) )
+ goto Fail2;
+
+ plr = pcr->PosLookupRecord;
+
+ if ( ACCESS_Frame( count * 4L ) )
+ goto Fail1;
+
+ for ( n = 0; n < count; n++ )
+ {
+ plr[n].SequenceIndex = GET_UShort();
+ plr[n].LookupListIndex = GET_UShort();
+ }
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+
+Fail1:
+ FREE( plr );
+
+Fail2:
+ FREE( c );
+ return error;
+}
+
+
+static void Free_PosClassRule( HB_PosClassRule* pcr )
+{
+ FREE( pcr->PosLookupRecord );
+ FREE( pcr->Class );
+}
+
+
+/* PosClassSet */
+
+static HB_Error Load_PosClassSet( HB_ContextPosFormat2* cpf2,
+ HB_PosClassSet* pcs,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_PosClassRule* pcr;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = pcs->PosClassRuleCount = GET_UShort();
+
+ FORGET_Frame();
+
+ pcs->PosClassRule = NULL;
+
+ if ( ALLOC_ARRAY( pcs->PosClassRule, count, HB_PosClassRule ) )
+ return error;
+
+ pcr = pcs->PosClassRule;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_PosClassRule( cpf2, &pcr[n],
+ stream ) ) != HB_Err_Ok )
+ goto Fail;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ for ( m = 0; m < n; m++ )
+ Free_PosClassRule( &pcr[m] );
+
+ FREE( pcr );
+ return error;
+}
+
+
+static void Free_PosClassSet( HB_PosClassSet* pcs )
+{
+ HB_UShort n, count;
+
+ HB_PosClassRule* pcr;
+
+
+ if ( pcs->PosClassRule )
+ {
+ count = pcs->PosClassRuleCount;
+ pcr = pcs->PosClassRule;
+
+ for ( n = 0; n < count; n++ )
+ Free_PosClassRule( &pcr[n] );
+
+ FREE( pcr );
+ }
+}
+
+
+/* ContextPosFormat2 */
+
+static HB_Error Load_ContextPos2( HB_ContextPosFormat2* cpf2,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_PosClassSet* pcs;
+
+
+ base_offset = FILE_Pos() - 2;
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &cpf2->Coverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 4L ) )
+ goto Fail3;
+
+ new_offset = GET_UShort() + base_offset;
+
+ /* `PosClassSetCount' is the upper limit for class values, thus we
+ read it now to make an additional safety check. */
+
+ count = cpf2->PosClassSetCount = GET_UShort();
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_ClassDefinition( &cpf2->ClassDef, count,
+ stream ) ) != HB_Err_Ok )
+ goto Fail3;
+ (void)FILE_Seek( cur_offset );
+
+ cpf2->PosClassSet = NULL;
+ cpf2->MaxContextLength = 0;
+
+ if ( ALLOC_ARRAY( cpf2->PosClassSet, count, HB_PosClassSet ) )
+ goto Fail2;
+
+ pcs = cpf2->PosClassSet;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ if ( new_offset != base_offset ) /* not a NULL offset */
+ {
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_PosClassSet( cpf2, &pcs[n],
+ stream ) ) != HB_Err_Ok )
+ goto Fail1;
+ (void)FILE_Seek( cur_offset );
+ }
+ else
+ {
+ /* we create a PosClassSet table with no entries */
+
+ cpf2->PosClassSet[n].PosClassRuleCount = 0;
+ cpf2->PosClassSet[n].PosClassRule = NULL;
+ }
+ }
+
+ return HB_Err_Ok;
+
+Fail1:
+ for ( m = 0; m < n; n++ )
+ Free_PosClassSet( &pcs[m] );
+
+ FREE( pcs );
+
+Fail2:
+ _HB_OPEN_Free_ClassDefinition( &cpf2->ClassDef );
+
+Fail3:
+ _HB_OPEN_Free_Coverage( &cpf2->Coverage );
+ return error;
+}
+
+
+static void Free_ContextPos2( HB_ContextPosFormat2* cpf2 )
+{
+ HB_UShort n, count;
+
+ HB_PosClassSet* pcs;
+
+
+ if ( cpf2->PosClassSet )
+ {
+ count = cpf2->PosClassSetCount;
+ pcs = cpf2->PosClassSet;
+
+ for ( n = 0; n < count; n++ )
+ Free_PosClassSet( &pcs[n] );
+
+ FREE( pcs );
+ }
+
+ _HB_OPEN_Free_ClassDefinition( &cpf2->ClassDef );
+ _HB_OPEN_Free_Coverage( &cpf2->Coverage );
+}
+
+
+/* ContextPosFormat3 */
+
+static HB_Error Load_ContextPos3( HB_ContextPosFormat3* cpf3,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_Coverage* c;
+ HB_PosLookupRecord* plr;
+
+
+ base_offset = FILE_Pos() - 2L;
+
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+ cpf3->GlyphCount = GET_UShort();
+ cpf3->PosCount = GET_UShort();
+
+ FORGET_Frame();
+
+ cpf3->Coverage = NULL;
+
+ count = cpf3->GlyphCount;
+
+ if ( ALLOC_ARRAY( cpf3->Coverage, count, HB_Coverage ) )
+ return error;
+
+ c = cpf3->Coverage;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &c[n], stream ) ) != HB_Err_Ok )
+ goto Fail2;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ cpf3->PosLookupRecord = NULL;
+
+ count = cpf3->PosCount;
+
+ if ( ALLOC_ARRAY( cpf3->PosLookupRecord, count, HB_PosLookupRecord ) )
+ goto Fail2;
+
+ plr = cpf3->PosLookupRecord;
+
+ if ( ACCESS_Frame( count * 4L ) )
+ goto Fail1;
+
+ for ( n = 0; n < count; n++ )
+ {
+ plr[n].SequenceIndex = GET_UShort();
+ plr[n].LookupListIndex = GET_UShort();
+ }
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+
+Fail1:
+ FREE( plr );
+
+Fail2:
+ for ( n = 0; n < count; n++ )
+ _HB_OPEN_Free_Coverage( &c[n] );
+
+ FREE( c );
+ return error;
+}
+
+
+static void Free_ContextPos3( HB_ContextPosFormat3* cpf3 )
+{
+ HB_UShort n, count;
+
+ HB_Coverage* c;
+
+
+ FREE( cpf3->PosLookupRecord );
+
+ if ( cpf3->Coverage )
+ {
+ count = cpf3->GlyphCount;
+ c = cpf3->Coverage;
+
+ for ( n = 0; n < count; n++ )
+ _HB_OPEN_Free_Coverage( &c[n] );
+
+ FREE( c );
+ }
+}
+
+
+/* ContextPos */
+
+static HB_Error Load_ContextPos( HB_GPOS_SubTable* st,
+ HB_Stream stream )
+{
+ HB_Error error;
+ HB_ContextPos* cp = &st->context;
+
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ cp->PosFormat = GET_UShort();
+
+ FORGET_Frame();
+
+ switch ( cp->PosFormat )
+ {
+ case 1:
+ return Load_ContextPos1( &cp->cpf.cpf1, stream );
+
+ case 2:
+ return Load_ContextPos2( &cp->cpf.cpf2, stream );
+
+ case 3:
+ return Load_ContextPos3( &cp->cpf.cpf3, stream );
+
+ default:
+ return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+
+ return HB_Err_Ok; /* never reached */
+}
+
+
+static void Free_ContextPos( HB_GPOS_SubTable* st )
+{
+ HB_ContextPos* cp = &st->context;
+
+ switch ( cp->PosFormat )
+ {
+ case 1: Free_ContextPos1( &cp->cpf.cpf1 ); break;
+ case 2: Free_ContextPos2( &cp->cpf.cpf2 ); break;
+ case 3: Free_ContextPos3( &cp->cpf.cpf3 ); break;
+ default: break;
+ }
+}
+
+
+static HB_Error Lookup_ContextPos1( GPOS_Instance* gpi,
+ HB_ContextPosFormat1* cpf1,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_UShort index, property;
+ HB_UShort i, j, k, numpr;
+ HB_Error error;
+ HB_GPOSHeader* gpos = gpi->gpos;
+
+ HB_PosRule* pr;
+ HB_GDEFHeader* gdef;
+
+
+ gdef = gpos->gdef;
+
+ if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ error = _HB_OPEN_Coverage_Index( &cpf1->Coverage, IN_CURGLYPH(), &index );
+ if ( error )
+ return error;
+
+ pr = cpf1->PosRuleSet[index].PosRule;
+ numpr = cpf1->PosRuleSet[index].PosRuleCount;
+
+ for ( k = 0; k < numpr; k++ )
+ {
+ if ( context_length != 0xFFFF && context_length < pr[k].GlyphCount )
+ goto next_posrule;
+
+ if ( buffer->in_pos + pr[k].GlyphCount > buffer->in_length )
+ goto next_posrule; /* context is too long */
+
+ for ( i = 1, j = buffer->in_pos + 1; i < pr[k].GlyphCount; i++, j++ )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( j + pr[k].GlyphCount - i == (HB_Int)buffer->in_length )
+ goto next_posrule;
+ j++;
+ }
+
+ if ( IN_GLYPH( j ) != pr[k].Input[i - 1] )
+ goto next_posrule;
+ }
+
+ return Do_ContextPos( gpi, pr[k].GlyphCount,
+ pr[k].PosCount, pr[k].PosLookupRecord,
+ buffer,
+ nesting_level );
+
+ next_posrule:
+ ;
+ }
+
+ return HB_Err_Not_Covered;
+}
+
+
+static HB_Error Lookup_ContextPos2( GPOS_Instance* gpi,
+ HB_ContextPosFormat2* cpf2,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_UShort index, property;
+ HB_Error error;
+ HB_UShort i, j, k, known_classes;
+
+ HB_UShort* classes;
+ HB_UShort* cl;
+ HB_GPOSHeader* gpos = gpi->gpos;
+
+ HB_PosClassSet* pcs;
+ HB_PosClassRule* pr;
+ HB_GDEFHeader* gdef;
+
+
+ gdef = gpos->gdef;
+
+ if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ /* Note: The coverage table in format 2 doesn't give an index into
+ anything. It just lets us know whether or not we need to
+ do any lookup at all. */
+
+ error = _HB_OPEN_Coverage_Index( &cpf2->Coverage, IN_CURGLYPH(), &index );
+ if ( error )
+ return error;
+
+ if (cpf2->MaxContextLength < 1)
+ return HB_Err_Not_Covered;
+
+ if ( ALLOC_ARRAY( classes, cpf2->MaxContextLength, HB_UShort ) )
+ return error;
+
+ error = _HB_OPEN_Get_Class( &cpf2->ClassDef, IN_CURGLYPH(),
+ &classes[0], NULL );
+ if ( error && error != HB_Err_Not_Covered )
+ goto End;
+ known_classes = 0;
+
+ pcs = &cpf2->PosClassSet[classes[0]];
+ if ( !pcs )
+ {
+ error = ERR(HB_Err_Invalid_SubTable);
+ goto End;
+ }
+
+ for ( k = 0; k < pcs->PosClassRuleCount; k++ )
+ {
+ pr = &pcs->PosClassRule[k];
+
+ if ( context_length != 0xFFFF && context_length < pr->GlyphCount )
+ goto next_posclassrule;
+
+ if ( buffer->in_pos + pr->GlyphCount > buffer->in_length )
+ goto next_posclassrule; /* context is too long */
+
+ cl = pr->Class;
+
+ /* Start at 1 because [0] is implied */
+
+ for ( i = 1, j = buffer->in_pos + 1; i < pr->GlyphCount; i++, j++ )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ goto End;
+
+ if ( j + pr->GlyphCount - i == (HB_Int)buffer->in_length )
+ goto next_posclassrule;
+ j++;
+ }
+
+ if ( i > known_classes )
+ {
+ /* Keeps us from having to do this for each rule */
+
+ error = _HB_OPEN_Get_Class( &cpf2->ClassDef, IN_GLYPH( j ), &classes[i], NULL );
+ if ( error && error != HB_Err_Not_Covered )
+ goto End;
+ known_classes = i;
+ }
+
+ if ( cl[i - 1] != classes[i] )
+ goto next_posclassrule;
+ }
+
+ error = Do_ContextPos( gpi, pr->GlyphCount,
+ pr->PosCount, pr->PosLookupRecord,
+ buffer,
+ nesting_level );
+ goto End;
+
+ next_posclassrule:
+ ;
+ }
+
+ error = HB_Err_Not_Covered;
+
+End:
+ FREE( classes );
+ return error;
+}
+
+
+static HB_Error Lookup_ContextPos3( GPOS_Instance* gpi,
+ HB_ContextPosFormat3* cpf3,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_Error error;
+ HB_UShort index, i, j, property;
+ HB_GPOSHeader* gpos = gpi->gpos;
+
+ HB_Coverage* c;
+ HB_GDEFHeader* gdef;
+
+
+ gdef = gpos->gdef;
+
+ if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ if ( context_length != 0xFFFF && context_length < cpf3->GlyphCount )
+ return HB_Err_Not_Covered;
+
+ if ( buffer->in_pos + cpf3->GlyphCount > buffer->in_length )
+ return HB_Err_Not_Covered; /* context is too long */
+
+ c = cpf3->Coverage;
+
+ for ( i = 1, j = 1; i < cpf3->GlyphCount; i++, j++ )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( j + cpf3->GlyphCount - i == (HB_Int)buffer->in_length )
+ return HB_Err_Not_Covered;
+ j++;
+ }
+
+ error = _HB_OPEN_Coverage_Index( &c[i], IN_GLYPH( j ), &index );
+ if ( error )
+ return error;
+ }
+
+ return Do_ContextPos( gpi, cpf3->GlyphCount,
+ cpf3->PosCount, cpf3->PosLookupRecord,
+ buffer,
+ nesting_level );
+}
+
+
+static HB_Error Lookup_ContextPos( GPOS_Instance* gpi,
+ HB_GPOS_SubTable* st,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_ContextPos* cp = &st->context;
+
+ switch ( cp->PosFormat )
+ {
+ case 1:
+ return Lookup_ContextPos1( gpi, &cp->cpf.cpf1, buffer,
+ flags, context_length, nesting_level );
+
+ case 2:
+ return Lookup_ContextPos2( gpi, &cp->cpf.cpf2, buffer,
+ flags, context_length, nesting_level );
+
+ case 3:
+ return Lookup_ContextPos3( gpi, &cp->cpf.cpf3, buffer,
+ flags, context_length, nesting_level );
+
+ default:
+ return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+
+ return HB_Err_Ok; /* never reached */
+}
+
+
+/* LookupType 8 */
+
+/* ChainPosRule */
+
+static HB_Error Load_ChainPosRule( HB_ChainPosRule* cpr,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, count;
+ HB_UShort* b;
+ HB_UShort* i;
+ HB_UShort* l;
+
+ HB_PosLookupRecord* plr;
+
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ cpr->BacktrackGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ cpr->Backtrack = NULL;
+
+ count = cpr->BacktrackGlyphCount;
+
+ if ( ALLOC_ARRAY( cpr->Backtrack, count, HB_UShort ) )
+ return error;
+
+ b = cpr->Backtrack;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ goto Fail4;
+
+ for ( n = 0; n < count; n++ )
+ b[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail4;
+
+ cpr->InputGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ cpr->Input = NULL;
+
+ count = cpr->InputGlyphCount - 1; /* only InputGlyphCount - 1 elements */
+
+ if ( ALLOC_ARRAY( cpr->Input, count, HB_UShort ) )
+ goto Fail4;
+
+ i = cpr->Input;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ goto Fail3;
+
+ for ( n = 0; n < count; n++ )
+ i[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail3;
+
+ cpr->LookaheadGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ cpr->Lookahead = NULL;
+
+ count = cpr->LookaheadGlyphCount;
+
+ if ( ALLOC_ARRAY( cpr->Lookahead, count, HB_UShort ) )
+ goto Fail3;
+
+ l = cpr->Lookahead;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ goto Fail2;
+
+ for ( n = 0; n < count; n++ )
+ l[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ cpr->PosCount = GET_UShort();
+
+ FORGET_Frame();
+
+ cpr->PosLookupRecord = NULL;
+
+ count = cpr->PosCount;
+
+ if ( ALLOC_ARRAY( cpr->PosLookupRecord, count, HB_PosLookupRecord ) )
+ goto Fail2;
+
+ plr = cpr->PosLookupRecord;
+
+ if ( ACCESS_Frame( count * 4L ) )
+ goto Fail1;
+
+ for ( n = 0; n < count; n++ )
+ {
+ plr[n].SequenceIndex = GET_UShort();
+ plr[n].LookupListIndex = GET_UShort();
+ }
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+
+Fail1:
+ FREE( plr );
+
+Fail2:
+ FREE( l );
+
+Fail3:
+ FREE( i );
+
+Fail4:
+ FREE( b );
+ return error;
+}
+
+
+static void Free_ChainPosRule( HB_ChainPosRule* cpr )
+{
+ FREE( cpr->PosLookupRecord );
+ FREE( cpr->Lookahead );
+ FREE( cpr->Input );
+ FREE( cpr->Backtrack );
+}
+
+
+/* ChainPosRuleSet */
+
+static HB_Error Load_ChainPosRuleSet( HB_ChainPosRuleSet* cprs,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_ChainPosRule* cpr;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = cprs->ChainPosRuleCount = GET_UShort();
+
+ FORGET_Frame();
+
+ cprs->ChainPosRule = NULL;
+
+ if ( ALLOC_ARRAY( cprs->ChainPosRule, count, HB_ChainPosRule ) )
+ return error;
+
+ cpr = cprs->ChainPosRule;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_ChainPosRule( &cpr[n], stream ) ) != HB_Err_Ok )
+ goto Fail;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ for ( m = 0; m < n; m++ )
+ Free_ChainPosRule( &cpr[m] );
+
+ FREE( cpr );
+ return error;
+}
+
+
+static void Free_ChainPosRuleSet( HB_ChainPosRuleSet* cprs )
+{
+ HB_UShort n, count;
+
+ HB_ChainPosRule* cpr;
+
+
+ if ( cprs->ChainPosRule )
+ {
+ count = cprs->ChainPosRuleCount;
+ cpr = cprs->ChainPosRule;
+
+ for ( n = 0; n < count; n++ )
+ Free_ChainPosRule( &cpr[n] );
+
+ FREE( cpr );
+ }
+}
+
+
+/* ChainContextPosFormat1 */
+
+static HB_Error Load_ChainContextPos1( HB_ChainContextPosFormat1* ccpf1,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_ChainPosRuleSet* cprs;
+
+
+ base_offset = FILE_Pos() - 2L;
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &ccpf1->Coverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ count = ccpf1->ChainPosRuleSetCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ccpf1->ChainPosRuleSet = NULL;
+
+ if ( ALLOC_ARRAY( ccpf1->ChainPosRuleSet, count, HB_ChainPosRuleSet ) )
+ goto Fail2;
+
+ cprs = ccpf1->ChainPosRuleSet;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_ChainPosRuleSet( &cprs[n], stream ) ) != HB_Err_Ok )
+ goto Fail1;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail1:
+ for ( m = 0; m < n; m++ )
+ Free_ChainPosRuleSet( &cprs[m] );
+
+ FREE( cprs );
+
+Fail2:
+ _HB_OPEN_Free_Coverage( &ccpf1->Coverage );
+ return error;
+}
+
+
+static void Free_ChainContextPos1( HB_ChainContextPosFormat1* ccpf1 )
+{
+ HB_UShort n, count;
+
+ HB_ChainPosRuleSet* cprs;
+
+
+ if ( ccpf1->ChainPosRuleSet )
+ {
+ count = ccpf1->ChainPosRuleSetCount;
+ cprs = ccpf1->ChainPosRuleSet;
+
+ for ( n = 0; n < count; n++ )
+ Free_ChainPosRuleSet( &cprs[n] );
+
+ FREE( cprs );
+ }
+
+ _HB_OPEN_Free_Coverage( &ccpf1->Coverage );
+}
+
+
+/* ChainPosClassRule */
+
+static HB_Error Load_ChainPosClassRule(
+ HB_ChainContextPosFormat2* ccpf2,
+ HB_ChainPosClassRule* cpcr,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, count;
+
+ HB_UShort* b;
+ HB_UShort* i;
+ HB_UShort* l;
+ HB_PosLookupRecord* plr;
+
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ cpcr->BacktrackGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( cpcr->BacktrackGlyphCount > ccpf2->MaxBacktrackLength )
+ ccpf2->MaxBacktrackLength = cpcr->BacktrackGlyphCount;
+
+ cpcr->Backtrack = NULL;
+
+ count = cpcr->BacktrackGlyphCount;
+
+ if ( ALLOC_ARRAY( cpcr->Backtrack, count, HB_UShort ) )
+ return error;
+
+ b = cpcr->Backtrack;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ goto Fail4;
+
+ for ( n = 0; n < count; n++ )
+ b[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail4;
+
+ cpcr->InputGlyphCount = GET_UShort();
+
+ if ( cpcr->InputGlyphCount > ccpf2->MaxInputLength )
+ ccpf2->MaxInputLength = cpcr->InputGlyphCount;
+
+ FORGET_Frame();
+
+ cpcr->Input = NULL;
+
+ count = cpcr->InputGlyphCount - 1; /* only InputGlyphCount - 1 elements */
+
+ if ( ALLOC_ARRAY( cpcr->Input, count, HB_UShort ) )
+ goto Fail4;
+
+ i = cpcr->Input;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ goto Fail3;
+
+ for ( n = 0; n < count; n++ )
+ i[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail3;
+
+ cpcr->LookaheadGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( cpcr->LookaheadGlyphCount > ccpf2->MaxLookaheadLength )
+ ccpf2->MaxLookaheadLength = cpcr->LookaheadGlyphCount;
+
+ cpcr->Lookahead = NULL;
+
+ count = cpcr->LookaheadGlyphCount;
+
+ if ( ALLOC_ARRAY( cpcr->Lookahead, count, HB_UShort ) )
+ goto Fail3;
+
+ l = cpcr->Lookahead;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ goto Fail2;
+
+ for ( n = 0; n < count; n++ )
+ l[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ cpcr->PosCount = GET_UShort();
+
+ FORGET_Frame();
+
+ cpcr->PosLookupRecord = NULL;
+
+ count = cpcr->PosCount;
+
+ if ( ALLOC_ARRAY( cpcr->PosLookupRecord, count, HB_PosLookupRecord ) )
+ goto Fail2;
+
+ plr = cpcr->PosLookupRecord;
+
+ if ( ACCESS_Frame( count * 4L ) )
+ goto Fail1;
+
+ for ( n = 0; n < count; n++ )
+ {
+ plr[n].SequenceIndex = GET_UShort();
+ plr[n].LookupListIndex = GET_UShort();
+ }
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+
+Fail1:
+ FREE( plr );
+
+Fail2:
+ FREE( l );
+
+Fail3:
+ FREE( i );
+
+Fail4:
+ FREE( b );
+ return error;
+}
+
+
+static void Free_ChainPosClassRule( HB_ChainPosClassRule* cpcr )
+{
+ FREE( cpcr->PosLookupRecord );
+ FREE( cpcr->Lookahead );
+ FREE( cpcr->Input );
+ FREE( cpcr->Backtrack );
+}
+
+
+/* PosClassSet */
+
+static HB_Error Load_ChainPosClassSet(
+ HB_ChainContextPosFormat2* ccpf2,
+ HB_ChainPosClassSet* cpcs,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_ChainPosClassRule* cpcr;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = cpcs->ChainPosClassRuleCount = GET_UShort();
+
+ FORGET_Frame();
+
+ cpcs->ChainPosClassRule = NULL;
+
+ if ( ALLOC_ARRAY( cpcs->ChainPosClassRule, count,
+ HB_ChainPosClassRule ) )
+ return error;
+
+ cpcr = cpcs->ChainPosClassRule;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_ChainPosClassRule( ccpf2, &cpcr[n],
+ stream ) ) != HB_Err_Ok )
+ goto Fail;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ for ( m = 0; m < n; m++ )
+ Free_ChainPosClassRule( &cpcr[m] );
+
+ FREE( cpcr );
+ return error;
+}
+
+
+static void Free_ChainPosClassSet( HB_ChainPosClassSet* cpcs )
+{
+ HB_UShort n, count;
+
+ HB_ChainPosClassRule* cpcr;
+
+
+ if ( cpcs->ChainPosClassRule )
+ {
+ count = cpcs->ChainPosClassRuleCount;
+ cpcr = cpcs->ChainPosClassRule;
+
+ for ( n = 0; n < count; n++ )
+ Free_ChainPosClassRule( &cpcr[n] );
+
+ FREE( cpcr );
+ }
+}
+
+
+/* ChainContextPosFormat2 */
+
+static HB_Error Load_ChainContextPos2( HB_ChainContextPosFormat2* ccpf2,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+ HB_UInt backtrack_offset, input_offset, lookahead_offset;
+
+ HB_ChainPosClassSet* cpcs;
+
+
+ base_offset = FILE_Pos() - 2;
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &ccpf2->Coverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 8L ) )
+ goto Fail5;
+
+ backtrack_offset = GET_UShort();
+ input_offset = GET_UShort();
+ lookahead_offset = GET_UShort();
+
+ /* `ChainPosClassSetCount' is the upper limit for input class values,
+ thus we read it now to make an additional safety check. No limit
+ is known or needed for the other two class definitions */
+
+ count = ccpf2->ChainPosClassSetCount = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( ( error = _HB_OPEN_Load_EmptyOrClassDefinition( &ccpf2->BacktrackClassDef, 65535,
+ backtrack_offset, base_offset,
+ stream ) ) != HB_Err_Ok )
+ goto Fail5;
+ if ( ( error = _HB_OPEN_Load_EmptyOrClassDefinition( &ccpf2->InputClassDef, count,
+ input_offset, base_offset,
+ stream ) ) != HB_Err_Ok )
+ goto Fail4;
+ if ( ( error = _HB_OPEN_Load_EmptyOrClassDefinition( &ccpf2->LookaheadClassDef, 65535,
+ lookahead_offset, base_offset,
+ stream ) ) != HB_Err_Ok )
+ goto Fail3;
+
+ ccpf2->ChainPosClassSet = NULL;
+ ccpf2->MaxBacktrackLength = 0;
+ ccpf2->MaxInputLength = 0;
+ ccpf2->MaxLookaheadLength = 0;
+
+ if ( ALLOC_ARRAY( ccpf2->ChainPosClassSet, count, HB_ChainPosClassSet ) )
+ goto Fail2;
+
+ cpcs = ccpf2->ChainPosClassSet;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ if ( new_offset != base_offset ) /* not a NULL offset */
+ {
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_ChainPosClassSet( ccpf2, &cpcs[n],
+ stream ) ) != HB_Err_Ok )
+ goto Fail1;
+ (void)FILE_Seek( cur_offset );
+ }
+ else
+ {
+ /* we create a ChainPosClassSet table with no entries */
+
+ ccpf2->ChainPosClassSet[n].ChainPosClassRuleCount = 0;
+ ccpf2->ChainPosClassSet[n].ChainPosClassRule = NULL;
+ }
+ }
+
+ return HB_Err_Ok;
+
+Fail1:
+ for ( m = 0; m < n; m++ )
+ Free_ChainPosClassSet( &cpcs[m] );
+
+ FREE( cpcs );
+
+Fail2:
+ _HB_OPEN_Free_ClassDefinition( &ccpf2->LookaheadClassDef );
+
+Fail3:
+ _HB_OPEN_Free_ClassDefinition( &ccpf2->InputClassDef );
+
+Fail4:
+ _HB_OPEN_Free_ClassDefinition( &ccpf2->BacktrackClassDef );
+
+Fail5:
+ _HB_OPEN_Free_Coverage( &ccpf2->Coverage );
+ return error;
+}
+
+
+static void Free_ChainContextPos2( HB_ChainContextPosFormat2* ccpf2 )
+{
+ HB_UShort n, count;
+
+ HB_ChainPosClassSet* cpcs;
+
+
+ if ( ccpf2->ChainPosClassSet )
+ {
+ count = ccpf2->ChainPosClassSetCount;
+ cpcs = ccpf2->ChainPosClassSet;
+
+ for ( n = 0; n < count; n++ )
+ Free_ChainPosClassSet( &cpcs[n] );
+
+ FREE( cpcs );
+ }
+
+ _HB_OPEN_Free_ClassDefinition( &ccpf2->LookaheadClassDef );
+ _HB_OPEN_Free_ClassDefinition( &ccpf2->InputClassDef );
+ _HB_OPEN_Free_ClassDefinition( &ccpf2->BacktrackClassDef );
+
+ _HB_OPEN_Free_Coverage( &ccpf2->Coverage );
+}
+
+
+/* ChainContextPosFormat3 */
+
+static HB_Error Load_ChainContextPos3( HB_ChainContextPosFormat3* ccpf3,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, nb, ni, nl, m, count;
+ HB_UShort backtrack_count, input_count, lookahead_count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_Coverage* b;
+ HB_Coverage* i;
+ HB_Coverage* l;
+ HB_PosLookupRecord* plr;
+
+
+ base_offset = FILE_Pos() - 2L;
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ ccpf3->BacktrackGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ccpf3->BacktrackCoverage = NULL;
+
+ backtrack_count = ccpf3->BacktrackGlyphCount;
+
+ if ( ALLOC_ARRAY( ccpf3->BacktrackCoverage, backtrack_count,
+ HB_Coverage ) )
+ return error;
+
+ b = ccpf3->BacktrackCoverage;
+
+ for ( nb = 0; nb < backtrack_count; nb++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail4;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &b[nb], stream ) ) != HB_Err_Ok )
+ goto Fail4;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail4;
+
+ ccpf3->InputGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ccpf3->InputCoverage = NULL;
+
+ input_count = ccpf3->InputGlyphCount;
+
+ if ( ALLOC_ARRAY( ccpf3->InputCoverage, input_count, HB_Coverage ) )
+ goto Fail4;
+
+ i = ccpf3->InputCoverage;
+
+ for ( ni = 0; ni < input_count; ni++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail3;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &i[ni], stream ) ) != HB_Err_Ok )
+ goto Fail3;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail3;
+
+ ccpf3->LookaheadGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ccpf3->LookaheadCoverage = NULL;
+
+ lookahead_count = ccpf3->LookaheadGlyphCount;
+
+ if ( ALLOC_ARRAY( ccpf3->LookaheadCoverage, lookahead_count,
+ HB_Coverage ) )
+ goto Fail3;
+
+ l = ccpf3->LookaheadCoverage;
+
+ for ( nl = 0; nl < lookahead_count; nl++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &l[nl], stream ) ) != HB_Err_Ok )
+ goto Fail2;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ ccpf3->PosCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ccpf3->PosLookupRecord = NULL;
+
+ count = ccpf3->PosCount;
+
+ if ( ALLOC_ARRAY( ccpf3->PosLookupRecord, count, HB_PosLookupRecord ) )
+ goto Fail2;
+
+ plr = ccpf3->PosLookupRecord;
+
+ if ( ACCESS_Frame( count * 4L ) )
+ goto Fail1;
+
+ for ( n = 0; n < count; n++ )
+ {
+ plr[n].SequenceIndex = GET_UShort();
+ plr[n].LookupListIndex = GET_UShort();
+ }
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+
+Fail1:
+ FREE( plr );
+
+Fail2:
+ for ( m = 0; m < nl; m++ )
+ _HB_OPEN_Free_Coverage( &l[m] );
+
+ FREE( l );
+
+Fail3:
+ for ( m = 0; m < ni; m++ )
+ _HB_OPEN_Free_Coverage( &i[m] );
+
+ FREE( i );
+
+Fail4:
+ for ( m = 0; m < nb; m++ )
+ _HB_OPEN_Free_Coverage( &b[m] );
+
+ FREE( b );
+ return error;
+}
+
+
+static void Free_ChainContextPos3( HB_ChainContextPosFormat3* ccpf3 )
+{
+ HB_UShort n, count;
+
+ HB_Coverage* c;
+
+
+ FREE( ccpf3->PosLookupRecord );
+
+ if ( ccpf3->LookaheadCoverage )
+ {
+ count = ccpf3->LookaheadGlyphCount;
+ c = ccpf3->LookaheadCoverage;
+
+ for ( n = 0; n < count; n++ )
+ _HB_OPEN_Free_Coverage( &c[n] );
+
+ FREE( c );
+ }
+
+ if ( ccpf3->InputCoverage )
+ {
+ count = ccpf3->InputGlyphCount;
+ c = ccpf3->InputCoverage;
+
+ for ( n = 0; n < count; n++ )
+ _HB_OPEN_Free_Coverage( &c[n] );
+
+ FREE( c );
+ }
+
+ if ( ccpf3->BacktrackCoverage )
+ {
+ count = ccpf3->BacktrackGlyphCount;
+ c = ccpf3->BacktrackCoverage;
+
+ for ( n = 0; n < count; n++ )
+ _HB_OPEN_Free_Coverage( &c[n] );
+
+ FREE( c );
+ }
+}
+
+
+/* ChainContextPos */
+
+static HB_Error Load_ChainContextPos( HB_GPOS_SubTable* st,
+ HB_Stream stream )
+{
+ HB_Error error;
+ HB_ChainContextPos* ccp = &st->chain;
+
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ ccp->PosFormat = GET_UShort();
+
+ FORGET_Frame();
+
+ switch ( ccp->PosFormat )
+ {
+ case 1:
+ return Load_ChainContextPos1( &ccp->ccpf.ccpf1, stream );
+
+ case 2:
+ return Load_ChainContextPos2( &ccp->ccpf.ccpf2, stream );
+
+ case 3:
+ return Load_ChainContextPos3( &ccp->ccpf.ccpf3, stream );
+
+ default:
+ return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+
+ return HB_Err_Ok; /* never reached */
+}
+
+
+static void Free_ChainContextPos( HB_GPOS_SubTable* st )
+{
+ HB_ChainContextPos* ccp = &st->chain;
+
+ switch ( ccp->PosFormat )
+ {
+ case 1: Free_ChainContextPos1( &ccp->ccpf.ccpf1 ); break;
+ case 2: Free_ChainContextPos2( &ccp->ccpf.ccpf2 ); break;
+ case 3: Free_ChainContextPos3( &ccp->ccpf.ccpf3 ); break;
+ default: break;
+ }
+}
+
+
+static HB_Error Lookup_ChainContextPos1(
+ GPOS_Instance* gpi,
+ HB_ChainContextPosFormat1* ccpf1,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_UShort index, property;
+ HB_UShort i, j, k, num_cpr;
+ HB_UShort bgc, igc, lgc;
+ HB_Error error;
+ HB_GPOSHeader* gpos = gpi->gpos;
+
+ HB_ChainPosRule* cpr;
+ HB_ChainPosRule curr_cpr;
+ HB_GDEFHeader* gdef;
+
+
+ gdef = gpos->gdef;
+
+ if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ error = _HB_OPEN_Coverage_Index( &ccpf1->Coverage, IN_CURGLYPH(), &index );
+ if ( error )
+ return error;
+
+ cpr = ccpf1->ChainPosRuleSet[index].ChainPosRule;
+ num_cpr = ccpf1->ChainPosRuleSet[index].ChainPosRuleCount;
+
+ for ( k = 0; k < num_cpr; k++ )
+ {
+ curr_cpr = cpr[k];
+ bgc = curr_cpr.BacktrackGlyphCount;
+ igc = curr_cpr.InputGlyphCount;
+ lgc = curr_cpr.LookaheadGlyphCount;
+
+ if ( context_length != 0xFFFF && context_length < igc )
+ goto next_chainposrule;
+
+ /* check whether context is too long; it is a first guess only */
+
+ if ( bgc > buffer->in_pos || buffer->in_pos + igc + lgc > buffer->in_length )
+ goto next_chainposrule;
+
+ if ( bgc )
+ {
+ /* Since we don't know in advance the number of glyphs to inspect,
+ we search backwards for matches in the backtrack glyph array */
+
+ for ( i = 0, j = buffer->in_pos - 1; i < bgc; i++, j-- )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( j + 1 == bgc - i )
+ goto next_chainposrule;
+ j--;
+ }
+
+ /* In OpenType 1.3, it is undefined whether the offsets of
+ backtrack glyphs is in logical order or not. Version 1.4
+ will clarify this:
+
+ Logical order - a b c d e f g h i j
+ i
+ Input offsets - 0 1
+ Backtrack offsets - 3 2 1 0
+ Lookahead offsets - 0 1 2 3 */
+
+ if ( IN_GLYPH( j ) != curr_cpr.Backtrack[i] )
+ goto next_chainposrule;
+ }
+ }
+
+ /* Start at 1 because [0] is implied */
+
+ for ( i = 1, j = buffer->in_pos + 1; i < igc; i++, j++ )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( j + igc - i + lgc == (HB_Int)buffer->in_length )
+ goto next_chainposrule;
+ j++;
+ }
+
+ if ( IN_GLYPH( j ) != curr_cpr.Input[i - 1] )
+ goto next_chainposrule;
+ }
+
+ /* we are starting to check for lookahead glyphs right after the
+ last context glyph */
+
+ for ( i = 0; i < lgc; i++, j++ )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( j + lgc - i == (HB_Int)buffer->in_length )
+ goto next_chainposrule;
+ j++;
+ }
+
+ if ( IN_GLYPH( j ) != curr_cpr.Lookahead[i] )
+ goto next_chainposrule;
+ }
+
+ return Do_ContextPos( gpi, igc,
+ curr_cpr.PosCount,
+ curr_cpr.PosLookupRecord,
+ buffer,
+ nesting_level );
+
+ next_chainposrule:
+ ;
+ }
+
+ return HB_Err_Not_Covered;
+}
+
+
+static HB_Error Lookup_ChainContextPos2(
+ GPOS_Instance* gpi,
+ HB_ChainContextPosFormat2* ccpf2,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_UShort index, property;
+ HB_Error error;
+ HB_UShort i, j, k;
+ HB_UShort bgc, igc, lgc;
+ HB_UShort known_backtrack_classes,
+ known_input_classes,
+ known_lookahead_classes;
+
+ HB_UShort* backtrack_classes;
+ HB_UShort* input_classes;
+ HB_UShort* lookahead_classes;
+
+ HB_UShort* bc;
+ HB_UShort* ic;
+ HB_UShort* lc;
+ HB_GPOSHeader* gpos = gpi->gpos;
+
+ HB_ChainPosClassSet* cpcs;
+ HB_ChainPosClassRule cpcr;
+ HB_GDEFHeader* gdef;
+
+
+ gdef = gpos->gdef;
+
+ if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ /* Note: The coverage table in format 2 doesn't give an index into
+ anything. It just lets us know whether or not we need to
+ do any lookup at all. */
+
+ error = _HB_OPEN_Coverage_Index( &ccpf2->Coverage, IN_CURGLYPH(), &index );
+ if ( error )
+ return error;
+
+ if (ccpf2->MaxInputLength < 1)
+ return HB_Err_Not_Covered;
+
+ if ( ALLOC_ARRAY( backtrack_classes, ccpf2->MaxBacktrackLength, HB_UShort ) )
+ return error;
+ known_backtrack_classes = 0;
+
+ if ( ALLOC_ARRAY( input_classes, ccpf2->MaxInputLength, HB_UShort ) )
+ goto End3;
+ known_input_classes = 1;
+
+ if ( ALLOC_ARRAY( lookahead_classes, ccpf2->MaxLookaheadLength, HB_UShort ) )
+ goto End2;
+ known_lookahead_classes = 0;
+
+ error = _HB_OPEN_Get_Class( &ccpf2->InputClassDef, IN_CURGLYPH(),
+ &input_classes[0], NULL );
+ if ( error && error != HB_Err_Not_Covered )
+ goto End1;
+
+ cpcs = &ccpf2->ChainPosClassSet[input_classes[0]];
+ if ( !cpcs )
+ {
+ error = ERR(HB_Err_Invalid_SubTable);
+ goto End1;
+ }
+
+ for ( k = 0; k < cpcs->ChainPosClassRuleCount; k++ )
+ {
+ cpcr = cpcs->ChainPosClassRule[k];
+ bgc = cpcr.BacktrackGlyphCount;
+ igc = cpcr.InputGlyphCount;
+ lgc = cpcr.LookaheadGlyphCount;
+
+ if ( context_length != 0xFFFF && context_length < igc )
+ goto next_chainposclassrule;
+
+ /* check whether context is too long; it is a first guess only */
+
+ if ( bgc > buffer->in_pos || buffer->in_pos + igc + lgc > buffer->in_length )
+ goto next_chainposclassrule;
+
+ if ( bgc )
+ {
+ /* Since we don't know in advance the number of glyphs to inspect,
+ we search backwards for matches in the backtrack glyph array.
+ Note that `known_backtrack_classes' starts at index 0. */
+
+ bc = cpcr.Backtrack;
+
+ for ( i = 0, j = buffer->in_pos - 1; i < bgc; i++, j-- )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ goto End1;
+
+ if ( j + 1 == bgc - i )
+ goto next_chainposclassrule;
+ j++;
+ }
+
+ if ( i >= known_backtrack_classes )
+ {
+ /* Keeps us from having to do this for each rule */
+
+ error = _HB_OPEN_Get_Class( &ccpf2->BacktrackClassDef, IN_GLYPH( j ),
+ &backtrack_classes[i], NULL );
+ if ( error && error != HB_Err_Not_Covered )
+ goto End1;
+ known_backtrack_classes = i;
+ }
+
+ if ( bc[i] != backtrack_classes[i] )
+ goto next_chainposclassrule;
+ }
+ }
+
+ ic = cpcr.Input;
+
+ /* Start at 1 because [0] is implied */
+
+ for ( i = 1, j = buffer->in_pos + 1; i < igc; i++, j++ )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ goto End1;
+
+ if ( j + igc - i + lgc == (HB_Int)buffer->in_length )
+ goto next_chainposclassrule;
+ j++;
+ }
+
+ if ( i >= known_input_classes )
+ {
+ error = _HB_OPEN_Get_Class( &ccpf2->InputClassDef, IN_GLYPH( j ),
+ &input_classes[i], NULL );
+ if ( error && error != HB_Err_Not_Covered )
+ goto End1;
+ known_input_classes = i;
+ }
+
+ if ( ic[i - 1] != input_classes[i] )
+ goto next_chainposclassrule;
+ }
+
+ /* we are starting to check for lookahead glyphs right after the
+ last context glyph */
+
+ lc = cpcr.Lookahead;
+
+ for ( i = 0; i < lgc; i++, j++ )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ goto End1;
+
+ if ( j + lgc - i == (HB_Int)buffer->in_length )
+ goto next_chainposclassrule;
+ j++;
+ }
+
+ if ( i >= known_lookahead_classes )
+ {
+ error = _HB_OPEN_Get_Class( &ccpf2->LookaheadClassDef, IN_GLYPH( j ),
+ &lookahead_classes[i], NULL );
+ if ( error && error != HB_Err_Not_Covered )
+ goto End1;
+ known_lookahead_classes = i;
+ }
+
+ if ( lc[i] != lookahead_classes[i] )
+ goto next_chainposclassrule;
+ }
+
+ error = Do_ContextPos( gpi, igc,
+ cpcr.PosCount,
+ cpcr.PosLookupRecord,
+ buffer,
+ nesting_level );
+ goto End1;
+
+ next_chainposclassrule:
+ ;
+ }
+
+ error = HB_Err_Not_Covered;
+
+End1:
+ FREE( lookahead_classes );
+
+End2:
+ FREE( input_classes );
+
+End3:
+ FREE( backtrack_classes );
+ return error;
+}
+
+
+static HB_Error Lookup_ChainContextPos3(
+ GPOS_Instance* gpi,
+ HB_ChainContextPosFormat3* ccpf3,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_UShort index, i, j, property;
+ HB_UShort bgc, igc, lgc;
+ HB_Error error;
+ HB_GPOSHeader* gpos = gpi->gpos;
+
+ HB_Coverage* bc;
+ HB_Coverage* ic;
+ HB_Coverage* lc;
+ HB_GDEFHeader* gdef;
+
+
+ gdef = gpos->gdef;
+
+ if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ bgc = ccpf3->BacktrackGlyphCount;
+ igc = ccpf3->InputGlyphCount;
+ lgc = ccpf3->LookaheadGlyphCount;
+
+ if ( context_length != 0xFFFF && context_length < igc )
+ return HB_Err_Not_Covered;
+
+ /* check whether context is too long; it is a first guess only */
+
+ if ( bgc > buffer->in_pos || buffer->in_pos + igc + lgc > buffer->in_length )
+ return HB_Err_Not_Covered;
+
+ if ( bgc )
+ {
+ /* Since we don't know in advance the number of glyphs to inspect,
+ we search backwards for matches in the backtrack glyph array */
+
+ bc = ccpf3->BacktrackCoverage;
+
+ for ( i = 0, j = buffer->in_pos - 1; i < bgc; i++, j-- )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( j + 1 == bgc - i )
+ return HB_Err_Not_Covered;
+ j--;
+ }
+
+ error = _HB_OPEN_Coverage_Index( &bc[i], IN_GLYPH( j ), &index );
+ if ( error )
+ return error;
+ }
+ }
+
+ ic = ccpf3->InputCoverage;
+
+ for ( i = 0, j = buffer->in_pos; i < igc; i++, j++ )
+ {
+ /* We already called CHECK_Property for IN_GLYPH ( buffer->in_pos ) */
+ while ( j > buffer->in_pos && CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( j + igc - i + lgc == (HB_Int)buffer->in_length )
+ return HB_Err_Not_Covered;
+ j++;
+ }
+
+ error = _HB_OPEN_Coverage_Index( &ic[i], IN_GLYPH( j ), &index );
+ if ( error )
+ return error;
+ }
+
+ /* we are starting to check for lookahead glyphs right after the
+ last context glyph */
+
+ lc = ccpf3->LookaheadCoverage;
+
+ for ( i = 0; i < lgc; i++, j++ )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( j + lgc - i == (HB_Int)buffer->in_length )
+ return HB_Err_Not_Covered;
+ j++;
+ }
+
+ error = _HB_OPEN_Coverage_Index( &lc[i], IN_GLYPH( j ), &index );
+ if ( error )
+ return error;
+ }
+
+ return Do_ContextPos( gpi, igc,
+ ccpf3->PosCount,
+ ccpf3->PosLookupRecord,
+ buffer,
+ nesting_level );
+}
+
+
+static HB_Error Lookup_ChainContextPos(
+ GPOS_Instance* gpi,
+ HB_GPOS_SubTable* st,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_ChainContextPos* ccp = &st->chain;
+
+ switch ( ccp->PosFormat )
+ {
+ case 1:
+ return Lookup_ChainContextPos1( gpi, &ccp->ccpf.ccpf1, buffer,
+ flags, context_length,
+ nesting_level );
+
+ case 2:
+ return Lookup_ChainContextPos2( gpi, &ccp->ccpf.ccpf2, buffer,
+ flags, context_length,
+ nesting_level );
+
+ case 3:
+ return Lookup_ChainContextPos3( gpi, &ccp->ccpf.ccpf3, buffer,
+ flags, context_length,
+ nesting_level );
+
+ default:
+ return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+
+ return HB_Err_Ok; /* never reached */
+}
+
+
+
+/***********
+ * GPOS API
+ ***********/
+
+
+
+HB_Error HB_GPOS_Select_Script( HB_GPOSHeader* gpos,
+ HB_UInt script_tag,
+ HB_UShort* script_index )
+{
+ HB_UShort n;
+
+ HB_ScriptList* sl;
+ HB_ScriptRecord* sr;
+
+
+ if ( !gpos || !script_index )
+ return ERR(HB_Err_Invalid_Argument);
+
+ sl = &gpos->ScriptList;
+ sr = sl->ScriptRecord;
+
+ for ( n = 0; n < sl->ScriptCount; n++ )
+ if ( script_tag == sr[n].ScriptTag )
+ {
+ *script_index = n;
+
+ return HB_Err_Ok;
+ }
+
+ return HB_Err_Not_Covered;
+}
+
+
+
+HB_Error HB_GPOS_Select_Language( HB_GPOSHeader* gpos,
+ HB_UInt language_tag,
+ HB_UShort script_index,
+ HB_UShort* language_index,
+ HB_UShort* req_feature_index )
+{
+ HB_UShort n;
+
+ HB_ScriptList* sl;
+ HB_ScriptRecord* sr;
+ HB_ScriptTable* s;
+ HB_LangSysRecord* lsr;
+
+
+ if ( !gpos || !language_index || !req_feature_index )
+ return ERR(HB_Err_Invalid_Argument);
+
+ sl = &gpos->ScriptList;
+ sr = sl->ScriptRecord;
+
+ if ( script_index >= sl->ScriptCount )
+ return ERR(HB_Err_Invalid_Argument);
+
+ s = &sr[script_index].Script;
+ lsr = s->LangSysRecord;
+
+ for ( n = 0; n < s->LangSysCount; n++ )
+ if ( language_tag == lsr[n].LangSysTag )
+ {
+ *language_index = n;
+ *req_feature_index = lsr[n].LangSys.ReqFeatureIndex;
+
+ return HB_Err_Ok;
+ }
+
+ return HB_Err_Not_Covered;
+}
+
+
+/* selecting 0xFFFF for language_index asks for the values of the
+ default language (DefaultLangSys) */
+
+
+HB_Error HB_GPOS_Select_Feature( HB_GPOSHeader* gpos,
+ HB_UInt feature_tag,
+ HB_UShort script_index,
+ HB_UShort language_index,
+ HB_UShort* feature_index )
+{
+ HB_UShort n;
+
+ HB_ScriptList* sl;
+ HB_ScriptRecord* sr;
+ HB_ScriptTable* s;
+ HB_LangSysRecord* lsr;
+ HB_LangSys* ls;
+ HB_UShort* fi;
+
+ HB_FeatureList* fl;
+ HB_FeatureRecord* fr;
+
+
+ if ( !gpos || !feature_index )
+ return ERR(HB_Err_Invalid_Argument);
+
+ sl = &gpos->ScriptList;
+ sr = sl->ScriptRecord;
+
+ fl = &gpos->FeatureList;
+ fr = fl->FeatureRecord;
+
+ if ( script_index >= sl->ScriptCount )
+ return ERR(HB_Err_Invalid_Argument);
+
+ s = &sr[script_index].Script;
+ lsr = s->LangSysRecord;
+
+ if ( language_index == 0xFFFF )
+ ls = &s->DefaultLangSys;
+ else
+ {
+ if ( language_index >= s->LangSysCount )
+ return ERR(HB_Err_Invalid_Argument);
+
+ ls = &lsr[language_index].LangSys;
+ }
+
+ fi = ls->FeatureIndex;
+
+ for ( n = 0; n < ls->FeatureCount; n++ )
+ {
+ if ( fi[n] >= fl->FeatureCount )
+ return ERR(HB_Err_Invalid_SubTable_Format);
+
+ if ( feature_tag == fr[fi[n]].FeatureTag )
+ {
+ *feature_index = fi[n];
+
+ return HB_Err_Ok;
+ }
+ }
+
+ return HB_Err_Not_Covered;
+}
+
+
+/* The next three functions return a null-terminated list */
+
+
+HB_Error HB_GPOS_Query_Scripts( HB_GPOSHeader* gpos,
+ HB_UInt** script_tag_list )
+{
+ HB_Error error;
+ HB_UShort n;
+ HB_UInt* stl;
+
+ HB_ScriptList* sl;
+ HB_ScriptRecord* sr;
+
+
+ if ( !gpos || !script_tag_list )
+ return ERR(HB_Err_Invalid_Argument);
+
+ sl = &gpos->ScriptList;
+ sr = sl->ScriptRecord;
+
+ if ( ALLOC_ARRAY( stl, sl->ScriptCount + 1, HB_UInt ) )
+ return error;
+
+ for ( n = 0; n < sl->ScriptCount; n++ )
+ stl[n] = sr[n].ScriptTag;
+ stl[n] = 0;
+
+ *script_tag_list = stl;
+
+ return HB_Err_Ok;
+}
+
+
+
+HB_Error HB_GPOS_Query_Languages( HB_GPOSHeader* gpos,
+ HB_UShort script_index,
+ HB_UInt** language_tag_list )
+{
+ HB_Error error;
+ HB_UShort n;
+ HB_UInt* ltl;
+
+ HB_ScriptList* sl;
+ HB_ScriptRecord* sr;
+ HB_ScriptTable* s;
+ HB_LangSysRecord* lsr;
+
+
+ if ( !gpos || !language_tag_list )
+ return ERR(HB_Err_Invalid_Argument);
+
+ sl = &gpos->ScriptList;
+ sr = sl->ScriptRecord;
+
+ if ( script_index >= sl->ScriptCount )
+ return ERR(HB_Err_Invalid_Argument);
+
+ s = &sr[script_index].Script;
+ lsr = s->LangSysRecord;
+
+ if ( ALLOC_ARRAY( ltl, s->LangSysCount + 1, HB_UInt ) )
+ return error;
+
+ for ( n = 0; n < s->LangSysCount; n++ )
+ ltl[n] = lsr[n].LangSysTag;
+ ltl[n] = 0;
+
+ *language_tag_list = ltl;
+
+ return HB_Err_Ok;
+}
+
+
+/* selecting 0xFFFF for language_index asks for the values of the
+ default language (DefaultLangSys) */
+
+
+HB_Error HB_GPOS_Query_Features( HB_GPOSHeader* gpos,
+ HB_UShort script_index,
+ HB_UShort language_index,
+ HB_UInt** feature_tag_list )
+{
+ HB_UShort n;
+ HB_Error error;
+ HB_UInt* ftl;
+
+ HB_ScriptList* sl;
+ HB_ScriptRecord* sr;
+ HB_ScriptTable* s;
+ HB_LangSysRecord* lsr;
+ HB_LangSys* ls;
+ HB_UShort* fi;
+
+ HB_FeatureList* fl;
+ HB_FeatureRecord* fr;
+
+
+ if ( !gpos || !feature_tag_list )
+ return ERR(HB_Err_Invalid_Argument);
+
+ sl = &gpos->ScriptList;
+ sr = sl->ScriptRecord;
+
+ fl = &gpos->FeatureList;
+ fr = fl->FeatureRecord;
+
+ if ( script_index >= sl->ScriptCount )
+ return ERR(HB_Err_Invalid_Argument);
+
+ s = &sr[script_index].Script;
+ lsr = s->LangSysRecord;
+
+ if ( language_index == 0xFFFF )
+ ls = &s->DefaultLangSys;
+ else
+ {
+ if ( language_index >= s->LangSysCount )
+ return ERR(HB_Err_Invalid_Argument);
+
+ ls = &lsr[language_index].LangSys;
+ }
+
+ fi = ls->FeatureIndex;
+
+ if ( ALLOC_ARRAY( ftl, ls->FeatureCount + 1, HB_UInt ) )
+ return error;
+
+ for ( n = 0; n < ls->FeatureCount; n++ )
+ {
+ if ( fi[n] >= fl->FeatureCount )
+ {
+ FREE( ftl );
+ return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+ ftl[n] = fr[fi[n]].FeatureTag;
+ }
+ ftl[n] = 0;
+
+ *feature_tag_list = ftl;
+
+ return HB_Err_Ok;
+}
+
+
+/* Do an individual subtable lookup. Returns HB_Err_Ok if positioning
+ has been done, or HB_Err_Not_Covered if not. */
+static HB_Error GPOS_Do_Glyph_Lookup( GPOS_Instance* gpi,
+ HB_UShort lookup_index,
+ HB_Buffer buffer,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_Error error = HB_Err_Not_Covered;
+ HB_UShort i, flags, lookup_count;
+ HB_GPOSHeader* gpos = gpi->gpos;
+ HB_Lookup* lo;
+ int lookup_type;
+
+
+ nesting_level++;
+
+ if ( nesting_level > HB_MAX_NESTING_LEVEL )
+ return ERR(HB_Err_Not_Covered); /* ERR() call intended */
+
+ lookup_count = gpos->LookupList.LookupCount;
+ if (lookup_index >= lookup_count)
+ return error;
+
+ lo = &gpos->LookupList.Lookup[lookup_index];
+ flags = lo->LookupFlag;
+ lookup_type = lo->LookupType;
+
+ for ( i = 0; i < lo->SubTableCount; i++ )
+ {
+ HB_GPOS_SubTable *st = &lo->SubTable[i].st.gpos;
+
+ switch (lookup_type) {
+ case HB_GPOS_LOOKUP_SINGLE:
+ error = Lookup_SinglePos ( gpi, st, buffer, flags, context_length, nesting_level ); break;
+ case HB_GPOS_LOOKUP_PAIR:
+ error = Lookup_PairPos ( gpi, st, buffer, flags, context_length, nesting_level ); break;
+ case HB_GPOS_LOOKUP_CURSIVE:
+ error = Lookup_CursivePos ( gpi, st, buffer, flags, context_length, nesting_level ); break;
+ case HB_GPOS_LOOKUP_MARKBASE:
+ error = Lookup_MarkBasePos ( gpi, st, buffer, flags, context_length, nesting_level ); break;
+ case HB_GPOS_LOOKUP_MARKLIG:
+ error = Lookup_MarkLigPos ( gpi, st, buffer, flags, context_length, nesting_level ); break;
+ case HB_GPOS_LOOKUP_MARKMARK:
+ error = Lookup_MarkMarkPos ( gpi, st, buffer, flags, context_length, nesting_level ); break;
+ case HB_GPOS_LOOKUP_CONTEXT:
+ error = Lookup_ContextPos ( gpi, st, buffer, flags, context_length, nesting_level ); break;
+ case HB_GPOS_LOOKUP_CHAIN:
+ error = Lookup_ChainContextPos ( gpi, st, buffer, flags, context_length, nesting_level ); break;
+ /*case HB_GPOS_LOOKUP_EXTENSION:
+ error = Lookup_ExtensionPos ( gpi, st, buffer, flags, context_length, nesting_level ); break;*/
+ default:
+ error = HB_Err_Not_Covered;
+ }
+
+ /* Check whether we have a successful positioning or an error other
+ than HB_Err_Not_Covered */
+ if ( error != HB_Err_Not_Covered )
+ return error;
+ }
+
+ return HB_Err_Not_Covered;
+}
+
+
+HB_INTERNAL HB_Error
+_HB_GPOS_Load_SubTable( HB_GPOS_SubTable* st,
+ HB_Stream stream,
+ HB_UShort lookup_type )
+{
+ switch ( lookup_type ) {
+ case HB_GPOS_LOOKUP_SINGLE: return Load_SinglePos ( st, stream );
+ case HB_GPOS_LOOKUP_PAIR: return Load_PairPos ( st, stream );
+ case HB_GPOS_LOOKUP_CURSIVE: return Load_CursivePos ( st, stream );
+ case HB_GPOS_LOOKUP_MARKBASE: return Load_MarkBasePos ( st, stream );
+ case HB_GPOS_LOOKUP_MARKLIG: return Load_MarkLigPos ( st, stream );
+ case HB_GPOS_LOOKUP_MARKMARK: return Load_MarkMarkPos ( st, stream );
+ case HB_GPOS_LOOKUP_CONTEXT: return Load_ContextPos ( st, stream );
+ case HB_GPOS_LOOKUP_CHAIN: return Load_ChainContextPos ( st, stream );
+ /*case HB_GPOS_LOOKUP_EXTENSION: return Load_ExtensionPos ( st, stream );*/
+ default: return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+}
+
+
+HB_INTERNAL void
+_HB_GPOS_Free_SubTable( HB_GPOS_SubTable* st,
+ HB_UShort lookup_type )
+{
+ switch ( lookup_type ) {
+ case HB_GPOS_LOOKUP_SINGLE: Free_SinglePos ( st ); return;
+ case HB_GPOS_LOOKUP_PAIR: Free_PairPos ( st ); return;
+ case HB_GPOS_LOOKUP_CURSIVE: Free_CursivePos ( st ); return;
+ case HB_GPOS_LOOKUP_MARKBASE: Free_MarkBasePos ( st ); return;
+ case HB_GPOS_LOOKUP_MARKLIG: Free_MarkLigPos ( st ); return;
+ case HB_GPOS_LOOKUP_MARKMARK: Free_MarkMarkPos ( st ); return;
+ case HB_GPOS_LOOKUP_CONTEXT: Free_ContextPos ( st ); return;
+ case HB_GPOS_LOOKUP_CHAIN: Free_ChainContextPos ( st ); return;
+ /*case HB_GPOS_LOOKUP_EXTENSION: Free_ExtensionPos ( st ); return;*/
+ default: return;
+ }
+}
+
+
+/* apply one lookup to the input string object */
+
+static HB_Error GPOS_Do_String_Lookup( GPOS_Instance* gpi,
+ HB_UShort lookup_index,
+ HB_Buffer buffer )
+{
+ HB_Error error, retError = HB_Err_Not_Covered;
+ HB_GPOSHeader* gpos = gpi->gpos;
+
+ HB_UInt* properties = gpos->LookupList.Properties;
+
+ const int nesting_level = 0;
+ /* 0xFFFF indicates that we don't have a context length yet */
+ const HB_UShort context_length = 0xFFFF;
+
+
+ gpi->last = 0xFFFF; /* no last valid glyph for cursive pos. */
+
+ buffer->in_pos = 0;
+ while ( buffer->in_pos < buffer->in_length )
+ {
+ if ( ~IN_PROPERTIES( buffer->in_pos ) & properties[lookup_index] )
+ {
+ /* Note that the connection between mark and base glyphs hold
+ exactly one (string) lookup. For example, it would be possible
+ that in the first lookup, mark glyph X is attached to base
+ glyph A, and in the next lookup it is attached to base glyph B.
+ It is up to the font designer to provide meaningful lookups and
+ lookup order. */
+
+ error = GPOS_Do_Glyph_Lookup( gpi, lookup_index, buffer, context_length, nesting_level );
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+ }
+ else
+ {
+ /* Contrary to properties defined in GDEF, user-defined properties
+ will always stop a possible cursive positioning. */
+ gpi->last = 0xFFFF;
+
+ error = HB_Err_Not_Covered;
+ }
+
+ if ( error == HB_Err_Not_Covered )
+ (buffer->in_pos)++;
+ else
+ retError = error;
+ }
+
+ return retError;
+}
+
+
+static HB_Error Position_CursiveChain ( HB_Buffer buffer )
+{
+ HB_UInt i, j;
+ HB_Position positions = buffer->positions;
+
+ /* First handle all left-to-right connections */
+ for (j = 0; j < buffer->in_length; j++)
+ {
+ if (positions[j].cursive_chain > 0)
+ positions[j].y_pos += positions[j - positions[j].cursive_chain].y_pos;
+ }
+
+ /* Then handle all right-to-left connections */
+ for (i = buffer->in_length; i > 0; i--)
+ {
+ j = i - 1;
+
+ if (positions[j].cursive_chain < 0)
+ positions[j].y_pos += positions[j - positions[j].cursive_chain].y_pos;
+ }
+
+ return HB_Err_Ok;
+}
+
+
+HB_Error HB_GPOS_Add_Feature( HB_GPOSHeader* gpos,
+ HB_UShort feature_index,
+ HB_UInt property )
+{
+ HB_UShort i;
+
+ HB_Feature feature;
+ HB_UInt* properties;
+ HB_UShort* index;
+ HB_UShort lookup_count;
+
+ /* Each feature can only be added once */
+
+ if ( !gpos ||
+ feature_index >= gpos->FeatureList.FeatureCount ||
+ gpos->FeatureList.ApplyCount == gpos->FeatureList.FeatureCount )
+ return ERR(HB_Err_Invalid_Argument);
+
+ gpos->FeatureList.ApplyOrder[gpos->FeatureList.ApplyCount++] = feature_index;
+
+ properties = gpos->LookupList.Properties;
+
+ feature = gpos->FeatureList.FeatureRecord[feature_index].Feature;
+ index = feature.LookupListIndex;
+ lookup_count = gpos->LookupList.LookupCount;
+
+ for ( i = 0; i < feature.LookupListCount; i++ )
+ {
+ HB_UShort lookup_index = index[i];
+ if (lookup_index < lookup_count)
+ properties[lookup_index] |= property;
+ }
+
+ return HB_Err_Ok;
+}
+
+
+
+HB_Error HB_GPOS_Clear_Features( HB_GPOSHeader* gpos )
+{
+ HB_UShort i;
+
+ HB_UInt* properties;
+
+
+ if ( !gpos )
+ return ERR(HB_Err_Invalid_Argument);
+
+ gpos->FeatureList.ApplyCount = 0;
+
+ properties = gpos->LookupList.Properties;
+
+ for ( i = 0; i < gpos->LookupList.LookupCount; i++ )
+ properties[i] = 0;
+
+ return HB_Err_Ok;
+}
+
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+HB_Error HB_GPOS_Register_MM_Function( HB_GPOSHeader* gpos,
+ HB_MMFunction mmfunc,
+ void* data )
+{
+ if ( !gpos )
+ return ERR(HB_Err_Invalid_Argument);
+
+ gpos->mmfunc = mmfunc;
+ gpos->data = data;
+
+ return HB_Err_Ok;
+}
+#endif
+
+/* If `dvi' is TRUE, glyph contour points for anchor points and device
+ tables are ignored -- you will get device independent values. */
+
+
+HB_Error HB_GPOS_Apply_String( HB_Font font,
+ HB_GPOSHeader* gpos,
+ HB_UShort load_flags,
+ HB_Buffer buffer,
+ HB_Bool dvi,
+ HB_Bool r2l )
+{
+ HB_Error error, retError = HB_Err_Not_Covered;
+ GPOS_Instance gpi;
+ int i, j, lookup_count, num_features;
+
+ if ( !font || !gpos || !buffer )
+ return ERR(HB_Err_Invalid_Argument);
+
+ if ( buffer->in_length == 0 )
+ return HB_Err_Not_Covered;
+
+ gpi.font = font;
+ gpi.gpos = gpos;
+ gpi.load_flags = load_flags;
+ gpi.r2l = r2l;
+ gpi.dvi = dvi;
+
+ lookup_count = gpos->LookupList.LookupCount;
+ num_features = gpos->FeatureList.ApplyCount;
+
+ if ( num_features )
+ {
+ error = _hb_buffer_clear_positions( buffer );
+ if ( error )
+ return error;
+ }
+
+ for ( i = 0; i < num_features; i++ )
+ {
+ HB_UShort feature_index = gpos->FeatureList.ApplyOrder[i];
+ HB_Feature feature = gpos->FeatureList.FeatureRecord[feature_index].Feature;
+
+ for ( j = 0; j < feature.LookupListCount; j++ )
+ {
+ HB_UShort lookup_index = feature.LookupListIndex[j];
+
+ /* Skip nonexistant lookups */
+ if (lookup_index >= lookup_count)
+ continue;
+
+ error = GPOS_Do_String_Lookup( &gpi, lookup_index, buffer );
+ if ( error )
+ {
+ if ( error != HB_Err_Not_Covered )
+ return error;
+ }
+ else
+ retError = error;
+ }
+ }
+
+ if ( num_features )
+ {
+ error = Position_CursiveChain ( buffer );
+ if ( error )
+ return error;
+ }
+
+ return retError;
+}
+
+/* END */
diff --git a/src/hb-old/harfbuzz-gpos.h b/src/hb-old/harfbuzz-gpos.h
new file mode 100644
index 0000000..92bff84
--- /dev/null
+++ b/src/hb-old/harfbuzz-gpos.h
@@ -0,0 +1,155 @@
+/*
+ * Copyright (C) 1998-2004 David Turner and Werner Lemberg
+ * Copyright (C) 2006 Behdad Esfahbod
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#ifndef HARFBUZZ_GPOS_H
+#define HARFBUZZ_GPOS_H
+
+#include "harfbuzz-gdef.h"
+#include "harfbuzz-buffer.h"
+
+HB_BEGIN_HEADER
+
+
+/* Lookup types for glyph positioning */
+
+#define HB_GPOS_LOOKUP_SINGLE 1
+#define HB_GPOS_LOOKUP_PAIR 2
+#define HB_GPOS_LOOKUP_CURSIVE 3
+#define HB_GPOS_LOOKUP_MARKBASE 4
+#define HB_GPOS_LOOKUP_MARKLIG 5
+#define HB_GPOS_LOOKUP_MARKMARK 6
+#define HB_GPOS_LOOKUP_CONTEXT 7
+#define HB_GPOS_LOOKUP_CHAIN 8
+#define HB_GPOS_LOOKUP_EXTENSION 9
+
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+/* A pointer to a function which accesses the PostScript interpreter.
+ Multiple Master fonts need this interface to convert a metric ID
+ (as stored in an OpenType font version 1.2 or higher) `metric_id'
+ into a metric value (returned in `metric_value').
+
+ `data' points to the user-defined structure specified during a
+ call to HB_GPOS_Register_MM_Function().
+
+ `metric_value' must be returned as a scaled value (but shouldn't
+ be rounded). */
+
+typedef HB_Error (*HB_MMFunction)(HB_Font font,
+ HB_UShort metric_id,
+ HB_Fixed* metric_value,
+ void* data );
+#endif
+
+
+struct HB_GPOSHeader_
+{
+ HB_16Dot16 Version;
+
+ HB_ScriptList ScriptList;
+ HB_FeatureList FeatureList;
+ HB_LookupList LookupList;
+
+ HB_GDEFHeader* gdef;
+
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+ /* this is OpenType 1.2 -- Multiple Master fonts need this
+ callback function to get various metric values from the
+ PostScript interpreter. */
+
+ HB_MMFunction mmfunc;
+ void* data;
+#endif
+};
+
+typedef struct HB_GPOSHeader_ HB_GPOSHeader;
+typedef HB_GPOSHeader* HB_GPOS;
+
+
+HB_Error HB_Load_GPOS_Table( HB_Stream stream,
+ HB_GPOSHeader** gpos,
+ HB_GDEFHeader* gdef,
+ HB_Stream gdefStream );
+
+
+HB_Error HB_Done_GPOS_Table( HB_GPOSHeader* gpos );
+
+
+HB_Error HB_GPOS_Select_Script( HB_GPOSHeader* gpos,
+ HB_UInt script_tag,
+ HB_UShort* script_index );
+
+HB_Error HB_GPOS_Select_Language( HB_GPOSHeader* gpos,
+ HB_UInt language_tag,
+ HB_UShort script_index,
+ HB_UShort* language_index,
+ HB_UShort* req_feature_index );
+
+HB_Error HB_GPOS_Select_Feature( HB_GPOSHeader* gpos,
+ HB_UInt feature_tag,
+ HB_UShort script_index,
+ HB_UShort language_index,
+ HB_UShort* feature_index );
+
+
+HB_Error HB_GPOS_Query_Scripts( HB_GPOSHeader* gpos,
+ HB_UInt** script_tag_list );
+
+HB_Error HB_GPOS_Query_Languages( HB_GPOSHeader* gpos,
+ HB_UShort script_index,
+ HB_UInt** language_tag_list );
+
+HB_Error HB_GPOS_Query_Features( HB_GPOSHeader* gpos,
+ HB_UShort script_index,
+ HB_UShort language_index,
+ HB_UInt** feature_tag_list );
+
+
+HB_Error HB_GPOS_Add_Feature( HB_GPOSHeader* gpos,
+ HB_UShort feature_index,
+ HB_UInt property );
+
+HB_Error HB_GPOS_Clear_Features( HB_GPOSHeader* gpos );
+
+
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
+HB_Error HB_GPOS_Register_MM_Function( HB_GPOSHeader* gpos,
+ HB_MMFunction mmfunc,
+ void* data );
+#endif
+
+/* If `dvi' is TRUE, glyph contour points for anchor points and device
+ tables are ignored -- you will get device independent values. */
+
+
+HB_Error HB_GPOS_Apply_String( HB_Font font,
+ HB_GPOSHeader* gpos,
+ HB_UShort load_flags,
+ HB_Buffer buffer,
+ HB_Bool dvi,
+ HB_Bool r2l );
+
+HB_END_HEADER
+
+#endif /* HARFBUZZ_GPOS_H */
diff --git a/src/hb-old/harfbuzz-greek.c b/src/hb-old/harfbuzz-greek.c
new file mode 100644
index 0000000..2e9b858
--- /dev/null
+++ b/src/hb-old/harfbuzz-greek.c
@@ -0,0 +1,447 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#include "harfbuzz-shaper.h"
+#include "harfbuzz-shaper-private.h"
+#include <assert.h>
+
+#ifndef NO_OPENTYPE
+static const HB_OpenTypeFeature greek_features[] = {
+ { HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty },
+ { HB_MAKE_TAG('l', 'i', 'g', 'a'), CcmpProperty },
+ { HB_MAKE_TAG('c', 'l', 'i', 'g'), CcmpProperty },
+ {0, 0}
+};
+#endif
+
+/*
+ Greek decompositions
+*/
+
+
+typedef struct _hb_greek_decomposition {
+ HB_UChar16 composed;
+ HB_UChar16 base;
+} hb_greek_decomposition;
+
+static const hb_greek_decomposition decompose_0x300[] = {
+ { 0x1FBA, 0x0391 },
+ { 0x1FC8, 0x0395 },
+ { 0x1FCA, 0x0397 },
+ { 0x1FDA, 0x0399 },
+ { 0x1FF8, 0x039F },
+ { 0x1FEA, 0x03A5 },
+ { 0x1FFA, 0x03A9 },
+ { 0x1F70, 0x03B1 },
+ { 0x1F72, 0x03B5 },
+ { 0x1F74, 0x03B7 },
+ { 0x1F76, 0x03B9 },
+ { 0x1F78, 0x03BF },
+ { 0x1F7A, 0x03C5 },
+ { 0x1F7C, 0x03C9 },
+ { 0x1FD2, 0x03CA },
+ { 0x1FE2, 0x03CB },
+ { 0x1F02, 0x1F00 },
+ { 0, 0 }
+};
+
+static HB_UChar16 compose_0x300(HB_UChar16 base)
+{
+ if ((base ^ 0x1f00) < 0x100) {
+ if (base <= 0x1f69 && !(base & 0x6))
+ return base + 2;
+ if (base == 0x1fbf)
+ return 0x1fcd;
+ if (base == 0x1ffe)
+ return 0x1fdd;
+ return 0;
+ }
+ {
+ const hb_greek_decomposition *d = decompose_0x300;
+ while (d->base && d->base != base)
+ ++d;
+ return d->composed;
+ }
+}
+
+static const hb_greek_decomposition decompose_0x301[] = {
+ { 0x0386, 0x0391 },
+ { 0x0388, 0x0395 },
+ { 0x0389, 0x0397 },
+ { 0x038A, 0x0399 },
+ { 0x038C, 0x039F },
+ { 0x038E, 0x03A5 },
+ { 0x038F, 0x03A9 },
+ { 0x03AC, 0x03B1 },
+ { 0x03AD, 0x03B5 },
+ { 0x03AE, 0x03B7 },
+ { 0x03AF, 0x03B9 },
+ { 0x03CC, 0x03BF },
+ { 0x03CD, 0x03C5 },
+ { 0x03CE, 0x03C9 },
+ { 0x0390, 0x03CA },
+ { 0x03B0, 0x03CB },
+ { 0x03D3, 0x03D2 },
+ { 0, 0 }
+};
+
+
+static HB_UChar16 compose_0x301(HB_UChar16 base)
+{
+ if ((base ^ 0x1f00) < 0x100) {
+ if (base <= 0x1f69 && !(base & 0x6))
+ return base + 4;
+ if (base == 0x1fbf)
+ return 0x1fce;
+ if (base == 0x1ffe)
+ return 0x1fde;
+ }
+ {
+ const hb_greek_decomposition *d = decompose_0x301;
+ while (d->base && d->base != base)
+ ++d;
+ return d->composed;
+ }
+}
+
+static const hb_greek_decomposition decompose_0x304[] = {
+ { 0x1FB9, 0x0391 },
+ { 0x1FD9, 0x0399 },
+ { 0x1FE9, 0x03A5 },
+ { 0x1FB1, 0x03B1 },
+ { 0x1FD1, 0x03B9 },
+ { 0x1FE1, 0x03C5 },
+ { 0, 0 }
+};
+
+static HB_UChar16 compose_0x304(HB_UChar16 base)
+{
+ const hb_greek_decomposition *d = decompose_0x304;
+ while (d->base && d->base != base)
+ ++d;
+ return d->composed;
+}
+
+static const hb_greek_decomposition decompose_0x306[] = {
+ { 0x1FB8, 0x0391 },
+ { 0x1FD8, 0x0399 },
+ { 0x1FE8, 0x03A5 },
+ { 0x1FB0, 0x03B1 },
+ { 0x1FD0, 0x03B9 },
+ { 0x1FE0, 0x03C5 },
+ { 0, 0 }
+};
+
+static HB_UChar16 compose_0x306(HB_UChar16 base)
+{
+ const hb_greek_decomposition *d = decompose_0x306;
+ while (d->base && d->base != base)
+ ++d;
+ return d->composed;
+}
+
+static const hb_greek_decomposition decompose_0x308[] = {
+ { 0x03AA, 0x0399 },
+ { 0x03AB, 0x03A5 },
+ { 0x03CA, 0x03B9 },
+ { 0x03CB, 0x03C5 },
+ { 0x03D4, 0x03D2 },
+ { 0, 0 }
+};
+
+static HB_UChar16 compose_0x308(HB_UChar16 base)
+{
+ const hb_greek_decomposition *d = decompose_0x308;
+ while (d->base && d->base != base)
+ ++d;
+ return d->composed;
+}
+
+
+static const hb_greek_decomposition decompose_0x313[] = {
+ { 0x1F08, 0x0391 },
+ { 0x1F18, 0x0395 },
+ { 0x1F28, 0x0397 },
+ { 0x1F38, 0x0399 },
+ { 0x1F48, 0x039F },
+ { 0x1F68, 0x03A9 },
+ { 0x1F00, 0x03B1 },
+ { 0x1F10, 0x03B5 },
+ { 0x1F20, 0x03B7 },
+ { 0x1F30, 0x03B9 },
+ { 0x1F40, 0x03BF },
+ { 0x1FE4, 0x03C1 },
+ { 0x1F50, 0x03C5 },
+ { 0x1F60, 0x03C9 },
+ { 0, 0 }
+};
+
+static HB_UChar16 compose_0x313(HB_UChar16 base)
+{
+ const hb_greek_decomposition *d = decompose_0x313;
+ while (d->base && d->base != base)
+ ++d;
+ return d->composed;
+}
+
+static const hb_greek_decomposition decompose_0x314[] = {
+ { 0x1F09, 0x0391 },
+ { 0x1F19, 0x0395 },
+ { 0x1F29, 0x0397 },
+ { 0x1F39, 0x0399 },
+ { 0x1F49, 0x039F },
+ { 0x1FEC, 0x03A1 },
+ { 0x1F59, 0x03A5 },
+ { 0x1F69, 0x03A9 },
+ { 0x1F01, 0x03B1 },
+ { 0x1F11, 0x03B5 },
+ { 0x1F21, 0x03B7 },
+ { 0x1F31, 0x03B9 },
+ { 0x1F41, 0x03BF },
+ { 0x1FE5, 0x03C1 },
+ { 0x1F51, 0x03C5 },
+ { 0x1F61, 0x03C9 },
+ { 0, 0 }
+};
+
+static HB_UChar16 compose_0x314(HB_UChar16 base)
+{
+ const hb_greek_decomposition *d = decompose_0x314;
+ while (d->base && d->base != base)
+ ++d;
+ return d->composed;
+}
+
+static const hb_greek_decomposition decompose_0x342[] = {
+ { 0x1FB6, 0x03B1 },
+ { 0x1FC6, 0x03B7 },
+ { 0x1FD6, 0x03B9 },
+ { 0x1FE6, 0x03C5 },
+ { 0x1FF6, 0x03C9 },
+ { 0x1FD7, 0x03CA },
+ { 0x1FE7, 0x03CB },
+ { 0x1F06, 0x1F00 },
+ { 0x1F07, 0x1F01 },
+ { 0x1F0E, 0x1F08 },
+ { 0x1F0F, 0x1F09 },
+ { 0x1F26, 0x1F20 },
+ { 0x1F27, 0x1F21 },
+ { 0x1F2E, 0x1F28 },
+ { 0x1F2F, 0x1F29 },
+ { 0x1F36, 0x1F30 },
+ { 0x1F37, 0x1F31 },
+ { 0x1F3E, 0x1F38 },
+ { 0x1F3F, 0x1F39 },
+ { 0x1F56, 0x1F50 },
+ { 0x1F57, 0x1F51 },
+ { 0x1F5F, 0x1F59 },
+ { 0x1F66, 0x1F60 },
+ { 0x1F67, 0x1F61 },
+ { 0x1F6E, 0x1F68 },
+ { 0x1F6F, 0x1F69 },
+ { 0x1FCF, 0x1FBF },
+ { 0x1FDF, 0x1FFE },
+ { 0, 0 }
+};
+
+static HB_UChar16 compose_0x342(HB_UChar16 base)
+{
+ const hb_greek_decomposition *d = decompose_0x342;
+ while (d->base && d->base != base)
+ ++d;
+ return d->composed;
+}
+
+static const hb_greek_decomposition decompose_0x345[] = {
+ { 0x1FBC, 0x0391 },
+ { 0x1FCC, 0x0397 },
+ { 0x1FFC, 0x03A9 },
+ { 0x1FB4, 0x03AC },
+ { 0x1FC4, 0x03AE },
+ { 0x1FB3, 0x03B1 },
+ { 0x1FC3, 0x03B7 },
+ { 0x1FF3, 0x03C9 },
+ { 0x1FF4, 0x03CE },
+ { 0x1F80, 0x1F00 },
+ { 0x1F81, 0x1F01 },
+ { 0x1F82, 0x1F02 },
+ { 0x1F83, 0x1F03 },
+ { 0x1F84, 0x1F04 },
+ { 0x1F85, 0x1F05 },
+ { 0x1F86, 0x1F06 },
+ { 0x1F87, 0x1F07 },
+ { 0x1F88, 0x1F08 },
+ { 0x1F89, 0x1F09 },
+ { 0x1F8A, 0x1F0A },
+ { 0x1F8B, 0x1F0B },
+ { 0x1F8C, 0x1F0C },
+ { 0x1F8D, 0x1F0D },
+ { 0x1F8E, 0x1F0E },
+ { 0x1F8F, 0x1F0F },
+ { 0x1F90, 0x1F20 },
+ { 0x1F91, 0x1F21 },
+ { 0x1F92, 0x1F22 },
+ { 0x1F93, 0x1F23 },
+ { 0x1F94, 0x1F24 },
+ { 0x1F95, 0x1F25 },
+ { 0x1F96, 0x1F26 },
+ { 0x1F97, 0x1F27 },
+ { 0x1F98, 0x1F28 },
+ { 0x1F99, 0x1F29 },
+ { 0x1F9A, 0x1F2A },
+ { 0x1F9B, 0x1F2B },
+ { 0x1F9C, 0x1F2C },
+ { 0x1F9D, 0x1F2D },
+ { 0x1F9E, 0x1F2E },
+ { 0x1F9F, 0x1F2F },
+ { 0x1FA0, 0x1F60 },
+ { 0x1FA1, 0x1F61 },
+ { 0x1FA2, 0x1F62 },
+ { 0x1FA3, 0x1F63 },
+ { 0x1FA4, 0x1F64 },
+ { 0x1FA5, 0x1F65 },
+ { 0x1FA6, 0x1F66 },
+ { 0x1FA7, 0x1F67 },
+ { 0x1FA8, 0x1F68 },
+ { 0x1FA9, 0x1F69 },
+ { 0x1FAA, 0x1F6A },
+ { 0x1FAB, 0x1F6B },
+ { 0x1FAC, 0x1F6C },
+ { 0x1FAD, 0x1F6D },
+ { 0x1FAE, 0x1F6E },
+ { 0x1FAF, 0x1F6F },
+ { 0x1FB2, 0x1F70 },
+ { 0x1FC2, 0x1F74 },
+ { 0x1FF2, 0x1F7C },
+ { 0x1FB7, 0x1FB6 },
+ { 0x1FC7, 0x1FC6 },
+ { 0x1FF7, 0x1FF6 },
+ { 0, 0 }
+};
+
+static HB_UChar16 compose_0x345(HB_UChar16 base)
+{
+ const hb_greek_decomposition *d = decompose_0x345;
+ while (d->base && d->base != base)
+ ++d;
+ return d->composed;
+}
+
+/*
+ Greek shaping. Heuristic positioning can't render polytonic greek correctly. We're a lot
+ better off mapping greek chars with diacritics to the characters in the extended greek
+ region in Unicode if possible.
+*/
+HB_Bool HB_GreekShape(HB_ShaperItem *shaper_item)
+{
+ const int availableGlyphs = shaper_item->num_glyphs;
+ const HB_UChar16 *uc = shaper_item->string + shaper_item->item.pos;
+ unsigned short *logClusters = shaper_item->log_clusters;
+ HB_GlyphAttributes *attributes = shaper_item->attributes;
+
+ HB_Bool haveGlyphs;
+ int slen = 1;
+ int cluster_start = 0;
+ hb_uint32 i;
+
+ HB_STACKARRAY(HB_UChar16, shapedChars, 2 * shaper_item->item.length);
+
+ assert(shaper_item->item.script == HB_Script_Greek);
+
+ *shapedChars = *uc;
+ logClusters[0] = 0;
+
+ for (i = 1; i < shaper_item->item.length; ++i) {
+ hb_uint16 base = shapedChars[slen-1];
+ hb_uint16 shaped = 0;
+ if (uc[i] == 0x300)
+ shaped = compose_0x300(base);
+ else if (uc[i] == 0x301)
+ shaped = compose_0x301(base);
+ else if (uc[i] == 0x304)
+ shaped = compose_0x304(base);
+ else if (uc[i] == 0x306)
+ shaped = compose_0x306(base);
+ else if (uc[i] == 0x308)
+ shaped = compose_0x308(base);
+ else if (uc[i] == 0x313)
+ shaped = compose_0x313(base);
+ else if (uc[i] == 0x314)
+ shaped = compose_0x314(base);
+ else if (uc[i] == 0x342)
+ shaped = compose_0x342(base);
+ else if (uc[i] == 0x345)
+ shaped = compose_0x345(base);
+
+ if (shaped) {
+ if (shaper_item->font->klass->canRender(shaper_item->font, (HB_UChar16 *)&shaped, 1)) {
+ shapedChars[slen-1] = shaped;
+ } else {
+ shaped = 0;
+ }
+ }
+
+ if (!shaped) {
+ HB_CharCategory category;
+ int cmb;
+ shapedChars[slen] = uc[i];
+ HB_GetUnicodeCharProperties(uc[i], &category, &cmb);
+ if (category != HB_Mark_NonSpacing) {
+ attributes[slen].clusterStart = TRUE;
+ attributes[slen].mark = FALSE;
+ attributes[slen].combiningClass = 0;
+ attributes[slen].dontPrint = HB_IsControlChar(uc[i]);
+ cluster_start = slen;
+ } else {
+ attributes[slen].clusterStart = FALSE;
+ attributes[slen].mark = TRUE;
+ attributes[slen].combiningClass = cmb;
+ }
+ ++slen;
+ }
+ logClusters[i] = cluster_start;
+ }
+
+ haveGlyphs = shaper_item->font->klass
+ ->convertStringToGlyphIndices(shaper_item->font,
+ shapedChars, slen,
+ shaper_item->glyphs, &shaper_item->num_glyphs,
+ shaper_item->item.bidiLevel % 2);
+
+ HB_FREE_STACKARRAY(shapedChars);
+
+ if (!haveGlyphs)
+ return FALSE;
+
+#ifndef NO_OPENTYPE
+ if (HB_SelectScript(shaper_item, greek_features)) {
+ HB_OpenTypeShape(shaper_item, /*properties*/0);
+ return HB_OpenTypePosition(shaper_item, availableGlyphs, /*doLogClusters*/TRUE);
+ }
+#endif
+ HB_HeuristicPosition(shaper_item);
+
+ return TRUE;
+}
+
diff --git a/src/hb-old/harfbuzz-gsub-private.h b/src/hb-old/harfbuzz-gsub-private.h
new file mode 100644
index 0000000..7eb329e
--- /dev/null
+++ b/src/hb-old/harfbuzz-gsub-private.h
@@ -0,0 +1,483 @@
+/*
+ * Copyright (C) 1998-2004 David Turner and Werner Lemberg
+ * Copyright (C) 2006 Behdad Esfahbod
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#ifndef HARFBUZZ_GSUB_PRIVATE_H
+#define HARFBUZZ_GSUB_PRIVATE_H
+
+#include "harfbuzz-impl.h"
+#include "harfbuzz-stream-private.h"
+#include "harfbuzz-gsub.h"
+
+HB_BEGIN_HEADER
+
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(push, 1)
+#endif
+
+typedef union HB_GSUB_SubTable_ HB_GSUB_SubTable;
+
+/* LookupType 1 */
+
+struct HB_SingleSubstFormat1_
+{
+ HB_Short DeltaGlyphID; /* constant added to get
+ substitution glyph index */
+};
+
+typedef struct HB_SingleSubstFormat1_ HB_SingleSubstFormat1;
+
+
+struct HB_SingleSubstFormat2_
+{
+ HB_UShort* Substitute; /* array of substitute glyph IDs */
+ HB_UShort GlyphCount; /* number of glyph IDs in
+ Substitute array */
+};
+
+typedef struct HB_SingleSubstFormat2_ HB_SingleSubstFormat2;
+
+
+struct HB_SingleSubst_
+{
+ union
+ {
+ HB_SingleSubstFormat1 ssf1;
+ HB_SingleSubstFormat2 ssf2;
+ } ssf;
+
+ HB_Coverage Coverage; /* Coverage table */
+ HB_Byte SubstFormat; /* 1 or 2 */
+};
+
+typedef struct HB_SingleSubst_ HB_SingleSubst;
+
+
+/* LookupType 2 */
+
+struct HB_Sequence_
+{
+ HB_UShort* Substitute; /* string of glyph IDs to
+ substitute */
+ HB_UShort GlyphCount; /* number of glyph IDs in the
+ Substitute array */
+};
+
+typedef struct HB_Sequence_ HB_Sequence;
+
+
+struct HB_MultipleSubst_
+{
+ HB_Sequence* Sequence; /* array of Sequence tables */
+ HB_Coverage Coverage; /* Coverage table */
+ HB_UShort SubstFormat; /* always 1 */
+ HB_UShort SequenceCount; /* number of Sequence tables */
+};
+
+typedef struct HB_MultipleSubst_ HB_MultipleSubst;
+
+
+/* LookupType 3 */
+
+struct HB_AlternateSet_
+{
+ HB_UShort* Alternate; /* array of alternate glyph IDs */
+ HB_UShort GlyphCount; /* number of glyph IDs in the
+ Alternate array */
+};
+
+typedef struct HB_AlternateSet_ HB_AlternateSet;
+
+
+struct HB_AlternateSubst_
+{
+ HB_AlternateSet* AlternateSet; /* array of AlternateSet tables */
+ HB_Coverage Coverage; /* Coverage table */
+ HB_UShort SubstFormat; /* always 1 */
+ HB_UShort AlternateSetCount;
+ /* number of AlternateSet tables */
+};
+
+typedef struct HB_AlternateSubst_ HB_AlternateSubst;
+
+
+/* LookupType 4 */
+
+struct HB_Ligature_
+{
+ HB_UShort* Component; /* array of component glyph IDs */
+ HB_UShort LigGlyph; /* glyphID of ligature
+ to substitute */
+ HB_UShort ComponentCount; /* number of components in ligature */
+};
+
+typedef struct HB_Ligature_ HB_Ligature;
+
+
+struct HB_LigatureSet_
+{
+ HB_Ligature* Ligature; /* array of Ligature tables */
+ HB_UShort LigatureCount; /* number of Ligature tables */
+};
+
+typedef struct HB_LigatureSet_ HB_LigatureSet;
+
+
+struct HB_LigatureSubst_
+{
+ HB_LigatureSet* LigatureSet; /* array of LigatureSet tables */
+ HB_Coverage Coverage; /* Coverage table */
+ HB_UShort SubstFormat; /* always 1 */
+ HB_UShort LigatureSetCount; /* number of LigatureSet tables */
+};
+
+typedef struct HB_LigatureSubst_ HB_LigatureSubst;
+
+
+/* needed by both lookup type 5 and 6 */
+
+struct HB_SubstLookupRecord_
+{
+ HB_UShort SequenceIndex; /* index into current
+ glyph sequence */
+ HB_UShort LookupListIndex; /* Lookup to apply to that pos. */
+};
+
+typedef struct HB_SubstLookupRecord_ HB_SubstLookupRecord;
+
+
+/* LookupType 5 */
+
+struct HB_SubRule_
+{
+ HB_UShort* Input; /* array of input glyph IDs */
+ HB_SubstLookupRecord* SubstLookupRecord;
+ /* array of SubstLookupRecord
+ tables */
+ HB_UShort GlyphCount; /* total number of input glyphs */
+ HB_UShort SubstCount; /* number of SubstLookupRecord
+ tables */
+};
+
+typedef struct HB_SubRule_ HB_SubRule;
+
+
+struct HB_SubRuleSet_
+{
+ HB_SubRule* SubRule; /* array of SubRule tables */
+ HB_UShort SubRuleCount; /* number of SubRule tables */
+};
+
+typedef struct HB_SubRuleSet_ HB_SubRuleSet;
+
+
+struct HB_ContextSubstFormat1_
+{
+ HB_SubRuleSet* SubRuleSet; /* array of SubRuleSet tables */
+ HB_Coverage Coverage; /* Coverage table */
+ HB_UShort SubRuleSetCount; /* number of SubRuleSet tables */
+};
+
+typedef struct HB_ContextSubstFormat1_ HB_ContextSubstFormat1;
+
+
+struct HB_SubClassRule_
+{
+ HB_UShort* Class; /* array of classes */
+ HB_SubstLookupRecord* SubstLookupRecord;
+ /* array of SubstLookupRecord
+ tables */
+ HB_UShort GlyphCount; /* total number of context classes */
+ HB_UShort SubstCount; /* number of SubstLookupRecord
+ tables */
+};
+
+typedef struct HB_SubClassRule_ HB_SubClassRule;
+
+
+struct HB_SubClassSet_
+{
+ HB_SubClassRule* SubClassRule; /* array of SubClassRule tables */
+ HB_UShort SubClassRuleCount;
+ /* number of SubClassRule tables */
+};
+
+typedef struct HB_SubClassSet_ HB_SubClassSet;
+
+
+/* The `MaxContextLength' field is not defined in the TTO specification
+ but simplifies the implementation of this format. It holds the
+ maximal context length used in the context rules. */
+
+struct HB_ContextSubstFormat2_
+{
+ HB_SubClassSet* SubClassSet; /* array of SubClassSet tables */
+ HB_Coverage Coverage; /* Coverage table */
+ HB_ClassDefinition ClassDef; /* ClassDef table */
+ HB_UShort SubClassSetCount;
+ /* number of SubClassSet tables */
+ HB_UShort MaxContextLength;
+ /* maximal context length */
+};
+
+typedef struct HB_ContextSubstFormat2_ HB_ContextSubstFormat2;
+
+
+struct HB_ContextSubstFormat3_
+{
+ HB_Coverage* Coverage; /* array of Coverage tables */
+ HB_SubstLookupRecord* SubstLookupRecord;
+ /* array of substitution lookups */
+ HB_UShort GlyphCount; /* number of input glyphs */
+ HB_UShort SubstCount; /* number of SubstLookupRecords */
+};
+
+typedef struct HB_ContextSubstFormat3_ HB_ContextSubstFormat3;
+
+
+struct HB_ContextSubst_
+{
+ union
+ {
+ HB_ContextSubstFormat1 csf1;
+ HB_ContextSubstFormat2 csf2;
+ HB_ContextSubstFormat3 csf3;
+ } csf;
+
+ HB_Byte SubstFormat; /* 1, 2, or 3 */
+};
+
+typedef struct HB_ContextSubst_ HB_ContextSubst;
+
+
+/* LookupType 6 */
+
+struct HB_ChainSubRule_
+{
+ HB_UShort* Backtrack; /* array of backtrack glyph IDs */
+ HB_UShort* Input; /* array of input glyph IDs */
+ HB_UShort* Lookahead; /* array of lookahead glyph IDs */
+ HB_SubstLookupRecord* SubstLookupRecord;
+ /* array of SubstLookupRecords */
+ HB_UShort BacktrackGlyphCount;
+ /* total number of backtrack glyphs */
+ HB_UShort InputGlyphCount;
+ /* total number of input glyphs */
+ HB_UShort LookaheadGlyphCount;
+ /* total number of lookahead glyphs */
+ HB_UShort SubstCount; /* number of SubstLookupRecords */
+};
+
+typedef struct HB_ChainSubRule_ HB_ChainSubRule;
+
+
+struct HB_ChainSubRuleSet_
+{
+ HB_ChainSubRule* ChainSubRule; /* array of ChainSubRule tables */
+ HB_UShort ChainSubRuleCount;
+ /* number of ChainSubRule tables */
+};
+
+typedef struct HB_ChainSubRuleSet_ HB_ChainSubRuleSet;
+
+
+struct HB_ChainContextSubstFormat1_
+{
+ HB_ChainSubRuleSet* ChainSubRuleSet;
+ /* array of ChainSubRuleSet tables */
+ HB_Coverage Coverage; /* Coverage table */
+ HB_UShort ChainSubRuleSetCount;
+ /* number of ChainSubRuleSet tables */
+};
+
+typedef struct HB_ChainContextSubstFormat1_ HB_ChainContextSubstFormat1;
+
+
+struct HB_ChainSubClassRule_
+{
+ HB_UShort* Backtrack; /* array of backtrack classes */
+ HB_UShort* Input; /* array of context classes */
+ HB_UShort* Lookahead; /* array of lookahead classes */
+ HB_SubstLookupRecord* SubstLookupRecord;
+ /* array of substitution lookups */
+ HB_UShort BacktrackGlyphCount;
+ /* total number of backtrack
+ classes */
+ HB_UShort InputGlyphCount;
+ /* total number of context classes */
+ HB_UShort LookaheadGlyphCount;
+ /* total number of lookahead
+ classes */
+ HB_UShort SubstCount; /* number of SubstLookupRecords */
+};
+
+typedef struct HB_ChainSubClassRule_ HB_ChainSubClassRule;
+
+
+struct HB_ChainSubClassSet_
+{
+ HB_ChainSubClassRule* ChainSubClassRule;
+ /* array of ChainSubClassRule
+ tables */
+ HB_UShort ChainSubClassRuleCount;
+ /* number of ChainSubClassRule
+ tables */
+};
+
+typedef struct HB_ChainSubClassSet_ HB_ChainSubClassSet;
+
+
+/* The `MaxXXXLength' fields are not defined in the TTO specification
+ but simplifies the implementation of this format. It holds the
+ maximal context length used in the specific context rules. */
+
+struct HB_ChainContextSubstFormat2_
+{
+ HB_ChainSubClassSet* ChainSubClassSet;
+ /* array of ChainSubClassSet
+ tables */
+ HB_Coverage Coverage; /* Coverage table */
+
+ HB_ClassDefinition BacktrackClassDef;
+ /* BacktrackClassDef table */
+ HB_ClassDefinition InputClassDef;
+ /* InputClassDef table */
+ HB_ClassDefinition LookaheadClassDef;
+ /* LookaheadClassDef table */
+
+ HB_UShort ChainSubClassSetCount;
+ /* number of ChainSubClassSet
+ tables */
+ HB_UShort MaxBacktrackLength;
+ /* maximal backtrack length */
+ HB_UShort MaxLookaheadLength;
+ /* maximal lookahead length */
+ HB_UShort MaxInputLength;
+ /* maximal input length */
+};
+
+typedef struct HB_ChainContextSubstFormat2_ HB_ChainContextSubstFormat2;
+
+
+struct HB_ChainContextSubstFormat3_
+{
+ HB_Coverage* BacktrackCoverage;
+ /* array of backtrack Coverage
+ tables */
+ HB_Coverage* InputCoverage;
+ /* array of input coverage
+ tables */
+ HB_Coverage* LookaheadCoverage;
+ /* array of lookahead coverage
+ tables */
+ HB_SubstLookupRecord* SubstLookupRecord;
+ /* array of substitution lookups */
+ HB_UShort BacktrackGlyphCount;
+ /* number of backtrack glyphs */
+ HB_UShort InputGlyphCount;
+ /* number of input glyphs */
+ HB_UShort LookaheadGlyphCount;
+ /* number of lookahead glyphs */
+ HB_UShort SubstCount; /* number of SubstLookupRecords */
+};
+
+typedef struct HB_ChainContextSubstFormat3_ HB_ChainContextSubstFormat3;
+
+
+struct HB_ChainContextSubst_
+{
+ union
+ {
+ HB_ChainContextSubstFormat1 ccsf1;
+ HB_ChainContextSubstFormat2 ccsf2;
+ HB_ChainContextSubstFormat3 ccsf3;
+ } ccsf;
+
+ HB_Byte SubstFormat; /* 1, 2, or 3 */
+};
+
+typedef struct HB_ChainContextSubst_ HB_ChainContextSubst;
+
+
+#if 0
+/* LookupType 7 */
+struct HB_ExtensionSubst_
+{
+ HB_GSUB_SubTable *subtable; /* referenced subtable */
+ HB_UShort SubstFormat; /* always 1 */
+ HB_UShort LookuptType; /* lookup-type of referenced subtable */
+};
+
+typedef struct HB_ExtensionSubst_ HB_ExtensionSubst;
+#endif
+
+
+/* LookupType 8 */
+struct HB_ReverseChainContextSubst_
+{
+ HB_Coverage* LookaheadCoverage; /* array of lookahead Coverage
+ tables */
+ HB_UShort* Substitute; /* array of substitute Glyph ID */
+ HB_Coverage* BacktrackCoverage; /* array of backtrack Coverage
+ tables */
+ HB_Coverage Coverage; /* coverage table for input glyphs */
+ HB_UShort SubstFormat; /* always 1 */
+ HB_UShort BacktrackGlyphCount; /* number of backtrack glyphs */
+ HB_UShort LookaheadGlyphCount; /* number of lookahead glyphs */
+ HB_UShort GlyphCount; /* number of Glyph IDs */
+};
+
+typedef struct HB_ReverseChainContextSubst_ HB_ReverseChainContextSubst;
+
+
+union HB_GSUB_SubTable_
+{
+ HB_SingleSubst single;
+ HB_MultipleSubst multiple;
+ HB_AlternateSubst alternate;
+ HB_LigatureSubst ligature;
+ HB_ContextSubst context;
+ HB_ChainContextSubst chain;
+ HB_ReverseChainContextSubst reverse;
+};
+
+
+
+
+HB_INTERNAL HB_Error
+_HB_GSUB_Load_SubTable( HB_GSUB_SubTable* st,
+ HB_Stream stream,
+ HB_UShort lookup_type );
+
+HB_INTERNAL void
+_HB_GSUB_Free_SubTable( HB_GSUB_SubTable* st,
+ HB_UShort lookup_type );
+
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(pop)
+#endif
+
+HB_END_HEADER
+
+#endif /* HARFBUZZ_GSUB_PRIVATE_H */
diff --git a/src/hb-old/harfbuzz-gsub.c b/src/hb-old/harfbuzz-gsub.c
new file mode 100644
index 0000000..ceb7034
--- /dev/null
+++ b/src/hb-old/harfbuzz-gsub.c
@@ -0,0 +1,4329 @@
+/*
+ * Copyright (C) 1998-2004 David Turner and Werner Lemberg
+ * Copyright (C) 2006 Behdad Esfahbod
+ * Copyright (C) 2007 Red Hat, Inc.
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#include "harfbuzz-impl.h"
+#include "harfbuzz-gsub-private.h"
+#include "harfbuzz-open-private.h"
+#include "harfbuzz-gdef-private.h"
+
+static HB_Error GSUB_Do_Glyph_Lookup( HB_GSUBHeader* gsub,
+ HB_UShort lookup_index,
+ HB_Buffer buffer,
+ HB_UShort context_length,
+ int nesting_level );
+
+
+
+/**********************
+ * Auxiliary functions
+ **********************/
+
+
+
+HB_Error HB_Load_GSUB_Table( HB_Stream stream,
+ HB_GSUBHeader** retptr,
+ HB_GDEFHeader* gdef,
+ HB_Stream gdefStream )
+{
+ HB_Error error;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_GSUBHeader* gsub;
+
+ if ( !retptr )
+ return ERR(HB_Err_Invalid_Argument);
+
+ if ( GOTO_Table( TTAG_GSUB ) )
+ return error;
+
+ base_offset = FILE_Pos();
+
+ if ( ALLOC ( gsub, sizeof( *gsub ) ) )
+ return error;
+
+
+ /* skip version */
+
+ if ( FILE_Seek( base_offset + 4L ) ||
+ ACCESS_Frame( 2L ) )
+ goto Fail4;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_ScriptList( &gsub->ScriptList,
+ stream ) ) != HB_Err_Ok )
+ goto Fail4;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail3;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_FeatureList( &gsub->FeatureList,
+ stream ) ) != HB_Err_Ok )
+ goto Fail3;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_LookupList( &gsub->LookupList,
+ stream, HB_Type_GSUB ) ) != HB_Err_Ok )
+ goto Fail2;
+
+ gsub->gdef = gdef; /* can be NULL */
+
+ if ( ( error = _HB_GDEF_LoadMarkAttachClassDef_From_LookupFlags( gdef, gdefStream,
+ gsub->LookupList.Lookup,
+ gsub->LookupList.LookupCount ) ) )
+ goto Fail1;
+
+ *retptr = gsub;
+
+ return HB_Err_Ok;
+
+Fail1:
+ _HB_OPEN_Free_LookupList( &gsub->LookupList, HB_Type_GSUB );
+
+Fail2:
+ _HB_OPEN_Free_FeatureList( &gsub->FeatureList );
+
+Fail3:
+ _HB_OPEN_Free_ScriptList( &gsub->ScriptList );
+
+Fail4:
+ FREE ( gsub );
+
+
+ return error;
+}
+
+
+HB_Error HB_Done_GSUB_Table( HB_GSUBHeader* gsub )
+{
+ _HB_OPEN_Free_LookupList( &gsub->LookupList, HB_Type_GSUB );
+ _HB_OPEN_Free_FeatureList( &gsub->FeatureList );
+ _HB_OPEN_Free_ScriptList( &gsub->ScriptList );
+
+ FREE( gsub );
+
+ return HB_Err_Ok;
+}
+
+/*****************************
+ * SubTable related functions
+ *****************************/
+
+
+/* LookupType 1 */
+
+/* SingleSubstFormat1 */
+/* SingleSubstFormat2 */
+
+static HB_Error Load_SingleSubst( HB_GSUB_SubTable* st,
+ HB_Stream stream )
+{
+ HB_Error error;
+ HB_SingleSubst* ss = &st->single;
+
+ HB_UShort n, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_UShort* s;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+ ss->SubstFormat = GET_UShort();
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &ss->Coverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ switch ( ss->SubstFormat )
+ {
+ case 1:
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ ss->ssf.ssf1.DeltaGlyphID = GET_UShort();
+
+ FORGET_Frame();
+
+ break;
+
+ case 2:
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ count = ss->ssf.ssf2.GlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ss->ssf.ssf2.Substitute = NULL;
+
+ if ( ALLOC_ARRAY( ss->ssf.ssf2.Substitute, count, HB_UShort ) )
+ goto Fail2;
+
+ s = ss->ssf.ssf2.Substitute;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ goto Fail1;
+
+ for ( n = 0; n < count; n++ )
+ s[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ break;
+
+ default:
+ return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+
+ return HB_Err_Ok;
+
+Fail1:
+ FREE( s );
+
+Fail2:
+ _HB_OPEN_Free_Coverage( &ss->Coverage );
+ return error;
+}
+
+
+static void Free_SingleSubst( HB_GSUB_SubTable* st )
+{
+ HB_SingleSubst* ss = &st->single;
+
+ switch ( ss->SubstFormat )
+ {
+ case 1:
+ break;
+
+ case 2:
+ FREE( ss->ssf.ssf2.Substitute );
+ break;
+
+ default:
+ break;
+ }
+
+ _HB_OPEN_Free_Coverage( &ss->Coverage );
+}
+
+
+static HB_Error Lookup_SingleSubst( HB_GSUBHeader* gsub,
+ HB_GSUB_SubTable* st,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_UShort index, value, property;
+ HB_Error error;
+ HB_SingleSubst* ss = &st->single;
+ HB_GDEFHeader* gdef = gsub->gdef;
+
+ HB_UNUSED(nesting_level);
+
+ if ( context_length != 0xFFFF && context_length < 1 )
+ return HB_Err_Not_Covered;
+
+ if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ error = _HB_OPEN_Coverage_Index( &ss->Coverage, IN_CURGLYPH(), &index );
+ if ( error )
+ return error;
+
+ switch ( ss->SubstFormat )
+ {
+ case 1:
+ value = ( IN_CURGLYPH() + ss->ssf.ssf1.DeltaGlyphID ) & 0xFFFF;
+ if ( REPLACE_Glyph( buffer, value, nesting_level ) )
+ return error;
+ break;
+
+ case 2:
+ if ( index >= ss->ssf.ssf2.GlyphCount )
+ return ERR(HB_Err_Invalid_SubTable);
+ value = ss->ssf.ssf2.Substitute[index];
+ if ( REPLACE_Glyph( buffer, value, nesting_level ) )
+ return error;
+ break;
+
+ default:
+ return ERR(HB_Err_Invalid_SubTable);
+ }
+
+ if ( gdef && gdef->NewGlyphClasses )
+ {
+ /* we inherit the old glyph class to the substituted glyph */
+
+ error = _HB_GDEF_Add_Glyph_Property( gdef, value, property );
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+ }
+
+ return HB_Err_Ok;
+}
+
+
+/* LookupType 2 */
+
+/* Sequence */
+
+static HB_Error Load_Sequence( HB_Sequence* s,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, count;
+ HB_UShort* sub;
+
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = s->GlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ s->Substitute = NULL;
+
+ if ( count )
+ {
+ if ( ALLOC_ARRAY( s->Substitute, count, HB_UShort ) )
+ return error;
+
+ sub = s->Substitute;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ {
+ FREE( sub );
+ return error;
+ }
+
+ for ( n = 0; n < count; n++ )
+ sub[n] = GET_UShort();
+
+ FORGET_Frame();
+ }
+
+ return HB_Err_Ok;
+}
+
+
+static void Free_Sequence( HB_Sequence* s )
+{
+ FREE( s->Substitute );
+}
+
+
+/* MultipleSubstFormat1 */
+
+static HB_Error Load_MultipleSubst( HB_GSUB_SubTable* st,
+ HB_Stream stream )
+{
+ HB_Error error;
+ HB_MultipleSubst* ms = &st->multiple;
+
+ HB_UShort n = 0, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_Sequence* s;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+ ms->SubstFormat = GET_UShort(); /* should be 1 */
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &ms->Coverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ count = ms->SequenceCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ms->Sequence = NULL;
+
+ if ( ALLOC_ARRAY( ms->Sequence, count, HB_Sequence ) )
+ goto Fail2;
+
+ s = ms->Sequence;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_Sequence( &s[n], stream ) ) != HB_Err_Ok )
+ goto Fail1;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail1:
+ for ( m = 0; m < n; m++ )
+ Free_Sequence( &s[m] );
+
+ FREE( s );
+
+Fail2:
+ _HB_OPEN_Free_Coverage( &ms->Coverage );
+ return error;
+}
+
+
+static void Free_MultipleSubst( HB_GSUB_SubTable* st )
+{
+ HB_UShort n, count;
+ HB_MultipleSubst* ms = &st->multiple;
+
+ HB_Sequence* s;
+
+
+ if ( ms->Sequence )
+ {
+ count = ms->SequenceCount;
+ s = ms->Sequence;
+
+ for ( n = 0; n < count; n++ )
+ Free_Sequence( &s[n] );
+
+ FREE( s );
+ }
+
+ _HB_OPEN_Free_Coverage( &ms->Coverage );
+}
+
+
+static HB_Error Lookup_MultipleSubst( HB_GSUBHeader* gsub,
+ HB_GSUB_SubTable* st,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_Error error;
+ HB_UShort index, property, n, count;
+ HB_UShort*s;
+ HB_MultipleSubst* ms = &st->multiple;
+ HB_GDEFHeader* gdef = gsub->gdef;
+
+ HB_UNUSED(nesting_level);
+
+ if ( context_length != 0xFFFF && context_length < 1 )
+ return HB_Err_Not_Covered;
+
+ if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ error = _HB_OPEN_Coverage_Index( &ms->Coverage, IN_CURGLYPH(), &index );
+ if ( error )
+ return error;
+
+ if ( index >= ms->SequenceCount )
+ return ERR(HB_Err_Invalid_SubTable);
+
+ count = ms->Sequence[index].GlyphCount;
+ s = ms->Sequence[index].Substitute;
+
+ if ( ADD_String( buffer, 1, count, s, 0xFFFF, 0xFFFF ) )
+ return error;
+
+ if ( gdef && gdef->NewGlyphClasses )
+ {
+ /* this is a guess only ... */
+
+ if ( property == HB_GDEF_LIGATURE )
+ property = HB_GDEF_BASE_GLYPH;
+
+ for ( n = 0; n < count; n++ )
+ {
+ error = _HB_GDEF_Add_Glyph_Property( gdef, s[n], property );
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+ }
+ }
+
+ return HB_Err_Ok;
+}
+
+
+/* LookupType 3 */
+
+/* AlternateSet */
+
+static HB_Error Load_AlternateSet( HB_AlternateSet* as,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, count;
+ HB_UShort* a;
+
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = as->GlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ as->Alternate = NULL;
+
+ if ( ALLOC_ARRAY( as->Alternate, count, HB_UShort ) )
+ return error;
+
+ a = as->Alternate;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ {
+ FREE( a );
+ return error;
+ }
+
+ for ( n = 0; n < count; n++ )
+ a[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+}
+
+
+static void Free_AlternateSet( HB_AlternateSet* as )
+{
+ FREE( as->Alternate );
+}
+
+
+/* AlternateSubstFormat1 */
+
+static HB_Error Load_AlternateSubst( HB_GSUB_SubTable* st,
+ HB_Stream stream )
+{
+ HB_Error error;
+ HB_AlternateSubst* as = &st->alternate;
+
+ HB_UShort n = 0, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_AlternateSet* aset;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+ as->SubstFormat = GET_UShort(); /* should be 1 */
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &as->Coverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ count = as->AlternateSetCount = GET_UShort();
+
+ FORGET_Frame();
+
+ as->AlternateSet = NULL;
+
+ if ( ALLOC_ARRAY( as->AlternateSet, count, HB_AlternateSet ) )
+ goto Fail2;
+
+ aset = as->AlternateSet;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_AlternateSet( &aset[n], stream ) ) != HB_Err_Ok )
+ goto Fail1;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail1:
+ for ( m = 0; m < n; m++ )
+ Free_AlternateSet( &aset[m] );
+
+ FREE( aset );
+
+Fail2:
+ _HB_OPEN_Free_Coverage( &as->Coverage );
+ return error;
+}
+
+
+static void Free_AlternateSubst( HB_GSUB_SubTable* st )
+{
+ HB_UShort n, count;
+ HB_AlternateSubst* as = &st->alternate;
+
+ HB_AlternateSet* aset;
+
+
+ if ( as->AlternateSet )
+ {
+ count = as->AlternateSetCount;
+ aset = as->AlternateSet;
+
+ for ( n = 0; n < count; n++ )
+ Free_AlternateSet( &aset[n] );
+
+ FREE( aset );
+ }
+
+ _HB_OPEN_Free_Coverage( &as->Coverage );
+}
+
+
+static HB_Error Lookup_AlternateSubst( HB_GSUBHeader* gsub,
+ HB_GSUB_SubTable* st,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_Error error;
+ HB_UShort index, value, alt_index, property;
+ HB_AlternateSubst* as = &st->alternate;
+ HB_GDEFHeader* gdef = gsub->gdef;
+ HB_AlternateSet aset;
+
+ HB_UNUSED(nesting_level);
+
+ if ( context_length != 0xFFFF && context_length < 1 )
+ return HB_Err_Not_Covered;
+
+ if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ error = _HB_OPEN_Coverage_Index( &as->Coverage, IN_CURGLYPH(), &index );
+ if ( error )
+ return error;
+
+ aset = as->AlternateSet[index];
+
+ /* we use a user-defined callback function to get the alternate index */
+
+ if ( gsub->altfunc )
+ alt_index = (gsub->altfunc)( buffer->out_pos, IN_CURGLYPH(),
+ aset.GlyphCount, aset.Alternate,
+ gsub->data );
+ else
+ alt_index = 0;
+
+ value = aset.Alternate[alt_index];
+ if ( REPLACE_Glyph( buffer, value, nesting_level ) )
+ return error;
+
+ if ( gdef && gdef->NewGlyphClasses )
+ {
+ /* we inherit the old glyph class to the substituted glyph */
+
+ error = _HB_GDEF_Add_Glyph_Property( gdef, value, property );
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+ }
+
+ return HB_Err_Ok;
+}
+
+
+/* LookupType 4 */
+
+/* Ligature */
+
+static HB_Error Load_Ligature( HB_Ligature* l,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, count;
+ HB_UShort* c;
+
+
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+ l->LigGlyph = GET_UShort();
+ l->ComponentCount = GET_UShort();
+
+ FORGET_Frame();
+
+ l->Component = NULL;
+
+ count = l->ComponentCount - 1; /* only ComponentCount - 1 elements */
+
+ if ( ALLOC_ARRAY( l->Component, count, HB_UShort ) )
+ return error;
+
+ c = l->Component;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ {
+ FREE( c );
+ return error;
+ }
+
+ for ( n = 0; n < count; n++ )
+ c[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+}
+
+
+static void Free_Ligature( HB_Ligature* l )
+{
+ FREE( l->Component );
+}
+
+
+/* LigatureSet */
+
+static HB_Error Load_LigatureSet( HB_LigatureSet* ls,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n = 0, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_Ligature* l;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = ls->LigatureCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ls->Ligature = NULL;
+
+ if ( ALLOC_ARRAY( ls->Ligature, count, HB_Ligature ) )
+ return error;
+
+ l = ls->Ligature;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_Ligature( &l[n], stream ) ) != HB_Err_Ok )
+ goto Fail;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ for ( m = 0; m < n; m++ )
+ Free_Ligature( &l[m] );
+
+ FREE( l );
+ return error;
+}
+
+
+static void Free_LigatureSet( HB_LigatureSet* ls )
+{
+ HB_UShort n, count;
+
+ HB_Ligature* l;
+
+
+ if ( ls->Ligature )
+ {
+ count = ls->LigatureCount;
+ l = ls->Ligature;
+
+ for ( n = 0; n < count; n++ )
+ Free_Ligature( &l[n] );
+
+ FREE( l );
+ }
+}
+
+
+/* LigatureSubstFormat1 */
+
+static HB_Error Load_LigatureSubst( HB_GSUB_SubTable* st,
+ HB_Stream stream )
+{
+ HB_Error error;
+ HB_LigatureSubst* ls = &st->ligature;
+
+ HB_UShort n = 0, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_LigatureSet* lset;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+ ls->SubstFormat = GET_UShort(); /* should be 1 */
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &ls->Coverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ count = ls->LigatureSetCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ls->LigatureSet = NULL;
+
+ if ( ALLOC_ARRAY( ls->LigatureSet, count, HB_LigatureSet ) )
+ goto Fail2;
+
+ lset = ls->LigatureSet;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_LigatureSet( &lset[n], stream ) ) != HB_Err_Ok )
+ goto Fail1;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail1:
+ for ( m = 0; m < n; m++ )
+ Free_LigatureSet( &lset[m] );
+
+ FREE( lset );
+
+Fail2:
+ _HB_OPEN_Free_Coverage( &ls->Coverage );
+ return error;
+}
+
+
+static void Free_LigatureSubst( HB_GSUB_SubTable* st )
+{
+ HB_UShort n, count;
+ HB_LigatureSubst* ls = &st->ligature;
+
+ HB_LigatureSet* lset;
+
+
+ if ( ls->LigatureSet )
+ {
+ count = ls->LigatureSetCount;
+ lset = ls->LigatureSet;
+
+ for ( n = 0; n < count; n++ )
+ Free_LigatureSet( &lset[n] );
+
+ FREE( lset );
+ }
+
+ _HB_OPEN_Free_Coverage( &ls->Coverage );
+}
+
+
+static HB_Error Lookup_LigatureSubst( HB_GSUBHeader* gsub,
+ HB_GSUB_SubTable* st,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_UShort index, property;
+ HB_Error error;
+ HB_UShort numlig, i, j, is_mark, first_is_mark = FALSE;
+ HB_UShort* c;
+ HB_LigatureSubst* ls = &st->ligature;
+ HB_GDEFHeader* gdef = gsub->gdef;
+
+ HB_Ligature* lig;
+
+ HB_UNUSED(nesting_level);
+
+ if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ if ( property == HB_GDEF_MARK || property & HB_LOOKUP_FLAG_IGNORE_SPECIAL_MARKS )
+ first_is_mark = TRUE;
+
+ error = _HB_OPEN_Coverage_Index( &ls->Coverage, IN_CURGLYPH(), &index );
+ if ( error )
+ return error;
+
+ if ( index >= ls->LigatureSetCount )
+ return ERR(HB_Err_Invalid_SubTable);
+
+ lig = ls->LigatureSet[index].Ligature;
+
+ for ( numlig = ls->LigatureSet[index].LigatureCount;
+ numlig;
+ numlig--, lig++ )
+ {
+ if ( buffer->in_pos + lig->ComponentCount > buffer->in_length )
+ goto next_ligature; /* Not enough glyphs in input */
+
+ c = lig->Component;
+
+ is_mark = first_is_mark;
+
+ if ( context_length != 0xFFFF && context_length < lig->ComponentCount )
+ break;
+
+ for ( i = 1, j = buffer->in_pos + 1; i < lig->ComponentCount; i++, j++ )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( j + lig->ComponentCount - i == (HB_Int)buffer->in_length )
+ goto next_ligature;
+ j++;
+ }
+
+ if ( !( property == HB_GDEF_MARK || property & HB_LOOKUP_FLAG_IGNORE_SPECIAL_MARKS ) )
+ is_mark = FALSE;
+
+ if ( IN_GLYPH( j ) != c[i - 1] )
+ goto next_ligature;
+ }
+
+ if ( gdef && gdef->NewGlyphClasses )
+ {
+ /* this is just a guess ... */
+
+ error = _HB_GDEF_Add_Glyph_Property( gdef, lig->LigGlyph,
+ is_mark ? HB_GDEF_MARK : HB_GDEF_LIGATURE );
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+ }
+
+ if ( j == buffer->in_pos + i ) /* No input glyphs skipped */
+ {
+ /* We don't use a new ligature ID if there are no skipped
+ glyphs and the ligature already has an ID. */
+
+ if ( IN_LIGID( buffer->in_pos ) )
+ {
+ if ( ADD_String( buffer, i, 1, &lig->LigGlyph,
+ 0xFFFF, 0xFFFF ) )
+ return error;
+ }
+ else
+ {
+ HB_UShort ligID = _hb_buffer_allocate_ligid( buffer );
+ if ( ADD_String( buffer, i, 1, &lig->LigGlyph,
+ 0xFFFF, ligID ) )
+ return error;
+ }
+ }
+ else
+ {
+ HB_UShort ligID = _hb_buffer_allocate_ligid( buffer );
+ if ( ADD_Glyph( buffer, lig->LigGlyph, 0xFFFF, ligID ) )
+ return error;
+
+ /* Now we must do a second loop to copy the skipped glyphs to
+ `out' and assign component values to it. We start with the
+ glyph after the first component. Glyphs between component
+ i and i+1 belong to component i. Together with the ligID
+ value it is later possible to check whether a specific
+ component value really belongs to a given ligature. */
+
+ for ( i = 0; i < lig->ComponentCount - 1; i++ )
+ {
+ while ( CHECK_Property( gdef, IN_CURITEM(),
+ flags, &property ) )
+ if ( ADD_Glyph( buffer, IN_CURGLYPH(), i, ligID ) )
+ return error;
+
+ (buffer->in_pos)++;
+ }
+ }
+
+ return HB_Err_Ok;
+
+ next_ligature:
+ ;
+ }
+
+ return HB_Err_Not_Covered;
+}
+
+
+/* Do the actual substitution for a context substitution (either format
+ 5 or 6). This is only called after we've determined that the input
+ matches the subrule. */
+
+static HB_Error Do_ContextSubst( HB_GSUBHeader* gsub,
+ HB_UShort GlyphCount,
+ HB_UShort SubstCount,
+ HB_SubstLookupRecord* subst,
+ HB_Buffer buffer,
+ int nesting_level )
+{
+ HB_Error error;
+ HB_UInt i, old_pos;
+
+
+ i = 0;
+
+ while ( i < GlyphCount )
+ {
+ if ( SubstCount && i == subst->SequenceIndex )
+ {
+ old_pos = buffer->in_pos;
+
+ /* Do a substitution */
+
+ error = GSUB_Do_Glyph_Lookup( gsub, subst->LookupListIndex, buffer,
+ GlyphCount, nesting_level );
+
+ subst++;
+ SubstCount--;
+ i += buffer->in_pos - old_pos;
+
+ if ( error == HB_Err_Not_Covered )
+ {
+ if ( COPY_Glyph( buffer ) )
+ return error;
+ i++;
+ }
+ else if ( error )
+ return error;
+ }
+ else
+ {
+ /* No substitution for this index */
+
+ if ( COPY_Glyph( buffer ) )
+ return error;
+ i++;
+ }
+ }
+
+ return HB_Err_Ok;
+}
+
+
+/* LookupType 5 */
+
+/* SubRule */
+
+static HB_Error Load_SubRule( HB_SubRule* sr,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, count;
+ HB_UShort* i;
+
+ HB_SubstLookupRecord* slr;
+
+
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+ sr->GlyphCount = GET_UShort();
+ sr->SubstCount = GET_UShort();
+
+ FORGET_Frame();
+
+ sr->Input = NULL;
+
+ count = sr->GlyphCount - 1; /* only GlyphCount - 1 elements */
+
+ if ( ALLOC_ARRAY( sr->Input, count, HB_UShort ) )
+ return error;
+
+ i = sr->Input;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ goto Fail2;
+
+ for ( n = 0; n < count; n++ )
+ i[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ sr->SubstLookupRecord = NULL;
+
+ count = sr->SubstCount;
+
+ if ( ALLOC_ARRAY( sr->SubstLookupRecord, count, HB_SubstLookupRecord ) )
+ goto Fail2;
+
+ slr = sr->SubstLookupRecord;
+
+ if ( ACCESS_Frame( count * 4L ) )
+ goto Fail1;
+
+ for ( n = 0; n < count; n++ )
+ {
+ slr[n].SequenceIndex = GET_UShort();
+ slr[n].LookupListIndex = GET_UShort();
+ }
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+
+Fail1:
+ FREE( slr );
+
+Fail2:
+ FREE( i );
+ return error;
+}
+
+
+static void Free_SubRule( HB_SubRule* sr )
+{
+ FREE( sr->SubstLookupRecord );
+ FREE( sr->Input );
+}
+
+
+/* SubRuleSet */
+
+static HB_Error Load_SubRuleSet( HB_SubRuleSet* srs,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n = 0, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_SubRule* sr;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = srs->SubRuleCount = GET_UShort();
+
+ FORGET_Frame();
+
+ srs->SubRule = NULL;
+
+ if ( ALLOC_ARRAY( srs->SubRule, count, HB_SubRule ) )
+ return error;
+
+ sr = srs->SubRule;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_SubRule( &sr[n], stream ) ) != HB_Err_Ok )
+ goto Fail;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ for ( m = 0; m < n; m++ )
+ Free_SubRule( &sr[m] );
+
+ FREE( sr );
+ return error;
+}
+
+
+static void Free_SubRuleSet( HB_SubRuleSet* srs )
+{
+ HB_UShort n, count;
+
+ HB_SubRule* sr;
+
+
+ if ( srs->SubRule )
+ {
+ count = srs->SubRuleCount;
+ sr = srs->SubRule;
+
+ for ( n = 0; n < count; n++ )
+ Free_SubRule( &sr[n] );
+
+ FREE( sr );
+ }
+}
+
+
+/* ContextSubstFormat1 */
+
+static HB_Error Load_ContextSubst1( HB_ContextSubstFormat1* csf1,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n = 0, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_SubRuleSet* srs;
+
+
+ base_offset = FILE_Pos() - 2L;
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &csf1->Coverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ count = csf1->SubRuleSetCount = GET_UShort();
+
+ FORGET_Frame();
+
+ csf1->SubRuleSet = NULL;
+
+ if ( ALLOC_ARRAY( csf1->SubRuleSet, count, HB_SubRuleSet ) )
+ goto Fail2;
+
+ srs = csf1->SubRuleSet;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_SubRuleSet( &srs[n], stream ) ) != HB_Err_Ok )
+ goto Fail1;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail1:
+ for ( m = 0; m < n; m++ )
+ Free_SubRuleSet( &srs[m] );
+
+ FREE( srs );
+
+Fail2:
+ _HB_OPEN_Free_Coverage( &csf1->Coverage );
+ return error;
+}
+
+
+static void Free_ContextSubst1( HB_ContextSubstFormat1* csf1 )
+{
+ HB_UShort n, count;
+
+ HB_SubRuleSet* srs;
+
+
+ if ( csf1->SubRuleSet )
+ {
+ count = csf1->SubRuleSetCount;
+ srs = csf1->SubRuleSet;
+
+ for ( n = 0; n < count; n++ )
+ Free_SubRuleSet( &srs[n] );
+
+ FREE( srs );
+ }
+
+ _HB_OPEN_Free_Coverage( &csf1->Coverage );
+}
+
+
+/* SubClassRule */
+
+static HB_Error Load_SubClassRule( HB_ContextSubstFormat2* csf2,
+ HB_SubClassRule* scr,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, count;
+
+ HB_UShort* c;
+ HB_SubstLookupRecord* slr;
+
+
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+ scr->GlyphCount = GET_UShort();
+ scr->SubstCount = GET_UShort();
+
+ if ( scr->GlyphCount > csf2->MaxContextLength )
+ csf2->MaxContextLength = scr->GlyphCount;
+
+ FORGET_Frame();
+
+ scr->Class = NULL;
+
+ count = scr->GlyphCount - 1; /* only GlyphCount - 1 elements */
+
+ if ( ALLOC_ARRAY( scr->Class, count, HB_UShort ) )
+ return error;
+
+ c = scr->Class;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ goto Fail2;
+
+ for ( n = 0; n < count; n++ )
+ c[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ scr->SubstLookupRecord = NULL;
+
+ count = scr->SubstCount;
+
+ if ( ALLOC_ARRAY( scr->SubstLookupRecord, count, HB_SubstLookupRecord ) )
+ goto Fail2;
+
+ slr = scr->SubstLookupRecord;
+
+ if ( ACCESS_Frame( count * 4L ) )
+ goto Fail1;
+
+ for ( n = 0; n < count; n++ )
+ {
+ slr[n].SequenceIndex = GET_UShort();
+ slr[n].LookupListIndex = GET_UShort();
+ }
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+
+Fail1:
+ FREE( slr );
+
+Fail2:
+ FREE( c );
+ return error;
+}
+
+
+static void Free_SubClassRule( HB_SubClassRule* scr )
+{
+ FREE( scr->SubstLookupRecord );
+ FREE( scr->Class );
+}
+
+
+/* SubClassSet */
+
+static HB_Error Load_SubClassSet( HB_ContextSubstFormat2* csf2,
+ HB_SubClassSet* scs,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n = 0, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_SubClassRule* scr;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = scs->SubClassRuleCount = GET_UShort();
+
+ FORGET_Frame();
+
+ scs->SubClassRule = NULL;
+
+ if ( ALLOC_ARRAY( scs->SubClassRule, count, HB_SubClassRule ) )
+ return error;
+
+ scr = scs->SubClassRule;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_SubClassRule( csf2, &scr[n],
+ stream ) ) != HB_Err_Ok )
+ goto Fail;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ for ( m = 0; m < n; m++ )
+ Free_SubClassRule( &scr[m] );
+
+ FREE( scr );
+ return error;
+}
+
+
+static void Free_SubClassSet( HB_SubClassSet* scs )
+{
+ HB_UShort n, count;
+
+ HB_SubClassRule* scr;
+
+
+ if ( scs->SubClassRule )
+ {
+ count = scs->SubClassRuleCount;
+ scr = scs->SubClassRule;
+
+ for ( n = 0; n < count; n++ )
+ Free_SubClassRule( &scr[n] );
+
+ FREE( scr );
+ }
+}
+
+
+/* ContextSubstFormat2 */
+
+static HB_Error Load_ContextSubst2( HB_ContextSubstFormat2* csf2,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n = 0, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_SubClassSet* scs;
+
+
+ base_offset = FILE_Pos() - 2;
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &csf2->Coverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 4L ) )
+ goto Fail3;
+
+ new_offset = GET_UShort() + base_offset;
+
+ /* `SubClassSetCount' is the upper limit for class values, thus we
+ read it now to make an additional safety check. */
+
+ count = csf2->SubClassSetCount = GET_UShort();
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_ClassDefinition( &csf2->ClassDef, count,
+ stream ) ) != HB_Err_Ok )
+ goto Fail3;
+ (void)FILE_Seek( cur_offset );
+
+ csf2->SubClassSet = NULL;
+ csf2->MaxContextLength = 0;
+
+ if ( ALLOC_ARRAY( csf2->SubClassSet, count, HB_SubClassSet ) )
+ goto Fail2;
+
+ scs = csf2->SubClassSet;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ if ( new_offset != base_offset ) /* not a NULL offset */
+ {
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_SubClassSet( csf2, &scs[n],
+ stream ) ) != HB_Err_Ok )
+ goto Fail1;
+ (void)FILE_Seek( cur_offset );
+ }
+ else
+ {
+ /* we create a SubClassSet table with no entries */
+
+ csf2->SubClassSet[n].SubClassRuleCount = 0;
+ csf2->SubClassSet[n].SubClassRule = NULL;
+ }
+ }
+
+ return HB_Err_Ok;
+
+Fail1:
+ for ( m = 0; m < n; m++ )
+ Free_SubClassSet( &scs[m] );
+
+ FREE( scs );
+
+Fail2:
+ _HB_OPEN_Free_ClassDefinition( &csf2->ClassDef );
+
+Fail3:
+ _HB_OPEN_Free_Coverage( &csf2->Coverage );
+ return error;
+}
+
+
+static void Free_ContextSubst2( HB_ContextSubstFormat2* csf2 )
+{
+ HB_UShort n, count;
+
+ HB_SubClassSet* scs;
+
+
+ if ( csf2->SubClassSet )
+ {
+ count = csf2->SubClassSetCount;
+ scs = csf2->SubClassSet;
+
+ for ( n = 0; n < count; n++ )
+ Free_SubClassSet( &scs[n] );
+
+ FREE( scs );
+ }
+
+ _HB_OPEN_Free_ClassDefinition( &csf2->ClassDef );
+ _HB_OPEN_Free_Coverage( &csf2->Coverage );
+}
+
+
+/* ContextSubstFormat3 */
+
+static HB_Error Load_ContextSubst3( HB_ContextSubstFormat3* csf3,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n = 0, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_Coverage* c;
+ HB_SubstLookupRecord* slr;
+
+
+ base_offset = FILE_Pos() - 2L;
+
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+ csf3->GlyphCount = GET_UShort();
+ csf3->SubstCount = GET_UShort();
+
+ FORGET_Frame();
+
+ csf3->Coverage = NULL;
+
+ count = csf3->GlyphCount;
+
+ if ( ALLOC_ARRAY( csf3->Coverage, count, HB_Coverage ) )
+ return error;
+
+ c = csf3->Coverage;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &c[n], stream ) ) != HB_Err_Ok )
+ goto Fail2;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ csf3->SubstLookupRecord = NULL;
+
+ count = csf3->SubstCount;
+
+ if ( ALLOC_ARRAY( csf3->SubstLookupRecord, count,
+ HB_SubstLookupRecord ) )
+ goto Fail2;
+
+ slr = csf3->SubstLookupRecord;
+
+ if ( ACCESS_Frame( count * 4L ) )
+ goto Fail1;
+
+ for ( n = 0; n < count; n++ )
+ {
+ slr[n].SequenceIndex = GET_UShort();
+ slr[n].LookupListIndex = GET_UShort();
+ }
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+
+Fail1:
+ FREE( slr );
+
+Fail2:
+ for ( m = 0; m < n; m++ )
+ _HB_OPEN_Free_Coverage( &c[m] );
+
+ FREE( c );
+ return error;
+}
+
+
+static void Free_ContextSubst3( HB_ContextSubstFormat3* csf3 )
+{
+ HB_UShort n, count;
+
+ HB_Coverage* c;
+
+
+ FREE( csf3->SubstLookupRecord );
+
+ if ( csf3->Coverage )
+ {
+ count = csf3->GlyphCount;
+ c = csf3->Coverage;
+
+ for ( n = 0; n < count; n++ )
+ _HB_OPEN_Free_Coverage( &c[n] );
+
+ FREE( c );
+ }
+}
+
+
+/* ContextSubst */
+
+static HB_Error Load_ContextSubst( HB_GSUB_SubTable* st,
+ HB_Stream stream )
+{
+ HB_Error error;
+ HB_ContextSubst* cs = &st->context;
+
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ cs->SubstFormat = GET_UShort();
+
+ FORGET_Frame();
+
+ switch ( cs->SubstFormat )
+ {
+ case 1: return Load_ContextSubst1( &cs->csf.csf1, stream );
+ case 2: return Load_ContextSubst2( &cs->csf.csf2, stream );
+ case 3: return Load_ContextSubst3( &cs->csf.csf3, stream );
+ default: return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+
+ return HB_Err_Ok; /* never reached */
+}
+
+
+static void Free_ContextSubst( HB_GSUB_SubTable* st )
+{
+ HB_ContextSubst* cs = &st->context;
+
+ switch ( cs->SubstFormat )
+ {
+ case 1: Free_ContextSubst1( &cs->csf.csf1 ); break;
+ case 2: Free_ContextSubst2( &cs->csf.csf2 ); break;
+ case 3: Free_ContextSubst3( &cs->csf.csf3 ); break;
+ default: break;
+ }
+}
+
+
+static HB_Error Lookup_ContextSubst1( HB_GSUBHeader* gsub,
+ HB_ContextSubstFormat1* csf1,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_UShort index, property;
+ HB_UShort i, j, k, numsr;
+ HB_Error error;
+
+ HB_SubRule* sr;
+ HB_GDEFHeader* gdef;
+
+
+ gdef = gsub->gdef;
+
+ if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ error = _HB_OPEN_Coverage_Index( &csf1->Coverage, IN_CURGLYPH(), &index );
+ if ( error )
+ return error;
+
+ sr = csf1->SubRuleSet[index].SubRule;
+ numsr = csf1->SubRuleSet[index].SubRuleCount;
+
+ for ( k = 0; k < numsr; k++ )
+ {
+ if ( context_length != 0xFFFF && context_length < sr[k].GlyphCount )
+ goto next_subrule;
+
+ if ( buffer->in_pos + sr[k].GlyphCount > buffer->in_length )
+ goto next_subrule; /* context is too long */
+
+ for ( i = 1, j = buffer->in_pos + 1; i < sr[k].GlyphCount; i++, j++ )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( j + sr[k].GlyphCount - i == (HB_Int)buffer->in_length )
+ goto next_subrule;
+ j++;
+ }
+
+ if ( IN_GLYPH( j ) != sr[k].Input[i - 1] )
+ goto next_subrule;
+ }
+
+ return Do_ContextSubst( gsub, sr[k].GlyphCount,
+ sr[k].SubstCount, sr[k].SubstLookupRecord,
+ buffer,
+ nesting_level );
+ next_subrule:
+ ;
+ }
+
+ return HB_Err_Not_Covered;
+}
+
+
+static HB_Error Lookup_ContextSubst2( HB_GSUBHeader* gsub,
+ HB_ContextSubstFormat2* csf2,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_UShort index, property;
+ HB_Error error;
+ HB_UShort i, j, k, known_classes;
+
+ HB_UShort* classes;
+ HB_UShort* cl;
+
+ HB_SubClassSet* scs;
+ HB_SubClassRule* sr;
+ HB_GDEFHeader* gdef;
+
+
+ gdef = gsub->gdef;
+
+ if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ /* Note: The coverage table in format 2 doesn't give an index into
+ anything. It just lets us know whether or not we need to
+ do any lookup at all. */
+
+ error = _HB_OPEN_Coverage_Index( &csf2->Coverage, IN_CURGLYPH(), &index );
+ if ( error )
+ return error;
+
+ if (csf2->MaxContextLength < 1)
+ return HB_Err_Not_Covered;
+
+ if ( ALLOC_ARRAY( classes, csf2->MaxContextLength, HB_UShort ) )
+ return error;
+
+ error = _HB_OPEN_Get_Class( &csf2->ClassDef, IN_CURGLYPH(),
+ &classes[0], NULL );
+ if ( error && error != HB_Err_Not_Covered )
+ goto End;
+ known_classes = 0;
+
+ scs = &csf2->SubClassSet[classes[0]];
+ if ( !scs )
+ {
+ error = ERR(HB_Err_Invalid_SubTable);
+ goto End;
+ }
+
+ for ( k = 0; k < scs->SubClassRuleCount; k++ )
+ {
+ sr = &scs->SubClassRule[k];
+
+ if ( context_length != 0xFFFF && context_length < sr->GlyphCount )
+ goto next_subclassrule;
+
+ if ( buffer->in_pos + sr->GlyphCount > buffer->in_length )
+ goto next_subclassrule; /* context is too long */
+
+ cl = sr->Class;
+
+ /* Start at 1 because [0] is implied */
+
+ for ( i = 1, j = buffer->in_pos + 1; i < sr->GlyphCount; i++, j++ )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ goto End;
+
+ if ( j + sr->GlyphCount - i < (HB_Int)buffer->in_length )
+ goto next_subclassrule;
+ j++;
+ }
+
+ if ( i > known_classes )
+ {
+ /* Keeps us from having to do this for each rule */
+
+ error = _HB_OPEN_Get_Class( &csf2->ClassDef, IN_GLYPH( j ), &classes[i], NULL );
+ if ( error && error != HB_Err_Not_Covered )
+ goto End;
+ known_classes = i;
+ }
+
+ if ( cl[i - 1] != classes[i] )
+ goto next_subclassrule;
+ }
+
+ error = Do_ContextSubst( gsub, sr->GlyphCount,
+ sr->SubstCount, sr->SubstLookupRecord,
+ buffer,
+ nesting_level );
+ goto End;
+
+ next_subclassrule:
+ ;
+ }
+
+ error = HB_Err_Not_Covered;
+
+End:
+ FREE( classes );
+ return error;
+}
+
+
+static HB_Error Lookup_ContextSubst3( HB_GSUBHeader* gsub,
+ HB_ContextSubstFormat3* csf3,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_Error error;
+ HB_UShort index, i, j, property;
+
+ HB_Coverage* c;
+ HB_GDEFHeader* gdef;
+
+
+ gdef = gsub->gdef;
+
+ if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ if ( context_length != 0xFFFF && context_length < csf3->GlyphCount )
+ return HB_Err_Not_Covered;
+
+ if ( buffer->in_pos + csf3->GlyphCount > buffer->in_length )
+ return HB_Err_Not_Covered; /* context is too long */
+
+ c = csf3->Coverage;
+
+ for ( i = 1, j = buffer->in_pos + 1; i < csf3->GlyphCount; i++, j++ )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( j + csf3->GlyphCount - i == (HB_Int)buffer->in_length )
+ return HB_Err_Not_Covered;
+ j++;
+ }
+
+ error = _HB_OPEN_Coverage_Index( &c[i], IN_GLYPH( j ), &index );
+ if ( error )
+ return error;
+ }
+
+ return Do_ContextSubst( gsub, csf3->GlyphCount,
+ csf3->SubstCount, csf3->SubstLookupRecord,
+ buffer,
+ nesting_level );
+}
+
+
+static HB_Error Lookup_ContextSubst( HB_GSUBHeader* gsub,
+ HB_GSUB_SubTable* st,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_ContextSubst* cs = &st->context;
+
+ switch ( cs->SubstFormat )
+ {
+ case 1: return Lookup_ContextSubst1( gsub, &cs->csf.csf1, buffer, flags, context_length, nesting_level );
+ case 2: return Lookup_ContextSubst2( gsub, &cs->csf.csf2, buffer, flags, context_length, nesting_level );
+ case 3: return Lookup_ContextSubst3( gsub, &cs->csf.csf3, buffer, flags, context_length, nesting_level );
+ default: return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+
+ return HB_Err_Ok; /* never reached */
+}
+
+
+/* LookupType 6 */
+
+/* ChainSubRule */
+
+static HB_Error Load_ChainSubRule( HB_ChainSubRule* csr,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, count;
+ HB_UShort* b;
+ HB_UShort* i;
+ HB_UShort* l;
+
+ HB_SubstLookupRecord* slr;
+
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ csr->BacktrackGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ csr->Backtrack = NULL;
+
+ count = csr->BacktrackGlyphCount;
+
+ if ( ALLOC_ARRAY( csr->Backtrack, count, HB_UShort ) )
+ return error;
+
+ b = csr->Backtrack;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ goto Fail4;
+
+ for ( n = 0; n < count; n++ )
+ b[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail4;
+
+ csr->InputGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ csr->Input = NULL;
+
+ count = csr->InputGlyphCount - 1; /* only InputGlyphCount - 1 elements */
+
+ if ( ALLOC_ARRAY( csr->Input, count, HB_UShort ) )
+ goto Fail4;
+
+ i = csr->Input;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ goto Fail3;
+
+ for ( n = 0; n < count; n++ )
+ i[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail3;
+
+ csr->LookaheadGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ csr->Lookahead = NULL;
+
+ count = csr->LookaheadGlyphCount;
+
+ if ( ALLOC_ARRAY( csr->Lookahead, count, HB_UShort ) )
+ goto Fail3;
+
+ l = csr->Lookahead;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ goto Fail2;
+
+ for ( n = 0; n < count; n++ )
+ l[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ csr->SubstCount = GET_UShort();
+
+ FORGET_Frame();
+
+ csr->SubstLookupRecord = NULL;
+
+ count = csr->SubstCount;
+
+ if ( ALLOC_ARRAY( csr->SubstLookupRecord, count, HB_SubstLookupRecord ) )
+ goto Fail2;
+
+ slr = csr->SubstLookupRecord;
+
+ if ( ACCESS_Frame( count * 4L ) )
+ goto Fail1;
+
+ for ( n = 0; n < count; n++ )
+ {
+ slr[n].SequenceIndex = GET_UShort();
+ slr[n].LookupListIndex = GET_UShort();
+ }
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+
+Fail1:
+ FREE( slr );
+
+Fail2:
+ FREE( l );
+
+Fail3:
+ FREE( i );
+
+Fail4:
+ FREE( b );
+ return error;
+}
+
+
+static void Free_ChainSubRule( HB_ChainSubRule* csr )
+{
+ FREE( csr->SubstLookupRecord );
+ FREE( csr->Lookahead );
+ FREE( csr->Input );
+ FREE( csr->Backtrack );
+}
+
+
+/* ChainSubRuleSet */
+
+static HB_Error Load_ChainSubRuleSet( HB_ChainSubRuleSet* csrs,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n = 0, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_ChainSubRule* csr;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = csrs->ChainSubRuleCount = GET_UShort();
+
+ FORGET_Frame();
+
+ csrs->ChainSubRule = NULL;
+
+ if ( ALLOC_ARRAY( csrs->ChainSubRule, count, HB_ChainSubRule ) )
+ return error;
+
+ csr = csrs->ChainSubRule;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_ChainSubRule( &csr[n], stream ) ) != HB_Err_Ok )
+ goto Fail;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ for ( m = 0; m < n; m++ )
+ Free_ChainSubRule( &csr[m] );
+
+ FREE( csr );
+ return error;
+}
+
+
+static void Free_ChainSubRuleSet( HB_ChainSubRuleSet* csrs )
+{
+ HB_UShort n, count;
+
+ HB_ChainSubRule* csr;
+
+
+ if ( csrs->ChainSubRule )
+ {
+ count = csrs->ChainSubRuleCount;
+ csr = csrs->ChainSubRule;
+
+ for ( n = 0; n < count; n++ )
+ Free_ChainSubRule( &csr[n] );
+
+ FREE( csr );
+ }
+}
+
+
+/* ChainContextSubstFormat1 */
+
+static HB_Error Load_ChainContextSubst1(
+ HB_ChainContextSubstFormat1* ccsf1,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n = 0, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_ChainSubRuleSet* csrs;
+
+
+ base_offset = FILE_Pos() - 2L;
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &ccsf1->Coverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ count = ccsf1->ChainSubRuleSetCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ccsf1->ChainSubRuleSet = NULL;
+
+ if ( ALLOC_ARRAY( ccsf1->ChainSubRuleSet, count, HB_ChainSubRuleSet ) )
+ goto Fail2;
+
+ csrs = ccsf1->ChainSubRuleSet;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_ChainSubRuleSet( &csrs[n], stream ) ) != HB_Err_Ok )
+ goto Fail1;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail1:
+ for ( m = 0; m < n; m++ )
+ Free_ChainSubRuleSet( &csrs[m] );
+
+ FREE( csrs );
+
+Fail2:
+ _HB_OPEN_Free_Coverage( &ccsf1->Coverage );
+ return error;
+}
+
+
+static void Free_ChainContextSubst1( HB_ChainContextSubstFormat1* ccsf1 )
+{
+ HB_UShort n, count;
+
+ HB_ChainSubRuleSet* csrs;
+
+
+ if ( ccsf1->ChainSubRuleSet )
+ {
+ count = ccsf1->ChainSubRuleSetCount;
+ csrs = ccsf1->ChainSubRuleSet;
+
+ for ( n = 0; n < count; n++ )
+ Free_ChainSubRuleSet( &csrs[n] );
+
+ FREE( csrs );
+ }
+
+ _HB_OPEN_Free_Coverage( &ccsf1->Coverage );
+}
+
+
+/* ChainSubClassRule */
+
+static HB_Error Load_ChainSubClassRule(
+ HB_ChainContextSubstFormat2* ccsf2,
+ HB_ChainSubClassRule* cscr,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, count;
+
+ HB_UShort* b;
+ HB_UShort* i;
+ HB_UShort* l;
+ HB_SubstLookupRecord* slr;
+
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ cscr->BacktrackGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( cscr->BacktrackGlyphCount > ccsf2->MaxBacktrackLength )
+ ccsf2->MaxBacktrackLength = cscr->BacktrackGlyphCount;
+
+ cscr->Backtrack = NULL;
+
+ count = cscr->BacktrackGlyphCount;
+
+ if ( ALLOC_ARRAY( cscr->Backtrack, count, HB_UShort ) )
+ return error;
+
+ b = cscr->Backtrack;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ goto Fail4;
+
+ for ( n = 0; n < count; n++ )
+ b[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail4;
+
+ cscr->InputGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( cscr->InputGlyphCount > ccsf2->MaxInputLength )
+ ccsf2->MaxInputLength = cscr->InputGlyphCount;
+
+ cscr->Input = NULL;
+
+ count = cscr->InputGlyphCount - 1; /* only InputGlyphCount - 1 elements */
+
+ if ( ALLOC_ARRAY( cscr->Input, count, HB_UShort ) )
+ goto Fail4;
+
+ i = cscr->Input;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ goto Fail3;
+
+ for ( n = 0; n < count; n++ )
+ i[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail3;
+
+ cscr->LookaheadGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( cscr->LookaheadGlyphCount > ccsf2->MaxLookaheadLength )
+ ccsf2->MaxLookaheadLength = cscr->LookaheadGlyphCount;
+
+ cscr->Lookahead = NULL;
+
+ count = cscr->LookaheadGlyphCount;
+
+ if ( ALLOC_ARRAY( cscr->Lookahead, count, HB_UShort ) )
+ goto Fail3;
+
+ l = cscr->Lookahead;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ goto Fail2;
+
+ for ( n = 0; n < count; n++ )
+ l[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ cscr->SubstCount = GET_UShort();
+
+ FORGET_Frame();
+
+ cscr->SubstLookupRecord = NULL;
+
+ count = cscr->SubstCount;
+
+ if ( ALLOC_ARRAY( cscr->SubstLookupRecord, count,
+ HB_SubstLookupRecord ) )
+ goto Fail2;
+
+ slr = cscr->SubstLookupRecord;
+
+ if ( ACCESS_Frame( count * 4L ) )
+ goto Fail1;
+
+ for ( n = 0; n < count; n++ )
+ {
+ slr[n].SequenceIndex = GET_UShort();
+ slr[n].LookupListIndex = GET_UShort();
+ }
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+
+Fail1:
+ FREE( slr );
+
+Fail2:
+ FREE( l );
+
+Fail3:
+ FREE( i );
+
+Fail4:
+ FREE( b );
+ return error;
+}
+
+
+static void Free_ChainSubClassRule( HB_ChainSubClassRule* cscr )
+{
+ FREE( cscr->SubstLookupRecord );
+ FREE( cscr->Lookahead );
+ FREE( cscr->Input );
+ FREE( cscr->Backtrack );
+}
+
+
+/* SubClassSet */
+
+static HB_Error Load_ChainSubClassSet(
+ HB_ChainContextSubstFormat2* ccsf2,
+ HB_ChainSubClassSet* cscs,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n = 0, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_ChainSubClassRule* cscr;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = cscs->ChainSubClassRuleCount = GET_UShort();
+
+ FORGET_Frame();
+
+ cscs->ChainSubClassRule = NULL;
+
+ if ( ALLOC_ARRAY( cscs->ChainSubClassRule, count,
+ HB_ChainSubClassRule ) )
+ return error;
+
+ cscr = cscs->ChainSubClassRule;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_ChainSubClassRule( ccsf2, &cscr[n],
+ stream ) ) != HB_Err_Ok )
+ goto Fail;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ for ( m = 0; m < n; m++ )
+ Free_ChainSubClassRule( &cscr[m] );
+
+ FREE( cscr );
+ return error;
+}
+
+
+static void Free_ChainSubClassSet( HB_ChainSubClassSet* cscs )
+{
+ HB_UShort n, count;
+
+ HB_ChainSubClassRule* cscr;
+
+
+ if ( cscs->ChainSubClassRule )
+ {
+ count = cscs->ChainSubClassRuleCount;
+ cscr = cscs->ChainSubClassRule;
+
+ for ( n = 0; n < count; n++ )
+ Free_ChainSubClassRule( &cscr[n] );
+
+ FREE( cscr );
+ }
+}
+
+
+/* ChainContextSubstFormat2 */
+
+static HB_Error Load_ChainContextSubst2(
+ HB_ChainContextSubstFormat2* ccsf2,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n = 0, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+ HB_UInt backtrack_offset, input_offset, lookahead_offset;
+
+ HB_ChainSubClassSet* cscs;
+
+
+ base_offset = FILE_Pos() - 2;
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &ccsf2->Coverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+ if ( ACCESS_Frame( 8L ) )
+ goto Fail5;
+
+ backtrack_offset = GET_UShort();
+ input_offset = GET_UShort();
+ lookahead_offset = GET_UShort();
+
+ /* `ChainSubClassSetCount' is the upper limit for input class values,
+ thus we read it now to make an additional safety check. No limit
+ is known or needed for the other two class definitions */
+
+ count = ccsf2->ChainSubClassSetCount = GET_UShort();
+
+ FORGET_Frame();
+
+ if ( ( error = _HB_OPEN_Load_EmptyOrClassDefinition( &ccsf2->BacktrackClassDef, 65535,
+ backtrack_offset, base_offset,
+ stream ) ) != HB_Err_Ok )
+ goto Fail5;
+
+ if ( ( error = _HB_OPEN_Load_EmptyOrClassDefinition( &ccsf2->InputClassDef, count,
+ input_offset, base_offset,
+ stream ) ) != HB_Err_Ok )
+ goto Fail4;
+ if ( ( error = _HB_OPEN_Load_EmptyOrClassDefinition( &ccsf2->LookaheadClassDef, 65535,
+ lookahead_offset, base_offset,
+ stream ) ) != HB_Err_Ok )
+ goto Fail3;
+
+ ccsf2->ChainSubClassSet = NULL;
+ ccsf2->MaxBacktrackLength = 0;
+ ccsf2->MaxInputLength = 0;
+ ccsf2->MaxLookaheadLength = 0;
+
+ if ( ALLOC_ARRAY( ccsf2->ChainSubClassSet, count, HB_ChainSubClassSet ) )
+ goto Fail2;
+
+ cscs = ccsf2->ChainSubClassSet;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ if ( new_offset != base_offset ) /* not a NULL offset */
+ {
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_ChainSubClassSet( ccsf2, &cscs[n],
+ stream ) ) != HB_Err_Ok )
+ goto Fail1;
+ (void)FILE_Seek( cur_offset );
+ }
+ else
+ {
+ /* we create a ChainSubClassSet table with no entries */
+
+ ccsf2->ChainSubClassSet[n].ChainSubClassRuleCount = 0;
+ ccsf2->ChainSubClassSet[n].ChainSubClassRule = NULL;
+ }
+ }
+
+ return HB_Err_Ok;
+
+Fail1:
+ for ( m = 0; m < n; m++ )
+ Free_ChainSubClassSet( &cscs[m] );
+
+ FREE( cscs );
+
+Fail2:
+ _HB_OPEN_Free_ClassDefinition( &ccsf2->LookaheadClassDef );
+
+Fail3:
+ _HB_OPEN_Free_ClassDefinition( &ccsf2->InputClassDef );
+
+Fail4:
+ _HB_OPEN_Free_ClassDefinition( &ccsf2->BacktrackClassDef );
+
+Fail5:
+ _HB_OPEN_Free_Coverage( &ccsf2->Coverage );
+ return error;
+}
+
+
+static void Free_ChainContextSubst2( HB_ChainContextSubstFormat2* ccsf2 )
+{
+ HB_UShort n, count;
+
+ HB_ChainSubClassSet* cscs;
+
+
+ if ( ccsf2->ChainSubClassSet )
+ {
+ count = ccsf2->ChainSubClassSetCount;
+ cscs = ccsf2->ChainSubClassSet;
+
+ for ( n = 0; n < count; n++ )
+ Free_ChainSubClassSet( &cscs[n] );
+
+ FREE( cscs );
+ }
+
+ _HB_OPEN_Free_ClassDefinition( &ccsf2->LookaheadClassDef );
+ _HB_OPEN_Free_ClassDefinition( &ccsf2->InputClassDef );
+ _HB_OPEN_Free_ClassDefinition( &ccsf2->BacktrackClassDef );
+
+ _HB_OPEN_Free_Coverage( &ccsf2->Coverage );
+}
+
+
+/* ChainContextSubstFormat3 */
+
+static HB_Error Load_ChainContextSubst3(
+ HB_ChainContextSubstFormat3* ccsf3,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, nb = 0, ni =0, nl = 0, m, count;
+ HB_UShort backtrack_count, input_count, lookahead_count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_Coverage* b;
+ HB_Coverage* i;
+ HB_Coverage* l;
+ HB_SubstLookupRecord* slr;
+
+
+ base_offset = FILE_Pos() - 2L;
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ ccsf3->BacktrackGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ccsf3->BacktrackCoverage = NULL;
+
+ backtrack_count = ccsf3->BacktrackGlyphCount;
+
+ if ( ALLOC_ARRAY( ccsf3->BacktrackCoverage, backtrack_count,
+ HB_Coverage ) )
+ return error;
+
+ b = ccsf3->BacktrackCoverage;
+
+ for ( nb = 0; nb < backtrack_count; nb++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail4;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &b[nb], stream ) ) != HB_Err_Ok )
+ goto Fail4;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail4;
+
+ ccsf3->InputGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ccsf3->InputCoverage = NULL;
+
+ input_count = ccsf3->InputGlyphCount;
+
+ if ( ALLOC_ARRAY( ccsf3->InputCoverage, input_count, HB_Coverage ) )
+ goto Fail4;
+
+ i = ccsf3->InputCoverage;
+
+ for ( ni = 0; ni < input_count; ni++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail3;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &i[ni], stream ) ) != HB_Err_Ok )
+ goto Fail3;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail3;
+
+ ccsf3->LookaheadGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ccsf3->LookaheadCoverage = NULL;
+
+ lookahead_count = ccsf3->LookaheadGlyphCount;
+
+ if ( ALLOC_ARRAY( ccsf3->LookaheadCoverage, lookahead_count,
+ HB_Coverage ) )
+ goto Fail3;
+
+ l = ccsf3->LookaheadCoverage;
+
+ for ( nl = 0; nl < lookahead_count; nl++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &l[nl], stream ) ) != HB_Err_Ok )
+ goto Fail2;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ ccsf3->SubstCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ccsf3->SubstLookupRecord = NULL;
+
+ count = ccsf3->SubstCount;
+
+ if ( ALLOC_ARRAY( ccsf3->SubstLookupRecord, count,
+ HB_SubstLookupRecord ) )
+ goto Fail2;
+
+ slr = ccsf3->SubstLookupRecord;
+
+ if ( ACCESS_Frame( count * 4L ) )
+ goto Fail1;
+
+ for ( n = 0; n < count; n++ )
+ {
+ slr[n].SequenceIndex = GET_UShort();
+ slr[n].LookupListIndex = GET_UShort();
+ }
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+
+Fail1:
+ FREE( slr );
+
+Fail2:
+ for ( m = 0; m < nl; m++ )
+ _HB_OPEN_Free_Coverage( &l[m] );
+
+ FREE( l );
+
+Fail3:
+ for ( m = 0; m < ni; m++ )
+ _HB_OPEN_Free_Coverage( &i[m] );
+
+ FREE( i );
+
+Fail4:
+ for ( m = 0; m < nb; m++ )
+ _HB_OPEN_Free_Coverage( &b[m] );
+
+ FREE( b );
+ return error;
+}
+
+
+static void Free_ChainContextSubst3( HB_ChainContextSubstFormat3* ccsf3 )
+{
+ HB_UShort n, count;
+
+ HB_Coverage* c;
+
+
+ FREE( ccsf3->SubstLookupRecord );
+
+ if ( ccsf3->LookaheadCoverage )
+ {
+ count = ccsf3->LookaheadGlyphCount;
+ c = ccsf3->LookaheadCoverage;
+
+ for ( n = 0; n < count; n++ )
+ _HB_OPEN_Free_Coverage( &c[n] );
+
+ FREE( c );
+ }
+
+ if ( ccsf3->InputCoverage )
+ {
+ count = ccsf3->InputGlyphCount;
+ c = ccsf3->InputCoverage;
+
+ for ( n = 0; n < count; n++ )
+ _HB_OPEN_Free_Coverage( &c[n] );
+
+ FREE( c );
+ }
+
+ if ( ccsf3->BacktrackCoverage )
+ {
+ count = ccsf3->BacktrackGlyphCount;
+ c = ccsf3->BacktrackCoverage;
+
+ for ( n = 0; n < count; n++ )
+ _HB_OPEN_Free_Coverage( &c[n] );
+
+ FREE( c );
+ }
+}
+
+
+/* ChainContextSubst */
+
+static HB_Error Load_ChainContextSubst( HB_GSUB_SubTable* st,
+ HB_Stream stream )
+{
+ HB_Error error;
+ HB_ChainContextSubst* ccs = &st->chain;
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ ccs->SubstFormat = GET_UShort();
+
+ FORGET_Frame();
+
+ switch ( ccs->SubstFormat ) {
+ case 1: return Load_ChainContextSubst1( &ccs->ccsf.ccsf1, stream );
+ case 2: return Load_ChainContextSubst2( &ccs->ccsf.ccsf2, stream );
+ case 3: return Load_ChainContextSubst3( &ccs->ccsf.ccsf3, stream );
+ default: return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+
+ return HB_Err_Ok; /* never reached */
+}
+
+
+static void Free_ChainContextSubst( HB_GSUB_SubTable* st )
+{
+ HB_ChainContextSubst* ccs = &st->chain;
+
+ switch ( ccs->SubstFormat ) {
+ case 1: Free_ChainContextSubst1( &ccs->ccsf.ccsf1 ); break;
+ case 2: Free_ChainContextSubst2( &ccs->ccsf.ccsf2 ); break;
+ case 3: Free_ChainContextSubst3( &ccs->ccsf.ccsf3 ); break;
+ default: break;
+ }
+}
+
+
+static HB_Error Lookup_ChainContextSubst1( HB_GSUBHeader* gsub,
+ HB_ChainContextSubstFormat1* ccsf1,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_UShort index, property;
+ HB_UShort i, j, k, num_csr;
+ HB_UShort bgc, igc, lgc;
+ HB_Error error;
+
+ HB_ChainSubRule* csr;
+ HB_ChainSubRule curr_csr;
+ HB_GDEFHeader* gdef;
+
+
+ gdef = gsub->gdef;
+
+ if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ error = _HB_OPEN_Coverage_Index( &ccsf1->Coverage, IN_CURGLYPH(), &index );
+ if ( error )
+ return error;
+
+ csr = ccsf1->ChainSubRuleSet[index].ChainSubRule;
+ num_csr = ccsf1->ChainSubRuleSet[index].ChainSubRuleCount;
+
+ for ( k = 0; k < num_csr; k++ )
+ {
+ curr_csr = csr[k];
+ bgc = curr_csr.BacktrackGlyphCount;
+ igc = curr_csr.InputGlyphCount;
+ lgc = curr_csr.LookaheadGlyphCount;
+
+ if ( context_length != 0xFFFF && context_length < igc )
+ goto next_chainsubrule;
+
+ /* check whether context is too long; it is a first guess only */
+
+ if ( bgc > buffer->out_pos || buffer->in_pos + igc + lgc > buffer->in_length )
+ goto next_chainsubrule;
+
+ if ( bgc )
+ {
+ /* since we don't know in advance the number of glyphs to inspect,
+ we search backwards for matches in the backtrack glyph array */
+
+ for ( i = 0, j = buffer->out_pos - 1; i < bgc; i++, j-- )
+ {
+ while ( CHECK_Property( gdef, OUT_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( j + 1 == bgc - i )
+ goto next_chainsubrule;
+ j--;
+ }
+
+ /* In OpenType 1.3, it is undefined whether the offsets of
+ backtrack glyphs is in logical order or not. Version 1.4
+ will clarify this:
+
+ Logical order - a b c d e f g h i j
+ i
+ Input offsets - 0 1
+ Backtrack offsets - 3 2 1 0
+ Lookahead offsets - 0 1 2 3 */
+
+ if ( OUT_GLYPH( j ) != curr_csr.Backtrack[i] )
+ goto next_chainsubrule;
+ }
+ }
+
+ /* Start at 1 because [0] is implied */
+
+ for ( i = 1, j = buffer->in_pos + 1; i < igc; i++, j++ )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( j + igc - i + lgc == (HB_Int)buffer->in_length )
+ goto next_chainsubrule;
+ j++;
+ }
+
+ if ( IN_GLYPH( j ) != curr_csr.Input[i - 1] )
+ goto next_chainsubrule;
+ }
+
+ /* we are starting to check for lookahead glyphs right after the
+ last context glyph */
+
+ for ( i = 0; i < lgc; i++, j++ )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( j + lgc - i == (HB_Int)buffer->in_length )
+ goto next_chainsubrule;
+ j++;
+ }
+
+ if ( IN_GLYPH( j ) != curr_csr.Lookahead[i] )
+ goto next_chainsubrule;
+ }
+
+ return Do_ContextSubst( gsub, igc,
+ curr_csr.SubstCount,
+ curr_csr.SubstLookupRecord,
+ buffer,
+ nesting_level );
+
+ next_chainsubrule:
+ ;
+ }
+
+ return HB_Err_Not_Covered;
+}
+
+
+static HB_Error Lookup_ChainContextSubst2( HB_GSUBHeader* gsub,
+ HB_ChainContextSubstFormat2* ccsf2,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_UShort index, property;
+ HB_Error error;
+ HB_UShort i, j, k;
+ HB_UShort bgc, igc, lgc;
+ HB_UShort known_backtrack_classes,
+ known_input_classes,
+ known_lookahead_classes;
+
+ HB_UShort* backtrack_classes;
+ HB_UShort* input_classes;
+ HB_UShort* lookahead_classes;
+
+ HB_UShort* bc;
+ HB_UShort* ic;
+ HB_UShort* lc;
+
+ HB_ChainSubClassSet* cscs;
+ HB_ChainSubClassRule ccsr;
+ HB_GDEFHeader* gdef;
+
+
+ gdef = gsub->gdef;
+
+ if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ /* Note: The coverage table in format 2 doesn't give an index into
+ anything. It just lets us know whether or not we need to
+ do any lookup at all. */
+
+ error = _HB_OPEN_Coverage_Index( &ccsf2->Coverage, IN_CURGLYPH(), &index );
+ if ( error )
+ return error;
+
+ if (ccsf2->MaxInputLength < 1)
+ return HB_Err_Not_Covered;
+
+ if ( ALLOC_ARRAY( backtrack_classes, ccsf2->MaxBacktrackLength, HB_UShort ) )
+ return error;
+ known_backtrack_classes = 0;
+
+ if ( ALLOC_ARRAY( input_classes, ccsf2->MaxInputLength, HB_UShort ) )
+ goto End3;
+ known_input_classes = 1;
+
+ if ( ALLOC_ARRAY( lookahead_classes, ccsf2->MaxLookaheadLength, HB_UShort ) )
+ goto End2;
+ known_lookahead_classes = 0;
+
+ error = _HB_OPEN_Get_Class( &ccsf2->InputClassDef, IN_CURGLYPH(),
+ &input_classes[0], NULL );
+ if ( error && error != HB_Err_Not_Covered )
+ goto End1;
+
+ cscs = &ccsf2->ChainSubClassSet[input_classes[0]];
+ if ( !cscs )
+ {
+ error = ERR(HB_Err_Invalid_SubTable);
+ goto End1;
+ }
+
+ for ( k = 0; k < cscs->ChainSubClassRuleCount; k++ )
+ {
+ ccsr = cscs->ChainSubClassRule[k];
+ bgc = ccsr.BacktrackGlyphCount;
+ igc = ccsr.InputGlyphCount;
+ lgc = ccsr.LookaheadGlyphCount;
+
+ if ( context_length != 0xFFFF && context_length < igc )
+ goto next_chainsubclassrule;
+
+ /* check whether context is too long; it is a first guess only */
+
+ if ( bgc > buffer->out_pos || buffer->in_pos + igc + lgc > buffer->in_length )
+ goto next_chainsubclassrule;
+
+ if ( bgc )
+ {
+ /* Since we don't know in advance the number of glyphs to inspect,
+ we search backwards for matches in the backtrack glyph array.
+ Note that `known_backtrack_classes' starts at index 0. */
+
+ bc = ccsr.Backtrack;
+
+ for ( i = 0, j = buffer->out_pos - 1; i < bgc; i++, j-- )
+ {
+ while ( CHECK_Property( gdef, OUT_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ goto End1;
+
+ if ( j + 1 == bgc - i )
+ goto next_chainsubclassrule;
+ j--;
+ }
+
+ if ( i >= known_backtrack_classes )
+ {
+ /* Keeps us from having to do this for each rule */
+
+ error = _HB_OPEN_Get_Class( &ccsf2->BacktrackClassDef, OUT_GLYPH( j ),
+ &backtrack_classes[i], NULL );
+ if ( error && error != HB_Err_Not_Covered )
+ goto End1;
+ known_backtrack_classes = i;
+ }
+
+ if ( bc[i] != backtrack_classes[i] )
+ goto next_chainsubclassrule;
+ }
+ }
+
+ ic = ccsr.Input;
+
+ /* Start at 1 because [0] is implied */
+
+ for ( i = 1, j = buffer->in_pos + 1; i < igc; i++, j++ )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ goto End1;
+
+ if ( j + igc - i + lgc == (HB_Int)buffer->in_length )
+ goto next_chainsubclassrule;
+ j++;
+ }
+
+ if ( i >= known_input_classes )
+ {
+ error = _HB_OPEN_Get_Class( &ccsf2->InputClassDef, IN_GLYPH( j ),
+ &input_classes[i], NULL );
+ if ( error && error != HB_Err_Not_Covered )
+ goto End1;
+ known_input_classes = i;
+ }
+
+ if ( ic[i - 1] != input_classes[i] )
+ goto next_chainsubclassrule;
+ }
+
+ /* we are starting to check for lookahead glyphs right after the
+ last context glyph */
+
+ lc = ccsr.Lookahead;
+
+ for ( i = 0; i < lgc; i++, j++ )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ goto End1;
+
+ if ( j + lgc - i == (HB_Int)buffer->in_length )
+ goto next_chainsubclassrule;
+ j++;
+ }
+
+ if ( i >= known_lookahead_classes )
+ {
+ error = _HB_OPEN_Get_Class( &ccsf2->LookaheadClassDef, IN_GLYPH( j ),
+ &lookahead_classes[i], NULL );
+ if ( error && error != HB_Err_Not_Covered )
+ goto End1;
+ known_lookahead_classes = i;
+ }
+
+ if ( lc[i] != lookahead_classes[i] )
+ goto next_chainsubclassrule;
+ }
+
+ error = Do_ContextSubst( gsub, igc,
+ ccsr.SubstCount,
+ ccsr.SubstLookupRecord,
+ buffer,
+ nesting_level );
+ goto End1;
+
+ next_chainsubclassrule:
+ ;
+ }
+
+ error = HB_Err_Not_Covered;
+
+End1:
+ FREE( lookahead_classes );
+
+End2:
+ FREE( input_classes );
+
+End3:
+ FREE( backtrack_classes );
+ return error;
+}
+
+
+static HB_Error Lookup_ChainContextSubst3( HB_GSUBHeader* gsub,
+ HB_ChainContextSubstFormat3* ccsf3,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_UShort index, i, j, property;
+ HB_UShort bgc, igc, lgc;
+ HB_Error error;
+
+ HB_Coverage* bc;
+ HB_Coverage* ic;
+ HB_Coverage* lc;
+ HB_GDEFHeader* gdef;
+
+
+ gdef = gsub->gdef;
+
+ if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ bgc = ccsf3->BacktrackGlyphCount;
+ igc = ccsf3->InputGlyphCount;
+ lgc = ccsf3->LookaheadGlyphCount;
+
+ if ( context_length != 0xFFFF && context_length < igc )
+ return HB_Err_Not_Covered;
+
+ /* check whether context is too long; it is a first guess only */
+
+ if ( bgc > buffer->out_pos || buffer->in_pos + igc + lgc > buffer->in_length )
+ return HB_Err_Not_Covered;
+
+ if ( bgc )
+ {
+ /* Since we don't know in advance the number of glyphs to inspect,
+ we search backwards for matches in the backtrack glyph array */
+
+ bc = ccsf3->BacktrackCoverage;
+
+ for ( i = 0, j = buffer->out_pos - 1; i < bgc; i++, j-- )
+ {
+ while ( CHECK_Property( gdef, OUT_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( j + 1 == bgc - i )
+ return HB_Err_Not_Covered;
+ j--;
+ }
+
+ error = _HB_OPEN_Coverage_Index( &bc[i], OUT_GLYPH( j ), &index );
+ if ( error )
+ return error;
+ }
+ }
+
+ ic = ccsf3->InputCoverage;
+
+ for ( i = 0, j = buffer->in_pos; i < igc; i++, j++ )
+ {
+ /* We already called CHECK_Property for IN_GLYPH( buffer->in_pos ) */
+ while ( j > buffer->in_pos && CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( j + igc - i + lgc == (HB_Int)buffer->in_length )
+ return HB_Err_Not_Covered;
+ j++;
+ }
+
+ error = _HB_OPEN_Coverage_Index( &ic[i], IN_GLYPH( j ), &index );
+ if ( error )
+ return error;
+ }
+
+ /* we are starting for lookahead glyphs right after the last context
+ glyph */
+
+ lc = ccsf3->LookaheadCoverage;
+
+ for ( i = 0; i < lgc; i++, j++ )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( j + lgc - i == (HB_Int)buffer->in_length )
+ return HB_Err_Not_Covered;
+ j++;
+ }
+
+ error = _HB_OPEN_Coverage_Index( &lc[i], IN_GLYPH( j ), &index );
+ if ( error )
+ return error;
+ }
+
+ return Do_ContextSubst( gsub, igc,
+ ccsf3->SubstCount,
+ ccsf3->SubstLookupRecord,
+ buffer,
+ nesting_level );
+}
+
+
+static HB_Error Lookup_ChainContextSubst( HB_GSUBHeader* gsub,
+ HB_GSUB_SubTable* st,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_ChainContextSubst* ccs = &st->chain;
+
+ switch ( ccs->SubstFormat ) {
+ case 1: return Lookup_ChainContextSubst1( gsub, &ccs->ccsf.ccsf1, buffer, flags, context_length, nesting_level );
+ case 2: return Lookup_ChainContextSubst2( gsub, &ccs->ccsf.ccsf2, buffer, flags, context_length, nesting_level );
+ case 3: return Lookup_ChainContextSubst3( gsub, &ccs->ccsf.ccsf3, buffer, flags, context_length, nesting_level );
+ default: return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+}
+
+
+static HB_Error Load_ReverseChainContextSubst( HB_GSUB_SubTable* st,
+ HB_Stream stream )
+{
+ HB_Error error;
+ HB_ReverseChainContextSubst* rccs = &st->reverse;
+
+ HB_UShort m, count;
+
+ HB_UShort nb = 0, nl = 0, n;
+ HB_UShort backtrack_count, lookahead_count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_Coverage* b;
+ HB_Coverage* l;
+ HB_UShort* sub;
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ rccs->SubstFormat = GET_UShort();
+
+ if ( rccs->SubstFormat != 1 )
+ return ERR(HB_Err_Invalid_SubTable_Format);
+
+ FORGET_Frame();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &rccs->Coverage, stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail4;
+
+ rccs->BacktrackGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ rccs->BacktrackCoverage = NULL;
+
+ backtrack_count = rccs->BacktrackGlyphCount;
+
+ if ( ALLOC_ARRAY( rccs->BacktrackCoverage, backtrack_count,
+ HB_Coverage ) )
+ goto Fail4;
+
+ b = rccs->BacktrackCoverage;
+
+ for ( nb = 0; nb < backtrack_count; nb++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail3;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &b[nb], stream ) ) != HB_Err_Ok )
+ goto Fail3;
+ (void)FILE_Seek( cur_offset );
+ }
+
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail3;
+
+ rccs->LookaheadGlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ rccs->LookaheadCoverage = NULL;
+
+ lookahead_count = rccs->LookaheadGlyphCount;
+
+ if ( ALLOC_ARRAY( rccs->LookaheadCoverage, lookahead_count,
+ HB_Coverage ) )
+ goto Fail3;
+
+ l = rccs->LookaheadCoverage;
+
+ for ( nl = 0; nl < lookahead_count; nl++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = _HB_OPEN_Load_Coverage( &l[nl], stream ) ) != HB_Err_Ok )
+ goto Fail2;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ rccs->GlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ rccs->Substitute = NULL;
+
+ count = rccs->GlyphCount;
+
+ if ( ALLOC_ARRAY( rccs->Substitute, count,
+ HB_UShort ) )
+ goto Fail2;
+
+ sub = rccs->Substitute;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ goto Fail1;
+
+ for ( n = 0; n < count; n++ )
+ sub[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+
+Fail1:
+ FREE( sub );
+
+Fail2:
+ for ( m = 0; m < nl; m++ )
+ _HB_OPEN_Free_Coverage( &l[m] );
+
+ FREE( l );
+
+Fail3:
+ for ( m = 0; m < nb; m++ )
+ _HB_OPEN_Free_Coverage( &b[m] );
+
+ FREE( b );
+
+Fail4:
+ _HB_OPEN_Free_Coverage( &rccs->Coverage );
+ return error;
+}
+
+
+static void Free_ReverseChainContextSubst( HB_GSUB_SubTable* st )
+{
+ HB_UShort n, count;
+ HB_ReverseChainContextSubst* rccs = &st->reverse;
+
+ HB_Coverage* c;
+
+ _HB_OPEN_Free_Coverage( &rccs->Coverage );
+
+ if ( rccs->LookaheadCoverage )
+ {
+ count = rccs->LookaheadGlyphCount;
+ c = rccs->LookaheadCoverage;
+
+ for ( n = 0; n < count; n++ )
+ _HB_OPEN_Free_Coverage( &c[n] );
+
+ FREE( c );
+ }
+
+ if ( rccs->BacktrackCoverage )
+ {
+ count = rccs->BacktrackGlyphCount;
+ c = rccs->BacktrackCoverage;
+
+ for ( n = 0; n < count; n++ )
+ _HB_OPEN_Free_Coverage( &c[n] );
+
+ FREE( c );
+ }
+
+ FREE ( rccs->Substitute );
+}
+
+
+static HB_Error Lookup_ReverseChainContextSubst( HB_GSUBHeader* gsub,
+ HB_GSUB_SubTable* st,
+ HB_Buffer buffer,
+ HB_UShort flags,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_UShort index, input_index, i, j, property;
+ HB_UShort bgc, lgc;
+ HB_Error error;
+
+ HB_ReverseChainContextSubst* rccs = &st->reverse;
+ HB_Coverage* bc;
+ HB_Coverage* lc;
+ HB_GDEFHeader* gdef;
+
+ if ( nesting_level != 1 || context_length != 0xFFFF )
+ return HB_Err_Not_Covered;
+
+ gdef = gsub->gdef;
+
+ if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) )
+ return error;
+
+ bgc = rccs->BacktrackGlyphCount;
+ lgc = rccs->LookaheadGlyphCount;
+
+ /* check whether context is too long; it is a first guess only */
+
+ if ( bgc > buffer->in_pos || buffer->in_pos + 1 + lgc > buffer->in_length )
+ return HB_Err_Not_Covered;
+
+ if ( bgc )
+ {
+ /* Since we don't know in advance the number of glyphs to inspect,
+ we search backwards for matches in the backtrack glyph array */
+
+ bc = rccs->BacktrackCoverage;
+
+ for ( i = 0, j = buffer->in_pos - 1; i < bgc; i++, j-- )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( j + 1 == bgc - i )
+ return HB_Err_Not_Covered;
+ j--;
+ }
+
+ error = _HB_OPEN_Coverage_Index( &bc[i], IN_GLYPH( j ), &index );
+ if ( error )
+ return error;
+ }
+ }
+
+ j = buffer->in_pos;
+
+ error = _HB_OPEN_Coverage_Index( &rccs->Coverage, IN_GLYPH( j ), &input_index );
+ if ( error )
+ return error;
+
+ lc = rccs->LookaheadCoverage;
+
+ for ( i = 0, j = buffer->in_pos + 1; i < lgc; i++, j++ )
+ {
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
+ {
+ if ( error && error != HB_Err_Not_Covered )
+ return error;
+
+ if ( j + lgc - i == (HB_Int)buffer->in_length )
+ return HB_Err_Not_Covered;
+ j++;
+ }
+
+ error = _HB_OPEN_Coverage_Index( &lc[i], IN_GLYPH( j ), &index );
+ if ( error )
+ return error;
+ }
+
+ IN_CURGLYPH() = rccs->Substitute[input_index];
+ buffer->in_pos--; /* Reverse! */
+
+ return error;
+}
+
+
+
+/***********
+ * GSUB API
+ ***********/
+
+
+
+HB_Error HB_GSUB_Select_Script( HB_GSUBHeader* gsub,
+ HB_UInt script_tag,
+ HB_UShort* script_index )
+{
+ HB_UShort n;
+
+ HB_ScriptList* sl;
+ HB_ScriptRecord* sr;
+
+
+ if ( !gsub || !script_index )
+ return ERR(HB_Err_Invalid_Argument);
+
+ sl = &gsub->ScriptList;
+ sr = sl->ScriptRecord;
+
+ for ( n = 0; n < sl->ScriptCount; n++ )
+ if ( script_tag == sr[n].ScriptTag )
+ {
+ *script_index = n;
+
+ return HB_Err_Ok;
+ }
+
+ return HB_Err_Not_Covered;
+}
+
+
+
+HB_Error HB_GSUB_Select_Language( HB_GSUBHeader* gsub,
+ HB_UInt language_tag,
+ HB_UShort script_index,
+ HB_UShort* language_index,
+ HB_UShort* req_feature_index )
+{
+ HB_UShort n;
+
+ HB_ScriptList* sl;
+ HB_ScriptRecord* sr;
+ HB_ScriptTable* s;
+ HB_LangSysRecord* lsr;
+
+
+ if ( !gsub || !language_index || !req_feature_index )
+ return ERR(HB_Err_Invalid_Argument);
+
+ sl = &gsub->ScriptList;
+ sr = sl->ScriptRecord;
+
+ if ( script_index >= sl->ScriptCount )
+ return ERR(HB_Err_Invalid_Argument);
+
+ s = &sr[script_index].Script;
+ lsr = s->LangSysRecord;
+
+ for ( n = 0; n < s->LangSysCount; n++ )
+ if ( language_tag == lsr[n].LangSysTag )
+ {
+ *language_index = n;
+ *req_feature_index = lsr[n].LangSys.ReqFeatureIndex;
+
+ return HB_Err_Ok;
+ }
+
+ return HB_Err_Not_Covered;
+}
+
+
+/* selecting 0xFFFF for language_index asks for the values of the
+ default language (DefaultLangSys) */
+
+
+HB_Error HB_GSUB_Select_Feature( HB_GSUBHeader* gsub,
+ HB_UInt feature_tag,
+ HB_UShort script_index,
+ HB_UShort language_index,
+ HB_UShort* feature_index )
+{
+ HB_UShort n;
+
+ HB_ScriptList* sl;
+ HB_ScriptRecord* sr;
+ HB_ScriptTable* s;
+ HB_LangSysRecord* lsr;
+ HB_LangSys* ls;
+ HB_UShort* fi;
+
+ HB_FeatureList* fl;
+ HB_FeatureRecord* fr;
+
+
+ if ( !gsub || !feature_index )
+ return ERR(HB_Err_Invalid_Argument);
+
+ sl = &gsub->ScriptList;
+ sr = sl->ScriptRecord;
+
+ fl = &gsub->FeatureList;
+ fr = fl->FeatureRecord;
+
+ if ( script_index >= sl->ScriptCount )
+ return ERR(HB_Err_Invalid_Argument);
+
+ s = &sr[script_index].Script;
+ lsr = s->LangSysRecord;
+
+ if ( language_index == 0xFFFF )
+ ls = &s->DefaultLangSys;
+ else
+ {
+ if ( language_index >= s->LangSysCount )
+ return ERR(HB_Err_Invalid_Argument);
+
+ ls = &lsr[language_index].LangSys;
+ }
+
+ fi = ls->FeatureIndex;
+
+ for ( n = 0; n < ls->FeatureCount; n++ )
+ {
+ if ( fi[n] >= fl->FeatureCount )
+ return ERR(HB_Err_Invalid_SubTable_Format);
+
+ if ( feature_tag == fr[fi[n]].FeatureTag )
+ {
+ *feature_index = fi[n];
+
+ return HB_Err_Ok;
+ }
+ }
+
+ return HB_Err_Not_Covered;
+}
+
+
+/* The next three functions return a null-terminated list */
+
+
+HB_Error HB_GSUB_Query_Scripts( HB_GSUBHeader* gsub,
+ HB_UInt** script_tag_list )
+{
+ HB_UShort n;
+ HB_Error error;
+ HB_UInt* stl;
+
+ HB_ScriptList* sl;
+ HB_ScriptRecord* sr;
+
+
+ if ( !gsub || !script_tag_list )
+ return ERR(HB_Err_Invalid_Argument);
+
+ sl = &gsub->ScriptList;
+ sr = sl->ScriptRecord;
+
+ if ( ALLOC_ARRAY( stl, sl->ScriptCount + 1, HB_UInt ) )
+ return error;
+
+ for ( n = 0; n < sl->ScriptCount; n++ )
+ stl[n] = sr[n].ScriptTag;
+ stl[n] = 0;
+
+ *script_tag_list = stl;
+
+ return HB_Err_Ok;
+}
+
+
+
+HB_Error HB_GSUB_Query_Languages( HB_GSUBHeader* gsub,
+ HB_UShort script_index,
+ HB_UInt** language_tag_list )
+{
+ HB_UShort n;
+ HB_Error error;
+ HB_UInt* ltl;
+
+ HB_ScriptList* sl;
+ HB_ScriptRecord* sr;
+ HB_ScriptTable* s;
+ HB_LangSysRecord* lsr;
+
+
+ if ( !gsub || !language_tag_list )
+ return ERR(HB_Err_Invalid_Argument);
+
+ sl = &gsub->ScriptList;
+ sr = sl->ScriptRecord;
+
+ if ( script_index >= sl->ScriptCount )
+ return ERR(HB_Err_Invalid_Argument);
+
+ s = &sr[script_index].Script;
+ lsr = s->LangSysRecord;
+
+ if ( ALLOC_ARRAY( ltl, s->LangSysCount + 1, HB_UInt ) )
+ return error;
+
+ for ( n = 0; n < s->LangSysCount; n++ )
+ ltl[n] = lsr[n].LangSysTag;
+ ltl[n] = 0;
+
+ *language_tag_list = ltl;
+
+ return HB_Err_Ok;
+}
+
+
+/* selecting 0xFFFF for language_index asks for the values of the
+ default language (DefaultLangSys) */
+
+
+HB_Error HB_GSUB_Query_Features( HB_GSUBHeader* gsub,
+ HB_UShort script_index,
+ HB_UShort language_index,
+ HB_UInt** feature_tag_list )
+{
+ HB_UShort n;
+ HB_Error error;
+ HB_UInt* ftl;
+
+ HB_ScriptList* sl;
+ HB_ScriptRecord* sr;
+ HB_ScriptTable* s;
+ HB_LangSysRecord* lsr;
+ HB_LangSys* ls;
+ HB_UShort* fi;
+
+ HB_FeatureList* fl;
+ HB_FeatureRecord* fr;
+
+
+ if ( !gsub || !feature_tag_list )
+ return ERR(HB_Err_Invalid_Argument);
+
+ sl = &gsub->ScriptList;
+ sr = sl->ScriptRecord;
+
+ fl = &gsub->FeatureList;
+ fr = fl->FeatureRecord;
+
+ if ( script_index >= sl->ScriptCount )
+ return ERR(HB_Err_Invalid_Argument);
+
+ s = &sr[script_index].Script;
+ lsr = s->LangSysRecord;
+
+ if ( language_index == 0xFFFF )
+ ls = &s->DefaultLangSys;
+ else
+ {
+ if ( language_index >= s->LangSysCount )
+ return ERR(HB_Err_Invalid_Argument);
+
+ ls = &lsr[language_index].LangSys;
+ }
+
+ fi = ls->FeatureIndex;
+
+ if ( ALLOC_ARRAY( ftl, ls->FeatureCount + 1, HB_UInt ) )
+ return error;
+
+ for ( n = 0; n < ls->FeatureCount; n++ )
+ {
+ if ( fi[n] >= fl->FeatureCount )
+ {
+ FREE( ftl );
+ return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+ ftl[n] = fr[fi[n]].FeatureTag;
+ }
+ ftl[n] = 0;
+
+ *feature_tag_list = ftl;
+
+ return HB_Err_Ok;
+}
+
+
+/* Do an individual subtable lookup. Returns HB_Err_Ok if substitution
+ has been done, or HB_Err_Not_Covered if not. */
+static HB_Error GSUB_Do_Glyph_Lookup( HB_GSUBHeader* gsub,
+ HB_UShort lookup_index,
+ HB_Buffer buffer,
+ HB_UShort context_length,
+ int nesting_level )
+{
+ HB_Error error = HB_Err_Not_Covered;
+ HB_UShort i, flags, lookup_count;
+ HB_Lookup* lo;
+ int lookup_type;
+
+ nesting_level++;
+
+ if ( nesting_level > HB_MAX_NESTING_LEVEL )
+ return ERR(HB_Err_Not_Covered); /* ERR() call intended */
+
+ lookup_count = gsub->LookupList.LookupCount;
+ if (lookup_index >= lookup_count)
+ return error;
+
+ lo = &gsub->LookupList.Lookup[lookup_index];
+ flags = lo->LookupFlag;
+ lookup_type = lo->LookupType;
+
+ for ( i = 0; i < lo->SubTableCount; i++ )
+ {
+ HB_GSUB_SubTable *st = &lo->SubTable[i].st.gsub;
+
+ switch (lookup_type) {
+ case HB_GSUB_LOOKUP_SINGLE:
+ error = Lookup_SingleSubst ( gsub, st, buffer, flags, context_length, nesting_level ); break;
+ case HB_GSUB_LOOKUP_MULTIPLE:
+ error = Lookup_MultipleSubst ( gsub, st, buffer, flags, context_length, nesting_level ); break;
+ case HB_GSUB_LOOKUP_ALTERNATE:
+ error = Lookup_AlternateSubst ( gsub, st, buffer, flags, context_length, nesting_level ); break;
+ case HB_GSUB_LOOKUP_LIGATURE:
+ error = Lookup_LigatureSubst ( gsub, st, buffer, flags, context_length, nesting_level ); break;
+ case HB_GSUB_LOOKUP_CONTEXT:
+ error = Lookup_ContextSubst ( gsub, st, buffer, flags, context_length, nesting_level ); break;
+ case HB_GSUB_LOOKUP_CHAIN:
+ error = Lookup_ChainContextSubst ( gsub, st, buffer, flags, context_length, nesting_level ); break;
+ /*case HB_GSUB_LOOKUP_EXTENSION:
+ error = Lookup_ExtensionSubst ( gsub, st, buffer, flags, context_length, nesting_level ); break;*/
+ case HB_GSUB_LOOKUP_REVERSE_CHAIN:
+ error = Lookup_ReverseChainContextSubst ( gsub, st, buffer, flags, context_length, nesting_level ); break;
+ default:
+ error = HB_Err_Not_Covered;
+ };
+
+ /* Check whether we have a successful substitution or an error other
+ than HB_Err_Not_Covered */
+ if ( error != HB_Err_Not_Covered )
+ return error;
+ }
+
+ return HB_Err_Not_Covered;
+}
+
+
+HB_INTERNAL HB_Error
+_HB_GSUB_Load_SubTable( HB_GSUB_SubTable* st,
+ HB_Stream stream,
+ HB_UShort lookup_type )
+{
+ switch (lookup_type) {
+ case HB_GSUB_LOOKUP_SINGLE: return Load_SingleSubst ( st, stream );
+ case HB_GSUB_LOOKUP_MULTIPLE: return Load_MultipleSubst ( st, stream );
+ case HB_GSUB_LOOKUP_ALTERNATE: return Load_AlternateSubst ( st, stream );
+ case HB_GSUB_LOOKUP_LIGATURE: return Load_LigatureSubst ( st, stream );
+ case HB_GSUB_LOOKUP_CONTEXT: return Load_ContextSubst ( st, stream );
+ case HB_GSUB_LOOKUP_CHAIN: return Load_ChainContextSubst ( st, stream );
+ /*case HB_GSUB_LOOKUP_EXTENSION: return Load_ExtensionSubst ( st, stream );*/
+ case HB_GSUB_LOOKUP_REVERSE_CHAIN: return Load_ReverseChainContextSubst ( st, stream );
+ default: return ERR(HB_Err_Invalid_SubTable_Format);
+ };
+}
+
+
+HB_INTERNAL void
+_HB_GSUB_Free_SubTable( HB_GSUB_SubTable* st,
+ HB_UShort lookup_type )
+{
+ switch ( lookup_type ) {
+ case HB_GSUB_LOOKUP_SINGLE: Free_SingleSubst ( st ); return;
+ case HB_GSUB_LOOKUP_MULTIPLE: Free_MultipleSubst ( st ); return;
+ case HB_GSUB_LOOKUP_ALTERNATE: Free_AlternateSubst ( st ); return;
+ case HB_GSUB_LOOKUP_LIGATURE: Free_LigatureSubst ( st ); return;
+ case HB_GSUB_LOOKUP_CONTEXT: Free_ContextSubst ( st ); return;
+ case HB_GSUB_LOOKUP_CHAIN: Free_ChainContextSubst ( st ); return;
+ /*case HB_GSUB_LOOKUP_EXTENSION: Free_ExtensionSubst ( st ); return;*/
+ case HB_GSUB_LOOKUP_REVERSE_CHAIN: Free_ReverseChainContextSubst ( st ); return;
+ default: return;
+ };
+}
+
+
+
+/* apply one lookup to the input string object */
+
+static HB_Error GSUB_Do_String_Lookup( HB_GSUBHeader* gsub,
+ HB_UShort lookup_index,
+ HB_Buffer buffer )
+{
+ HB_Error error, retError = HB_Err_Not_Covered;
+
+ HB_UInt* properties = gsub->LookupList.Properties;
+ int lookup_type = gsub->LookupList.Lookup[lookup_index].LookupType;
+
+ const int nesting_level = 0;
+ /* 0xFFFF indicates that we don't have a context length yet */
+ const HB_UShort context_length = 0xFFFF;
+
+ switch (lookup_type) {
+
+ case HB_GSUB_LOOKUP_SINGLE:
+ case HB_GSUB_LOOKUP_MULTIPLE:
+ case HB_GSUB_LOOKUP_ALTERNATE:
+ case HB_GSUB_LOOKUP_LIGATURE:
+ case HB_GSUB_LOOKUP_CONTEXT:
+ case HB_GSUB_LOOKUP_CHAIN:
+ /* in/out forward substitution (implemented lazy) */
+
+ _hb_buffer_clear_output ( buffer );
+ buffer->in_pos = 0;
+ while ( buffer->in_pos < buffer->in_length )
+ {
+ if ( ~IN_PROPERTIES( buffer->in_pos ) & properties[lookup_index] )
+ {
+ error = GSUB_Do_Glyph_Lookup( gsub, lookup_index, buffer, context_length, nesting_level );
+ if ( error )
+ {
+ if ( error != HB_Err_Not_Covered )
+ return error;
+ }
+ else
+ retError = error;
+ }
+ else
+ error = HB_Err_Not_Covered;
+
+ if ( error == HB_Err_Not_Covered )
+ if ( COPY_Glyph ( buffer ) )
+ return error;
+ }
+ /* we shouldn't swap if error occurred.
+ *
+ * also don't swap if nothing changed (ie HB_Err_Not_Covered).
+ * shouldn't matter in that case though.
+ */
+ if ( retError == HB_Err_Ok )
+ _hb_buffer_swap( buffer );
+
+ return retError;
+
+ case HB_GSUB_LOOKUP_REVERSE_CHAIN:
+ /* in-place backward substitution */
+
+ buffer->in_pos = buffer->in_length - 1;
+ do
+ {
+ if ( ~IN_PROPERTIES( buffer->in_pos ) & properties[lookup_index] )
+ {
+ error = GSUB_Do_Glyph_Lookup( gsub, lookup_index, buffer, context_length, nesting_level );
+ if ( error )
+ {
+ if ( error != HB_Err_Not_Covered )
+ return error;
+ }
+ else
+ retError = error;
+ }
+ else
+ error = HB_Err_Not_Covered;
+
+ if ( error == HB_Err_Not_Covered )
+ buffer->in_pos--;
+ }
+ while ((HB_Int) buffer->in_pos >= 0);
+
+ return retError;
+
+ /*case HB_GSUB_LOOKUP_EXTENSION:*/
+ default:
+ return retError;
+ };
+}
+
+
+HB_Error HB_GSUB_Add_Feature( HB_GSUBHeader* gsub,
+ HB_UShort feature_index,
+ HB_UInt property )
+{
+ HB_UShort i;
+
+ HB_Feature feature;
+ HB_UInt* properties;
+ HB_UShort* index;
+ HB_UShort lookup_count;
+
+ /* Each feature can only be added once */
+
+ if ( !gsub ||
+ feature_index >= gsub->FeatureList.FeatureCount ||
+ gsub->FeatureList.ApplyCount == gsub->FeatureList.FeatureCount )
+ return ERR(HB_Err_Invalid_Argument);
+
+ gsub->FeatureList.ApplyOrder[gsub->FeatureList.ApplyCount++] = feature_index;
+
+ properties = gsub->LookupList.Properties;
+
+ feature = gsub->FeatureList.FeatureRecord[feature_index].Feature;
+ index = feature.LookupListIndex;
+ lookup_count = gsub->LookupList.LookupCount;
+
+ for ( i = 0; i < feature.LookupListCount; i++ )
+ {
+ HB_UShort lookup_index = index[i];
+ if (lookup_index < lookup_count)
+ properties[lookup_index] |= property;
+ }
+
+ return HB_Err_Ok;
+}
+
+
+
+HB_Error HB_GSUB_Clear_Features( HB_GSUBHeader* gsub )
+{
+ HB_UShort i;
+
+ HB_UInt* properties;
+
+
+ if ( !gsub )
+ return ERR(HB_Err_Invalid_Argument);
+
+ gsub->FeatureList.ApplyCount = 0;
+
+ properties = gsub->LookupList.Properties;
+
+ for ( i = 0; i < gsub->LookupList.LookupCount; i++ )
+ properties[i] = 0;
+
+ return HB_Err_Ok;
+}
+
+
+
+HB_Error HB_GSUB_Register_Alternate_Function( HB_GSUBHeader* gsub,
+ HB_AltFunction altfunc,
+ void* data )
+{
+ if ( !gsub )
+ return ERR(HB_Err_Invalid_Argument);
+
+ gsub->altfunc = altfunc;
+ gsub->data = data;
+
+ return HB_Err_Ok;
+}
+
+/* returns error if one happened, otherwise returns HB_Err_Not_Covered if no
+ * feature were applied, or HB_Err_Ok otherwise.
+ */
+HB_Error HB_GSUB_Apply_String( HB_GSUBHeader* gsub,
+ HB_Buffer buffer )
+{
+ HB_Error error, retError = HB_Err_Not_Covered;
+ int i, j, lookup_count, num_features;
+
+ if ( !gsub ||
+ !buffer)
+ return ERR(HB_Err_Invalid_Argument);
+
+ if ( buffer->in_length == 0 )
+ return retError;
+
+ lookup_count = gsub->LookupList.LookupCount;
+ num_features = gsub->FeatureList.ApplyCount;
+
+ for ( i = 0; i < num_features; i++)
+ {
+ HB_UShort feature_index = gsub->FeatureList.ApplyOrder[i];
+ HB_Feature feature = gsub->FeatureList.FeatureRecord[feature_index].Feature;
+
+ for ( j = 0; j < feature.LookupListCount; j++ )
+ {
+ HB_UShort lookup_index = feature.LookupListIndex[j];
+
+ /* Skip nonexistant lookups */
+ if (lookup_index >= lookup_count)
+ continue;
+
+ error = GSUB_Do_String_Lookup( gsub, lookup_index, buffer );
+ if ( error )
+ {
+ if ( error != HB_Err_Not_Covered )
+ return error;
+ }
+ else
+ retError = error;
+ }
+ }
+
+ error = retError;
+
+ return error;
+}
+
+
+/* END */
diff --git a/src/hb-old/harfbuzz-gsub.h b/src/hb-old/harfbuzz-gsub.h
new file mode 100644
index 0000000..b00df44
--- /dev/null
+++ b/src/hb-old/harfbuzz-gsub.h
@@ -0,0 +1,148 @@
+/*
+ * Copyright (C) 1998-2004 David Turner and Werner Lemberg
+ * Copyright (C) 2006 Behdad Esfahbod
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#ifndef HARFBUZZ_GSUB_H
+#define HARFBUZZ_GSUB_H
+
+#include "harfbuzz-gdef.h"
+#include "harfbuzz-buffer.h"
+
+HB_BEGIN_HEADER
+
+
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(push, 1)
+#endif
+
+/* Lookup types for glyph substitution */
+
+#define HB_GSUB_LOOKUP_SINGLE 1
+#define HB_GSUB_LOOKUP_MULTIPLE 2
+#define HB_GSUB_LOOKUP_ALTERNATE 3
+#define HB_GSUB_LOOKUP_LIGATURE 4
+#define HB_GSUB_LOOKUP_CONTEXT 5
+#define HB_GSUB_LOOKUP_CHAIN 6
+#define HB_GSUB_LOOKUP_EXTENSION 7
+#define HB_GSUB_LOOKUP_REVERSE_CHAIN 8
+
+
+/* A pointer to a function which selects the alternate glyph. `pos' is
+ the position of the glyph with index `glyphID', `num_alternates'
+ gives the number of alternates in the `alternates' array. `data'
+ points to the user-defined structure specified during a call to
+ HB_GSUB_Register_Alternate_Function(). The function must return an
+ index into the `alternates' array. */
+
+typedef HB_UShort (*HB_AltFunction)(HB_UInt pos,
+ HB_UShort glyphID,
+ HB_UShort num_alternates,
+ HB_UShort* alternates,
+ void* data );
+
+
+struct HB_GSUBHeader_
+{
+ HB_GDEFHeader* gdef;
+
+ /* the next two fields are used for an alternate substitution callback
+ function to select the proper alternate glyph. */
+
+ void* data;
+ HB_AltFunction altfunc;
+
+ HB_UInt offset;
+
+ HB_16Dot16 Version;
+
+ HB_ScriptList ScriptList;
+ HB_FeatureList FeatureList;
+ HB_LookupList LookupList;
+};
+
+typedef struct HB_GSUBHeader_ HB_GSUBHeader;
+typedef HB_GSUBHeader* HB_GSUB;
+
+
+HB_Error HB_Load_GSUB_Table( HB_Stream stream,
+ HB_GSUBHeader** gsub,
+ HB_GDEFHeader* gdef,
+ HB_Stream gdefStream );
+
+
+HB_Error HB_Done_GSUB_Table( HB_GSUBHeader* gsub );
+
+
+HB_Error HB_GSUB_Select_Script( HB_GSUBHeader* gsub,
+ HB_UInt script_tag,
+ HB_UShort* script_index );
+
+HB_Error HB_GSUB_Select_Language( HB_GSUBHeader* gsub,
+ HB_UInt language_tag,
+ HB_UShort script_index,
+ HB_UShort* language_index,
+ HB_UShort* req_feature_index );
+
+HB_Error HB_GSUB_Select_Feature( HB_GSUBHeader* gsub,
+ HB_UInt feature_tag,
+ HB_UShort script_index,
+ HB_UShort language_index,
+ HB_UShort* feature_index );
+
+
+HB_Error HB_GSUB_Query_Scripts( HB_GSUBHeader* gsub,
+ HB_UInt** script_tag_list );
+
+HB_Error HB_GSUB_Query_Languages( HB_GSUBHeader* gsub,
+ HB_UShort script_index,
+ HB_UInt** language_tag_list );
+
+HB_Error HB_GSUB_Query_Features( HB_GSUBHeader* gsub,
+ HB_UShort script_index,
+ HB_UShort language_index,
+ HB_UInt** feature_tag_list );
+
+
+HB_Error HB_GSUB_Add_Feature( HB_GSUBHeader* gsub,
+ HB_UShort feature_index,
+ HB_UInt property );
+
+HB_Error HB_GSUB_Clear_Features( HB_GSUBHeader* gsub );
+
+
+HB_Error HB_GSUB_Register_Alternate_Function( HB_GSUBHeader* gsub,
+ HB_AltFunction altfunc,
+ void* data );
+
+
+HB_Error HB_GSUB_Apply_String( HB_GSUBHeader* gsub,
+ HB_Buffer buffer );
+
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(pop)
+#endif
+
+HB_END_HEADER
+
+#endif /* HARFBUZZ_GSUB_H */
diff --git a/src/hb-old/harfbuzz-hangul.c b/src/hb-old/harfbuzz-hangul.c
new file mode 100644
index 0000000..6f89ed6
--- /dev/null
+++ b/src/hb-old/harfbuzz-hangul.c
@@ -0,0 +1,268 @@
+/*
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#include "harfbuzz-shaper.h"
+#include "harfbuzz-shaper-private.h"
+
+#include <assert.h>
+
+/*
+// Hangul is a syllable based script. Unicode reserves a large range
+// for precomposed hangul, where syllables are already precomposed to
+// their final glyph shape. In addition, a so called jamo range is
+// defined, that can be used to express old Hangul. Modern hangul
+// syllables can also be expressed as jamo, and should be composed
+// into syllables. The operation is rather simple and mathematical.
+
+// Every hangul jamo is classified as being either a Leading consonant
+// (L), and intermediat Vowel (V) or a trailing consonant (T). Modern
+// hangul syllables (the ones in the precomposed area can be of type
+// LV or LVT.
+//
+// Syllable breaks do _not_ occur between:
+//
+// L L, V or precomposed
+// V, LV V, T
+// LVT, T T
+//
+// A standard syllable is of the form L+V+T*. The above rules allow
+// nonstandard syllables L*V*T*. To transform them into standard
+// syllables fill characters L_f and V_f can be inserted.
+*/
+
+enum {
+ Hangul_SBase = 0xac00,
+ Hangul_LBase = 0x1100,
+ Hangul_VBase = 0x1161,
+ Hangul_TBase = 0x11a7,
+ Hangul_SCount = 11172,
+ Hangul_LCount = 19,
+ Hangul_VCount = 21,
+ Hangul_TCount = 28,
+ Hangul_NCount = 21*28
+};
+
+#define hangul_isPrecomposed(uc) \
+ (uc >= Hangul_SBase && uc < Hangul_SBase + Hangul_SCount)
+
+#define hangul_isLV(uc) \
+ ((uc - Hangul_SBase) % Hangul_TCount == 0)
+
+typedef enum {
+ L,
+ V,
+ T,
+ LV,
+ LVT,
+ X
+} HangulType;
+
+static HangulType hangul_type(unsigned short uc) {
+ if (uc > Hangul_SBase && uc < Hangul_SBase + Hangul_SCount)
+ return hangul_isLV(uc) ? LV : LVT;
+ if (uc < Hangul_LBase || uc > 0x11ff)
+ return X;
+ if (uc < Hangul_VBase)
+ return L;
+ if (uc < Hangul_TBase)
+ return V;
+ return T;
+}
+
+static int hangul_nextSyllableBoundary(const HB_UChar16 *s, int start, int end)
+{
+ const HB_UChar16 *uc = s + start;
+
+ HangulType state = hangul_type(*uc);
+ int pos = 1;
+
+ while (pos < end - start) {
+ HangulType newState = hangul_type(uc[pos]);
+ switch(newState) {
+ case X:
+ goto finish;
+ case L:
+ case V:
+ case T:
+ if (state > newState)
+ goto finish;
+ state = newState;
+ break;
+ case LV:
+ if (state > L)
+ goto finish;
+ state = V;
+ break;
+ case LVT:
+ if (state > L)
+ goto finish;
+ state = T;
+ }
+ ++pos;
+ }
+
+ finish:
+ return start+pos;
+}
+
+#ifndef NO_OPENTYPE
+static const HB_OpenTypeFeature hangul_features [] = {
+ { HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty },
+ { HB_MAKE_TAG('l', 'j', 'm', 'o'), CcmpProperty },
+ { HB_MAKE_TAG('v', 'j', 'm', 'o'), CcmpProperty },
+ { HB_MAKE_TAG('t', 'j', 'm', 'o'), CcmpProperty },
+ { 0, 0 }
+};
+#endif
+
+static HB_Bool hangul_shape_syllable(HB_ShaperItem *item, HB_Bool openType)
+{
+ const HB_UChar16 *ch = item->string + item->item.pos;
+ int len = item->item.length;
+#ifndef NO_OPENTYPE
+ const int availableGlyphs = item->num_glyphs;
+#endif
+
+ int i;
+ HB_UChar16 composed = 0;
+ /* see if we can compose the syllable into a modern hangul */
+ if (item->item.length == 2) {
+ int LIndex = ch[0] - Hangul_LBase;
+ int VIndex = ch[1] - Hangul_VBase;
+ if (LIndex >= 0 && LIndex < Hangul_LCount &&
+ VIndex >= 0 && VIndex < Hangul_VCount)
+ composed = (LIndex * Hangul_VCount + VIndex) * Hangul_TCount + Hangul_SBase;
+ } else if (item->item.length == 3) {
+ int LIndex = ch[0] - Hangul_LBase;
+ int VIndex = ch[1] - Hangul_VBase;
+ int TIndex = ch[2] - Hangul_TBase;
+ if (LIndex >= 0 && LIndex < Hangul_LCount &&
+ VIndex >= 0 && VIndex < Hangul_VCount &&
+ TIndex >= 0 && TIndex < Hangul_TCount)
+ composed = (LIndex * Hangul_VCount + VIndex) * Hangul_TCount + TIndex + Hangul_SBase;
+ }
+
+
+
+ /* if we have a modern hangul use the composed form */
+ if (composed) {
+ ch = &composed;
+ len = 1;
+ }
+
+ if (!item->font->klass->convertStringToGlyphIndices(item->font,
+ ch, len,
+ item->glyphs, &item->num_glyphs,
+ item->item.bidiLevel % 2))
+ return FALSE;
+ for (i = 0; i < len; i++) {
+ item->attributes[i].mark = FALSE;
+ item->attributes[i].clusterStart = FALSE;
+ item->attributes[i].justification = 0;
+ item->attributes[i].zeroWidth = FALSE;
+ /*IDEBUG(" %d: %4x", i, ch[i].unicode()); */
+ }
+
+#ifndef NO_OPENTYPE
+ if (!composed && openType) {
+ HB_Bool positioned;
+
+ HB_STACKARRAY(unsigned short, logClusters, len);
+ for (i = 0; i < len; ++i)
+ logClusters[i] = i;
+ item->log_clusters = logClusters;
+
+ HB_OpenTypeShape(item, /*properties*/0);
+
+ positioned = HB_OpenTypePosition(item, availableGlyphs, /*doLogClusters*/FALSE);
+
+ HB_FREE_STACKARRAY(logClusters);
+
+ if (!positioned)
+ return FALSE;
+ } else {
+ HB_HeuristicPosition(item);
+ }
+#endif
+
+ item->attributes[0].clusterStart = TRUE;
+ return TRUE;
+}
+
+HB_Bool HB_HangulShape(HB_ShaperItem *item)
+{
+ const HB_UChar16 *uc = item->string + item->item.pos;
+ HB_Bool allPrecomposed = TRUE;
+ int i;
+
+ assert(item->item.script == HB_Script_Hangul);
+
+ for (i = 0; i < (int)item->item.length; ++i) {
+ if (!hangul_isPrecomposed(uc[i])) {
+ allPrecomposed = FALSE;
+ break;
+ }
+ }
+
+ if (!allPrecomposed) {
+ HB_Bool openType = FALSE;
+ unsigned short *logClusters = item->log_clusters;
+ HB_ShaperItem syllable;
+ int first_glyph = 0;
+ int sstart = item->item.pos;
+ int end = sstart + item->item.length;
+
+#ifndef NO_OPENTYPE
+ openType = HB_SelectScript(item, hangul_features);
+#endif
+ syllable = *item;
+
+ while (sstart < end) {
+ int send = hangul_nextSyllableBoundary(item->string, sstart, end);
+
+ syllable.item.pos = sstart;
+ syllable.item.length = send-sstart;
+ syllable.glyphs = item->glyphs + first_glyph;
+ syllable.attributes = item->attributes + first_glyph;
+ syllable.offsets = item->offsets + first_glyph;
+ syllable.advances = item->advances + first_glyph;
+ syllable.num_glyphs = item->num_glyphs - first_glyph;
+ if (!hangul_shape_syllable(&syllable, openType)) {
+ item->num_glyphs += syllable.num_glyphs;
+ return FALSE;
+ }
+ /* fix logcluster array */
+ for (i = sstart; i < send; ++i)
+ logClusters[i-item->item.pos] = first_glyph;
+ sstart = send;
+ first_glyph += syllable.num_glyphs;
+ }
+ item->num_glyphs = first_glyph;
+ return TRUE;
+ }
+
+ return HB_BasicShape(item);
+}
+
+
diff --git a/src/hb-old/harfbuzz-hebrew.c b/src/hb-old/harfbuzz-hebrew.c
new file mode 100644
index 0000000..b5431a5
--- /dev/null
+++ b/src/hb-old/harfbuzz-hebrew.c
@@ -0,0 +1,187 @@
+/*
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#include "harfbuzz-shaper.h"
+#include "harfbuzz-shaper-private.h"
+#include <assert.h>
+
+/*
+// Uniscribe also defines dlig for Hebrew, but we leave this out for now, as it's mostly
+// ligatures one does not want in modern Hebrew (as lam-alef ligatures).
+*/
+#ifndef NO_OPENTYPE
+static const HB_OpenTypeFeature hebrew_features[] = {
+ { HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty },
+ {0, 0}
+};
+#endif
+
+/* Hebrew shaping. In the non opentype case we try to use the
+ presentation forms specified for Hebrew. Especially for the
+ ligatures with Dagesh this gives much better results than we could
+ achieve manually.
+*/
+HB_Bool HB_HebrewShape(HB_ShaperItem *shaper_item)
+{
+ enum {
+ Dagesh = 0x5bc,
+ ShinDot = 0x5c1,
+ SinDot = 0x5c2,
+ Patah = 0x5b7,
+ Qamats = 0x5b8,
+ Holam = 0x5b9,
+ Rafe = 0x5bf
+ };
+
+ assert(shaper_item->item.script == HB_Script_Hebrew);
+
+#ifndef NO_OPENTYPE
+ if (HB_SelectScript(shaper_item, hebrew_features)) {
+
+ const int availableGlyphs = shaper_item->num_glyphs;
+ if (!HB_ConvertStringToGlyphIndices(shaper_item))
+ return FALSE;
+
+ HB_HeuristicSetGlyphAttributes(shaper_item);
+ HB_OpenTypeShape(shaper_item, /*properties*/0);
+ return HB_OpenTypePosition(shaper_item, availableGlyphs, /*doLogClusters*/TRUE);
+ }
+#endif
+
+ {
+ const HB_UChar16 *uc = shaper_item->string + shaper_item->item.pos;
+ unsigned short *logClusters = shaper_item->log_clusters;
+ HB_GlyphAttributes *attributes = shaper_item->attributes;
+
+ HB_Bool haveGlyphs;
+ int slen = 1;
+ int cluster_start = 0;
+ hb_uint32 i;
+
+ HB_STACKARRAY(HB_UChar16, shapedChars, 2 * shaper_item->item.length);
+ *shapedChars = *uc;
+ logClusters[0] = 0;
+
+ for (i = 1; i < shaper_item->item.length; ++i) {
+ hb_uint16 base = shapedChars[cluster_start];
+ hb_uint16 shaped = 0;
+ HB_Bool invalid = FALSE;
+ if (uc[i] == Dagesh) {
+ if (base >= 0x5d0
+ && base <= 0x5ea
+ && base != 0x5d7
+ && base != 0x5dd
+ && base != 0x5df
+ && base != 0x5e2
+ && base != 0x5e5) {
+ shaped = base - 0x5d0 + 0xfb30;
+ } else if (base == 0xfb2a || base == 0xfb2b /* Shin with Shin or Sin dot */) {
+ shaped = base + 2;
+ } else {
+ invalid = TRUE;
+ }
+ } else if (uc[i] == ShinDot) {
+ if (base == 0x05e9)
+ shaped = 0xfb2a;
+ else if (base == 0xfb49)
+ shaped = 0xfb2c;
+ else
+ invalid = TRUE;
+ } else if (uc[i] == SinDot) {
+ if (base == 0x05e9)
+ shaped = 0xfb2b;
+ else if (base == 0xfb49)
+ shaped = 0xfb2d;
+ else
+ invalid = TRUE;
+ } else if (uc[i] == Patah) {
+ if (base == 0x5d0)
+ shaped = 0xfb2e;
+ } else if (uc[i] == Qamats) {
+ if (base == 0x5d0)
+ shaped = 0xfb2f;
+ } else if (uc[i] == Holam) {
+ if (base == 0x5d5)
+ shaped = 0xfb4b;
+ } else if (uc[i] == Rafe) {
+ if (base == 0x5d1)
+ shaped = 0xfb4c;
+ else if (base == 0x5db)
+ shaped = 0xfb4d;
+ else if (base == 0x5e4)
+ shaped = 0xfb4e;
+ }
+
+ if (invalid) {
+ shapedChars[slen] = 0x25cc;
+ attributes[slen].clusterStart = TRUE;
+ attributes[slen].mark = FALSE;
+ attributes[slen].combiningClass = 0;
+ cluster_start = slen;
+ ++slen;
+ }
+ if (shaped) {
+ if (shaper_item->font->klass->canRender(shaper_item->font, (HB_UChar16 *)&shaped, 1)) {
+ shapedChars[cluster_start] = shaped;
+ } else
+ shaped = 0;
+ }
+ if (!shaped) {
+ HB_CharCategory category;
+ int cmb;
+ shapedChars[slen] = uc[i];
+ HB_GetUnicodeCharProperties(uc[i], &category, &cmb);
+ if (category != HB_Mark_NonSpacing) {
+ attributes[slen].clusterStart = TRUE;
+ attributes[slen].mark = FALSE;
+ attributes[slen].combiningClass = 0;
+ attributes[slen].dontPrint = HB_IsControlChar(uc[i]);
+ cluster_start = slen;
+ } else {
+ attributes[slen].clusterStart = FALSE;
+ attributes[slen].mark = TRUE;
+ attributes[slen].combiningClass = cmb;
+ }
+ ++slen;
+ }
+ logClusters[i] = cluster_start;
+ }
+
+ haveGlyphs = shaper_item->font->klass
+ ->convertStringToGlyphIndices(shaper_item->font,
+ shapedChars, slen,
+ shaper_item->glyphs, &shaper_item->num_glyphs,
+ shaper_item->item.bidiLevel % 2);
+
+ HB_FREE_STACKARRAY(shapedChars);
+
+ if (!haveGlyphs)
+ return FALSE;
+
+ HB_HeuristicPosition(shaper_item);
+ }
+
+ return TRUE;
+}
+
diff --git a/src/hb-old/harfbuzz-impl.c b/src/hb-old/harfbuzz-impl.c
new file mode 100644
index 0000000..ddbf36b
--- /dev/null
+++ b/src/hb-old/harfbuzz-impl.c
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 1998-2004 David Turner and Werner Lemberg
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2007 Red Hat, Inc.
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#include "harfbuzz-impl.h"
+
+
+HB_INTERNAL HB_Pointer
+_hb_alloc(size_t size,
+ HB_Error *perror )
+{
+ HB_Error error = (HB_Error)0;
+ HB_Pointer block = NULL;
+
+ if ( size > 0 )
+ {
+ block = calloc( 1, size );
+ if ( !block )
+ error = ERR(HB_Err_Out_Of_Memory);
+ }
+
+ *perror = error;
+ return block;
+}
+
+
+HB_INTERNAL HB_Pointer
+_hb_realloc(HB_Pointer block,
+ size_t new_size,
+ HB_Error *perror )
+{
+ HB_Pointer block2 = NULL;
+ HB_Error error = (HB_Error)0;
+
+ block2 = realloc( block, new_size );
+ if ( block2 == NULL && new_size != 0 )
+ error = ERR(HB_Err_Out_Of_Memory);
+
+ if ( !error )
+ block = block2;
+
+ *perror = error;
+ return block;
+}
+
+
+HB_INTERNAL void
+_hb_free( HB_Pointer block )
+{
+ if ( block )
+ free( block );
+}
+
+
+/* helper func to set a breakpoint on */
+HB_INTERNAL HB_Error
+_hb_err (HB_Error code)
+{
+ return code;
+}
diff --git a/src/hb-old/harfbuzz-impl.h b/src/hb-old/harfbuzz-impl.h
new file mode 100644
index 0000000..3f370b6
--- /dev/null
+++ b/src/hb-old/harfbuzz-impl.h
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 1998-2004 David Turner and Werner Lemberg
+ * Copyright (C) 2006 Behdad Esfahbod
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#ifndef HARFBUZZ_IMPL_H
+#define HARFBUZZ_IMPL_H
+
+#include "harfbuzz-global.h"
+
+#include <stdlib.h>
+
+HB_BEGIN_HEADER
+
+#ifndef HB_INTERNAL
+# ifndef __MINGW32__
+# define HB_INTERNAL __attribute__((__visibility__("hidden")))
+# else
+# define HB_INTERNAL
+# endif
+#endif
+
+#ifndef NULL
+# define NULL ((void *)0)
+#endif
+
+#ifndef FALSE
+# define FALSE 0
+#endif
+
+#ifndef TRUE
+# define TRUE 1
+#endif
+
+#ifndef TTAG_GDEF
+# define TTAG_GDEF HB_MAKE_TAG( 'G', 'D', 'E', 'F' )
+#endif
+#ifndef TTAG_GPOS
+# define TTAG_GPOS HB_MAKE_TAG( 'G', 'P', 'O', 'S' )
+#endif
+#ifndef TTAG_GSUB
+# define TTAG_GSUB HB_MAKE_TAG( 'G', 'S', 'U', 'B' )
+#endif
+
+#ifndef HB_UNUSED
+# define HB_UNUSED(arg) ((arg) = (arg))
+#endif
+
+#define HB_LIKELY(cond) (cond)
+#define HB_UNLIKELY(cond) (cond)
+
+#define ARRAY_LEN(Array) ((int)(sizeof (Array) / sizeof (Array)[0]))
+
+
+
+#define HB_IsHighSurrogate(ucs) \
+ (((ucs) & 0xfc00) == 0xd800)
+
+#define HB_IsLowSurrogate(ucs) \
+ (((ucs) & 0xfc00) == 0xdc00)
+
+#define HB_SurrogateToUcs4(high, low) \
+ (((HB_UChar32)(high))<<10) + (low) - 0x35fdc00;
+
+
+
+
+
+#define ALLOC(_ptr,_size) \
+ ( (_ptr) = _hb_alloc( _size, &error ), error != 0 )
+
+#define REALLOC(_ptr,_newsz) \
+ ( (_ptr) = _hb_realloc( (_ptr), (_newsz), &error ), error != 0 )
+
+#define FREE(_ptr) \
+ do { \
+ if ( (_ptr) ) \
+ { \
+ _hb_free( _ptr ); \
+ _ptr = NULL; \
+ } \
+ } while (0)
+
+#define ALLOC_ARRAY(_ptr,_count,_type) \
+ ALLOC(_ptr,(_count)*sizeof(_type))
+
+#define REALLOC_ARRAY(_ptr,_newcnt,_type) \
+ REALLOC(_ptr,(_newcnt)*sizeof(_type))
+
+#define MEM_Copy(dest,source,count) memcpy( (char*)(dest), (const char*)(source), (size_t)(count) )
+
+#define ERR(err) _hb_err (err)
+
+
+HB_INTERNAL HB_Pointer
+_hb_alloc( size_t size,
+ HB_Error *perror_ );
+
+HB_INTERNAL HB_Pointer
+_hb_realloc( HB_Pointer block,
+ size_t new_size,
+ HB_Error *perror_ );
+
+HB_INTERNAL void
+_hb_free( HB_Pointer block );
+
+
+/* helper func to set a breakpoint on */
+HB_INTERNAL HB_Error
+_hb_err (HB_Error code);
+
+
+HB_END_HEADER
+
+#endif /* HARFBUZZ_IMPL_H */
diff --git a/src/hb-old/harfbuzz-indic.cpp b/src/hb-old/harfbuzz-indic.cpp
new file mode 100644
index 0000000..17e97e0
--- /dev/null
+++ b/src/hb-old/harfbuzz-indic.cpp
@@ -0,0 +1,1868 @@
+/*
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#include "harfbuzz-shaper.h"
+#include "harfbuzz-shaper-private.h"
+
+#include <assert.h>
+#include <stdio.h>
+
+#define FLAG(x) (1 << (x))
+
+static HB_Bool isLetter(HB_UChar16 ucs)
+{
+ const int test = FLAG(HB_Letter_Uppercase) |
+ FLAG(HB_Letter_Lowercase) |
+ FLAG(HB_Letter_Titlecase) |
+ FLAG(HB_Letter_Modifier) |
+ FLAG(HB_Letter_Other);
+ return !!(FLAG(HB_GetUnicodeCharCategory(ucs)) & test);
+}
+
+static HB_Bool isMark(HB_UChar16 ucs)
+{
+ const int test = FLAG(HB_Mark_NonSpacing) |
+ FLAG(HB_Mark_SpacingCombining) |
+ FLAG(HB_Mark_Enclosing);
+ return !!(FLAG(HB_GetUnicodeCharCategory(ucs)) & test);
+}
+
+enum Form {
+ Invalid = 0x0,
+ UnknownForm = Invalid,
+ Consonant,
+ Nukta,
+ Halant,
+ Matra,
+ VowelMark,
+ StressMark,
+ IndependentVowel,
+ LengthMark,
+ Control,
+ Other
+};
+
+static const unsigned char indicForms[0xe00-0x900] = {
+ // Devangari
+ Invalid, VowelMark, VowelMark, VowelMark,
+ IndependentVowel, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, IndependentVowel, IndependentVowel, IndependentVowel,
+
+ IndependentVowel, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, UnknownForm, UnknownForm,
+ Nukta, Other, Matra, Matra,
+
+ Matra, Matra, Matra, Matra,
+ Matra, Matra, Matra, Matra,
+ Matra, Matra, Matra, Matra,
+ Matra, Halant, UnknownForm, UnknownForm,
+
+ Other, StressMark, StressMark, StressMark,
+ StressMark, UnknownForm, UnknownForm, UnknownForm,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+
+ IndependentVowel, IndependentVowel, VowelMark, VowelMark,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Consonant,
+ Consonant, Consonant /* ??? */, Consonant, Consonant,
+
+ // Bengali
+ Invalid, VowelMark, VowelMark, VowelMark,
+ Invalid, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, Invalid, Invalid, IndependentVowel,
+
+ IndependentVowel, Invalid, Invalid, IndependentVowel,
+ IndependentVowel, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Invalid, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+
+ Consonant, Invalid, Consonant, Invalid,
+ Invalid, Invalid, Consonant, Consonant,
+ Consonant, Consonant, UnknownForm, UnknownForm,
+ Nukta, Other, Matra, Matra,
+
+ Matra, Matra, Matra, Matra,
+ Matra, Invalid, Invalid, Matra,
+ Matra, Invalid, Invalid, Matra,
+ Matra, Halant, Consonant, UnknownForm,
+
+ Invalid, Invalid, Invalid, Invalid,
+ Invalid, Invalid, Invalid, VowelMark,
+ Invalid, Invalid, Invalid, Invalid,
+ Consonant, Consonant, Invalid, Consonant,
+
+ IndependentVowel, IndependentVowel, VowelMark, VowelMark,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+
+ Consonant, Consonant, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+
+ // Gurmukhi
+ Invalid, VowelMark, VowelMark, VowelMark,
+ Invalid, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, IndependentVowel, IndependentVowel, Invalid,
+ Invalid, Invalid, Invalid, IndependentVowel,
+
+ IndependentVowel, Invalid, Invalid, IndependentVowel,
+ IndependentVowel, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Invalid, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+
+ Consonant, Invalid, Consonant, Consonant,
+ Invalid, Consonant, Consonant, Invalid,
+ Consonant, Consonant, UnknownForm, UnknownForm,
+ Nukta, Other, Matra, Matra,
+
+ Matra, Matra, Matra, Invalid,
+ Invalid, Invalid, Invalid, Matra,
+ Matra, Invalid, Invalid, Matra,
+ Matra, Halant, UnknownForm, UnknownForm,
+
+ Invalid, Invalid, Invalid, Invalid,
+ Invalid, UnknownForm, UnknownForm, UnknownForm,
+ Invalid, Consonant, Consonant, Consonant,
+ Consonant, Invalid, Consonant, Invalid,
+
+ Other, Other, Invalid, Invalid,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+
+ StressMark, StressMark, Consonant, Consonant,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+
+ // Gujarati
+ Invalid, VowelMark, VowelMark, VowelMark,
+ Invalid, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, IndependentVowel, Invalid, IndependentVowel,
+
+ IndependentVowel, IndependentVowel, Invalid, IndependentVowel,
+ IndependentVowel, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Invalid, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+
+ Consonant, Invalid, Consonant, Consonant,
+ Invalid, Consonant, Consonant, Consonant,
+ Consonant, Consonant, UnknownForm, UnknownForm,
+ Nukta, Other, Matra, Matra,
+
+ Matra, Matra, Matra, Matra,
+ Matra, Matra, Invalid, Matra,
+ Matra, Matra, Invalid, Matra,
+ Matra, Halant, UnknownForm, UnknownForm,
+
+ Other, UnknownForm, UnknownForm, UnknownForm,
+ UnknownForm, UnknownForm, UnknownForm, UnknownForm,
+ UnknownForm, UnknownForm, UnknownForm, UnknownForm,
+ UnknownForm, UnknownForm, UnknownForm, UnknownForm,
+
+ IndependentVowel, IndependentVowel, VowelMark, VowelMark,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+
+ // Oriya
+ Invalid, VowelMark, VowelMark, VowelMark,
+ Invalid, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, Invalid, Invalid, IndependentVowel,
+
+ IndependentVowel, Invalid, Invalid, IndependentVowel,
+ IndependentVowel, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Invalid, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+
+ Consonant, Invalid, Consonant, Consonant,
+ Invalid, Consonant, Consonant, Consonant,
+ Consonant, Consonant, UnknownForm, UnknownForm,
+ Nukta, Other, Matra, Matra,
+
+ Matra, Matra, Matra, Matra,
+ Invalid, Invalid, Invalid, Matra,
+ Matra, Invalid, Invalid, Matra,
+ Matra, Halant, UnknownForm, UnknownForm,
+
+ Other, Invalid, Invalid, Invalid,
+ Invalid, UnknownForm, LengthMark, LengthMark,
+ Invalid, Invalid, Invalid, Invalid,
+ Consonant, Consonant, Invalid, Consonant,
+
+ IndependentVowel, IndependentVowel, Invalid, Invalid,
+ Invalid, Invalid, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+
+ Other, Consonant, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+
+ //Tamil
+ Invalid, Invalid, VowelMark, Other,
+ Invalid, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, IndependentVowel, IndependentVowel, Invalid,
+ Invalid, Invalid, IndependentVowel, IndependentVowel,
+
+ IndependentVowel, Invalid, IndependentVowel, IndependentVowel,
+ IndependentVowel, Consonant, Invalid, Invalid,
+ Invalid, Consonant, Consonant, Invalid,
+ Consonant, Invalid, Consonant, Consonant,
+
+ Invalid, Invalid, Invalid, Consonant,
+ Consonant, Invalid, Invalid, Invalid,
+ Consonant, Consonant, Consonant, Invalid,
+ Invalid, Invalid, Consonant, Consonant,
+
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, UnknownForm, UnknownForm,
+ Invalid, Invalid, Matra, Matra,
+
+ Matra, Matra, Matra, Invalid,
+ Invalid, Invalid, Matra, Matra,
+ Matra, Invalid, Matra, Matra,
+ Matra, Halant, Invalid, Invalid,
+
+ Invalid, Invalid, Invalid, Invalid,
+ Invalid, Invalid, Invalid, LengthMark,
+ Invalid, Invalid, Invalid, Invalid,
+ Invalid, Invalid, Invalid, Invalid,
+
+ Invalid, Invalid, Invalid, Invalid,
+ Invalid, Invalid, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+
+ // Telugu
+ Invalid, VowelMark, VowelMark, VowelMark,
+ Invalid, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, Invalid, IndependentVowel, IndependentVowel,
+
+ IndependentVowel, Invalid, IndependentVowel, IndependentVowel,
+ IndependentVowel, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Invalid, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+
+ Consonant, Consonant, Consonant, Consonant,
+ Invalid, Consonant, Consonant, Consonant,
+ Consonant, Consonant, UnknownForm, UnknownForm,
+ Invalid, Invalid, Matra, Matra,
+
+ Matra, Matra, Matra, Matra,
+ Matra, Invalid, Matra, Matra,
+ Matra, Invalid, Matra, Matra,
+ Matra, Halant, Invalid, Invalid,
+
+ Invalid, Invalid, Invalid, Invalid,
+ Invalid, LengthMark, Matra, Invalid,
+ Invalid, Invalid, Invalid, Invalid,
+ Invalid, Invalid, Invalid, Invalid,
+
+ IndependentVowel, IndependentVowel, Invalid, Invalid,
+ Invalid, Invalid, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+
+ // Kannada
+ Invalid, Invalid, VowelMark, VowelMark,
+ Invalid, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, Invalid, IndependentVowel, IndependentVowel,
+
+ IndependentVowel, Invalid, IndependentVowel, IndependentVowel,
+ IndependentVowel, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Invalid, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+
+ Consonant, Consonant, Consonant, Consonant,
+ Invalid, Consonant, Consonant, Consonant,
+ Consonant, Consonant, UnknownForm, UnknownForm,
+ Nukta, Other, Matra, Matra,
+
+ Matra, Matra, Matra, Matra,
+ Matra, Invalid, Matra, Matra,
+ Matra, Invalid, Matra, Matra,
+ Matra, Halant, Invalid, Invalid,
+
+ Invalid, Invalid, Invalid, Invalid,
+ Invalid, LengthMark, LengthMark, Invalid,
+ Invalid, Invalid, Invalid, Invalid,
+ Invalid, Invalid, Consonant, Invalid,
+
+ IndependentVowel, IndependentVowel, VowelMark, VowelMark,
+ Invalid, Invalid, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+
+ // Malayalam
+ Invalid, Invalid, VowelMark, VowelMark,
+ Invalid, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, Invalid, IndependentVowel, IndependentVowel,
+
+ IndependentVowel, Invalid, IndependentVowel, IndependentVowel,
+ IndependentVowel, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Invalid, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, UnknownForm, UnknownForm,
+ Invalid, Invalid, Matra, Matra,
+
+ Matra, Matra, Matra, Matra,
+ Invalid, Invalid, Matra, Matra,
+ Matra, Invalid, Matra, Matra,
+ Matra, Halant, Invalid, Invalid,
+
+ Invalid, Invalid, Invalid, Invalid,
+ Invalid, Invalid, Invalid, Matra,
+ Invalid, Invalid, Invalid, Invalid,
+ Invalid, Invalid, Invalid, Invalid,
+
+ IndependentVowel, IndependentVowel, Invalid, Invalid,
+ Invalid, Invalid, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+
+ // Sinhala
+ Invalid, Invalid, VowelMark, VowelMark,
+ Invalid, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, IndependentVowel, IndependentVowel, IndependentVowel,
+
+ IndependentVowel, IndependentVowel, IndependentVowel, IndependentVowel,
+ IndependentVowel, IndependentVowel, IndependentVowel, Invalid,
+ Invalid, Invalid, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+
+ Consonant, Consonant, Invalid, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Consonant,
+ Invalid, Consonant, Invalid, Invalid,
+
+ Consonant, Consonant, Consonant, Consonant,
+ Consonant, Consonant, Consonant, Invalid,
+ Invalid, Invalid, Halant, Invalid,
+ Invalid, Invalid, Invalid, Matra,
+
+ Matra, Matra, Matra, Matra,
+ Matra, Invalid, Matra, Invalid,
+ Matra, Matra, Matra, Matra,
+ Matra, Matra, Matra, Matra,
+
+ Invalid, Invalid, Invalid, Invalid,
+ Invalid, Invalid, Invalid, Invalid,
+ Invalid, Invalid, Invalid, Invalid,
+ Invalid, Invalid, Invalid, Invalid,
+
+ Invalid, Invalid, Matra, Matra,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+ Other, Other, Other, Other,
+};
+
+enum Position {
+ None,
+ Pre,
+ Above,
+ Below,
+ Post,
+ Split,
+ Base,
+ Reph,
+ Vattu,
+ Inherit
+};
+
+static const unsigned char indicPosition[0xe00-0x900] = {
+ // Devanagari
+ None, Above, Above, Post,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ Below, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, Post, Pre,
+
+ Post, Below, Below, Below,
+ Below, Above, Above, Above,
+ Above, Post, Post, Post,
+ Post, None, None, None,
+
+ None, Above, Below, Above,
+ Above, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, Below, Below,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ // Bengali
+ None, Above, Post, Post,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ Below, None, None, Post,
+
+ Below, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ Below, None, Post, Pre,
+
+ Post, Below, Below, Below,
+ Below, None, None, Pre,
+ Pre, None, None, Split,
+ Split, Below, None, None,
+
+ None, None, None, None,
+ None, None, None, Post,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, Below, Below,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ Below, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ // Gurmukhi
+ None, Above, Above, Post,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, Post,
+
+ Below, None, None, None,
+ None, Below, None, None,
+ None, Below, None, None,
+ Below, None, Post, Pre,
+
+ Post, Below, Below, None,
+ None, None, None, Above,
+ Above, None, None, Above,
+ Above, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ Above, Above, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ // Gujarati
+ None, Above, Above, Post,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ Below, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, Post, Pre,
+
+ Post, Below, Below, Below,
+ Below, Above, None, Above,
+ Above, Post, None, Post,
+ Post, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, Below, Below,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ // Oriya
+ None, Above, Post, Post,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ Below, None, None, None,
+ Below, None, None, None,
+ Below, Below, Below, Post,
+
+ Below, None, Below, Below,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, Post, Above,
+
+ Post, Below, Below, Below,
+ None, None, None, Pre,
+ Split, None, None, Split,
+ Split, None, None, None,
+
+ None, None, None, None,
+ None, None, Above, Post,
+ None, None, None, None,
+ None, None, None, Post,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, Below, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ // Tamil
+ None, None, Above, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, Post, Post,
+
+ Above, Below, Below, None,
+ None, None, Pre, Pre,
+ Pre, None, Split, Split,
+ Split, Halant, None, None,
+
+ None, None, None, None,
+ None, None, None, Post,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ // Telugu
+ None, Post, Post, Post,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, Below, Below, Below,
+ Below, Below, Below, Below,
+ Below, Below, Below, Below,
+
+ Below, Below, Below, Below,
+ Below, Below, Below, Below,
+ Below, None, Below, Below,
+ Below, Below, Below, Below,
+
+ Below, None, Below, Below,
+ None, Below, Below, Below,
+ Below, Below, None, None,
+ None, None, Post, Above,
+
+ Above, Post, Post, Post,
+ Post, None, Above, Above,
+ Split, None, Post, Above,
+ Above, Halant, None, None,
+
+ None, None, None, None,
+ None, Above, Below, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ // Kannada
+ None, None, Post, Post,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, Below, Below, Below,
+ Below, Below, Below, Below,
+ Below, Below, Below, Below,
+
+ Below, Below, Below, Below,
+ Below, Below, Below, Below,
+ Below, Below, Below, Below,
+ Below, Below, Below, Below,
+
+ Below, None, Below, Below,
+ None, Below, Below, Below,
+ Below, Below, None, None,
+ None, None, Post, Above,
+
+ Split, Post, Post, Post,
+ Post, None, Above, Split,
+ Split, None, Split, Split,
+ Above, Halant, None, None,
+
+ None, None, None, None,
+ None, Post, Post, None,
+ None, None, None, None,
+ None, None, Below, None,
+
+ None, None, Below, Below,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ // Malayalam
+ None, None, Post, Post,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, Post,
+
+ Post, None, Below, None,
+ None, Post, None, None,
+ None, None, None, None,
+ None, None, Post, Post,
+
+ Post, Post, Post, Post,
+ None, None, Pre, Pre,
+ Pre, None, Split, Split,
+ Split, Halant, None, None,
+
+ None, None, None, None,
+ None, None, None, Post,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ // Sinhala
+ None, None, Post, Post,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, Post,
+
+ Post, Post, Above, Above,
+ Below, None, Below, None,
+ Post, Pre, Split, Pre,
+ Split, Split, Split, Post,
+
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None,
+
+ None, None, Post, Post,
+ None, None, None, None,
+ None, None, None, None,
+ None, None, None, None
+};
+
+static inline Form form(unsigned short uc) {
+ if (uc < 0x900 || uc > 0xdff) {
+ if (uc == 0x25cc)
+ return Consonant;
+ if (uc == 0x200c || uc == 0x200d)
+ return Control;
+ return Other;
+ }
+ return (Form)indicForms[uc-0x900];
+}
+
+static inline Position indic_position(unsigned short uc) {
+ if (uc < 0x900 || uc > 0xdff)
+ return None;
+ return (Position) indicPosition[uc-0x900];
+}
+
+
+enum IndicScriptProperties {
+ HasReph = 0x01,
+ HasSplit = 0x02
+};
+
+const hb_uint8 scriptProperties[10] = {
+ // Devanagari,
+ HasReph,
+ // Bengali,
+ HasReph|HasSplit,
+ // Gurmukhi,
+ 0,
+ // Gujarati,
+ HasReph,
+ // Oriya,
+ HasReph|HasSplit,
+ // Tamil,
+ HasSplit,
+ // Telugu,
+ HasSplit,
+ // Kannada,
+ HasSplit|HasReph,
+ // Malayalam,
+ HasSplit,
+ // Sinhala,
+ HasSplit
+};
+
+struct IndicOrdering {
+ Form form;
+ Position position;
+};
+
+static const IndicOrdering devanagari_order [] = {
+ { Consonant, Below },
+ { Matra, Below },
+ { VowelMark, Below },
+ { StressMark, Below },
+ { Matra, Above },
+ { Matra, Post },
+ { Consonant, Reph },
+ { VowelMark, Above },
+ { StressMark, Above },
+ { VowelMark, Post },
+ { (Form)0, None }
+};
+
+static const IndicOrdering bengali_order [] = {
+ { Consonant, Below },
+ { Matra, Below },
+ { Matra, Above },
+ { Consonant, Reph },
+ { VowelMark, Above },
+ { Consonant, Post },
+ { Matra, Post },
+ { VowelMark, Post },
+ { (Form)0, None }
+};
+
+static const IndicOrdering gurmukhi_order [] = {
+ { Consonant, Below },
+ { Matra, Below },
+ { Matra, Above },
+ { Consonant, Post },
+ { Matra, Post },
+ { VowelMark, Above },
+ { (Form)0, None }
+};
+
+static const IndicOrdering tamil_order [] = {
+ { Matra, Above },
+ { Matra, Post },
+ { VowelMark, Post },
+ { (Form)0, None }
+};
+
+static const IndicOrdering telugu_order [] = {
+ { Matra, Above },
+ { Matra, Below },
+ { Matra, Post },
+ { Consonant, Below },
+ { Consonant, Post },
+ { VowelMark, Post },
+ { (Form)0, None }
+};
+
+static const IndicOrdering kannada_order [] = {
+ { Matra, Above },
+ { Matra, Post },
+ { Consonant, Below },
+ { Consonant, Post },
+ { LengthMark, Post },
+ { Consonant, Reph },
+ { VowelMark, Post },
+ { (Form)0, None }
+};
+
+static const IndicOrdering malayalam_order [] = {
+ { Consonant, Below },
+ { Matra, Below },
+ { Consonant, Reph },
+ { Consonant, Post },
+ { Matra, Post },
+ { VowelMark, Post },
+ { (Form)0, None }
+};
+
+static const IndicOrdering sinhala_order [] = {
+ { Matra, Below },
+ { Matra, Above },
+ { Matra, Post },
+ { VowelMark, Post },
+ { (Form)0, None }
+};
+
+static const IndicOrdering * const indic_order[] = {
+ devanagari_order, // Devanagari
+ bengali_order, // Bengali
+ gurmukhi_order, // Gurmukhi
+ devanagari_order, // Gujarati
+ bengali_order, // Oriya
+ tamil_order, // Tamil
+ telugu_order, // Telugu
+ kannada_order, // Kannada
+ malayalam_order, // Malayalam
+ sinhala_order // Sinhala
+};
+
+
+
+// vowel matras that have to be split into two parts.
+static const unsigned short split_matras[] = {
+ // matra, split1, split2, split3
+
+ // bengalis
+ 0x9cb, 0x9c7, 0x9be, 0x0,
+ 0x9cc, 0x9c7, 0x9d7, 0x0,
+ // oriya
+ 0xb48, 0xb47, 0xb56, 0x0,
+ 0xb4b, 0xb47, 0xb3e, 0x0,
+ 0xb4c, 0xb47, 0xb57, 0x0,
+ // tamil
+ 0xbca, 0xbc6, 0xbbe, 0x0,
+ 0xbcb, 0xbc7, 0xbbe, 0x0,
+ 0xbcc, 0xbc6, 0xbd7, 0x0,
+ // telugu
+ 0xc48, 0xc46, 0xc56, 0x0,
+ // kannada
+ 0xcc0, 0xcbf, 0xcd5, 0x0,
+ 0xcc7, 0xcc6, 0xcd5, 0x0,
+ 0xcc8, 0xcc6, 0xcd6, 0x0,
+ 0xcca, 0xcc6, 0xcc2, 0x0,
+ 0xccb, 0xcc6, 0xcc2, 0xcd5,
+ // malayalam
+ 0xd4a, 0xd46, 0xd3e, 0x0,
+ 0xd4b, 0xd47, 0xd3e, 0x0,
+ 0xd4c, 0xd46, 0xd57, 0x0,
+ // sinhala
+ 0xdda, 0xdd9, 0xdca, 0x0,
+ 0xddc, 0xdd9, 0xdcf, 0x0,
+ 0xddd, 0xdd9, 0xdcf, 0xdca,
+ 0xdde, 0xdd9, 0xddf, 0x0,
+ 0xffff
+};
+
+static inline void splitMatra(unsigned short *reordered, int matra, int &len)
+{
+ unsigned short matra_uc = reordered[matra];
+ //qDebug("matra=%d, reordered[matra]=%x", matra, reordered[matra]);
+
+ const unsigned short *split = split_matras;
+ while (split[0] < matra_uc)
+ split += 4;
+
+ assert(*split == matra_uc);
+ ++split;
+
+ int added_chars = split[2] == 0x0 ? 1 : 2;
+
+ memmove(reordered + matra + added_chars, reordered + matra, (len-matra)*sizeof(unsigned short));
+ reordered[matra] = split[0];
+ reordered[matra+1] = split[1];
+ if(added_chars == 2)
+ reordered[matra+2] = split[2];
+ len += added_chars;
+}
+
+#ifndef NO_OPENTYPE
+static const HB_OpenTypeFeature indic_features[] = {
+ { HB_MAKE_TAG('l', 'o', 'c', 'a'), LocaProperty },
+ { HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty },
+ { HB_MAKE_TAG('i', 'n', 'i', 't'), InitProperty },
+ { HB_MAKE_TAG('n', 'u', 'k', 't'), NuktaProperty },
+ { HB_MAKE_TAG('a', 'k', 'h', 'n'), AkhantProperty },
+ { HB_MAKE_TAG('r', 'p', 'h', 'f'), RephProperty },
+ { HB_MAKE_TAG('b', 'l', 'w', 'f'), BelowFormProperty },
+ { HB_MAKE_TAG('h', 'a', 'l', 'f'), HalfFormProperty },
+ { HB_MAKE_TAG('p', 's', 't', 'f'), PostFormProperty },
+ { HB_MAKE_TAG('c', 'j', 'c', 't'), ConjunctFormProperty },
+ { HB_MAKE_TAG('v', 'a', 't', 'u'), VattuProperty },
+ { HB_MAKE_TAG('p', 'r', 'e', 's'), PreSubstProperty },
+ { HB_MAKE_TAG('b', 'l', 'w', 's'), BelowSubstProperty },
+ { HB_MAKE_TAG('a', 'b', 'v', 's'), AboveSubstProperty },
+ { HB_MAKE_TAG('p', 's', 't', 's'), PostSubstProperty },
+ { HB_MAKE_TAG('h', 'a', 'l', 'n'), HalantProperty },
+ { HB_MAKE_TAG('c', 'a', 'l', 't'), IndicCaltProperty },
+ { 0, 0 }
+};
+#endif
+
+// #define INDIC_DEBUG
+#ifdef INDIC_DEBUG
+#define IDEBUG hb_debug
+#include <stdarg.h>
+
+static void hb_debug(const char *msg, ...)
+{
+ va_list ap;
+ va_start(ap, msg); // use variable arg list
+ vfprintf(stderr, msg, ap);
+ va_end(ap);
+ fprintf(stderr, "\n");
+}
+
+#else
+#define IDEBUG if(0) printf
+#endif
+
+#if 0 //def INDIC_DEBUG
+static QString propertiesToString(int properties)
+{
+ QString res;
+ properties = ~properties;
+ if (properties & LocaProperty)
+ res += "Loca ";
+ if (properties & CcmpProperty)
+ res += "Ccmp ";
+ if (properties & InitProperty)
+ res += "Init ";
+ if (properties & NuktaProperty)
+ res += "Nukta ";
+ if (properties & AkhantProperty)
+ res += "Akhant ";
+ if (properties & RephProperty)
+ res += "Reph ";
+ if (properties & PreFormProperty)
+ res += "PreForm ";
+ if (properties & BelowFormProperty)
+ res += "BelowForm ";
+ if (properties & AboveFormProperty)
+ res += "AboveForm ";
+ if (properties & HalfFormProperty)
+ res += "HalfForm ";
+ if (properties & PostFormProperty)
+ res += "PostForm ";
+ if (properties & ConjunctFormProperty)
+ res += "PostForm ";
+ if (properties & VattuProperty)
+ res += "Vattu ";
+ if (properties & PreSubstProperty)
+ res += "PreSubst ";
+ if (properties & BelowSubstProperty)
+ res += "BelowSubst ";
+ if (properties & AboveSubstProperty)
+ res += "AboveSubst ";
+ if (properties & PostSubstProperty)
+ res += "PostSubst ";
+ if (properties & HalantProperty)
+ res += "Halant ";
+ if (properties & CligProperty)
+ res += "Clig ";
+ if (properties & IndicCaltProperty)
+ res += "Calt ";
+ return res;
+}
+#endif
+
+static bool indic_shape_syllable(HB_Bool openType, HB_ShaperItem *item, bool invalid)
+{
+ HB_Script script = item->item.script;
+ assert(script >= HB_Script_Devanagari && script <= HB_Script_Sinhala);
+ const unsigned short script_base = 0x0900 + 0x80*(script-HB_Script_Devanagari);
+ const unsigned short ra = script_base + 0x30;
+ const unsigned short halant = script_base + 0x4d;
+ const unsigned short nukta = script_base + 0x3c;
+ bool control = false;
+
+ int len = (int)item->item.length;
+ IDEBUG(">>>>> indic shape: from=%d, len=%d invalid=%d", item->item.pos, item->item.length, invalid);
+
+ if ((int)item->num_glyphs < len+4) {
+ item->num_glyphs = len+4;
+ return false;
+ }
+
+ HB_STACKARRAY(HB_UChar16, reordered, len + 4);
+ HB_STACKARRAY(hb_uint8, position, len + 4);
+
+ unsigned char properties = scriptProperties[script-HB_Script_Devanagari];
+
+ if (invalid) {
+ *reordered = 0x25cc;
+ memcpy(reordered+1, item->string + item->item.pos, len*sizeof(HB_UChar16));
+ len++;
+ } else {
+ memcpy(reordered, item->string + item->item.pos, len*sizeof(HB_UChar16));
+ }
+ if (reordered[len-1] == 0x200c) // zero width non joiner
+ len--;
+
+ int i;
+ int base = 0;
+ int reph = -1;
+
+#ifdef INDIC_DEBUG
+ IDEBUG("original:");
+ for (i = 0; i < len; i++) {
+ IDEBUG(" %d: %4x", i, reordered[i]);
+ }
+#endif
+
+ if (len != 1) {
+ HB_UChar16 *uc = reordered;
+ bool beginsWithRa = false;
+
+ // Rule 1: find base consonant
+ //
+ // The shaping engine finds the base consonant of the
+ // syllable, using the following algorithm: starting from the
+ // end of the syllable, move backwards until a consonant is
+ // found that does not have a below-base or post-base form
+ // (post-base forms have to follow below-base forms), or
+ // arrive at the first consonant. The consonant stopped at
+ // will be the base.
+ //
+ // * If the syllable starts with Ra + H (in a script that has
+ // 'Reph'), Ra is excluded from candidates for base
+ // consonants.
+ //
+ // * In Kannada and Telugu, the base consonant cannot be
+ // farther than 3 consonants from the end of the syllable.
+ // #### replace the HasReph property by testing if the feature exists in the font!
+ if (form(*uc) == Consonant || (script == HB_Script_Bengali && form(*uc) == IndependentVowel)) {
+ if ((properties & HasReph) && (len > 2) &&
+ (*uc == ra || *uc == 0x9f0) && *(uc+1) == halant)
+ beginsWithRa = true;
+
+ if (beginsWithRa && form(*(uc+2)) == Control)
+ beginsWithRa = false;
+
+ base = (beginsWithRa ? 2 : 0);
+ IDEBUG(" length = %d, beginsWithRa = %d, base=%d", len, beginsWithRa, base);
+
+ int lastConsonant = 0;
+ int matra = -1;
+ // we remember:
+ // * the last consonant since we need it for rule 2
+ // * the matras position for rule 3 and 4
+
+ // figure out possible base glyphs
+ memset(position, 0, len);
+ if (script == HB_Script_Devanagari || script == HB_Script_Gujarati) {
+ bool vattu = false;
+ for (i = base; i < len; ++i) {
+ position[i] = form(uc[i]);
+ if (position[i] == Consonant) {
+ lastConsonant = i;
+ vattu = (!vattu && uc[i] == ra);
+ if (vattu) {
+ IDEBUG("excluding vattu glyph at %d from base candidates", i);
+ position[i] = Vattu;
+ }
+ } else if (position[i] == Matra) {
+ matra = i;
+ }
+ }
+ } else {
+ for (i = base; i < len; ++i) {
+ position[i] = form(uc[i]);
+ if (position[i] == Consonant)
+ lastConsonant = i;
+ else if (matra < 0 && position[i] == Matra)
+ matra = i;
+ }
+ }
+ int skipped = 0;
+ Position pos = Post;
+ for (i = len-1; i >= base; i--) {
+ if (position[i] != Consonant && (position[i] != Control || script == HB_Script_Kannada))
+ continue;
+
+ if (i < len-1 && position[i] == Control && position[i+1] == Consonant) {
+ base = i+1;
+ break;
+ }
+
+ Position charPosition = indic_position(uc[i]);
+ if (pos == Post && charPosition == Post) {
+ pos = Post;
+ } else if ((pos == Post || pos == Below) && charPosition == Below) {
+ if (script == HB_Script_Devanagari || script == HB_Script_Gujarati)
+ base = i;
+ pos = Below;
+ } else {
+ base = i;
+ break;
+ }
+ if (skipped == 2 && (script == HB_Script_Kannada || script == HB_Script_Telugu)) {
+ base = i;
+ break;
+ }
+ ++skipped;
+ }
+
+ IDEBUG(" base consonant at %d skipped=%d, lastConsonant=%d", base, skipped, lastConsonant);
+
+ // Rule 2:
+ //
+ // If the base consonant is not the last one, Uniscribe
+ // moves the halant from the base consonant to the last
+ // one.
+ if (lastConsonant > base) {
+ int halantPos = 0;
+ if (uc[base+1] == halant)
+ halantPos = base + 1;
+ else if (uc[base+1] == nukta && uc[base+2] == halant)
+ halantPos = base + 2;
+ if (halantPos > 0) {
+ IDEBUG(" moving halant from %d to %d!", base+1, lastConsonant);
+ for (i = halantPos; i < lastConsonant; i++)
+ uc[i] = uc[i+1];
+ uc[lastConsonant] = halant;
+ }
+ }
+
+ // Rule 3:
+ //
+ // If the syllable starts with Ra + H, Uniscribe moves
+ // this combination so that it follows either:
+
+ // * the post-base 'matra' (if any) or the base consonant
+ // (in scripts that show similarity to Devanagari, i.e.,
+ // Devanagari, Gujarati, Bengali)
+ // * the base consonant (other scripts)
+ // * the end of the syllable (Kannada)
+
+ Position matra_position = None;
+ if (matra > 0)
+ matra_position = indic_position(uc[matra]);
+ IDEBUG(" matra at %d with form %d, base=%d", matra, matra_position, base);
+
+ if (beginsWithRa && base != 0) {
+ int toPos = base+1;
+ if (toPos < len && uc[toPos] == nukta)
+ toPos++;
+ if (toPos < len && uc[toPos] == halant)
+ toPos++;
+ if (toPos < len && uc[toPos] == 0x200d)
+ toPos++;
+ if (toPos < len-1 && uc[toPos] == ra && uc[toPos+1] == halant)
+ toPos += 2;
+ if (script == HB_Script_Devanagari || script == HB_Script_Gujarati || script == HB_Script_Bengali) {
+ if (matra_position == Post || matra_position == Split) {
+ toPos = matra+1;
+ matra -= 2;
+ }
+ } else if (script == HB_Script_Kannada) {
+ toPos = len;
+ matra -= 2;
+ }
+
+ IDEBUG("moving leading ra+halant to position %d", toPos);
+ for (i = 2; i < toPos; i++)
+ uc[i-2] = uc[i];
+ uc[toPos-2] = ra;
+ uc[toPos-1] = halant;
+ base -= 2;
+ if (properties & HasReph)
+ reph = toPos-2;
+ }
+
+ // Rule 4:
+
+ // Uniscribe splits two- or three-part matras into their
+ // parts. This splitting is a character-to-character
+ // operation).
+ //
+ // Uniscribe describes some moving operations for these
+ // matras here. For shaping however all pre matras need
+ // to be at the beginning of the syllable, so we just move
+ // them there now.
+ if (matra_position == Split) {
+ splitMatra(uc, matra, len);
+ // Handle three-part matras (0xccb in Kannada)
+ matra_position = indic_position(uc[matra]);
+ }
+
+ if (matra_position == Pre) {
+ unsigned short m = uc[matra];
+ while (matra--)
+ uc[matra+1] = uc[matra];
+ uc[0] = m;
+ base++;
+ }
+ }
+
+ // Rule 5:
+ //
+ // Uniscribe classifies consonants and 'matra' parts as
+ // pre-base, above-base (Reph), below-base or post-base. This
+ // classification exists on the character code level and is
+ // language-dependent, not font-dependent.
+ for (i = 0; i < base; ++i)
+ position[i] = Pre;
+ position[base] = Base;
+ for (i = base+1; i < len; ++i) {
+ position[i] = indic_position(uc[i]);
+ // #### replace by adjusting table
+ if (uc[i] == nukta || uc[i] == halant)
+ position[i] = Inherit;
+ }
+ if (reph > 0) {
+ // recalculate reph, it might have changed.
+ for (i = base+1; i < len; ++i)
+ if (uc[i] == ra)
+ reph = i;
+ position[reph] = Reph;
+ position[reph+1] = Inherit;
+ }
+
+ // all reordering happens now to the chars after the base
+ int fixed = base+1;
+ if (fixed < len && uc[fixed] == nukta)
+ fixed++;
+ if (fixed < len && uc[fixed] == halant)
+ fixed++;
+ if (fixed < len && uc[fixed] == 0x200d)
+ fixed++;
+
+#ifdef INDIC_DEBUG
+ for (i = fixed; i < len; ++i)
+ IDEBUG("position[%d] = %d, form=%d uc=%x", i, position[i], form(uc[i]), uc[i]);
+#endif
+ // we continuosly position the matras and vowel marks and increase the fixed
+ // until we reached the end.
+ const IndicOrdering *finalOrder = indic_order[script-HB_Script_Devanagari];
+
+ IDEBUG(" reordering pass:");
+ IDEBUG(" base=%d fixed=%d", base, fixed);
+ int toMove = 0;
+ while (finalOrder[toMove].form && fixed < len-1) {
+ IDEBUG(" fixed = %d, toMove=%d, moving form %d with pos %d", fixed, toMove, finalOrder[toMove].form, finalOrder[toMove].position);
+ for (i = fixed; i < len; i++) {
+// IDEBUG() << " i=" << i << "uc=" << hex << uc[i] << "form=" << form(uc[i])
+// << "position=" << position[i];
+ if (form(uc[i]) == finalOrder[toMove].form &&
+ position[i] == finalOrder[toMove].position) {
+ // need to move this glyph
+ int to = fixed;
+ if (i < len-1 && position[i+1] == Inherit) {
+ IDEBUG(" moving two chars from %d to %d", i, to);
+ unsigned short ch = uc[i];
+ unsigned short ch2 = uc[i+1];
+ unsigned char pos = position[i];
+ for (int j = i+1; j > to+1; j--) {
+ uc[j] = uc[j-2];
+ position[j] = position[j-2];
+ }
+ uc[to] = ch;
+ uc[to+1] = ch2;
+ position[to] = pos;
+ position[to+1] = pos;
+ fixed += 2;
+ } else {
+ IDEBUG(" moving one char from %d to %d", i, to);
+ unsigned short ch = uc[i];
+ unsigned char pos = position[i];
+ for (int j = i; j > to; j--) {
+ uc[j] = uc[j-1];
+ position[j] = position[j-1];
+ }
+ uc[to] = ch;
+ position[to] = pos;
+ fixed++;
+ }
+ }
+ }
+ toMove++;
+ }
+
+ }
+
+ if (reph > 0) {
+ // recalculate reph, it might have changed.
+ for (i = base+1; i < len; ++i)
+ if (reordered[i] == ra)
+ reph = i;
+ }
+
+#ifndef NO_OPENTYPE
+ const int availableGlyphs = item->num_glyphs;
+#endif
+ if (!item->font->klass->convertStringToGlyphIndices(item->font,
+ reordered, len,
+ item->glyphs, &item->num_glyphs,
+ item->item.bidiLevel % 2))
+ goto error;
+
+
+ IDEBUG(" base=%d, reph=%d", base, reph);
+ IDEBUG("reordered:");
+ for (i = 0; i < len; i++) {
+ item->attributes[i].mark = false;
+ item->attributes[i].clusterStart = false;
+ item->attributes[i].justification = 0;
+ item->attributes[i].zeroWidth = false;
+ IDEBUG(" %d: %4x", i, reordered[i]);
+ }
+
+ // now we have the syllable in the right order, and can start running it through open type.
+
+ for (i = 0; i < len; ++i)
+ control |= (form(reordered[i]) == Control);
+
+#ifndef NO_OPENTYPE
+ if (openType) {
+
+ // we need to keep track of where the base glyph is for some
+ // scripts and use the cluster feature for this. This
+ // also means we have to correct the logCluster output from
+ // the open type engine manually afterwards. for indic this
+ // is rather simple, as all chars just point to the first
+ // glyph in the syllable.
+ HB_STACKARRAY(unsigned short, clusters, len);
+ HB_STACKARRAY(unsigned int, properties, len);
+
+ for (i = 0; i < len; ++i)
+ clusters[i] = i;
+
+ // features we should always apply
+ for (i = 0; i < len; ++i)
+ properties[i] = ~(LocaProperty
+ | CcmpProperty
+ | NuktaProperty
+ | VattuProperty
+ | ConjunctFormProperty
+ | PreSubstProperty
+ | BelowSubstProperty
+ | AboveSubstProperty
+ | PostSubstProperty
+ | HalantProperty
+ | IndicCaltProperty
+ | PositioningProperties);
+
+ // Loca always applies
+ // Ccmp always applies
+ // Init
+ if (item->item.pos == 0
+ || !(isLetter(item->string[item->item.pos-1]) || isMark(item->string[item->item.pos-1])))
+ properties[0] &= ~InitProperty;
+
+ // Nukta always applies
+ // Akhant
+ for (i = 0; i <= base; ++i)
+ properties[i] &= ~AkhantProperty;
+ // Reph
+ if (reph >= 0) {
+ properties[reph] &= ~RephProperty;
+ properties[reph+1] &= ~RephProperty;
+ }
+ // BelowForm
+ for (i = base+1; i < len; ++i)
+ properties[i] &= ~BelowFormProperty;
+
+ if (script == HB_Script_Devanagari || script == HB_Script_Gujarati) {
+ // vattu glyphs need this aswell
+ bool vattu = false;
+ for (i = base-2; i > 1; --i) {
+ if (form(reordered[i]) == Consonant) {
+ vattu = (!vattu && reordered[i] == ra);
+ if (vattu) {
+ IDEBUG("forming vattu ligature at %d", i);
+ properties[i] &= ~BelowFormProperty;
+ properties[i+1] &= ~BelowFormProperty;
+ }
+ }
+ }
+ }
+ // HalfFormProperty
+ for (i = 0; i < base; ++i)
+ properties[i] &= ~HalfFormProperty;
+ if (control) {
+ for (i = 2; i < len; ++i) {
+ if (reordered[i] == 0x200d /* ZWJ */) {
+ properties[i-1] &= ~HalfFormProperty;
+ properties[i-2] &= ~HalfFormProperty;
+ } else if (reordered[i] == 0x200c /* ZWNJ */) {
+ properties[i-1] &= ~HalfFormProperty;
+ properties[i-2] &= ~HalfFormProperty;
+ }
+ }
+ }
+ // PostFormProperty
+ for (i = base+1; i < len; ++i)
+ properties[i] &= ~PostFormProperty;
+ // vattu always applies
+ // pres always applies
+ // blws always applies
+ // abvs always applies
+ // psts always applies
+ // halant always applies
+ // calt always applies
+
+#ifdef INDIC_DEBUG
+// {
+// IDEBUG("OT properties:");
+// for (int i = 0; i < len; ++i)
+// qDebug(" i: %s", ::propertiesToString(properties[i]).toLatin1().data());
+// }
+#endif
+
+ // initialize
+ item->log_clusters = clusters;
+ HB_OpenTypeShape(item, properties);
+
+ int newLen = item->face->buffer->in_length;
+ HB_GlyphItem otl_glyphs = item->face->buffer->in_string;
+
+ // move the left matra back to its correct position in malayalam and tamil
+ if ((script == HB_Script_Malayalam || script == HB_Script_Tamil) && (form(reordered[0]) == Matra)) {
+// qDebug("reordering matra, len=%d", newLen);
+ // need to find the base in the shaped string and move the matra there
+ int basePos = 0;
+ while (basePos < newLen && (int)otl_glyphs[basePos].cluster <= base)
+ basePos++;
+ --basePos;
+ if (basePos < newLen && basePos > 1) {
+// qDebug("moving prebase matra to position %d in syllable newlen=%d", basePos, newLen);
+ HB_GlyphItemRec m = otl_glyphs[0];
+ --basePos;
+ for (i = 0; i < basePos; ++i)
+ otl_glyphs[i] = otl_glyphs[i+1];
+ otl_glyphs[basePos] = m;
+ }
+ }
+
+ HB_Bool positioned = HB_OpenTypePosition(item, availableGlyphs, false);
+
+ HB_FREE_STACKARRAY(clusters);
+ HB_FREE_STACKARRAY(properties);
+
+ if (!positioned)
+ goto error;
+
+ if (control) {
+ IDEBUG("found a control char in the syllable");
+ hb_uint32 i = 0, j = 0;
+ while (i < item->num_glyphs) {
+ if (form(reordered[otl_glyphs[i].cluster]) == Control) {
+ ++i;
+ if (i >= item->num_glyphs)
+ break;
+ }
+ item->glyphs[j] = item->glyphs[i];
+ item->attributes[j] = item->attributes[i];
+ item->offsets[j] = item->offsets[i];
+ item->advances[j] = item->advances[i];
+ ++i;
+ ++j;
+ }
+ item->num_glyphs = j;
+ }
+
+ } else {
+ HB_HeuristicPosition(item);
+ }
+#endif // NO_OPENTYPE
+ item->attributes[0].clusterStart = true;
+
+ HB_FREE_STACKARRAY(reordered);
+ HB_FREE_STACKARRAY(position);
+
+ IDEBUG("<<<<<<");
+ return true;
+
+error:
+ HB_FREE_STACKARRAY(reordered);
+ HB_FREE_STACKARRAY(position);
+ return false;
+}
+
+/* syllables are of the form:
+
+ (Consonant Nukta? Halant)* Consonant Matra? VowelMark? StressMark?
+ (Consonant Nukta? Halant)* Consonant Halant
+ IndependentVowel VowelMark? StressMark?
+
+ We return syllable boundaries on invalid combinations aswell
+*/
+static int indic_nextSyllableBoundary(HB_Script script, const HB_UChar16 *s, int start, int end, bool *invalid)
+{
+ *invalid = false;
+ IDEBUG("indic_nextSyllableBoundary: start=%d, end=%d", start, end);
+ const HB_UChar16 *uc = s+start;
+
+ int pos = 0;
+ Form state = form(uc[pos]);
+ IDEBUG("state[%d]=%d (uc=%4x)", pos, state, uc[pos]);
+ pos++;
+
+ if (state != Consonant && state != IndependentVowel) {
+ if (state != Other)
+ *invalid = true;
+ goto finish;
+ }
+
+ while (pos < end - start) {
+ Form newState = form(uc[pos]);
+ IDEBUG("state[%d]=%d (uc=%4x)", pos, newState, uc[pos]);
+ switch(newState) {
+ case Control:
+ newState = state;
+ if (state == Halant && uc[pos] == 0x200d /* ZWJ */)
+ break;
+ // the control character should be the last char in the item
+ ++pos;
+ goto finish;
+ case Consonant:
+ if (state == Halant && (script != HB_Script_Sinhala || uc[pos-1] == 0x200d /* ZWJ */))
+ break;
+ goto finish;
+ case Halant:
+ if (state == Nukta || state == Consonant)
+ break;
+ // Bengali has a special exception allowing the combination Vowel_A/E + Halant + Ya
+ if (script == HB_Script_Bengali && pos == 1 &&
+ (uc[0] == 0x0985 || uc[0] == 0x098f))
+ break;
+ // Sinhala uses the Halant as a component of certain matras. Allow these, but keep the state on Matra.
+ if (script == HB_Script_Sinhala && state == Matra) {
+ ++pos;
+ continue;
+ }
+ if (script == HB_Script_Malayalam && state == Matra && uc[pos-1] == 0x0d41) {
+ ++pos;
+ continue;
+ }
+ goto finish;
+ case Nukta:
+ if (state == Consonant)
+ break;
+ goto finish;
+ case StressMark:
+ if (state == VowelMark)
+ break;
+ // fall through
+ case VowelMark:
+ if (state == Matra || state == LengthMark || state == IndependentVowel)
+ break;
+ // fall through
+ case Matra:
+ if (state == Consonant || state == Nukta)
+ break;
+ if (state == Matra) {
+ // ### needs proper testing for correct two/three part matras
+ break;
+ }
+ // ### not sure if this is correct. If it is, does it apply only to Bengali or should
+ // it work for all Indic languages?
+ // the combination Independent_A + Vowel Sign AA is allowed.
+ if (script == HB_Script_Bengali && uc[pos] == 0x9be && uc[pos-1] == 0x985)
+ break;
+ if (script == HB_Script_Tamil && state == Matra) {
+ if (uc[pos-1] == 0x0bc6 &&
+ (uc[pos] == 0xbbe || uc[pos] == 0xbd7))
+ break;
+ if (uc[pos-1] == 0x0bc7 && uc[pos] == 0xbbe)
+ break;
+ }
+ goto finish;
+
+ case LengthMark:
+ if (state == Matra) {
+ // ### needs proper testing for correct two/three part matras
+ break;
+ }
+ case IndependentVowel:
+ case Invalid:
+ case Other:
+ goto finish;
+ }
+ state = newState;
+ pos++;
+ }
+ finish:
+ return pos+start;
+}
+
+HB_Bool HB_IndicShape(HB_ShaperItem *item)
+{
+ assert(item->item.script >= HB_Script_Devanagari && item->item.script <= HB_Script_Sinhala);
+
+ HB_Bool openType = false;
+#ifndef NO_OPENTYPE
+ openType = HB_SelectScript(item, indic_features);
+#endif
+ unsigned short *logClusters = item->log_clusters;
+
+ HB_ShaperItem syllable = *item;
+ int first_glyph = 0;
+
+ int sstart = item->item.pos;
+ int end = sstart + item->item.length;
+ IDEBUG("indic_shape: from %d length %d", item->item.pos, item->item.length);
+ while (sstart < end) {
+ bool invalid;
+ int send = indic_nextSyllableBoundary(item->item.script, item->string, sstart, end, &invalid);
+ IDEBUG("syllable from %d, length %d, invalid=%s", sstart, send-sstart,
+ invalid ? "true" : "false");
+ syllable.item.pos = sstart;
+ syllable.item.length = send-sstart;
+ syllable.glyphs = item->glyphs + first_glyph;
+ syllable.attributes = item->attributes + first_glyph;
+ syllable.offsets = item->offsets + first_glyph;
+ syllable.advances = item->advances + first_glyph;
+ syllable.num_glyphs = item->num_glyphs - first_glyph;
+ if (!indic_shape_syllable(openType, &syllable, invalid)) {
+ IDEBUG("syllable shaping failed, syllable requests %d glyphs", syllable.num_glyphs);
+ item->num_glyphs += syllable.num_glyphs;
+ return false;
+ }
+ // fix logcluster array
+ IDEBUG("syllable:");
+ hb_uint32 g;
+ for (g = first_glyph; g < first_glyph + syllable.num_glyphs; ++g)
+ IDEBUG(" %d -> glyph %x", g, item->glyphs[g]);
+ IDEBUG(" logclusters:");
+ int i;
+ for (i = sstart; i < send; ++i) {
+ IDEBUG(" %d -> glyph %d", i, first_glyph);
+ logClusters[i-item->item.pos] = first_glyph;
+ }
+ sstart = send;
+ first_glyph += syllable.num_glyphs;
+ }
+ item->num_glyphs = first_glyph;
+ return true;
+}
diff --git a/src/hb-old/harfbuzz-khmer.c b/src/hb-old/harfbuzz-khmer.c
new file mode 100644
index 0000000..150cbc1
--- /dev/null
+++ b/src/hb-old/harfbuzz-khmer.c
@@ -0,0 +1,642 @@
+/*
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#include "harfbuzz-shaper.h"
+#include "harfbuzz-shaper-private.h"
+
+#include <assert.h>
+#include <stdio.h>
+
+/*
+// Vocabulary
+// Base -> A consonant or an independent vowel in its full (not subscript) form. It is the
+// center of the syllable, it can be surrounded by coeng (subscript) consonants, vowels,
+// split vowels, signs... but there is only one base in a syllable, it has to be coded as
+// the first character of the syllable.
+// split vowel --> vowel that has two parts placed separately (e.g. Before and after the consonant).
+// Khmer language has five of them. Khmer split vowels either have one part before the
+// base and one after the base or they have a part before the base and a part above the base.
+// The first part of all Khmer split vowels is the same character, identical to
+// the glyph of Khmer dependent vowel SRA EI
+// coeng --> modifier used in Khmer to construct coeng (subscript) consonants
+// Differently than indian languages, the coeng modifies the consonant that follows it,
+// not the one preceding it Each consonant has two forms, the base form and the subscript form
+// the base form is the normal one (using the consonants code-point), the subscript form is
+// displayed when the combination coeng + consonant is encountered.
+// Consonant of type 1 -> A consonant which has subscript for that only occupies space under a base consonant
+// Consonant of type 2.-> Its subscript form occupies space under and before the base (only one, RO)
+// Consonant of Type 3 -> Its subscript form occupies space under and after the base (KHO, CHHO, THHO, BA, YO, SA)
+// Consonant shifter -> Khmer has to series of consonants. The same dependent vowel has different sounds
+// if it is attached to a consonant of the first series or a consonant of the second series
+// Most consonants have an equivalent in the other series, but some of theme exist only in
+// one series (for example SA). If we want to use the consonant SA with a vowel sound that
+// can only be done with a vowel sound that corresponds to a vowel accompanying a consonant
+// of the other series, then we need to use a consonant shifter: TRIISAP or MUSIKATOAN
+// x17C9 y x17CA. TRIISAP changes a first series consonant to second series sound and
+// MUSIKATOAN a second series consonant to have a first series vowel sound.
+// Consonant shifter are both normally supercript marks, but, when they are followed by a
+// superscript, they change shape and take the form of subscript dependent vowel SRA U.
+// If they are in the same syllable as a coeng consonant, Unicode 3.0 says that they
+// should be typed before the coeng. Unicode 4.0 breaks the standard and says that it should
+// be placed after the coeng consonant.
+// Dependent vowel -> In khmer dependent vowels can be placed above, below, before or after the base
+// Each vowel has its own position. Only one vowel per syllable is allowed.
+// Signs -> Khmer has above signs and post signs. Only one above sign and/or one post sign are
+// Allowed in a syllable.
+//
+//
+// order is important here! This order must be the same that is found in each horizontal
+// line in the statetable for Khmer (see khmerStateTable) .
+*/
+enum KhmerCharClassValues {
+ CC_RESERVED = 0,
+ CC_CONSONANT = 1, /* Consonant of type 1 or independent vowel */
+ CC_CONSONANT2 = 2, /* Consonant of type 2 */
+ CC_CONSONANT3 = 3, /* Consonant of type 3 */
+ CC_ZERO_WIDTH_NJ_MARK = 4, /* Zero Width non joiner character (0x200C) */
+ CC_CONSONANT_SHIFTER = 5,
+ CC_ROBAT = 6, /* Khmer special diacritic accent -treated differently in state table */
+ CC_COENG = 7, /* Subscript consonant combining character */
+ CC_DEPENDENT_VOWEL = 8,
+ CC_SIGN_ABOVE = 9,
+ CC_SIGN_AFTER = 10,
+ CC_ZERO_WIDTH_J_MARK = 11, /* Zero width joiner character */
+ CC_COUNT = 12 /* This is the number of character classes */
+};
+
+
+enum KhmerCharClassFlags {
+ CF_CLASS_MASK = 0x0000FFFF,
+
+ CF_CONSONANT = 0x01000000, /* flag to speed up comparing */
+ CF_SPLIT_VOWEL = 0x02000000, /* flag for a split vowel -> the first part is added in front of the syllable */
+ CF_DOTTED_CIRCLE = 0x04000000, /* add a dotted circle if a character with this flag is the first in a syllable */
+ CF_COENG = 0x08000000, /* flag to speed up comparing */
+ CF_SHIFTER = 0x10000000, /* flag to speed up comparing */
+ CF_ABOVE_VOWEL = 0x20000000, /* flag to speed up comparing */
+
+ /* position flags */
+ CF_POS_BEFORE = 0x00080000,
+ CF_POS_BELOW = 0x00040000,
+ CF_POS_ABOVE = 0x00020000,
+ CF_POS_AFTER = 0x00010000,
+ CF_POS_MASK = 0x000f0000
+};
+
+
+/* Characters that get referred to by name */
+enum KhmerChar {
+ C_SIGN_ZWNJ = 0x200C,
+ C_SIGN_ZWJ = 0x200D,
+ C_RO = 0x179A,
+ C_VOWEL_AA = 0x17B6,
+ C_SIGN_NIKAHIT = 0x17C6,
+ C_VOWEL_E = 0x17C1,
+ C_COENG = 0x17D2
+};
+
+
+/*
+// simple classes, they are used in the statetable (in this file) to control the length of a syllable
+// they are also used to know where a character should be placed (location in reference to the base character)
+// and also to know if a character, when independently displayed, should be displayed with a dotted-circle to
+// indicate error in syllable construction
+*/
+enum {
+ _xx = CC_RESERVED,
+ _sa = CC_SIGN_ABOVE | CF_DOTTED_CIRCLE | CF_POS_ABOVE,
+ _sp = CC_SIGN_AFTER | CF_DOTTED_CIRCLE| CF_POS_AFTER,
+ _c1 = CC_CONSONANT | CF_CONSONANT,
+ _c2 = CC_CONSONANT2 | CF_CONSONANT,
+ _c3 = CC_CONSONANT3 | CF_CONSONANT,
+ _rb = CC_ROBAT | CF_POS_ABOVE | CF_DOTTED_CIRCLE,
+ _cs = CC_CONSONANT_SHIFTER | CF_DOTTED_CIRCLE | CF_SHIFTER,
+ _dl = CC_DEPENDENT_VOWEL | CF_POS_BEFORE | CF_DOTTED_CIRCLE,
+ _db = CC_DEPENDENT_VOWEL | CF_POS_BELOW | CF_DOTTED_CIRCLE,
+ _da = CC_DEPENDENT_VOWEL | CF_POS_ABOVE | CF_DOTTED_CIRCLE | CF_ABOVE_VOWEL,
+ _dr = CC_DEPENDENT_VOWEL | CF_POS_AFTER | CF_DOTTED_CIRCLE,
+ _co = CC_COENG | CF_COENG | CF_DOTTED_CIRCLE,
+
+ /* split vowel */
+ _va = _da | CF_SPLIT_VOWEL,
+ _vr = _dr | CF_SPLIT_VOWEL
+};
+
+
+/*
+// Character class: a character class value
+// ORed with character class flags.
+*/
+typedef unsigned long KhmerCharClass;
+
+
+/*
+// Character class tables
+// _xx character does not combine into syllable, such as numbers, puntuation marks, non-Khmer signs...
+// _sa Sign placed above the base
+// _sp Sign placed after the base
+// _c1 Consonant of type 1 or independent vowel (independent vowels behave as type 1 consonants)
+// _c2 Consonant of type 2 (only RO)
+// _c3 Consonant of type 3
+// _rb Khmer sign robat u17CC. combining mark for subscript consonants
+// _cd Consonant-shifter
+// _dl Dependent vowel placed before the base (left of the base)
+// _db Dependent vowel placed below the base
+// _da Dependent vowel placed above the base
+// _dr Dependent vowel placed behind the base (right of the base)
+// _co Khmer combining mark COENG u17D2, combines with the consonant or independent vowel following
+// it to create a subscript consonant or independent vowel
+// _va Khmer split vowel in which the first part is before the base and the second one above the base
+// _vr Khmer split vowel in which the first part is before the base and the second one behind (right of) the base
+*/
+static const KhmerCharClass khmerCharClasses[] = {
+ _c1, _c1, _c1, _c3, _c1, _c1, _c1, _c1, _c3, _c1, _c1, _c1, _c1, _c3, _c1, _c1, /* 1780 - 178F */
+ _c1, _c1, _c1, _c1, _c3, _c1, _c1, _c1, _c1, _c3, _c2, _c1, _c1, _c1, _c3, _c3, /* 1790 - 179F */
+ _c1, _c3, _c1, _c1, _c1, _c1, _c1, _c1, _c1, _c1, _c1, _c1, _c1, _c1, _c1, _c1, /* 17A0 - 17AF */
+ _c1, _c1, _c1, _c1, _dr, _dr, _dr, _da, _da, _da, _da, _db, _db, _db, _va, _vr, /* 17B0 - 17BF */
+ _vr, _dl, _dl, _dl, _vr, _vr, _sa, _sp, _sp, _cs, _cs, _sa, _rb, _sa, _sa, _sa, /* 17C0 - 17CF */
+ _sa, _sa, _co, _sa, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _sa, _xx, _xx /* 17D0 - 17DF */
+};
+
+/* this enum must reflect the range of khmerCharClasses */
+enum KhmerCharClassesRange {
+ KhmerFirstChar = 0x1780,
+ KhmerLastChar = 0x17df
+};
+
+/*
+// Below we define how a character in the input string is either in the khmerCharClasses table
+// (in which case we get its type back), a ZWJ or ZWNJ (two characters that may appear
+// within the syllable, but are not in the table) we also get their type back, or an unknown object
+// in which case we get _xx (CC_RESERVED) back
+*/
+static KhmerCharClass getKhmerCharClass(HB_UChar16 uc)
+{
+ if (uc == C_SIGN_ZWJ) {
+ return CC_ZERO_WIDTH_J_MARK;
+ }
+
+ if (uc == C_SIGN_ZWNJ) {
+ return CC_ZERO_WIDTH_NJ_MARK;
+ }
+
+ if (uc < KhmerFirstChar || uc > KhmerLastChar) {
+ return CC_RESERVED;
+ }
+
+ return khmerCharClasses[uc - KhmerFirstChar];
+}
+
+
+/*
+// The stateTable is used to calculate the end (the length) of a well
+// formed Khmer Syllable.
+//
+// Each horizontal line is ordered exactly the same way as the values in KhmerClassTable
+// CharClassValues. This coincidence of values allows the follow up of the table.
+//
+// Each line corresponds to a state, which does not necessarily need to be a type
+// of component... for example, state 2 is a base, with is always a first character
+// in the syllable, but the state could be produced a consonant of any type when
+// it is the first character that is analysed (in ground state).
+//
+// Differentiating 3 types of consonants is necessary in order to
+// forbid the use of certain combinations, such as having a second
+// coeng after a coeng RO,
+// The inexistent possibility of having a type 3 after another type 3 is permitted,
+// eliminating it would very much complicate the table, and it does not create typing
+// problems, as the case above.
+//
+// The table is quite complex, in order to limit the number of coeng consonants
+// to 2 (by means of the table).
+//
+// There a peculiarity, as far as Unicode is concerned:
+// - The consonant-shifter is considered in two possible different
+// locations, the one considered in Unicode 3.0 and the one considered in
+// Unicode 4.0. (there is a backwards compatibility problem in this standard).
+//
+//
+// xx independent character, such as a number, punctuation sign or non-khmer char
+//
+// c1 Khmer consonant of type 1 or an independent vowel
+// that is, a letter in which the subscript for is only under the
+// base, not taking any space to the right or to the left
+//
+// c2 Khmer consonant of type 2, the coeng form takes space under
+// and to the left of the base (only RO is of this type)
+//
+// c3 Khmer consonant of type 3. Its subscript form takes space under
+// and to the right of the base.
+//
+// cs Khmer consonant shifter
+//
+// rb Khmer robat
+//
+// co coeng character (u17D2)
+//
+// dv dependent vowel (including split vowels, they are treated in the same way).
+// even if dv is not defined above, the component that is really tested for is
+// KhmerClassTable::CC_DEPENDENT_VOWEL, which is common to all dependent vowels
+//
+// zwj Zero Width joiner
+//
+// zwnj Zero width non joiner
+//
+// sa above sign
+//
+// sp post sign
+//
+// there are lines with equal content but for an easier understanding
+// (and maybe change in the future) we did not join them
+*/
+static const signed char khmerStateTable[][CC_COUNT] =
+{
+ /* xx c1 c2 c3 zwnj cs rb co dv sa sp zwj */
+ { 1, 2, 2, 2, 1, 1, 1, 6, 1, 1, 1, 2}, /* 0 - ground state */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, /* 1 - exit state (or sign to the right of the syllable) */
+ {-1, -1, -1, -1, 3, 4, 5, 6, 16, 17, 1, -1}, /* 2 - Base consonant */
+ {-1, -1, -1, -1, -1, 4, -1, -1, 16, -1, -1, -1}, /* 3 - First ZWNJ before a register shifter It can only be followed by a shifter or a vowel */
+ {-1, -1, -1, -1, 15, -1, -1, 6, 16, 17, 1, 14}, /* 4 - First register shifter */
+ {-1, -1, -1, -1, -1, -1, -1, -1, 20, -1, 1, -1}, /* 5 - Robat */
+ {-1, 7, 8, 9, -1, -1, -1, -1, -1, -1, -1, -1}, /* 6 - First Coeng */
+ {-1, -1, -1, -1, 12, 13, -1, 10, 16, 17, 1, 14}, /* 7 - First consonant of type 1 after coeng */
+ {-1, -1, -1, -1, 12, 13, -1, -1, 16, 17, 1, 14}, /* 8 - First consonant of type 2 after coeng */
+ {-1, -1, -1, -1, 12, 13, -1, 10, 16, 17, 1, 14}, /* 9 - First consonant or type 3 after ceong */
+ {-1, 11, 11, 11, -1, -1, -1, -1, -1, -1, -1, -1}, /* 10 - Second Coeng (no register shifter before) */
+ {-1, -1, -1, -1, 15, -1, -1, -1, 16, 17, 1, 14}, /* 11 - Second coeng consonant (or ind. vowel) no register shifter before */
+ {-1, -1, -1, -1, -1, 13, -1, -1, 16, -1, -1, -1}, /* 12 - Second ZWNJ before a register shifter */
+ {-1, -1, -1, -1, 15, -1, -1, -1, 16, 17, 1, 14}, /* 13 - Second register shifter */
+ {-1, -1, -1, -1, -1, -1, -1, -1, 16, -1, -1, -1}, /* 14 - ZWJ before vowel */
+ {-1, -1, -1, -1, -1, -1, -1, -1, 16, -1, -1, -1}, /* 15 - ZWNJ before vowel */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, 17, 1, 18}, /* 16 - dependent vowel */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 18}, /* 17 - sign above */
+ {-1, -1, -1, -1, -1, -1, -1, 19, -1, -1, -1, -1}, /* 18 - ZWJ after vowel */
+ {-1, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1}, /* 19 - Third coeng */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1}, /* 20 - dependent vowel after a Robat */
+};
+
+
+/* #define KHMER_DEBUG */
+#ifdef KHMER_DEBUG
+#define KHDEBUG qDebug
+#else
+#define KHDEBUG if(0) printf
+#endif
+
+/*
+// Given an input string of characters and a location in which to start looking
+// calculate, using the state table, which one is the last character of the syllable
+// that starts in the starting position.
+*/
+static int khmer_nextSyllableBoundary(const HB_UChar16 *s, int start, int end, HB_Bool *invalid)
+{
+ const HB_UChar16 *uc = s + start;
+ int state = 0;
+ int pos = start;
+ *invalid = FALSE;
+
+ while (pos < end) {
+ KhmerCharClass charClass = getKhmerCharClass(*uc);
+ if (pos == start) {
+ *invalid = (charClass > 0) && ! (charClass & CF_CONSONANT);
+ }
+ state = khmerStateTable[state][charClass & CF_CLASS_MASK];
+
+ KHDEBUG("state[%d]=%d class=%8lx (uc=%4x)", pos - start, state,
+ charClass, *uc );
+
+ if (state < 0) {
+ break;
+ }
+ ++uc;
+ ++pos;
+ }
+ return pos;
+}
+
+#ifndef NO_OPENTYPE
+static const HB_OpenTypeFeature khmer_features[] = {
+ { HB_MAKE_TAG( 'p', 'r', 'e', 'f' ), PreFormProperty },
+ { HB_MAKE_TAG( 'b', 'l', 'w', 'f' ), BelowFormProperty },
+ { HB_MAKE_TAG( 'a', 'b', 'v', 'f' ), AboveFormProperty },
+ { HB_MAKE_TAG( 'p', 's', 't', 'f' ), PostFormProperty },
+ { HB_MAKE_TAG( 'p', 'r', 'e', 's' ), PreSubstProperty },
+ { HB_MAKE_TAG( 'b', 'l', 'w', 's' ), BelowSubstProperty },
+ { HB_MAKE_TAG( 'a', 'b', 'v', 's' ), AboveSubstProperty },
+ { HB_MAKE_TAG( 'p', 's', 't', 's' ), PostSubstProperty },
+ { HB_MAKE_TAG( 'c', 'l', 'i', 'g' ), CligProperty },
+ { 0, 0 }
+};
+#endif
+
+
+static HB_Bool khmer_shape_syllable(HB_Bool openType, HB_ShaperItem *item)
+{
+/* KHDEBUG("syllable from %d len %d, str='%s'", item->from, item->length,
+ item->string->mid(item->from, item->length).toUtf8().data()); */
+
+ int len = 0;
+ int syllableEnd = item->item.pos + item->item.length;
+ unsigned short reordered[16];
+ unsigned char properties[16];
+ enum {
+ AboveForm = 0x01,
+ PreForm = 0x02,
+ PostForm = 0x04,
+ BelowForm = 0x08
+ };
+#ifndef NO_OPENTYPE
+ const int availableGlyphs = item->num_glyphs;
+#endif
+ int coengRo;
+ int i;
+
+ /* according to the specs this is the max length one can get
+ ### the real value should be smaller */
+ assert(item->item.length < 13);
+
+ memset(properties, 0, 16*sizeof(unsigned char));
+
+#ifdef KHMER_DEBUG
+ qDebug("original:");
+ for (int i = from; i < syllableEnd; i++) {
+ qDebug(" %d: %4x", i, string[i]);
+ }
+#endif
+
+ /*
+ // write a pre vowel or the pre part of a split vowel first
+ // and look out for coeng + ro. RO is the only vowel of type 2, and
+ // therefore the only one that requires saving space before the base.
+ */
+ coengRo = -1; /* There is no Coeng Ro, if found this value will change */
+ for (i = item->item.pos; i < syllableEnd; i += 1) {
+ KhmerCharClass charClass = getKhmerCharClass(item->string[i]);
+
+ /* if a split vowel, write the pre part. In Khmer the pre part
+ is the same for all split vowels, same glyph as pre vowel C_VOWEL_E */
+ if (charClass & CF_SPLIT_VOWEL) {
+ reordered[len] = C_VOWEL_E;
+ properties[len] = PreForm;
+ ++len;
+ break; /* there can be only one vowel */
+ }
+ /* if a vowel with pos before write it out */
+ if (charClass & CF_POS_BEFORE) {
+ reordered[len] = item->string[i];
+ properties[len] = PreForm;
+ ++len;
+ break; /* there can be only one vowel */
+ }
+ /* look for coeng + ro and remember position
+ works because coeng + ro is always in front of a vowel (if there is a vowel)
+ and because CC_CONSONANT2 is enough to identify it, as it is the only consonant
+ with this flag */
+ if ( (charClass & CF_COENG) && (i + 1 < syllableEnd) &&
+ ( (getKhmerCharClass(item->string[i+1]) & CF_CLASS_MASK) == CC_CONSONANT2) ) {
+ coengRo = i;
+ }
+ }
+
+ /* write coeng + ro if found */
+ if (coengRo > -1) {
+ reordered[len] = C_COENG;
+ properties[len] = PreForm;
+ ++len;
+ reordered[len] = C_RO;
+ properties[len] = PreForm;
+ ++len;
+ }
+
+ /*
+ shall we add a dotted circle?
+ If in the position in which the base should be (first char in the string) there is
+ a character that has the Dotted circle flag (a character that cannot be a base)
+ then write a dotted circle */
+ if (getKhmerCharClass(item->string[item->item.pos]) & CF_DOTTED_CIRCLE) {
+ reordered[len] = C_DOTTED_CIRCLE;
+ ++len;
+ }
+
+ /* copy what is left to the output, skipping before vowels and
+ coeng Ro if they are present */
+ for (i = item->item.pos; i < syllableEnd; i += 1) {
+ HB_UChar16 uc = item->string[i];
+ KhmerCharClass charClass = getKhmerCharClass(uc);
+
+ /* skip a before vowel, it was already processed */
+ if (charClass & CF_POS_BEFORE) {
+ continue;
+ }
+
+ /* skip coeng + ro, it was already processed */
+ if (i == coengRo) {
+ i += 1;
+ continue;
+ }
+
+ switch (charClass & CF_POS_MASK)
+ {
+ case CF_POS_ABOVE :
+ reordered[len] = uc;
+ properties[len] = AboveForm;
+ ++len;
+ break;
+
+ case CF_POS_AFTER :
+ reordered[len] = uc;
+ properties[len] = PostForm;
+ ++len;
+ break;
+
+ case CF_POS_BELOW :
+ reordered[len] = uc;
+ properties[len] = BelowForm;
+ ++len;
+ break;
+
+ default:
+ /* assign the correct flags to a coeng consonant
+ Consonants of type 3 are taged as Post forms and those type 1 as below forms */
+ if ( (charClass & CF_COENG) && i + 1 < syllableEnd ) {
+ unsigned char property = (getKhmerCharClass(item->string[i+1]) & CF_CLASS_MASK) == CC_CONSONANT3 ?
+ PostForm : BelowForm;
+ reordered[len] = uc;
+ properties[len] = property;
+ ++len;
+ i += 1;
+ reordered[len] = item->string[i];
+ properties[len] = property;
+ ++len;
+ break;
+ }
+
+ /* if a shifter is followed by an above vowel change the shifter to below form,
+ an above vowel can have two possible positions i + 1 or i + 3
+ (position i+1 corresponds to unicode 3, position i+3 to Unicode 4)
+ and there is an extra rule for C_VOWEL_AA + C_SIGN_NIKAHIT also for two
+ different positions, right after the shifter or after a vowel (Unicode 4) */
+ if ( (charClass & CF_SHIFTER) && (i + 1 < syllableEnd) ) {
+ if (getKhmerCharClass(item->string[i+1]) & CF_ABOVE_VOWEL ) {
+ reordered[len] = uc;
+ properties[len] = BelowForm;
+ ++len;
+ break;
+ }
+ if (i + 2 < syllableEnd &&
+ (item->string[i+1] == C_VOWEL_AA) &&
+ (item->string[i+2] == C_SIGN_NIKAHIT) )
+ {
+ reordered[len] = uc;
+ properties[len] = BelowForm;
+ ++len;
+ break;
+ }
+ if (i + 3 < syllableEnd && (getKhmerCharClass(item->string[i+3]) & CF_ABOVE_VOWEL) ) {
+ reordered[len] = uc;
+ properties[len] = BelowForm;
+ ++len;
+ break;
+ }
+ if (i + 4 < syllableEnd &&
+ (item->string[i+3] == C_VOWEL_AA) &&
+ (item->string[i+4] == C_SIGN_NIKAHIT) )
+ {
+ reordered[len] = uc;
+ properties[len] = BelowForm;
+ ++len;
+ break;
+ }
+ }
+
+ /* default - any other characters */
+ reordered[len] = uc;
+ ++len;
+ break;
+ } /* switch */
+ } /* for */
+
+ if (!item->font->klass->convertStringToGlyphIndices(item->font,
+ reordered, len,
+ item->glyphs, &item->num_glyphs,
+ item->item.bidiLevel % 2))
+ return FALSE;
+
+
+ KHDEBUG("after shaping: len=%d", len);
+ for (i = 0; i < len; i++) {
+ item->attributes[i].mark = FALSE;
+ item->attributes[i].clusterStart = FALSE;
+ item->attributes[i].justification = 0;
+ item->attributes[i].zeroWidth = FALSE;
+ KHDEBUG(" %d: %4x property=%x", i, reordered[i], properties[i]);
+ }
+
+ /* now we have the syllable in the right order, and can start running it through open type. */
+
+#ifndef NO_OPENTYPE
+ if (openType) {
+ hb_uint32 where[16];
+ for (i = 0; i < len; ++i) {
+ where[i] = ~(PreSubstProperty
+ | BelowSubstProperty
+ | AboveSubstProperty
+ | PostSubstProperty
+ | CligProperty
+ | PositioningProperties);
+ if (properties[i] == PreForm)
+ where[i] &= ~PreFormProperty;
+ else if (properties[i] == BelowForm)
+ where[i] &= ~BelowFormProperty;
+ else if (properties[i] == AboveForm)
+ where[i] &= ~AboveFormProperty;
+ else if (properties[i] == PostForm)
+ where[i] &= ~PostFormProperty;
+ }
+
+ HB_OpenTypeShape(item, where);
+ if (!HB_OpenTypePosition(item, availableGlyphs, /*doLogClusters*/FALSE))
+ return FALSE;
+ } else
+#endif
+ {
+ KHDEBUG("Not using openType");
+ HB_HeuristicPosition(item);
+ }
+
+ item->attributes[0].clusterStart = TRUE;
+ return TRUE;
+}
+
+HB_Bool HB_KhmerShape(HB_ShaperItem *item)
+{
+ HB_Bool openType = FALSE;
+ unsigned short *logClusters = item->log_clusters;
+ int i;
+
+ HB_ShaperItem syllable = *item;
+ int first_glyph = 0;
+
+ int sstart = item->item.pos;
+ int end = sstart + item->item.length;
+
+ assert(item->item.script == HB_Script_Khmer);
+
+#ifndef NO_OPENTYPE
+ openType = HB_SelectScript(item, khmer_features);
+#endif
+
+ KHDEBUG("khmer_shape: from %d length %d", item->item.pos, item->item.length);
+ while (sstart < end) {
+ HB_Bool invalid;
+ int send = khmer_nextSyllableBoundary(item->string, sstart, end, &invalid);
+ KHDEBUG("syllable from %d, length %d, invalid=%s", sstart, send-sstart,
+ invalid ? "TRUE" : "FALSE");
+ syllable.item.pos = sstart;
+ syllable.item.length = send-sstart;
+ syllable.glyphs = item->glyphs + first_glyph;
+ syllable.attributes = item->attributes + first_glyph;
+ syllable.offsets = item->offsets + first_glyph;
+ syllable.advances = item->advances + first_glyph;
+ syllable.num_glyphs = item->num_glyphs - first_glyph;
+ if (!khmer_shape_syllable(openType, &syllable)) {
+ KHDEBUG("syllable shaping failed, syllable requests %d glyphs", syllable.num_glyphs);
+ item->num_glyphs += syllable.num_glyphs;
+ return FALSE;
+ }
+ /* fix logcluster array */
+ KHDEBUG("syllable:");
+ for (i = first_glyph; i < first_glyph + (int)syllable.num_glyphs; ++i)
+ KHDEBUG(" %d -> glyph %x", i, item->glyphs[i]);
+ KHDEBUG(" logclusters:");
+ for (i = sstart; i < send; ++i) {
+ KHDEBUG(" %d -> glyph %d", i, first_glyph);
+ logClusters[i-item->item.pos] = first_glyph;
+ }
+ sstart = send;
+ first_glyph += syllable.num_glyphs;
+ }
+ item->num_glyphs = first_glyph;
+ return TRUE;
+}
diff --git a/src/hb-old/harfbuzz-myanmar.c b/src/hb-old/harfbuzz-myanmar.c
new file mode 100644
index 0000000..51ec14b
--- /dev/null
+++ b/src/hb-old/harfbuzz-myanmar.c
@@ -0,0 +1,511 @@
+/*
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#include "harfbuzz-shaper.h"
+#include "harfbuzz-shaper-private.h"
+
+#include <assert.h>
+#include <stdio.h>
+
+enum MymrCharClassValues
+{
+ Mymr_CC_RESERVED = 0,
+ Mymr_CC_CONSONANT = 1, /* Consonant of type 1, that has subscript form */
+ Mymr_CC_CONSONANT2 = 2, /* Consonant of type 2, that has no subscript form */
+ Mymr_CC_NGA = 3, /* Consonant NGA */
+ Mymr_CC_YA = 4, /* Consonant YA */
+ Mymr_CC_RA = 5, /* Consonant RA */
+ Mymr_CC_WA = 6, /* Consonant WA */
+ Mymr_CC_HA = 7, /* Consonant HA */
+ Mymr_CC_IND_VOWEL = 8, /* Independent vowel */
+ Mymr_CC_ZERO_WIDTH_NJ_MARK = 9, /* Zero Width non joiner character (0x200C) */
+ Mymr_CC_VIRAMA = 10, /* Subscript consonant combining character */
+ Mymr_CC_PRE_VOWEL = 11, /* Dependent vowel, prebase (Vowel e) */
+ Mymr_CC_BELOW_VOWEL = 12, /* Dependent vowel, prebase (Vowel u, uu) */
+ Mymr_CC_ABOVE_VOWEL = 13, /* Dependent vowel, prebase (Vowel i, ii, ai) */
+ Mymr_CC_POST_VOWEL = 14, /* Dependent vowel, prebase (Vowel aa) */
+ Mymr_CC_SIGN_ABOVE = 15,
+ Mymr_CC_SIGN_BELOW = 16,
+ Mymr_CC_SIGN_AFTER = 17,
+ Mymr_CC_ZERO_WIDTH_J_MARK = 18, /* Zero width joiner character */
+ Mymr_CC_COUNT = 19 /* This is the number of character classes */
+};
+
+enum MymrCharClassFlags
+{
+ Mymr_CF_CLASS_MASK = 0x0000FFFF,
+
+ Mymr_CF_CONSONANT = 0x01000000, /* flag to speed up comparing */
+ Mymr_CF_MEDIAL = 0x02000000, /* flag to speed up comparing */
+ Mymr_CF_IND_VOWEL = 0x04000000, /* flag to speed up comparing */
+ Mymr_CF_DEP_VOWEL = 0x08000000, /* flag to speed up comparing */
+ Mymr_CF_DOTTED_CIRCLE = 0x10000000, /* add a dotted circle if a character with this flag is the first in a syllable */
+ Mymr_CF_VIRAMA = 0x20000000, /* flag to speed up comparing */
+
+ /* position flags */
+ Mymr_CF_POS_BEFORE = 0x00080000,
+ Mymr_CF_POS_BELOW = 0x00040000,
+ Mymr_CF_POS_ABOVE = 0x00020000,
+ Mymr_CF_POS_AFTER = 0x00010000,
+ Mymr_CF_POS_MASK = 0x000f0000,
+
+ Mymr_CF_AFTER_KINZI = 0x00100000
+};
+
+/* Characters that get refrered to by name */
+enum MymrChar
+{
+ Mymr_C_SIGN_ZWNJ = 0x200C,
+ Mymr_C_SIGN_ZWJ = 0x200D,
+ Mymr_C_DOTTED_CIRCLE = 0x25CC,
+ Mymr_C_RA = 0x101B,
+ Mymr_C_YA = 0x101A,
+ Mymr_C_NGA = 0x1004,
+ Mymr_C_VOWEL_E = 0x1031,
+ Mymr_C_VIRAMA = 0x1039
+};
+
+enum
+{
+ Mymr_xx = Mymr_CC_RESERVED,
+ Mymr_c1 = Mymr_CC_CONSONANT | Mymr_CF_CONSONANT | Mymr_CF_POS_BELOW,
+ Mymr_c2 = Mymr_CC_CONSONANT2 | Mymr_CF_CONSONANT,
+ Mymr_ng = Mymr_CC_NGA | Mymr_CF_CONSONANT | Mymr_CF_POS_ABOVE,
+ Mymr_ya = Mymr_CC_YA | Mymr_CF_CONSONANT | Mymr_CF_MEDIAL | Mymr_CF_POS_AFTER | Mymr_CF_AFTER_KINZI,
+ Mymr_ra = Mymr_CC_RA | Mymr_CF_CONSONANT | Mymr_CF_MEDIAL | Mymr_CF_POS_BEFORE,
+ Mymr_wa = Mymr_CC_WA | Mymr_CF_CONSONANT | Mymr_CF_MEDIAL | Mymr_CF_POS_BELOW,
+ Mymr_ha = Mymr_CC_HA | Mymr_CF_CONSONANT | Mymr_CF_MEDIAL | Mymr_CF_POS_BELOW,
+ Mymr_id = Mymr_CC_IND_VOWEL | Mymr_CF_IND_VOWEL,
+ Mymr_vi = Mymr_CC_VIRAMA | Mymr_CF_VIRAMA | Mymr_CF_POS_ABOVE | Mymr_CF_DOTTED_CIRCLE,
+ Mymr_dl = Mymr_CC_PRE_VOWEL | Mymr_CF_DEP_VOWEL | Mymr_CF_POS_BEFORE | Mymr_CF_DOTTED_CIRCLE | Mymr_CF_AFTER_KINZI,
+ Mymr_db = Mymr_CC_BELOW_VOWEL | Mymr_CF_DEP_VOWEL | Mymr_CF_POS_BELOW | Mymr_CF_DOTTED_CIRCLE | Mymr_CF_AFTER_KINZI,
+ Mymr_da = Mymr_CC_ABOVE_VOWEL | Mymr_CF_DEP_VOWEL | Mymr_CF_POS_ABOVE | Mymr_CF_DOTTED_CIRCLE | Mymr_CF_AFTER_KINZI,
+ Mymr_dr = Mymr_CC_POST_VOWEL | Mymr_CF_DEP_VOWEL | Mymr_CF_POS_AFTER | Mymr_CF_DOTTED_CIRCLE | Mymr_CF_AFTER_KINZI,
+ Mymr_sa = Mymr_CC_SIGN_ABOVE | Mymr_CF_DOTTED_CIRCLE | Mymr_CF_POS_ABOVE | Mymr_CF_AFTER_KINZI,
+ Mymr_sb = Mymr_CC_SIGN_BELOW | Mymr_CF_DOTTED_CIRCLE | Mymr_CF_POS_BELOW | Mymr_CF_AFTER_KINZI,
+ Mymr_sp = Mymr_CC_SIGN_AFTER | Mymr_CF_DOTTED_CIRCLE | Mymr_CF_AFTER_KINZI
+};
+
+
+typedef int MymrCharClass;
+
+
+static const MymrCharClass mymrCharClasses[] =
+{
+ Mymr_c1, Mymr_c1, Mymr_c1, Mymr_c1, Mymr_ng, Mymr_c1, Mymr_c1, Mymr_c1,
+ Mymr_c1, Mymr_c1, Mymr_c2, Mymr_c1, Mymr_c1, Mymr_c1, Mymr_c1, Mymr_c1, /* 1000 - 100F */
+ Mymr_c1, Mymr_c1, Mymr_c1, Mymr_c1, Mymr_c1, Mymr_c1, Mymr_c1, Mymr_c1,
+ Mymr_c1, Mymr_c1, Mymr_ya, Mymr_ra, Mymr_c1, Mymr_wa, Mymr_c1, Mymr_ha, /* 1010 - 101F */
+ Mymr_c2, Mymr_c2, Mymr_xx, Mymr_id, Mymr_id, Mymr_id, Mymr_id, Mymr_id,
+ Mymr_xx, Mymr_id, Mymr_id, Mymr_xx, Mymr_dr, Mymr_da, Mymr_da, Mymr_db, /* 1020 - 102F */
+ Mymr_db, Mymr_dl, Mymr_da, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_sa, Mymr_sb,
+ Mymr_sp, Mymr_vi, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, /* 1030 - 103F */
+ Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx,
+ Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, /* 1040 - 104F */
+ Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx,
+ Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, Mymr_xx, /* 1050 - 105F */
+};
+
+static MymrCharClass
+getMyanmarCharClass (HB_UChar16 ch)
+{
+ if (ch == Mymr_C_SIGN_ZWJ)
+ return Mymr_CC_ZERO_WIDTH_J_MARK;
+
+ if (ch == Mymr_C_SIGN_ZWNJ)
+ return Mymr_CC_ZERO_WIDTH_NJ_MARK;
+
+ if (ch < 0x1000 || ch > 0x105f)
+ return Mymr_CC_RESERVED;
+
+ return mymrCharClasses[ch - 0x1000];
+}
+
+static const signed char mymrStateTable[][Mymr_CC_COUNT] =
+{
+/* xx c1, c2 ng ya ra wa ha id zwnj vi dl db da dr sa sb sp zwj */
+ { 1, 4, 4, 2, 4, 4, 4, 4, 24, 1, 27, 17, 18, 19, 20, 21, 1, 1, 4}, /* 0 - ground state */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, /* 1 - exit state (or sp to the right of the syllable) */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 17, 18, 19, 20, 21, -1, -1, 4}, /* 2 - NGA */
+ {-1, 4, 4, 4, 4, 4, 4, 4, -1, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1}, /* 3 - Virama after NGA */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, 17, 18, 19, 20, 21, 1, 1, -1}, /* 4 - Base consonant */
+ {-2, 6, -2, -2, 7, 8, 9, 10, -2, 23, -2, -2, -2, -2, -2, -2, -2, -2, -2}, /* 5 - First virama */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 25, 17, 18, 19, 20, 21, -1, -1, -1}, /* 6 - c1 after virama */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, 17, 18, 19, 20, 21, -1, -1, -1}, /* 7 - ya after virama */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, 17, 18, 19, 20, 21, -1, -1, -1}, /* 8 - ra after virama */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, 17, 18, 19, 20, 21, -1, -1, -1}, /* 9 - wa after virama */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 17, 18, 19, 20, 21, -1, -1, -1}, /* 10 - ha after virama */
+ {-1, -1, -1, -1, 7, 8, 9, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, /* 11 - Virama after NGA+zwj */
+ {-2, -2, -2, -2, -2, -2, 13, 14, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2}, /* 12 - Second virama */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 15, 17, 18, 19, 20, 21, -1, -1, -1}, /* 13 - wa after virama */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 17, 18, 19, 20, 21, -1, -1, -1}, /* 14 - ha after virama */
+ {-2, -2, -2, -2, -2, -2, -2, 16, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2}, /* 15 - Third virama */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 17, 18, 19, 20, 21, -1, -1, -1}, /* 16 - ha after virama */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, 21, 1, 1, -1}, /* 17 - dl, Dependent vowel e */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 19, -1, 21, 1, 1, -1}, /* 18 - db, Dependent vowel u,uu */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1}, /* 19 - da, Dependent vowel i,ii,ai */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, 1, 1, -1}, /* 20 - dr, Dependent vowel aa */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1}, /* 21 - sa, Sign anusvara */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1}, /* 22 - atha */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1}, /* 23 - zwnj for atha */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1}, /* 24 - Independent vowel */
+ {-2, -2, -2, -2, 26, 26, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2}, /* 25 - Virama after subscript consonant */
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, 17, 18, 19, 20, 21, -1, 1, -1}, /* 26 - ra/ya after subscript consonant + virama */
+ {-1, 6, -1, -1, 7, 8, 9, 10, -1, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1}, /* 27 - Virama after ground state */
+/* exit state -2 is for invalid order of medials and combination of invalids
+ with virama where virama should treat as start of next syllable
+ */
+};
+
+
+
+/*#define MYANMAR_DEBUG */
+#ifdef MYANMAR_DEBUG
+#define MMDEBUG qDebug
+#else
+#define MMDEBUG if(0) printf
+#endif
+
+/*
+// Given an input string of characters and a location in which to start looking
+// calculate, using the state table, which one is the last character of the syllable
+// that starts in the starting position.
+*/
+static int myanmar_nextSyllableBoundary(const HB_UChar16 *s, int start, int end, HB_Bool *invalid)
+{
+ const HB_UChar16 *uc = s + start;
+ int state = 0;
+ int pos = start;
+ *invalid = FALSE;
+
+ while (pos < end) {
+ MymrCharClass charClass = getMyanmarCharClass(*uc);
+ state = mymrStateTable[state][charClass & Mymr_CF_CLASS_MASK];
+ if (pos == start)
+ *invalid = (HB_Bool)(charClass & Mymr_CF_DOTTED_CIRCLE);
+
+ MMDEBUG("state[%d]=%d class=%8x (uc=%4x)", pos - start, state, charClass, *uc);
+
+ if (state < 0) {
+ if (state < -1)
+ --pos;
+ break;
+ }
+ ++uc;
+ ++pos;
+ }
+ return pos;
+}
+
+#ifndef NO_OPENTYPE
+/* ###### might have to change order of above and below forms and substitutions,
+ but according to Unicode below comes before above */
+static const HB_OpenTypeFeature myanmar_features[] = {
+ { HB_MAKE_TAG('p', 'r', 'e', 'f'), PreFormProperty },
+ { HB_MAKE_TAG('b', 'l', 'w', 'f'), BelowFormProperty },
+ { HB_MAKE_TAG('a', 'b', 'v', 'f'), AboveFormProperty },
+ { HB_MAKE_TAG('p', 's', 't', 'f'), PostFormProperty },
+ { HB_MAKE_TAG('p', 'r', 'e', 's'), PreSubstProperty },
+ { HB_MAKE_TAG('b', 'l', 'w', 's'), BelowSubstProperty },
+ { HB_MAKE_TAG('a', 'b', 'v', 's'), AboveSubstProperty },
+ { HB_MAKE_TAG('p', 's', 't', 's'), PostSubstProperty },
+ { HB_MAKE_TAG('r', 'l', 'i', 'g'), CligProperty }, /* Myanmar1 uses this instead of the other features */
+ { 0, 0 }
+};
+#endif
+
+
+/*
+// Visual order before shaping should be:
+//
+// [Vowel Mark E]
+// [Virama + Medial Ra]
+// [Base]
+// [Virama + Consonant]
+// [Nga + Virama] (Kinzi) ### should probably come before post forms (medial ya)
+// [Vowels]
+// [Marks]
+//
+// This means that we can keep the logical order apart from having to
+// move the pre vowel, medial ra and kinzi
+*/
+
+static HB_Bool myanmar_shape_syllable(HB_Bool openType, HB_ShaperItem *item, HB_Bool invalid)
+{
+ /*
+// MMDEBUG("\nsyllable from %d len %d, str='%s'", item->item.pos, item->item.length,
+// item->string->mid(item->from, item->length).toUtf8().data());
+ */
+
+#ifndef NO_OPENTYPE
+ const int availableGlyphs = item->num_glyphs;
+#endif
+ const HB_UChar16 *uc = item->string + item->item.pos;
+ int vowel_e = -1;
+ int kinzi = -1;
+ int medial_ra = -1;
+ int base = -1;
+ int i;
+ int len = 0;
+ unsigned short reordered[32];
+ unsigned char properties[32];
+ enum {
+ AboveForm = 0x01,
+ PreForm = 0x02,
+ PostForm = 0x04,
+ BelowForm = 0x08
+ };
+ HB_Bool lastWasVirama = FALSE;
+ int basePos = -1;
+
+ memset(properties, 0, 32*sizeof(unsigned char));
+
+ /* according to the table the max length of a syllable should be around 14 chars */
+ assert(item->item.length < 32);
+
+#ifdef MYANMAR_DEBUG
+ printf("original:");
+ for (i = 0; i < (int)item->item.length; i++) {
+ printf(" %d: %4x", i, uc[i]);
+ }
+#endif
+ for (i = 0; i < (int)item->item.length; ++i) {
+ HB_UChar16 chr = uc[i];
+
+ if (chr == Mymr_C_VOWEL_E) {
+ vowel_e = i;
+ continue;
+ }
+ if (i == 0
+ && chr == Mymr_C_NGA
+ && i + 2 < (int)item->item.length
+ && uc[i+1] == Mymr_C_VIRAMA) {
+ int mc = getMyanmarCharClass(uc[i+2]);
+ /*MMDEBUG("maybe kinzi: mc=%x", mc);*/
+ if ((mc & Mymr_CF_CONSONANT) == Mymr_CF_CONSONANT) {
+ kinzi = i;
+ continue;
+ }
+ }
+ if (base >= 0
+ && chr == Mymr_C_VIRAMA
+ && i + 1 < (int)item->item.length
+ && uc[i+1] == Mymr_C_RA) {
+ medial_ra = i;
+ continue;
+ }
+ if (base < 0)
+ base = i;
+ }
+
+ MMDEBUG("\n base=%d, vowel_e=%d, kinzi=%d, medial_ra=%d", base, vowel_e, kinzi, medial_ra);
+ /* write vowel_e if found */
+ if (vowel_e >= 0) {
+ reordered[0] = Mymr_C_VOWEL_E;
+ len = 1;
+ }
+ /* write medial_ra */
+ if (medial_ra >= 0) {
+ reordered[len] = Mymr_C_VIRAMA;
+ reordered[len+1] = Mymr_C_RA;
+ properties[len] = PreForm;
+ properties[len+1] = PreForm;
+ len += 2;
+ }
+
+ /* shall we add a dotted circle?
+ If in the position in which the base should be (first char in the string) there is
+ a character that has the Dotted circle flag (a character that cannot be a base)
+ then write a dotted circle */
+ if (invalid) {
+ reordered[len] = C_DOTTED_CIRCLE;
+ ++len;
+ }
+
+ /* copy the rest of the syllable to the output, inserting the kinzi
+ at the correct place */
+ for (i = 0; i < (int)item->item.length; ++i) {
+ hb_uint16 chr = uc[i];
+ MymrCharClass cc;
+ if (i == vowel_e)
+ continue;
+ if (i == medial_ra || i == kinzi) {
+ ++i;
+ continue;
+ }
+
+ cc = getMyanmarCharClass(uc[i]);
+ if (kinzi >= 0 && i > base && (cc & Mymr_CF_AFTER_KINZI)) {
+ reordered[len] = Mymr_C_NGA;
+ reordered[len+1] = Mymr_C_VIRAMA;
+ if (len > 0)
+ properties[len-1] = AboveForm;
+ properties[len] = AboveForm;
+ len += 2;
+ kinzi = -1;
+ }
+
+ if (lastWasVirama) {
+ int prop = 0;
+ switch(cc & Mymr_CF_POS_MASK) {
+ case Mymr_CF_POS_BEFORE:
+ prop = PreForm;
+ break;
+ case Mymr_CF_POS_BELOW:
+ prop = BelowForm;
+ break;
+ case Mymr_CF_POS_ABOVE:
+ prop = AboveForm;
+ break;
+ case Mymr_CF_POS_AFTER:
+ prop = PostForm;
+ break;
+ default:
+ break;
+ }
+ properties[len-1] = prop;
+ properties[len] = prop;
+ if(basePos >= 0 && basePos == len-2)
+ properties[len-2] = prop;
+ }
+ lastWasVirama = (chr == Mymr_C_VIRAMA);
+ if(i == base)
+ basePos = len;
+
+ if ((chr != Mymr_C_SIGN_ZWNJ && chr != Mymr_C_SIGN_ZWJ) || !len) {
+ reordered[len] = chr;
+ ++len;
+ }
+ }
+ if (kinzi >= 0) {
+ reordered[len] = Mymr_C_NGA;
+ reordered[len+1] = Mymr_C_VIRAMA;
+ properties[len] = AboveForm;
+ properties[len+1] = AboveForm;
+ len += 2;
+ }
+
+ if (!item->font->klass->convertStringToGlyphIndices(item->font,
+ reordered, len,
+ item->glyphs, &item->num_glyphs,
+ item->item.bidiLevel % 2))
+ return FALSE;
+
+ MMDEBUG("after shaping: len=%d", len);
+ for (i = 0; i < len; i++) {
+ item->attributes[i].mark = FALSE;
+ item->attributes[i].clusterStart = FALSE;
+ item->attributes[i].justification = 0;
+ item->attributes[i].zeroWidth = FALSE;
+ MMDEBUG(" %d: %4x property=%x", i, reordered[i], properties[i]);
+ }
+
+ /* now we have the syllable in the right order, and can start running it through open type. */
+
+#ifndef NO_OPENTYPE
+ if (openType) {
+ hb_uint32 where[32];
+
+ for (i = 0; i < len; ++i) {
+ where[i] = ~(PreSubstProperty
+ | BelowSubstProperty
+ | AboveSubstProperty
+ | PostSubstProperty
+ | CligProperty
+ | PositioningProperties);
+ if (properties[i] & PreForm)
+ where[i] &= ~PreFormProperty;
+ if (properties[i] & BelowForm)
+ where[i] &= ~BelowFormProperty;
+ if (properties[i] & AboveForm)
+ where[i] &= ~AboveFormProperty;
+ if (properties[i] & PostForm)
+ where[i] &= ~PostFormProperty;
+ }
+
+ HB_OpenTypeShape(item, where);
+ if (!HB_OpenTypePosition(item, availableGlyphs, /*doLogClusters*/FALSE))
+ return FALSE;
+ } else
+#endif
+ {
+ MMDEBUG("Not using openType");
+ HB_HeuristicPosition(item);
+ }
+
+ item->attributes[0].clusterStart = TRUE;
+ return TRUE;
+}
+
+HB_Bool HB_MyanmarShape(HB_ShaperItem *item)
+{
+ HB_Bool openType = FALSE;
+ unsigned short *logClusters = item->log_clusters;
+
+ HB_ShaperItem syllable = *item;
+ int first_glyph = 0;
+
+ int sstart = item->item.pos;
+ int end = sstart + item->item.length;
+ int i = 0;
+
+ assert(item->item.script == HB_Script_Myanmar);
+#ifndef NO_OPENTYPE
+ openType = HB_SelectScript(item, myanmar_features);
+#endif
+
+ MMDEBUG("myanmar_shape: from %d length %d", item->item.pos, item->item.length);
+ while (sstart < end) {
+ HB_Bool invalid;
+ int send = myanmar_nextSyllableBoundary(item->string, sstart, end, &invalid);
+ MMDEBUG("syllable from %d, length %d, invalid=%s", sstart, send-sstart,
+ invalid ? "TRUE" : "FALSE");
+ syllable.item.pos = sstart;
+ syllable.item.length = send-sstart;
+ syllable.glyphs = item->glyphs + first_glyph;
+ syllable.attributes = item->attributes + first_glyph;
+ syllable.advances = item->advances + first_glyph;
+ syllable.offsets = item->offsets + first_glyph;
+ syllable.num_glyphs = item->num_glyphs - first_glyph;
+ if (!myanmar_shape_syllable(openType, &syllable, invalid)) {
+ MMDEBUG("syllable shaping failed, syllable requests %d glyphs", syllable.num_glyphs);
+ item->num_glyphs += syllable.num_glyphs;
+ return FALSE;
+ }
+
+ /* fix logcluster array */
+ MMDEBUG("syllable:");
+ for (i = first_glyph; i < first_glyph + (int)syllable.num_glyphs; ++i)
+ MMDEBUG(" %d -> glyph %x", i, item->glyphs[i]);
+ MMDEBUG(" logclusters:");
+ for (i = sstart; i < send; ++i) {
+ MMDEBUG(" %d -> glyph %d", i, first_glyph);
+ logClusters[i-item->item.pos] = first_glyph;
+ }
+ sstart = send;
+ first_glyph += syllable.num_glyphs;
+ }
+ item->num_glyphs = first_glyph;
+ return TRUE;
+}
diff --git a/src/hb-old/harfbuzz-open-private.h b/src/hb-old/harfbuzz-open-private.h
new file mode 100644
index 0000000..f1ca278
--- /dev/null
+++ b/src/hb-old/harfbuzz-open-private.h
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 1998-2004 David Turner and Werner Lemberg
+ * Copyright (C) 2006 Behdad Esfahbod
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#ifndef HARFBUZZ_OPEN_PRIVATE_H
+#define HARFBUZZ_OPEN_PRIVATE_H
+
+#include "harfbuzz-impl.h"
+#include "harfbuzz-open.h"
+#include "harfbuzz-gsub-private.h"
+#include "harfbuzz-gpos-private.h"
+
+HB_BEGIN_HEADER
+
+
+struct HB_SubTable_
+{
+ union
+ {
+ HB_GSUB_SubTable gsub;
+ HB_GPOS_SubTable gpos;
+ } st;
+};
+
+
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_ScriptList( HB_ScriptList* sl,
+ HB_Stream input );
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_FeatureList( HB_FeatureList* fl,
+ HB_Stream input );
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_LookupList( HB_LookupList* ll,
+ HB_Stream input,
+ HB_Type type );
+
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_Coverage( HB_Coverage* c,
+ HB_Stream input );
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_ClassDefinition( HB_ClassDefinition* cd,
+ HB_UShort limit,
+ HB_Stream input );
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_EmptyOrClassDefinition( HB_ClassDefinition* cd,
+ HB_UShort limit,
+ HB_UInt class_offset,
+ HB_UInt base_offset,
+ HB_Stream input );
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_Device( HB_Device** d,
+ HB_Stream input );
+
+HB_INTERNAL void _HB_OPEN_Free_ScriptList( HB_ScriptList* sl );
+HB_INTERNAL void _HB_OPEN_Free_FeatureList( HB_FeatureList* fl );
+HB_INTERNAL void _HB_OPEN_Free_LookupList( HB_LookupList* ll,
+ HB_Type type );
+
+HB_INTERNAL void _HB_OPEN_Free_Coverage( HB_Coverage* c );
+HB_INTERNAL void _HB_OPEN_Free_ClassDefinition( HB_ClassDefinition* cd );
+HB_INTERNAL void _HB_OPEN_Free_Device( HB_Device* d );
+
+
+
+HB_INTERNAL HB_Error
+_HB_OPEN_Coverage_Index( HB_Coverage* c,
+ HB_UShort glyphID,
+ HB_UShort* index );
+HB_INTERNAL HB_Error
+_HB_OPEN_Get_Class( HB_ClassDefinition* cd,
+ HB_UShort glyphID,
+ HB_UShort* klass,
+ HB_UShort* index );
+HB_INTERNAL HB_Error
+_HB_OPEN_Get_Device( HB_Device* d,
+ HB_UShort size,
+ HB_Short* value );
+
+HB_END_HEADER
+
+#endif /* HARFBUZZ_OPEN_PRIVATE_H */
diff --git a/src/hb-old/harfbuzz-open.c b/src/hb-old/harfbuzz-open.c
new file mode 100644
index 0000000..f12f5b7
--- /dev/null
+++ b/src/hb-old/harfbuzz-open.c
@@ -0,0 +1,1433 @@
+/*
+ * Copyright (C) 1998-2004 David Turner and Werner Lemberg
+ * Copyright (C) 2006 Behdad Esfahbod
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#include "harfbuzz-impl.h"
+#include "harfbuzz-open-private.h"
+
+
+/***************************
+ * Script related functions
+ ***************************/
+
+
+/* LangSys */
+
+static HB_Error Load_LangSys( HB_LangSys* ls,
+ HB_Stream stream )
+{
+ HB_Error error;
+ HB_UShort n, count;
+ HB_UShort* fi;
+
+
+ if ( ACCESS_Frame( 6L ) )
+ return error;
+
+ ls->LookupOrderOffset = GET_UShort(); /* should be 0 */
+ ls->ReqFeatureIndex = GET_UShort();
+ count = ls->FeatureCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ls->FeatureIndex = NULL;
+
+ if ( ALLOC_ARRAY( ls->FeatureIndex, count, HB_UShort ) )
+ return error;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ {
+ FREE( ls->FeatureIndex );
+ return error;
+ }
+
+ fi = ls->FeatureIndex;
+
+ for ( n = 0; n < count; n++ )
+ fi[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+}
+
+
+static void Free_LangSys( HB_LangSys* ls )
+{
+ FREE( ls->FeatureIndex );
+}
+
+
+/* Script */
+
+static HB_Error Load_Script( HB_ScriptTable* s,
+ HB_Stream stream )
+{
+ HB_Error error;
+ HB_UShort n, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_LangSysRecord* lsr;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ if ( new_offset != base_offset ) /* not a NULL offset */
+ {
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_LangSys( &s->DefaultLangSys,
+ stream ) ) != HB_Err_Ok )
+ return error;
+ (void)FILE_Seek( cur_offset );
+ }
+ else
+ {
+ /* we create a DefaultLangSys table with no entries */
+
+ s->DefaultLangSys.LookupOrderOffset = 0;
+ s->DefaultLangSys.ReqFeatureIndex = 0xFFFF;
+ s->DefaultLangSys.FeatureCount = 0;
+ s->DefaultLangSys.FeatureIndex = NULL;
+ }
+
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail2;
+
+ count = s->LangSysCount = GET_UShort();
+
+ /* safety check; otherwise the official handling of TrueType Open
+ fonts won't work */
+
+ if ( s->LangSysCount == 0 && s->DefaultLangSys.FeatureCount == 0 )
+ {
+ error = HB_Err_Not_Covered;
+ goto Fail2;
+ }
+
+ FORGET_Frame();
+
+ s->LangSysRecord = NULL;
+
+ if ( ALLOC_ARRAY( s->LangSysRecord, count, HB_LangSysRecord ) )
+ goto Fail2;
+
+ lsr = s->LangSysRecord;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 6L ) )
+ goto Fail1;
+
+ lsr[n].LangSysTag = GET_ULong();
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_LangSys( &lsr[n].LangSys, stream ) ) != HB_Err_Ok )
+ goto Fail1;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail1:
+ for ( m = 0; m < n; m++ )
+ Free_LangSys( &lsr[m].LangSys );
+
+ FREE( s->LangSysRecord );
+
+Fail2:
+ Free_LangSys( &s->DefaultLangSys );
+ return error;
+}
+
+
+static void Free_Script( HB_ScriptTable* s )
+{
+ HB_UShort n, count;
+
+ HB_LangSysRecord* lsr;
+
+
+ Free_LangSys( &s->DefaultLangSys );
+
+ if ( s->LangSysRecord )
+ {
+ count = s->LangSysCount;
+ lsr = s->LangSysRecord;
+
+ for ( n = 0; n < count; n++ )
+ Free_LangSys( &lsr[n].LangSys );
+
+ FREE( lsr );
+ }
+}
+
+
+/* ScriptList */
+
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_ScriptList( HB_ScriptList* sl,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, script_count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_ScriptRecord* sr;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ script_count = GET_UShort();
+
+ FORGET_Frame();
+
+ sl->ScriptRecord = NULL;
+
+ if ( ALLOC_ARRAY( sl->ScriptRecord, script_count, HB_ScriptRecord ) )
+ return error;
+
+ sr = sl->ScriptRecord;
+
+ sl->ScriptCount= 0;
+ for ( n = 0; n < script_count; n++ )
+ {
+ if ( ACCESS_Frame( 6L ) )
+ goto Fail;
+
+ sr[sl->ScriptCount].ScriptTag = GET_ULong();
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+
+ if ( FILE_Seek( new_offset ) )
+ goto Fail;
+
+ error = Load_Script( &sr[sl->ScriptCount].Script, stream );
+ if ( error == HB_Err_Ok )
+ sl->ScriptCount += 1;
+ else if ( error != HB_Err_Not_Covered )
+ goto Fail;
+
+ (void)FILE_Seek( cur_offset );
+ }
+
+ /* Empty tables are harmless and generated by fontforge.
+ * See http://bugzilla.gnome.org/show_bug.cgi?id=347073
+ */
+#if 0
+ if ( sl->ScriptCount == 0 )
+ {
+ error = ERR(HB_Err_Invalid_SubTable);
+ goto Fail;
+ }
+#endif
+
+ return HB_Err_Ok;
+
+Fail:
+ for ( n = 0; n < sl->ScriptCount; n++ )
+ Free_Script( &sr[n].Script );
+
+ FREE( sl->ScriptRecord );
+ return error;
+}
+
+
+HB_INTERNAL void
+_HB_OPEN_Free_ScriptList( HB_ScriptList* sl )
+{
+ HB_UShort n, count;
+
+ HB_ScriptRecord* sr;
+
+
+ if ( sl->ScriptRecord )
+ {
+ count = sl->ScriptCount;
+ sr = sl->ScriptRecord;
+
+ for ( n = 0; n < count; n++ )
+ Free_Script( &sr[n].Script );
+
+ FREE( sr );
+ }
+}
+
+
+
+/*********************************
+ * Feature List related functions
+ *********************************/
+
+
+/* Feature */
+
+static HB_Error Load_Feature( HB_Feature* f,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, count;
+
+ HB_UShort* lli;
+
+
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+ f->FeatureParams = GET_UShort(); /* should be 0 */
+ count = f->LookupListCount = GET_UShort();
+
+ FORGET_Frame();
+
+ f->LookupListIndex = NULL;
+
+ if ( ALLOC_ARRAY( f->LookupListIndex, count, HB_UShort ) )
+ return error;
+
+ lli = f->LookupListIndex;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ {
+ FREE( f->LookupListIndex );
+ return error;
+ }
+
+ for ( n = 0; n < count; n++ )
+ lli[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+}
+
+
+static void Free_Feature( HB_Feature* f )
+{
+ FREE( f->LookupListIndex );
+}
+
+
+/* FeatureList */
+
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_FeatureList( HB_FeatureList* fl,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_FeatureRecord* fr;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = fl->FeatureCount = GET_UShort();
+
+ FORGET_Frame();
+
+ fl->FeatureRecord = NULL;
+
+ if ( ALLOC_ARRAY( fl->FeatureRecord, count, HB_FeatureRecord ) )
+ return error;
+ if ( ALLOC_ARRAY( fl->ApplyOrder, count, HB_UShort ) )
+ goto Fail2;
+
+ fl->ApplyCount = 0;
+
+ fr = fl->FeatureRecord;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 6L ) )
+ goto Fail1;
+
+ fr[n].FeatureTag = GET_ULong();
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_Feature( &fr[n].Feature, stream ) ) != HB_Err_Ok )
+ goto Fail1;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail1:
+ for ( m = 0; m < n; m++ )
+ Free_Feature( &fr[m].Feature );
+
+ FREE( fl->ApplyOrder );
+
+Fail2:
+ FREE( fl->FeatureRecord );
+
+ return error;
+}
+
+
+HB_INTERNAL void
+_HB_OPEN_Free_FeatureList( HB_FeatureList* fl )
+{
+ HB_UShort n, count;
+
+ HB_FeatureRecord* fr;
+
+
+ if ( fl->FeatureRecord )
+ {
+ count = fl->FeatureCount;
+ fr = fl->FeatureRecord;
+
+ for ( n = 0; n < count; n++ )
+ Free_Feature( &fr[n].Feature );
+
+ FREE( fr );
+ }
+
+ FREE( fl->ApplyOrder );
+}
+
+
+
+/********************************
+ * Lookup List related functions
+ ********************************/
+
+/* the subroutines of the following two functions are defined in
+ ftxgsub.c and ftxgpos.c respectively */
+
+
+/* SubTable */
+
+static HB_Error Load_SubTable( HB_SubTable* st,
+ HB_Stream stream,
+ HB_Type table_type,
+ HB_UShort lookup_type )
+{
+ if ( table_type == HB_Type_GSUB )
+ return _HB_GSUB_Load_SubTable ( &st->st.gsub, stream, lookup_type );
+ else
+ return _HB_GPOS_Load_SubTable ( &st->st.gpos, stream, lookup_type );
+}
+
+
+static void Free_SubTable( HB_SubTable* st,
+ HB_Type table_type,
+ HB_UShort lookup_type )
+{
+ if ( table_type == HB_Type_GSUB )
+ _HB_GSUB_Free_SubTable ( &st->st.gsub, lookup_type );
+ else
+ _HB_GPOS_Free_SubTable ( &st->st.gpos, lookup_type );
+}
+
+
+/* Lookup */
+
+static HB_Error Load_Lookup( HB_Lookup* l,
+ HB_Stream stream,
+ HB_Type type )
+{
+ HB_Error error;
+
+ HB_UShort n, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_SubTable* st;
+
+ HB_Bool is_extension = FALSE;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 6L ) )
+ return error;
+
+ l->LookupType = GET_UShort();
+ l->LookupFlag = GET_UShort();
+ count = l->SubTableCount = GET_UShort();
+
+ FORGET_Frame();
+
+ l->SubTable = NULL;
+
+ if ( ALLOC_ARRAY( l->SubTable, count, HB_SubTable ) )
+ return error;
+
+ st = l->SubTable;
+
+ if ( ( type == HB_Type_GSUB && l->LookupType == HB_GSUB_LOOKUP_EXTENSION ) ||
+ ( type == HB_Type_GPOS && l->LookupType == HB_GPOS_LOOKUP_EXTENSION ) )
+ is_extension = TRUE;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+
+ if ( is_extension )
+ {
+ if ( FILE_Seek( new_offset ) || ACCESS_Frame( 8L ) )
+ goto Fail;
+
+ if (GET_UShort() != 1) /* format should be 1 */
+ goto Fail;
+
+ l->LookupType = GET_UShort();
+ new_offset += GET_ULong();
+
+ FORGET_Frame();
+ }
+
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_SubTable( &st[n], stream,
+ type, l->LookupType ) ) != HB_Err_Ok )
+ goto Fail;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail:
+ for ( m = 0; m < n; m++ )
+ Free_SubTable( &st[m], type, l->LookupType );
+
+ FREE( l->SubTable );
+ return error;
+}
+
+
+static void Free_Lookup( HB_Lookup* l,
+ HB_Type type)
+{
+ HB_UShort n, count;
+
+ HB_SubTable* st;
+
+
+ if ( l->SubTable )
+ {
+ count = l->SubTableCount;
+ st = l->SubTable;
+
+ for ( n = 0; n < count; n++ )
+ Free_SubTable( &st[n], type, l->LookupType );
+
+ FREE( st );
+ }
+}
+
+
+/* LookupList */
+
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_LookupList( HB_LookupList* ll,
+ HB_Stream stream,
+ HB_Type type )
+{
+ HB_Error error;
+
+ HB_UShort n, m, count;
+ HB_UInt cur_offset, new_offset, base_offset;
+
+ HB_Lookup* l;
+
+
+ base_offset = FILE_Pos();
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = ll->LookupCount = GET_UShort();
+
+ FORGET_Frame();
+
+ ll->Lookup = NULL;
+
+ if ( ALLOC_ARRAY( ll->Lookup, count, HB_Lookup ) )
+ return error;
+ if ( ALLOC_ARRAY( ll->Properties, count, HB_UInt ) )
+ goto Fail2;
+
+ l = ll->Lookup;
+
+ for ( n = 0; n < count; n++ )
+ {
+ if ( ACCESS_Frame( 2L ) )
+ goto Fail1;
+
+ new_offset = GET_UShort() + base_offset;
+
+ FORGET_Frame();
+
+ cur_offset = FILE_Pos();
+ if ( FILE_Seek( new_offset ) ||
+ ( error = Load_Lookup( &l[n], stream, type ) ) != HB_Err_Ok )
+ goto Fail1;
+ (void)FILE_Seek( cur_offset );
+ }
+
+ return HB_Err_Ok;
+
+Fail1:
+ FREE( ll->Properties );
+
+ for ( m = 0; m < n; m++ )
+ Free_Lookup( &l[m], type );
+
+Fail2:
+ FREE( ll->Lookup );
+ return error;
+}
+
+
+HB_INTERNAL void
+_HB_OPEN_Free_LookupList( HB_LookupList* ll,
+ HB_Type type )
+{
+ HB_UShort n, count;
+
+ HB_Lookup* l;
+
+
+ FREE( ll->Properties );
+
+ if ( ll->Lookup )
+ {
+ count = ll->LookupCount;
+ l = ll->Lookup;
+
+ for ( n = 0; n < count; n++ )
+ Free_Lookup( &l[n], type );
+
+ FREE( l );
+ }
+}
+
+
+
+/*****************************
+ * Coverage related functions
+ *****************************/
+
+
+/* CoverageFormat1 */
+
+static HB_Error Load_Coverage1( HB_CoverageFormat1* cf1,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, count;
+
+ HB_UShort* ga;
+
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = cf1->GlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ cf1->GlyphArray = NULL;
+
+ if ( ALLOC_ARRAY( cf1->GlyphArray, count, HB_UShort ) )
+ return error;
+
+ ga = cf1->GlyphArray;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ {
+ FREE( cf1->GlyphArray );
+ return error;
+ }
+
+ for ( n = 0; n < count; n++ )
+ ga[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+}
+
+
+static void Free_Coverage1( HB_CoverageFormat1* cf1)
+{
+ FREE( cf1->GlyphArray );
+}
+
+
+/* CoverageFormat2 */
+
+static HB_Error Load_Coverage2( HB_CoverageFormat2* cf2,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, count;
+
+ HB_RangeRecord* rr;
+
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = cf2->RangeCount = GET_UShort();
+
+ FORGET_Frame();
+
+ cf2->RangeRecord = NULL;
+
+ if ( ALLOC_ARRAY( cf2->RangeRecord, count, HB_RangeRecord ) )
+ return error;
+
+ rr = cf2->RangeRecord;
+
+ if ( ACCESS_Frame( count * 6L ) )
+ goto Fail;
+
+ for ( n = 0; n < count; n++ )
+ {
+ rr[n].Start = GET_UShort();
+ rr[n].End = GET_UShort();
+ rr[n].StartCoverageIndex = GET_UShort();
+
+ /* sanity check; we are limited to 16bit integers */
+ if ( rr[n].Start > rr[n].End ||
+ ( rr[n].End - rr[n].Start + (long)rr[n].StartCoverageIndex ) >=
+ 0x10000L )
+ {
+ error = ERR(HB_Err_Invalid_SubTable);
+ goto Fail;
+ }
+ }
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+
+Fail:
+ FREE( cf2->RangeRecord );
+ return error;
+}
+
+
+static void Free_Coverage2( HB_CoverageFormat2* cf2 )
+{
+ FREE( cf2->RangeRecord );
+}
+
+
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_Coverage( HB_Coverage* c,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ c->CoverageFormat = GET_UShort();
+
+ FORGET_Frame();
+
+ switch ( c->CoverageFormat )
+ {
+ case 1: return Load_Coverage1( &c->cf.cf1, stream );
+ case 2: return Load_Coverage2( &c->cf.cf2, stream );
+ default: return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+
+ return HB_Err_Ok; /* never reached */
+}
+
+
+HB_INTERNAL void
+_HB_OPEN_Free_Coverage( HB_Coverage* c )
+{
+ switch ( c->CoverageFormat )
+ {
+ case 1: Free_Coverage1( &c->cf.cf1 ); break;
+ case 2: Free_Coverage2( &c->cf.cf2 ); break;
+ default: break;
+ }
+}
+
+
+static HB_Error Coverage_Index1( HB_CoverageFormat1* cf1,
+ HB_UShort glyphID,
+ HB_UShort* index )
+{
+ HB_UShort min, max, new_min, new_max, middle;
+
+ HB_UShort* array = cf1->GlyphArray;
+
+
+ /* binary search */
+
+ if ( cf1->GlyphCount == 0 )
+ return HB_Err_Not_Covered;
+
+ new_min = 0;
+ new_max = cf1->GlyphCount - 1;
+
+ do
+ {
+ min = new_min;
+ max = new_max;
+
+ /* we use (min + max) / 2 = max - (max - min) / 2 to avoid
+ overflow and rounding errors */
+
+ middle = max - ( ( max - min ) >> 1 );
+
+ if ( glyphID == array[middle] )
+ {
+ *index = middle;
+ return HB_Err_Ok;
+ }
+ else if ( glyphID < array[middle] )
+ {
+ if ( middle == min )
+ break;
+ new_max = middle - 1;
+ }
+ else
+ {
+ if ( middle == max )
+ break;
+ new_min = middle + 1;
+ }
+ } while ( min < max );
+
+ return HB_Err_Not_Covered;
+}
+
+
+static HB_Error Coverage_Index2( HB_CoverageFormat2* cf2,
+ HB_UShort glyphID,
+ HB_UShort* index )
+{
+ HB_UShort min, max, new_min, new_max, middle;
+
+ HB_RangeRecord* rr = cf2->RangeRecord;
+
+
+ /* binary search */
+
+ if ( cf2->RangeCount == 0 )
+ return HB_Err_Not_Covered;
+
+ new_min = 0;
+ new_max = cf2->RangeCount - 1;
+
+ do
+ {
+ min = new_min;
+ max = new_max;
+
+ /* we use (min + max) / 2 = max - (max - min) / 2 to avoid
+ overflow and rounding errors */
+
+ middle = max - ( ( max - min ) >> 1 );
+
+ if ( glyphID >= rr[middle].Start && glyphID <= rr[middle].End )
+ {
+ *index = rr[middle].StartCoverageIndex + glyphID - rr[middle].Start;
+ return HB_Err_Ok;
+ }
+ else if ( glyphID < rr[middle].Start )
+ {
+ if ( middle == min )
+ break;
+ new_max = middle - 1;
+ }
+ else
+ {
+ if ( middle == max )
+ break;
+ new_min = middle + 1;
+ }
+ } while ( min < max );
+
+ return HB_Err_Not_Covered;
+}
+
+
+HB_INTERNAL HB_Error
+_HB_OPEN_Coverage_Index( HB_Coverage* c,
+ HB_UShort glyphID,
+ HB_UShort* index )
+{
+ switch ( c->CoverageFormat )
+ {
+ case 1: return Coverage_Index1( &c->cf.cf1, glyphID, index );
+ case 2: return Coverage_Index2( &c->cf.cf2, glyphID, index );
+ default: return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+
+ return HB_Err_Ok; /* never reached */
+}
+
+
+
+/*************************************
+ * Class Definition related functions
+ *************************************/
+
+
+/* ClassDefFormat1 */
+
+static HB_Error Load_ClassDef1( HB_ClassDefinition* cd,
+ HB_UShort limit,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, count;
+
+ HB_UShort* cva;
+
+ HB_ClassDefFormat1* cdf1;
+
+
+ cdf1 = &cd->cd.cd1;
+
+ if ( ACCESS_Frame( 4L ) )
+ return error;
+
+ cdf1->StartGlyph = GET_UShort();
+ count = cdf1->GlyphCount = GET_UShort();
+
+ FORGET_Frame();
+
+ /* sanity check; we are limited to 16bit integers */
+
+ if ( cdf1->StartGlyph + (long)count >= 0x10000L )
+ return ERR(HB_Err_Invalid_SubTable);
+
+ cdf1->ClassValueArray = NULL;
+
+ if ( ALLOC_ARRAY( cdf1->ClassValueArray, count, HB_UShort ) )
+ return error;
+
+ cva = cdf1->ClassValueArray;
+
+ if ( ACCESS_Frame( count * 2L ) )
+ goto Fail;
+
+ for ( n = 0; n < count; n++ )
+ {
+ cva[n] = GET_UShort();
+ if ( cva[n] >= limit )
+ {
+ error = ERR(HB_Err_Invalid_SubTable);
+ goto Fail;
+ }
+ }
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+
+Fail:
+ FREE( cva );
+
+ return error;
+}
+
+
+static void Free_ClassDef1( HB_ClassDefFormat1* cdf1 )
+{
+ FREE( cdf1->ClassValueArray );
+}
+
+
+/* ClassDefFormat2 */
+
+static HB_Error Load_ClassDef2( HB_ClassDefinition* cd,
+ HB_UShort limit,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ HB_UShort n, count;
+
+ HB_ClassRangeRecord* crr;
+
+ HB_ClassDefFormat2* cdf2;
+
+
+ cdf2 = &cd->cd.cd2;
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ count = GET_UShort();
+ cdf2->ClassRangeCount = 0; /* zero for now. we fill with the number of good entries later */
+
+ FORGET_Frame();
+
+ cdf2->ClassRangeRecord = NULL;
+
+ if ( ALLOC_ARRAY( cdf2->ClassRangeRecord, count, HB_ClassRangeRecord ) )
+ return error;
+
+ crr = cdf2->ClassRangeRecord;
+
+ if ( ACCESS_Frame( count * 6L ) )
+ goto Fail;
+
+ for ( n = 0; n < count; n++ )
+ {
+ crr[n].Start = GET_UShort();
+ crr[n].End = GET_UShort();
+ crr[n].Class = GET_UShort();
+
+ /* sanity check */
+
+ if ( crr[n].Start > crr[n].End ||
+ crr[n].Class >= limit )
+ {
+ /* XXX
+ * Corrupt entry. Skip it.
+ * This is hit by Nafees Nastaliq font for example
+ */
+ n--;
+ count--;
+ }
+ }
+
+ FORGET_Frame();
+
+ cdf2->ClassRangeCount = count;
+
+ return HB_Err_Ok;
+
+Fail:
+ FREE( crr );
+
+ return error;
+}
+
+
+static void Free_ClassDef2( HB_ClassDefFormat2* cdf2 )
+{
+ FREE( cdf2->ClassRangeRecord );
+}
+
+
+/* ClassDefinition */
+
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_ClassDefinition( HB_ClassDefinition* cd,
+ HB_UShort limit,
+ HB_Stream stream )
+{
+ HB_Error error;
+
+ if ( ACCESS_Frame( 2L ) )
+ return error;
+
+ cd->ClassFormat = GET_UShort();
+
+ FORGET_Frame();
+
+ switch ( cd->ClassFormat )
+ {
+ case 1: error = Load_ClassDef1( cd, limit, stream ); break;
+ case 2: error = Load_ClassDef2( cd, limit, stream ); break;
+ default: error = ERR(HB_Err_Invalid_SubTable_Format); break;
+ }
+
+ if ( error )
+ return error;
+
+ cd->loaded = TRUE;
+
+ return HB_Err_Ok;
+}
+
+
+static HB_Error
+_HB_OPEN_Load_EmptyClassDefinition( HB_ClassDefinition* cd )
+{
+ HB_Error error;
+
+ cd->ClassFormat = 1; /* Meaningless */
+
+ if ( ALLOC_ARRAY( cd->cd.cd1.ClassValueArray, 1, HB_UShort ) )
+ return error;
+
+ cd->loaded = TRUE;
+
+ return HB_Err_Ok;
+}
+
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_EmptyOrClassDefinition( HB_ClassDefinition* cd,
+ HB_UShort limit,
+ HB_UInt class_offset,
+ HB_UInt base_offset,
+ HB_Stream stream )
+{
+ HB_Error error;
+ HB_UInt cur_offset;
+
+ cur_offset = FILE_Pos();
+
+ if ( class_offset )
+ {
+ if ( !FILE_Seek( class_offset + base_offset ) )
+ error = _HB_OPEN_Load_ClassDefinition( cd, limit, stream );
+ }
+ else
+ error = _HB_OPEN_Load_EmptyClassDefinition ( cd );
+
+ if (error == HB_Err_Ok)
+ (void)FILE_Seek( cur_offset ); /* Changes error as a side-effect */
+
+ return error;
+}
+
+HB_INTERNAL void
+_HB_OPEN_Free_ClassDefinition( HB_ClassDefinition* cd )
+{
+ if ( !cd->loaded )
+ return;
+
+ switch ( cd->ClassFormat )
+ {
+ case 1: Free_ClassDef1( &cd->cd.cd1 ); break;
+ case 2: Free_ClassDef2( &cd->cd.cd2 ); break;
+ default: break;
+ }
+}
+
+
+static HB_Error Get_Class1( HB_ClassDefFormat1* cdf1,
+ HB_UShort glyphID,
+ HB_UShort* klass,
+ HB_UShort* index )
+{
+ HB_UShort* cva = cdf1->ClassValueArray;
+
+
+ if ( index )
+ *index = 0;
+
+ if ( glyphID >= cdf1->StartGlyph &&
+ glyphID < cdf1->StartGlyph + cdf1->GlyphCount )
+ {
+ *klass = cva[glyphID - cdf1->StartGlyph];
+ return HB_Err_Ok;
+ }
+ else
+ {
+ *klass = 0;
+ return HB_Err_Not_Covered;
+ }
+}
+
+
+/* we need the index value of the last searched class range record
+ in case of failure for constructed GDEF tables */
+
+static HB_Error Get_Class2( HB_ClassDefFormat2* cdf2,
+ HB_UShort glyphID,
+ HB_UShort* klass,
+ HB_UShort* index )
+{
+ HB_Error error = HB_Err_Ok;
+ HB_UShort min, max, new_min, new_max, middle;
+
+ HB_ClassRangeRecord* crr = cdf2->ClassRangeRecord;
+
+
+ /* binary search */
+
+ if ( cdf2->ClassRangeCount == 0 )
+ {
+ *klass = 0;
+ if ( index )
+ *index = 0;
+
+ return HB_Err_Not_Covered;
+ }
+
+ new_min = 0;
+ new_max = cdf2->ClassRangeCount - 1;
+
+ do
+ {
+ min = new_min;
+ max = new_max;
+
+ /* we use (min + max) / 2 = max - (max - min) / 2 to avoid
+ overflow and rounding errors */
+
+ middle = max - ( ( max - min ) >> 1 );
+
+ if ( glyphID >= crr[middle].Start && glyphID <= crr[middle].End )
+ {
+ *klass = crr[middle].Class;
+ error = HB_Err_Ok;
+ break;
+ }
+ else if ( glyphID < crr[middle].Start )
+ {
+ if ( middle == min )
+ {
+ *klass = 0;
+ error = HB_Err_Not_Covered;
+ break;
+ }
+ new_max = middle - 1;
+ }
+ else
+ {
+ if ( middle == max )
+ {
+ *klass = 0;
+ error = HB_Err_Not_Covered;
+ break;
+ }
+ new_min = middle + 1;
+ }
+ } while ( min < max );
+
+ if ( index )
+ *index = middle;
+
+ return error;
+}
+
+
+HB_INTERNAL HB_Error
+_HB_OPEN_Get_Class( HB_ClassDefinition* cd,
+ HB_UShort glyphID,
+ HB_UShort* klass,
+ HB_UShort* index )
+{
+ switch ( cd->ClassFormat )
+ {
+ case 1: return Get_Class1( &cd->cd.cd1, glyphID, klass, index );
+ case 2: return Get_Class2( &cd->cd.cd2, glyphID, klass, index );
+ default: return ERR(HB_Err_Invalid_SubTable_Format);
+ }
+
+ return HB_Err_Ok; /* never reached */
+}
+
+
+
+/***************************
+ * Device related functions
+ ***************************/
+
+
+HB_INTERNAL HB_Error
+_HB_OPEN_Load_Device( HB_Device** device,
+ HB_Stream stream )
+{
+ HB_Device* d;
+ HB_Error error;
+
+ HB_UShort n, count;
+
+ HB_UShort* dv;
+
+
+ if ( ACCESS_Frame( 6L ) )
+ return error;
+
+ if ( ALLOC( *device, sizeof(HB_Device)) )
+ {
+ *device = 0;
+ return error;
+ }
+
+ d = *device;
+
+ d->StartSize = GET_UShort();
+ d->EndSize = GET_UShort();
+ d->DeltaFormat = GET_UShort();
+
+ FORGET_Frame();
+
+ d->DeltaValue = NULL;
+
+ if ( d->StartSize > d->EndSize ||
+ d->DeltaFormat == 0 || d->DeltaFormat > 3 )
+ {
+ /* XXX
+ * I've seen fontforge generate DeltaFormat == 0.
+ * Just return Ok and let the NULL DeltaValue disable
+ * this table.
+ */
+ return HB_Err_Ok;
+ }
+
+ count = ( ( d->EndSize - d->StartSize + 1 ) >>
+ ( 4 - d->DeltaFormat ) ) + 1;
+
+ if ( ALLOC_ARRAY( d->DeltaValue, count, HB_UShort ) )
+ {
+ FREE( *device );
+ *device = 0;
+ return error;
+ }
+
+ if ( ACCESS_Frame( count * 2L ) )
+ {
+ FREE( d->DeltaValue );
+ FREE( *device );
+ *device = 0;
+ return error;
+ }
+
+ dv = d->DeltaValue;
+
+ for ( n = 0; n < count; n++ )
+ dv[n] = GET_UShort();
+
+ FORGET_Frame();
+
+ return HB_Err_Ok;
+}
+
+
+HB_INTERNAL void
+_HB_OPEN_Free_Device( HB_Device* d )
+{
+ if ( d )
+ {
+ FREE( d->DeltaValue );
+ FREE( d );
+ }
+}
+
+
+/* Since we have the delta values stored in compressed form, we must
+ uncompress it now. To simplify the interface, the function always
+ returns a meaningful value in `value'; the error is just for
+ information.
+ | |
+ format = 1: 0011223344556677|8899101112131415|...
+ | |
+ byte 1 byte 2
+
+ 00: (byte >> 14) & mask
+ 11: (byte >> 12) & mask
+ ...
+
+ mask = 0x0003
+ | |
+ format = 2: 0000111122223333|4444555566667777|...
+ | |
+ byte 1 byte 2
+
+ 0000: (byte >> 12) & mask
+ 1111: (byte >> 8) & mask
+ ...
+
+ mask = 0x000F
+ | |
+ format = 3: 0000000011111111|2222222233333333|...
+ | |
+ byte 1 byte 2
+
+ 00000000: (byte >> 8) & mask
+ 11111111: (byte >> 0) & mask
+ ....
+
+ mask = 0x00FF */
+
+HB_INTERNAL HB_Error
+_HB_OPEN_Get_Device( HB_Device* d,
+ HB_UShort size,
+ HB_Short* value )
+{
+ HB_UShort byte, bits, mask, s;
+
+ if ( d && d->DeltaValue && size >= d->StartSize && size <= d->EndSize )
+ {
+ HB_UShort f = d->DeltaFormat;
+ s = size - d->StartSize;
+ byte = d->DeltaValue[s >> ( 4 - f )];
+ bits = byte >> ( 16 - ( ( s % ( 1 << ( 4 - f ) ) + 1 ) << f ) );
+ mask = 0xFFFF >> ( 16 - ( 1 << f ) );
+
+ *value = (HB_Short)( bits & mask );
+
+ /* conversion to a signed value */
+
+ if ( *value >= ( ( mask + 1 ) >> 1 ) )
+ *value -= mask + 1;
+
+ return HB_Err_Ok;
+ }
+ else
+ {
+ *value = 0;
+ return HB_Err_Not_Covered;
+ }
+}
+
+
+/* END */
diff --git a/src/hb-old/harfbuzz-open.h b/src/hb-old/harfbuzz-open.h
new file mode 100644
index 0000000..4ba6cf5
--- /dev/null
+++ b/src/hb-old/harfbuzz-open.h
@@ -0,0 +1,288 @@
+/*
+ * Copyright (C) 1998-2004 David Turner and Werner Lemberg
+ * Copyright (C) 2006 Behdad Esfahbod
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#ifndef HARFBUZZ_OPEN_H
+#define HARFBUZZ_OPEN_H
+
+#include "harfbuzz-global.h"
+
+HB_BEGIN_HEADER
+
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(push, 1)
+#endif
+
+/* Use this if a feature applies to all glyphs */
+#define HB_ALL_GLYPHS 0xFFFF
+
+#define HB_DEFAULT_LANGUAGE 0xFFFF
+
+#define HB_MAX_NESTING_LEVEL 100
+
+
+/* Script list related structures */
+
+struct HB_LangSys_
+{
+ HB_UShort* FeatureIndex; /* array of Feature indices */
+ HB_UShort LookupOrderOffset; /* always 0 for TT Open 1.0 */
+ HB_UShort ReqFeatureIndex; /* required FeatureIndex */
+ HB_UShort FeatureCount; /* number of Feature indices */
+};
+
+typedef struct HB_LangSys_ HB_LangSys;
+
+
+struct HB_LangSysRecord_
+{
+ HB_LangSys LangSys; /* LangSys table */
+ HB_UInt LangSysTag; /* LangSysTag identifier */
+};
+
+typedef struct HB_LangSysRecord_ HB_LangSysRecord;
+
+
+struct HB_ScriptTable_
+{
+ HB_LangSysRecord* LangSysRecord; /* array of LangSysRecords */
+ HB_LangSys DefaultLangSys; /* DefaultLangSys table */
+ HB_UShort LangSysCount; /* number of LangSysRecords */
+};
+
+typedef struct HB_ScriptTable_ HB_ScriptTable;
+
+
+struct HB_ScriptRecord_
+{
+ HB_UInt ScriptTag; /* ScriptTag identifier */
+ HB_ScriptTable Script; /* Script table */
+};
+
+typedef struct HB_ScriptRecord_ HB_ScriptRecord;
+
+
+struct HB_ScriptList_
+{
+ HB_ScriptRecord* ScriptRecord; /* array of ScriptRecords */
+ HB_UShort ScriptCount; /* number of ScriptRecords */
+};
+
+typedef struct HB_ScriptList_ HB_ScriptList;
+
+
+/* Feature list related structures */
+
+struct HB_Feature_
+{
+ HB_UShort* LookupListIndex; /* array of LookupList indices */
+ HB_UShort FeatureParams; /* always 0 for TT Open 1.0 */
+ HB_UShort LookupListCount; /* number of LookupList indices */
+};
+
+typedef struct HB_Feature_ HB_Feature;
+
+
+struct HB_FeatureRecord_
+{
+ HB_UInt FeatureTag; /* FeatureTag identifier */
+ HB_Feature Feature; /* Feature table */
+};
+
+typedef struct HB_FeatureRecord_ HB_FeatureRecord;
+
+
+struct HB_FeatureList_
+{
+ HB_UShort* ApplyOrder; /* order to apply features */
+ HB_FeatureRecord* FeatureRecord; /* array of FeatureRecords */
+ HB_UShort FeatureCount; /* number of FeatureRecords */
+ HB_UShort ApplyCount; /* number of elements in ApplyOrder */
+};
+
+typedef struct HB_FeatureList_ HB_FeatureList;
+
+
+/* Lookup list related structures */
+
+typedef struct HB_SubTable_ HB_SubTable;
+
+
+struct HB_Lookup_
+{
+ HB_SubTable* SubTable; /* array of SubTables */
+ HB_UShort LookupType; /* Lookup type */
+ HB_UShort LookupFlag; /* Lookup qualifiers */
+ HB_UShort SubTableCount; /* number of SubTables */
+};
+
+typedef struct HB_Lookup_ HB_Lookup;
+
+
+/* The `Properties' field is not defined in the OpenType specification but
+ is needed for processing lookups. If properties[n] is > 0, the
+ functions HB_GSUB_Apply_String() resp. HB_GPOS_Apply_String() will
+ process Lookup[n] for glyphs which have the specific bit not set in
+ the `properties' field of the input string object. */
+
+struct HB_LookupList_
+{
+ HB_Lookup* Lookup; /* array of Lookup records */
+ HB_UInt* Properties; /* array of flags */
+ HB_UShort LookupCount; /* number of Lookups */
+};
+
+typedef struct HB_LookupList_ HB_LookupList;
+
+
+/* Possible LookupFlag bit masks. `HB_LOOKUP_FLAG_IGNORE_SPECIAL_MARKS' comes from the
+ OpenType 1.2 specification; HB_LOOKUP_FLAG_RIGHT_TO_LEFT has been (re)introduced in
+ OpenType 1.3 -- if set, the last glyph in a cursive attachment
+ sequence has to be positioned on the baseline -- regardless of the
+ writing direction. */
+
+#define HB_LOOKUP_FLAG_RIGHT_TO_LEFT 0x0001
+#define HB_LOOKUP_FLAG_IGNORE_BASE_GLYPHS 0x0002
+#define HB_LOOKUP_FLAG_IGNORE_LIGATURES 0x0004
+#define HB_LOOKUP_FLAG_IGNORE_MARKS 0x0008
+#define HB_LOOKUP_FLAG_IGNORE_SPECIAL_MARKS 0xFF00
+
+
+struct HB_CoverageFormat1_
+{
+ HB_UShort* GlyphArray; /* array of glyph IDs */
+ HB_UShort GlyphCount; /* number of glyphs in GlyphArray */
+};
+
+typedef struct HB_CoverageFormat1_ HB_CoverageFormat1;
+
+
+struct HB_RangeRecord_
+{
+ HB_UShort Start; /* first glyph ID in the range */
+ HB_UShort End; /* last glyph ID in the range */
+ HB_UShort StartCoverageIndex; /* coverage index of first
+ glyph ID in the range */
+};
+
+typedef struct HB_RangeRecord_ HB_RangeRecord;
+
+
+struct HB_CoverageFormat2_
+{
+ HB_RangeRecord* RangeRecord; /* array of RangeRecords */
+ HB_UShort RangeCount; /* number of RangeRecords */
+};
+
+typedef struct HB_CoverageFormat2_ HB_CoverageFormat2;
+
+
+struct HB_Coverage_
+{
+ HB_Byte CoverageFormat; /* 1 or 2 */
+
+ union
+ {
+ HB_CoverageFormat1 cf1;
+ HB_CoverageFormat2 cf2;
+ } cf;
+};
+
+typedef struct HB_Coverage_ HB_Coverage;
+
+
+struct HB_ClassDefFormat1_
+{
+ HB_UShort* ClassValueArray; /* array of class values */
+ HB_UShort StartGlyph; /* first glyph ID of the
+ ClassValueArray */
+ HB_UShort GlyphCount; /* size of the ClassValueArray */
+};
+
+typedef struct HB_ClassDefFormat1_ HB_ClassDefFormat1;
+
+
+struct HB_ClassRangeRecord_
+{
+ HB_UShort Start; /* first glyph ID in the range */
+ HB_UShort End; /* last glyph ID in the range */
+ HB_UShort Class; /* applied to all glyphs in range */
+};
+
+typedef struct HB_ClassRangeRecord_ HB_ClassRangeRecord;
+
+
+struct HB_ClassDefFormat2_
+{
+ HB_ClassRangeRecord* ClassRangeRecord;
+ /* array of ClassRangeRecords */
+ HB_UShort ClassRangeCount;
+ /* number of ClassRangeRecords */
+};
+
+typedef struct HB_ClassDefFormat2_ HB_ClassDefFormat2;
+
+
+struct HB_ClassDefinition_
+{
+ union
+ {
+ HB_ClassDefFormat1 cd1;
+ HB_ClassDefFormat2 cd2;
+ } cd;
+
+ HB_Byte ClassFormat; /* 1 or 2 */
+ HB_Bool loaded;
+};
+
+typedef struct HB_ClassDefinition_ HB_ClassDefinition;
+
+
+struct HB_Device_
+{
+ HB_UShort* DeltaValue; /* array of compressed data */
+ HB_UShort StartSize; /* smallest size to correct */
+ HB_UShort EndSize; /* largest size to correct */
+ HB_Byte DeltaFormat; /* DeltaValue array data format:
+ 1, 2, or 3 */
+};
+
+typedef struct HB_Device_ HB_Device;
+
+
+enum HB_Type_
+{
+ HB_Type_GSUB,
+ HB_Type_GPOS
+};
+
+typedef enum HB_Type_ HB_Type;
+
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(pop)
+#endif
+
+HB_END_HEADER
+
+#endif /* HARFBUZZ_OPEN_H */
diff --git a/src/hb-old/harfbuzz-shaper-private.h b/src/hb-old/harfbuzz-shaper-private.h
new file mode 100644
index 0000000..66fad4c
--- /dev/null
+++ b/src/hb-old/harfbuzz-shaper-private.h
@@ -0,0 +1,159 @@
+/*
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#ifndef HARFBUZZ_SHAPER_PRIVATE_H
+#define HARFBUZZ_SHAPER_PRIVATE_H
+
+HB_BEGIN_HEADER
+
+enum {
+ C_DOTTED_CIRCLE = 0x25CC
+};
+
+typedef enum
+{
+ HB_Combining_BelowLeftAttached = 200,
+ HB_Combining_BelowAttached = 202,
+ HB_Combining_BelowRightAttached = 204,
+ HB_Combining_LeftAttached = 208,
+ HB_Combining_RightAttached = 210,
+ HB_Combining_AboveLeftAttached = 212,
+ HB_Combining_AboveAttached = 214,
+ HB_Combining_AboveRightAttached = 216,
+
+ HB_Combining_BelowLeft = 218,
+ HB_Combining_Below = 220,
+ HB_Combining_BelowRight = 222,
+ HB_Combining_Left = 224,
+ HB_Combining_Right = 226,
+ HB_Combining_AboveLeft = 228,
+ HB_Combining_Above = 230,
+ HB_Combining_AboveRight = 232,
+
+ HB_Combining_DoubleBelow = 233,
+ HB_Combining_DoubleAbove = 234,
+ HB_Combining_IotaSubscript = 240
+} HB_CombiningClass;
+
+typedef enum {
+ LocaProperty = 0x1,
+ CcmpProperty = 0x2,
+ InitProperty = 0x4,
+ IsolProperty = 0x8,
+ FinaProperty = 0x10,
+ MediProperty = 0x20,
+ RligProperty = 0x40,
+ CaltProperty = 0x80,
+ LigaProperty = 0x100,
+ DligProperty = 0x200,
+ CswhProperty = 0x400,
+ MsetProperty = 0x800,
+
+ /* used by indic and myanmar shaper */
+ NuktaProperty = 0x8,
+ AkhantProperty = 0x10,
+ RephProperty = 0x20,
+ PreFormProperty = 0x40,
+ BelowFormProperty = 0x80,
+ AboveFormProperty = 0x100,
+ HalfFormProperty = 0x200,
+ PostFormProperty = 0x400,
+ ConjunctFormProperty = 0x800,
+ VattuProperty = 0x1000,
+ PreSubstProperty = 0x2000,
+ BelowSubstProperty = 0x4000,
+ AboveSubstProperty = 0x8000,
+ PostSubstProperty = 0x10000,
+ HalantProperty = 0x20000,
+ CligProperty = 0x40000,
+ IndicCaltProperty = 0x80000
+
+} HB_OpenTypeProperty;
+
+/* return true if ok. */
+typedef HB_Bool (*HB_ShapeFunction)(HB_ShaperItem *shaper_item);
+
+typedef struct {
+ HB_ShapeFunction shape;
+} HB_ScriptEngine;
+
+extern const HB_ScriptEngine hb_scriptEngines[];
+
+extern HB_Bool HB_BasicShape(HB_ShaperItem *shaper_item);
+extern HB_Bool HB_GreekShape(HB_ShaperItem *shaper_item);
+extern HB_Bool HB_TibetanShape(HB_ShaperItem *shaper_item);
+extern HB_Bool HB_HebrewShape(HB_ShaperItem *shaper_item);
+extern HB_Bool HB_ArabicShape(HB_ShaperItem *shaper_item);
+extern HB_Bool HB_HangulShape(HB_ShaperItem *shaper_item);
+extern HB_Bool HB_MyanmarShape(HB_ShaperItem *shaper_item);
+extern HB_Bool HB_KhmerShape(HB_ShaperItem *shaper_item);
+extern HB_Bool HB_IndicShape(HB_ShaperItem *shaper_item);
+
+typedef struct {
+ hb_uint32 tag;
+ hb_uint32 property;
+} HB_OpenTypeFeature;
+
+#define PositioningProperties 0x80000000
+
+HB_Bool HB_SelectScript(HB_ShaperItem *item, const HB_OpenTypeFeature *features);
+
+HB_Bool HB_OpenTypeShape(HB_ShaperItem *item, const hb_uint32 *properties);
+HB_Bool HB_OpenTypePosition(HB_ShaperItem *item, int availableGlyphs, HB_Bool doLogClusters);
+
+void HB_HeuristicPosition(HB_ShaperItem *item);
+void HB_HeuristicSetGlyphAttributes(HB_ShaperItem *item);
+
+#define HB_IsControlChar(uc) \
+ ((uc >= 0x200b && uc <= 0x200f /* ZW Space, ZWNJ, ZWJ, LRM and RLM */) \
+ || (uc >= 0x2028 && uc <= 0x202f /* LS, PS, LRE, RLE, PDF, LRO, RLO, NNBSP */) \
+ || (uc >= 0x206a && uc <= 0x206f /* ISS, ASS, IAFS, AFS, NADS, NODS */))
+
+HB_Bool HB_ConvertStringToGlyphIndices(HB_ShaperItem *shaper_item);
+
+#define HB_GetGlyphAdvances(shaper_item) \
+ shaper_item->font->klass->getGlyphAdvances(shaper_item->font, \
+ shaper_item->glyphs, shaper_item->num_glyphs, \
+ shaper_item->advances, \
+ shaper_item->face->current_flags);
+
+#define HB_DECLARE_STACKARRAY(Type, Name) \
+ Type stack##Name[512]; \
+ Type *Name = stack##Name;
+
+#define HB_INIT_STACKARRAY(Type, Name, Length) \
+ if ((Length) >= 512) \
+ Name = (Type *)malloc((Length) * sizeof(Type));
+
+#define HB_STACKARRAY(Type, Name, Length) \
+ HB_DECLARE_STACKARRAY(Type, Name) \
+ HB_INIT_STACKARRAY(Type, Name, Length)
+
+#define HB_FREE_STACKARRAY(Name) \
+ if (stack##Name != Name) \
+ free(Name);
+
+HB_END_HEADER
+
+#endif
diff --git a/src/hb-old/harfbuzz-shaper.cpp b/src/hb-old/harfbuzz-shaper.cpp
new file mode 100644
index 0000000..d1e2335
--- /dev/null
+++ b/src/hb-old/harfbuzz-shaper.cpp
@@ -0,0 +1,994 @@
+/*
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#include "harfbuzz-shaper.h"
+#include "harfbuzz-shaper-private.h"
+
+#include "harfbuzz-stream-private.h"
+#include <assert.h>
+#include <stdio.h>
+
+#define HB_MIN(a, b) ((a) < (b) ? (a) : (b))
+#define HB_MAX(a, b) ((a) > (b) ? (a) : (b))
+
+// --------------------------------------------------------------------------------------------------------------------------------------------
+//
+// Basic processing
+//
+// --------------------------------------------------------------------------------------------------------------------------------------------
+
+static inline void positionCluster(HB_ShaperItem *item, int gfrom, int glast)
+{
+ int nmarks = glast - gfrom;
+ assert(nmarks > 0);
+
+ HB_Glyph *glyphs = item->glyphs;
+ HB_GlyphAttributes *attributes = item->attributes;
+
+ HB_GlyphMetrics baseMetrics;
+ item->font->klass->getGlyphMetrics(item->font, glyphs[gfrom], &baseMetrics);
+
+ if (item->item.script == HB_Script_Hebrew
+ && (-baseMetrics.y) > baseMetrics.height)
+ // we need to attach below the baseline, because of the hebrew iud.
+ baseMetrics.height = -baseMetrics.y;
+
+// qDebug("---> positionCluster: cluster from %d to %d", gfrom, glast);
+// qDebug("baseInfo: %f/%f (%f/%f) off=%f/%f", baseInfo.x, baseInfo.y, baseInfo.width, baseInfo.height, baseInfo.xoff, baseInfo.yoff);
+
+ HB_Fixed size = item->font->klass->getFontMetric(item->font, HB_FontAscent) / 10;
+ HB_Fixed offsetBase = HB_FIXED_CONSTANT(1) + (size - HB_FIXED_CONSTANT(4)) / 4;
+ if (size > HB_FIXED_CONSTANT(4))
+ offsetBase += HB_FIXED_CONSTANT(4);
+ else
+ offsetBase += size;
+ offsetBase = -offsetBase;
+ //qreal offsetBase = (size - 4) / 4 + qMin<qreal>(size, 4) + 1;
+// qDebug("offset = %f", offsetBase);
+
+ bool rightToLeft = item->item.bidiLevel % 2;
+
+ int i;
+ unsigned char lastCmb = 0;
+ HB_GlyphMetrics attachmentRect;
+ memset(&attachmentRect, 0, sizeof(attachmentRect));
+
+ for(i = 1; i <= nmarks; i++) {
+ HB_Glyph mark = glyphs[gfrom+i];
+ HB_GlyphMetrics markMetrics;
+ item->font->klass->getGlyphMetrics(item->font, mark, &markMetrics);
+ HB_FixedPoint p;
+ p.x = p.y = 0;
+// qDebug("markInfo: %f/%f (%f/%f) off=%f/%f", markInfo.x, markInfo.y, markInfo.width, markInfo.height, markInfo.xoff, markInfo.yoff);
+
+ HB_Fixed offset = offsetBase;
+ unsigned char cmb = attributes[gfrom+i].combiningClass;
+
+ // ### maybe the whole position determination should move down to heuristicSetGlyphAttributes. Would save some
+ // bits in the glyphAttributes structure.
+ if (cmb < 200) {
+ // fixed position classes. We approximate by mapping to one of the others.
+ // currently I added only the ones for arabic, hebrew, lao and thai.
+
+ // for Lao and Thai marks with class 0, see below (heuristicSetGlyphAttributes)
+
+ // add a bit more offset to arabic, a bit hacky
+ if (cmb >= 27 && cmb <= 36 && offset < 3)
+ offset +=1;
+ // below
+ if ((cmb >= 10 && cmb <= 18) ||
+ cmb == 20 || cmb == 22 ||
+ cmb == 29 || cmb == 32)
+ cmb = HB_Combining_Below;
+ // above
+ else if (cmb == 23 || cmb == 27 || cmb == 28 ||
+ cmb == 30 || cmb == 31 || (cmb >= 33 && cmb <= 36))
+ cmb = HB_Combining_Above;
+ //below-right
+ else if (cmb == 9 || cmb == 103 || cmb == 118)
+ cmb = HB_Combining_BelowRight;
+ // above-right
+ else if (cmb == 24 || cmb == 107 || cmb == 122)
+ cmb = HB_Combining_AboveRight;
+ else if (cmb == 25)
+ cmb = HB_Combining_AboveLeft;
+ // fixed:
+ // 19 21
+
+ }
+
+ // combining marks of different class don't interact. Reset the rectangle.
+ if (cmb != lastCmb) {
+ //qDebug("resetting rect");
+ attachmentRect = baseMetrics;
+ }
+
+ switch(cmb) {
+ case HB_Combining_DoubleBelow:
+ // ### wrong in rtl context!
+ case HB_Combining_BelowLeft:
+ p.y += offset;
+ case HB_Combining_BelowLeftAttached:
+ p.x += attachmentRect.x - markMetrics.x;
+ p.y += (attachmentRect.y + attachmentRect.height) - markMetrics.y;
+ break;
+ case HB_Combining_Below:
+ p.y += offset;
+ case HB_Combining_BelowAttached:
+ p.x += attachmentRect.x - markMetrics.x;
+ p.y += (attachmentRect.y + attachmentRect.height) - markMetrics.y;
+
+ p.x += (attachmentRect.width - markMetrics.width) / 2;
+ break;
+ case HB_Combining_BelowRight:
+ p.y += offset;
+ case HB_Combining_BelowRightAttached:
+ p.x += attachmentRect.x + attachmentRect.width - markMetrics.width - markMetrics.x;
+ p.y += attachmentRect.y + attachmentRect.height - markMetrics.y;
+ break;
+ case HB_Combining_Left:
+ p.x -= offset;
+ case HB_Combining_LeftAttached:
+ break;
+ case HB_Combining_Right:
+ p.x += offset;
+ case HB_Combining_RightAttached:
+ break;
+ case HB_Combining_DoubleAbove:
+ // ### wrong in RTL context!
+ case HB_Combining_AboveLeft:
+ p.y -= offset;
+ case HB_Combining_AboveLeftAttached:
+ p.x += attachmentRect.x - markMetrics.x;
+ p.y += attachmentRect.y - markMetrics.y - markMetrics.height;
+ break;
+ case HB_Combining_Above:
+ p.y -= offset;
+ case HB_Combining_AboveAttached:
+ p.x += attachmentRect.x - markMetrics.x;
+ p.y += attachmentRect.y - markMetrics.y - markMetrics.height;
+
+ p.x += (attachmentRect.width - markMetrics.width) / 2;
+ break;
+ case HB_Combining_AboveRight:
+ p.y -= offset;
+ case HB_Combining_AboveRightAttached:
+ p.x += attachmentRect.x + attachmentRect.width - markMetrics.x - markMetrics.width;
+ p.y += attachmentRect.y - markMetrics.y - markMetrics.height;
+ break;
+
+ case HB_Combining_IotaSubscript:
+ default:
+ break;
+ }
+// qDebug("char=%x combiningClass = %d offset=%f/%f", mark, cmb, p.x(), p.y());
+ markMetrics.x += p.x;
+ markMetrics.y += p.y;
+
+ HB_GlyphMetrics unitedAttachmentRect = attachmentRect;
+ unitedAttachmentRect.x = HB_MIN(attachmentRect.x, markMetrics.x);
+ unitedAttachmentRect.y = HB_MIN(attachmentRect.y, markMetrics.y);
+ unitedAttachmentRect.width = HB_MAX(attachmentRect.x + attachmentRect.width, markMetrics.x + markMetrics.width) - unitedAttachmentRect.x;
+ unitedAttachmentRect.height = HB_MAX(attachmentRect.y + attachmentRect.height, markMetrics.y + markMetrics.height) - unitedAttachmentRect.y;
+ attachmentRect = unitedAttachmentRect;
+
+ lastCmb = cmb;
+ if (rightToLeft) {
+ item->offsets[gfrom+i].x = p.x;
+ item->offsets[gfrom+i].y = p.y;
+ } else {
+ item->offsets[gfrom+i].x = p.x - baseMetrics.xOffset;
+ item->offsets[gfrom+i].y = p.y - baseMetrics.yOffset;
+ }
+ item->advances[gfrom+i] = 0;
+ }
+}
+
+void HB_HeuristicPosition(HB_ShaperItem *item)
+{
+ HB_GetGlyphAdvances(item);
+ HB_GlyphAttributes *attributes = item->attributes;
+
+ int cEnd = -1;
+ int i = item->num_glyphs;
+ while (i--) {
+ if (cEnd == -1 && attributes[i].mark) {
+ cEnd = i;
+ } else if (cEnd != -1 && !attributes[i].mark) {
+ positionCluster(item, i, cEnd);
+ cEnd = -1;
+ }
+ }
+}
+
+// set the glyph attributes heuristically. Assumes a 1 to 1 relationship between chars and glyphs
+// and no reordering.
+// also computes logClusters heuristically
+void HB_HeuristicSetGlyphAttributes(HB_ShaperItem *item)
+{
+ const HB_UChar16 *uc = item->string + item->item.pos;
+ hb_uint32 length = item->item.length;
+
+ // ### zeroWidth and justification are missing here!!!!!
+
+ assert(item->num_glyphs <= length);
+
+// qDebug("QScriptEngine::heuristicSetGlyphAttributes, num_glyphs=%d", item->num_glyphs);
+ HB_GlyphAttributes *attributes = item->attributes;
+ unsigned short *logClusters = item->log_clusters;
+
+ hb_uint32 glyph_pos = 0;
+ hb_uint32 i;
+ for (i = 0; i < length; i++) {
+ if (HB_IsHighSurrogate(uc[i]) && i < length - 1
+ && HB_IsLowSurrogate(uc[i + 1])) {
+ logClusters[i] = glyph_pos;
+ logClusters[++i] = glyph_pos;
+ } else {
+ logClusters[i] = glyph_pos;
+ }
+ ++glyph_pos;
+ }
+ assert(glyph_pos == item->num_glyphs);
+
+ // first char in a run is never (treated as) a mark
+ int cStart = 0;
+ const bool symbolFont = item->face->isSymbolFont;
+ attributes[0].mark = false;
+ attributes[0].clusterStart = true;
+ attributes[0].dontPrint = (!symbolFont && uc[0] == 0x00ad) || HB_IsControlChar(uc[0]);
+
+ int pos = 0;
+ HB_CharCategory lastCat;
+ int dummy;
+ HB_GetUnicodeCharProperties(uc[0], &lastCat, &dummy);
+ for (i = 1; i < length; ++i) {
+ if (logClusters[i] == pos)
+ // same glyph
+ continue;
+ ++pos;
+ while (pos < logClusters[i]) {
+ attributes[pos] = attributes[pos-1];
+ ++pos;
+ }
+ // hide soft-hyphens by default
+ if ((!symbolFont && uc[i] == 0x00ad) || HB_IsControlChar(uc[i]))
+ attributes[pos].dontPrint = true;
+ HB_CharCategory cat;
+ int cmb;
+ HB_GetUnicodeCharProperties(uc[i], &cat, &cmb);
+ if (cat != HB_Mark_NonSpacing) {
+ attributes[pos].mark = false;
+ attributes[pos].clusterStart = true;
+ attributes[pos].combiningClass = 0;
+ cStart = logClusters[i];
+ } else {
+ if (cmb == 0) {
+ // Fix 0 combining classes
+ if ((uc[pos] & 0xff00) == 0x0e00) {
+ // thai or lao
+ if (uc[pos] == 0xe31 ||
+ uc[pos] == 0xe34 ||
+ uc[pos] == 0xe35 ||
+ uc[pos] == 0xe36 ||
+ uc[pos] == 0xe37 ||
+ uc[pos] == 0xe47 ||
+ uc[pos] == 0xe4c ||
+ uc[pos] == 0xe4d ||
+ uc[pos] == 0xe4e) {
+ cmb = HB_Combining_AboveRight;
+ } else if (uc[pos] == 0xeb1 ||
+ uc[pos] == 0xeb4 ||
+ uc[pos] == 0xeb5 ||
+ uc[pos] == 0xeb6 ||
+ uc[pos] == 0xeb7 ||
+ uc[pos] == 0xebb ||
+ uc[pos] == 0xecc ||
+ uc[pos] == 0xecd) {
+ cmb = HB_Combining_Above;
+ } else if (uc[pos] == 0xebc) {
+ cmb = HB_Combining_Below;
+ }
+ }
+ }
+
+ attributes[pos].mark = true;
+ attributes[pos].clusterStart = false;
+ attributes[pos].combiningClass = cmb;
+ logClusters[i] = cStart;
+ }
+ // one gets an inter character justification point if the current char is not a non spacing mark.
+ // as then the current char belongs to the last one and one gets a space justification point
+ // after the space char.
+ if (lastCat == HB_Separator_Space)
+ attributes[pos-1].justification = HB_Space;
+ else if (cat != HB_Mark_NonSpacing)
+ attributes[pos-1].justification = HB_Character;
+ else
+ attributes[pos-1].justification = HB_NoJustification;
+
+ lastCat = cat;
+ }
+ pos = logClusters[length-1];
+ if (lastCat == HB_Separator_Space)
+ attributes[pos].justification = HB_Space;
+ else
+ attributes[pos].justification = HB_Character;
+}
+
+#ifndef NO_OPENTYPE
+static const HB_OpenTypeFeature basic_features[] = {
+ { HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty },
+ { HB_MAKE_TAG('l', 'i', 'g', 'a'), CcmpProperty },
+ { HB_MAKE_TAG('c', 'l', 'i', 'g'), CcmpProperty },
+ {0, 0}
+};
+#endif
+
+HB_Bool HB_ConvertStringToGlyphIndices(HB_ShaperItem *shaper_item)
+{
+ if (shaper_item->glyphIndicesPresent) {
+ shaper_item->num_glyphs = shaper_item->initialGlyphCount;
+ shaper_item->glyphIndicesPresent = false;
+ return true;
+ }
+ return shaper_item->font->klass
+ ->convertStringToGlyphIndices(shaper_item->font,
+ shaper_item->string + shaper_item->item.pos, shaper_item->item.length,
+ shaper_item->glyphs, &shaper_item->num_glyphs,
+ shaper_item->item.bidiLevel % 2);
+}
+
+HB_Bool HB_BasicShape(HB_ShaperItem *shaper_item)
+{
+#ifndef NO_OPENTYPE
+ const int availableGlyphs = shaper_item->num_glyphs;
+#endif
+
+ if (!HB_ConvertStringToGlyphIndices(shaper_item))
+ return false;
+
+ HB_HeuristicSetGlyphAttributes(shaper_item);
+
+#ifndef NO_OPENTYPE
+ if (HB_SelectScript(shaper_item, basic_features)) {
+ HB_OpenTypeShape(shaper_item, /*properties*/0);
+ return HB_OpenTypePosition(shaper_item, availableGlyphs, /*doLogClusters*/true);
+ }
+#endif
+
+ HB_HeuristicPosition(shaper_item);
+ return true;
+}
+
+const HB_ScriptEngine HB_ScriptEngines[] = {
+ // Common
+ { HB_BasicShape},
+ // Greek
+ { HB_GreekShape},
+ // Cyrillic
+ { HB_BasicShape},
+ // Armenian
+ { HB_BasicShape},
+ // Hebrew
+ { HB_HebrewShape},
+ // Arabic
+ { HB_ArabicShape},
+ // Syriac
+ { HB_ArabicShape},
+ // Thaana
+ { HB_BasicShape},
+ // Devanagari
+ { HB_IndicShape},
+ // Bengali
+ { HB_IndicShape},
+ // Gurmukhi
+ { HB_IndicShape},
+ // Gujarati
+ { HB_IndicShape},
+ // Oriya
+ { HB_IndicShape},
+ // Tamil
+ { HB_IndicShape},
+ // Telugu
+ { HB_IndicShape},
+ // Kannada
+ { HB_IndicShape},
+ // Malayalam
+ { HB_IndicShape},
+ // Sinhala
+ { HB_IndicShape},
+ // Thai
+ { HB_BasicShape},
+ // Lao
+ { HB_BasicShape},
+ // Tibetan
+ { HB_TibetanShape},
+ // Myanmar
+ { HB_MyanmarShape},
+ // Georgian
+ { HB_BasicShape},
+ // Hangul
+ { HB_HangulShape},
+ // Ogham
+ { HB_BasicShape},
+ // Runic
+ { HB_BasicShape},
+ // Khmer
+ { HB_KhmerShape},
+ // N'Ko
+ { HB_ArabicShape}
+};
+
+
+static inline char *tag_to_string(HB_UInt tag)
+{
+ static char string[5];
+ string[0] = (tag >> 24)&0xff;
+ string[1] = (tag >> 16)&0xff;
+ string[2] = (tag >> 8)&0xff;
+ string[3] = tag&0xff;
+ string[4] = 0;
+ return string;
+}
+
+#ifdef OT_DEBUG
+static void dump_string(HB_Buffer buffer)
+{
+ for (uint i = 0; i < buffer->in_length; ++i) {
+ qDebug(" %x: cluster=%d", buffer->in_string[i].gindex, buffer->in_string[i].cluster);
+ }
+}
+#define DEBUG printf
+#else
+#define DEBUG if (1) ; else printf
+#endif
+
+#if 0
+#define DefaultLangSys 0xffff
+#define DefaultScript HB_MAKE_TAG('D', 'F', 'L', 'T')
+#endif
+
+enum {
+ RequiresGsub = 1,
+ RequiresGpos = 2
+};
+
+struct OTScripts {
+ unsigned int tag;
+ int flags;
+};
+static const OTScripts ot_scripts [] = {
+ // Common
+ { HB_MAKE_TAG('l', 'a', 't', 'n'), 0 },
+ // Greek
+ { HB_MAKE_TAG('g', 'r', 'e', 'k'), 0 },
+ // Cyrillic
+ { HB_MAKE_TAG('c', 'y', 'r', 'l'), 0 },
+ // Armenian
+ { HB_MAKE_TAG('a', 'r', 'm', 'n'), 0 },
+ // Hebrew
+ { HB_MAKE_TAG('h', 'e', 'b', 'r'), 1 },
+ // Arabic
+ { HB_MAKE_TAG('a', 'r', 'a', 'b'), 1 },
+ // Syriac
+ { HB_MAKE_TAG('s', 'y', 'r', 'c'), 1 },
+ // Thaana
+ { HB_MAKE_TAG('t', 'h', 'a', 'a'), 1 },
+ // Devanagari
+ { HB_MAKE_TAG('d', 'e', 'v', 'a'), 1 },
+ // Bengali
+ { HB_MAKE_TAG('b', 'e', 'n', 'g'), 1 },
+ // Gurmukhi
+ { HB_MAKE_TAG('g', 'u', 'r', 'u'), 1 },
+ // Gujarati
+ { HB_MAKE_TAG('g', 'u', 'j', 'r'), 1 },
+ // Oriya
+ { HB_MAKE_TAG('o', 'r', 'y', 'a'), 1 },
+ // Tamil
+ { HB_MAKE_TAG('t', 'a', 'm', 'l'), 1 },
+ // Telugu
+ { HB_MAKE_TAG('t', 'e', 'l', 'u'), 1 },
+ // Kannada
+ { HB_MAKE_TAG('k', 'n', 'd', 'a'), 1 },
+ // Malayalam
+ { HB_MAKE_TAG('m', 'l', 'y', 'm'), 1 },
+ // Sinhala
+ { HB_MAKE_TAG('s', 'i', 'n', 'h'), 1 },
+ // Thai
+ { HB_MAKE_TAG('t', 'h', 'a', 'i'), 1 },
+ // Lao
+ { HB_MAKE_TAG('l', 'a', 'o', ' '), 1 },
+ // Tibetan
+ { HB_MAKE_TAG('t', 'i', 'b', 't'), 1 },
+ // Myanmar
+ { HB_MAKE_TAG('m', 'y', 'm', 'r'), 1 },
+ // Georgian
+ { HB_MAKE_TAG('g', 'e', 'o', 'r'), 0 },
+ // Hangul
+ { HB_MAKE_TAG('h', 'a', 'n', 'g'), 1 },
+ // Ogham
+ { HB_MAKE_TAG('o', 'g', 'a', 'm'), 0 },
+ // Runic
+ { HB_MAKE_TAG('r', 'u', 'n', 'r'), 0 },
+ // Khmer
+ { HB_MAKE_TAG('k', 'h', 'm', 'r'), 1 },
+ // N'Ko
+ { HB_MAKE_TAG('n', 'k', 'o', ' '), 1 }
+};
+enum { NumOTScripts = sizeof(ot_scripts)/sizeof(OTScripts) };
+
+static HB_Bool checkScript(HB_Face face, int script)
+{
+ assert(script < HB_ScriptCount);
+
+ if (!face->gsub && !face->gpos)
+ return false;
+
+ unsigned int tag = ot_scripts[script].tag;
+ int requirements = ot_scripts[script].flags;
+
+ if (requirements & RequiresGsub) {
+ if (!face->gsub)
+ return false;
+
+ HB_UShort script_index;
+ HB_Error error = HB_GSUB_Select_Script(face->gsub, tag, &script_index);
+ if (error) {
+ DEBUG("could not select script %d in GSub table: %d", (int)script, error);
+ error = HB_GSUB_Select_Script(face->gsub, HB_MAKE_TAG('D', 'F', 'L', 'T'), &script_index);
+ if (error)
+ return false;
+ }
+ }
+
+ if (requirements & RequiresGpos) {
+ if (!face->gpos)
+ return false;
+
+ HB_UShort script_index;
+ HB_Error error = HB_GPOS_Select_Script(face->gpos, script, &script_index);
+ if (error) {
+ DEBUG("could not select script in gpos table: %d", error);
+ error = HB_GPOS_Select_Script(face->gpos, HB_MAKE_TAG('D', 'F', 'L', 'T'), &script_index);
+ if (error)
+ return false;
+ }
+
+ }
+ return true;
+}
+
+static HB_Stream getTableStream(void *font, HB_GetFontTableFunc tableFunc, HB_Tag tag)
+{
+ HB_Error error;
+ HB_UInt length = 0;
+ HB_Stream stream = 0;
+
+ if (!font)
+ return 0;
+
+ error = tableFunc(font, tag, 0, &length);
+ if (error)
+ return 0;
+ stream = (HB_Stream)malloc(sizeof(HB_StreamRec));
+ if (!stream)
+ return 0;
+ stream->base = (HB_Byte*)malloc(length);
+ if (!stream->base) {
+ free(stream);
+ return 0;
+ }
+ error = tableFunc(font, tag, stream->base, &length);
+ if (error) {
+ _hb_close_stream(stream);
+ return 0;
+ }
+ stream->size = length;
+ stream->pos = 0;
+ stream->cursor = NULL;
+ return stream;
+}
+
+HB_Face HB_NewFace(void *font, HB_GetFontTableFunc tableFunc)
+{
+ HB_Face face = (HB_Face )malloc(sizeof(HB_FaceRec));
+ if (!face)
+ return 0;
+
+ face->isSymbolFont = false;
+ face->gdef = 0;
+ face->gpos = 0;
+ face->gsub = 0;
+ face->current_script = HB_ScriptCount;
+ face->current_flags = HB_ShaperFlag_Default;
+ face->has_opentype_kerning = false;
+ face->tmpAttributes = 0;
+ face->tmpLogClusters = 0;
+ face->glyphs_substituted = false;
+ face->buffer = 0;
+
+ HB_Error error = HB_Err_Ok;
+ HB_Stream stream;
+ HB_Stream gdefStream;
+
+ gdefStream = getTableStream(font, tableFunc, TTAG_GDEF);
+ error = HB_Err_Not_Covered;
+ if (!gdefStream || (error = HB_Load_GDEF_Table(gdefStream, &face->gdef))) {
+ //DEBUG("error loading gdef table: %d", error);
+ face->gdef = 0;
+ }
+
+ //DEBUG() << "trying to load gsub table";
+ stream = getTableStream(font, tableFunc, TTAG_GSUB);
+ error = HB_Err_Not_Covered;
+ if (!stream || (error = HB_Load_GSUB_Table(stream, &face->gsub, face->gdef, gdefStream))) {
+ face->gsub = 0;
+ if (error != HB_Err_Not_Covered) {
+ //DEBUG("error loading gsub table: %d", error);
+ } else {
+ //DEBUG("face doesn't have a gsub table");
+ }
+ }
+ _hb_close_stream(stream);
+
+ stream = getTableStream(font, tableFunc, TTAG_GPOS);
+ error = HB_Err_Not_Covered;
+ if (!stream || (error = HB_Load_GPOS_Table(stream, &face->gpos, face->gdef, gdefStream))) {
+ face->gpos = 0;
+ DEBUG("error loading gpos table: %d", error);
+ }
+ _hb_close_stream(stream);
+
+ _hb_close_stream(gdefStream);
+
+ for (unsigned int i = 0; i < HB_ScriptCount; ++i)
+ face->supported_scripts[i] = checkScript(face, i);
+
+ if (HB_Buffer_new(&face->buffer) != HB_Err_Ok) {
+ HB_FreeFace(face);
+ return 0;
+ }
+
+ return face;
+}
+
+void HB_FreeFace(HB_Face face)
+{
+ if (!face)
+ return;
+ if (face->gpos)
+ HB_Done_GPOS_Table(face->gpos);
+ if (face->gsub)
+ HB_Done_GSUB_Table(face->gsub);
+ if (face->gdef)
+ HB_Done_GDEF_Table(face->gdef);
+ if (face->buffer)
+ HB_Buffer_free(face->buffer);
+ if (face->tmpAttributes)
+ free(face->tmpAttributes);
+ if (face->tmpLogClusters)
+ free(face->tmpLogClusters);
+ free(face);
+}
+
+HB_Bool HB_SelectScript(HB_ShaperItem *shaper_item, const HB_OpenTypeFeature *features)
+{
+ HB_Script script = shaper_item->item.script;
+
+ if (!shaper_item->face->supported_scripts[script])
+ return false;
+
+ HB_Face face = shaper_item->face;
+ if (face->current_script == script && face->current_flags == shaper_item->shaperFlags)
+ return true;
+
+ face->current_script = script;
+ face->current_flags = shaper_item->shaperFlags;
+
+ assert(script < HB_ScriptCount);
+ // find script in our list of supported scripts.
+ unsigned int tag = ot_scripts[script].tag;
+
+ if (face->gsub && features) {
+#ifdef OT_DEBUG
+ {
+ HB_FeatureList featurelist = face->gsub->FeatureList;
+ int numfeatures = featurelist.FeatureCount;
+ DEBUG("gsub table has %d features", numfeatures);
+ for (int i = 0; i < numfeatures; i++) {
+ HB_FeatureRecord *r = featurelist.FeatureRecord + i;
+ DEBUG(" feature '%s'", tag_to_string(r->FeatureTag));
+ }
+ }
+#endif
+ HB_GSUB_Clear_Features(face->gsub);
+ HB_UShort script_index;
+ HB_Error error = HB_GSUB_Select_Script(face->gsub, tag, &script_index);
+ if (!error) {
+ DEBUG("script %s has script index %d", tag_to_string(script), script_index);
+ while (features->tag) {
+ HB_UShort feature_index;
+ error = HB_GSUB_Select_Feature(face->gsub, features->tag, script_index, 0xffff, &feature_index);
+ if (!error) {
+ DEBUG(" adding feature %s", tag_to_string(features->tag));
+ HB_GSUB_Add_Feature(face->gsub, feature_index, features->property);
+ }
+ ++features;
+ }
+ }
+ }
+
+ // reset
+ face->has_opentype_kerning = false;
+
+ if (face->gpos) {
+ HB_GPOS_Clear_Features(face->gpos);
+ HB_UShort script_index;
+ HB_Error error = HB_GPOS_Select_Script(face->gpos, tag, &script_index);
+ if (!error) {
+#ifdef OT_DEBUG
+ {
+ HB_FeatureList featurelist = face->gpos->FeatureList;
+ int numfeatures = featurelist.FeatureCount;
+ DEBUG("gpos table has %d features", numfeatures);
+ for(int i = 0; i < numfeatures; i++) {
+ HB_FeatureRecord *r = featurelist.FeatureRecord + i;
+ HB_UShort feature_index;
+ HB_GPOS_Select_Feature(face->gpos, r->FeatureTag, script_index, 0xffff, &feature_index);
+ DEBUG(" feature '%s'", tag_to_string(r->FeatureTag));
+ }
+ }
+#endif
+ HB_UInt *feature_tag_list_buffer;
+ error = HB_GPOS_Query_Features(face->gpos, script_index, 0xffff, &feature_tag_list_buffer);
+ if (!error) {
+ HB_UInt *feature_tag_list = feature_tag_list_buffer;
+ while (*feature_tag_list) {
+ HB_UShort feature_index;
+ if (*feature_tag_list == HB_MAKE_TAG('k', 'e', 'r', 'n')) {
+ if (face->current_flags & HB_ShaperFlag_NoKerning) {
+ ++feature_tag_list;
+ continue;
+ }
+ face->has_opentype_kerning = true;
+ }
+ error = HB_GPOS_Select_Feature(face->gpos, *feature_tag_list, script_index, 0xffff, &feature_index);
+ if (!error)
+ HB_GPOS_Add_Feature(face->gpos, feature_index, PositioningProperties);
+ ++feature_tag_list;
+ }
+ FREE(feature_tag_list_buffer);
+ }
+ }
+ }
+
+ return true;
+}
+
+HB_Bool HB_OpenTypeShape(HB_ShaperItem *item, const hb_uint32 *properties)
+{
+ HB_GlyphAttributes *tmpAttributes;
+ unsigned int *tmpLogClusters;
+
+ HB_Face face = item->face;
+
+ face->length = item->num_glyphs;
+
+ HB_Buffer_clear(face->buffer);
+
+ tmpAttributes = (HB_GlyphAttributes *) realloc(face->tmpAttributes, face->length*sizeof(HB_GlyphAttributes));
+ if (!tmpAttributes)
+ return false;
+ face->tmpAttributes = tmpAttributes;
+
+ tmpLogClusters = (unsigned int *) realloc(face->tmpLogClusters, face->length*sizeof(unsigned int));
+ if (!tmpLogClusters)
+ return false;
+ face->tmpLogClusters = tmpLogClusters;
+
+ for (int i = 0; i < face->length; ++i) {
+ HB_Buffer_add_glyph(face->buffer, item->glyphs[i], properties ? properties[i] : 0, i);
+ face->tmpAttributes[i] = item->attributes[i];
+ face->tmpLogClusters[i] = item->log_clusters[i];
+ }
+
+#ifdef OT_DEBUG
+ DEBUG("-----------------------------------------");
+// DEBUG("log clusters before shaping:");
+// for (int j = 0; j < length; j++)
+// DEBUG(" log[%d] = %d", j, item->log_clusters[j]);
+ DEBUG("original glyphs: %p", item->glyphs);
+ for (int i = 0; i < length; ++i)
+ DEBUG(" glyph=%4x", hb_buffer->in_string[i].gindex);
+// dump_string(hb_buffer);
+#endif
+
+ face->glyphs_substituted = false;
+ if (face->gsub) {
+ unsigned int error = HB_GSUB_Apply_String(face->gsub, face->buffer);
+ if (error && error != HB_Err_Not_Covered)
+ return false;
+ face->glyphs_substituted = (error != HB_Err_Not_Covered);
+ }
+
+#ifdef OT_DEBUG
+// DEBUG("log clusters before shaping:");
+// for (int j = 0; j < length; j++)
+// DEBUG(" log[%d] = %d", j, item->log_clusters[j]);
+ DEBUG("shaped glyphs:");
+ for (int i = 0; i < length; ++i)
+ DEBUG(" glyph=%4x", hb_buffer->in_string[i].gindex);
+ DEBUG("-----------------------------------------");
+// dump_string(hb_buffer);
+#endif
+
+ return true;
+}
+
+HB_Bool HB_OpenTypePosition(HB_ShaperItem *item, int availableGlyphs, HB_Bool doLogClusters)
+{
+ HB_Face face = item->face;
+
+ bool glyphs_positioned = false;
+ if (face->gpos) {
+ if (face->buffer->positions)
+ memset(face->buffer->positions, 0, face->buffer->in_length*sizeof(HB_PositionRec));
+ // #### check that passing "false,false" is correct
+ glyphs_positioned = HB_GPOS_Apply_String(item->font, face->gpos, face->current_flags, face->buffer, false, false) != HB_Err_Not_Covered;
+ }
+
+ if (!face->glyphs_substituted && !glyphs_positioned) {
+ HB_GetGlyphAdvances(item);
+ return true; // nothing to do for us
+ }
+
+ // make sure we have enough space to write everything back
+ if (availableGlyphs < (int)face->buffer->in_length) {
+ item->num_glyphs = face->buffer->in_length;
+ return false;
+ }
+
+ HB_Glyph *glyphs = item->glyphs;
+ HB_GlyphAttributes *attributes = item->attributes;
+
+ for (unsigned int i = 0; i < face->buffer->in_length; ++i) {
+ glyphs[i] = face->buffer->in_string[i].gindex;
+ attributes[i] = face->tmpAttributes[face->buffer->in_string[i].cluster];
+ if (i && face->buffer->in_string[i].cluster == face->buffer->in_string[i-1].cluster)
+ attributes[i].clusterStart = false;
+ }
+ item->num_glyphs = face->buffer->in_length;
+
+ if (doLogClusters && face->glyphs_substituted) {
+ // we can't do this for indic, as we pass the stuf in syllables and it's easier to do it in the shaper.
+ unsigned short *logClusters = item->log_clusters;
+ int clusterStart = 0;
+ int oldCi = 0;
+ // #### the reconstruction of the logclusters currently does not work if the original string
+ // contains surrogate pairs
+ for (unsigned int i = 0; i < face->buffer->in_length; ++i) {
+ int ci = face->buffer->in_string[i].cluster;
+ // DEBUG(" ci[%d] = %d mark=%d, cmb=%d, cs=%d",
+ // i, ci, glyphAttributes[i].mark, glyphAttributes[i].combiningClass, glyphAttributes[i].clusterStart);
+ if (!attributes[i].mark && attributes[i].clusterStart && ci != oldCi) {
+ for (int j = oldCi; j < ci; j++)
+ logClusters[j] = clusterStart;
+ clusterStart = i;
+ oldCi = ci;
+ }
+ }
+ for (int j = oldCi; j < face->length; j++)
+ logClusters[j] = clusterStart;
+ }
+
+ // calulate the advances for the shaped glyphs
+// DEBUG("unpositioned: ");
+
+ // positioning code:
+ if (glyphs_positioned) {
+ HB_GetGlyphAdvances(item);
+ HB_Position positions = face->buffer->positions;
+ HB_Fixed *advances = item->advances;
+
+// DEBUG("positioned glyphs:");
+ for (unsigned int i = 0; i < face->buffer->in_length; i++) {
+// DEBUG(" %d:\t orig advance: (%d/%d)\tadv=(%d/%d)\tpos=(%d/%d)\tback=%d\tnew_advance=%d", i,
+// glyphs[i].advance.x.toInt(), glyphs[i].advance.y.toInt(),
+// (int)(positions[i].x_advance >> 6), (int)(positions[i].y_advance >> 6),
+// (int)(positions[i].x_pos >> 6), (int)(positions[i].y_pos >> 6),
+// positions[i].back, positions[i].new_advance);
+
+ HB_Fixed adjustment = positions[i].x_advance;
+
+ if (!(face->current_flags & HB_ShaperFlag_UseDesignMetrics))
+ adjustment = HB_FIXED_ROUND(adjustment);
+
+ if (positions[i].new_advance) {
+ ; //advances[i] = adjustment;
+ } else {
+ advances[i] += adjustment;
+ }
+
+ int back = 0;
+ HB_FixedPoint *offsets = item->offsets;
+ offsets[i].x = positions[i].x_pos;
+ offsets[i].y = positions[i].y_pos;
+ while (positions[i - back].back) {
+ back += positions[i - back].back;
+ offsets[i].x += positions[i - back].x_pos;
+ offsets[i].y += positions[i - back].y_pos;
+ }
+ offsets[i].y = -offsets[i].y;
+
+ if (item->item.bidiLevel % 2) {
+ // ### may need to go back multiple glyphs like in ltr
+ back = positions[i].back;
+ while (back--)
+ offsets[i].x -= advances[i-back];
+ } else {
+ back = 0;
+ while (positions[i - back].back) {
+ back += positions[i - back].back;
+ offsets[i].x -= advances[i-back];
+ }
+ }
+// DEBUG(" ->\tadv=%d\tpos=(%d/%d)",
+// glyphs[i].advance.x.toInt(), glyphs[i].offset.x.toInt(), glyphs[i].offset.y.toInt());
+ }
+ item->kerning_applied = face->has_opentype_kerning;
+ } else {
+ HB_HeuristicPosition(item);
+ }
+
+#ifdef OT_DEBUG
+ if (doLogClusters) {
+ DEBUG("log clusters after shaping:");
+ for (int j = 0; j < length; j++)
+ DEBUG(" log[%d] = %d", j, item->log_clusters[j]);
+ }
+ DEBUG("final glyphs:");
+ for (int i = 0; i < (int)hb_buffer->in_length; ++i)
+ DEBUG(" glyph=%4x char_index=%d mark: %d cmp: %d, clusterStart: %d advance=%d/%d offset=%d/%d",
+ glyphs[i].glyph, hb_buffer->in_string[i].cluster, glyphs[i].attributes.mark,
+ glyphs[i].attributes.combiningClass, glyphs[i].attributes.clusterStart,
+ glyphs[i].advance.x.toInt(), glyphs[i].advance.y.toInt(),
+ glyphs[i].offset.x.toInt(), glyphs[i].offset.y.toInt());
+ DEBUG("-----------------------------------------");
+#endif
+ return true;
+}
+
+HB_Bool HB_ShapeItem(HB_ShaperItem *shaper_item)
+{
+ HB_Bool result = false;
+ if (shaper_item->num_glyphs < shaper_item->item.length) {
+ shaper_item->num_glyphs = shaper_item->item.length;
+ return false;
+ }
+ assert(shaper_item->item.script < HB_ScriptCount);
+ result = HB_ScriptEngines[shaper_item->item.script].shape(shaper_item);
+ shaper_item->glyphIndicesPresent = false;
+ return result;
+}
diff --git a/src/hb-old/harfbuzz-shaper.h b/src/hb-old/harfbuzz-shaper.h
new file mode 100644
index 0000000..ab65004
--- /dev/null
+++ b/src/hb-old/harfbuzz-shaper.h
@@ -0,0 +1,264 @@
+/*
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#ifndef HARFBUZZ_SHAPER_H
+#define HARFBUZZ_SHAPER_H
+
+#include "harfbuzz-global.h"
+#include "harfbuzz-gdef.h"
+#include "harfbuzz-gpos.h"
+#include "harfbuzz-gsub.h"
+#include "harfbuzz-external.h"
+#include "harfbuzz-stream-private.h"
+
+HB_BEGIN_HEADER
+
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(push, 1)
+#endif
+
+/*
+ using anything else than signed or unsigned for bitfields in C is non standard,
+ but accepted by almost all compilers. And it gives a significant reduction in
+ memory consumption as HB_CharAttributes and HB_GlyphAttributes will not have
+ a 4 byte alignment
+*/
+#ifdef __xlC__
+typedef unsigned hb_bitfield;
+#else
+typedef hb_uint8 hb_bitfield;
+#endif
+
+typedef enum {
+ HB_Script_Common,
+ HB_Script_Greek,
+ HB_Script_Cyrillic,
+ HB_Script_Armenian,
+ HB_Script_Hebrew,
+ HB_Script_Arabic,
+ HB_Script_Syriac,
+ HB_Script_Thaana,
+ HB_Script_Devanagari,
+ HB_Script_Bengali,
+ HB_Script_Gurmukhi,
+ HB_Script_Gujarati,
+ HB_Script_Oriya,
+ HB_Script_Tamil,
+ HB_Script_Telugu,
+ HB_Script_Kannada,
+ HB_Script_Malayalam,
+ HB_Script_Sinhala,
+ HB_Script_Thai,
+ HB_Script_Lao,
+ HB_Script_Tibetan,
+ HB_Script_Myanmar,
+ HB_Script_Georgian,
+ HB_Script_Hangul,
+ HB_Script_Ogham,
+ HB_Script_Runic,
+ HB_Script_Khmer,
+ HB_Script_Nko,
+ HB_Script_Inherited,
+ HB_ScriptCount = HB_Script_Inherited
+ /*
+ HB_Script_Latin = Common,
+ HB_Script_Ethiopic = Common,
+ HB_Script_Cherokee = Common,
+ HB_Script_CanadianAboriginal = Common,
+ HB_Script_Mongolian = Common,
+ HB_Script_Hiragana = Common,
+ HB_Script_Katakana = Common,
+ HB_Script_Bopomofo = Common,
+ HB_Script_Han = Common,
+ HB_Script_Yi = Common,
+ HB_Script_OldItalic = Common,
+ HB_Script_Gothic = Common,
+ HB_Script_Deseret = Common,
+ HB_Script_Tagalog = Common,
+ HB_Script_Hanunoo = Common,
+ HB_Script_Buhid = Common,
+ HB_Script_Tagbanwa = Common,
+ HB_Script_Limbu = Common,
+ HB_Script_TaiLe = Common,
+ HB_Script_LinearB = Common,
+ HB_Script_Ugaritic = Common,
+ HB_Script_Shavian = Common,
+ HB_Script_Osmanya = Common,
+ HB_Script_Cypriot = Common,
+ HB_Script_Braille = Common,
+ HB_Script_Buginese = Common,
+ HB_Script_Coptic = Common,
+ HB_Script_NewTaiLue = Common,
+ HB_Script_Glagolitic = Common,
+ HB_Script_Tifinagh = Common,
+ HB_Script_SylotiNagri = Common,
+ HB_Script_OldPersian = Common,
+ HB_Script_Kharoshthi = Common,
+ HB_Script_Balinese = Common,
+ HB_Script_Cuneiform = Common,
+ HB_Script_Phoenician = Common,
+ HB_Script_PhagsPa = Common,
+ */
+} HB_Script;
+
+typedef struct
+{
+ hb_uint32 pos;
+ hb_uint32 length;
+ HB_Script script;
+ hb_uint8 bidiLevel;
+} HB_ScriptItem;
+
+
+typedef enum {
+ HB_LeftToRight = 0,
+ HB_RightToLeft = 1
+} HB_StringToGlyphsFlags;
+
+typedef enum {
+ HB_ShaperFlag_Default = 0,
+ HB_ShaperFlag_NoKerning = 1,
+ HB_ShaperFlag_UseDesignMetrics = 2
+} HB_ShaperFlag;
+
+/*
+ highest value means highest priority for justification. Justification is done by first inserting kashidas
+ starting with the highest priority positions, then stretching spaces, afterwards extending inter char
+ spacing, and last spacing between arabic words.
+ NoJustification is for example set for arabic where no Kashida can be inserted or for diacritics.
+*/
+typedef enum {
+ HB_NoJustification= 0, /* Justification can't be applied after this glyph */
+ HB_Arabic_Space = 1, /* This glyph represents a space inside arabic text */
+ HB_Character = 2, /* Inter-character justification point follows this glyph */
+ HB_Space = 4, /* This glyph represents a blank outside an Arabic run */
+ HB_Arabic_Normal = 7, /* Normal Middle-Of-Word glyph that connects to the right (begin) */
+ HB_Arabic_Waw = 8, /* Next character is final form of Waw/Ain/Qaf/Fa */
+ HB_Arabic_BaRa = 9, /* Next two chars are Ba + Ra/Ya/AlefMaksura */
+ HB_Arabic_Alef = 10, /* Next character is final form of Alef/Tah/Lam/Kaf/Gaf */
+ HB_Arabic_HaaDal = 11, /* Next character is final form of Haa/Dal/Taa Marbutah */
+ HB_Arabic_Seen = 12, /* Initial or Medial form Of Seen/Sad */
+ HB_Arabic_Kashida = 13 /* Kashida(U+640) in middle of word */
+} HB_JustificationClass;
+
+/* This structure is binary compatible with Uniscribe's SCRIPT_VISATTR. Would be nice to keep
+ * it like that. If this is a problem please tell Trolltech :)
+ */
+typedef struct {
+ hb_bitfield justification :4; /* Justification class */
+ hb_bitfield clusterStart :1; /* First glyph of representation of cluster */
+ hb_bitfield mark :1; /* needs to be positioned around base char */
+ hb_bitfield zeroWidth :1; /* ZWJ, ZWNJ etc, with no width */
+ hb_bitfield dontPrint :1;
+ hb_bitfield combiningClass :8;
+} HB_GlyphAttributes;
+
+typedef struct HB_FaceRec_ {
+ HB_Bool isSymbolFont;
+
+ HB_GDEF gdef;
+ HB_GSUB gsub;
+ HB_GPOS gpos;
+ HB_Bool supported_scripts[HB_ScriptCount];
+ HB_Buffer buffer;
+ HB_Script current_script;
+ int current_flags; /* HB_ShaperFlags */
+ HB_Bool has_opentype_kerning;
+ HB_Bool glyphs_substituted;
+ HB_GlyphAttributes *tmpAttributes;
+ unsigned int *tmpLogClusters;
+ int length;
+ int orig_nglyphs;
+} HB_FaceRec;
+
+typedef HB_Error (*HB_GetFontTableFunc)(void *font, HB_Tag tag, HB_Byte *buffer, HB_UInt *length);
+
+HB_Face HB_NewFace(void *font, HB_GetFontTableFunc tableFunc);
+void HB_FreeFace(HB_Face face);
+
+typedef struct {
+ HB_Fixed x, y;
+ HB_Fixed width, height;
+ HB_Fixed xOffset, yOffset;
+} HB_GlyphMetrics;
+
+typedef enum {
+ HB_FontAscent
+} HB_FontMetric;
+
+typedef struct {
+ HB_Bool (*convertStringToGlyphIndices)(HB_Font font, const HB_UChar16 *string, hb_uint32 length, HB_Glyph *glyphs, hb_uint32 *numGlyphs, HB_Bool rightToLeft);
+ void (*getGlyphAdvances)(HB_Font font, const HB_Glyph *glyphs, hb_uint32 numGlyphs, HB_Fixed *advances, int flags /*HB_ShaperFlag*/);
+ HB_Bool (*canRender)(HB_Font font, const HB_UChar16 *string, hb_uint32 length);
+ /* implementation needs to make sure to load a scaled glyph, so /no/ FT_LOAD_NO_SCALE */
+ HB_Error (*getPointInOutline)(HB_Font font, HB_Glyph glyph, int flags /*HB_ShaperFlag*/, hb_uint32 point, HB_Fixed *xpos, HB_Fixed *ypos, hb_uint32 *nPoints);
+ void (*getGlyphMetrics)(HB_Font font, HB_Glyph glyph, HB_GlyphMetrics *metrics);
+ HB_Fixed (*getFontMetric)(HB_Font font, HB_FontMetric metric);
+} HB_FontClass;
+
+typedef struct HB_Font_ {
+ const HB_FontClass *klass;
+
+ /* Metrics */
+ HB_UShort x_ppem, y_ppem;
+ HB_16Dot16 x_scale, y_scale;
+
+ void *userData;
+} HB_FontRec;
+
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(pop)
+#endif
+
+typedef struct HB_ShaperItem_ HB_ShaperItem;
+
+struct HB_ShaperItem_ {
+ const HB_UChar16 *string; /* input: the Unicode UTF16 text to be shaped */
+ hb_uint32 stringLength; /* input: the length of the input in 16-bit words */
+ HB_ScriptItem item; /* input: the current run to be shaped: a run of text all in the same script that is a substring of <string> */
+ HB_Font font; /* input: the font: scale, units and function pointers supplying glyph indices and metrics */
+ HB_Face face; /* input: the shaper state; current script, access to the OpenType tables , etc. */
+ int shaperFlags; /* input (unused) should be set to 0; intended to support flags defined in HB_ShaperFlag */
+ HB_Bool glyphIndicesPresent; /* input: true if the <glyphs> array contains glyph indices ready to be shaped */
+ hb_uint32 initialGlyphCount; /* input: if glyphIndicesPresent is true, the number of glyph indices in the <glyphs> array */
+
+ hb_uint32 num_glyphs; /* input: capacity of output arrays <glyphs>, <attributes>, <advances>, <offsets>, and <log_clusters>; */
+ /* output: required capacity (may be larger than actual capacity) */
+
+ HB_Glyph *glyphs; /* output: <num_glyphs> indices of shaped glyphs */
+ HB_GlyphAttributes *attributes; /* output: <num_glyphs> glyph attributes */
+ HB_Fixed *advances; /* output: <num_glyphs> advances */
+ HB_FixedPoint *offsets; /* output: <num_glyphs> offsets */
+ unsigned short *log_clusters; /* output: for each output glyph, the index in the input of the start of its logical cluster */
+ /* XXX the discription for log_clusters is wrong. It maps each input position to output glyph position! */
+
+ /* internal */
+ HB_Bool kerning_applied; /* output: true if kerning was applied by the shaper */
+};
+
+HB_Bool HB_ShapeItem(HB_ShaperItem *item);
+
+HB_END_HEADER
+
+#endif
diff --git a/src/hb-old/harfbuzz-stream-private.h b/src/hb-old/harfbuzz-stream-private.h
new file mode 100644
index 0000000..fbd9f81
--- /dev/null
+++ b/src/hb-old/harfbuzz-stream-private.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 1998-2004 David Turner and Werner Lemberg
+ * Copyright (C) 2006 Behdad Esfahbod
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#ifndef HARFBUZZ_STREAM_PRIVATE_H
+#define HARFBUZZ_STREAM_PRIVATE_H
+
+#include "harfbuzz-impl.h"
+#include "harfbuzz-stream.h"
+
+HB_BEGIN_HEADER
+
+HB_INTERNAL void
+_hb_close_stream( HB_Stream stream );
+
+HB_INTERNAL HB_Int
+_hb_stream_pos( HB_Stream stream );
+
+HB_INTERNAL HB_Error
+_hb_stream_seek( HB_Stream stream,
+ HB_UInt pos );
+
+HB_INTERNAL HB_Error
+_hb_stream_frame_enter( HB_Stream stream,
+ HB_UInt size );
+
+HB_INTERNAL void
+_hb_stream_frame_exit( HB_Stream stream );
+
+/* convenience macros */
+
+#define SET_ERR(c) ( (error = (c)) != 0 )
+
+#define GOTO_Table(tag) (0)
+#define FILE_Pos() _hb_stream_pos( stream )
+#define FILE_Seek(pos) SET_ERR( _hb_stream_seek( stream, pos ) )
+#define ACCESS_Frame(size) SET_ERR( _hb_stream_frame_enter( stream, size ) )
+#define FORGET_Frame() _hb_stream_frame_exit( stream )
+
+#define GET_Byte() (*stream->cursor++)
+#define GET_Short() (stream->cursor += 2, (HB_Short)( \
+ (*(((HB_Byte*)stream->cursor)-2) << 8) | \
+ *(((HB_Byte*)stream->cursor)-1) \
+ ))
+#define GET_Long() (stream->cursor += 4, (HB_Int)( \
+ (*(((HB_Byte*)stream->cursor)-4) << 24) | \
+ (*(((HB_Byte*)stream->cursor)-3) << 16) | \
+ (*(((HB_Byte*)stream->cursor)-2) << 8) | \
+ *(((HB_Byte*)stream->cursor)-1) \
+ ))
+
+
+#define GET_Char() ((HB_Char)GET_Byte())
+#define GET_UShort() ((HB_UShort)GET_Short())
+#define GET_ULong() ((HB_UInt)GET_Long())
+#define GET_Tag4() GET_ULong()
+
+HB_END_HEADER
+
+#endif /* HARFBUZZ_STREAM_PRIVATE_H */
diff --git a/src/hb-old/harfbuzz-stream.c b/src/hb-old/harfbuzz-stream.c
new file mode 100644
index 0000000..2d9638f
--- /dev/null
+++ b/src/hb-old/harfbuzz-stream.c
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2005 David Turner
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2007 Red Hat, Inc.
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#include "harfbuzz-impl.h"
+#include "harfbuzz-stream-private.h"
+#include <stdlib.h>
+
+#if 0
+#include <stdio.h>
+#define LOG(x) _hb_log x
+
+static void
+_hb_log( const char* format, ... )
+{
+ va_list ap;
+
+ va_start( ap, format );
+ vfprintf( stderr, format, ap );
+ va_end( ap );
+}
+
+#else
+#define LOG(x) do {} while (0)
+#endif
+
+HB_INTERNAL void
+_hb_close_stream( HB_Stream stream )
+{
+ if (!stream)
+ return;
+ free(stream->base);
+ free(stream);
+}
+
+
+HB_INTERNAL HB_Int
+_hb_stream_pos( HB_Stream stream )
+{
+ LOG(( "_hb_stream_pos() -> %ld\n", stream->pos ));
+ return stream->pos;
+}
+
+
+HB_INTERNAL HB_Error
+_hb_stream_seek( HB_Stream stream,
+ HB_UInt pos )
+{
+ HB_Error error = (HB_Error)0;
+
+ stream->pos = pos;
+ if (pos > stream->size)
+ error = ERR(HB_Err_Read_Error);
+
+ LOG(( "_hb_stream_seek(%ld) -> 0x%04X\n", pos, error ));
+ return error;
+}
+
+
+HB_INTERNAL HB_Error
+_hb_stream_frame_enter( HB_Stream stream,
+ HB_UInt count )
+{
+ HB_Error error = HB_Err_Ok;
+
+ /* check new position, watch for overflow */
+ if (HB_UNLIKELY (stream->pos + count > stream->size ||
+ stream->pos + count < stream->pos))
+ {
+ error = ERR(HB_Err_Read_Error);
+ goto Exit;
+ }
+
+ /* set cursor */
+ stream->cursor = stream->base + stream->pos;
+ stream->pos += count;
+
+Exit:
+ LOG(( "_hb_stream_frame_enter(%ld) -> 0x%04X\n", count, error ));
+ return error;
+}
+
+
+HB_INTERNAL void
+_hb_stream_frame_exit( HB_Stream stream )
+{
+ stream->cursor = NULL;
+
+ LOG(( "_hb_stream_frame_exit()\n" ));
+}
diff --git a/src/hb-old/harfbuzz-stream.h b/src/hb-old/harfbuzz-stream.h
new file mode 100644
index 0000000..a155cc2
--- /dev/null
+++ b/src/hb-old/harfbuzz-stream.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2005 David Turner
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#ifndef HARFBUZZ_STREAM_H
+#define HARFBUZZ_STREAM_H
+
+#include "harfbuzz-global.h"
+
+HB_BEGIN_HEADER
+
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(push, 1)
+#endif
+
+typedef struct HB_StreamRec_
+{
+ HB_Byte* base;
+ HB_Byte* cursor;
+ HB_UInt size;
+ HB_UInt pos;
+} HB_StreamRec;
+
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(pop)
+#endif
+
+HB_END_HEADER
+
+#endif
diff --git a/src/hb-old/harfbuzz-tibetan.c b/src/hb-old/harfbuzz-tibetan.c
new file mode 100644
index 0000000..8b3e953
--- /dev/null
+++ b/src/hb-old/harfbuzz-tibetan.c
@@ -0,0 +1,249 @@
+/*
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#include "harfbuzz-shaper.h"
+#include "harfbuzz-shaper-private.h"
+
+#include <assert.h>
+
+/*
+ tibetan syllables are of the form:
+ head position consonant
+ first sub-joined consonant
+ ....intermediate sub-joined consonants (if any)
+ last sub-joined consonant
+ sub-joined vowel (a-chung U+0F71)
+ standard or compound vowel sign (or 'virama' for devanagari transliteration)
+*/
+
+typedef enum {
+ TibetanOther,
+ TibetanHeadConsonant,
+ TibetanSubjoinedConsonant,
+ TibetanSubjoinedVowel,
+ TibetanVowel
+} TibetanForm;
+
+/* this table starts at U+0f40 */
+static const unsigned char tibetanForm[0x80] = {
+ TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant,
+ TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant,
+ TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant,
+ TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant,
+
+ TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant,
+ TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant,
+ TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant,
+ TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant,
+
+ TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant,
+ TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant,
+ TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant, TibetanHeadConsonant,
+ TibetanOther, TibetanOther, TibetanOther, TibetanOther,
+
+ TibetanOther, TibetanVowel, TibetanVowel, TibetanVowel,
+ TibetanVowel, TibetanVowel, TibetanVowel, TibetanVowel,
+ TibetanVowel, TibetanVowel, TibetanVowel, TibetanVowel,
+ TibetanVowel, TibetanVowel, TibetanVowel, TibetanVowel,
+
+ TibetanVowel, TibetanVowel, TibetanVowel, TibetanVowel,
+ TibetanVowel, TibetanVowel, TibetanVowel, TibetanVowel,
+ TibetanOther, TibetanOther, TibetanOther, TibetanOther,
+ TibetanOther, TibetanOther, TibetanOther, TibetanOther,
+
+ TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant,
+ TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant,
+ TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant,
+ TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant,
+
+ TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant,
+ TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant,
+ TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant,
+ TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant,
+
+ TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant,
+ TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant,
+ TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConsonant,
+ TibetanSubjoinedConsonant, TibetanOther, TibetanOther, TibetanOther
+};
+
+
+#define tibetan_form(c) \
+ ((c) >= 0x0f40 && (c) < 0x0fc0 ? (TibetanForm)tibetanForm[(c) - 0x0f40] : TibetanOther)
+
+static const HB_OpenTypeFeature tibetan_features[] = {
+ { HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty },
+ { HB_MAKE_TAG('a', 'b', 'v', 's'), AboveSubstProperty },
+ { HB_MAKE_TAG('b', 'l', 'w', 's'), BelowSubstProperty },
+ { HB_MAKE_TAG('c', 'a', 'l', 't'), CaltProperty },
+ {0, 0}
+};
+
+static HB_Bool tibetan_shape_syllable(HB_Bool openType, HB_ShaperItem *item, HB_Bool invalid)
+{
+ hb_uint32 i;
+ const HB_UChar16 *str = item->string + item->item.pos;
+ int len = item->item.length;
+#ifndef NO_OPENTYPE
+ const int availableGlyphs = item->num_glyphs;
+#endif
+ HB_Bool haveGlyphs;
+ HB_STACKARRAY(HB_UChar16, reordered, len + 4);
+
+ if (item->num_glyphs < item->item.length + 4) {
+ item->num_glyphs = item->item.length + 4;
+ HB_FREE_STACKARRAY(reordered);
+ return FALSE;
+ }
+
+ if (invalid) {
+ *reordered = 0x25cc;
+ memcpy(reordered+1, str, len*sizeof(HB_UChar16));
+ len++;
+ str = reordered;
+ }
+
+ haveGlyphs = item->font->klass->convertStringToGlyphIndices(item->font,
+ str, len,
+ item->glyphs, &item->num_glyphs,
+ item->item.bidiLevel % 2);
+
+ HB_FREE_STACKARRAY(reordered);
+
+ if (!haveGlyphs)
+ return FALSE;
+
+ for (i = 0; i < item->item.length; i++) {
+ item->attributes[i].mark = FALSE;
+ item->attributes[i].clusterStart = FALSE;
+ item->attributes[i].justification = 0;
+ item->attributes[i].zeroWidth = FALSE;
+/* IDEBUG(" %d: %4x", i, str[i]); */
+ }
+
+ /* now we have the syllable in the right order, and can start running it through open type. */
+
+#ifndef NO_OPENTYPE
+ if (openType) {
+ HB_OpenTypeShape(item, /*properties*/0);
+ if (!HB_OpenTypePosition(item, availableGlyphs, /*doLogClusters*/FALSE))
+ return FALSE;
+ } else {
+ HB_HeuristicPosition(item);
+ }
+#endif
+
+ item->attributes[0].clusterStart = TRUE;
+ return TRUE;
+}
+
+
+static int tibetan_nextSyllableBoundary(const HB_UChar16 *s, int start, int end, HB_Bool *invalid)
+{
+ const HB_UChar16 *uc = s + start;
+
+ int pos = 0;
+ TibetanForm state = tibetan_form(*uc);
+
+/* qDebug("state[%d]=%d (uc=%4x)", pos, state, uc[pos]);*/
+ pos++;
+
+ if (state != TibetanHeadConsonant) {
+ if (state != TibetanOther)
+ *invalid = TRUE;
+ goto finish;
+ }
+
+ while (pos < end - start) {
+ TibetanForm newState = tibetan_form(uc[pos]);
+ switch(newState) {
+ case TibetanSubjoinedConsonant:
+ case TibetanSubjoinedVowel:
+ if (state != TibetanHeadConsonant &&
+ state != TibetanSubjoinedConsonant)
+ goto finish;
+ state = newState;
+ break;
+ case TibetanVowel:
+ if (state != TibetanHeadConsonant &&
+ state != TibetanSubjoinedConsonant &&
+ state != TibetanSubjoinedVowel)
+ goto finish;
+ break;
+ case TibetanOther:
+ case TibetanHeadConsonant:
+ goto finish;
+ }
+ pos++;
+ }
+
+finish:
+ *invalid = FALSE;
+ return start+pos;
+}
+
+HB_Bool HB_TibetanShape(HB_ShaperItem *item)
+{
+
+ HB_Bool openType = FALSE;
+ unsigned short *logClusters = item->log_clusters;
+
+ HB_ShaperItem syllable = *item;
+ int first_glyph = 0;
+
+ int sstart = item->item.pos;
+ int end = sstart + item->item.length;
+
+ assert(item->item.script == HB_Script_Tibetan);
+
+#ifndef QT_NO_OPENTYPE
+ openType = HB_SelectScript(item, tibetan_features);
+#endif
+
+ while (sstart < end) {
+ HB_Bool invalid;
+ int i;
+ int send = tibetan_nextSyllableBoundary(item->string, sstart, end, &invalid);
+/* IDEBUG("syllable from %d, length %d, invalid=%s", sstart, send-sstart,
+ invalid ? "TRUE" : "FALSE"); */
+ syllable.item.pos = sstart;
+ syllable.item.length = send-sstart;
+ syllable.glyphs = item->glyphs + first_glyph;
+ syllable.attributes = item->attributes + first_glyph;
+ syllable.offsets = item->offsets + first_glyph;
+ syllable.advances = item->advances + first_glyph;
+ syllable.num_glyphs = item->num_glyphs - first_glyph;
+ if (!tibetan_shape_syllable(openType, &syllable, invalid)) {
+ item->num_glyphs += syllable.num_glyphs;
+ return FALSE;
+ }
+ /* fix logcluster array */
+ for (i = sstart; i < send; ++i)
+ logClusters[i-item->item.pos] = first_glyph;
+ sstart = send;
+ first_glyph += syllable.num_glyphs;
+ }
+ item->num_glyphs = first_glyph;
+ return TRUE;
+}
diff --git a/src/hb-old/harfbuzz.h b/src/hb-old/harfbuzz.h
new file mode 100644
index 0000000..e91a33e
--- /dev/null
+++ b/src/hb-old/harfbuzz.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 1998-2004 David Turner and Werner Lemberg
+ * Copyright (C) 2006 Behdad Esfahbod
+ *
+ * This is part of HarfBuzz, an OpenType Layout engine 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.
+ */
+
+#ifndef HARFBUZZ_H
+#define HARFBUZZ_H
+
+#include "harfbuzz-external.h"
+#include "harfbuzz-global.h"
+#include "harfbuzz-buffer.h"
+#include "harfbuzz-gdef.h"
+#include "harfbuzz-gsub.h"
+#include "harfbuzz-gpos.h"
+#include "harfbuzz-open.h"
+#include "harfbuzz-shaper.h"
+
+#endif /* HARFBUZZ_OPEN_H */
diff --git a/src/hb-open-file-private.hh b/src/hb-open-file-private.hh
new file mode 100644
index 0000000..e2d4a2c
--- /dev/null
+++ b/src/hb-open-file-private.hh
@@ -0,0 +1,257 @@
+/*
+ * Copyright © 2007,2008,2009 Red Hat, Inc.
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OPEN_FILE_PRIVATE_HH
+#define HB_OPEN_FILE_PRIVATE_HH
+
+#include "hb-open-type-private.hh"
+
+
+
+/*
+ *
+ * The OpenType Font File
+ *
+ */
+
+
+/*
+ * Organization of an OpenType Font
+ */
+
+struct OpenTypeFontFile;
+struct OffsetTable;
+struct TTCHeader;
+
+
+typedef struct TableRecord
+{
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this));
+ }
+
+ Tag tag; /* 4-byte identifier. */
+ CheckSum checkSum; /* CheckSum for this table. */
+ ULONG offset; /* Offset from beginning of TrueType font
+ * file. */
+ ULONG length; /* Length of this table. */
+ public:
+ DEFINE_SIZE_STATIC (16);
+} OpenTypeTable;
+
+typedef struct OffsetTable
+{
+ friend struct OpenTypeFontFile;
+
+ inline unsigned int get_table_count (void) const
+ { return numTables; }
+ inline const TableRecord& get_table (unsigned int i) const
+ {
+ if (unlikely (i >= numTables)) return Null(TableRecord);
+ return tables[i];
+ }
+ inline bool find_table_index (hb_tag_t tag, unsigned int *table_index) const
+ {
+ Tag t;
+ t.set (tag);
+ unsigned int count = numTables;
+ for (unsigned int i = 0; i < count; i++)
+ {
+ if (t == tables[i].tag)
+ {
+ if (table_index) *table_index = i;
+ return true;
+ }
+ }
+ if (table_index) *table_index = Index::NOT_FOUND_INDEX;
+ return false;
+ }
+ inline const TableRecord& get_table_by_tag (hb_tag_t tag) const
+ {
+ unsigned int table_index;
+ find_table_index (tag, &table_index);
+ return get_table (table_index);
+ }
+
+ public:
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this) && c->check_array (tables, TableRecord::static_size, numTables));
+ }
+
+ protected:
+ Tag sfnt_version; /* '\0\001\0\00' if TrueType / 'OTTO' if CFF */
+ USHORT numTables; /* Number of tables. */
+ USHORT searchRange; /* (Maximum power of 2 <= numTables) x 16 */
+ USHORT entrySelector; /* Log2(maximum power of 2 <= numTables). */
+ USHORT rangeShift; /* NumTables x 16-searchRange. */
+ TableRecord tables[VAR]; /* TableRecord entries. numTables items */
+ public:
+ DEFINE_SIZE_ARRAY (12, tables);
+} OpenTypeFontFace;
+
+
+/*
+ * TrueType Collections
+ */
+
+struct TTCHeaderVersion1
+{
+ friend struct TTCHeader;
+
+ inline unsigned int get_face_count (void) const { return table.len; }
+ inline const OpenTypeFontFace& get_face (unsigned int i) const { return this+table[i]; }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (table.sanitize (c, this));
+ }
+
+ protected:
+ Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */
+ FixedVersion version; /* Version of the TTC Header (1.0),
+ * 0x00010000 */
+ LongOffsetLongArrayOf<OffsetTable>
+ table; /* Array of offsets to the OffsetTable for each font
+ * from the beginning of the file */
+ public:
+ DEFINE_SIZE_ARRAY (12, table);
+};
+
+struct TTCHeader
+{
+ friend struct OpenTypeFontFile;
+
+ private:
+
+ inline unsigned int get_face_count (void) const
+ {
+ switch (u.header.version.major) {
+ case 2: /* version 2 is compatible with version 1 */
+ case 1: return u.version1.get_face_count ();
+ default:return 0;
+ }
+ }
+ inline const OpenTypeFontFace& get_face (unsigned int i) const
+ {
+ switch (u.header.version.major) {
+ case 2: /* version 2 is compatible with version 1 */
+ case 1: return u.version1.get_face (i);
+ default:return Null(OpenTypeFontFace);
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (unlikely (!u.header.version.sanitize (c))) return TRACE_RETURN (false);
+ switch (u.header.version.major) {
+ case 2: /* version 2 is compatible with version 1 */
+ case 1: return TRACE_RETURN (u.version1.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ struct {
+ Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */
+ FixedVersion version; /* Version of the TTC Header (1.0 or 2.0),
+ * 0x00010000 or 0x00020000 */
+ } header;
+ TTCHeaderVersion1 version1;
+ } u;
+};
+
+
+/*
+ * OpenType Font File
+ */
+
+struct OpenTypeFontFile
+{
+ static const hb_tag_t CFFTag = HB_TAG ('O','T','T','O'); /* OpenType with Postscript outlines */
+ static const hb_tag_t TrueTypeTag = HB_TAG ( 0 , 1 , 0 , 0 ); /* OpenType with TrueType outlines */
+ static const hb_tag_t TTCTag = HB_TAG ('t','t','c','f'); /* TrueType Collection */
+ static const hb_tag_t TrueTag = HB_TAG ('t','r','u','e'); /* Obsolete Apple TrueType */
+ static const hb_tag_t Typ1Tag = HB_TAG ('t','y','p','1'); /* Obsolete Apple Type1 font in SFNT container */
+
+ inline hb_tag_t get_tag (void) const { return u.tag; }
+
+ inline unsigned int get_face_count (void) const
+ {
+ switch (u.tag) {
+ case CFFTag: /* All the non-collection tags */
+ case TrueTag:
+ case Typ1Tag:
+ case TrueTypeTag: return 1;
+ case TTCTag: return u.ttcHeader.get_face_count ();
+ default: return 0;
+ }
+ }
+ inline const OpenTypeFontFace& get_face (unsigned int i) const
+ {
+ switch (u.tag) {
+ /* Note: for non-collection SFNT data we ignore index. This is because
+ * Apple dfont container is a container of SFNT's. So each SFNT is a
+ * non-TTC, but the index is more than zero. */
+ case CFFTag: /* All the non-collection tags */
+ case TrueTag:
+ case Typ1Tag:
+ case TrueTypeTag: return u.fontFace;
+ case TTCTag: return u.ttcHeader.get_face (i);
+ default: return Null(OpenTypeFontFace);
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (unlikely (!u.tag.sanitize (c))) return TRACE_RETURN (false);
+ switch (u.tag) {
+ case CFFTag: /* All the non-collection tags */
+ case TrueTag:
+ case Typ1Tag:
+ case TrueTypeTag: return TRACE_RETURN (u.fontFace.sanitize (c));
+ case TTCTag: return TRACE_RETURN (u.ttcHeader.sanitize (c));
+ default: return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ Tag tag; /* 4-byte identifier. */
+ OpenTypeFontFace fontFace;
+ TTCHeader ttcHeader;
+ } u;
+ public:
+ DEFINE_SIZE_UNION (4, tag);
+};
+
+
+
+#endif /* HB_OPEN_FILE_PRIVATE_HH */
diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh
new file mode 100644
index 0000000..4d8c507
--- /dev/null
+++ b/src/hb-open-type-private.hh
@@ -0,0 +1,718 @@
+/*
+ * Copyright © 2007,2008,2009,2010 Red Hat, Inc.
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OPEN_TYPE_PRIVATE_HH
+#define HB_OPEN_TYPE_PRIVATE_HH
+
+#include "hb-private.hh"
+
+#include "hb-blob.h"
+
+
+
+/*
+ * Casts
+ */
+
+/* Cast to struct T, reference to reference */
+template<typename Type, typename TObject>
+inline const Type& CastR(const TObject &X)
+{ return reinterpret_cast<const Type&> (X); }
+template<typename Type, typename TObject>
+inline Type& CastR(TObject &X)
+{ return reinterpret_cast<Type&> (X); }
+
+/* Cast to struct T, pointer to pointer */
+template<typename Type, typename TObject>
+inline const Type* CastP(const TObject *X)
+{ return reinterpret_cast<const Type*> (X); }
+template<typename Type, typename TObject>
+inline Type* CastP(TObject *X)
+{ return reinterpret_cast<Type*> (X); }
+
+/* StructAtOffset<T>(P,Ofs) returns the struct T& that is placed at memory
+ * location pointed to by P plus Ofs bytes. */
+template<typename Type>
+inline const Type& StructAtOffset(const void *P, unsigned int offset)
+{ return * reinterpret_cast<const Type*> ((const char *) P + offset); }
+template<typename Type>
+inline Type& StructAtOffset(void *P, unsigned int offset)
+{ return * reinterpret_cast<Type*> ((char *) P + offset); }
+
+/* StructAfter<T>(X) returns the struct T& that is placed after X.
+ * Works with X of variable size also. X must implement get_size() */
+template<typename Type, typename TObject>
+inline const Type& StructAfter(const TObject &X)
+{ return StructAtOffset<Type>(&X, X.get_size()); }
+template<typename Type, typename TObject>
+inline Type& StructAfter(TObject &X)
+{ return StructAtOffset<Type>(&X, X.get_size()); }
+
+
+
+/*
+ * Size checking
+ */
+
+/* Check _assertion in a method environment */
+#define _DEFINE_INSTANCE_ASSERTION1(_line, _assertion) \
+ inline void _instance_assertion_on_line_##_line (void) const \
+ { \
+ ASSERT_STATIC (_assertion); \
+ ASSERT_INSTANCE_POD (*this); /* Make sure it's POD. */ \
+ }
+# define _DEFINE_INSTANCE_ASSERTION0(_line, _assertion) _DEFINE_INSTANCE_ASSERTION1 (_line, _assertion)
+# define DEFINE_INSTANCE_ASSERTION(_assertion) _DEFINE_INSTANCE_ASSERTION0 (__LINE__, _assertion)
+
+/* Check that _code compiles in a method environment */
+#define _DEFINE_COMPILES_ASSERTION1(_line, _code) \
+ inline void _compiles_assertion_on_line_##_line (void) const \
+ { _code; }
+# define _DEFINE_COMPILES_ASSERTION0(_line, _code) _DEFINE_COMPILES_ASSERTION1 (_line, _code)
+# define DEFINE_COMPILES_ASSERTION(_code) _DEFINE_COMPILES_ASSERTION0 (__LINE__, _code)
+
+
+#define DEFINE_SIZE_STATIC(size) \
+ DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size)); \
+ static const unsigned int static_size = (size); \
+ static const unsigned int min_size = (size)
+
+/* Size signifying variable-sized array */
+#define VAR 1
+
+#define DEFINE_SIZE_UNION(size, _member) \
+ DEFINE_INSTANCE_ASSERTION (this->u._member.static_size == (size)); \
+ static const unsigned int min_size = (size)
+
+#define DEFINE_SIZE_MIN(size) \
+ DEFINE_INSTANCE_ASSERTION (sizeof (*this) >= (size)); \
+ static const unsigned int min_size = (size)
+
+#define DEFINE_SIZE_ARRAY(size, array) \
+ DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + sizeof (array[0])); \
+ DEFINE_COMPILES_ASSERTION ((void) array[0].static_size) \
+ static const unsigned int min_size = (size)
+
+#define DEFINE_SIZE_ARRAY2(size, array1, array2) \
+ DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + sizeof (this->array1[0]) + sizeof (this->array2[0])); \
+ DEFINE_COMPILES_ASSERTION ((void) array1[0].static_size; (void) array2[0].static_size) \
+ static const unsigned int min_size = (size)
+
+
+
+/*
+ * Null objects
+ */
+
+/* Global nul-content Null pool. Enlarge as necessary. */
+/* TODO This really should be a extern HB_INTERNAL and defined somewhere... */
+static const void *_NullPool[64 / sizeof (void *)];
+
+/* Generic nul-content Null objects. */
+template <typename Type>
+static inline const Type& Null (void) {
+ ASSERT_STATIC (Type::min_size <= sizeof (_NullPool));
+ return *CastP<Type> (_NullPool);
+}
+
+/* Specializaiton for arbitrary-content arbitrary-sized Null objects. */
+#define DEFINE_NULL_DATA(Type, data) \
+static const char _Null##Type[Type::min_size + 1] = data; /* +1 is for nul-termination in data */ \
+template <> \
+inline const Type& Null<Type> (void) { \
+ return *CastP<Type> (_Null##Type); \
+} /* The following line really exists such that we end in a place needing semicolon */ \
+ASSERT_STATIC (Type::min_size + 1 <= sizeof (_Null##Type))
+
+/* Accessor macro. */
+#define Null(Type) Null<Type>()
+
+
+
+/*
+ * Sanitize
+ */
+
+#ifndef HB_DEBUG_SANITIZE
+#define HB_DEBUG_SANITIZE (HB_DEBUG+0)
+#endif
+
+
+#define TRACE_SANITIZE() \
+ hb_auto_trace_t<HB_DEBUG_SANITIZE> trace (&c->debug_depth, "SANITIZE", this, HB_FUNC, "");
+
+
+struct hb_sanitize_context_t
+{
+ inline void init (hb_blob_t *b)
+ {
+ this->blob = hb_blob_reference (b);
+ this->writable = false;
+ }
+
+ inline void start_processing (void)
+ {
+ this->start = hb_blob_get_data (this->blob, NULL);
+ this->end = this->start + hb_blob_get_length (this->blob);
+ this->edit_count = 0;
+ this->debug_depth = 0;
+
+ DEBUG_MSG_LEVEL (SANITIZE, this->blob, 0, +1,
+ "start [%p..%p] (%lu bytes)",
+ this->start, this->end,
+ (unsigned long) (this->end - this->start));
+ }
+
+ inline void end_processing (void)
+ {
+ DEBUG_MSG_LEVEL (SANITIZE, this->blob, 0, -1,
+ "end [%p..%p] %u edit requests",
+ this->start, this->end, this->edit_count);
+
+ hb_blob_destroy (this->blob);
+ this->blob = NULL;
+ this->start = this->end = NULL;
+ }
+
+ inline bool check_range (const void *base, unsigned int len) const
+ {
+ const char *p = (const char *) base;
+
+ hb_auto_trace_t<HB_DEBUG_SANITIZE> trace (&this->debug_depth, "SANITIZE", this->blob, NULL,
+ "check_range [%p..%p] (%d bytes) in [%p..%p]",
+ p, p + len, len,
+ this->start, this->end);
+
+ return TRACE_RETURN (likely (this->start <= p && p <= this->end && (unsigned int) (this->end - p) >= len));
+ }
+
+ inline bool check_array (const void *base, unsigned int record_size, unsigned int len) const
+ {
+ const char *p = (const char *) base;
+ bool overflows = _hb_unsigned_int_mul_overflows (len, record_size);
+
+ hb_auto_trace_t<HB_DEBUG_SANITIZE> trace (&this->debug_depth, "SANITIZE", this->blob, NULL,
+ "check_array [%p..%p] (%d*%d=%ld bytes) in [%p..%p]",
+ p, p + (record_size * len), record_size, len, (unsigned long) record_size * len,
+ this->start, this->end);
+
+ return TRACE_RETURN (likely (!overflows && this->check_range (base, record_size * len)));
+ }
+
+ template <typename Type>
+ inline bool check_struct (const Type *obj) const
+ {
+ return likely (this->check_range (obj, obj->min_size));
+ }
+
+ inline bool may_edit (const void *base HB_UNUSED, unsigned int len HB_UNUSED)
+ {
+ const char *p = (const char *) base;
+ this->edit_count++;
+
+ hb_auto_trace_t<HB_DEBUG_SANITIZE> trace (&this->debug_depth, "SANITIZE", this->blob, NULL,
+ "may_edit(%u) [%p..%p] (%d bytes) in [%p..%p] -> %s",
+ this->edit_count,
+ p, p + len, len,
+ this->start, this->end);
+
+ return TRACE_RETURN (this->writable);
+ }
+
+ mutable unsigned int debug_depth;
+ const char *start, *end;
+ bool writable;
+ unsigned int edit_count;
+ hb_blob_t *blob;
+};
+
+
+
+/* Template to sanitize an object. */
+template <typename Type>
+struct Sanitizer
+{
+ static hb_blob_t *sanitize (hb_blob_t *blob) {
+ hb_sanitize_context_t c[1] = {{0}};
+ bool sane;
+
+ /* TODO is_sane() stuff */
+
+ c->init (blob);
+
+ retry:
+ DEBUG_MSG_FUNC (SANITIZE, blob, "start");
+
+ c->start_processing ();
+
+ if (unlikely (!c->start)) {
+ c->end_processing ();
+ return blob;
+ }
+
+ Type *t = CastP<Type> (const_cast<char *> (c->start));
+
+ sane = t->sanitize (c);
+ if (sane) {
+ if (c->edit_count) {
+ DEBUG_MSG_FUNC (SANITIZE, blob, "passed first round with %d edits; going for second round", c->edit_count);
+
+ /* sanitize again to ensure no toe-stepping */
+ c->edit_count = 0;
+ sane = t->sanitize (c);
+ if (c->edit_count) {
+ DEBUG_MSG_FUNC (SANITIZE, blob, "requested %d edits in second round; FAILLING", c->edit_count);
+ sane = false;
+ }
+ }
+ } else {
+ unsigned int edit_count = c->edit_count;
+ if (edit_count && !c->writable) {
+ c->start = hb_blob_get_data_writable (blob, NULL);
+ c->end = c->start + hb_blob_get_length (blob);
+
+ if (c->start) {
+ c->writable = true;
+ /* ok, we made it writable by relocating. try again */
+ DEBUG_MSG_FUNC (SANITIZE, blob, "retry");
+ goto retry;
+ }
+ }
+ }
+
+ c->end_processing ();
+
+ DEBUG_MSG_FUNC (SANITIZE, blob, sane ? "PASSED" : "FAILED");
+ if (sane)
+ return blob;
+ else {
+ hb_blob_destroy (blob);
+ return hb_blob_get_empty ();
+ }
+ }
+
+ static const Type* lock_instance (hb_blob_t *blob) {
+ hb_blob_make_immutable (blob);
+ const char *base = hb_blob_get_data (blob, NULL);
+ return unlikely (!base) ? &Null(Type) : CastP<Type> (base);
+ }
+};
+
+
+
+
+/*
+ *
+ * The OpenType Font File: Data Types
+ */
+
+
+/* "The following data types are used in the OpenType font file.
+ * All OpenType fonts use Motorola-style byte ordering (Big Endian):" */
+
+/*
+ * Int types
+ */
+
+
+template <typename Type, int Bytes> struct BEInt;
+
+template <typename Type>
+struct BEInt<Type, 2>
+{
+ public:
+ inline void set (Type i) { hb_be_uint16_put (v,i); }
+ inline operator Type (void) const { return hb_be_uint16_get (v); }
+ inline bool operator == (const BEInt<Type, 2>& o) const { return hb_be_uint16_eq (v, o.v); }
+ inline bool operator != (const BEInt<Type, 2>& o) const { return !(*this == o); }
+ private: uint8_t v[2];
+};
+template <typename Type>
+struct BEInt<Type, 4>
+{
+ public:
+ inline void set (Type i) { hb_be_uint32_put (v,i); }
+ inline operator Type (void) const { return hb_be_uint32_get (v); }
+ inline bool operator == (const BEInt<Type, 4>& o) const { return hb_be_uint32_eq (v, o.v); }
+ inline bool operator != (const BEInt<Type, 4>& o) const { return !(*this == o); }
+ private: uint8_t v[4];
+};
+
+/* Integer types in big-endian order and no alignment requirement */
+template <typename Type>
+struct IntType
+{
+ inline void set (Type i) { v.set (i); }
+ inline operator Type(void) const { return v; }
+ inline bool operator == (const IntType<Type> &o) const { return v == o.v; }
+ inline bool operator != (const IntType<Type> &o) const { return v != o.v; }
+ inline int cmp (Type a) const { Type b = v; return a < b ? -1 : a == b ? 0 : +1; }
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (likely (c->check_struct (this)));
+ }
+ protected:
+ BEInt<Type, sizeof (Type)> v;
+ public:
+ DEFINE_SIZE_STATIC (sizeof (Type));
+};
+
+/* Typedef these to avoid clash with windows.h */
+#define USHORT HB_USHORT
+#define SHORT HB_SHORT
+#define ULONG HB_ULONG
+#define LONG HB_LONG
+typedef IntType<uint16_t> USHORT; /* 16-bit unsigned integer. */
+typedef IntType<int16_t> SHORT; /* 16-bit signed integer. */
+typedef IntType<uint32_t> ULONG; /* 32-bit unsigned integer. */
+typedef IntType<int32_t> LONG; /* 32-bit signed integer. */
+
+/* 16-bit signed integer (SHORT) that describes a quantity in FUnits. */
+typedef SHORT FWORD;
+
+/* 16-bit unsigned integer (USHORT) that describes a quantity in FUnits. */
+typedef USHORT UFWORD;
+
+/* Date represented in number of seconds since 12:00 midnight, January 1,
+ * 1904. The value is represented as a signed 64-bit integer. */
+struct LONGDATETIME
+{
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (likely (c->check_struct (this)));
+ }
+ private:
+ LONG major;
+ ULONG minor;
+ public:
+ DEFINE_SIZE_STATIC (8);
+};
+
+/* Array of four uint8s (length = 32 bits) used to identify a script, language
+ * system, feature, or baseline */
+struct Tag : ULONG
+{
+ /* What the char* converters return is NOT nul-terminated. Print using "%.4s" */
+ inline operator const char* (void) const { return reinterpret_cast<const char *> (&this->v); }
+ inline operator char* (void) { return reinterpret_cast<char *> (&this->v); }
+ public:
+ DEFINE_SIZE_STATIC (4);
+};
+DEFINE_NULL_DATA (Tag, " ");
+
+/* Glyph index number, same as uint16 (length = 16 bits) */
+typedef USHORT GlyphID;
+
+/* Script/language-system/feature index */
+struct Index : USHORT {
+ static const unsigned int NOT_FOUND_INDEX = 0xFFFF;
+};
+DEFINE_NULL_DATA (Index, "\xff\xff");
+
+/* Offset to a table, same as uint16 (length = 16 bits), Null offset = 0x0000 */
+typedef USHORT Offset;
+
+/* LongOffset to a table, same as uint32 (length = 32 bits), Null offset = 0x00000000 */
+typedef ULONG LongOffset;
+
+
+/* CheckSum */
+struct CheckSum : ULONG
+{
+ static uint32_t CalcTableChecksum (ULONG *Table, uint32_t Length)
+ {
+ uint32_t Sum = 0L;
+ ULONG *EndPtr = Table+((Length+3) & ~3) / ULONG::static_size;
+
+ while (Table < EndPtr)
+ Sum += *Table++;
+ return Sum;
+ }
+ public:
+ DEFINE_SIZE_STATIC (4);
+};
+
+
+/*
+ * Version Numbers
+ */
+
+struct FixedVersion
+{
+ inline uint32_t to_int (void) const { return (major << 16) + minor; }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this));
+ }
+
+ USHORT major;
+ USHORT minor;
+ public:
+ DEFINE_SIZE_STATIC (4);
+};
+
+
+
+/*
+ * Template subclasses of Offset and LongOffset that do the dereferencing.
+ * Use: (base+offset)
+ */
+
+template <typename OffsetType, typename Type>
+struct GenericOffsetTo : OffsetType
+{
+ inline const Type& operator () (const void *base) const
+ {
+ unsigned int offset = *this;
+ if (unlikely (!offset)) return Null(Type);
+ return StructAtOffset<Type> (base, offset);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c, void *base) {
+ TRACE_SANITIZE ();
+ if (unlikely (!c->check_struct (this))) return TRACE_RETURN (false);
+ unsigned int offset = *this;
+ if (unlikely (!offset)) return TRACE_RETURN (true);
+ Type &obj = StructAtOffset<Type> (base, offset);
+ return TRACE_RETURN (likely (obj.sanitize (c)) || neuter (c));
+ }
+ template <typename T>
+ inline bool sanitize (hb_sanitize_context_t *c, void *base, T user_data) {
+ TRACE_SANITIZE ();
+ if (unlikely (!c->check_struct (this))) return TRACE_RETURN (false);
+ unsigned int offset = *this;
+ if (unlikely (!offset)) return TRACE_RETURN (true);
+ Type &obj = StructAtOffset<Type> (base, offset);
+ return TRACE_RETURN (likely (obj.sanitize (c, user_data)) || neuter (c));
+ }
+
+ private:
+ /* Set the offset to Null */
+ inline bool neuter (hb_sanitize_context_t *c) {
+ if (c->may_edit (this, this->static_size)) {
+ this->set (0); /* 0 is Null offset */
+ return true;
+ }
+ return false;
+ }
+};
+template <typename Base, typename OffsetType, typename Type>
+inline const Type& operator + (const Base &base, GenericOffsetTo<OffsetType, Type> offset) { return offset (base); }
+
+template <typename Type>
+struct OffsetTo : GenericOffsetTo<Offset, Type> {};
+
+template <typename Type>
+struct LongOffsetTo : GenericOffsetTo<LongOffset, Type> {};
+
+
+/*
+ * Array Types
+ */
+
+template <typename LenType, typename Type>
+struct GenericArrayOf
+{
+ const Type *sub_array (unsigned int start_offset, unsigned int *pcount /* IN/OUT */) const
+ {
+ unsigned int count = len;
+ if (unlikely (start_offset > count))
+ count = 0;
+ else
+ count -= start_offset;
+ count = MIN (count, *pcount);
+ *pcount = count;
+ return array + start_offset;
+ }
+
+ inline const Type& operator [] (unsigned int i) const
+ {
+ if (unlikely (i >= len)) return Null(Type);
+ return array[i];
+ }
+ inline unsigned int get_size (void) const
+ { return len.static_size + len * Type::static_size; }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (unlikely (!sanitize_shallow (c))) return TRACE_RETURN (false);
+
+ /* Note: for structs that do not reference other structs,
+ * we do not need to call their sanitize() as we already did
+ * a bound check on the aggregate array size. We just include
+ * a small unreachable expression to make sure the structs
+ * pointed to do have a simple sanitize(), ie. they do not
+ * reference other structs via offsets.
+ */
+ (void) (false && array[0].sanitize (c));
+
+ return TRACE_RETURN (true);
+ }
+ inline bool sanitize (hb_sanitize_context_t *c, void *base) {
+ TRACE_SANITIZE ();
+ if (unlikely (!sanitize_shallow (c))) return TRACE_RETURN (false);
+ unsigned int count = len;
+ for (unsigned int i = 0; i < count; i++)
+ if (unlikely (!array[i].sanitize (c, base)))
+ return TRACE_RETURN (false);
+ return TRACE_RETURN (true);
+ }
+ template <typename T>
+ inline bool sanitize (hb_sanitize_context_t *c, void *base, T user_data) {
+ TRACE_SANITIZE ();
+ if (unlikely (!sanitize_shallow (c))) return TRACE_RETURN (false);
+ unsigned int count = len;
+ for (unsigned int i = 0; i < count; i++)
+ if (unlikely (!array[i].sanitize (c, base, user_data)))
+ return TRACE_RETURN (false);
+ return TRACE_RETURN (true);
+ }
+
+ private:
+ inline bool sanitize_shallow (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this) && c->check_array (this, Type::static_size, len));
+ }
+
+ public:
+ LenType len;
+ Type array[VAR];
+ public:
+ DEFINE_SIZE_ARRAY (sizeof (LenType), array);
+};
+
+/* An array with a USHORT number of elements. */
+template <typename Type>
+struct ArrayOf : GenericArrayOf<USHORT, Type> {};
+
+/* An array with a ULONG number of elements. */
+template <typename Type>
+struct LongArrayOf : GenericArrayOf<ULONG, Type> {};
+
+/* Array of Offset's */
+template <typename Type>
+struct OffsetArrayOf : ArrayOf<OffsetTo<Type> > {};
+
+/* Array of LongOffset's */
+template <typename Type>
+struct LongOffsetArrayOf : ArrayOf<LongOffsetTo<Type> > {};
+
+/* LongArray of LongOffset's */
+template <typename Type>
+struct LongOffsetLongArrayOf : LongArrayOf<LongOffsetTo<Type> > {};
+
+/* Array of offsets relative to the beginning of the array itself. */
+template <typename Type>
+struct OffsetListOf : OffsetArrayOf<Type>
+{
+ inline const Type& operator [] (unsigned int i) const
+ {
+ if (unlikely (i >= this->len)) return Null(Type);
+ return this+this->array[i];
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (OffsetArrayOf<Type>::sanitize (c, this));
+ }
+ template <typename T>
+ inline bool sanitize (hb_sanitize_context_t *c, T user_data) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (OffsetArrayOf<Type>::sanitize (c, this, user_data));
+ }
+};
+
+
+/* An array with a USHORT number of elements,
+ * starting at second element. */
+template <typename Type>
+struct HeadlessArrayOf
+{
+ inline const Type& operator [] (unsigned int i) const
+ {
+ if (unlikely (i >= len || !i)) return Null(Type);
+ return array[i-1];
+ }
+ inline unsigned int get_size (void) const
+ { return len.static_size + (len ? len - 1 : 0) * Type::static_size; }
+
+ inline bool sanitize_shallow (hb_sanitize_context_t *c) {
+ return c->check_struct (this)
+ && c->check_array (this, Type::static_size, len);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (unlikely (!sanitize_shallow (c))) return TRACE_RETURN (false);
+
+ /* Note: for structs that do not reference other structs,
+ * we do not need to call their sanitize() as we already did
+ * a bound check on the aggregate array size. We just include
+ * a small unreachable expression to make sure the structs
+ * pointed to do have a simple sanitize(), ie. they do not
+ * reference other structs via offsets.
+ */
+ (void) (false && array[0].sanitize (c));
+
+ return TRACE_RETURN (true);
+ }
+
+ USHORT len;
+ Type array[VAR];
+ public:
+ DEFINE_SIZE_ARRAY (sizeof (USHORT), array);
+};
+
+
+/* An array with sorted elements. Supports binary searching. */
+template <typename Type>
+struct SortedArrayOf : ArrayOf<Type> {
+
+ template <typename SearchType>
+ inline int search (const SearchType &x) const {
+ unsigned int count = this->len;
+ /* Linear search is *much* faster for small counts. */
+ if (likely (count < 32)) {
+ for (unsigned int i = 0; i < count; i++)
+ if (this->array[i].cmp (x) == 0)
+ return i;
+ return -1;
+ } else {
+ struct Cmp {
+ static int cmp (const SearchType *a, const Type *b) { return b->cmp (*a); }
+ };
+ const Type *p = (const Type *) bsearch (&x, this->array, this->len, sizeof (this->array[0]), (hb_compare_func_t) Cmp::cmp);
+ return p ? p - this->array : -1;
+ }
+ }
+};
+
+
+
+#endif /* HB_OPEN_TYPE_PRIVATE_HH */
diff --git a/src/hb-ot-head-table.hh b/src/hb-ot-head-table.hh
new file mode 100644
index 0000000..bf2d245
--- /dev/null
+++ b/src/hb-ot-head-table.hh
@@ -0,0 +1,145 @@
+/*
+ * Copyright © 2010 Red Hat, Inc.
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OT_HEAD_TABLE_HH
+#define HB_OT_HEAD_TABLE_HH
+
+#include "hb-open-type-private.hh"
+
+
+
+/*
+ * head -- Font Header
+ */
+
+#define HB_OT_TAG_head HB_TAG('h','e','a','d')
+
+struct head
+{
+ static const hb_tag_t Tag = HB_OT_TAG_head;
+
+ inline unsigned int get_upem (void) const {
+ unsigned int upem = unitsPerEm;
+ /* If no valid head table found, assume 1000, which matches typicaly Type1 usage. */
+ return 16 <= upem && upem <= 16384 ? upem : 1000;
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this) && likely (version.major == 1));
+ }
+
+ protected:
+ FixedVersion version; /* Version of the head table--currently
+ * 0x00010000 for version 1.0. */
+ FixedVersion fontRevision; /* Set by font manufacturer. */
+ ULONG checkSumAdjustment; /* To compute: set it to 0, sum the
+ * entire font as ULONG, then store
+ * 0xB1B0AFBA - sum. */
+ ULONG magicNumber; /* Set to 0x5F0F3CF5. */
+ USHORT flags; /* Bit 0: Baseline for font at y=0;
+ * Bit 1: Left sidebearing point at x=0;
+ * Bit 2: Instructions may depend on point size;
+ * Bit 3: Force ppem to integer values for all
+ * internal scaler math; may use fractional
+ * ppem sizes if this bit is clear;
+ * Bit 4: Instructions may alter advance width
+ * (the advance widths might not scale linearly);
+
+ * Bits 5-10: These should be set according to
+ * Apple's specification. However, they are not
+ * implemented in OpenType.
+ * Bit 5: This bit should be set in fonts that are
+ * intended to e laid out vertically, and in
+ * which the glyphs have been drawn such that an
+ * x-coordinate of 0 corresponds to the desired
+ * vertical baseline.
+ * Bit 6: This bit must be set to zero.
+ * Bit 7: This bit should be set if the font
+ * requires layout for correct linguistic
+ * rendering (e.g. Arabic fonts).
+ * Bit 8: This bit should be set for a GX font
+ * which has one or more metamorphosis effects
+ * designated as happening by default.
+ * Bit 9: This bit should be set if the font
+ * contains any strong right-to-left glyphs.
+ * Bit 10: This bit should be set if the font
+ * contains Indic-style rearrangement effects.
+
+ * Bit 11: Font data is 'lossless,' as a result
+ * of having been compressed and decompressed
+ * with the Agfa MicroType Express engine.
+ * Bit 12: Font converted (produce compatible metrics)
+ * Bit 13: Font optimized for ClearType™.
+ * Note, fonts that rely on embedded bitmaps (EBDT)
+ * for rendering should not be considered optimized
+ * for ClearType, and therefore should keep this bit
+ * cleared.
+ * Bit 14: Last Resort font. If set, indicates that
+ * the glyphs encoded in the cmap subtables are simply
+ * generic symbolic representations of code point
+ * ranges and don’t truly represent support for those
+ * code points. If unset, indicates that the glyphs
+ * encoded in the cmap subtables represent proper
+ * support for those code points.
+ * Bit 15: Reserved, set to 0. */
+ USHORT unitsPerEm; /* Valid range is from 16 to 16384. This value
+ * should be a power of 2 for fonts that have
+ * TrueType outlines. */
+ LONGDATETIME created; /* Number of seconds since 12:00 midnight,
+ January 1, 1904. 64-bit integer */
+ LONGDATETIME modified; /* Number of seconds since 12:00 midnight,
+ January 1, 1904. 64-bit integer */
+ SHORT xMin; /* For all glyph bounding boxes. */
+ SHORT yMin; /* For all glyph bounding boxes. */
+ SHORT xMax; /* For all glyph bounding boxes. */
+ SHORT yMax; /* For all glyph bounding boxes. */
+ USHORT macStyle; /* Bit 0: Bold (if set to 1);
+ * Bit 1: Italic (if set to 1)
+ * Bit 2: Underline (if set to 1)
+ * Bit 3: Outline (if set to 1)
+ * Bit 4: Shadow (if set to 1)
+ * Bit 5: Condensed (if set to 1)
+ * Bit 6: Extended (if set to 1)
+ * Bits 7-15: Reserved (set to 0). */
+ USHORT lowestRecPPEM; /* Smallest readable size in pixels. */
+ SHORT fontDirectionHint; /* Deprecated (Set to 2).
+ * 0: Fully mixed directional glyphs;
+ * 1: Only strongly left to right;
+ * 2: Like 1 but also contains neutrals;
+ * -1: Only strongly right to left;
+ * -2: Like -1 but also contains neutrals. */
+ SHORT indexToLocFormat; /* 0 for short offsets, 1 for long. */
+ SHORT glyphDataFormat; /* 0 for current format. */
+ public:
+ DEFINE_SIZE_STATIC (54);
+};
+
+
+
+#endif /* HB_OT_HEAD_TABLE_HH */
diff --git a/src/hb-ot-hhea-table.hh b/src/hb-ot-hhea-table.hh
new file mode 100644
index 0000000..24f8bdc
--- /dev/null
+++ b/src/hb-ot-hhea-table.hh
@@ -0,0 +1,92 @@
+/*
+ * 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_HHEA_TABLE_HH
+#define HB_OT_HHEA_TABLE_HH
+
+#include "hb-open-type-private.hh"
+
+
+
+/*
+ * hhea -- The Horizontal Header Table
+ */
+
+#define HB_OT_TAG_hhea HB_TAG('h','h','e','a')
+
+
+struct hhea
+{
+ static const hb_tag_t Tag = HB_OT_TAG_hhea;
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this) && likely (version.major == 1));
+ }
+
+ protected:
+ FixedVersion version; /* 0x00010000 for version 1.0. */
+ FWORD ascender; /* Typographic ascent. <a
+ * href="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6hhea.html">
+ * (Distance from baseline of highest
+ * ascender)</a> */
+ FWORD descender; /* Typographic descent. <a
+ * href="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6hhea.html">
+ * (Distance from baseline of lowest
+ * descender)</a> */
+ FWORD lineGap; /* Typographic line gap. Negative
+ * LineGap values are treated as zero
+ * in Windows 3.1, System 6, and
+ * System 7. */
+ UFWORD advanceWidthMax; /* Maximum advance width value in
+ * 'hmtx' table. */
+ FWORD minLeftSideBearing; /* Minimum left sidebearing value in
+ * 'hmtx' table. */
+ FWORD minRightSideBearing; /* Minimum right sidebearing value;
+ * calculated as Min(aw - lsb -
+ * (xMax - xMin)). */
+ FWORD xMaxExtent; /* Max(lsb + (xMax - xMin)). */
+ SHORT caretSlopeRise; /* Used to calculate the slope of the
+ * cursor (rise/run); 1 for vertical. */
+ SHORT caretSlopeRun; /* 0 for vertical. */
+ SHORT caretOffset; /* The amount by which a slanted
+ * highlight on a glyph needs
+ * to be shifted to produce the
+ * best appearance. Set to 0 for
+ * non--slanted fonts */
+ SHORT reserved1; /* set to 0 */
+ SHORT reserved2; /* set to 0 */
+ SHORT reserved3; /* set to 0 */
+ SHORT reserved4; /* set to 0 */
+ SHORT metricDataFormat; /* 0 for current format. */
+ USHORT numberOfHMetrics; /* Number of hMetric entries in 'hmtx'
+ * table */
+ public:
+ DEFINE_SIZE_STATIC (36);
+};
+
+
+#endif /* HB_OT_HHEA_TABLE_HH */
diff --git a/src/hb-ot-hmtx-table.hh b/src/hb-ot-hmtx-table.hh
new file mode 100644
index 0000000..cc7cfbb
--- /dev/null
+++ b/src/hb-ot-hmtx-table.hh
@@ -0,0 +1,86 @@
+/*
+ * 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_HMTX_TABLE_HH
+#define HB_OT_HMTX_TABLE_HH
+
+#include "hb-open-type-private.hh"
+
+
+
+/*
+ * hmtx -- The Horizontal Metrics Table
+ */
+
+#define HB_OT_TAG_hmtx HB_TAG('h','m','t','x')
+
+
+struct LongHorMetric
+{
+ USHORT advanceWidth;
+ SHORT lsb;
+ public:
+ DEFINE_SIZE_STATIC (4);
+};
+
+struct hmtx
+{
+ static const hb_tag_t Tag = HB_OT_TAG_hmtx;
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ /* We don't check for anything specific here. The users of the
+ * struct do all the hard work... */
+ return TRACE_RETURN (true);
+ }
+
+ protected:
+ LongHorMetric longHorMetric[VAR]; /* Paired advance width and left side
+ * bearing values for each glyph. The
+ * value numOfHMetrics comes from
+ * the 'hhea' table. If the font is
+ * monospaced, only one entry need
+ * be in the array, but that entry is
+ * required. The last entry applies to
+ * all subsequent glyphs. */
+ SHORT leftSideBearingX[VAR]; /* Here the advanceWidth is assumed
+ * to be the same as the advanceWidth
+ * for the last entry above. The
+ * number of entries in this array is
+ * derived from numGlyphs (from 'maxp'
+ * table) minus numberOfHMetrics. This
+ * generally is used with a run of
+ * monospaced glyphs (e.g., Kanji
+ * fonts or Courier fonts). Only one
+ * run is allowed and it must be at
+ * the end. This allows a monospaced
+ * font to vary the left side bearing
+ * values for each glyph. */
+ public:
+ DEFINE_SIZE_ARRAY2 (0, longHorMetric, leftSideBearingX);
+};
+
+#endif /* HB_OT_HMTX_TABLE_HH */
diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh
new file mode 100644
index 0000000..cea5b75
--- /dev/null
+++ b/src/hb-ot-layout-common-private.hh
@@ -0,0 +1,767 @@
+/*
+ * Copyright © 2007,2008,2009 Red Hat, Inc.
+ * Copyright © 2010,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.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OT_LAYOUT_COMMON_PRIVATE_HH
+#define HB_OT_LAYOUT_COMMON_PRIVATE_HH
+
+#include "hb-ot-layout-private.hh"
+#include "hb-open-type-private.hh"
+#include "hb-set-private.hh"
+
+
+#define NOT_COVERED ((unsigned int) -1)
+#define MAX_NESTING_LEVEL 8
+
+
+
+/*
+ *
+ * OpenType Layout Common Table Formats
+ *
+ */
+
+
+/*
+ * Script, ScriptList, LangSys, Feature, FeatureList, Lookup, LookupList
+ */
+
+template <typename Type>
+struct Record
+{
+ inline int cmp (hb_tag_t a) const {
+ return tag.cmp (a);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c, void *base) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this) && offset.sanitize (c, base));
+ }
+
+ Tag tag; /* 4-byte Tag identifier */
+ OffsetTo<Type>
+ offset; /* Offset from beginning of object holding
+ * the Record */
+ public:
+ DEFINE_SIZE_STATIC (6);
+};
+
+template <typename Type>
+struct RecordArrayOf : SortedArrayOf<Record<Type> > {
+ inline const Tag& get_tag (unsigned int i) const
+ {
+ /* We cheat slightly and don't define separate Null objects
+ * for Record types. Instead, we return the correct Null(Tag)
+ * here. */
+ if (unlikely (i >= this->len)) return Null(Tag);
+ return (*this)[i].tag;
+ }
+ inline unsigned int get_tags (unsigned int start_offset,
+ unsigned int *record_count /* IN/OUT */,
+ hb_tag_t *record_tags /* OUT */) const
+ {
+ if (record_count) {
+ const Record<Type> *arr = this->sub_array (start_offset, record_count);
+ unsigned int count = *record_count;
+ for (unsigned int i = 0; i < count; i++)
+ record_tags[i] = arr[i].tag;
+ }
+ return this->len;
+ }
+ inline bool find_index (hb_tag_t tag, unsigned int *index) const
+ {
+ int i = this->search (tag);
+ if (i != -1) {
+ if (index) *index = i;
+ return true;
+ } else {
+ if (index) *index = Index::NOT_FOUND_INDEX;
+ return false;
+ }
+ }
+};
+
+template <typename Type>
+struct RecordListOf : RecordArrayOf<Type>
+{
+ inline const Type& operator [] (unsigned int i) const
+ { return this+RecordArrayOf<Type>::operator [](i).offset; }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (RecordArrayOf<Type>::sanitize (c, this));
+ }
+};
+
+
+struct RangeRecord
+{
+ inline int cmp (hb_codepoint_t g) const {
+ hb_codepoint_t a = start, b = end;
+ return g < a ? -1 : g <= b ? 0 : +1 ;
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this));
+ }
+
+ inline bool intersects (const hb_set_t *glyphs) const {
+ return glyphs->intersects (start, end);
+ }
+
+ template <typename set_t>
+ inline void add_coverage (set_t *glyphs) const {
+ glyphs->add_range (start, end);
+ }
+
+ GlyphID start; /* First GlyphID in the range */
+ GlyphID end; /* Last GlyphID in the range */
+ USHORT value; /* Value */
+ public:
+ DEFINE_SIZE_STATIC (6);
+};
+DEFINE_NULL_DATA (RangeRecord, "\000\001");
+
+
+struct IndexArray : ArrayOf<Index>
+{
+ inline unsigned int get_indexes (unsigned int start_offset,
+ unsigned int *_count /* IN/OUT */,
+ unsigned int *_indexes /* OUT */) const
+ {
+ if (_count) {
+ const USHORT *arr = this->sub_array (start_offset, _count);
+ unsigned int count = *_count;
+ for (unsigned int i = 0; i < count; i++)
+ _indexes[i] = arr[i];
+ }
+ return this->len;
+ }
+};
+
+
+struct Script;
+struct LangSys;
+struct Feature;
+
+
+struct LangSys
+{
+ inline unsigned int get_feature_count (void) const
+ { return featureIndex.len; }
+ inline hb_tag_t get_feature_index (unsigned int i) const
+ { return featureIndex[i]; }
+ inline unsigned int get_feature_indexes (unsigned int start_offset,
+ unsigned int *feature_count /* IN/OUT */,
+ unsigned int *feature_indexes /* OUT */) const
+ { return featureIndex.get_indexes (start_offset, feature_count, feature_indexes); }
+
+ inline bool has_required_feature (void) const { return reqFeatureIndex != 0xffff; }
+ inline unsigned int get_required_feature_index (void) const
+ {
+ if (reqFeatureIndex == 0xffff)
+ return Index::NOT_FOUND_INDEX;
+ return reqFeatureIndex;;
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this) && featureIndex.sanitize (c));
+ }
+
+ Offset lookupOrder; /* = Null (reserved for an offset to a
+ * reordering table) */
+ USHORT reqFeatureIndex;/* Index of a feature required for this
+ * language system--if no required features
+ * = 0xFFFF */
+ IndexArray featureIndex; /* Array of indices into the FeatureList */
+ public:
+ DEFINE_SIZE_ARRAY (6, featureIndex);
+};
+DEFINE_NULL_DATA (LangSys, "\0\0\xFF\xFF");
+
+
+struct Script
+{
+ inline unsigned int get_lang_sys_count (void) const
+ { return langSys.len; }
+ inline const Tag& get_lang_sys_tag (unsigned int i) const
+ { return langSys.get_tag (i); }
+ inline unsigned int get_lang_sys_tags (unsigned int start_offset,
+ unsigned int *lang_sys_count /* IN/OUT */,
+ hb_tag_t *lang_sys_tags /* OUT */) const
+ { return langSys.get_tags (start_offset, lang_sys_count, lang_sys_tags); }
+ inline const LangSys& get_lang_sys (unsigned int i) const
+ {
+ if (i == Index::NOT_FOUND_INDEX) return get_default_lang_sys ();
+ return this+langSys[i].offset;
+ }
+ inline bool find_lang_sys_index (hb_tag_t tag, unsigned int *index) const
+ { return langSys.find_index (tag, index); }
+
+ inline bool has_default_lang_sys (void) const { return defaultLangSys != 0; }
+ inline const LangSys& get_default_lang_sys (void) const { return this+defaultLangSys; }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (defaultLangSys.sanitize (c, this) && langSys.sanitize (c, this));
+ }
+
+ protected:
+ OffsetTo<LangSys>
+ defaultLangSys; /* Offset to DefaultLangSys table--from
+ * beginning of Script table--may be Null */
+ RecordArrayOf<LangSys>
+ langSys; /* Array of LangSysRecords--listed
+ * alphabetically by LangSysTag */
+ public:
+ DEFINE_SIZE_ARRAY (4, langSys);
+};
+
+typedef RecordListOf<Script> ScriptList;
+
+
+struct Feature
+{
+ inline unsigned int get_lookup_count (void) const
+ { return lookupIndex.len; }
+ inline hb_tag_t get_lookup_index (unsigned int i) const
+ { return lookupIndex[i]; }
+ inline unsigned int get_lookup_indexes (unsigned int start_index,
+ unsigned int *lookup_count /* IN/OUT */,
+ unsigned int *lookup_tags /* OUT */) const
+ { return lookupIndex.get_indexes (start_index, lookup_count, lookup_tags); }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this) && lookupIndex.sanitize (c));
+ }
+
+ Offset featureParams; /* Offset to Feature Parameters table (if one
+ * has been defined for the feature), relative
+ * to the beginning of the Feature Table; = Null
+ * if not required */
+ IndexArray lookupIndex; /* Array of LookupList indices */
+ public:
+ DEFINE_SIZE_ARRAY (4, lookupIndex);
+};
+
+typedef RecordListOf<Feature> FeatureList;
+
+
+struct LookupFlag : USHORT
+{
+ enum Flags {
+ RightToLeft = 0x0001u,
+ IgnoreBaseGlyphs = 0x0002u,
+ IgnoreLigatures = 0x0004u,
+ IgnoreMarks = 0x0008u,
+ IgnoreFlags = 0x000Eu,
+ UseMarkFilteringSet = 0x0010u,
+ Reserved = 0x00E0u,
+ MarkAttachmentType = 0xFF00u
+ };
+ public:
+ DEFINE_SIZE_STATIC (2);
+};
+
+struct Lookup
+{
+ inline unsigned int get_subtable_count (void) const { return subTable.len; }
+
+ inline unsigned int get_type (void) const { return lookupType; }
+
+ /* lookup_props is a 32-bit integer where the lower 16-bit is LookupFlag and
+ * higher 16-bit is mark-filtering-set if the lookup uses one.
+ * Not to be confused with glyph_props which is very similar. */
+ inline uint32_t get_props (void) const
+ {
+ unsigned int flag = lookupFlag;
+ if (unlikely (flag & LookupFlag::UseMarkFilteringSet))
+ {
+ const USHORT &markFilteringSet = StructAfter<USHORT> (subTable);
+ flag += (markFilteringSet << 16);
+ }
+ return flag;
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ /* Real sanitize of the subtables is done by GSUB/GPOS/... */
+ if (!(c->check_struct (this) && subTable.sanitize (c))) return TRACE_RETURN (false);
+ if (unlikely (lookupFlag & LookupFlag::UseMarkFilteringSet))
+ {
+ USHORT &markFilteringSet = StructAfter<USHORT> (subTable);
+ if (!markFilteringSet.sanitize (c)) return TRACE_RETURN (false);
+ }
+ return TRACE_RETURN (true);
+ }
+
+ USHORT lookupType; /* Different enumerations for GSUB and GPOS */
+ USHORT lookupFlag; /* Lookup qualifiers */
+ ArrayOf<Offset>
+ subTable; /* Array of SubTables */
+ USHORT markFilteringSetX[VAR]; /* Index (base 0) into GDEF mark glyph sets
+ * structure. This field is only present if bit
+ * UseMarkFilteringSet of lookup flags is set. */
+ public:
+ DEFINE_SIZE_ARRAY2 (6, subTable, markFilteringSetX);
+};
+
+typedef OffsetListOf<Lookup> LookupList;
+
+
+/*
+ * Coverage Table
+ */
+
+struct CoverageFormat1
+{
+ friend struct Coverage;
+
+ private:
+ inline unsigned int get_coverage (hb_codepoint_t glyph_id) const
+ {
+ int i = glyphArray.search (glyph_id);
+ ASSERT_STATIC (((unsigned int) -1) == NOT_COVERED);
+ return i;
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (glyphArray.sanitize (c));
+ }
+
+ inline bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const {
+ return glyphs->has (glyphArray[index]);
+ }
+
+ template <typename set_t>
+ inline void add_coverage (set_t *glyphs) const {
+ unsigned int count = glyphArray.len;
+ for (unsigned int i = 0; i < count; i++)
+ glyphs->add (glyphArray[i]);
+ }
+
+ struct Iter {
+ inline void init (const struct CoverageFormat1 &c_) { c = &c_; i = 0; };
+ inline bool more (void) { return i < c->glyphArray.len; }
+ inline void next (void) { i++; }
+ inline uint16_t get_glyph (void) { return c->glyphArray[i]; }
+ inline uint16_t get_coverage (void) { return i; }
+
+ private:
+ const struct CoverageFormat1 *c;
+ unsigned int i;
+ };
+
+ protected:
+ USHORT coverageFormat; /* Format identifier--format = 1 */
+ SortedArrayOf<GlyphID>
+ glyphArray; /* Array of GlyphIDs--in numerical order */
+ public:
+ DEFINE_SIZE_ARRAY (4, glyphArray);
+};
+
+struct CoverageFormat2
+{
+ friend struct Coverage;
+
+ private:
+ inline unsigned int get_coverage (hb_codepoint_t glyph_id) const
+ {
+ int i = rangeRecord.search (glyph_id);
+ if (i != -1) {
+ const RangeRecord &range = rangeRecord[i];
+ return (unsigned int) range.value + (glyph_id - range.start);
+ }
+ return NOT_COVERED;
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (rangeRecord.sanitize (c));
+ }
+
+ inline bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const {
+ unsigned int i;
+ unsigned int count = rangeRecord.len;
+ for (i = 0; i < count; i++) {
+ const RangeRecord &range = rangeRecord[i];
+ if (range.value <= index &&
+ index < (unsigned int) range.value + (range.end - range.start) &&
+ range.intersects (glyphs))
+ return true;
+ else if (index < range.value)
+ return false;
+ }
+ return false;
+ }
+
+ template <typename set_t>
+ inline void add_coverage (set_t *glyphs) const {
+ unsigned int count = rangeRecord.len;
+ for (unsigned int i = 0; i < count; i++)
+ rangeRecord[i].add_coverage (glyphs);
+ }
+
+ struct Iter {
+ inline void init (const CoverageFormat2 &c_) {
+ c = &c_;
+ coverage = 0;
+ i = 0;
+ j = c->rangeRecord.len ? c_.rangeRecord[0].start : 0;
+ }
+ inline bool more (void) { return i < c->rangeRecord.len; }
+ inline void next (void) {
+ coverage++;
+ if (j == c->rangeRecord[i].end) {
+ i++;
+ if (more ())
+ j = c->rangeRecord[i].start;
+ return;
+ }
+ j++;
+ }
+ inline uint16_t get_glyph (void) { return j; }
+ inline uint16_t get_coverage (void) { return coverage; }
+
+ private:
+ const struct CoverageFormat2 *c;
+ unsigned int i, j, coverage;
+ };
+
+ protected:
+ USHORT coverageFormat; /* Format identifier--format = 2 */
+ SortedArrayOf<RangeRecord>
+ rangeRecord; /* Array of glyph ranges--ordered by
+ * Start GlyphID. rangeCount entries
+ * long */
+ public:
+ DEFINE_SIZE_ARRAY (4, rangeRecord);
+};
+
+struct Coverage
+{
+ inline unsigned int operator () (hb_codepoint_t glyph_id) const { return get_coverage (glyph_id); }
+
+ inline unsigned int get_coverage (hb_codepoint_t glyph_id) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.get_coverage(glyph_id);
+ case 2: return u.format2.get_coverage(glyph_id);
+ default:return NOT_COVERED;
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!u.format.sanitize (c)) return TRACE_RETURN (false);
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.sanitize (c));
+ case 2: return TRACE_RETURN (u.format2.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ inline bool intersects (const hb_set_t *glyphs) const {
+ /* TODO speed this up */
+ Coverage::Iter iter;
+ for (iter.init (*this); iter.more (); iter.next ()) {
+ if (glyphs->has (iter.get_glyph ()))
+ return true;
+ }
+ return false;
+ }
+
+ inline bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const {
+ switch (u.format) {
+ case 1: return u.format1.intersects_coverage (glyphs, index);
+ case 2: return u.format2.intersects_coverage (glyphs, index);
+ default:return false;
+ }
+ }
+
+ template <typename set_t>
+ inline void add_coverage (set_t *glyphs) const {
+ switch (u.format) {
+ case 1: u.format1.add_coverage (glyphs); break;
+ case 2: u.format2.add_coverage (glyphs); break;
+ default: break;
+ }
+ }
+
+ struct Iter {
+ Iter (void) : format (0) {};
+ inline void init (const Coverage &c_) {
+ format = c_.u.format;
+ switch (format) {
+ case 1: return u.format1.init (c_.u.format1);
+ case 2: return u.format2.init (c_.u.format2);
+ default:return;
+ }
+ }
+ inline bool more (void) {
+ switch (format) {
+ case 1: return u.format1.more ();
+ case 2: return u.format2.more ();
+ default:return true;
+ }
+ }
+ inline void next (void) {
+ switch (format) {
+ case 1: u.format1.next (); break;
+ case 2: u.format2.next (); break;
+ default: break;
+ }
+ }
+ inline uint16_t get_glyph (void) {
+ switch (format) {
+ case 1: return u.format1.get_glyph ();
+ case 2: return u.format2.get_glyph ();
+ default:return true;
+ }
+ }
+ inline uint16_t get_coverage (void) {
+ switch (format) {
+ case 1: return u.format1.get_coverage ();
+ case 2: return u.format2.get_coverage ();
+ default:return true;
+ }
+ }
+
+ private:
+ unsigned int format;
+ union {
+ CoverageFormat1::Iter format1;
+ CoverageFormat2::Iter format2;
+ } u;
+ };
+
+ protected:
+ union {
+ USHORT format; /* Format identifier */
+ CoverageFormat1 format1;
+ CoverageFormat2 format2;
+ } u;
+ public:
+ DEFINE_SIZE_UNION (2, format);
+};
+
+
+/*
+ * Class Definition Table
+ */
+
+struct ClassDefFormat1
+{
+ friend struct ClassDef;
+
+ private:
+ inline unsigned int get_class (hb_codepoint_t glyph_id) const
+ {
+ if (unlikely ((unsigned int) (glyph_id - startGlyph) < classValue.len))
+ return classValue[glyph_id - startGlyph];
+ return 0;
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this) && classValue.sanitize (c));
+ }
+
+ inline bool intersects_class (const hb_set_t *glyphs, unsigned int klass) const {
+ unsigned int count = classValue.len;
+ for (unsigned int i = 0; i < count; i++)
+ if (classValue[i] == klass && glyphs->has (startGlyph + i))
+ return true;
+ return false;
+ }
+
+ protected:
+ USHORT classFormat; /* Format identifier--format = 1 */
+ GlyphID startGlyph; /* First GlyphID of the classValueArray */
+ ArrayOf<USHORT>
+ classValue; /* Array of Class Values--one per GlyphID */
+ public:
+ DEFINE_SIZE_ARRAY (6, classValue);
+};
+
+struct ClassDefFormat2
+{
+ friend struct ClassDef;
+
+ private:
+ inline unsigned int get_class (hb_codepoint_t glyph_id) const
+ {
+ int i = rangeRecord.search (glyph_id);
+ if (i != -1)
+ return rangeRecord[i].value;
+ return 0;
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (rangeRecord.sanitize (c));
+ }
+
+ inline bool intersects_class (const hb_set_t *glyphs, unsigned int klass) const {
+ unsigned int count = rangeRecord.len;
+ for (unsigned int i = 0; i < count; i++)
+ if (rangeRecord[i].value == klass && rangeRecord[i].intersects (glyphs))
+ return true;
+ return false;
+ }
+
+ protected:
+ USHORT classFormat; /* Format identifier--format = 2 */
+ SortedArrayOf<RangeRecord>
+ rangeRecord; /* Array of glyph ranges--ordered by
+ * Start GlyphID */
+ public:
+ DEFINE_SIZE_ARRAY (4, rangeRecord);
+};
+
+struct ClassDef
+{
+ inline unsigned int operator () (hb_codepoint_t glyph_id) const { return get_class (glyph_id); }
+
+ inline unsigned int get_class (hb_codepoint_t glyph_id) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.get_class(glyph_id);
+ case 2: return u.format2.get_class(glyph_id);
+ default:return 0;
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!u.format.sanitize (c)) return TRACE_RETURN (false);
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.sanitize (c));
+ case 2: return TRACE_RETURN (u.format2.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ inline bool intersects_class (const hb_set_t *glyphs, unsigned int klass) const {
+ switch (u.format) {
+ case 1: return u.format1.intersects_class (glyphs, klass);
+ case 2: return u.format2.intersects_class (glyphs, klass);
+ default:return false;
+ }
+ }
+
+ protected:
+ union {
+ USHORT format; /* Format identifier */
+ ClassDefFormat1 format1;
+ ClassDefFormat2 format2;
+ } u;
+ public:
+ DEFINE_SIZE_UNION (2, format);
+};
+
+
+/*
+ * Device Tables
+ */
+
+struct Device
+{
+
+ inline hb_position_t get_x_delta (hb_font_t *font) const
+ { return get_delta (font->x_ppem, font->x_scale); }
+
+ inline hb_position_t get_y_delta (hb_font_t *font) const
+ { return get_delta (font->y_ppem, font->y_scale); }
+
+ inline int get_delta (unsigned int ppem, int scale) const
+ {
+ if (!ppem) return 0;
+
+ int pixels = get_delta_pixels (ppem);
+
+ if (!pixels) return 0;
+
+ return pixels * (int64_t) scale / ppem;
+ }
+
+
+ inline int get_delta_pixels (unsigned int ppem_size) const
+ {
+ unsigned int f = deltaFormat;
+ if (unlikely (f < 1 || f > 3))
+ return 0;
+
+ if (ppem_size < startSize || ppem_size > endSize)
+ return 0;
+
+ unsigned int s = ppem_size - startSize;
+
+ unsigned int byte = deltaValue[s >> (4 - f)];
+ unsigned int bits = (byte >> (16 - (((s & ((1 << (4 - f)) - 1)) + 1) << f)));
+ unsigned int mask = (0xFFFF >> (16 - (1 << f)));
+
+ int delta = bits & mask;
+
+ if ((unsigned int) delta >= ((mask + 1) >> 1))
+ delta -= mask + 1;
+
+ return delta;
+ }
+
+ inline unsigned int get_size (void) const
+ {
+ unsigned int f = deltaFormat;
+ if (unlikely (f < 1 || f > 3 || startSize > endSize)) return 3 * USHORT::static_size;
+ return USHORT::static_size * (4 + ((endSize - startSize) >> (4 - f)));
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this) && c->check_range (this, this->get_size ()));
+ }
+
+ protected:
+ USHORT startSize; /* Smallest size to correct--in ppem */
+ USHORT endSize; /* Largest size to correct--in ppem */
+ USHORT deltaFormat; /* Format of DeltaValue array data: 1, 2, or 3
+ * 1 Signed 2-bit value, 8 values per uint16
+ * 2 Signed 4-bit value, 4 values per uint16
+ * 3 Signed 8-bit value, 2 values per uint16
+ */
+ USHORT deltaValue[VAR]; /* Array of compressed data */
+ public:
+ DEFINE_SIZE_ARRAY (6, deltaValue);
+};
+
+
+
+#endif /* HB_OT_LAYOUT_COMMON_PRIVATE_HH */
diff --git a/src/hb-ot-layout-gdef-table.hh b/src/hb-ot-layout-gdef-table.hh
new file mode 100644
index 0000000..cebbe68
--- /dev/null
+++ b/src/hb-ot-layout-gdef-table.hh
@@ -0,0 +1,425 @@
+/*
+ * Copyright © 2007,2008,2009 Red Hat, Inc.
+ * Copyright © 2010,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.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OT_LAYOUT_GDEF_TABLE_HH
+#define HB_OT_LAYOUT_GDEF_TABLE_HH
+
+#include "hb-ot-layout-common-private.hh"
+
+#include "hb-font-private.hh"
+
+
+
+/*
+ * Attachment List Table
+ */
+
+typedef ArrayOf<USHORT> AttachPoint; /* Array of contour point indices--in
+ * increasing numerical order */
+
+struct AttachList
+{
+ inline unsigned int get_attach_points (hb_codepoint_t glyph_id,
+ unsigned int start_offset,
+ unsigned int *point_count /* IN/OUT */,
+ unsigned int *point_array /* OUT */) const
+ {
+ unsigned int index = (this+coverage) (glyph_id);
+ if (index == NOT_COVERED)
+ {
+ if (point_count)
+ *point_count = 0;
+ return 0;
+ }
+
+ const AttachPoint &points = this+attachPoint[index];
+
+ if (point_count) {
+ const USHORT *array = points.sub_array (start_offset, point_count);
+ unsigned int count = *point_count;
+ for (unsigned int i = 0; i < count; i++)
+ point_array[i] = array[i];
+ }
+
+ return points.len;
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (coverage.sanitize (c, this) && attachPoint.sanitize (c, this));
+ }
+
+ protected:
+ OffsetTo<Coverage>
+ coverage; /* Offset to Coverage table -- from
+ * beginning of AttachList table */
+ OffsetArrayOf<AttachPoint>
+ attachPoint; /* Array of AttachPoint tables
+ * in Coverage Index order */
+ public:
+ DEFINE_SIZE_ARRAY (4, attachPoint);
+};
+
+/*
+ * Ligature Caret Table
+ */
+
+struct CaretValueFormat1
+{
+ friend struct CaretValue;
+
+ private:
+ inline hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id HB_UNUSED) const
+ {
+ return HB_DIRECTION_IS_HORIZONTAL (direction) ? font->em_scale_x (coordinate) : font->em_scale_y (coordinate);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this));
+ }
+
+ protected:
+ USHORT caretValueFormat; /* Format identifier--format = 1 */
+ SHORT coordinate; /* X or Y value, in design units */
+ public:
+ DEFINE_SIZE_STATIC (4);
+};
+
+struct CaretValueFormat2
+{
+ friend struct CaretValue;
+
+ private:
+ inline hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id) const
+ {
+ hb_position_t x, y;
+ if (font->get_glyph_contour_point_for_origin (glyph_id, caretValuePoint, direction, &x, &y))
+ return HB_DIRECTION_IS_HORIZONTAL (direction) ? x : y;
+ else
+ return 0;
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this));
+ }
+
+ protected:
+ USHORT caretValueFormat; /* Format identifier--format = 2 */
+ USHORT caretValuePoint; /* Contour point index on glyph */
+ public:
+ DEFINE_SIZE_STATIC (4);
+};
+
+struct CaretValueFormat3
+{
+ friend struct CaretValue;
+
+ inline hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id HB_UNUSED) const
+ {
+ return HB_DIRECTION_IS_HORIZONTAL (direction) ?
+ font->em_scale_x (coordinate) + (this+deviceTable).get_x_delta (font) :
+ font->em_scale_y (coordinate) + (this+deviceTable).get_y_delta (font);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this) && deviceTable.sanitize (c, this));
+ }
+
+ protected:
+ USHORT caretValueFormat; /* Format identifier--format = 3 */
+ SHORT coordinate; /* X or Y value, in design units */
+ OffsetTo<Device>
+ deviceTable; /* Offset to Device table for X or Y
+ * value--from beginning of CaretValue
+ * table */
+ public:
+ DEFINE_SIZE_STATIC (6);
+};
+
+struct CaretValue
+{
+ inline hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.get_caret_value (font, direction, glyph_id);
+ case 2: return u.format2.get_caret_value (font, direction, glyph_id);
+ case 3: return u.format3.get_caret_value (font, direction, glyph_id);
+ default:return 0;
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!u.format.sanitize (c)) return TRACE_RETURN (false);
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.sanitize (c));
+ case 2: return TRACE_RETURN (u.format2.sanitize (c));
+ case 3: return TRACE_RETURN (u.format3.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ USHORT format; /* Format identifier */
+ CaretValueFormat1 format1;
+ CaretValueFormat2 format2;
+ CaretValueFormat3 format3;
+ } u;
+ public:
+ DEFINE_SIZE_UNION (2, format);
+};
+
+struct LigGlyph
+{
+ inline unsigned int get_lig_carets (hb_font_t *font,
+ hb_direction_t direction,
+ hb_codepoint_t glyph_id,
+ unsigned int start_offset,
+ unsigned int *caret_count /* IN/OUT */,
+ hb_position_t *caret_array /* OUT */) const
+ {
+ if (caret_count) {
+ const OffsetTo<CaretValue> *array = carets.sub_array (start_offset, caret_count);
+ unsigned int count = *caret_count;
+ for (unsigned int i = 0; i < count; i++)
+ caret_array[i] = (this+array[i]).get_caret_value (font, direction, glyph_id);
+ }
+
+ return carets.len;
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (carets.sanitize (c, this));
+ }
+
+ protected:
+ OffsetArrayOf<CaretValue>
+ carets; /* Offset array of CaretValue tables
+ * --from beginning of LigGlyph table
+ * --in increasing coordinate order */
+ public:
+ DEFINE_SIZE_ARRAY (2, carets);
+};
+
+struct LigCaretList
+{
+ inline unsigned int get_lig_carets (hb_font_t *font,
+ hb_direction_t direction,
+ hb_codepoint_t glyph_id,
+ unsigned int start_offset,
+ unsigned int *caret_count /* IN/OUT */,
+ hb_position_t *caret_array /* OUT */) const
+ {
+ unsigned int index = (this+coverage) (glyph_id);
+ if (index == NOT_COVERED)
+ {
+ if (caret_count)
+ *caret_count = 0;
+ return 0;
+ }
+ const LigGlyph &lig_glyph = this+ligGlyph[index];
+ return lig_glyph.get_lig_carets (font, direction, glyph_id, start_offset, caret_count, caret_array);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (coverage.sanitize (c, this) && ligGlyph.sanitize (c, this));
+ }
+
+ protected:
+ OffsetTo<Coverage>
+ coverage; /* Offset to Coverage table--from
+ * beginning of LigCaretList table */
+ OffsetArrayOf<LigGlyph>
+ ligGlyph; /* Array of LigGlyph tables
+ * in Coverage Index order */
+ public:
+ DEFINE_SIZE_ARRAY (4, ligGlyph);
+};
+
+
+struct MarkGlyphSetsFormat1
+{
+ inline bool covers (unsigned int set_index, hb_codepoint_t glyph_id) const
+ { return (this+coverage[set_index]).get_coverage (glyph_id) != NOT_COVERED; }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (coverage.sanitize (c, this));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 1 */
+ LongOffsetArrayOf<Coverage>
+ coverage; /* Array of long offsets to mark set
+ * coverage tables */
+ public:
+ DEFINE_SIZE_ARRAY (4, coverage);
+};
+
+struct MarkGlyphSets
+{
+ inline bool covers (unsigned int set_index, hb_codepoint_t glyph_id) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.covers (set_index, glyph_id);
+ default:return false;
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!u.format.sanitize (c)) return TRACE_RETURN (false);
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ USHORT format; /* Format identifier */
+ MarkGlyphSetsFormat1 format1;
+ } u;
+ public:
+ DEFINE_SIZE_UNION (2, format);
+};
+
+
+/*
+ * GDEF -- The Glyph Definition Table
+ */
+
+struct GDEF
+{
+ static const hb_tag_t Tag = HB_OT_TAG_GDEF;
+
+ enum GlyphClasses {
+ UnclassifiedGlyph = 0,
+ BaseGlyph = 1,
+ LigatureGlyph = 2,
+ MarkGlyph = 3,
+ ComponentGlyph = 4
+ };
+
+ inline bool has_glyph_classes (void) const { return glyphClassDef != 0; }
+ inline unsigned int get_glyph_class (hb_codepoint_t glyph) const
+ { return (this+glyphClassDef).get_class (glyph); }
+
+ inline bool has_mark_attachment_types (void) const { return markAttachClassDef != 0; }
+ inline unsigned int get_mark_attachment_type (hb_codepoint_t glyph) const
+ { return (this+markAttachClassDef).get_class (glyph); }
+
+ inline bool has_attach_points (void) const { return attachList != 0; }
+ inline unsigned int get_attach_points (hb_codepoint_t glyph_id,
+ unsigned int start_offset,
+ unsigned int *point_count /* IN/OUT */,
+ unsigned int *point_array /* OUT */) const
+ { return (this+attachList).get_attach_points (glyph_id, start_offset, point_count, point_array); }
+
+ inline bool has_lig_carets (void) const { return ligCaretList != 0; }
+ inline unsigned int get_lig_carets (hb_font_t *font,
+ hb_direction_t direction,
+ hb_codepoint_t glyph_id,
+ unsigned int start_offset,
+ unsigned int *caret_count /* IN/OUT */,
+ hb_position_t *caret_array /* OUT */) const
+ { return (this+ligCaretList).get_lig_carets (font, direction, glyph_id, start_offset, caret_count, caret_array); }
+
+ inline bool has_mark_sets (void) const { return version.to_int () >= 0x00010002 && markGlyphSetsDef[0] != 0; }
+ inline bool mark_set_covers (unsigned int set_index, hb_codepoint_t glyph_id) const
+ { return version.to_int () >= 0x00010002 && (this+markGlyphSetsDef[0]).covers (set_index, glyph_id); }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (version.sanitize (c) &&
+ likely (version.major == 1) &&
+ glyphClassDef.sanitize (c, this) &&
+ attachList.sanitize (c, this) &&
+ ligCaretList.sanitize (c, this) &&
+ markAttachClassDef.sanitize (c, this) &&
+ (version.to_int () < 0x00010002 || markGlyphSetsDef[0].sanitize (c, this)));
+ }
+
+
+ /* glyph_props is a 16-bit integer where the lower 8-bit have bits representing
+ * glyph class and other bits, and high 8-bit gthe mark attachment type (if any).
+ * Not to be confused with lookup_props which is very similar. */
+ inline unsigned int get_glyph_props (hb_codepoint_t glyph) const
+ {
+ unsigned int klass = get_glyph_class (glyph);
+
+ switch (klass) {
+ default:
+ case UnclassifiedGlyph: return HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED;
+ case BaseGlyph: return HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH;
+ case LigatureGlyph: return HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE;
+ case ComponentGlyph: return HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT;
+ case MarkGlyph:
+ klass = get_mark_attachment_type (glyph);
+ return HB_OT_LAYOUT_GLYPH_CLASS_MARK | (klass << 8);
+ }
+ }
+
+
+ protected:
+ FixedVersion version; /* Version of the GDEF table--currently
+ * 0x00010002 */
+ OffsetTo<ClassDef>
+ glyphClassDef; /* Offset to class definition table
+ * for glyph type--from beginning of
+ * GDEF header (may be Null) */
+ OffsetTo<AttachList>
+ attachList; /* Offset to list of glyphs with
+ * attachment points--from beginning
+ * of GDEF header (may be Null) */
+ OffsetTo<LigCaretList>
+ ligCaretList; /* Offset to list of positioning points
+ * for ligature carets--from beginning
+ * of GDEF header (may be Null) */
+ OffsetTo<ClassDef>
+ markAttachClassDef; /* Offset to class definition table for
+ * mark attachment type--from beginning
+ * of GDEF header (may be Null) */
+ OffsetTo<MarkGlyphSets>
+ markGlyphSetsDef[VAR]; /* Offset to the table of mark set
+ * definitions--from beginning of GDEF
+ * header (may be NULL). Introduced
+ * in version 00010002. */
+ public:
+ DEFINE_SIZE_ARRAY (12, markGlyphSetsDef);
+};
+
+
+
+#endif /* HB_OT_LAYOUT_GDEF_TABLE_HH */
diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh
new file mode 100644
index 0000000..41168b2
--- /dev/null
+++ b/src/hb-ot-layout-gpos-table.hh
@@ -0,0 +1,1717 @@
+/*
+ * Copyright © 2007,2008,2009,2010 Red Hat, Inc.
+ * Copyright © 2010,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.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OT_LAYOUT_GPOS_TABLE_HH
+#define HB_OT_LAYOUT_GPOS_TABLE_HH
+
+#include "hb-ot-layout-gsubgpos-private.hh"
+
+
+
+/* buffer **position** var allocations */
+#define attach_lookback() var.u16[0] /* number of glyphs to go back to attach this glyph to its base */
+#define cursive_chain() var.i16[1] /* character to which this connects, may be positive or negative */
+
+
+/* Shared Tables: ValueRecord, Anchor Table, and MarkArray */
+
+typedef USHORT Value;
+
+typedef Value ValueRecord[VAR];
+
+struct ValueFormat : USHORT
+{
+ enum Flags {
+ xPlacement = 0x0001, /* Includes horizontal adjustment for placement */
+ yPlacement = 0x0002, /* Includes vertical adjustment for placement */
+ xAdvance = 0x0004, /* Includes horizontal adjustment for advance */
+ yAdvance = 0x0008, /* Includes vertical adjustment for advance */
+ xPlaDevice = 0x0010, /* Includes horizontal Device table for placement */
+ yPlaDevice = 0x0020, /* Includes vertical Device table for placement */
+ xAdvDevice = 0x0040, /* Includes horizontal Device table for advance */
+ yAdvDevice = 0x0080, /* Includes vertical Device table for advance */
+ ignored = 0x0F00, /* Was used in TrueType Open for MM fonts */
+ reserved = 0xF000, /* For future use */
+
+ devices = 0x00F0 /* Mask for having any Device table */
+ };
+
+/* All fields are options. Only those available advance the value pointer. */
+#if 0
+ SHORT xPlacement; /* Horizontal adjustment for
+ * placement--in design units */
+ SHORT yPlacement; /* Vertical adjustment for
+ * placement--in design units */
+ SHORT xAdvance; /* Horizontal adjustment for
+ * advance--in design units (only used
+ * for horizontal writing) */
+ SHORT yAdvance; /* Vertical adjustment for advance--in
+ * design units (only used for vertical
+ * writing) */
+ Offset xPlaDevice; /* Offset to Device table for
+ * horizontal placement--measured from
+ * beginning of PosTable (may be NULL) */
+ Offset yPlaDevice; /* Offset to Device table for vertical
+ * placement--measured from beginning
+ * of PosTable (may be NULL) */
+ Offset xAdvDevice; /* Offset to Device table for
+ * horizontal advance--measured from
+ * beginning of PosTable (may be NULL) */
+ Offset yAdvDevice; /* Offset to Device table for vertical
+ * advance--measured from beginning of
+ * PosTable (may be NULL) */
+#endif
+
+ inline unsigned int get_len (void) const
+ { return _hb_popcount32 ((unsigned int) *this); }
+ inline unsigned int get_size (void) const
+ { return get_len () * Value::static_size; }
+
+ void apply_value (hb_font_t *font,
+ hb_direction_t direction,
+ const void *base,
+ const Value *values,
+ hb_glyph_position_t &glyph_pos) const
+ {
+ unsigned int x_ppem, y_ppem;
+ unsigned int format = *this;
+ hb_bool_t horizontal = HB_DIRECTION_IS_HORIZONTAL (direction);
+
+ if (!format) return;
+
+ if (format & xPlacement) glyph_pos.x_offset += font->em_scale_x (get_short (values++));
+ if (format & yPlacement) glyph_pos.y_offset += font->em_scale_y (get_short (values++));
+ if (format & xAdvance) {
+ if (likely (horizontal)) glyph_pos.x_advance += font->em_scale_x (get_short (values++)); else values++;
+ }
+ /* y_advance values grow downward but font-space grows upward, hence negation */
+ if (format & yAdvance) {
+ if (unlikely (!horizontal)) glyph_pos.y_advance -= font->em_scale_y (get_short (values++)); else values++;
+ }
+
+ if (!has_device ()) return;
+
+ x_ppem = font->x_ppem;
+ y_ppem = font->y_ppem;
+
+ if (!x_ppem && !y_ppem) return;
+
+ /* pixel -> fractional pixel */
+ if (format & xPlaDevice) {
+ if (x_ppem) glyph_pos.x_offset += (base + get_device (values++)).get_x_delta (font); else values++;
+ }
+ if (format & yPlaDevice) {
+ if (y_ppem) glyph_pos.y_offset += (base + get_device (values++)).get_y_delta (font); else values++;
+ }
+ if (format & xAdvDevice) {
+ if (horizontal && x_ppem) glyph_pos.x_advance += (base + get_device (values++)).get_x_delta (font); else values++;
+ }
+ if (format & yAdvDevice) {
+ /* y_advance values grow downward but font-space grows upward, hence negation */
+ if (!horizontal && y_ppem) glyph_pos.y_advance -= (base + get_device (values++)).get_y_delta (font); else values++;
+ }
+ }
+
+ private:
+ inline bool sanitize_value_devices (hb_sanitize_context_t *c, void *base, Value *values) {
+ unsigned int format = *this;
+
+ if (format & xPlacement) values++;
+ if (format & yPlacement) values++;
+ if (format & xAdvance) values++;
+ if (format & yAdvance) values++;
+
+ if ((format & xPlaDevice) && !get_device (values++).sanitize (c, base)) return false;
+ if ((format & yPlaDevice) && !get_device (values++).sanitize (c, base)) return false;
+ if ((format & xAdvDevice) && !get_device (values++).sanitize (c, base)) return false;
+ if ((format & yAdvDevice) && !get_device (values++).sanitize (c, base)) return false;
+
+ return true;
+ }
+
+ static inline OffsetTo<Device>& get_device (Value* value)
+ { return *CastP<OffsetTo<Device> > (value); }
+ static inline const OffsetTo<Device>& get_device (const Value* value)
+ { return *CastP<OffsetTo<Device> > (value); }
+
+ static inline const SHORT& get_short (const Value* value)
+ { return *CastP<SHORT> (value); }
+
+ public:
+
+ inline bool has_device (void) const {
+ unsigned int format = *this;
+ return (format & devices) != 0;
+ }
+
+ inline bool sanitize_value (hb_sanitize_context_t *c, void *base, Value *values) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_range (values, get_size ()) && (!has_device () || sanitize_value_devices (c, base, values)));
+ }
+
+ inline bool sanitize_values (hb_sanitize_context_t *c, void *base, Value *values, unsigned int count) {
+ TRACE_SANITIZE ();
+ unsigned int len = get_len ();
+
+ if (!c->check_array (values, get_size (), count)) return TRACE_RETURN (false);
+
+ if (!has_device ()) return TRACE_RETURN (true);
+
+ for (unsigned int i = 0; i < count; i++) {
+ if (!sanitize_value_devices (c, base, values))
+ return TRACE_RETURN (false);
+ values += len;
+ }
+
+ return TRACE_RETURN (true);
+ }
+
+ /* Just sanitize referenced Device tables. Doesn't check the values themselves. */
+ inline bool sanitize_values_stride_unsafe (hb_sanitize_context_t *c, void *base, Value *values, unsigned int count, unsigned int stride) {
+ TRACE_SANITIZE ();
+
+ if (!has_device ()) return TRACE_RETURN (true);
+
+ for (unsigned int i = 0; i < count; i++) {
+ if (!sanitize_value_devices (c, base, values))
+ return TRACE_RETURN (false);
+ values += stride;
+ }
+
+ return TRACE_RETURN (true);
+ }
+};
+
+
+struct AnchorFormat1
+{
+ friend struct Anchor;
+
+ private:
+ inline void get_anchor (hb_font_t *font, hb_codepoint_t glyph_id HB_UNUSED,
+ hb_position_t *x, hb_position_t *y) const
+ {
+ *x = font->em_scale_x (xCoordinate);
+ *y = font->em_scale_y (yCoordinate);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 1 */
+ SHORT xCoordinate; /* Horizontal value--in design units */
+ SHORT yCoordinate; /* Vertical value--in design units */
+ public:
+ DEFINE_SIZE_STATIC (6);
+};
+
+struct AnchorFormat2
+{
+ friend struct Anchor;
+
+ private:
+ inline void get_anchor (hb_font_t *font, hb_codepoint_t glyph_id,
+ hb_position_t *x, hb_position_t *y) const
+ {
+ unsigned int x_ppem = font->x_ppem;
+ unsigned int y_ppem = font->y_ppem;
+ hb_position_t cx, cy;
+ hb_bool_t ret = false;
+
+ if (x_ppem || y_ppem)
+ ret = font->get_glyph_contour_point_for_origin (glyph_id, anchorPoint, HB_DIRECTION_LTR, &cx, &cy);
+ *x = x_ppem && ret ? cx : font->em_scale_x (xCoordinate);
+ *y = y_ppem && ret ? cy : font->em_scale_y (yCoordinate);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 2 */
+ SHORT xCoordinate; /* Horizontal value--in design units */
+ SHORT yCoordinate; /* Vertical value--in design units */
+ USHORT anchorPoint; /* Index to glyph contour point */
+ public:
+ DEFINE_SIZE_STATIC (8);
+};
+
+struct AnchorFormat3
+{
+ friend struct Anchor;
+
+ private:
+ inline void get_anchor (hb_font_t *font, hb_codepoint_t glyph_id HB_UNUSED,
+ hb_position_t *x, hb_position_t *y) const
+ {
+ *x = font->em_scale_x (xCoordinate);
+ *y = font->em_scale_y (yCoordinate);
+
+ if (font->x_ppem)
+ *x += (this+xDeviceTable).get_x_delta (font);
+ if (font->y_ppem)
+ *y += (this+yDeviceTable).get_x_delta (font);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this) && xDeviceTable.sanitize (c, this) && yDeviceTable.sanitize (c, this));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 3 */
+ SHORT xCoordinate; /* Horizontal value--in design units */
+ SHORT yCoordinate; /* Vertical value--in design units */
+ OffsetTo<Device>
+ xDeviceTable; /* Offset to Device table for X
+ * coordinate-- from beginning of
+ * Anchor table (may be NULL) */
+ OffsetTo<Device>
+ yDeviceTable; /* Offset to Device table for Y
+ * coordinate-- from beginning of
+ * Anchor table (may be NULL) */
+ public:
+ DEFINE_SIZE_STATIC (10);
+};
+
+struct Anchor
+{
+ inline void get_anchor (hb_font_t *font, hb_codepoint_t glyph_id,
+ hb_position_t *x, hb_position_t *y) const
+ {
+ *x = *y = 0;
+ switch (u.format) {
+ case 1: u.format1.get_anchor (font, glyph_id, x, y); return;
+ case 2: u.format2.get_anchor (font, glyph_id, x, y); return;
+ case 3: u.format3.get_anchor (font, glyph_id, x, y); return;
+ default: return;
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!u.format.sanitize (c)) return TRACE_RETURN (false);
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.sanitize (c));
+ case 2: return TRACE_RETURN (u.format2.sanitize (c));
+ case 3: return TRACE_RETURN (u.format3.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ USHORT format; /* Format identifier */
+ AnchorFormat1 format1;
+ AnchorFormat2 format2;
+ AnchorFormat3 format3;
+ } u;
+ public:
+ DEFINE_SIZE_UNION (2, format);
+};
+
+
+struct AnchorMatrix
+{
+ inline const Anchor& get_anchor (unsigned int row, unsigned int col, unsigned int cols) const {
+ if (unlikely (row >= rows || col >= cols)) return Null(Anchor);
+ return this+matrix[row * cols + col];
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c, unsigned int cols) {
+ TRACE_SANITIZE ();
+ if (!c->check_struct (this)) return TRACE_RETURN (false);
+ if (unlikely (rows > 0 && cols >= ((unsigned int) -1) / rows)) return TRACE_RETURN (false);
+ unsigned int count = rows * cols;
+ if (!c->check_array (matrix, matrix[0].static_size, count)) return TRACE_RETURN (false);
+ for (unsigned int i = 0; i < count; i++)
+ if (!matrix[i].sanitize (c, this)) return TRACE_RETURN (false);
+ return TRACE_RETURN (true);
+ }
+
+ USHORT rows; /* Number of rows */
+ protected:
+ OffsetTo<Anchor>
+ matrix[VAR]; /* Matrix of offsets to Anchor tables--
+ * from beginning of AnchorMatrix table */
+ public:
+ DEFINE_SIZE_ARRAY (2, matrix);
+};
+
+
+struct MarkRecord
+{
+ friend struct MarkArray;
+
+ inline bool sanitize (hb_sanitize_context_t *c, void *base) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this) && markAnchor.sanitize (c, base));
+ }
+
+ protected:
+ USHORT klass; /* Class defined for this mark */
+ OffsetTo<Anchor>
+ markAnchor; /* Offset to Anchor table--from
+ * beginning of MarkArray table */
+ public:
+ DEFINE_SIZE_STATIC (4);
+};
+
+struct MarkArray : ArrayOf<MarkRecord> /* Array of MarkRecords--in Coverage order */
+{
+ inline bool apply (hb_apply_context_t *c,
+ unsigned int mark_index, unsigned int glyph_index,
+ const AnchorMatrix &anchors, unsigned int class_count,
+ unsigned int glyph_pos) const
+ {
+ TRACE_APPLY ();
+ const MarkRecord &record = ArrayOf<MarkRecord>::operator[](mark_index);
+ unsigned int mark_class = record.klass;
+
+ const Anchor& mark_anchor = this + record.markAnchor;
+ const Anchor& glyph_anchor = anchors.get_anchor (glyph_index, mark_class, class_count);
+
+ hb_position_t mark_x, mark_y, base_x, base_y;
+
+ mark_anchor.get_anchor (c->font, c->buffer->cur().codepoint, &mark_x, &mark_y);
+ glyph_anchor.get_anchor (c->font, c->buffer->info[glyph_pos].codepoint, &base_x, &base_y);
+
+ hb_glyph_position_t &o = c->buffer->cur_pos();
+ o.x_offset = base_x - mark_x;
+ o.y_offset = base_y - mark_y;
+ o.attach_lookback() = c->buffer->idx - glyph_pos;
+
+ c->buffer->idx++;
+ return TRACE_RETURN (true);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (ArrayOf<MarkRecord>::sanitize (c, this));
+ }
+};
+
+
+/* Lookups */
+
+struct SinglePosFormat1
+{
+ friend struct SinglePos;
+
+ private:
+
+ inline const Coverage &get_coverage (void) const
+ {
+ return this+coverage;
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ unsigned int index = (this+coverage) (c->buffer->cur().codepoint);
+ if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
+
+ valueFormat.apply_value (c->font, c->direction, this,
+ values, c->buffer->cur_pos());
+
+ c->buffer->idx++;
+ return TRACE_RETURN (true);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this) && coverage.sanitize (c, this) && valueFormat.sanitize_value (c, this, values));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 1 */
+ OffsetTo<Coverage>
+ coverage; /* Offset to Coverage table--from
+ * beginning of subtable */
+ ValueFormat valueFormat; /* Defines the types of data in the
+ * ValueRecord */
+ ValueRecord values; /* Defines positioning
+ * value(s)--applied to all glyphs in
+ * the Coverage table */
+ public:
+ DEFINE_SIZE_ARRAY (6, values);
+};
+
+struct SinglePosFormat2
+{
+ friend struct SinglePos;
+
+ private:
+
+ inline const Coverage &get_coverage (void) const
+ {
+ return this+coverage;
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ unsigned int index = (this+coverage) (c->buffer->cur().codepoint);
+ if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
+
+ if (likely (index >= valueCount)) return TRACE_RETURN (false);
+
+ valueFormat.apply_value (c->font, c->direction, this,
+ &values[index * valueFormat.get_len ()],
+ c->buffer->cur_pos());
+
+ c->buffer->idx++;
+ return TRACE_RETURN (true);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this) && coverage.sanitize (c, this) && valueFormat.sanitize_values (c, this, values, valueCount));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 2 */
+ OffsetTo<Coverage>
+ coverage; /* Offset to Coverage table--from
+ * beginning of subtable */
+ ValueFormat valueFormat; /* Defines the types of data in the
+ * ValueRecord */
+ USHORT valueCount; /* Number of ValueRecords */
+ ValueRecord values; /* Array of ValueRecords--positioning
+ * values applied to glyphs */
+ public:
+ DEFINE_SIZE_ARRAY (8, values);
+};
+
+struct SinglePos
+{
+ friend struct PosLookupSubTable;
+
+ private:
+
+ inline const Coverage &get_coverage (void) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.get_coverage ();
+ case 2: return u.format2.get_coverage ();
+ default:return Null(Coverage);
+ }
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.apply (c));
+ case 2: return TRACE_RETURN (u.format2.apply (c));
+ default:return TRACE_RETURN (false);
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!u.format.sanitize (c)) return TRACE_RETURN (false);
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.sanitize (c));
+ case 2: return TRACE_RETURN (u.format2.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ USHORT format; /* Format identifier */
+ SinglePosFormat1 format1;
+ SinglePosFormat2 format2;
+ } u;
+};
+
+
+struct PairValueRecord
+{
+ friend struct PairSet;
+
+ protected:
+ GlyphID secondGlyph; /* GlyphID of second glyph in the
+ * pair--first glyph is listed in the
+ * Coverage table */
+ ValueRecord values; /* Positioning data for the first glyph
+ * followed by for second glyph */
+ public:
+ DEFINE_SIZE_ARRAY (2, values);
+};
+
+struct PairSet
+{
+ friend struct PairPosFormat1;
+
+ inline bool apply (hb_apply_context_t *c,
+ const ValueFormat *valueFormats,
+ unsigned int pos) const
+ {
+ TRACE_APPLY ();
+ unsigned int len1 = valueFormats[0].get_len ();
+ unsigned int len2 = valueFormats[1].get_len ();
+ unsigned int record_size = USHORT::static_size * (1 + len1 + len2);
+
+ unsigned int count = len;
+ const PairValueRecord *record = CastP<PairValueRecord> (array);
+ for (unsigned int i = 0; i < count; i++)
+ {
+ if (c->buffer->info[pos].codepoint == record->secondGlyph)
+ {
+ valueFormats[0].apply_value (c->font, c->direction, this,
+ &record->values[0], c->buffer->cur_pos());
+ valueFormats[1].apply_value (c->font, c->direction, this,
+ &record->values[len1], c->buffer->pos[pos]);
+ if (len2)
+ pos++;
+ c->buffer->idx = pos;
+ return TRACE_RETURN (true);
+ }
+ record = &StructAtOffset<PairValueRecord> (record, record_size);
+ }
+
+ return TRACE_RETURN (false);
+ }
+
+ struct sanitize_closure_t {
+ void *base;
+ ValueFormat *valueFormats;
+ unsigned int len1; /* valueFormats[0].get_len() */
+ unsigned int stride; /* 1 + len1 + len2 */
+ };
+
+ inline bool sanitize (hb_sanitize_context_t *c, const sanitize_closure_t *closure) {
+ TRACE_SANITIZE ();
+ if (!(c->check_struct (this)
+ && c->check_array (array, USHORT::static_size * closure->stride, len))) return TRACE_RETURN (false);
+
+ unsigned int count = len;
+ PairValueRecord *record = CastP<PairValueRecord> (array);
+ return TRACE_RETURN (closure->valueFormats[0].sanitize_values_stride_unsafe (c, closure->base, &record->values[0], count, closure->stride)
+ && closure->valueFormats[1].sanitize_values_stride_unsafe (c, closure->base, &record->values[closure->len1], count, closure->stride));
+ }
+
+ protected:
+ USHORT len; /* Number of PairValueRecords */
+ USHORT array[VAR]; /* Array of PairValueRecords--ordered
+ * by GlyphID of the second glyph */
+ public:
+ DEFINE_SIZE_ARRAY (2, array);
+};
+
+struct PairPosFormat1
+{
+ friend struct PairPos;
+
+ private:
+
+ inline const Coverage &get_coverage (void) const
+ {
+ return this+coverage;
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ hb_apply_context_t::mark_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) (c->buffer->cur().codepoint);
+ if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
+
+ if (!skippy_iter.next ()) return TRACE_RETURN (false);
+
+ return TRACE_RETURN ((this+pairSet[index]).apply (c, &valueFormat1, skippy_iter.idx));
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+
+ unsigned int len1 = valueFormat1.get_len ();
+ unsigned int len2 = valueFormat2.get_len ();
+ PairSet::sanitize_closure_t closure = {
+ this,
+ &valueFormat1,
+ len1,
+ 1 + len1 + len2
+ };
+
+ return TRACE_RETURN (c->check_struct (this) && coverage.sanitize (c, this) && pairSet.sanitize (c, this, &closure));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 1 */
+ OffsetTo<Coverage>
+ coverage; /* Offset to Coverage table--from
+ * beginning of subtable */
+ ValueFormat valueFormat1; /* Defines the types of data in
+ * ValueRecord1--for the first glyph
+ * in the pair--may be zero (0) */
+ ValueFormat valueFormat2; /* Defines the types of data in
+ * ValueRecord2--for the second glyph
+ * in the pair--may be zero (0) */
+ OffsetArrayOf<PairSet>
+ pairSet; /* Array of PairSet tables
+ * ordered by Coverage Index */
+ public:
+ DEFINE_SIZE_ARRAY (10, pairSet);
+};
+
+struct PairPosFormat2
+{
+ friend struct PairPos;
+
+ private:
+
+ inline const Coverage &get_coverage (void) const
+ {
+ return this+coverage;
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ hb_apply_context_t::mark_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) (c->buffer->cur().codepoint);
+ if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
+
+ if (!skippy_iter.next ()) return TRACE_RETURN (false);
+
+ unsigned int len1 = valueFormat1.get_len ();
+ unsigned int len2 = valueFormat2.get_len ();
+ unsigned int record_len = len1 + len2;
+
+ unsigned int klass1 = (this+classDef1) (c->buffer->cur().codepoint);
+ unsigned int klass2 = (this+classDef2) (c->buffer->info[skippy_iter.idx].codepoint);
+ if (unlikely (klass1 >= class1Count || klass2 >= class2Count)) return TRACE_RETURN (false);
+
+ const Value *v = &values[record_len * (klass1 * class2Count + klass2)];
+ valueFormat1.apply_value (c->font, c->direction, this,
+ v, c->buffer->cur_pos());
+ valueFormat2.apply_value (c->font, c->direction, this,
+ v + len1, c->buffer->pos[skippy_iter.idx]);
+
+ c->buffer->idx = skippy_iter.idx;
+ if (len2)
+ c->buffer->idx++;
+
+ return TRACE_RETURN (true);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!(c->check_struct (this)
+ && coverage.sanitize (c, this)
+ && classDef1.sanitize (c, this)
+ && classDef2.sanitize (c, this))) return TRACE_RETURN (false);
+
+ unsigned int len1 = valueFormat1.get_len ();
+ unsigned int len2 = valueFormat2.get_len ();
+ unsigned int stride = len1 + len2;
+ unsigned int record_size = valueFormat1.get_size () + valueFormat2.get_size ();
+ unsigned int count = (unsigned int) class1Count * (unsigned int) class2Count;
+ return TRACE_RETURN (c->check_array (values, record_size, count) &&
+ valueFormat1.sanitize_values_stride_unsafe (c, this, &values[0], count, stride) &&
+ valueFormat2.sanitize_values_stride_unsafe (c, this, &values[len1], count, stride));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 2 */
+ OffsetTo<Coverage>
+ coverage; /* Offset to Coverage table--from
+ * beginning of subtable */
+ ValueFormat valueFormat1; /* ValueRecord definition--for the
+ * first glyph of the pair--may be zero
+ * (0) */
+ ValueFormat valueFormat2; /* ValueRecord definition--for the
+ * second glyph of the pair--may be
+ * zero (0) */
+ OffsetTo<ClassDef>
+ classDef1; /* Offset to ClassDef table--from
+ * beginning of PairPos subtable--for
+ * the first glyph of the pair */
+ OffsetTo<ClassDef>
+ classDef2; /* Offset to ClassDef table--from
+ * beginning of PairPos subtable--for
+ * the second glyph of the pair */
+ USHORT class1Count; /* Number of classes in ClassDef1
+ * table--includes Class0 */
+ USHORT class2Count; /* Number of classes in ClassDef2
+ * table--includes Class0 */
+ ValueRecord values; /* Matrix of value pairs:
+ * class1-major, class2-minor,
+ * Each entry has value1 and value2 */
+ public:
+ DEFINE_SIZE_ARRAY (16, values);
+};
+
+struct PairPos
+{
+ friend struct PosLookupSubTable;
+
+ private:
+
+ inline const Coverage &get_coverage (void) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.get_coverage ();
+ case 2: return u.format2.get_coverage ();
+ default:return Null(Coverage);
+ }
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.apply (c));
+ case 2: return TRACE_RETURN (u.format2.apply (c));
+ default:return TRACE_RETURN (false);
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!u.format.sanitize (c)) return TRACE_RETURN (false);
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.sanitize (c));
+ case 2: return TRACE_RETURN (u.format2.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ USHORT format; /* Format identifier */
+ PairPosFormat1 format1;
+ PairPosFormat2 format2;
+ } u;
+};
+
+
+struct EntryExitRecord
+{
+ friend struct CursivePosFormat1;
+
+ inline bool sanitize (hb_sanitize_context_t *c, void *base) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (entryAnchor.sanitize (c, base) && exitAnchor.sanitize (c, base));
+ }
+
+ protected:
+ OffsetTo<Anchor>
+ entryAnchor; /* Offset to EntryAnchor table--from
+ * beginning of CursivePos
+ * subtable--may be NULL */
+ OffsetTo<Anchor>
+ exitAnchor; /* Offset to ExitAnchor table--from
+ * beginning of CursivePos
+ * subtable--may be NULL */
+ public:
+ DEFINE_SIZE_STATIC (4);
+};
+
+struct CursivePosFormat1
+{
+ friend struct CursivePos;
+
+ private:
+
+ inline const Coverage &get_coverage (void) const
+ {
+ return this+coverage;
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+
+ /* We don't handle mark glyphs here. */
+ if (c->property & HB_OT_LAYOUT_GLYPH_CLASS_MARK) return TRACE_RETURN (false);
+
+ hb_apply_context_t::mark_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) (c->buffer->cur().codepoint)];
+ if (!this_record.exitAnchor) return TRACE_RETURN (false);
+
+ if (!skippy_iter.next ()) return TRACE_RETURN (false);
+
+ const EntryExitRecord &next_record = entryExitRecord[(this+coverage) (c->buffer->info[skippy_iter.idx].codepoint)];
+ if (!next_record.entryAnchor) return TRACE_RETURN (false);
+
+ unsigned int i = c->buffer->idx;
+ unsigned int j = skippy_iter.idx;
+
+ hb_position_t entry_x, entry_y, exit_x, exit_y;
+ (this+this_record.exitAnchor).get_anchor (c->font, c->buffer->info[i].codepoint, &exit_x, &exit_y);
+ (this+next_record.entryAnchor).get_anchor (c->font, c->buffer->info[j].codepoint, &entry_x, &entry_y);
+
+ hb_glyph_position_t *pos = c->buffer->pos;
+
+ hb_position_t d;
+ /* Main-direction adjustment */
+ switch (c->direction) {
+ case HB_DIRECTION_LTR:
+ pos[i].x_advance = exit_x + pos[i].x_offset;
+
+ d = entry_x + pos[j].x_offset;
+ pos[j].x_advance -= d;
+ pos[j].x_offset -= d;
+ break;
+ case HB_DIRECTION_RTL:
+ d = exit_x + pos[i].x_offset;
+ pos[i].x_advance -= d;
+ pos[i].x_offset -= d;
+
+ pos[j].x_advance = entry_x + pos[j].x_offset;
+ break;
+ case HB_DIRECTION_TTB:
+ pos[i].y_advance = exit_y + pos[i].y_offset;
+
+ d = entry_y + pos[j].y_offset;
+ pos[j].y_advance -= d;
+ pos[j].y_offset -= d;
+ break;
+ case HB_DIRECTION_BTT:
+ d = exit_y + pos[i].y_offset;
+ pos[i].y_advance -= d;
+ pos[i].y_offset -= d;
+
+ pos[j].y_advance = entry_y;
+ break;
+ case HB_DIRECTION_INVALID:
+ default:
+ break;
+ }
+
+ /* Cross-direction adjustment */
+ if (c->lookup_props & LookupFlag::RightToLeft) {
+ pos[i].cursive_chain() = j - i;
+ if (likely (HB_DIRECTION_IS_HORIZONTAL (c->direction)))
+ pos[i].y_offset = entry_y - exit_y;
+ else
+ pos[i].x_offset = entry_x - exit_x;
+ } else {
+ pos[j].cursive_chain() = i - j;
+ if (likely (HB_DIRECTION_IS_HORIZONTAL (c->direction)))
+ pos[j].y_offset = exit_y - entry_y;
+ else
+ pos[j].x_offset = exit_x - entry_x;
+ }
+
+ c->buffer->idx = j;
+ return TRACE_RETURN (true);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (coverage.sanitize (c, this) && entryExitRecord.sanitize (c, this));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 1 */
+ OffsetTo<Coverage>
+ coverage; /* Offset to Coverage table--from
+ * beginning of subtable */
+ ArrayOf<EntryExitRecord>
+ entryExitRecord; /* Array of EntryExit records--in
+ * Coverage Index order */
+ public:
+ DEFINE_SIZE_ARRAY (6, entryExitRecord);
+};
+
+struct CursivePos
+{
+ friend struct PosLookupSubTable;
+
+ private:
+
+ inline const Coverage &get_coverage (void) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.get_coverage ();
+ default:return Null(Coverage);
+ }
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.apply (c));
+ default:return TRACE_RETURN (false);
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!u.format.sanitize (c)) return TRACE_RETURN (false);
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ USHORT format; /* Format identifier */
+ CursivePosFormat1 format1;
+ } u;
+};
+
+
+typedef AnchorMatrix BaseArray; /* base-major--
+ * in order of BaseCoverage Index--,
+ * mark-minor--
+ * ordered by class--zero-based. */
+
+struct MarkBasePosFormat1
+{
+ friend struct MarkBasePos;
+
+ private:
+
+ inline const Coverage &get_coverage (void) const
+ {
+ return this+markCoverage;
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ unsigned int mark_index = (this+markCoverage) (c->buffer->cur().codepoint);
+ 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);
+ do {
+ if (!skippy_iter.prev (&property, LookupFlag::IgnoreMarks)) 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_CLASS_BASE_GLYPH)) {/*return TRACE_RETURN (false);*/}
+
+ unsigned int base_index = (this+baseCoverage) (c->buffer->info[skippy_iter.idx].codepoint);
+ if (base_index == NOT_COVERED) return TRACE_RETURN (false);
+
+ return TRACE_RETURN ((this+markArray).apply (c, mark_index, base_index, this+baseArray, classCount, skippy_iter.idx));
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this) && markCoverage.sanitize (c, this) && baseCoverage.sanitize (c, this) &&
+ markArray.sanitize (c, this) && baseArray.sanitize (c, this, (unsigned int) classCount));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 1 */
+ OffsetTo<Coverage>
+ markCoverage; /* Offset to MarkCoverage table--from
+ * beginning of MarkBasePos subtable */
+ OffsetTo<Coverage>
+ baseCoverage; /* Offset to BaseCoverage table--from
+ * beginning of MarkBasePos subtable */
+ USHORT classCount; /* Number of classes defined for marks */
+ OffsetTo<MarkArray>
+ markArray; /* Offset to MarkArray table--from
+ * beginning of MarkBasePos subtable */
+ OffsetTo<BaseArray>
+ baseArray; /* Offset to BaseArray table--from
+ * beginning of MarkBasePos subtable */
+ public:
+ DEFINE_SIZE_STATIC (12);
+};
+
+struct MarkBasePos
+{
+ friend struct PosLookupSubTable;
+
+ private:
+
+ inline const Coverage &get_coverage (void) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.get_coverage ();
+ default:return Null(Coverage);
+ }
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.apply (c));
+ default:return TRACE_RETURN (false);
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!u.format.sanitize (c)) return TRACE_RETURN (false);
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ USHORT format; /* Format identifier */
+ MarkBasePosFormat1 format1;
+ } u;
+};
+
+
+typedef AnchorMatrix LigatureAttach; /* component-major--
+ * in order of writing direction--,
+ * mark-minor--
+ * ordered by class--zero-based. */
+
+typedef OffsetListOf<LigatureAttach> LigatureArray;
+ /* Array of LigatureAttach
+ * tables ordered by
+ * LigatureCoverage Index */
+
+struct MarkLigPosFormat1
+{
+ friend struct MarkLigPos;
+
+ private:
+
+ inline const Coverage &get_coverage (void) const
+ {
+ return this+markCoverage;
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ unsigned int mark_index = (this+markCoverage) (c->buffer->cur().codepoint);
+ 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);
+
+ /* The following assertion is too strong, so we've disabled it. */
+ if (!(property & HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE)) {/*return TRACE_RETURN (false);*/}
+
+ unsigned int j = skippy_iter.idx;
+ unsigned int lig_index = (this+ligatureCoverage) (c->buffer->info[j].codepoint);
+ if (lig_index == NOT_COVERED) return TRACE_RETURN (false);
+
+ const LigatureArray& lig_array = this+ligatureArray;
+ const LigatureAttach& lig_attach = lig_array[lig_index];
+
+ /* Find component to attach to */
+ unsigned int comp_count = lig_attach.rows;
+ if (unlikely (!comp_count)) return TRACE_RETURN (false);
+
+ /* We must now check whether the ligature ID of the current mark glyph
+ * is identical to the ligature ID of the found ligature. If yes, we
+ * can directly use the component index. If not, we attach the mark
+ * glyph to the last component of the ligature. */
+ unsigned int comp_index;
+ unsigned int lig_id = get_lig_id (c->buffer->info[j]);
+ unsigned int mark_id = get_lig_id (c->buffer->cur());
+ unsigned int mark_comp = get_lig_comp (c->buffer->cur());
+ if (lig_id && lig_id == mark_id && mark_comp > 0)
+ comp_index = MIN (comp_count, get_lig_comp (c->buffer->cur())) - 1;
+ else
+ comp_index = comp_count - 1;
+
+ return TRACE_RETURN ((this+markArray).apply (c, mark_index, comp_index, lig_attach, classCount, j));
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this) && markCoverage.sanitize (c, this) && ligatureCoverage.sanitize (c, this) &&
+ markArray.sanitize (c, this) && ligatureArray.sanitize (c, this, (unsigned int) classCount));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 1 */
+ OffsetTo<Coverage>
+ markCoverage; /* Offset to Mark Coverage table--from
+ * beginning of MarkLigPos subtable */
+ OffsetTo<Coverage>
+ ligatureCoverage; /* Offset to Ligature Coverage
+ * table--from beginning of MarkLigPos
+ * subtable */
+ USHORT classCount; /* Number of defined mark classes */
+ OffsetTo<MarkArray>
+ markArray; /* Offset to MarkArray table--from
+ * beginning of MarkLigPos subtable */
+ OffsetTo<LigatureArray>
+ ligatureArray; /* Offset to LigatureArray table--from
+ * beginning of MarkLigPos subtable */
+ public:
+ DEFINE_SIZE_STATIC (12);
+};
+
+struct MarkLigPos
+{
+ friend struct PosLookupSubTable;
+
+ private:
+
+ inline const Coverage &get_coverage (void) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.get_coverage ();
+ default:return Null(Coverage);
+ }
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.apply (c));
+ default:return TRACE_RETURN (false);
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!u.format.sanitize (c)) return TRACE_RETURN (false);
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ USHORT format; /* Format identifier */
+ MarkLigPosFormat1 format1;
+ } u;
+};
+
+
+typedef AnchorMatrix Mark2Array; /* mark2-major--
+ * in order of Mark2Coverage Index--,
+ * mark1-minor--
+ * ordered by class--zero-based. */
+
+struct MarkMarkPosFormat1
+{
+ friend struct MarkMarkPos;
+
+ private:
+
+ inline const Coverage &get_coverage (void) const
+ {
+ return this+mark1Coverage;
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ unsigned int mark1_index = (this+mark1Coverage) (c->buffer->cur().codepoint);
+ 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);
+
+ if (!(property & HB_OT_LAYOUT_GLYPH_CLASS_MARK)) return TRACE_RETURN (false);
+
+ unsigned int j = skippy_iter.idx;
+
+ unsigned int id1 = get_lig_id (c->buffer->cur());
+ unsigned int id2 = get_lig_id (c->buffer->info[j]);
+ unsigned int comp1 = get_lig_comp (c->buffer->cur());
+ unsigned int comp2 = get_lig_comp (c->buffer->info[j]);
+
+ if (likely (id1 == id2)) {
+ if (id1 == 0) /* Marks belonging to the same base. */
+ goto good;
+ else if (comp1 == comp2) /* Marks belonging to the same ligature component. */
+ goto good;
+ } else {
+ /* If ligature ids don't match, it may be the case that one of the marks
+ * itself is a ligature. In which case match. */
+ if ((id1 > 0 && !comp1) || (id2 > 0 && !comp2))
+ goto good;
+ }
+
+ /* Didn't match. */
+ return TRACE_RETURN (false);
+
+ good:
+ unsigned int mark2_index = (this+mark2Coverage) (c->buffer->info[j].codepoint);
+ if (mark2_index == NOT_COVERED) return TRACE_RETURN (false);
+
+ return TRACE_RETURN ((this+mark1Array).apply (c, mark1_index, mark2_index, this+mark2Array, classCount, j));
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this) && mark1Coverage.sanitize (c, this) &&
+ mark2Coverage.sanitize (c, this) && mark1Array.sanitize (c, this)
+ && mark2Array.sanitize (c, this, (unsigned int) classCount));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 1 */
+ OffsetTo<Coverage>
+ mark1Coverage; /* Offset to Combining Mark1 Coverage
+ * table--from beginning of MarkMarkPos
+ * subtable */
+ OffsetTo<Coverage>
+ mark2Coverage; /* Offset to Combining Mark2 Coverage
+ * table--from beginning of MarkMarkPos
+ * subtable */
+ USHORT classCount; /* Number of defined mark classes */
+ OffsetTo<MarkArray>
+ mark1Array; /* Offset to Mark1Array table--from
+ * beginning of MarkMarkPos subtable */
+ OffsetTo<Mark2Array>
+ mark2Array; /* Offset to Mark2Array table--from
+ * beginning of MarkMarkPos subtable */
+ public:
+ DEFINE_SIZE_STATIC (12);
+};
+
+struct MarkMarkPos
+{
+ friend struct PosLookupSubTable;
+
+ private:
+
+ inline const Coverage &get_coverage (void) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.get_coverage ();
+ default:return Null(Coverage);
+ }
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.apply (c));
+ default:return TRACE_RETURN (false);
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!u.format.sanitize (c)) return TRACE_RETURN (false);
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ USHORT format; /* Format identifier */
+ MarkMarkPosFormat1 format1;
+ } u;
+};
+
+
+static inline bool position_lookup (hb_apply_context_t *c, unsigned int lookup_index);
+
+struct ContextPos : Context
+{
+ friend struct PosLookupSubTable;
+
+ private:
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ return TRACE_RETURN (Context::apply (c, position_lookup));
+ }
+};
+
+struct ChainContextPos : ChainContext
+{
+ friend struct PosLookupSubTable;
+
+ private:
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ return TRACE_RETURN (ChainContext::apply (c, position_lookup));
+ }
+};
+
+
+struct ExtensionPos : Extension
+{
+ friend struct PosLookupSubTable;
+
+ private:
+ inline const struct PosLookupSubTable& get_subtable (void) const
+ {
+ unsigned int offset = get_offset ();
+ if (unlikely (!offset)) return Null(PosLookupSubTable);
+ return StructAtOffset<PosLookupSubTable> (this, offset);
+ }
+
+ inline const Coverage &get_coverage (void) const;
+
+ inline bool apply (hb_apply_context_t *c) const;
+
+ inline bool sanitize (hb_sanitize_context_t *c);
+};
+
+
+
+/*
+ * PosLookup
+ */
+
+
+struct PosLookupSubTable
+{
+ friend struct PosLookup;
+
+ enum Type {
+ Single = 1,
+ Pair = 2,
+ Cursive = 3,
+ MarkBase = 4,
+ MarkLig = 5,
+ MarkMark = 6,
+ Context = 7,
+ ChainContext = 8,
+ Extension = 9
+ };
+
+ inline const Coverage &get_coverage (unsigned int lookup_type) const
+ {
+ switch (lookup_type) {
+ case Single: return u.single.get_coverage ();
+ case Pair: return u.pair.get_coverage ();
+ case Cursive: return u.cursive.get_coverage ();
+ case MarkBase: return u.markBase.get_coverage ();
+ case MarkLig: return u.markLig.get_coverage ();
+ case MarkMark: return u.markMark.get_coverage ();
+ case Context: return u.context.get_coverage ();
+ case ChainContext: return u.chainContext.get_coverage ();
+ case Extension: return u.extension.get_coverage ();
+ default: return Null(Coverage);
+ }
+ }
+
+ inline bool apply (hb_apply_context_t *c, unsigned int lookup_type) const
+ {
+ TRACE_APPLY ();
+ switch (lookup_type) {
+ case Single: return TRACE_RETURN (u.single.apply (c));
+ case Pair: return TRACE_RETURN (u.pair.apply (c));
+ case Cursive: return TRACE_RETURN (u.cursive.apply (c));
+ case MarkBase: return TRACE_RETURN (u.markBase.apply (c));
+ case MarkLig: return TRACE_RETURN (u.markLig.apply (c));
+ case MarkMark: return TRACE_RETURN (u.markMark.apply (c));
+ case Context: return TRACE_RETURN (u.context.apply (c));
+ case ChainContext: return TRACE_RETURN (u.chainContext.apply (c));
+ case Extension: return TRACE_RETURN (u.extension.apply (c));
+ default: return TRACE_RETURN (false);
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c, unsigned int lookup_type) {
+ TRACE_SANITIZE ();
+ if (!u.header.sub_format.sanitize (c))
+ return TRACE_RETURN (false);
+ switch (lookup_type) {
+ case Single: return TRACE_RETURN (u.single.sanitize (c));
+ case Pair: return TRACE_RETURN (u.pair.sanitize (c));
+ case Cursive: return TRACE_RETURN (u.cursive.sanitize (c));
+ case MarkBase: return TRACE_RETURN (u.markBase.sanitize (c));
+ case MarkLig: return TRACE_RETURN (u.markLig.sanitize (c));
+ case MarkMark: return TRACE_RETURN (u.markMark.sanitize (c));
+ case Context: return TRACE_RETURN (u.context.sanitize (c));
+ case ChainContext: return TRACE_RETURN (u.chainContext.sanitize (c));
+ case Extension: return TRACE_RETURN (u.extension.sanitize (c));
+ default: return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ struct {
+ USHORT sub_format;
+ } header;
+ SinglePos single;
+ PairPos pair;
+ CursivePos cursive;
+ MarkBasePos markBase;
+ MarkLigPos markLig;
+ MarkMarkPos markMark;
+ ContextPos context;
+ ChainContextPos chainContext;
+ ExtensionPos extension;
+ } u;
+ public:
+ DEFINE_SIZE_UNION (2, header.sub_format);
+};
+
+
+struct PosLookup : Lookup
+{
+ inline const PosLookupSubTable& get_subtable (unsigned int i) const
+ { return this+CastR<OffsetArrayOf<PosLookupSubTable> > (subTable)[i]; }
+
+ template <typename set_t>
+ inline void add_coverage (set_t *glyphs) const
+ {
+ const Coverage *last = NULL;
+ unsigned int count = get_subtable_count ();
+ for (unsigned int i = 0; i < count; i++) {
+ const Coverage *c = &get_subtable (i).get_coverage (get_type ());
+ if (c != last) {
+ c->add_coverage (glyphs);
+ last = c;
+ }
+ }
+ }
+
+ inline bool apply_once (hb_apply_context_t *c) const
+ {
+ unsigned int lookup_type = get_type ();
+
+ if (!c->check_glyph_property (&c->buffer->cur(), c->lookup_props, &c->property))
+ return false;
+
+ unsigned int count = get_subtable_count ();
+ for (unsigned int i = 0; i < count; i++)
+ if (get_subtable (i).apply (c, lookup_type))
+ return true;
+
+ return false;
+ }
+
+ inline bool apply_string (hb_apply_context_t *c) const
+ {
+ bool ret = false;
+
+ if (unlikely (!c->buffer->len))
+ return false;
+
+ c->set_lookup (*this);
+
+ c->buffer->idx = 0;
+
+ while (c->buffer->idx < c->buffer->len)
+ {
+ if ((c->buffer->cur().mask & c->lookup_mask) &&
+ c->digest.may_have (c->buffer->cur().codepoint) &&
+ apply_once (c))
+ ret = true;
+ else
+ c->buffer->idx++;
+ }
+
+ return ret;
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (unlikely (!Lookup::sanitize (c))) return TRACE_RETURN (false);
+ OffsetArrayOf<PosLookupSubTable> &list = CastR<OffsetArrayOf<PosLookupSubTable> > (subTable);
+ return TRACE_RETURN (list.sanitize (c, this, get_type ()));
+ }
+};
+
+typedef OffsetListOf<PosLookup> PosLookupList;
+
+/*
+ * GPOS -- The Glyph Positioning Table
+ */
+
+struct GPOS : GSUBGPOS
+{
+ static const hb_tag_t Tag = HB_OT_TAG_GPOS;
+
+ inline const PosLookup& get_lookup (unsigned int i) const
+ { return CastR<PosLookup> (GSUBGPOS::get_lookup (i)); }
+
+ template <typename set_t>
+ inline void add_coverage (set_t *glyphs, unsigned int lookup_index) const
+ { get_lookup (lookup_index).add_coverage (glyphs); }
+
+ inline bool position_lookup (hb_apply_context_t *c, unsigned int lookup_index) const
+ { return get_lookup (lookup_index).apply_string (c); }
+
+ 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);
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (unlikely (!GSUBGPOS::sanitize (c))) return TRACE_RETURN (false);
+ OffsetTo<PosLookupList> &list = CastR<OffsetTo<PosLookupList> > (lookupList);
+ return TRACE_RETURN (list.sanitize (c, this));
+ }
+ public:
+ DEFINE_SIZE_STATIC (10);
+};
+
+
+static void
+fix_cursive_minor_offset (hb_glyph_position_t *pos, unsigned int i, hb_direction_t direction)
+{
+ unsigned int j = pos[i].cursive_chain();
+ if (likely (!j))
+ return;
+
+ j += i;
+
+ pos[i].cursive_chain() = 0;
+
+ fix_cursive_minor_offset (pos, j, direction);
+
+ if (HB_DIRECTION_IS_HORIZONTAL (direction))
+ pos[i].y_offset += pos[j].y_offset;
+ else
+ pos[i].x_offset += pos[j].x_offset;
+}
+
+static void
+fix_mark_attachment (hb_glyph_position_t *pos, unsigned int i, hb_direction_t direction, hb_bool_t zero_width_attached_marks)
+{
+ 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;
+
+ if (HB_DIRECTION_IS_FORWARD (direction))
+ for (unsigned int k = j; k < i; k++) {
+ pos[i].x_offset -= pos[k].x_advance;
+ pos[i].y_offset -= pos[k].y_advance;
+ }
+ else
+ for (unsigned int k = j + 1; k < i + 1; k++) {
+ pos[i].x_offset += pos[k].x_advance;
+ pos[i].y_offset += pos[k].y_advance;
+ }
+}
+
+void
+GPOS::position_start (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer)
+{
+ buffer->clear_positions ();
+
+ unsigned int count = buffer->len;
+ for (unsigned int i = 0; i < count; i++)
+ buffer->pos[i].attach_lookback() = buffer->pos[i].cursive_chain() = 0;
+}
+
+void
+GPOS::position_finish (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer, hb_bool_t zero_width_attached_marks)
+{
+ unsigned int len;
+ hb_glyph_position_t *pos = hb_buffer_get_glyph_positions (buffer, &len);
+ hb_direction_t direction = buffer->props.direction;
+
+ /* Handle cursive connections */
+ for (unsigned int i = 0; i < len; i++)
+ fix_cursive_minor_offset (pos, i, direction);
+
+ /* Handle attachments */
+ for (unsigned int i = 0; i < len; i++)
+ fix_mark_attachment (pos, i, direction, zero_width_attached_marks);
+
+ HB_BUFFER_DEALLOCATE_VAR (buffer, syllable);
+ HB_BUFFER_DEALLOCATE_VAR (buffer, lig_props);
+ HB_BUFFER_DEALLOCATE_VAR (buffer, glyph_props);
+}
+
+
+/* Out-of-class implementation for methods recursing */
+
+inline const Coverage & ExtensionPos::get_coverage (void) const
+{
+ return get_subtable ().get_coverage (get_type ());
+}
+
+inline bool ExtensionPos::apply (hb_apply_context_t *c) const
+{
+ TRACE_APPLY ();
+ return TRACE_RETURN (get_subtable ().apply (c, get_type ()));
+}
+
+inline bool ExtensionPos::sanitize (hb_sanitize_context_t *c)
+{
+ TRACE_SANITIZE ();
+ if (unlikely (!Extension::sanitize (c))) return TRACE_RETURN (false);
+ unsigned int offset = get_offset ();
+ if (unlikely (!offset)) return TRACE_RETURN (true);
+ return TRACE_RETURN (StructAtOffset<PosLookupSubTable> (this, offset).sanitize (c, get_type ()));
+}
+
+static inline bool position_lookup (hb_apply_context_t *c, unsigned int lookup_index)
+{
+ const GPOS &gpos = *(hb_ot_layout_from_face (c->face)->gpos);
+ const PosLookup &l = gpos.get_lookup (lookup_index);
+
+ if (unlikely (c->nesting_level_left == 0))
+ return false;
+
+ hb_apply_context_t new_c (*c);
+ new_c.nesting_level_left--;
+ new_c.set_lookup (l);
+ return l.apply_once (&new_c);
+}
+
+
+#undef attach_lookback
+#undef cursive_chain
+
+
+
+#endif /* HB_OT_LAYOUT_GPOS_TABLE_HH */
diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh
new file mode 100644
index 0000000..1114418
--- /dev/null
+++ b/src/hb-ot-layout-gsub-table.hh
@@ -0,0 +1,1414 @@
+/*
+ * Copyright © 2007,2008,2009,2010 Red Hat, Inc.
+ * Copyright © 2010,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.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OT_LAYOUT_GSUB_TABLE_HH
+#define HB_OT_LAYOUT_GSUB_TABLE_HH
+
+#include "hb-ot-layout-gsubgpos-private.hh"
+
+
+
+struct SingleSubstFormat1
+{
+ friend struct SingleSubst;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c) const
+ {
+ TRACE_CLOSURE ();
+ Coverage::Iter iter;
+ for (iter.init (this+coverage); iter.more (); iter.next ()) {
+ hb_codepoint_t glyph_id = iter.get_glyph ();
+ if (c->glyphs->has (glyph_id))
+ c->glyphs->add ((glyph_id + deltaGlyphID) & 0xFFFF);
+ }
+ }
+
+ inline const Coverage &get_coverage (void) const
+ {
+ return this+coverage;
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ hb_codepoint_t glyph_id = c->buffer->cur().codepoint;
+ unsigned int index = (this+coverage) (glyph_id);
+ if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
+
+ /* According to the Adobe Annotated OpenType Suite, result is always
+ * limited to 16bit. */
+ glyph_id = (glyph_id + deltaGlyphID) & 0xFFFF;
+ c->replace_glyph (glyph_id);
+
+ return TRACE_RETURN (true);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (coverage.sanitize (c, this) && deltaGlyphID.sanitize (c));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 1 */
+ OffsetTo<Coverage>
+ coverage; /* Offset to Coverage table--from
+ * beginning of Substitution table */
+ SHORT deltaGlyphID; /* Add to original GlyphID to get
+ * substitute GlyphID */
+ public:
+ DEFINE_SIZE_STATIC (6);
+};
+
+struct SingleSubstFormat2
+{
+ friend struct SingleSubst;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c) const
+ {
+ TRACE_CLOSURE ();
+ Coverage::Iter iter;
+ for (iter.init (this+coverage); iter.more (); iter.next ()) {
+ if (c->glyphs->has (iter.get_glyph ()))
+ c->glyphs->add (substitute[iter.get_coverage ()]);
+ }
+ }
+
+ inline const Coverage &get_coverage (void) const
+ {
+ return this+coverage;
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ hb_codepoint_t glyph_id = c->buffer->cur().codepoint;
+ unsigned int index = (this+coverage) (glyph_id);
+ if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
+
+ if (unlikely (index >= substitute.len)) return TRACE_RETURN (false);
+
+ glyph_id = substitute[index];
+ c->replace_glyph (glyph_id);
+
+ return TRACE_RETURN (true);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (coverage.sanitize (c, this) && substitute.sanitize (c));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 2 */
+ OffsetTo<Coverage>
+ coverage; /* Offset to Coverage table--from
+ * beginning of Substitution table */
+ ArrayOf<GlyphID>
+ substitute; /* Array of substitute
+ * GlyphIDs--ordered by Coverage Index */
+ public:
+ DEFINE_SIZE_ARRAY (6, substitute);
+};
+
+struct SingleSubst
+{
+ friend struct SubstLookupSubTable;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c) const
+ {
+ TRACE_CLOSURE ();
+ switch (u.format) {
+ case 1: u.format1.closure (c); break;
+ case 2: u.format2.closure (c); break;
+ default: break;
+ }
+ }
+
+ inline const Coverage &get_coverage (void) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.get_coverage ();
+ case 2: return u.format2.get_coverage ();
+ default:return Null(Coverage);
+ }
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.apply (c));
+ case 2: return TRACE_RETURN (u.format2.apply (c));
+ default:return TRACE_RETURN (false);
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!u.format.sanitize (c)) return TRACE_RETURN (false);
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.sanitize (c));
+ case 2: return TRACE_RETURN (u.format2.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ USHORT format; /* Format identifier */
+ SingleSubstFormat1 format1;
+ SingleSubstFormat2 format2;
+ } u;
+};
+
+
+struct Sequence
+{
+ friend struct MultipleSubstFormat1;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c) const
+ {
+ TRACE_CLOSURE ();
+ unsigned int count = substitute.len;
+ for (unsigned int i = 0; i < count; i++)
+ c->glyphs->add (substitute[i]);
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ if (unlikely (!substitute.len)) return TRACE_RETURN (false);
+
+ unsigned int klass = c->property & HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE ? HB_OT_LAYOUT_GLYPH_CLASS_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);
+ c->output_glyph (substitute.array[i], klass);
+ }
+ c->buffer->skip_glyph ();
+
+ return TRACE_RETURN (true);
+ }
+
+ public:
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (substitute.sanitize (c));
+ }
+
+ protected:
+ ArrayOf<GlyphID>
+ substitute; /* String of GlyphIDs to substitute */
+ public:
+ DEFINE_SIZE_ARRAY (2, substitute);
+};
+
+struct MultipleSubstFormat1
+{
+ friend struct MultipleSubst;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c) const
+ {
+ TRACE_CLOSURE ();
+ Coverage::Iter iter;
+ for (iter.init (this+coverage); iter.more (); iter.next ()) {
+ if (c->glyphs->has (iter.get_glyph ()))
+ (this+sequence[iter.get_coverage ()]).closure (c);
+ }
+ }
+
+ inline const Coverage &get_coverage (void) const
+ {
+ return this+coverage;
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+
+ unsigned int index = (this+coverage) (c->buffer->cur().codepoint);
+ if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
+
+ return TRACE_RETURN ((this+sequence[index]).apply (c));
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (coverage.sanitize (c, this) && sequence.sanitize (c, this));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 1 */
+ OffsetTo<Coverage>
+ coverage; /* Offset to Coverage table--from
+ * beginning of Substitution table */
+ OffsetArrayOf<Sequence>
+ sequence; /* Array of Sequence tables
+ * ordered by Coverage Index */
+ public:
+ DEFINE_SIZE_ARRAY (6, sequence);
+};
+
+struct MultipleSubst
+{
+ friend struct SubstLookupSubTable;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c) const
+ {
+ TRACE_CLOSURE ();
+ switch (u.format) {
+ case 1: u.format1.closure (c); break;
+ default: break;
+ }
+ }
+
+ inline const Coverage &get_coverage (void) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.get_coverage ();
+ default:return Null(Coverage);
+ }
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.apply (c));
+ default:return TRACE_RETURN (false);
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!u.format.sanitize (c)) return TRACE_RETURN (false);
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ USHORT format; /* Format identifier */
+ MultipleSubstFormat1 format1;
+ } u;
+};
+
+
+typedef ArrayOf<GlyphID> AlternateSet; /* Array of alternate GlyphIDs--in
+ * arbitrary order */
+
+struct AlternateSubstFormat1
+{
+ friend struct AlternateSubst;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c) const
+ {
+ TRACE_CLOSURE ();
+ Coverage::Iter iter;
+ for (iter.init (this+coverage); iter.more (); iter.next ()) {
+ if (c->glyphs->has (iter.get_glyph ())) {
+ const AlternateSet &alt_set = this+alternateSet[iter.get_coverage ()];
+ unsigned int count = alt_set.len;
+ for (unsigned int i = 0; i < count; i++)
+ c->glyphs->add (alt_set[i]);
+ }
+ }
+ }
+
+ inline const Coverage &get_coverage (void) const
+ {
+ return this+coverage;
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ hb_codepoint_t glyph_id = c->buffer->cur().codepoint;
+
+ unsigned int index = (this+coverage) (glyph_id);
+ if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
+
+ const AlternateSet &alt_set = this+alternateSet[index];
+
+ if (unlikely (!alt_set.len)) return TRACE_RETURN (false);
+
+ hb_mask_t glyph_mask = c->buffer->cur().mask;
+ hb_mask_t lookup_mask = c->lookup_mask;
+
+ /* Note: This breaks badly if two features enabled this lookup together. */
+ unsigned int shift = _hb_ctz (lookup_mask);
+ unsigned int alt_index = ((lookup_mask & glyph_mask) >> shift);
+
+ if (unlikely (alt_index > alt_set.len || alt_index == 0)) return TRACE_RETURN (false);
+
+ glyph_id = alt_set[alt_index - 1];
+
+ c->replace_glyph (glyph_id);
+
+ return TRACE_RETURN (true);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (coverage.sanitize (c, this) && alternateSet.sanitize (c, this));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 1 */
+ OffsetTo<Coverage>
+ coverage; /* Offset to Coverage table--from
+ * beginning of Substitution table */
+ OffsetArrayOf<AlternateSet>
+ alternateSet; /* Array of AlternateSet tables
+ * ordered by Coverage Index */
+ public:
+ DEFINE_SIZE_ARRAY (6, alternateSet);
+};
+
+struct AlternateSubst
+{
+ friend struct SubstLookupSubTable;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c) const
+ {
+ TRACE_CLOSURE ();
+ switch (u.format) {
+ case 1: u.format1.closure (c); break;
+ default: break;
+ }
+ }
+
+ inline const Coverage &get_coverage (void) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.get_coverage ();
+ default:return Null(Coverage);
+ }
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.apply (c));
+ default:return TRACE_RETURN (false);
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!u.format.sanitize (c)) return TRACE_RETURN (false);
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ USHORT format; /* Format identifier */
+ AlternateSubstFormat1 format1;
+ } u;
+};
+
+
+struct Ligature
+{
+ friend struct LigatureSet;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c) const
+ {
+ TRACE_CLOSURE ();
+ unsigned int count = component.len;
+ for (unsigned int i = 1; i < count; i++)
+ if (!c->glyphs->has (component[i]))
+ return;
+ c->glyphs->add (ligGlyph);
+ }
+
+ inline bool would_apply (hb_would_apply_context_t *c) const
+ {
+ if (c->len != component.len)
+ return false;
+
+ for (unsigned int i = 1; i < c->len; i++)
+ if (likely (c->glyphs[i] != component[i]))
+ return false;
+
+ return true;
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ unsigned int count = component.len;
+ if (unlikely (count < 1)) return TRACE_RETURN (false);
+
+ hb_apply_context_t::mark_skipping_forward_iterator_t skippy_iter (c, c->buffer->idx, count - 1);
+ if (skippy_iter.has_no_chance ()) return TRACE_RETURN (false);
+
+ /*
+ * This is perhaps the trickiest part of GSUB... Remarks:
+ *
+ * - If all components of the ligature were marks, we call this a mark ligature.
+ *
+ * - If there is no GDEF, and the ligature is NOT a mark ligature, we categorize
+ * it as a ligature glyph. Though, really, this will not really be used...
+ *
+ * - 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
+ * a base ligature in GPOS. Eg. if the sequence is: LAM,LAM,SHADDA,FATHA,HEH,
+ * and LAM,LAM,HEH for a ligature, they will leave SHADDA and FATHA wit a
+ * ligature id and component value of 2. Then if SHADDA,FATHA form a ligature
+ * later, we don't want them to lose their ligature id/component, otherwise
+ * GPOS will fail to correctly position the mark ligature on top of the
+ * LAM,LAM,HEH ligature. See:
+ * https://bugzilla.gnome.org/show_bug.cgi?id=676343
+ *
+ * - If a ligature is formed of components that some of which are also ligatures
+ * themselves, and those ligature components had marks attached to *their*
+ * components, we have to attach the marks to the new ligature component
+ * positions! Now *that*'s tricky! And these marks may be following the
+ * last component of the whole sequence, so we should loop forward looking
+ * for them and update them.
+ *
+ * Eg. the sequence is LAM,LAM,SHADDA,FATHA,HEH, and the font first forms a
+ * 'calt' ligature of LAM,HEH, leaving the SHADDA and FATHA with a ligature
+ * id and component == 1. Now, during 'liga', the LAM and the LAM-HEH ligature
+ * form a LAM-LAM-HEH ligature. We need to reassign the SHADDA and FATHA to
+ * the new ligature with a component value of 2.
+ *
+ * This in fact happened to a font... See:
+ * https://bugzilla.gnome.org/show_bug.cgi?id=437633
+ *
+ * - Ligatures cannot be formed across glyphs attached to different components
+ * of previous ligatures. Eg. the sequence is LAM,SHADDA,LAM,FATHA,HEH, and
+ * LAM,LAM,HEH form a ligature, leaving SHADDA,FATHA next to eachother.
+ * However, it would be wrong to ligate that SHADDA,FATHA sequence.o
+ * There is an exception to this: If a ligature tries ligating with marks that
+ * belong to it itself, go ahead, assuming that the font designer knows what
+ * they are doing (otherwise it can break Indic stuff when a matra wants to
+ * ligate with a conjunct...)
+ */
+
+ bool is_mark_ligature = !!(c->property & HB_OT_LAYOUT_GLYPH_CLASS_MARK);
+
+ unsigned int total_component_count = 0;
+ total_component_count += get_lig_num_comps (c->buffer->cur());
+
+ unsigned int first_lig_id = get_lig_id (c->buffer->cur());
+ unsigned int first_lig_comp = get_lig_comp (c->buffer->cur());
+
+ for (unsigned int i = 1; i < count; i++)
+ {
+ unsigned int property;
+
+ if (!skippy_iter.next (&property)) return TRACE_RETURN (false);
+
+ if (likely (c->buffer->info[skippy_iter.idx].codepoint != component[i])) 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]);
+
+ if (first_lig_id && first_lig_comp) {
+ /* If first component was attached to a previous ligature component,
+ * all subsequent components should be attached to the same ligature
+ * component, otherwise we shouldn't ligate them. */
+ if (first_lig_id != this_lig_id || first_lig_comp != this_lig_comp)
+ return TRACE_RETURN (false);
+ } else {
+ /* If first component was NOT attached to a previous ligature component,
+ * all subsequent components should also NOT be attached to any ligature
+ * component, unless they are attached to the first component itself! */
+ if (this_lig_id && this_lig_comp && (this_lig_id != first_lig_id))
+ return TRACE_RETURN (false);
+ }
+
+ is_mark_ligature = is_mark_ligature && (property & HB_OT_LAYOUT_GLYPH_CLASS_MARK);
+ total_component_count += get_lig_num_comps (c->buffer->info[skippy_iter.idx]);
+ }
+
+ /* Deal, we are forming the ligature. */
+ c->buffer->merge_clusters (c->buffer->idx, skippy_iter.idx + 1);
+
+ unsigned int klass = is_mark_ligature ? 0 : HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE;
+ unsigned int lig_id = is_mark_ligature ? 0 : allocate_lig_id (c->buffer);
+ unsigned int last_lig_id = get_lig_id (c->buffer->cur());
+ unsigned int last_num_components = get_lig_num_comps (c->buffer->cur());
+ unsigned int components_so_far = last_num_components;
+
+ if (!is_mark_ligature)
+ set_lig_props_for_ligature (c->buffer->cur(), lig_id, total_component_count);
+ c->replace_glyph (ligGlyph, klass);
+
+ for (unsigned int i = 1; i < count; i++)
+ {
+ while (c->should_mark_skip_current_glyph ())
+ {
+ if (!is_mark_ligature) {
+ unsigned int new_lig_comp = components_so_far - last_num_components +
+ MIN (MAX (get_lig_comp (c->buffer->cur()), 1u), last_num_components);
+ set_lig_props_for_mark (c->buffer->cur(), lig_id, new_lig_comp);
+ }
+ c->buffer->next_glyph ();
+ }
+
+ last_lig_id = get_lig_id (c->buffer->cur());
+ last_num_components = get_lig_num_comps (c->buffer->cur());
+ components_so_far += last_num_components;
+
+ /* Skip the base glyph */
+ c->buffer->idx++;
+ }
+
+ if (!is_mark_ligature && last_lig_id) {
+ /* Re-adjust components for any marks following. */
+ for (unsigned int i = c->buffer->idx; i < c->buffer->len; i++) {
+ if (last_lig_id == get_lig_id (c->buffer->info[i])) {
+ unsigned int new_lig_comp = components_so_far - last_num_components +
+ MIN (MAX (get_lig_comp (c->buffer->info[i]), 1u), last_num_components);
+ set_lig_props_for_mark (c->buffer->info[i], lig_id, new_lig_comp);
+ } else
+ break;
+ }
+ }
+
+ return TRACE_RETURN (true);
+ }
+
+ public:
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (ligGlyph.sanitize (c) && component.sanitize (c));
+ }
+
+ protected:
+ GlyphID ligGlyph; /* GlyphID of ligature to substitute */
+ HeadlessArrayOf<GlyphID>
+ component; /* Array of component GlyphIDs--start
+ * with the second component--ordered
+ * in writing direction */
+ public:
+ DEFINE_SIZE_ARRAY (4, component);
+};
+
+struct LigatureSet
+{
+ friend struct LigatureSubstFormat1;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c) const
+ {
+ TRACE_CLOSURE ();
+ unsigned int num_ligs = ligature.len;
+ for (unsigned int i = 0; i < num_ligs; i++)
+ (this+ligature[i]).closure (c);
+ }
+
+ inline bool would_apply (hb_would_apply_context_t *c) const
+ {
+ unsigned int num_ligs = ligature.len;
+ for (unsigned int i = 0; i < num_ligs; i++)
+ {
+ const Ligature &lig = this+ligature[i];
+ if (lig.would_apply (c))
+ return true;
+ }
+ return false;
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ unsigned int num_ligs = ligature.len;
+ for (unsigned int i = 0; i < num_ligs; i++)
+ {
+ const Ligature &lig = this+ligature[i];
+ if (lig.apply (c)) return TRACE_RETURN (true);
+ }
+
+ return TRACE_RETURN (false);
+ }
+
+ public:
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (ligature.sanitize (c, this));
+ }
+
+ protected:
+ OffsetArrayOf<Ligature>
+ ligature; /* Array LigatureSet tables
+ * ordered by preference */
+ public:
+ DEFINE_SIZE_ARRAY (2, ligature);
+};
+
+struct LigatureSubstFormat1
+{
+ friend struct LigatureSubst;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c) const
+ {
+ TRACE_CLOSURE ();
+ Coverage::Iter iter;
+ for (iter.init (this+coverage); iter.more (); iter.next ()) {
+ if (c->glyphs->has (iter.get_glyph ()))
+ (this+ligatureSet[iter.get_coverage ()]).closure (c);
+ }
+ }
+
+ inline const Coverage &get_coverage (void) const
+ {
+ return this+coverage;
+ }
+
+ inline bool would_apply (hb_would_apply_context_t *c) const
+ {
+ return (this+ligatureSet[(this+coverage) (c->glyphs[0])]).would_apply (c);
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ hb_codepoint_t glyph_id = c->buffer->cur().codepoint;
+
+ unsigned int index = (this+coverage) (glyph_id);
+ if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
+
+ const LigatureSet &lig_set = this+ligatureSet[index];
+ return TRACE_RETURN (lig_set.apply (c));
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (coverage.sanitize (c, this) && ligatureSet.sanitize (c, this));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 1 */
+ OffsetTo<Coverage>
+ coverage; /* Offset to Coverage table--from
+ * beginning of Substitution table */
+ OffsetArrayOf<LigatureSet>
+ ligatureSet; /* Array LigatureSet tables
+ * ordered by Coverage Index */
+ public:
+ DEFINE_SIZE_ARRAY (6, ligatureSet);
+};
+
+struct LigatureSubst
+{
+ friend struct SubstLookupSubTable;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c) const
+ {
+ TRACE_CLOSURE ();
+ switch (u.format) {
+ case 1: u.format1.closure (c); break;
+ default: break;
+ }
+ }
+
+ inline const Coverage &get_coverage (void) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.get_coverage ();
+ default:return Null(Coverage);
+ }
+ }
+
+ inline bool would_apply (hb_would_apply_context_t *c) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.would_apply (c);
+ default:return false;
+ }
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.apply (c));
+ default:return TRACE_RETURN (false);
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!u.format.sanitize (c)) return TRACE_RETURN (false);
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ USHORT format; /* Format identifier */
+ LigatureSubstFormat1 format1;
+ } u;
+};
+
+
+static inline bool substitute_lookup (hb_apply_context_t *c, unsigned int lookup_index);
+static inline void closure_lookup (hb_closure_context_t *c, unsigned int lookup_index);
+
+struct ContextSubst : Context
+{
+ friend struct SubstLookupSubTable;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c) const
+ {
+ TRACE_CLOSURE ();
+ return Context::closure (c, closure_lookup);
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ return TRACE_RETURN (Context::apply (c, substitute_lookup));
+ }
+};
+
+struct ChainContextSubst : ChainContext
+{
+ friend struct SubstLookupSubTable;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c) const
+ {
+ TRACE_CLOSURE ();
+ return ChainContext::closure (c, closure_lookup);
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ return TRACE_RETURN (ChainContext::apply (c, substitute_lookup));
+ }
+};
+
+
+struct ExtensionSubst : Extension
+{
+ friend struct SubstLookupSubTable;
+ friend struct SubstLookup;
+
+ private:
+ inline const struct SubstLookupSubTable& get_subtable (void) const
+ {
+ unsigned int offset = get_offset ();
+ if (unlikely (!offset)) return Null(SubstLookupSubTable);
+ return StructAtOffset<SubstLookupSubTable> (this, offset);
+ }
+
+ inline void closure (hb_closure_context_t *c) const;
+
+ inline const Coverage &get_coverage (void) const;
+
+ inline bool would_apply (hb_would_apply_context_t *c) const;
+
+ inline bool apply (hb_apply_context_t *c) const;
+
+ inline bool sanitize (hb_sanitize_context_t *c);
+
+ inline bool is_reverse (void) const;
+};
+
+
+struct ReverseChainSingleSubstFormat1
+{
+ friend struct ReverseChainSingleSubst;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c) const
+ {
+ TRACE_CLOSURE ();
+ const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
+
+ unsigned int count;
+
+ count = backtrack.len;
+ for (unsigned int i = 0; i < count; i++)
+ if (!(this+backtrack[i]).intersects (c->glyphs))
+ return;
+
+ count = lookahead.len;
+ for (unsigned int i = 0; i < count; i++)
+ if (!(this+lookahead[i]).intersects (c->glyphs))
+ return;
+
+ const ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID> > (lookahead);
+ Coverage::Iter iter;
+ for (iter.init (this+coverage); iter.more (); iter.next ()) {
+ if (c->glyphs->has (iter.get_glyph ()))
+ c->glyphs->add (substitute[iter.get_coverage ()]);
+ }
+ }
+
+ inline const Coverage &get_coverage (void) const
+ {
+ return this+coverage;
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ if (unlikely (c->nesting_level_left != MAX_NESTING_LEVEL))
+ return TRACE_RETURN (false); /* No chaining to this type */
+
+ unsigned int index = (this+coverage) (c->buffer->cur().codepoint);
+ if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
+
+ const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
+ const ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID> > (lookahead);
+
+ if (match_backtrack (c,
+ backtrack.len, (USHORT *) backtrack.array,
+ match_coverage, this) &&
+ match_lookahead (c,
+ lookahead.len, (USHORT *) lookahead.array,
+ match_coverage, this,
+ 1))
+ {
+ c->replace_glyph_inplace (substitute[index]);
+ c->buffer->idx--; /* Reverse! */
+ return TRACE_RETURN (true);
+ }
+
+ return TRACE_RETURN (false);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!(coverage.sanitize (c, this) && backtrack.sanitize (c, this)))
+ return TRACE_RETURN (false);
+ OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
+ if (!lookahead.sanitize (c, this))
+ return TRACE_RETURN (false);
+ ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID> > (lookahead);
+ return TRACE_RETURN (substitute.sanitize (c));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 1 */
+ OffsetTo<Coverage>
+ coverage; /* Offset to Coverage table--from
+ * beginning of table */
+ OffsetArrayOf<Coverage>
+ backtrack; /* Array of coverage tables
+ * in backtracking sequence, in glyph
+ * sequence order */
+ OffsetArrayOf<Coverage>
+ lookaheadX; /* Array of coverage tables
+ * in lookahead sequence, in glyph
+ * sequence order */
+ ArrayOf<GlyphID>
+ substituteX; /* Array of substitute
+ * GlyphIDs--ordered by Coverage Index */
+ public:
+ DEFINE_SIZE_MIN (10);
+};
+
+struct ReverseChainSingleSubst
+{
+ friend struct SubstLookupSubTable;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c) const
+ {
+ TRACE_CLOSURE ();
+ switch (u.format) {
+ case 1: u.format1.closure (c); break;
+ default: break;
+ }
+ }
+
+ inline const Coverage &get_coverage (void) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.get_coverage ();
+ default:return Null(Coverage);
+ }
+ }
+
+ inline bool apply (hb_apply_context_t *c) const
+ {
+ TRACE_APPLY ();
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.apply (c));
+ default:return TRACE_RETURN (false);
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!u.format.sanitize (c)) return TRACE_RETURN (false);
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ USHORT format; /* Format identifier */
+ ReverseChainSingleSubstFormat1 format1;
+ } u;
+};
+
+
+
+/*
+ * SubstLookup
+ */
+
+struct SubstLookupSubTable
+{
+ friend struct SubstLookup;
+
+ enum Type {
+ Single = 1,
+ Multiple = 2,
+ Alternate = 3,
+ Ligature = 4,
+ Context = 5,
+ ChainContext = 6,
+ Extension = 7,
+ ReverseChainSingle = 8
+ };
+
+ inline void closure (hb_closure_context_t *c,
+ unsigned int lookup_type) const
+ {
+ TRACE_CLOSURE ();
+ switch (lookup_type) {
+ case Single: u.single.closure (c); break;
+ case Multiple: u.multiple.closure (c); break;
+ case Alternate: u.alternate.closure (c); break;
+ case Ligature: u.ligature.closure (c); break;
+ case Context: u.context.closure (c); break;
+ case ChainContext: u.chainContext.closure (c); break;
+ case Extension: u.extension.closure (c); break;
+ case ReverseChainSingle: u.reverseChainContextSingle.closure (c); break;
+ default: break;
+ }
+ }
+
+ inline const Coverage &get_coverage (unsigned int lookup_type) const
+ {
+ switch (lookup_type) {
+ case Single: return u.single.get_coverage ();
+ case Multiple: return u.multiple.get_coverage ();
+ case Alternate: return u.alternate.get_coverage ();
+ case Ligature: return u.ligature.get_coverage ();
+ case Context: return u.context.get_coverage ();
+ case ChainContext: return u.chainContext.get_coverage ();
+ case Extension: return u.extension.get_coverage ();
+ case ReverseChainSingle: return u.reverseChainContextSingle.get_coverage ();
+ default: return Null(Coverage);
+ }
+ }
+
+ inline bool would_apply (hb_would_apply_context_t *c,
+ unsigned int lookup_type) const
+ {
+ TRACE_WOULD_APPLY ();
+ if (get_coverage (lookup_type).get_coverage (c->glyphs[0]) == NOT_COVERED) return false;
+ if (c->len == 1) {
+ switch (lookup_type) {
+ case Single:
+ case Multiple:
+ case Alternate:
+ case ReverseChainSingle:
+ return true;
+ }
+ }
+
+ /* Only need to look further for lookups that support substitutions
+ * of input longer than 1. */
+ switch (lookup_type) {
+ case Ligature: return u.ligature.would_apply (c);
+ case Context: return u.context.would_apply (c);
+ case ChainContext: return u.chainContext.would_apply (c);
+ case Extension: return u.extension.would_apply (c);
+ default: return false;
+ }
+ }
+
+ inline bool apply (hb_apply_context_t *c, unsigned int lookup_type) const
+ {
+ TRACE_APPLY ();
+ switch (lookup_type) {
+ case Single: return TRACE_RETURN (u.single.apply (c));
+ case Multiple: return TRACE_RETURN (u.multiple.apply (c));
+ case Alternate: return TRACE_RETURN (u.alternate.apply (c));
+ case Ligature: return TRACE_RETURN (u.ligature.apply (c));
+ case Context: return TRACE_RETURN (u.context.apply (c));
+ case ChainContext: return TRACE_RETURN (u.chainContext.apply (c));
+ case Extension: return TRACE_RETURN (u.extension.apply (c));
+ case ReverseChainSingle: return TRACE_RETURN (u.reverseChainContextSingle.apply (c));
+ default: return TRACE_RETURN (false);
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c, unsigned int lookup_type) {
+ TRACE_SANITIZE ();
+ if (!u.header.sub_format.sanitize (c))
+ return TRACE_RETURN (false);
+ switch (lookup_type) {
+ case Single: return TRACE_RETURN (u.single.sanitize (c));
+ case Multiple: return TRACE_RETURN (u.multiple.sanitize (c));
+ case Alternate: return TRACE_RETURN (u.alternate.sanitize (c));
+ case Ligature: return TRACE_RETURN (u.ligature.sanitize (c));
+ case Context: return TRACE_RETURN (u.context.sanitize (c));
+ case ChainContext: return TRACE_RETURN (u.chainContext.sanitize (c));
+ case Extension: return TRACE_RETURN (u.extension.sanitize (c));
+ case ReverseChainSingle: return TRACE_RETURN (u.reverseChainContextSingle.sanitize (c));
+ default: return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ struct {
+ USHORT sub_format;
+ } header;
+ SingleSubst single;
+ MultipleSubst multiple;
+ AlternateSubst alternate;
+ LigatureSubst ligature;
+ ContextSubst context;
+ ChainContextSubst chainContext;
+ ExtensionSubst extension;
+ ReverseChainSingleSubst reverseChainContextSingle;
+ } u;
+ public:
+ DEFINE_SIZE_UNION (2, header.sub_format);
+};
+
+
+struct SubstLookup : Lookup
+{
+ inline const SubstLookupSubTable& get_subtable (unsigned int i) const
+ { return this+CastR<OffsetArrayOf<SubstLookupSubTable> > (subTable)[i]; }
+
+ inline static bool lookup_type_is_reverse (unsigned int lookup_type)
+ { return lookup_type == SubstLookupSubTable::ReverseChainSingle; }
+
+ inline bool is_reverse (void) const
+ {
+ unsigned int type = get_type ();
+ if (unlikely (type == SubstLookupSubTable::Extension))
+ return CastR<ExtensionSubst> (get_subtable(0)).is_reverse ();
+ return lookup_type_is_reverse (type);
+ }
+
+ inline void closure (hb_closure_context_t *c) const
+ {
+ unsigned int lookup_type = get_type ();
+ unsigned int count = get_subtable_count ();
+ for (unsigned int i = 0; i < count; i++)
+ get_subtable (i).closure (c, lookup_type);
+ }
+
+ template <typename set_t>
+ inline void add_coverage (set_t *glyphs) const
+ {
+ const Coverage *last = NULL;
+ unsigned int count = get_subtable_count ();
+ for (unsigned int i = 0; i < count; i++) {
+ const Coverage *c = &get_subtable (i).get_coverage (get_type ());
+ if (c != last) {
+ c->add_coverage (glyphs);
+ last = c;
+ }
+ }
+ }
+
+ inline bool would_apply (hb_would_apply_context_t *c) const
+ {
+ if (unlikely (!c->len)) return false;
+ if (!c->digest.may_have (c->glyphs[0])) return false;
+ unsigned int lookup_type = get_type ();
+ unsigned int count = get_subtable_count ();
+ for (unsigned int i = 0; i < count; i++)
+ if (get_subtable (i).would_apply (c, lookup_type))
+ return true;
+ return false;
+ }
+
+ inline bool apply_once (hb_apply_context_t *c) const
+ {
+ unsigned int lookup_type = get_type ();
+
+ if (!c->check_glyph_property (&c->buffer->cur(), c->lookup_props, &c->property))
+ return false;
+
+ unsigned int count = get_subtable_count ();
+ for (unsigned int i = 0; i < count; i++)
+ if (get_subtable (i).apply (c, lookup_type))
+ return true;
+
+ return false;
+ }
+
+ inline bool apply_string (hb_apply_context_t *c) const
+ {
+ bool ret = false;
+
+ if (unlikely (!c->buffer->len))
+ return false;
+
+ c->set_lookup (*this);
+
+ if (likely (!is_reverse ()))
+ {
+ /* in/out forward substitution */
+ c->buffer->clear_output ();
+ c->buffer->idx = 0;
+
+ while (c->buffer->idx < c->buffer->len)
+ {
+ if ((c->buffer->cur().mask & c->lookup_mask) &&
+ c->digest.may_have (c->buffer->cur().codepoint) &&
+ apply_once (c))
+ ret = true;
+ else
+ c->buffer->next_glyph ();
+ }
+ if (ret)
+ c->buffer->swap_buffers ();
+ }
+ else
+ {
+ /* in-place backward substitution */
+ c->buffer->idx = c->buffer->len - 1;
+ do
+ {
+ if ((c->buffer->cur().mask & c->lookup_mask) &&
+ c->digest.may_have (c->buffer->cur().codepoint) &&
+ apply_once (c))
+ ret = true;
+ else
+ c->buffer->idx--;
+
+ }
+ while ((int) c->buffer->idx >= 0);
+ }
+
+ return ret;
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (unlikely (!Lookup::sanitize (c))) return TRACE_RETURN (false);
+ OffsetArrayOf<SubstLookupSubTable> &list = CastR<OffsetArrayOf<SubstLookupSubTable> > (subTable);
+ if (unlikely (!list.sanitize (c, this, get_type ()))) return TRACE_RETURN (false);
+
+ if (unlikely (get_type () == SubstLookupSubTable::Extension))
+ {
+ /* 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. */
+ unsigned int type = get_subtable (0).u.extension.get_type ();
+ unsigned int count = get_subtable_count ();
+ for (unsigned int i = 1; i < count; i++)
+ if (get_subtable (i).u.extension.get_type () != type)
+ return TRACE_RETURN (false);
+ }
+ return TRACE_RETURN (true);
+ }
+};
+
+typedef OffsetListOf<SubstLookup> SubstLookupList;
+
+/*
+ * GSUB -- The Glyph Substitution Table
+ */
+
+struct GSUB : GSUBGPOS
+{
+ static const hb_tag_t Tag = HB_OT_TAG_GSUB;
+
+ inline const SubstLookup& get_lookup (unsigned int i) const
+ { return CastR<SubstLookup> (GSUBGPOS::get_lookup (i)); }
+
+ template <typename set_t>
+ inline void add_coverage (set_t *glyphs, unsigned int lookup_index) const
+ { get_lookup (lookup_index).add_coverage (glyphs); }
+
+ inline bool would_substitute_lookup (hb_would_apply_context_t *c, unsigned int lookup_index) const
+ { return get_lookup (lookup_index).would_apply (c); }
+
+ inline bool substitute_lookup (hb_apply_context_t *c, unsigned int lookup_index) const
+ { return get_lookup (lookup_index).apply_string (c); }
+
+ static inline void substitute_start (hb_font_t *font, hb_buffer_t *buffer);
+ static inline void substitute_finish (hb_font_t *font, hb_buffer_t *buffer);
+
+ inline void closure_lookup (hb_closure_context_t *c,
+ unsigned int lookup_index) const
+ { return get_lookup (lookup_index).closure (c); }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (unlikely (!GSUBGPOS::sanitize (c))) return TRACE_RETURN (false);
+ OffsetTo<SubstLookupList> &list = CastR<OffsetTo<SubstLookupList> > (lookupList);
+ return TRACE_RETURN (list.sanitize (c, this));
+ }
+ public:
+ DEFINE_SIZE_STATIC (10);
+};
+
+
+void
+GSUB::substitute_start (hb_font_t *font, hb_buffer_t *buffer)
+{
+ HB_BUFFER_ALLOCATE_VAR (buffer, glyph_props);
+ HB_BUFFER_ALLOCATE_VAR (buffer, lig_props);
+ HB_BUFFER_ALLOCATE_VAR (buffer, syllable);
+
+ const GDEF &gdef = *hb_ot_layout_from_face (font->face)->gdef;
+ unsigned int count = buffer->len;
+ for (unsigned int i = 0; i < count; i++) {
+ buffer->info[i].lig_props() = buffer->info[i].syllable() = 0;
+ buffer->info[i].glyph_props() = gdef.get_glyph_props (buffer->info[i].codepoint);
+ }
+}
+
+void
+GSUB::substitute_finish (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer HB_UNUSED)
+{
+}
+
+
+/* Out-of-class implementation for methods recursing */
+
+inline void ExtensionSubst::closure (hb_closure_context_t *c) const
+{
+ get_subtable ().closure (c, get_type ());
+}
+
+inline const Coverage & ExtensionSubst::get_coverage (void) const
+{
+ return get_subtable ().get_coverage (get_type ());
+}
+
+inline bool ExtensionSubst::would_apply (hb_would_apply_context_t *c) const
+{
+ return get_subtable ().would_apply (c, get_type ());
+}
+
+inline bool ExtensionSubst::apply (hb_apply_context_t *c) const
+{
+ TRACE_APPLY ();
+ return TRACE_RETURN (get_subtable ().apply (c, get_type ()));
+}
+
+inline bool ExtensionSubst::sanitize (hb_sanitize_context_t *c)
+{
+ TRACE_SANITIZE ();
+ if (unlikely (!Extension::sanitize (c))) return TRACE_RETURN (false);
+ unsigned int offset = get_offset ();
+ if (unlikely (!offset)) return TRACE_RETURN (true);
+ return TRACE_RETURN (StructAtOffset<SubstLookupSubTable> (this, offset).sanitize (c, get_type ()));
+}
+
+inline bool ExtensionSubst::is_reverse (void) const
+{
+ unsigned int type = get_type ();
+ if (unlikely (type == SubstLookupSubTable::Extension))
+ return CastR<ExtensionSubst> (get_subtable()).is_reverse ();
+ return SubstLookup::lookup_type_is_reverse (type);
+}
+
+static inline void closure_lookup (hb_closure_context_t *c, unsigned int lookup_index)
+{
+ const GSUB &gsub = *(hb_ot_layout_from_face (c->face)->gsub);
+ const SubstLookup &l = gsub.get_lookup (lookup_index);
+
+ if (unlikely (c->nesting_level_left == 0))
+ return;
+
+ c->nesting_level_left--;
+ l.closure (c);
+ c->nesting_level_left++;
+}
+
+static inline bool substitute_lookup (hb_apply_context_t *c, unsigned int lookup_index)
+{
+ const GSUB &gsub = *(hb_ot_layout_from_face (c->face)->gsub);
+ const SubstLookup &l = gsub.get_lookup (lookup_index);
+
+ if (unlikely (c->nesting_level_left == 0))
+ return false;
+
+ hb_apply_context_t new_c (*c);
+ new_c.nesting_level_left--;
+ new_c.set_lookup (l);
+ return l.apply_once (&new_c);
+}
+
+
+
+#endif /* HB_OT_LAYOUT_GSUB_TABLE_HH */
diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh
new file mode 100644
index 0000000..ba2a7e0
--- /dev/null
+++ b/src/hb-ot-layout-gsubgpos-private.hh
@@ -0,0 +1,1684 @@
+/*
+ * Copyright © 2007,2008,2009,2010 Red Hat, Inc.
+ * Copyright © 2010,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.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OT_LAYOUT_GSUBGPOS_PRIVATE_HH
+#define HB_OT_LAYOUT_GSUBGPOS_PRIVATE_HH
+
+#include "hb-buffer-private.hh"
+#include "hb-ot-layout-gdef-table.hh"
+#include "hb-set-private.hh"
+
+
+
+#ifndef HB_DEBUG_CLOSURE
+#define HB_DEBUG_CLOSURE (HB_DEBUG+0)
+#endif
+
+#define TRACE_CLOSURE() \
+ hb_auto_trace_t<HB_DEBUG_CLOSURE> trace (&c->debug_depth, "CLOSURE", this, HB_FUNC, "");
+
+
+struct hb_closure_context_t
+{
+ hb_face_t *face;
+ hb_set_t *glyphs;
+ unsigned int nesting_level_left;
+ unsigned int debug_depth;
+
+
+ hb_closure_context_t (hb_face_t *face_,
+ hb_set_t *glyphs_,
+ unsigned int nesting_level_left_ = MAX_NESTING_LEVEL) :
+ face (face_),
+ glyphs (glyphs_),
+ nesting_level_left (nesting_level_left_),
+ debug_depth (0) {}
+};
+
+
+
+/* TODO Add TRACE_RETURN annotation to gsub. */
+#ifndef HB_DEBUG_WOULD_APPLY
+#define HB_DEBUG_WOULD_APPLY (HB_DEBUG+0)
+#endif
+
+#define TRACE_WOULD_APPLY() \
+ hb_auto_trace_t<HB_DEBUG_WOULD_APPLY> trace (&c->debug_depth, "WOULD_APPLY", this, HB_FUNC, "%d glyphs", c->len);
+
+
+struct hb_would_apply_context_t
+{
+ hb_face_t *face;
+ const hb_codepoint_t *glyphs;
+ unsigned int len;
+ const hb_set_digest_t digest;
+ unsigned int debug_depth;
+
+ hb_would_apply_context_t (hb_face_t *face_,
+ const hb_codepoint_t *glyphs_,
+ unsigned int len_,
+ const hb_set_digest_t *digest_
+ ) :
+ face (face_),
+ glyphs (glyphs_),
+ len (len_),
+ digest (*digest_),
+ debug_depth (0) {};
+};
+
+
+#ifndef HB_DEBUG_APPLY
+#define HB_DEBUG_APPLY (HB_DEBUG+0)
+#endif
+
+#define TRACE_APPLY() \
+ hb_auto_trace_t<HB_DEBUG_APPLY> trace (&c->debug_depth, "APPLY", this, HB_FUNC, "idx %d codepoint %u", c->buffer->idx, c->buffer->cur().codepoint);
+
+
+struct hb_apply_context_t
+{
+ hb_font_t *font;
+ hb_face_t *face;
+ hb_buffer_t *buffer;
+ hb_direction_t direction;
+ hb_mask_t lookup_mask;
+ unsigned int nesting_level_left;
+ unsigned int lookup_props;
+ unsigned int property; /* propety of first glyph */
+ unsigned int debug_depth;
+ const GDEF &gdef;
+ bool has_glyph_classes;
+ const hb_set_digest_t digest;
+
+
+ hb_apply_context_t (hb_font_t *font_,
+ hb_buffer_t *buffer_,
+ hb_mask_t lookup_mask_,
+ const hb_set_digest_t *digest_) :
+ font (font_), face (font->face), buffer (buffer_),
+ direction (buffer_->props.direction),
+ lookup_mask (lookup_mask_),
+ nesting_level_left (MAX_NESTING_LEVEL),
+ lookup_props (0), property (0), debug_depth (0),
+ gdef (*hb_ot_layout_from_face (face)->gdef),
+ has_glyph_classes (gdef.has_glyph_classes ()),
+ digest (*digest_) {}
+
+ 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)
+ {
+ 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;
+ }
+ inline bool has_no_chance (void) const
+ {
+ return unlikely (num_items && idx + num_items >= end);
+ }
+ inline void reject (void)
+ {
+ num_items++;
+ }
+ inline bool next (unsigned int *property_out,
+ unsigned int lookup_props)
+ {
+ assert (num_items > 0);
+ do
+ {
+ 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);
+ }
+
+ unsigned int idx;
+ protected:
+ hb_apply_context_t *c;
+ unsigned int num_items;
+ hb_mask_t mask;
+ uint8_t syllable;
+ unsigned int end;
+ };
+
+ struct mark_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
+ {
+ return unlikely (idx < num_items);
+ }
+ inline void reject (void)
+ {
+ num_items++;
+ }
+ inline bool prev (unsigned int *property_out,
+ unsigned int lookup_props)
+ {
+ assert (num_items > 0);
+ do
+ {
+ 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);
+ }
+
+ unsigned int idx;
+ protected:
+ hb_apply_context_t *c;
+ unsigned int num_items;
+ hb_mask_t mask;
+ uint8_t syllable;
+ };
+
+ inline bool
+ match_properties_mark (hb_codepoint_t glyph,
+ unsigned int glyph_props,
+ unsigned int lookup_props) const
+ {
+ /* If using mark filtering sets, the high short of
+ * lookup_props has the set index.
+ */
+ if (lookup_props & LookupFlag::UseMarkFilteringSet)
+ return gdef.mark_set_covers (lookup_props >> 16, glyph);
+
+ /* The second byte of lookup_props has the meaning
+ * "ignore marks of attachment type different than
+ * the attachment type specified."
+ */
+ if (lookup_props & LookupFlag::MarkAttachmentType)
+ return (lookup_props & LookupFlag::MarkAttachmentType) == (glyph_props & LookupFlag::MarkAttachmentType);
+
+ return true;
+ }
+
+ inline bool
+ match_properties (hb_codepoint_t glyph,
+ unsigned int glyph_props,
+ unsigned int lookup_props) const
+ {
+ /* Not covered, if, for example, glyph class is ligature and
+ * lookup_props includes LookupFlags::IgnoreLigatures
+ */
+ if (glyph_props & lookup_props & LookupFlag::IgnoreFlags)
+ return false;
+
+ if (unlikely (glyph_props & HB_OT_LAYOUT_GLYPH_CLASS_MARK))
+ return match_properties_mark (glyph, glyph_props, lookup_props);
+
+ return true;
+ }
+
+ inline bool
+ check_glyph_property (hb_glyph_info_t *info,
+ unsigned int lookup_props,
+ unsigned int *property_out) 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_CLASS_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))
+ buffer->cur().glyph_props() = gdef.get_glyph_props (glyph_index);
+ else if (class_guess)
+ buffer->cur().glyph_props() = class_guess;
+ }
+
+ inline void output_glyph (hb_codepoint_t glyph_index,
+ unsigned int class_guess = 0) const
+ {
+ set_class (glyph_index, class_guess);
+ buffer->output_glyph (glyph_index);
+ }
+ inline void replace_glyph (hb_codepoint_t glyph_index,
+ unsigned int class_guess = 0) const
+ {
+ set_class (glyph_index, class_guess);
+ buffer->replace_glyph (glyph_index);
+ }
+ inline void replace_glyph_inplace (hb_codepoint_t glyph_index,
+ unsigned int class_guess = 0) const
+ {
+ set_class (glyph_index, class_guess);
+ buffer->cur().codepoint = glyph_index;
+ }
+};
+
+
+
+typedef bool (*intersects_func_t) (hb_set_t *glyphs, const USHORT &value, const void *data);
+typedef bool (*match_func_t) (hb_codepoint_t glyph_id, const USHORT &value, const void *data);
+typedef void (*closure_lookup_func_t) (hb_closure_context_t *c, unsigned int lookup_index);
+typedef bool (*apply_lookup_func_t) (hb_apply_context_t *c, unsigned int lookup_index);
+
+struct ContextClosureFuncs
+{
+ intersects_func_t intersects;
+ closure_lookup_func_t closure;
+};
+struct ContextApplyFuncs
+{
+ match_func_t match;
+ apply_lookup_func_t apply;
+};
+
+static inline bool intersects_glyph (hb_set_t *glyphs, const USHORT &value, const void *data HB_UNUSED)
+{
+ return glyphs->has (value);
+}
+static inline bool intersects_class (hb_set_t *glyphs, const USHORT &value, const void *data)
+{
+ const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data);
+ return class_def.intersects_class (glyphs, value);
+}
+static inline bool intersects_coverage (hb_set_t *glyphs, const USHORT &value, const void *data)
+{
+ const OffsetTo<Coverage> &coverage = (const OffsetTo<Coverage>&)value;
+ return (data+coverage).intersects (glyphs);
+}
+
+static inline bool intersects_array (hb_closure_context_t *c,
+ unsigned int count,
+ const USHORT values[],
+ intersects_func_t intersects_func,
+ const void *intersects_data)
+{
+ for (unsigned int i = 0; i < count; i++)
+ if (likely (!intersects_func (c->glyphs, values[i], intersects_data)))
+ return false;
+ return true;
+}
+
+
+static inline bool match_glyph (hb_codepoint_t glyph_id, const USHORT &value, const void *data HB_UNUSED)
+{
+ return glyph_id == value;
+}
+static inline bool match_class (hb_codepoint_t glyph_id, const USHORT &value, const void *data)
+{
+ const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data);
+ return class_def.get_class (glyph_id) == value;
+}
+static inline bool match_coverage (hb_codepoint_t glyph_id, const USHORT &value, const void *data)
+{
+ const OffsetTo<Coverage> &coverage = (const OffsetTo<Coverage>&)value;
+ return (data+coverage).get_coverage (glyph_id) != NOT_COVERED;
+}
+
+
+static inline bool would_match_input (hb_would_apply_context_t *c,
+ unsigned int count, /* Including the first glyph (not matched) */
+ const USHORT input[], /* Array of input values--start with second glyph */
+ match_func_t match_func,
+ const void *match_data)
+{
+ if (count != c->len)
+ return false;
+
+ for (unsigned int i = 1; i < count; i++)
+ if (likely (!match_func (c->glyphs[i], input[i - 1], match_data)))
+ return false;
+
+ return true;
+}
+static inline bool match_input (hb_apply_context_t *c,
+ unsigned int count, /* Including the first glyph (not matched) */
+ const USHORT input[], /* Array of input values--start with second glyph */
+ match_func_t match_func,
+ const void *match_data,
+ unsigned int *end_offset = NULL)
+{
+ hb_apply_context_t::mark_skipping_forward_iterator_t skippy_iter (c, c->buffer->idx, count - 1);
+ if (skippy_iter.has_no_chance ())
+ return false;
+
+ for (unsigned int i = 1; i < count; i++)
+ {
+ if (!skippy_iter.next ())
+ return false;
+
+ if (likely (!match_func (c->buffer->info[skippy_iter.idx].codepoint, input[i - 1], match_data)))
+ return false;
+ }
+
+ if (end_offset)
+ *end_offset = skippy_iter.idx - c->buffer->idx + 1;
+
+ return true;
+}
+
+static inline bool match_backtrack (hb_apply_context_t *c,
+ unsigned int count,
+ const USHORT backtrack[],
+ match_func_t match_func,
+ const void *match_data)
+{
+ 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 false;
+
+ for (unsigned int i = 0; i < count; i++)
+ {
+ if (!skippy_iter.prev ())
+ return false;
+
+ if (likely (!match_func (c->buffer->out_info[skippy_iter.idx].codepoint, backtrack[i], match_data)))
+ return false;
+ }
+
+ return true;
+}
+
+static inline bool match_lookahead (hb_apply_context_t *c,
+ unsigned int count,
+ const USHORT lookahead[],
+ match_func_t match_func,
+ const void *match_data,
+ unsigned int offset)
+{
+ 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 false;
+
+ for (unsigned int i = 0; i < count; i++)
+ {
+ if (!skippy_iter.next ())
+ return false;
+
+ if (likely (!match_func (c->buffer->info[skippy_iter.idx].codepoint, lookahead[i], match_data)))
+ return false;
+ }
+
+ return true;
+}
+
+
+
+struct LookupRecord
+{
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this));
+ }
+
+ USHORT sequenceIndex; /* Index into current glyph
+ * sequence--first glyph = 0 */
+ USHORT lookupListIndex; /* Lookup to apply to that
+ * position--zero--based */
+ public:
+ DEFINE_SIZE_STATIC (4);
+};
+
+
+static inline void closure_lookup (hb_closure_context_t *c,
+ unsigned int lookupCount,
+ const LookupRecord lookupRecord[], /* Array of LookupRecords--in design order */
+ closure_lookup_func_t closure_func)
+{
+ for (unsigned int i = 0; i < lookupCount; i++)
+ closure_func (c, lookupRecord->lookupListIndex);
+}
+
+static inline bool apply_lookup (hb_apply_context_t *c,
+ unsigned int count, /* Including the first glyph */
+ unsigned int lookupCount,
+ const LookupRecord lookupRecord[], /* Array of LookupRecords--in design order */
+ apply_lookup_func_t apply_func)
+{
+ unsigned int end = c->buffer->len;
+ if (unlikely (count == 0 || c->buffer->idx + count > end))
+ return false;
+
+ /* TODO We don't support lookupRecord arrays that are not increasing:
+ * Should be easy for in_place ones at least. */
+
+ /* Note: If sublookup is reverse, it will underflow after the first loop
+ * 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 */)
+ {
+ if (unlikely (c->buffer->idx == end))
+ return true;
+ while (c->should_mark_skip_current_glyph ())
+ {
+ /* No lookup applied for this index */
+ c->buffer->next_glyph ();
+ if (unlikely (c->buffer->idx == end))
+ return true;
+ }
+
+ if (lookupCount && i == lookupRecord->sequenceIndex)
+ {
+ unsigned int old_pos = c->buffer->idx;
+
+ /* Apply a lookup */
+ bool done = apply_func (c, lookupRecord->lookupListIndex);
+
+ lookupRecord++;
+ 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 true;
+
+ if (!done)
+ goto not_applied;
+ }
+ else
+ {
+ not_applied:
+ /* No lookup applied for this index */
+ c->buffer->next_glyph ();
+ i++;
+ }
+ }
+
+ return true;
+}
+
+
+
+/* Contextual lookups */
+
+struct ContextClosureLookupContext
+{
+ ContextClosureFuncs funcs;
+ const void *intersects_data;
+};
+
+struct ContextApplyLookupContext
+{
+ ContextApplyFuncs funcs;
+ const void *match_data;
+};
+
+static inline void context_closure_lookup (hb_closure_context_t *c,
+ unsigned int inputCount, /* Including the first glyph (not matched) */
+ const USHORT input[], /* Array of input values--start with second glyph */
+ unsigned int lookupCount,
+ const LookupRecord lookupRecord[],
+ ContextClosureLookupContext &lookup_context)
+{
+ if (intersects_array (c,
+ inputCount ? inputCount - 1 : 0, input,
+ lookup_context.funcs.intersects, lookup_context.intersects_data))
+ closure_lookup (c,
+ lookupCount, lookupRecord,
+ lookup_context.funcs.closure);
+}
+
+
+static inline bool context_would_apply_lookup (hb_would_apply_context_t *c,
+ unsigned int inputCount, /* Including the first glyph (not matched) */
+ const USHORT input[], /* Array of input values--start with second glyph */
+ unsigned int lookupCount,
+ const LookupRecord lookupRecord[],
+ ContextApplyLookupContext &lookup_context)
+{
+ return would_match_input (c,
+ inputCount, input,
+ lookup_context.funcs.match, lookup_context.match_data);
+}
+static inline bool context_apply_lookup (hb_apply_context_t *c,
+ unsigned int inputCount, /* Including the first glyph (not matched) */
+ const USHORT input[], /* Array of input values--start with second glyph */
+ unsigned int lookupCount,
+ const LookupRecord lookupRecord[],
+ ContextApplyLookupContext &lookup_context)
+{
+ return match_input (c,
+ inputCount, input,
+ lookup_context.funcs.match, lookup_context.match_data)
+ && apply_lookup (c,
+ inputCount,
+ lookupCount, lookupRecord,
+ lookup_context.funcs.apply);
+}
+
+struct Rule
+{
+ friend struct RuleSet;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c, ContextClosureLookupContext &lookup_context) const
+ {
+ TRACE_CLOSURE ();
+ const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (input, input[0].static_size * (inputCount ? inputCount - 1 : 0));
+ context_closure_lookup (c,
+ inputCount, input,
+ lookupCount, lookupRecord,
+ lookup_context);
+ }
+
+ inline bool would_apply (hb_would_apply_context_t *c, ContextApplyLookupContext &lookup_context) const
+ {
+ TRACE_WOULD_APPLY ();
+ const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (input, input[0].static_size * (inputCount ? inputCount - 1 : 0));
+ return TRACE_RETURN (context_would_apply_lookup (c, inputCount, input, lookupCount, lookupRecord, lookup_context));
+ }
+
+ inline bool apply (hb_apply_context_t *c, ContextApplyLookupContext &lookup_context) const
+ {
+ TRACE_APPLY ();
+ const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (input, input[0].static_size * (inputCount ? inputCount - 1 : 0));
+ return TRACE_RETURN (context_apply_lookup (c, inputCount, input, lookupCount, lookupRecord, lookup_context));
+ }
+
+ public:
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return inputCount.sanitize (c)
+ && lookupCount.sanitize (c)
+ && c->check_range (input,
+ input[0].static_size * inputCount
+ + lookupRecordX[0].static_size * lookupCount);
+ }
+
+ protected:
+ USHORT inputCount; /* Total number of glyphs in input
+ * glyph sequence--includes the first
+ * glyph */
+ USHORT lookupCount; /* Number of LookupRecords */
+ USHORT input[VAR]; /* Array of match inputs--start with
+ * second glyph */
+ LookupRecord lookupRecordX[VAR]; /* Array of LookupRecords--in
+ * design order */
+ public:
+ DEFINE_SIZE_ARRAY2 (4, input, lookupRecordX);
+};
+
+struct RuleSet
+{
+ inline void closure (hb_closure_context_t *c, ContextClosureLookupContext &lookup_context) const
+ {
+ TRACE_CLOSURE ();
+ unsigned int num_rules = rule.len;
+ for (unsigned int i = 0; i < num_rules; i++)
+ (this+rule[i]).closure (c, lookup_context);
+ }
+
+ inline bool would_apply (hb_would_apply_context_t *c, ContextApplyLookupContext &lookup_context) const
+ {
+ TRACE_WOULD_APPLY ();
+ unsigned int num_rules = rule.len;
+ for (unsigned int i = 0; i < num_rules; i++)
+ {
+ if ((this+rule[i]).would_apply (c, lookup_context))
+ return TRACE_RETURN (true);
+ }
+ return TRACE_RETURN (false);
+ }
+
+ inline bool apply (hb_apply_context_t *c, ContextApplyLookupContext &lookup_context) const
+ {
+ TRACE_APPLY ();
+ unsigned int num_rules = rule.len;
+ for (unsigned int i = 0; i < num_rules; i++)
+ {
+ if ((this+rule[i]).apply (c, lookup_context))
+ return TRACE_RETURN (true);
+ }
+ return TRACE_RETURN (false);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (rule.sanitize (c, this));
+ }
+
+ protected:
+ OffsetArrayOf<Rule>
+ rule; /* Array of Rule tables
+ * ordered by preference */
+ public:
+ DEFINE_SIZE_ARRAY (2, rule);
+};
+
+
+struct ContextFormat1
+{
+ friend struct Context;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c, closure_lookup_func_t closure_func) const
+ {
+ TRACE_CLOSURE ();
+
+ const Coverage &cov = (this+coverage);
+
+ struct ContextClosureLookupContext lookup_context = {
+ {intersects_glyph, closure_func},
+ NULL
+ };
+
+ unsigned int count = ruleSet.len;
+ for (unsigned int i = 0; i < count; i++)
+ if (cov.intersects_coverage (c->glyphs, i)) {
+ const RuleSet &rule_set = this+ruleSet[i];
+ rule_set.closure (c, lookup_context);
+ }
+ }
+
+ inline bool would_apply (hb_would_apply_context_t *c) const
+ {
+ TRACE_WOULD_APPLY ();
+
+ const RuleSet &rule_set = this+ruleSet[(this+coverage) (c->glyphs[0])];
+ struct ContextApplyLookupContext lookup_context = {
+ {match_glyph, NULL},
+ NULL
+ };
+ return TRACE_RETURN (rule_set.would_apply (c, lookup_context));
+ }
+
+ inline bool apply (hb_apply_context_t *c, apply_lookup_func_t apply_func) const
+ {
+ TRACE_APPLY ();
+ unsigned int index = (this+coverage) (c->buffer->cur().codepoint);
+ if (likely (index == NOT_COVERED))
+ return TRACE_RETURN (false);
+
+ const RuleSet &rule_set = this+ruleSet[index];
+ struct ContextApplyLookupContext lookup_context = {
+ {match_glyph, apply_func},
+ NULL
+ };
+ return TRACE_RETURN (rule_set.apply (c, lookup_context));
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (coverage.sanitize (c, this) && ruleSet.sanitize (c, this));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 1 */
+ OffsetTo<Coverage>
+ coverage; /* Offset to Coverage table--from
+ * beginning of table */
+ OffsetArrayOf<RuleSet>
+ ruleSet; /* Array of RuleSet tables
+ * ordered by Coverage Index */
+ public:
+ DEFINE_SIZE_ARRAY (6, ruleSet);
+};
+
+
+struct ContextFormat2
+{
+ friend struct Context;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c, closure_lookup_func_t closure_func) const
+ {
+ TRACE_CLOSURE ();
+ if (!(this+coverage).intersects (c->glyphs))
+ return;
+
+ const ClassDef &class_def = this+classDef;
+
+ struct ContextClosureLookupContext lookup_context = {
+ {intersects_class, closure_func},
+ NULL
+ };
+
+ unsigned int count = ruleSet.len;
+ for (unsigned int i = 0; i < count; i++)
+ if (class_def.intersects_class (c->glyphs, i)) {
+ const RuleSet &rule_set = this+ruleSet[i];
+ rule_set.closure (c, lookup_context);
+ }
+ }
+
+ inline bool would_apply (hb_would_apply_context_t *c) const
+ {
+ TRACE_WOULD_APPLY ();
+
+ const ClassDef &class_def = this+classDef;
+ unsigned int index = class_def (c->glyphs[0]);
+ const RuleSet &rule_set = this+ruleSet[index];
+ struct ContextApplyLookupContext lookup_context = {
+ {match_class, NULL},
+ &class_def
+ };
+ return TRACE_RETURN (rule_set.would_apply (c, lookup_context));
+ }
+
+ inline bool apply (hb_apply_context_t *c, apply_lookup_func_t apply_func) const
+ {
+ TRACE_APPLY ();
+ unsigned int index = (this+coverage) (c->buffer->cur().codepoint);
+ if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
+
+ const ClassDef &class_def = this+classDef;
+ index = class_def (c->buffer->cur().codepoint);
+ const RuleSet &rule_set = this+ruleSet[index];
+ struct ContextApplyLookupContext lookup_context = {
+ {match_class, apply_func},
+ &class_def
+ };
+ return TRACE_RETURN (rule_set.apply (c, lookup_context));
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (coverage.sanitize (c, this) && classDef.sanitize (c, this) && ruleSet.sanitize (c, this));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 2 */
+ OffsetTo<Coverage>
+ coverage; /* Offset to Coverage table--from
+ * beginning of table */
+ OffsetTo<ClassDef>
+ classDef; /* Offset to glyph ClassDef table--from
+ * beginning of table */
+ OffsetArrayOf<RuleSet>
+ ruleSet; /* Array of RuleSet tables
+ * ordered by class */
+ public:
+ DEFINE_SIZE_ARRAY (8, ruleSet);
+};
+
+
+struct ContextFormat3
+{
+ friend struct Context;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c, closure_lookup_func_t closure_func) const
+ {
+ TRACE_CLOSURE ();
+ if (!(this+coverage[0]).intersects (c->glyphs))
+ return;
+
+ const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (coverage, coverage[0].static_size * glyphCount);
+ struct ContextClosureLookupContext lookup_context = {
+ {intersects_coverage, closure_func},
+ this
+ };
+ context_closure_lookup (c,
+ glyphCount, (const USHORT *) (coverage + 1),
+ lookupCount, lookupRecord,
+ lookup_context);
+ }
+
+ inline bool would_apply (hb_would_apply_context_t *c) const
+ {
+ TRACE_WOULD_APPLY ();
+
+ const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (coverage, coverage[0].static_size * glyphCount);
+ struct ContextApplyLookupContext lookup_context = {
+ {match_coverage, NULL},
+ this
+ };
+ return TRACE_RETURN (context_would_apply_lookup (c, glyphCount, (const USHORT *) (coverage + 1), lookupCount, lookupRecord, lookup_context));
+ }
+
+ inline bool apply (hb_apply_context_t *c, apply_lookup_func_t apply_func) const
+ {
+ TRACE_APPLY ();
+ unsigned int index = (this+coverage[0]) (c->buffer->cur().codepoint);
+ if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
+
+ const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (coverage, coverage[0].static_size * glyphCount);
+ struct ContextApplyLookupContext lookup_context = {
+ {match_coverage, apply_func},
+ this
+ };
+ return TRACE_RETURN (context_apply_lookup (c, glyphCount, (const USHORT *) (coverage + 1), lookupCount, lookupRecord, lookup_context));
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!c->check_struct (this)) return TRACE_RETURN (false);
+ unsigned int count = glyphCount;
+ if (!c->check_array (coverage, coverage[0].static_size, count)) return TRACE_RETURN (false);
+ for (unsigned int i = 0; i < count; i++)
+ if (!coverage[i].sanitize (c, this)) return TRACE_RETURN (false);
+ LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (coverage, coverage[0].static_size * count);
+ return TRACE_RETURN (c->check_array (lookupRecord, lookupRecord[0].static_size, lookupCount));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 3 */
+ USHORT glyphCount; /* Number of glyphs in the input glyph
+ * sequence */
+ USHORT lookupCount; /* Number of LookupRecords */
+ OffsetTo<Coverage>
+ coverage[VAR]; /* Array of offsets to Coverage
+ * table in glyph sequence order */
+ LookupRecord lookupRecordX[VAR]; /* Array of LookupRecords--in
+ * design order */
+ public:
+ DEFINE_SIZE_ARRAY2 (6, coverage, lookupRecordX);
+};
+
+struct Context
+{
+ protected:
+
+ inline void closure (hb_closure_context_t *c, closure_lookup_func_t closure_func) const
+ {
+ TRACE_CLOSURE ();
+ switch (u.format) {
+ case 1: u.format1.closure (c, closure_func); break;
+ case 2: u.format2.closure (c, closure_func); break;
+ case 3: u.format3.closure (c, closure_func); break;
+ default: break;
+ }
+ }
+
+ inline const Coverage &get_coverage (void) const
+ {
+ switch (u.format) {
+ case 1: return this + u.format1.coverage;
+ case 2: return this + u.format2.coverage;
+ case 3: return this + u.format3.coverage[0];
+ default:return Null(Coverage);
+ }
+ }
+
+ inline bool would_apply (hb_would_apply_context_t *c) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.would_apply (c);
+ case 2: return u.format2.would_apply (c);
+ case 3: return u.format3.would_apply (c);
+ default:return false;
+ }
+ }
+
+ inline bool apply (hb_apply_context_t *c, apply_lookup_func_t apply_func) const
+ {
+ TRACE_APPLY ();
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.apply (c, apply_func));
+ case 2: return TRACE_RETURN (u.format2.apply (c, apply_func));
+ case 3: return TRACE_RETURN (u.format3.apply (c, apply_func));
+ default:return TRACE_RETURN (false);
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!u.format.sanitize (c)) return TRACE_RETURN (false);
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.sanitize (c));
+ case 2: return TRACE_RETURN (u.format2.sanitize (c));
+ case 3: return TRACE_RETURN (u.format3.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ USHORT format; /* Format identifier */
+ ContextFormat1 format1;
+ ContextFormat2 format2;
+ ContextFormat3 format3;
+ } u;
+};
+
+
+/* Chaining Contextual lookups */
+
+struct ChainContextClosureLookupContext
+{
+ ContextClosureFuncs funcs;
+ const void *intersects_data[3];
+};
+
+struct ChainContextApplyLookupContext
+{
+ ContextApplyFuncs funcs;
+ const void *match_data[3];
+};
+
+static inline void chain_context_closure_lookup (hb_closure_context_t *c,
+ unsigned int backtrackCount,
+ const USHORT backtrack[],
+ unsigned int inputCount, /* Including the first glyph (not matched) */
+ const USHORT input[], /* Array of input values--start with second glyph */
+ unsigned int lookaheadCount,
+ const USHORT lookahead[],
+ unsigned int lookupCount,
+ const LookupRecord lookupRecord[],
+ ChainContextClosureLookupContext &lookup_context)
+{
+ if (intersects_array (c,
+ backtrackCount, backtrack,
+ lookup_context.funcs.intersects, lookup_context.intersects_data[0])
+ && intersects_array (c,
+ inputCount ? inputCount - 1 : 0, input,
+ lookup_context.funcs.intersects, lookup_context.intersects_data[1])
+ && intersects_array (c,
+ lookaheadCount, lookahead,
+ lookup_context.funcs.intersects, lookup_context.intersects_data[2]))
+ closure_lookup (c,
+ lookupCount, lookupRecord,
+ lookup_context.funcs.closure);
+}
+
+static inline bool chain_context_would_apply_lookup (hb_would_apply_context_t *c,
+ unsigned int backtrackCount,
+ const USHORT backtrack[],
+ unsigned int inputCount, /* Including the first glyph (not matched) */
+ const USHORT input[], /* Array of input values--start with second glyph */
+ unsigned int lookaheadCount,
+ const USHORT lookahead[],
+ unsigned int lookupCount,
+ const LookupRecord lookupRecord[],
+ ChainContextApplyLookupContext &lookup_context)
+{
+ return !backtrackCount
+ && !lookaheadCount
+ && would_match_input (c,
+ inputCount, input,
+ lookup_context.funcs.match, lookup_context.match_data[1]);
+}
+
+static inline bool chain_context_apply_lookup (hb_apply_context_t *c,
+ unsigned int backtrackCount,
+ const USHORT backtrack[],
+ unsigned int inputCount, /* Including the first glyph (not matched) */
+ const USHORT input[], /* Array of input values--start with second glyph */
+ unsigned int lookaheadCount,
+ const USHORT lookahead[],
+ unsigned int lookupCount,
+ const LookupRecord lookupRecord[],
+ ChainContextApplyLookupContext &lookup_context)
+{
+ unsigned int lookahead_offset;
+ return match_input (c,
+ inputCount, input,
+ lookup_context.funcs.match, lookup_context.match_data[1],
+ &lookahead_offset)
+ && match_backtrack (c,
+ backtrackCount, backtrack,
+ lookup_context.funcs.match, lookup_context.match_data[0])
+ && match_lookahead (c,
+ lookaheadCount, lookahead,
+ lookup_context.funcs.match, lookup_context.match_data[2],
+ lookahead_offset)
+ && apply_lookup (c,
+ inputCount,
+ lookupCount, lookupRecord,
+ lookup_context.funcs.apply);
+}
+
+struct ChainRule
+{
+ friend struct ChainRuleSet;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c, ChainContextClosureLookupContext &lookup_context) const
+ {
+ TRACE_CLOSURE ();
+ const HeadlessArrayOf<USHORT> &input = StructAfter<HeadlessArrayOf<USHORT> > (backtrack);
+ const ArrayOf<USHORT> &lookahead = StructAfter<ArrayOf<USHORT> > (input);
+ const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
+ chain_context_closure_lookup (c,
+ backtrack.len, backtrack.array,
+ input.len, input.array,
+ lookahead.len, lookahead.array,
+ lookup.len, lookup.array,
+ lookup_context);
+ }
+
+ inline bool would_apply (hb_would_apply_context_t *c, ChainContextApplyLookupContext &lookup_context) const
+ {
+ TRACE_WOULD_APPLY ();
+ const HeadlessArrayOf<USHORT> &input = StructAfter<HeadlessArrayOf<USHORT> > (backtrack);
+ const ArrayOf<USHORT> &lookahead = StructAfter<ArrayOf<USHORT> > (input);
+ const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
+ return TRACE_RETURN (chain_context_would_apply_lookup (c,
+ backtrack.len, backtrack.array,
+ input.len, input.array,
+ lookahead.len, lookahead.array, lookup.len,
+ lookup.array, lookup_context));
+ }
+
+ inline bool apply (hb_apply_context_t *c, ChainContextApplyLookupContext &lookup_context) const
+ {
+ TRACE_APPLY ();
+ const HeadlessArrayOf<USHORT> &input = StructAfter<HeadlessArrayOf<USHORT> > (backtrack);
+ const ArrayOf<USHORT> &lookahead = StructAfter<ArrayOf<USHORT> > (input);
+ const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
+ return TRACE_RETURN (chain_context_apply_lookup (c,
+ backtrack.len, backtrack.array,
+ input.len, input.array,
+ lookahead.len, lookahead.array, lookup.len,
+ lookup.array, lookup_context));
+ }
+
+ public:
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!backtrack.sanitize (c)) return TRACE_RETURN (false);
+ HeadlessArrayOf<USHORT> &input = StructAfter<HeadlessArrayOf<USHORT> > (backtrack);
+ if (!input.sanitize (c)) return TRACE_RETURN (false);
+ ArrayOf<USHORT> &lookahead = StructAfter<ArrayOf<USHORT> > (input);
+ if (!lookahead.sanitize (c)) return TRACE_RETURN (false);
+ ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
+ return TRACE_RETURN (lookup.sanitize (c));
+ }
+
+ protected:
+ ArrayOf<USHORT>
+ backtrack; /* Array of backtracking values
+ * (to be matched before the input
+ * sequence) */
+ HeadlessArrayOf<USHORT>
+ inputX; /* Array of input values (start with
+ * second glyph) */
+ ArrayOf<USHORT>
+ lookaheadX; /* Array of lookahead values's (to be
+ * matched after the input sequence) */
+ ArrayOf<LookupRecord>
+ lookupX; /* Array of LookupRecords--in
+ * design order) */
+ public:
+ DEFINE_SIZE_MIN (8);
+};
+
+struct ChainRuleSet
+{
+ inline void closure (hb_closure_context_t *c, ChainContextClosureLookupContext &lookup_context) const
+ {
+ TRACE_CLOSURE ();
+ unsigned int num_rules = rule.len;
+ for (unsigned int i = 0; i < num_rules; i++)
+ (this+rule[i]).closure (c, lookup_context);
+ }
+
+ inline bool would_apply (hb_would_apply_context_t *c, ChainContextApplyLookupContext &lookup_context) const
+ {
+ TRACE_WOULD_APPLY ();
+ unsigned int num_rules = rule.len;
+ for (unsigned int i = 0; i < num_rules; i++)
+ if ((this+rule[i]).would_apply (c, lookup_context))
+ return TRACE_RETURN (true);
+
+ return TRACE_RETURN (false);
+ }
+
+ inline bool apply (hb_apply_context_t *c, ChainContextApplyLookupContext &lookup_context) const
+ {
+ TRACE_APPLY ();
+ unsigned int num_rules = rule.len;
+ for (unsigned int i = 0; i < num_rules; i++)
+ if ((this+rule[i]).apply (c, lookup_context))
+ return TRACE_RETURN (true);
+
+ return TRACE_RETURN (false);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (rule.sanitize (c, this));
+ }
+
+ protected:
+ OffsetArrayOf<ChainRule>
+ rule; /* Array of ChainRule tables
+ * ordered by preference */
+ public:
+ DEFINE_SIZE_ARRAY (2, rule);
+};
+
+struct ChainContextFormat1
+{
+ friend struct ChainContext;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c, closure_lookup_func_t closure_func) const
+ {
+ TRACE_CLOSURE ();
+ const Coverage &cov = (this+coverage);
+
+ struct ChainContextClosureLookupContext lookup_context = {
+ {intersects_glyph, closure_func},
+ {NULL, NULL, NULL}
+ };
+
+ unsigned int count = ruleSet.len;
+ for (unsigned int i = 0; i < count; i++)
+ if (cov.intersects_coverage (c->glyphs, i)) {
+ const ChainRuleSet &rule_set = this+ruleSet[i];
+ rule_set.closure (c, lookup_context);
+ }
+ }
+
+ inline bool would_apply (hb_would_apply_context_t *c) const
+ {
+ TRACE_WOULD_APPLY ();
+
+ const ChainRuleSet &rule_set = this+ruleSet[(this+coverage) (c->glyphs[0])];
+ struct ChainContextApplyLookupContext lookup_context = {
+ {match_glyph, NULL},
+ {NULL, NULL, NULL}
+ };
+ return TRACE_RETURN (rule_set.would_apply (c, lookup_context));
+ }
+
+ inline bool apply (hb_apply_context_t *c, apply_lookup_func_t apply_func) const
+ {
+ TRACE_APPLY ();
+ unsigned int index = (this+coverage) (c->buffer->cur().codepoint);
+ if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
+
+ const ChainRuleSet &rule_set = this+ruleSet[index];
+ struct ChainContextApplyLookupContext lookup_context = {
+ {match_glyph, apply_func},
+ {NULL, NULL, NULL}
+ };
+ return TRACE_RETURN (rule_set.apply (c, lookup_context));
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (coverage.sanitize (c, this) && ruleSet.sanitize (c, this));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 1 */
+ OffsetTo<Coverage>
+ coverage; /* Offset to Coverage table--from
+ * beginning of table */
+ OffsetArrayOf<ChainRuleSet>
+ ruleSet; /* Array of ChainRuleSet tables
+ * ordered by Coverage Index */
+ public:
+ DEFINE_SIZE_ARRAY (6, ruleSet);
+};
+
+struct ChainContextFormat2
+{
+ friend struct ChainContext;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c, closure_lookup_func_t closure_func) const
+ {
+ TRACE_CLOSURE ();
+ if (!(this+coverage).intersects (c->glyphs))
+ return;
+
+ const ClassDef &backtrack_class_def = this+backtrackClassDef;
+ const ClassDef &input_class_def = this+inputClassDef;
+ const ClassDef &lookahead_class_def = this+lookaheadClassDef;
+
+ struct ChainContextClosureLookupContext lookup_context = {
+ {intersects_class, closure_func},
+ {&backtrack_class_def,
+ &input_class_def,
+ &lookahead_class_def}
+ };
+
+ unsigned int count = ruleSet.len;
+ for (unsigned int i = 0; i < count; i++)
+ if (input_class_def.intersects_class (c->glyphs, i)) {
+ const ChainRuleSet &rule_set = this+ruleSet[i];
+ rule_set.closure (c, lookup_context);
+ }
+ }
+
+ inline bool would_apply (hb_would_apply_context_t *c) const
+ {
+ TRACE_WOULD_APPLY ();
+
+ const ClassDef &input_class_def = this+inputClassDef;
+
+ unsigned int index = input_class_def (c->glyphs[0]);
+ const ChainRuleSet &rule_set = this+ruleSet[index];
+ struct ChainContextApplyLookupContext lookup_context = {
+ {match_class, NULL},
+ {NULL, &input_class_def, NULL}
+ };
+ return TRACE_RETURN (rule_set.would_apply (c, lookup_context));
+ }
+
+ inline bool apply (hb_apply_context_t *c, apply_lookup_func_t apply_func) const
+ {
+ TRACE_APPLY ();
+ unsigned int index = (this+coverage) (c->buffer->cur().codepoint);
+ if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
+
+ const ClassDef &backtrack_class_def = this+backtrackClassDef;
+ const ClassDef &input_class_def = this+inputClassDef;
+ const ClassDef &lookahead_class_def = this+lookaheadClassDef;
+
+ index = input_class_def (c->buffer->cur().codepoint);
+ const ChainRuleSet &rule_set = this+ruleSet[index];
+ struct ChainContextApplyLookupContext lookup_context = {
+ {match_class, apply_func},
+ {&backtrack_class_def,
+ &input_class_def,
+ &lookahead_class_def}
+ };
+ return TRACE_RETURN (rule_set.apply (c, lookup_context));
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (coverage.sanitize (c, this) && backtrackClassDef.sanitize (c, this) &&
+ inputClassDef.sanitize (c, this) && lookaheadClassDef.sanitize (c, this) &&
+ ruleSet.sanitize (c, this));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 2 */
+ OffsetTo<Coverage>
+ coverage; /* Offset to Coverage table--from
+ * beginning of table */
+ OffsetTo<ClassDef>
+ backtrackClassDef; /* Offset to glyph ClassDef table
+ * containing backtrack sequence
+ * data--from beginning of table */
+ OffsetTo<ClassDef>
+ inputClassDef; /* Offset to glyph ClassDef
+ * table containing input sequence
+ * data--from beginning of table */
+ OffsetTo<ClassDef>
+ lookaheadClassDef; /* Offset to glyph ClassDef table
+ * containing lookahead sequence
+ * data--from beginning of table */
+ OffsetArrayOf<ChainRuleSet>
+ ruleSet; /* Array of ChainRuleSet tables
+ * ordered by class */
+ public:
+ DEFINE_SIZE_ARRAY (12, ruleSet);
+};
+
+struct ChainContextFormat3
+{
+ friend struct ChainContext;
+
+ private:
+
+ inline void closure (hb_closure_context_t *c, closure_lookup_func_t closure_func) const
+ {
+ TRACE_CLOSURE ();
+ const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
+
+ if (!(this+input[0]).intersects (c->glyphs))
+ return;
+
+ const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (input);
+ const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
+ struct ChainContextClosureLookupContext lookup_context = {
+ {intersects_coverage, closure_func},
+ {this, this, this}
+ };
+ chain_context_closure_lookup (c,
+ backtrack.len, (const USHORT *) backtrack.array,
+ input.len, (const USHORT *) input.array + 1,
+ lookahead.len, (const USHORT *) lookahead.array,
+ lookup.len, lookup.array,
+ lookup_context);
+ }
+
+ inline const Coverage &get_coverage (void) const
+ {
+ const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
+ return this+input[0];
+ }
+
+ inline bool would_apply (hb_would_apply_context_t *c) const
+ {
+ TRACE_WOULD_APPLY ();
+
+ const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
+ const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (input);
+ const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
+ struct ChainContextApplyLookupContext lookup_context = {
+ {match_coverage, NULL},
+ {this, this, this}
+ };
+ return TRACE_RETURN (chain_context_would_apply_lookup (c,
+ backtrack.len, (const USHORT *) backtrack.array,
+ input.len, (const USHORT *) input.array + 1,
+ lookahead.len, (const USHORT *) lookahead.array,
+ lookup.len, lookup.array, lookup_context));
+ }
+
+ inline bool apply (hb_apply_context_t *c, apply_lookup_func_t apply_func) const
+ {
+ TRACE_APPLY ();
+ const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
+
+ unsigned int index = (this+input[0]) (c->buffer->cur().codepoint);
+ if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
+
+ const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (input);
+ const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
+ struct ChainContextApplyLookupContext lookup_context = {
+ {match_coverage, apply_func},
+ {this, this, this}
+ };
+ return TRACE_RETURN (chain_context_apply_lookup (c,
+ backtrack.len, (const USHORT *) backtrack.array,
+ input.len, (const USHORT *) input.array + 1,
+ lookahead.len, (const USHORT *) lookahead.array,
+ lookup.len, lookup.array, lookup_context));
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!backtrack.sanitize (c, this)) return TRACE_RETURN (false);
+ OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
+ if (!input.sanitize (c, this)) return TRACE_RETURN (false);
+ OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (input);
+ if (!lookahead.sanitize (c, this)) return TRACE_RETURN (false);
+ ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
+ return TRACE_RETURN (lookup.sanitize (c));
+ }
+
+ protected:
+ USHORT format; /* Format identifier--format = 3 */
+ OffsetArrayOf<Coverage>
+ backtrack; /* Array of coverage tables
+ * in backtracking sequence, in glyph
+ * sequence order */
+ OffsetArrayOf<Coverage>
+ inputX ; /* Array of coverage
+ * tables in input sequence, in glyph
+ * sequence order */
+ OffsetArrayOf<Coverage>
+ lookaheadX; /* Array of coverage tables
+ * in lookahead sequence, in glyph
+ * sequence order */
+ ArrayOf<LookupRecord>
+ lookupX; /* Array of LookupRecords--in
+ * design order) */
+ public:
+ DEFINE_SIZE_MIN (10);
+};
+
+struct ChainContext
+{
+ protected:
+
+ inline void closure (hb_closure_context_t *c, closure_lookup_func_t closure_func) const
+ {
+ TRACE_CLOSURE ();
+ switch (u.format) {
+ case 1: u.format1.closure (c, closure_func); break;
+ case 2: u.format2.closure (c, closure_func); break;
+ case 3: u.format3.closure (c, closure_func); break;
+ default: break;
+ }
+ }
+
+ inline const Coverage &get_coverage (void) const
+ {
+ switch (u.format) {
+ case 1: return this + u.format1.coverage;
+ case 2: return this + u.format2.coverage;
+ case 3: return u.format3.get_coverage ();
+ default:return Null(Coverage);
+ }
+ }
+
+ inline bool would_apply (hb_would_apply_context_t *c) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.would_apply (c);
+ case 2: return u.format2.would_apply (c);
+ case 3: return u.format3.would_apply (c);
+ default:return false;
+ }
+ }
+
+ inline bool apply (hb_apply_context_t *c, apply_lookup_func_t apply_func) const
+ {
+ TRACE_APPLY ();
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.apply (c, apply_func));
+ case 2: return TRACE_RETURN (u.format2.apply (c, apply_func));
+ case 3: return TRACE_RETURN (u.format3.apply (c, apply_func));
+ default:return TRACE_RETURN (false);
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!u.format.sanitize (c)) return TRACE_RETURN (false);
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.sanitize (c));
+ case 2: return TRACE_RETURN (u.format2.sanitize (c));
+ case 3: return TRACE_RETURN (u.format3.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ USHORT format; /* Format identifier */
+ ChainContextFormat1 format1;
+ ChainContextFormat2 format2;
+ ChainContextFormat3 format3;
+ } u;
+};
+
+
+struct ExtensionFormat1
+{
+ friend struct Extension;
+
+ protected:
+ inline unsigned int get_type (void) const { return extensionLookupType; }
+ inline unsigned int get_offset (void) const { return extensionOffset; }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this));
+ }
+
+ protected:
+ USHORT format; /* Format identifier. Set to 1. */
+ USHORT extensionLookupType; /* Lookup type of subtable referenced
+ * by ExtensionOffset (i.e. the
+ * extension subtable). */
+ ULONG extensionOffset; /* Offset to the extension subtable,
+ * of lookup type subtable. */
+ public:
+ DEFINE_SIZE_STATIC (8);
+};
+
+struct Extension
+{
+ inline unsigned int get_type (void) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.get_type ();
+ default:return 0;
+ }
+ }
+ inline unsigned int get_offset (void) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.get_offset ();
+ default:return 0;
+ }
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ if (!u.format.sanitize (c)) return TRACE_RETURN (false);
+ switch (u.format) {
+ case 1: return TRACE_RETURN (u.format1.sanitize (c));
+ default:return TRACE_RETURN (true);
+ }
+ }
+
+ protected:
+ union {
+ USHORT format; /* Format identifier */
+ ExtensionFormat1 format1;
+ } u;
+};
+
+
+/*
+ * GSUB/GPOS Common
+ */
+
+struct GSUBGPOS
+{
+ static const hb_tag_t GSUBTag = HB_OT_TAG_GSUB;
+ static const hb_tag_t GPOSTag = HB_OT_TAG_GPOS;
+
+ inline unsigned int get_script_count (void) const
+ { return (this+scriptList).len; }
+ inline const Tag& get_script_tag (unsigned int i) const
+ { return (this+scriptList).get_tag (i); }
+ inline unsigned int get_script_tags (unsigned int start_offset,
+ unsigned int *script_count /* IN/OUT */,
+ hb_tag_t *script_tags /* OUT */) const
+ { return (this+scriptList).get_tags (start_offset, script_count, script_tags); }
+ inline const Script& get_script (unsigned int i) const
+ { return (this+scriptList)[i]; }
+ inline bool find_script_index (hb_tag_t tag, unsigned int *index) const
+ { return (this+scriptList).find_index (tag, index); }
+
+ inline unsigned int get_feature_count (void) const
+ { return (this+featureList).len; }
+ inline const Tag& get_feature_tag (unsigned int i) const
+ { return (this+featureList).get_tag (i); }
+ inline unsigned int get_feature_tags (unsigned int start_offset,
+ unsigned int *feature_count /* IN/OUT */,
+ hb_tag_t *feature_tags /* OUT */) const
+ { return (this+featureList).get_tags (start_offset, feature_count, feature_tags); }
+ inline const Feature& get_feature (unsigned int i) const
+ { return (this+featureList)[i]; }
+ inline bool find_feature_index (hb_tag_t tag, unsigned int *index) const
+ { return (this+featureList).find_index (tag, index); }
+
+ inline unsigned int get_lookup_count (void) const
+ { return (this+lookupList).len; }
+ inline const Lookup& get_lookup (unsigned int i) const
+ { return (this+lookupList)[i]; }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (version.sanitize (c) && likely (version.major == 1) &&
+ scriptList.sanitize (c, this) &&
+ featureList.sanitize (c, this) &&
+ lookupList.sanitize (c, this));
+ }
+
+ protected:
+ FixedVersion version; /* Version of the GSUB/GPOS table--initially set
+ * to 0x00010000 */
+ OffsetTo<ScriptList>
+ scriptList; /* ScriptList table */
+ OffsetTo<FeatureList>
+ featureList; /* FeatureList table */
+ OffsetTo<LookupList>
+ lookupList; /* LookupList table */
+ public:
+ DEFINE_SIZE_STATIC (10);
+};
+
+
+
+#endif /* HB_OT_LAYOUT_GSUBGPOS_PRIVATE_HH */
diff --git a/src/hb-ot-layout-private.hh b/src/hb-ot-layout-private.hh
new file mode 100644
index 0000000..e101782
--- /dev/null
+++ b/src/hb-ot-layout-private.hh
@@ -0,0 +1,213 @@
+/*
+ * Copyright © 2007,2008,2009 Red Hat, Inc.
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OT_LAYOUT_PRIVATE_HH
+#define HB_OT_LAYOUT_PRIVATE_HH
+
+#include "hb-private.hh"
+
+#include "hb-ot-layout.h"
+
+#include "hb-font-private.hh"
+#include "hb-buffer-private.hh"
+#include "hb-set-private.hh"
+
+
+/* buffer var allocations, used during the GSUB/GPOS processing */
+#define glyph_props() var1.u16[0] /* GDEF glyph properties */
+#define syllable() var1.u8[2] /* GSUB/GPOS shaping boundaries */
+#define lig_props() var1.u8[3] /* GSUB/GPOS ligature tracking */
+
+#define hb_ot_layout_from_face(face) ((hb_ot_layout_t *) face->shaper_data.ot)
+
+/*
+ * GDEF
+ */
+
+typedef enum {
+ HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED = 0x0001,
+ HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH = 0x0002,
+ HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE = 0x0004,
+ HB_OT_LAYOUT_GLYPH_CLASS_MARK = 0x0008,
+ HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT = 0x0010
+} hb_ot_layout_glyph_class_t;
+
+
+
+/*
+ * GSUB/GPOS
+ */
+
+/* lig_id / lig_comp
+ *
+ * When a ligature is formed:
+ *
+ * - The ligature glyph and any marks in between all the same newly allocated
+ * lig_id,
+ * - The ligature glyph will get lig_num_comps set to the number of components
+ * - The marks get lig_comp > 0, reflecting which component of the ligature
+ * they were applied to.
+ * - This is used in GPOS to attach marks to the right component of a ligature
+ * in MarkLigPos.
+ *
+ * When a multiple-substitution is done:
+ *
+ * - All resulting glyphs will have lig_id = 0,
+ * - The resulting glyphs will have lig_comp = 0, 1, 2, ... respectively.
+ * - This is used in GPOS to attach marks to the first component of a
+ * multiple substitution in MarkBasePos.
+ *
+ * The numbers are also used in GPOS to do mark-to-mark positioning only
+ * to marks that belong to the same component of a ligature in MarkMarPos.
+ */
+#define IS_LIG_BASE 0x10
+static inline void
+set_lig_props_for_ligature (hb_glyph_info_t &info, unsigned int lig_id, unsigned int lig_num_comps)
+{
+ info.lig_props() = (lig_id << 5) | IS_LIG_BASE | (lig_num_comps & 0x0F);
+}
+static inline void
+set_lig_props_for_mark (hb_glyph_info_t &info, unsigned int lig_id, unsigned int lig_comp)
+{
+ info.lig_props() = (lig_id << 5) | (lig_comp & 0x0F);
+}
+static inline void
+set_lig_props_for_component (hb_glyph_info_t &info, unsigned int comp)
+{
+ set_lig_props_for_mark (info, 0, comp);
+}
+
+static inline unsigned int
+get_lig_id (const hb_glyph_info_t &info)
+{
+ return info.lig_props() >> 5;
+}
+static inline bool
+is_a_ligature (const hb_glyph_info_t &info)
+{
+ return !!(info.lig_props() & IS_LIG_BASE);
+}
+static inline unsigned int
+get_lig_comp (const hb_glyph_info_t &info)
+{
+ if (is_a_ligature (info))
+ return 0;
+ else
+ return info.lig_props() & 0x0F;
+}
+static inline unsigned int
+get_lig_num_comps (const hb_glyph_info_t &info)
+{
+ if ((info.glyph_props() & HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE) && is_a_ligature (info))
+ return info.lig_props() & 0x0F;
+ else
+ return 1;
+}
+
+static inline uint8_t allocate_lig_id (hb_buffer_t *buffer) {
+ uint8_t lig_id = buffer->next_serial () & 0x07;
+ if (unlikely (!lig_id))
+ lig_id = allocate_lig_id (buffer); /* in case of overflow */
+ return lig_id;
+}
+
+
+HB_INTERNAL hb_bool_t
+hb_ot_layout_would_substitute_lookup_fast (hb_face_t *face,
+ const hb_codepoint_t *glyphs,
+ unsigned int glyphs_length,
+ unsigned int lookup_index);
+
+
+/* Should be called before all the substitute_lookup's are done. */
+HB_INTERNAL void
+hb_ot_layout_substitute_start (hb_font_t *font,
+ hb_buffer_t *buffer);
+
+HB_INTERNAL hb_bool_t
+hb_ot_layout_substitute_lookup (hb_font_t *font,
+ hb_buffer_t *buffer,
+ unsigned int lookup_index,
+ hb_mask_t mask);
+
+/* Should be called after all the substitute_lookup's are done */
+HB_INTERNAL void
+hb_ot_layout_substitute_finish (hb_font_t *font,
+ hb_buffer_t *buffer);
+
+
+/* Should be called before all the position_lookup's are done. Resets positions to zero. */
+HB_INTERNAL void
+hb_ot_layout_position_start (hb_font_t *font,
+ hb_buffer_t *buffer);
+
+HB_INTERNAL hb_bool_t
+hb_ot_layout_position_lookup (hb_font_t *font,
+ hb_buffer_t *buffer,
+ unsigned int lookup_index,
+ hb_mask_t mask);
+
+/* 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_ot_layout_t
+ */
+
+struct hb_ot_layout_t
+{
+ hb_blob_t *gdef_blob;
+ hb_blob_t *gsub_blob;
+ hb_blob_t *gpos_blob;
+
+ const struct GDEF *gdef;
+ const struct GSUB *gsub;
+ const struct GPOS *gpos;
+
+ unsigned int gsub_lookup_count;
+ unsigned int gpos_lookup_count;
+
+ hb_set_digest_t *gsub_digests;
+ hb_set_digest_t *gpos_digests;
+};
+
+
+HB_INTERNAL hb_ot_layout_t *
+_hb_ot_layout_create (hb_face_t *face);
+
+HB_INTERNAL void
+_hb_ot_layout_destroy (hb_ot_layout_t *layout);
+
+
+
+#endif /* HB_OT_LAYOUT_PRIVATE_HH */
diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc
new file mode 100644
index 0000000..e4d84e8
--- /dev/null
+++ b/src/hb-ot-layout.cc
@@ -0,0 +1,486 @@
+/*
+ * Copyright © 1998-2004 David Turner and Werner Lemberg
+ * Copyright © 2006 Behdad Esfahbod
+ * Copyright © 2007,2008,2009 Red Hat, Inc.
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-ot-layout-private.hh"
+
+#include "hb-ot-layout-gdef-table.hh"
+#include "hb-ot-layout-gsub-table.hh"
+#include "hb-ot-layout-gpos-table.hh"
+#include "hb-ot-maxp-table.hh"
+
+
+#include <stdlib.h>
+#include <string.h>
+
+
+HB_SHAPER_DATA_ENSURE_DECLARE(ot, face)
+
+hb_ot_layout_t *
+_hb_ot_layout_create (hb_face_t *face)
+{
+ hb_ot_layout_t *layout = (hb_ot_layout_t *) calloc (1, sizeof (hb_ot_layout_t));
+ if (unlikely (!layout))
+ return NULL;
+
+ layout->gdef_blob = Sanitizer<GDEF>::sanitize (face->reference_table (HB_OT_TAG_GDEF));
+ layout->gdef = Sanitizer<GDEF>::lock_instance (layout->gdef_blob);
+
+ layout->gsub_blob = Sanitizer<GSUB>::sanitize (face->reference_table (HB_OT_TAG_GSUB));
+ layout->gsub = Sanitizer<GSUB>::lock_instance (layout->gsub_blob);
+
+ layout->gpos_blob = Sanitizer<GPOS>::sanitize (face->reference_table (HB_OT_TAG_GPOS));
+ layout->gpos = Sanitizer<GPOS>::lock_instance (layout->gpos_blob);
+
+ layout->gsub_lookup_count = layout->gsub->get_lookup_count ();
+ layout->gpos_lookup_count = layout->gpos->get_lookup_count ();
+
+ layout->gsub_digests = (hb_set_digest_t *) calloc (layout->gsub->get_lookup_count (), sizeof (hb_set_digest_t));
+ layout->gpos_digests = (hb_set_digest_t *) calloc (layout->gpos->get_lookup_count (), sizeof (hb_set_digest_t));
+
+ if (unlikely ((layout->gsub_lookup_count && !layout->gsub_digests) ||
+ (layout->gpos_lookup_count && !layout->gpos_digests)))
+ {
+ _hb_ot_layout_destroy (layout);
+ return NULL;
+ }
+
+ for (unsigned int i = 0; i < layout->gsub_lookup_count; i++)
+ layout->gsub->add_coverage (&layout->gsub_digests[i], i);
+ for (unsigned int i = 0; i < layout->gpos_lookup_count; i++)
+ layout->gpos->add_coverage (&layout->gpos_digests[i], i);
+
+ return layout;
+}
+
+void
+_hb_ot_layout_destroy (hb_ot_layout_t *layout)
+{
+ hb_blob_destroy (layout->gdef_blob);
+ hb_blob_destroy (layout->gsub_blob);
+ hb_blob_destroy (layout->gpos_blob);
+
+ free (layout->gsub_digests);
+ free (layout->gpos_digests);
+
+ free (layout);
+}
+
+static inline const GDEF&
+_get_gdef (hb_face_t *face)
+{
+ if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(GDEF);
+ return *hb_ot_layout_from_face (face)->gdef;
+}
+static inline const GSUB&
+_get_gsub (hb_face_t *face)
+{
+ if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(GSUB);
+ return *hb_ot_layout_from_face (face)->gsub;
+}
+static inline const GPOS&
+_get_gpos (hb_face_t *face)
+{
+ if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(GPOS);
+ return *hb_ot_layout_from_face (face)->gpos;
+}
+
+
+/*
+ * GDEF
+ */
+
+hb_bool_t
+hb_ot_layout_has_glyph_classes (hb_face_t *face)
+{
+ return _get_gdef (face).has_glyph_classes ();
+}
+
+
+unsigned int
+hb_ot_layout_get_attach_points (hb_face_t *face,
+ hb_codepoint_t glyph,
+ unsigned int start_offset,
+ unsigned int *point_count /* IN/OUT */,
+ unsigned int *point_array /* OUT */)
+{
+ return _get_gdef (face).get_attach_points (glyph, start_offset, point_count, point_array);
+}
+
+unsigned int
+hb_ot_layout_get_ligature_carets (hb_font_t *font,
+ hb_direction_t direction,
+ hb_codepoint_t glyph,
+ unsigned int start_offset,
+ unsigned int *caret_count /* IN/OUT */,
+ int *caret_array /* OUT */)
+{
+ return _get_gdef (font->face).get_lig_carets (font, direction, glyph, start_offset, caret_count, caret_array);
+}
+
+
+/*
+ * GSUB/GPOS
+ */
+
+static const GSUBGPOS&
+get_gsubgpos_table (hb_face_t *face,
+ hb_tag_t table_tag)
+{
+ switch (table_tag) {
+ case HB_OT_TAG_GSUB: return _get_gsub (face);
+ case HB_OT_TAG_GPOS: return _get_gpos (face);
+ default: return Null(GSUBGPOS);
+ }
+}
+
+
+unsigned int
+hb_ot_layout_table_get_script_tags (hb_face_t *face,
+ hb_tag_t table_tag,
+ unsigned int start_offset,
+ unsigned int *script_count /* IN/OUT */,
+ hb_tag_t *script_tags /* OUT */)
+{
+ const GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
+
+ return g.get_script_tags (start_offset, script_count, script_tags);
+}
+
+hb_bool_t
+hb_ot_layout_table_find_script (hb_face_t *face,
+ hb_tag_t table_tag,
+ hb_tag_t script_tag,
+ unsigned int *script_index)
+{
+ ASSERT_STATIC (Index::NOT_FOUND_INDEX == HB_OT_LAYOUT_NO_SCRIPT_INDEX);
+ const GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
+
+ if (g.find_script_index (script_tag, script_index))
+ return true;
+
+ /* try finding 'DFLT' */
+ if (g.find_script_index (HB_OT_TAG_DEFAULT_SCRIPT, script_index))
+ return false;
+
+ /* try with 'dflt'; MS site has had typos and many fonts use it now :(.
+ * including many versions of DejaVu Sans Mono! */
+ if (g.find_script_index (HB_OT_TAG_DEFAULT_LANGUAGE, script_index))
+ return false;
+
+ if (script_index) *script_index = HB_OT_LAYOUT_NO_SCRIPT_INDEX;
+ return false;
+}
+
+hb_bool_t
+hb_ot_layout_table_choose_script (hb_face_t *face,
+ hb_tag_t table_tag,
+ const hb_tag_t *script_tags,
+ unsigned int *script_index,
+ hb_tag_t *chosen_script)
+{
+ ASSERT_STATIC (Index::NOT_FOUND_INDEX == HB_OT_LAYOUT_NO_SCRIPT_INDEX);
+ const GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
+
+ while (*script_tags)
+ {
+ if (g.find_script_index (*script_tags, script_index)) {
+ if (chosen_script)
+ *chosen_script = *script_tags;
+ return true;
+ }
+ script_tags++;
+ }
+
+ /* try finding 'DFLT' */
+ if (g.find_script_index (HB_OT_TAG_DEFAULT_SCRIPT, script_index)) {
+ if (chosen_script)
+ *chosen_script = HB_OT_TAG_DEFAULT_SCRIPT;
+ return false;
+ }
+
+ /* try with 'dflt'; MS site has had typos and many fonts use it now :( */
+ if (g.find_script_index (HB_OT_TAG_DEFAULT_LANGUAGE, script_index)) {
+ if (chosen_script)
+ *chosen_script = HB_OT_TAG_DEFAULT_LANGUAGE;
+ return false;
+ }
+
+ /* 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;
+ return false;
+ }
+
+ if (script_index) *script_index = HB_OT_LAYOUT_NO_SCRIPT_INDEX;
+ if (chosen_script)
+ *chosen_script = HB_OT_LAYOUT_NO_SCRIPT_INDEX;
+ return false;
+}
+
+unsigned int
+hb_ot_layout_table_get_feature_tags (hb_face_t *face,
+ hb_tag_t table_tag,
+ unsigned int start_offset,
+ unsigned int *feature_count /* IN/OUT */,
+ hb_tag_t *feature_tags /* OUT */)
+{
+ const GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
+
+ return g.get_feature_tags (start_offset, feature_count, feature_tags);
+}
+
+
+unsigned int
+hb_ot_layout_script_get_language_tags (hb_face_t *face,
+ hb_tag_t table_tag,
+ unsigned int script_index,
+ unsigned int start_offset,
+ unsigned int *language_count /* IN/OUT */,
+ hb_tag_t *language_tags /* OUT */)
+{
+ const Script &s = get_gsubgpos_table (face, table_tag).get_script (script_index);
+
+ return s.get_lang_sys_tags (start_offset, language_count, language_tags);
+}
+
+hb_bool_t
+hb_ot_layout_script_find_language (hb_face_t *face,
+ hb_tag_t table_tag,
+ unsigned int script_index,
+ hb_tag_t language_tag,
+ unsigned int *language_index)
+{
+ ASSERT_STATIC (Index::NOT_FOUND_INDEX == HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX);
+ const Script &s = get_gsubgpos_table (face, table_tag).get_script (script_index);
+
+ if (s.find_lang_sys_index (language_tag, language_index))
+ return true;
+
+ /* try with 'dflt'; MS site has had typos and many fonts use it now :( */
+ if (s.find_lang_sys_index (HB_OT_TAG_DEFAULT_LANGUAGE, language_index))
+ return false;
+
+ if (language_index) *language_index = HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX;
+ return false;
+}
+
+hb_bool_t
+hb_ot_layout_language_get_required_feature_index (hb_face_t *face,
+ hb_tag_t table_tag,
+ unsigned int script_index,
+ unsigned int language_index,
+ unsigned int *feature_index)
+{
+ const LangSys &l = get_gsubgpos_table (face, table_tag).get_script (script_index).get_lang_sys (language_index);
+
+ if (feature_index) *feature_index = l.get_required_feature_index ();
+
+ return l.has_required_feature ();
+}
+
+unsigned int
+hb_ot_layout_language_get_feature_indexes (hb_face_t *face,
+ hb_tag_t table_tag,
+ unsigned int script_index,
+ unsigned int language_index,
+ unsigned int start_offset,
+ unsigned int *feature_count /* IN/OUT */,
+ unsigned int *feature_indexes /* OUT */)
+{
+ const GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
+ const LangSys &l = g.get_script (script_index).get_lang_sys (language_index);
+
+ return l.get_feature_indexes (start_offset, feature_count, feature_indexes);
+}
+
+unsigned int
+hb_ot_layout_language_get_feature_tags (hb_face_t *face,
+ hb_tag_t table_tag,
+ unsigned int script_index,
+ unsigned int language_index,
+ unsigned int start_offset,
+ unsigned int *feature_count /* IN/OUT */,
+ hb_tag_t *feature_tags /* OUT */)
+{
+ const GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
+ const LangSys &l = g.get_script (script_index).get_lang_sys (language_index);
+
+ ASSERT_STATIC (sizeof (unsigned int) == sizeof (hb_tag_t));
+ unsigned int ret = l.get_feature_indexes (start_offset, feature_count, (unsigned int *) feature_tags);
+
+ if (feature_tags) {
+ unsigned int count = *feature_count;
+ for (unsigned int i = 0; i < count; i++)
+ feature_tags[i] = g.get_feature_tag ((unsigned int) feature_tags[i]);
+ }
+
+ return ret;
+}
+
+
+hb_bool_t
+hb_ot_layout_language_find_feature (hb_face_t *face,
+ hb_tag_t table_tag,
+ unsigned int script_index,
+ unsigned int language_index,
+ hb_tag_t feature_tag,
+ unsigned int *feature_index)
+{
+ ASSERT_STATIC (Index::NOT_FOUND_INDEX == HB_OT_LAYOUT_NO_FEATURE_INDEX);
+ const GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
+ const LangSys &l = g.get_script (script_index).get_lang_sys (language_index);
+
+ unsigned int num_features = l.get_feature_count ();
+ for (unsigned int i = 0; i < num_features; i++) {
+ unsigned int f_index = l.get_feature_index (i);
+
+ if (feature_tag == g.get_feature_tag (f_index)) {
+ if (feature_index) *feature_index = f_index;
+ return true;
+ }
+ }
+
+ if (feature_index) *feature_index = HB_OT_LAYOUT_NO_FEATURE_INDEX;
+ return false;
+}
+
+unsigned int
+hb_ot_layout_feature_get_lookup_indexes (hb_face_t *face,
+ hb_tag_t table_tag,
+ unsigned int feature_index,
+ unsigned int start_offset,
+ unsigned int *lookup_count /* IN/OUT */,
+ unsigned int *lookup_indexes /* OUT */)
+{
+ const GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
+ const Feature &f = g.get_feature (feature_index);
+
+ return f.get_lookup_indexes (start_offset, lookup_count, lookup_indexes);
+}
+
+
+/*
+ * GSUB
+ */
+
+hb_bool_t
+hb_ot_layout_has_substitution (hb_face_t *face)
+{
+ return &_get_gsub (face) != &Null(GSUB);
+}
+
+hb_bool_t
+hb_ot_layout_would_substitute_lookup (hb_face_t *face,
+ const hb_codepoint_t *glyphs,
+ unsigned int glyphs_length,
+ unsigned int lookup_index)
+{
+ if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return false;
+ return hb_ot_layout_would_substitute_lookup_fast (face, glyphs, glyphs_length, lookup_index);
+}
+
+hb_bool_t
+hb_ot_layout_would_substitute_lookup_fast (hb_face_t *face,
+ const hb_codepoint_t *glyphs,
+ unsigned int glyphs_length,
+ unsigned int lookup_index)
+{
+ if (unlikely (lookup_index >= hb_ot_layout_from_face (face)->gsub_lookup_count)) return false;
+ hb_would_apply_context_t c (face, glyphs, glyphs_length, &hb_ot_layout_from_face (face)->gsub_digests[lookup_index]);
+ return hb_ot_layout_from_face (face)->gsub->would_substitute_lookup (&c, lookup_index);
+}
+
+void
+hb_ot_layout_substitute_start (hb_font_t *font, hb_buffer_t *buffer)
+{
+ GSUB::substitute_start (font, buffer);
+}
+
+hb_bool_t
+hb_ot_layout_substitute_lookup (hb_font_t *font,
+ hb_buffer_t *buffer,
+ unsigned int lookup_index,
+ hb_mask_t mask)
+{
+ if (unlikely (lookup_index >= hb_ot_layout_from_face (font->face)->gsub_lookup_count)) return false;
+ hb_apply_context_t c (font, buffer, mask, &hb_ot_layout_from_face (font->face)->gsub_digests[lookup_index]);
+ return hb_ot_layout_from_face (font->face)->gsub->substitute_lookup (&c, lookup_index);
+}
+
+void
+hb_ot_layout_substitute_finish (hb_font_t *font, hb_buffer_t *buffer)
+{
+ GSUB::substitute_finish (font, buffer);
+}
+
+void
+hb_ot_layout_substitute_closure_lookup (hb_face_t *face,
+ hb_set_t *glyphs,
+ unsigned int lookup_index)
+{
+ hb_closure_context_t c (face, glyphs);
+ _get_gsub (face).closure_lookup (&c, lookup_index);
+}
+
+/*
+ * GPOS
+ */
+
+hb_bool_t
+hb_ot_layout_has_positioning (hb_face_t *face)
+{
+ return &_get_gpos (face) != &Null(GPOS);
+}
+
+void
+hb_ot_layout_position_start (hb_font_t *font, hb_buffer_t *buffer)
+{
+ GPOS::position_start (font, buffer);
+}
+
+hb_bool_t
+hb_ot_layout_position_lookup (hb_font_t *font,
+ hb_buffer_t *buffer,
+ unsigned int lookup_index,
+ hb_mask_t mask)
+{
+ if (unlikely (lookup_index >= hb_ot_layout_from_face (font->face)->gpos_lookup_count)) return false;
+ hb_apply_context_t c (font, buffer, mask, &hb_ot_layout_from_face (font->face)->gpos_digests[lookup_index]);
+ return hb_ot_layout_from_face (font->face)->gpos->position_lookup (&c, lookup_index);
+}
+
+void
+hb_ot_layout_position_finish (hb_font_t *font, hb_buffer_t *buffer, hb_bool_t zero_width_attached_marks)
+{
+ GPOS::position_finish (font, buffer, zero_width_attached_marks);
+}
diff --git a/src/hb-ot-layout.h b/src/hb-ot-layout.h
new file mode 100644
index 0000000..2ad4ff4
--- /dev/null
+++ b/src/hb-ot-layout.h
@@ -0,0 +1,193 @@
+/*
+ * Copyright © 2007,2008,2009 Red Hat, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OT_H_IN
+#error "Include <hb-ot.h> instead."
+#endif
+
+#ifndef HB_OT_LAYOUT_H
+#define HB_OT_LAYOUT_H
+
+#include "hb.h"
+
+#include "hb-ot-tag.h"
+
+HB_BEGIN_DECLS
+
+
+#define HB_OT_TAG_GDEF HB_TAG('G','D','E','F')
+#define HB_OT_TAG_GSUB HB_TAG('G','S','U','B')
+#define HB_OT_TAG_GPOS HB_TAG('G','P','O','S')
+
+
+/*
+ * GDEF
+ */
+
+hb_bool_t
+hb_ot_layout_has_glyph_classes (hb_face_t *face);
+
+/* Not that useful. Provides list of attach points for a glyph that a
+ * client may want to cache */
+unsigned int
+hb_ot_layout_get_attach_points (hb_face_t *face,
+ hb_codepoint_t glyph,
+ unsigned int start_offset,
+ unsigned int *point_count /* IN/OUT */,
+ unsigned int *point_array /* OUT */);
+
+/* Ligature caret positions */
+unsigned int
+hb_ot_layout_get_ligature_carets (hb_font_t *font,
+ hb_direction_t direction,
+ hb_codepoint_t glyph,
+ unsigned int start_offset,
+ unsigned int *caret_count /* IN/OUT */,
+ hb_position_t *caret_array /* OUT */);
+
+
+/*
+ * GSUB/GPOS feature query and enumeration interface
+ */
+
+#define HB_OT_LAYOUT_NO_SCRIPT_INDEX ((unsigned int) 0xFFFF)
+#define HB_OT_LAYOUT_NO_FEATURE_INDEX ((unsigned int) 0xFFFF)
+#define HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX ((unsigned int) 0xFFFF)
+
+unsigned int
+hb_ot_layout_table_get_script_tags (hb_face_t *face,
+ hb_tag_t table_tag,
+ unsigned int start_offset,
+ unsigned int *script_count /* IN/OUT */,
+ hb_tag_t *script_tags /* OUT */);
+
+hb_bool_t
+hb_ot_layout_table_find_script (hb_face_t *face,
+ hb_tag_t table_tag,
+ hb_tag_t script_tag,
+ unsigned int *script_index);
+
+/* Like find_script, but takes zero-terminated array of scripts to test */
+hb_bool_t
+hb_ot_layout_table_choose_script (hb_face_t *face,
+ hb_tag_t table_tag,
+ const hb_tag_t *script_tags,
+ unsigned int *script_index,
+ hb_tag_t *chosen_script);
+
+unsigned int
+hb_ot_layout_table_get_feature_tags (hb_face_t *face,
+ hb_tag_t table_tag,
+ unsigned int start_offset,
+ unsigned int *feature_count /* IN/OUT */,
+ hb_tag_t *feature_tags /* OUT */);
+
+unsigned int
+hb_ot_layout_script_get_language_tags (hb_face_t *face,
+ hb_tag_t table_tag,
+ unsigned int script_index,
+ unsigned int start_offset,
+ unsigned int *language_count /* IN/OUT */,
+ hb_tag_t *language_tags /* OUT */);
+
+hb_bool_t
+hb_ot_layout_script_find_language (hb_face_t *face,
+ hb_tag_t table_tag,
+ unsigned int script_index,
+ hb_tag_t language_tag,
+ unsigned int *language_index);
+
+hb_bool_t
+hb_ot_layout_language_get_required_feature_index (hb_face_t *face,
+ hb_tag_t table_tag,
+ unsigned int script_index,
+ unsigned int language_index,
+ unsigned int *feature_index);
+
+unsigned int
+hb_ot_layout_language_get_feature_indexes (hb_face_t *face,
+ hb_tag_t table_tag,
+ unsigned int script_index,
+ unsigned int language_index,
+ unsigned int start_offset,
+ unsigned int *feature_count /* IN/OUT */,
+ unsigned int *feature_indexes /* OUT */);
+
+unsigned int
+hb_ot_layout_language_get_feature_tags (hb_face_t *face,
+ hb_tag_t table_tag,
+ unsigned int script_index,
+ unsigned int language_index,
+ unsigned int start_offset,
+ unsigned int *feature_count /* IN/OUT */,
+ hb_tag_t *feature_tags /* OUT */);
+
+hb_bool_t
+hb_ot_layout_language_find_feature (hb_face_t *face,
+ hb_tag_t table_tag,
+ unsigned int script_index,
+ unsigned int language_index,
+ hb_tag_t feature_tag,
+ unsigned int *feature_index);
+
+unsigned int
+hb_ot_layout_feature_get_lookup_indexes (hb_face_t *face,
+ hb_tag_t table_tag,
+ unsigned int feature_index,
+ unsigned int start_offset,
+ unsigned int *lookup_count /* IN/OUT */,
+ unsigned int *lookup_indexes /* OUT */);
+
+
+/*
+ * GSUB
+ */
+
+hb_bool_t
+hb_ot_layout_has_substitution (hb_face_t *face);
+
+hb_bool_t
+hb_ot_layout_would_substitute_lookup (hb_face_t *face,
+ const hb_codepoint_t *glyphs,
+ unsigned int glyphs_length,
+ unsigned int lookup_index);
+
+void
+hb_ot_layout_substitute_closure_lookup (hb_face_t *face,
+ hb_set_t *glyphs,
+ unsigned int lookup_index);
+
+/*
+ * GPOS
+ */
+
+hb_bool_t
+hb_ot_layout_has_positioning (hb_face_t *face);
+
+
+HB_END_DECLS
+
+#endif /* HB_OT_LAYOUT_H */
diff --git a/src/hb-ot-map-private.hh b/src/hb-ot-map-private.hh
new file mode 100644
index 0000000..b9c6736
--- /dev/null
+++ b/src/hb-ot-map-private.hh
@@ -0,0 +1,198 @@
+/*
+ * Copyright © 2009,2010 Red Hat, Inc.
+ * Copyright © 2010,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.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OT_MAP_PRIVATE_HH
+#define HB_OT_MAP_PRIVATE_HH
+
+#include "hb-buffer-private.hh"
+
+#include "hb-ot-layout-private.hh"
+
+
+static const hb_tag_t table_tags[2] = {HB_OT_TAG_GSUB, HB_OT_TAG_GPOS};
+
+struct hb_ot_map_t
+{
+ friend struct hb_ot_map_builder_t;
+
+ public:
+
+ struct feature_map_t {
+ hb_tag_t tag; /* should be first for our bsearch to work */
+ unsigned int index[2]; /* GSUB/GPOS */
+ unsigned int stage[2]; /* GSUB/GPOS */
+ unsigned int shift;
+ hb_mask_t mask;
+ hb_mask_t _1_mask; /* mask for value=1, for quick access */
+
+ 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;
+ hb_mask_t mask;
+
+ static int cmp (const lookup_map_t *a, const lookup_map_t *b)
+ { return a->index < b->index ? -1 : a->index > b->index ? 1 : 0; }
+ };
+
+ typedef void (*pause_func_t) (const struct hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer);
+
+ struct pause_map_t {
+ unsigned int num_lookups; /* Cumulative */
+ pause_func_t callback;
+ };
+
+
+ hb_ot_map_t (void) { memset (this, 0, sizeof (*this)); }
+
+ inline hb_mask_t get_global_mask (void) const { return global_mask; }
+
+ inline hb_mask_t get_mask (hb_tag_t feature_tag, unsigned int *shift = NULL) const {
+ const feature_map_t *map = features.bsearch (&feature_tag);
+ if (shift) *shift = map ? map->shift : 0;
+ return map ? map->mask : 0;
+ }
+
+ inline hb_mask_t get_1_mask (hb_tag_t feature_tag) const {
+ const feature_map_t *map = features.bsearch (&feature_tag);
+ return map ? map->_1_mask : 0;
+ }
+
+ inline unsigned int get_feature_index (unsigned int table_index, hb_tag_t feature_tag) const {
+ const feature_map_t *map = features.bsearch (&feature_tag);
+ return map ? map->index[table_index] : HB_OT_LAYOUT_NO_FEATURE_INDEX;
+ }
+
+ inline unsigned int get_feature_stage (unsigned int table_index, hb_tag_t feature_tag) const {
+ const feature_map_t *map = features.bsearch (&feature_tag);
+ return map ? map->stage[table_index] : (unsigned int) -1;
+ }
+
+ inline void get_stage_lookups (unsigned int table_index, unsigned int stage,
+ const struct lookup_map_t **plookups, unsigned int *lookup_count) const {
+ if (unlikely (stage == (unsigned int) -1)) {
+ *plookups = NULL;
+ *lookup_count = 0;
+ return;
+ }
+ assert (stage <= pauses[table_index].len);
+ unsigned int start = stage ? pauses[table_index][stage - 1].num_lookups : 0;
+ unsigned int end = stage < pauses[table_index].len ? pauses[table_index][stage].num_lookups : lookups[table_index].len;
+ *plookups = &lookups[table_index][start];
+ *lookup_count = end - start;
+ }
+
+ inline hb_tag_t get_chosen_script (unsigned int table_index) const
+ { return chosen_script[table_index]; }
+
+ HB_INTERNAL void substitute_closure (const struct hb_ot_shape_plan_t *plan, hb_face_t *face, hb_set_t *glyphs) const;
+ HB_INTERNAL void substitute (const struct hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) const;
+ HB_INTERNAL void position (const struct hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) const;
+
+ inline void finish (void) {
+ features.finish ();
+ lookups[0].finish ();
+ lookups[1].finish ();
+ pauses[0].finish ();
+ pauses[1].finish ();
+ }
+
+
+ private:
+
+ HB_INTERNAL void add_lookups (hb_face_t *face,
+ unsigned int table_index,
+ unsigned int feature_index,
+ hb_mask_t mask);
+
+ hb_mask_t global_mask;
+
+ hb_tag_t chosen_script[2];
+ hb_prealloced_array_t<feature_map_t, 8> features;
+ hb_prealloced_array_t<lookup_map_t, 32> lookups[2]; /* GSUB/GPOS */
+ hb_prealloced_array_t<pause_map_t, 1> pauses[2]; /* GSUB/GPOS */
+};
+
+
+struct hb_ot_map_builder_t
+{
+ public:
+
+ hb_ot_map_builder_t (void) { memset (this, 0, sizeof (*this)); }
+
+ HB_INTERNAL void add_feature (hb_tag_t tag, unsigned int value, bool global);
+
+ inline void add_bool_feature (hb_tag_t tag, bool global = true)
+ { add_feature (tag, 1, global); }
+
+ inline void add_gsub_pause (hb_ot_map_t::pause_func_t pause_func)
+ { add_pause (0, pause_func); }
+ inline void add_gpos_pause (hb_ot_map_t::pause_func_t pause_func)
+ { add_pause (1, pause_func); }
+
+ HB_INTERNAL void compile (hb_face_t *face,
+ const hb_segment_properties_t *props,
+ struct hb_ot_map_t &m);
+
+ inline void finish (void) {
+ feature_infos.finish ();
+ pauses[0].finish ();
+ pauses[1].finish ();
+ }
+
+ private:
+
+ struct feature_info_t {
+ hb_tag_t tag;
+ unsigned int seq; /* sequence#, used for stable sorting only */
+ unsigned int max_value;
+ bool global; /* whether the feature applies value to every glyph in the buffer */
+ unsigned int default_value; /* for non-global features, what should the unset glyphs take */
+ unsigned int stage[2]; /* GSUB/GPOS */
+
+ static int cmp (const feature_info_t *a, const feature_info_t *b)
+ { return (a->tag != b->tag) ? (a->tag < b->tag ? -1 : 1) : (a->seq < b->seq ? -1 : 1); }
+ };
+
+ struct pause_info_t {
+ unsigned int stage;
+ hb_ot_map_t::pause_func_t callback;
+ };
+
+ HB_INTERNAL void add_pause (unsigned int table_index, hb_ot_map_t::pause_func_t pause_func);
+
+ unsigned int current_stage[2]; /* GSUB/GPOS */
+ hb_prealloced_array_t<feature_info_t,16> feature_infos;
+ hb_prealloced_array_t<pause_info_t, 1> pauses[2]; /* GSUB/GPOS */
+};
+
+
+
+#endif /* HB_OT_MAP_PRIVATE_HH */
diff --git a/src/hb-ot-map.cc b/src/hb-ot-map.cc
new file mode 100644
index 0000000..7eed624
--- /dev/null
+++ b/src/hb-ot-map.cc
@@ -0,0 +1,301 @@
+/*
+ * Copyright © 2009,2010 Red Hat, Inc.
+ * Copyright © 2010,2011 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-ot-map-private.hh"
+
+
+void
+hb_ot_map_t::add_lookups (hb_face_t *face,
+ unsigned int table_index,
+ unsigned int feature_index,
+ hb_mask_t mask)
+{
+ unsigned int lookup_indices[32];
+ unsigned int offset, len;
+
+ offset = 0;
+ do {
+ len = ARRAY_LENGTH (lookup_indices);
+ hb_ot_layout_feature_get_lookup_indexes (face,
+ table_tags[table_index],
+ feature_index,
+ offset, &len,
+ lookup_indices);
+
+ for (unsigned int i = 0; i < len; i++) {
+ hb_ot_map_t::lookup_map_t *lookup = lookups[table_index].push ();
+ if (unlikely (!lookup))
+ return;
+ lookup->mask = mask;
+ lookup->index = lookup_indices[i];
+ }
+
+ offset += len;
+ } while (len == ARRAY_LENGTH (lookup_indices));
+}
+
+
+void hb_ot_map_builder_t::add_feature (hb_tag_t tag, unsigned int value, bool global)
+{
+ 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->default_value = global ? value : 0;
+ info->stage[0] = current_stage[0];
+ info->stage[1] = current_stage[1];
+}
+
+/* Keep the next two functions in sync. */
+
+void hb_ot_map_t::substitute (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) const
+{
+ const unsigned int table_index = 0;
+ unsigned int i = 0;
+
+ 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);
+
+ buffer->clear_output ();
+
+ if (pause->callback)
+ pause->callback (plan, font, buffer);
+ }
+
+ for (; i < lookups[table_index].len; i++)
+ hb_ot_layout_substitute_lookup (font, buffer, lookups[table_index][i].index, lookups[table_index][i].mask);
+}
+
+void hb_ot_map_t::position (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) const
+{
+ const unsigned int table_index = 1;
+ unsigned int i = 0;
+
+ 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);
+
+ 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);
+}
+
+void hb_ot_map_t::substitute_closure (const hb_ot_shape_plan_t *plan, hb_face_t *face, hb_set_t *glyphs) const
+{
+ unsigned int table_index = 0;
+ unsigned int i = 0;
+
+ 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_closure_lookup (face, glyphs, lookups[table_index][i].index);
+ }
+
+ for (; i < lookups[table_index].len; i++)
+ hb_ot_layout_substitute_closure_lookup (face, glyphs, lookups[table_index][i].index);
+}
+
+void hb_ot_map_builder_t::add_pause (unsigned int table_index, hb_ot_map_t::pause_func_t pause_func)
+{
+ pause_info_t *p = pauses[table_index].push ();
+ if (likely (p)) {
+ p->stage = current_stage[table_index];
+ p->callback = pause_func;
+ }
+
+ current_stage[table_index]++;
+}
+
+void
+hb_ot_map_builder_t::compile (hb_face_t *face,
+ const hb_segment_properties_t *props,
+ hb_ot_map_t &m)
+{
+ m.global_mask = 1;
+
+ if (!feature_infos.len)
+ return;
+
+
+ /* Fetch script/language indices for GSUB/GPOS. We need these later to skip
+ * features not available in either table and not waste precious bits for them. */
+
+ hb_tag_t script_tags[3] = {HB_TAG_NONE};
+ hb_tag_t language_tag;
+
+ hb_ot_tags_from_script (props->script, &script_tags[0], &script_tags[1]);
+ language_tag = hb_ot_tag_from_language (props->language);
+
+ unsigned int script_index[2], language_index[2];
+ for (unsigned int table_index = 0; table_index < 2; table_index++) {
+ hb_tag_t table_tag = table_tags[table_index];
+ hb_ot_layout_table_choose_script (face, table_tag, script_tags, &script_index[table_index], &m.chosen_script[table_index]);
+ hb_ot_layout_script_find_language (face, table_tag, script_index[table_index], language_tag, &language_index[table_index]);
+ }
+
+
+ /* Sort features and merge duplicates */
+ {
+ feature_infos.sort ();
+ unsigned int j = 0;
+ for (unsigned int i = 1; i < feature_infos.len; i++)
+ 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;
+ 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].max_value = MAX (feature_infos[j].max_value, feature_infos[i].max_value);
+ }
+ 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);
+ }
+
+
+ /* Allocate bits now */
+ unsigned int next_bit = 1;
+ for (unsigned int i = 0; i < feature_infos.len; i++) {
+ const feature_info_t *info = &feature_infos[i];
+
+ unsigned int bits_needed;
+
+ if (info->global && info->max_value == 1)
+ /* Uses the global bit */
+ bits_needed = 0;
+ else
+ bits_needed = _hb_bit_storage (info->max_value);
+
+ if (!info->max_value || next_bit + bits_needed > 8 * sizeof (hb_mask_t))
+ continue; /* Feature disabled, or not enough bits. */
+
+
+ bool found = false;
+ unsigned int feature_index[2];
+ for (unsigned int table_index = 0; table_index < 2; table_index++)
+ found |= hb_ot_layout_language_find_feature (face,
+ table_tags[table_index],
+ script_index[table_index],
+ language_index[table_index],
+ info->tag,
+ &feature_index[table_index]);
+ if (!found)
+ continue;
+
+
+ hb_ot_map_t::feature_map_t *map = m.features.push ();
+ if (unlikely (!map))
+ break;
+
+ map->tag = info->tag;
+ map->index[0] = feature_index[0];
+ 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) {
+ /* Uses the global bit */
+ map->shift = 0;
+ map->mask = 1;
+ } else {
+ 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;
+ }
+ map->_1_mask = (1 << map->shift) & map->mask;
+
+ }
+ feature_infos.shrink (0); /* Done with these */
+
+
+ add_gsub_pause (NULL);
+ add_gpos_pause (NULL);
+
+ for (unsigned int table_index = 0; table_index < 2; table_index++) {
+ hb_tag_t table_tag = table_tags[table_index];
+
+ /* Collect lookup indices for features */
+
+ unsigned int required_feature_index;
+ if (hb_ot_layout_language_get_required_feature_index (face,
+ table_tag,
+ script_index[table_index],
+ language_index[table_index],
+ &required_feature_index))
+ m.add_lookups (face, table_index, required_feature_index, 1);
+
+ unsigned int pause_index = 0;
+ unsigned int last_num_lookups = 0;
+ for (unsigned stage = 0; stage < current_stage[table_index]; stage++)
+ {
+ 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);
+
+ /* Sort lookups and merge duplicates */
+ if (last_num_lookups < m.lookups[table_index].len)
+ {
+ m.lookups[table_index].sort (last_num_lookups, m.lookups[table_index].len);
+
+ unsigned int j = last_num_lookups;
+ for (unsigned int i = j + 1; i < m.lookups[table_index].len; i++)
+ 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].shrink (j + 1);
+ }
+
+ last_num_lookups = m.lookups[table_index].len;
+
+ if (pause_index < pauses[table_index].len && pauses[table_index][pause_index].stage == stage) {
+ hb_ot_map_t::pause_map_t *pause_map = m.pauses[table_index].push ();
+ if (likely (pause_map)) {
+ pause_map->num_lookups = last_num_lookups;
+ pause_map->callback = pauses[table_index][pause_index].callback;
+ }
+
+ pause_index++;
+ }
+ }
+ }
+}
diff --git a/src/hb-ot-maxp-table.hh b/src/hb-ot-maxp-table.hh
new file mode 100644
index 0000000..c2c90d1
--- /dev/null
+++ b/src/hb-ot-maxp-table.hh
@@ -0,0 +1,65 @@
+/*
+ * 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_MAXP_TABLE_HH
+#define HB_OT_MAXP_TABLE_HH
+
+#include "hb-open-type-private.hh"
+
+
+
+/*
+ * maxp -- The Maximum Profile Table
+ */
+
+#define HB_OT_TAG_maxp HB_TAG('m','a','x','p')
+
+struct maxp
+{
+ static const hb_tag_t Tag = HB_OT_TAG_maxp;
+
+ inline unsigned int get_num_glyphs (void) const {
+ return numGlyphs;
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this) &&
+ likely (version.major == 1 || (version.major == 0 && version.minor == 0x5000)));
+ }
+
+ /* We only implement version 0.5 as none of the extra fields in version 1.0 are useful. */
+ protected:
+ FixedVersion version; /* Version of the maxp table (0.5 or 1.0),
+ * 0x00005000 or 0x00010000. */
+ USHORT numGlyphs; /* The number of glyphs in the font. */
+ public:
+ DEFINE_SIZE_STATIC (6);
+};
+
+
+
+#endif /* HB_OT_MAXP_TABLE_HH */
diff --git a/src/hb-ot-name-table.hh b/src/hb-ot-name-table.hh
new file mode 100644
index 0000000..e0d2e89
--- /dev/null
+++ b/src/hb-ot-name-table.hh
@@ -0,0 +1,128 @@
+/*
+ * 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_NAME_TABLE_HH
+#define HB_OT_NAME_TABLE_HH
+
+#include "hb-open-type-private.hh"
+
+
+
+/*
+ * name -- The Naming Table
+ */
+
+#define HB_OT_TAG_name HB_TAG('n','a','m','e')
+
+
+struct NameRecord
+{
+ static int cmp (const NameRecord *a, const NameRecord *b)
+ {
+ int ret;
+ ret = b->platformID.cmp (a->platformID);
+ if (ret) return ret;
+ ret = b->encodingID.cmp (a->encodingID);
+ if (ret) return ret;
+ ret = b->languageID.cmp (a->languageID);
+ if (ret) return ret;
+ ret = b->nameID.cmp (a->nameID);
+ if (ret) return ret;
+ return 0;
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c, void *base) {
+ TRACE_SANITIZE ();
+ /* We can check from base all the way up to the end of string... */
+ return TRACE_RETURN (c->check_struct (this) && c->check_range ((char *) base, (unsigned int) length + offset));
+ }
+
+ USHORT platformID; /* Platform ID. */
+ USHORT encodingID; /* Platform-specific encoding ID. */
+ USHORT languageID; /* Language ID. */
+ USHORT nameID; /* Name ID. */
+ USHORT length; /* String length (in bytes). */
+ USHORT offset; /* String offset from start of storage area (in bytes). */
+ public:
+ DEFINE_SIZE_STATIC (12);
+};
+
+struct name
+{
+ static const hb_tag_t Tag = HB_OT_TAG_name;
+
+ inline unsigned int get_name (unsigned int platform_id,
+ unsigned int encoding_id,
+ unsigned int language_id,
+ unsigned int name_id,
+ void *buffer,
+ unsigned int buffer_length) const
+ {
+ NameRecord key;
+ key.platformID.set (platform_id);
+ key.encodingID.set (encoding_id);
+ key.languageID.set (language_id);
+ key.nameID.set (name_id);
+ NameRecord *match = (NameRecord *) bsearch (&key, nameRecord, count, sizeof (nameRecord[0]), (hb_compare_func_t) NameRecord::cmp);
+
+ if (!match)
+ return 0;
+
+ unsigned int length = MIN (buffer_length, (unsigned int) match->length);
+ memcpy (buffer, (char *) this + stringOffset + match->offset, length);
+ return length;
+ }
+
+ inline bool sanitize_records (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ char *string_pool = (char *) this + stringOffset;
+ unsigned int _count = count;
+ for (unsigned int i = 0; i < _count; i++)
+ if (!nameRecord[i].sanitize (c, string_pool)) return TRACE_RETURN (false);
+ return TRACE_RETURN (true);
+ }
+
+ inline bool sanitize (hb_sanitize_context_t *c) {
+ TRACE_SANITIZE ();
+ return TRACE_RETURN (c->check_struct (this) &&
+ likely (format == 0 || format == 1) &&
+ c->check_array (nameRecord, nameRecord[0].static_size, count) &&
+ sanitize_records (c));
+ }
+
+ /* We only implement format 0 for now. */
+ protected:
+ USHORT format; /* Format selector (=0/1). */
+ USHORT count; /* Number of name records. */
+ Offset stringOffset; /* Offset to start of string storage (from start of table). */
+ NameRecord nameRecord[VAR]; /* The name records where count is the number of records. */
+ public:
+ DEFINE_SIZE_ARRAY (6, nameRecord);
+};
+
+
+
+#endif /* HB_OT_NAME_TABLE_HH */
diff --git a/src/hb-ot-shape-complex-arabic-table.hh b/src/hb-ot-shape-complex-arabic-table.hh
new file mode 100644
index 0000000..c66111b
--- /dev/null
+++ b/src/hb-ot-shape-complex-arabic-table.hh
@@ -0,0 +1,942 @@
+/* == Start of generated table == */
+/*
+ * The following table is generated by running:
+ *
+ * ./gen-arabic-table.py ArabicShaping.txt UnicodeData.txt
+ *
+ * on files with these headers:
+ *
+ * # ArabicShaping-6.1.0.txt
+ * # Date: 2011-04-15, 23:16:00 GMT [KW]
+ * UnicodeData.txt does not have a header.
+ */
+
+#ifndef HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH
+#define HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH
+
+
+static const uint8_t joining_table[] =
+{
+
+ /* Arabic Characters */
+
+ JOINING_TYPE_U, /* 0600; ARABIC NUMBER SIGN; U; No_Joining_Group */
+ JOINING_TYPE_U, /* 0601; ARABIC SIGN SANAH; U; No_Joining_Group */
+ JOINING_TYPE_U, /* 0602; ARABIC FOOTNOTE MARKER; U; No_Joining_Group */
+ JOINING_TYPE_U, /* 0603; ARABIC SIGN SAFHA; U; No_Joining_Group */
+ JOINING_TYPE_U, /* 0604; ARABIC SIGN SAMVAT; U; No_Joining_Group */
+ JOINING_TYPE_X, /* 0605 */
+ JOINING_TYPE_X, /* 0606 */
+ JOINING_TYPE_X, /* 0607 */
+ JOINING_TYPE_U, /* 0608; ARABIC RAY; U; No_Joining_Group */
+ JOINING_TYPE_X, /* 0609 */
+ JOINING_TYPE_X, /* 060A */
+ JOINING_TYPE_U, /* 060B; AFGHANI SIGN; U; No_Joining_Group */
+ JOINING_TYPE_X, /* 060C */
+ JOINING_TYPE_X, /* 060D */
+ JOINING_TYPE_X, /* 060E */
+ JOINING_TYPE_X, /* 060F */
+ JOINING_TYPE_X, /* 0610 */
+ JOINING_TYPE_X, /* 0611 */
+ JOINING_TYPE_X, /* 0612 */
+ JOINING_TYPE_X, /* 0613 */
+ JOINING_TYPE_X, /* 0614 */
+ JOINING_TYPE_X, /* 0615 */
+ JOINING_TYPE_X, /* 0616 */
+ JOINING_TYPE_X, /* 0617 */
+ JOINING_TYPE_X, /* 0618 */
+ JOINING_TYPE_X, /* 0619 */
+ JOINING_TYPE_X, /* 061A */
+ JOINING_TYPE_X, /* 061B */
+ JOINING_TYPE_X, /* 061C */
+ JOINING_TYPE_X, /* 061D */
+ JOINING_TYPE_X, /* 061E */
+ JOINING_TYPE_X, /* 061F */
+ JOINING_TYPE_D, /* 0620; DOTLESS YEH WITH SEPARATE RING BELOW; D; YEH */
+ JOINING_TYPE_U, /* 0621; HAMZA; U; No_Joining_Group */
+ JOINING_TYPE_R, /* 0622; ALEF WITH MADDA ABOVE; R; ALEF */
+ JOINING_TYPE_R, /* 0623; ALEF WITH HAMZA ABOVE; R; ALEF */
+ JOINING_TYPE_R, /* 0624; WAW WITH HAMZA ABOVE; R; WAW */
+ JOINING_TYPE_R, /* 0625; ALEF WITH HAMZA BELOW; R; ALEF */
+ JOINING_TYPE_D, /* 0626; DOTLESS YEH WITH HAMZA ABOVE; D; YEH */
+ JOINING_TYPE_R, /* 0627; ALEF; R; ALEF */
+ JOINING_TYPE_D, /* 0628; BEH; D; BEH */
+ JOINING_TYPE_R, /* 0629; TEH MARBUTA; R; TEH MARBUTA */
+ JOINING_TYPE_D, /* 062A; DOTLESS BEH WITH 2 DOTS ABOVE; D; BEH */
+ JOINING_TYPE_D, /* 062B; DOTLESS BEH WITH 3 DOTS ABOVE; D; BEH */
+ JOINING_TYPE_D, /* 062C; HAH WITH DOT BELOW; D; HAH */
+ JOINING_TYPE_D, /* 062D; HAH; D; HAH */
+ JOINING_TYPE_D, /* 062E; HAH WITH DOT ABOVE; D; HAH */
+ JOINING_TYPE_R, /* 062F; DAL; R; DAL */
+ JOINING_TYPE_R, /* 0630; DAL WITH DOT ABOVE; R; DAL */
+ JOINING_TYPE_R, /* 0631; REH; R; REH */
+ JOINING_TYPE_R, /* 0632; REH WITH DOT ABOVE; R; REH */
+ JOINING_TYPE_D, /* 0633; SEEN; D; SEEN */
+ JOINING_TYPE_D, /* 0634; SEEN WITH 3 DOTS ABOVE; D; SEEN */
+ JOINING_TYPE_D, /* 0635; SAD; D; SAD */
+ JOINING_TYPE_D, /* 0636; SAD WITH DOT ABOVE; D; SAD */
+ JOINING_TYPE_D, /* 0637; TAH; D; TAH */
+ JOINING_TYPE_D, /* 0638; TAH WITH DOT ABOVE; D; TAH */
+ JOINING_TYPE_D, /* 0639; AIN; D; AIN */
+ JOINING_TYPE_D, /* 063A; AIN WITH DOT ABOVE; D; AIN */
+ JOINING_TYPE_D, /* 063B; KEHEH WITH 2 DOTS ABOVE; D; GAF */
+ JOINING_TYPE_D, /* 063C; KEHEH WITH 3 DOTS BELOW; D; GAF */
+ JOINING_TYPE_D, /* 063D; FARSI YEH WITH INVERTED V ABOVE; D; FARSI YEH */
+ JOINING_TYPE_D, /* 063E; FARSI YEH WITH 2 DOTS ABOVE; D; FARSI YEH */
+ JOINING_TYPE_D, /* 063F; FARSI YEH WITH 3 DOTS ABOVE; D; FARSI YEH */
+ JOINING_TYPE_C, /* 0640; TATWEEL; C; No_Joining_Group */
+ JOINING_TYPE_D, /* 0641; FEH; D; FEH */
+ JOINING_TYPE_D, /* 0642; QAF; D; QAF */
+ JOINING_TYPE_D, /* 0643; KAF; D; KAF */
+ JOINING_TYPE_D, /* 0644; LAM; D; LAM */
+ JOINING_TYPE_D, /* 0645; MEEM; D; MEEM */
+ JOINING_TYPE_D, /* 0646; NOON; D; NOON */
+ JOINING_TYPE_D, /* 0647; HEH; D; HEH */
+ JOINING_TYPE_R, /* 0648; WAW; R; WAW */
+ JOINING_TYPE_D, /* 0649; DOTLESS YEH; D; YEH */
+ JOINING_TYPE_D, /* 064A; YEH; D; YEH */
+ JOINING_TYPE_X, /* 064B */
+ JOINING_TYPE_X, /* 064C */
+ JOINING_TYPE_X, /* 064D */
+ JOINING_TYPE_X, /* 064E */
+ JOINING_TYPE_X, /* 064F */
+ JOINING_TYPE_X, /* 0650 */
+ JOINING_TYPE_X, /* 0651 */
+ JOINING_TYPE_X, /* 0652 */
+ JOINING_TYPE_X, /* 0653 */
+ JOINING_TYPE_X, /* 0654 */
+ JOINING_TYPE_X, /* 0655 */
+ JOINING_TYPE_X, /* 0656 */
+ JOINING_TYPE_X, /* 0657 */
+ JOINING_TYPE_X, /* 0658 */
+ JOINING_TYPE_X, /* 0659 */
+ JOINING_TYPE_X, /* 065A */
+ JOINING_TYPE_X, /* 065B */
+ JOINING_TYPE_X, /* 065C */
+ JOINING_TYPE_X, /* 065D */
+ JOINING_TYPE_X, /* 065E */
+ JOINING_TYPE_X, /* 065F */
+ JOINING_TYPE_X, /* 0660 */
+ JOINING_TYPE_X, /* 0661 */
+ JOINING_TYPE_X, /* 0662 */
+ JOINING_TYPE_X, /* 0663 */
+ JOINING_TYPE_X, /* 0664 */
+ JOINING_TYPE_X, /* 0665 */
+ JOINING_TYPE_X, /* 0666 */
+ JOINING_TYPE_X, /* 0667 */
+ JOINING_TYPE_X, /* 0668 */
+ JOINING_TYPE_X, /* 0669 */
+ JOINING_TYPE_X, /* 066A */
+ JOINING_TYPE_X, /* 066B */
+ JOINING_TYPE_X, /* 066C */
+ JOINING_TYPE_X, /* 066D */
+ JOINING_TYPE_D, /* 066E; DOTLESS BEH; D; BEH */
+ JOINING_TYPE_D, /* 066F; DOTLESS QAF; D; QAF */
+ JOINING_TYPE_X, /* 0670 */
+ JOINING_TYPE_R, /* 0671; ALEF WITH WASLA ABOVE; R; ALEF */
+ JOINING_TYPE_R, /* 0672; ALEF WITH WAVY HAMZA ABOVE; R; ALEF */
+ JOINING_TYPE_R, /* 0673; ALEF WITH WAVY HAMZA BELOW; R; ALEF */
+ JOINING_TYPE_U, /* 0674; HIGH HAMZA; U; No_Joining_Group */
+ JOINING_TYPE_R, /* 0675; HIGH HAMZA ALEF; R; ALEF */
+ JOINING_TYPE_R, /* 0676; HIGH HAMZA WAW; R; WAW */
+ JOINING_TYPE_R, /* 0677; HIGH HAMZA WAW WITH DAMMA ABOVE; R; WAW */
+ JOINING_TYPE_D, /* 0678; HIGH HAMZA DOTLESS YEH; D; YEH */
+ JOINING_TYPE_D, /* 0679; DOTLESS BEH WITH TAH ABOVE; D; BEH */
+ JOINING_TYPE_D, /* 067A; DOTLESS BEH WITH VERTICAL 2 DOTS ABOVE; D; BEH */
+ JOINING_TYPE_D, /* 067B; DOTLESS BEH WITH VERTICAL 2 DOTS BELOW; D; BEH */
+ JOINING_TYPE_D, /* 067C; DOTLESS BEH WITH ATTACHED RING BELOW AND 2 DOTS ABOVE; D; BEH */
+ JOINING_TYPE_D, /* 067D; DOTLESS BEH WITH INVERTED 3 DOTS ABOVE; D; BEH */
+ JOINING_TYPE_D, /* 067E; DOTLESS BEH WITH 3 DOTS BELOW; D; BEH */
+ JOINING_TYPE_D, /* 067F; DOTLESS BEH WITH 4 DOTS ABOVE; D; BEH */
+ JOINING_TYPE_D, /* 0680; DOTLESS BEH WITH 4 DOTS BELOW; D; BEH */
+ JOINING_TYPE_D, /* 0681; HAH WITH HAMZA ABOVE; D; HAH */
+ JOINING_TYPE_D, /* 0682; HAH WITH VERTICAL 2 DOTS ABOVE; D; HAH */
+ JOINING_TYPE_D, /* 0683; HAH WITH 2 DOTS BELOW; D; HAH */
+ JOINING_TYPE_D, /* 0684; HAH WITH VERTICAL 2 DOTS BELOW; D; HAH */
+ JOINING_TYPE_D, /* 0685; HAH WITH 3 DOTS ABOVE; D; HAH */
+ JOINING_TYPE_D, /* 0686; HAH WITH 3 DOTS BELOW; D; HAH */
+ JOINING_TYPE_D, /* 0687; HAH WITH 4 DOTS BELOW; D; HAH */
+ JOINING_TYPE_R, /* 0688; DAL WITH TAH ABOVE; R; DAL */
+ JOINING_TYPE_R, /* 0689; DAL WITH ATTACHED RING BELOW; R; DAL */
+ JOINING_TYPE_R, /* 068A; DAL WITH DOT BELOW; R; DAL */
+ JOINING_TYPE_R, /* 068B; DAL WITH DOT BELOW AND TAH ABOVE; R; DAL */
+ JOINING_TYPE_R, /* 068C; DAL WITH 2 DOTS ABOVE; R; DAL */
+ JOINING_TYPE_R, /* 068D; DAL WITH 2 DOTS BELOW; R; DAL */
+ JOINING_TYPE_R, /* 068E; DAL WITH 3 DOTS ABOVE; R; DAL */
+ JOINING_TYPE_R, /* 068F; DAL WITH INVERTED 3 DOTS ABOVE; R; DAL */
+ JOINING_TYPE_R, /* 0690; DAL WITH 4 DOTS ABOVE; R; DAL */
+ JOINING_TYPE_R, /* 0691; REH WITH TAH ABOVE; R; REH */
+ JOINING_TYPE_R, /* 0692; REH WITH V ABOVE; R; REH */
+ JOINING_TYPE_R, /* 0693; REH WITH ATTACHED RING BELOW; R; REH */
+ JOINING_TYPE_R, /* 0694; REH WITH DOT BELOW; R; REH */
+ JOINING_TYPE_R, /* 0695; REH WITH V BELOW; R; REH */
+ JOINING_TYPE_R, /* 0696; REH WITH DOT BELOW AND DOT WITHIN; R; REH */
+ JOINING_TYPE_R, /* 0697; REH WITH 2 DOTS ABOVE; R; REH */
+ JOINING_TYPE_R, /* 0698; REH WITH 3 DOTS ABOVE; R; REH */
+ JOINING_TYPE_R, /* 0699; REH WITH 4 DOTS ABOVE; R; REH */
+ JOINING_TYPE_D, /* 069A; SEEN WITH DOT BELOW AND DOT ABOVE; D; SEEN */
+ JOINING_TYPE_D, /* 069B; SEEN WITH 3 DOTS BELOW; D; SEEN */
+ JOINING_TYPE_D, /* 069C; SEEN WITH 3 DOTS BELOW AND 3 DOTS ABOVE; D; SEEN */
+ JOINING_TYPE_D, /* 069D; SAD WITH 2 DOTS BELOW; D; SAD */
+ JOINING_TYPE_D, /* 069E; SAD WITH 3 DOTS ABOVE; D; SAD */
+ JOINING_TYPE_D, /* 069F; TAH WITH 3 DOTS ABOVE; D; TAH */
+ JOINING_TYPE_D, /* 06A0; AIN WITH 3 DOTS ABOVE; D; AIN */
+ JOINING_TYPE_D, /* 06A1; DOTLESS FEH; D; FEH */
+ JOINING_TYPE_D, /* 06A2; DOTLESS FEH WITH DOT BELOW; D; FEH */
+ JOINING_TYPE_D, /* 06A3; FEH WITH DOT BELOW; D; FEH */
+ JOINING_TYPE_D, /* 06A4; DOTLESS FEH WITH 3 DOTS ABOVE; D; FEH */
+ JOINING_TYPE_D, /* 06A5; DOTLESS FEH WITH 3 DOTS BELOW; D; FEH */
+ JOINING_TYPE_D, /* 06A6; DOTLESS FEH WITH 4 DOTS ABOVE; D; FEH */
+ JOINING_TYPE_D, /* 06A7; DOTLESS QAF WITH DOT ABOVE; D; QAF */
+ JOINING_TYPE_D, /* 06A8; DOTLESS QAF WITH 3 DOTS ABOVE; D; QAF */
+ JOINING_TYPE_D, /* 06A9; KEHEH; D; GAF */
+ JOINING_TYPE_D, /* 06AA; SWASH KAF; D; SWASH KAF */
+ JOINING_TYPE_D, /* 06AB; KEHEH WITH ATTACHED RING BELOW; D; GAF */
+ JOINING_TYPE_D, /* 06AC; KAF WITH DOT ABOVE; D; KAF */
+ JOINING_TYPE_D, /* 06AD; KAF WITH 3 DOTS ABOVE; D; KAF */
+ JOINING_TYPE_D, /* 06AE; KAF WITH 3 DOTS BELOW; D; KAF */
+ JOINING_TYPE_D, /* 06AF; GAF; D; GAF */
+ JOINING_TYPE_D, /* 06B0; GAF WITH ATTACHED RING BELOW; D; GAF */
+ JOINING_TYPE_D, /* 06B1; GAF WITH 2 DOTS ABOVE; D; GAF */
+ JOINING_TYPE_D, /* 06B2; GAF WITH 2 DOTS BELOW; D; GAF */
+ JOINING_TYPE_D, /* 06B3; GAF WITH VERTICAL 2 DOTS BELOW; D; GAF */
+ JOINING_TYPE_D, /* 06B4; GAF WITH 3 DOTS ABOVE; D; GAF */
+ JOINING_TYPE_D, /* 06B5; LAM WITH V ABOVE; D; LAM */
+ JOINING_TYPE_D, /* 06B6; LAM WITH DOT ABOVE; D; LAM */
+ JOINING_TYPE_D, /* 06B7; LAM WITH 3 DOTS ABOVE; D; LAM */
+ JOINING_TYPE_D, /* 06B8; LAM WITH 3 DOTS BELOW; D; LAM */
+ JOINING_TYPE_D, /* 06B9; NOON WITH DOT BELOW; D; NOON */
+ JOINING_TYPE_D, /* 06BA; DOTLESS NOON; D; NOON */
+ JOINING_TYPE_D, /* 06BB; DOTLESS NOON WITH TAH ABOVE; D; NOON */
+ JOINING_TYPE_D, /* 06BC; NOON WITH ATTACHED RING BELOW; D; NOON */
+ JOINING_TYPE_D, /* 06BD; NYA; D; NYA */
+ JOINING_TYPE_D, /* 06BE; KNOTTED HEH; D; KNOTTED HEH */
+ JOINING_TYPE_D, /* 06BF; HAH WITH 3 DOTS BELOW AND DOT ABOVE; D; HAH */
+ JOINING_TYPE_R, /* 06C0; DOTLESS TEH MARBUTA WITH HAMZA ABOVE; R; TEH MARBUTA */
+ JOINING_TYPE_D, /* 06C1; HEH GOAL; D; HEH GOAL */
+ JOINING_TYPE_D, /* 06C2; HEH GOAL WITH HAMZA ABOVE; D; HEH GOAL */
+ JOINING_TYPE_R, /* 06C3; TEH MARBUTA GOAL; R; TEH MARBUTA GOAL */
+ JOINING_TYPE_R, /* 06C4; WAW WITH ATTACHED RING WITHIN; R; WAW */
+ JOINING_TYPE_R, /* 06C5; WAW WITH BAR; R; WAW */
+ JOINING_TYPE_R, /* 06C6; WAW WITH V ABOVE; R; WAW */
+ JOINING_TYPE_R, /* 06C7; WAW WITH DAMMA ABOVE; R; WAW */
+ JOINING_TYPE_R, /* 06C8; WAW WITH ALEF ABOVE; R; WAW */
+ JOINING_TYPE_R, /* 06C9; WAW WITH INVERTED V ABOVE; R; WAW */
+ JOINING_TYPE_R, /* 06CA; WAW WITH 2 DOTS ABOVE; R; WAW */
+ JOINING_TYPE_R, /* 06CB; WAW WITH 3 DOTS ABOVE; R; WAW */
+ JOINING_TYPE_D, /* 06CC; FARSI YEH; D; FARSI YEH */
+ JOINING_TYPE_R, /* 06CD; YEH WITH TAIL; R; YEH WITH TAIL */
+ JOINING_TYPE_D, /* 06CE; FARSI YEH WITH V ABOVE; D; FARSI YEH */
+ JOINING_TYPE_R, /* 06CF; WAW WITH DOT ABOVE; R; WAW */
+ JOINING_TYPE_D, /* 06D0; DOTLESS YEH WITH VERTICAL 2 DOTS BELOW; D; YEH */
+ JOINING_TYPE_D, /* 06D1; DOTLESS YEH WITH 3 DOTS BELOW; D; YEH */
+ JOINING_TYPE_R, /* 06D2; YEH BARREE; R; YEH BARREE */
+ JOINING_TYPE_R, /* 06D3; YEH BARREE WITH HAMZA ABOVE; R; YEH BARREE */
+ JOINING_TYPE_X, /* 06D4 */
+ JOINING_TYPE_R, /* 06D5; DOTLESS TEH MARBUTA; R; TEH MARBUTA */
+ JOINING_TYPE_X, /* 06D6 */
+ JOINING_TYPE_X, /* 06D7 */
+ JOINING_TYPE_X, /* 06D8 */
+ JOINING_TYPE_X, /* 06D9 */
+ JOINING_TYPE_X, /* 06DA */
+ JOINING_TYPE_X, /* 06DB */
+ JOINING_TYPE_X, /* 06DC */
+ JOINING_TYPE_U, /* 06DD; ARABIC END OF AYAH; U; No_Joining_Group */
+ JOINING_TYPE_X, /* 06DE */
+ JOINING_TYPE_X, /* 06DF */
+ JOINING_TYPE_X, /* 06E0 */
+ JOINING_TYPE_X, /* 06E1 */
+ JOINING_TYPE_X, /* 06E2 */
+ JOINING_TYPE_X, /* 06E3 */
+ JOINING_TYPE_X, /* 06E4 */
+ JOINING_TYPE_X, /* 06E5 */
+ JOINING_TYPE_X, /* 06E6 */
+ JOINING_TYPE_X, /* 06E7 */
+ JOINING_TYPE_X, /* 06E8 */
+ JOINING_TYPE_X, /* 06E9 */
+ JOINING_TYPE_X, /* 06EA */
+ JOINING_TYPE_X, /* 06EB */
+ JOINING_TYPE_X, /* 06EC */
+ JOINING_TYPE_X, /* 06ED */
+ JOINING_TYPE_R, /* 06EE; DAL WITH INVERTED V ABOVE; R; DAL */
+ JOINING_TYPE_R, /* 06EF; REH WITH INVERTED V ABOVE; R; REH */
+ JOINING_TYPE_X, /* 06F0 */
+ JOINING_TYPE_X, /* 06F1 */
+ JOINING_TYPE_X, /* 06F2 */
+ JOINING_TYPE_X, /* 06F3 */
+ JOINING_TYPE_X, /* 06F4 */
+ JOINING_TYPE_X, /* 06F5 */
+ JOINING_TYPE_X, /* 06F6 */
+ JOINING_TYPE_X, /* 06F7 */
+ JOINING_TYPE_X, /* 06F8 */
+ JOINING_TYPE_X, /* 06F9 */
+ JOINING_TYPE_D, /* 06FA; SEEN WITH DOT BELOW AND 3 DOTS ABOVE; D; SEEN */
+ JOINING_TYPE_D, /* 06FB; SAD WITH DOT BELOW AND DOT ABOVE; D; SAD */
+ JOINING_TYPE_D, /* 06FC; AIN WITH DOT BELOW AND DOT ABOVE; D; AIN */
+ JOINING_TYPE_X, /* 06FD */
+ JOINING_TYPE_X, /* 06FE */
+ JOINING_TYPE_D, /* 06FF; KNOTTED HEH WITH INVERTED V ABOVE; D; KNOTTED HEH */
+
+ /* Syriac Characters */
+
+ JOINING_TYPE_X, /* 0700 */
+ JOINING_TYPE_X, /* 0701 */
+ JOINING_TYPE_X, /* 0702 */
+ JOINING_TYPE_X, /* 0703 */
+ JOINING_TYPE_X, /* 0704 */
+ JOINING_TYPE_X, /* 0705 */
+ JOINING_TYPE_X, /* 0706 */
+ JOINING_TYPE_X, /* 0707 */
+ JOINING_TYPE_X, /* 0708 */
+ JOINING_TYPE_X, /* 0709 */
+ JOINING_TYPE_X, /* 070A */
+ JOINING_TYPE_X, /* 070B */
+ JOINING_TYPE_X, /* 070C */
+ JOINING_TYPE_X, /* 070D */
+ JOINING_TYPE_X, /* 070E */
+ JOINING_TYPE_X, /* 070F */
+ JOINING_GROUP_ALAPH, /* 0710; ALAPH; R; ALAPH */
+ JOINING_TYPE_X, /* 0711 */
+ JOINING_TYPE_D, /* 0712; BETH; D; BETH */
+ JOINING_TYPE_D, /* 0713; GAMAL; D; GAMAL */
+ JOINING_TYPE_D, /* 0714; GAMAL GARSHUNI; D; GAMAL */
+ JOINING_GROUP_DALATH_RISH, /* 0715; DALATH; R; DALATH RISH */
+ JOINING_GROUP_DALATH_RISH, /* 0716; DOTLESS DALATH RISH; R; DALATH RISH */
+ JOINING_TYPE_R, /* 0717; HE; R; HE */
+ JOINING_TYPE_R, /* 0718; WAW; R; SYRIAC WAW */
+ JOINING_TYPE_R, /* 0719; ZAIN; R; ZAIN */
+ JOINING_TYPE_D, /* 071A; HETH; D; HETH */
+ JOINING_TYPE_D, /* 071B; TETH; D; TETH */
+ JOINING_TYPE_D, /* 071C; TETH GARSHUNI; D; TETH */
+ JOINING_TYPE_D, /* 071D; YUDH; D; YUDH */
+ JOINING_TYPE_R, /* 071E; YUDH HE; R; YUDH HE */
+ JOINING_TYPE_D, /* 071F; KAPH; D; KAPH */
+ JOINING_TYPE_D, /* 0720; LAMADH; D; LAMADH */
+ JOINING_TYPE_D, /* 0721; MIM; D; MIM */
+ JOINING_TYPE_D, /* 0722; NUN; D; NUN */
+ JOINING_TYPE_D, /* 0723; SEMKATH; D; SEMKATH */
+ JOINING_TYPE_D, /* 0724; FINAL SEMKATH; D; FINAL SEMKATH */
+ JOINING_TYPE_D, /* 0725; E; D; E */
+ JOINING_TYPE_D, /* 0726; PE; D; PE */
+ JOINING_TYPE_D, /* 0727; REVERSED PE; D; REVERSED PE */
+ JOINING_TYPE_R, /* 0728; SADHE; R; SADHE */
+ JOINING_TYPE_D, /* 0729; QAPH; D; QAPH */
+ JOINING_GROUP_DALATH_RISH, /* 072A; RISH; R; DALATH RISH */
+ JOINING_TYPE_D, /* 072B; SHIN; D; SHIN */
+ JOINING_TYPE_R, /* 072C; TAW; R; TAW */
+ JOINING_TYPE_D, /* 072D; PERSIAN BHETH; D; BETH */
+ JOINING_TYPE_D, /* 072E; PERSIAN GHAMAL; D; GAMAL */
+ JOINING_GROUP_DALATH_RISH, /* 072F; PERSIAN DHALATH; R; DALATH RISH */
+ JOINING_TYPE_X, /* 0730 */
+ JOINING_TYPE_X, /* 0731 */
+ JOINING_TYPE_X, /* 0732 */
+ JOINING_TYPE_X, /* 0733 */
+ JOINING_TYPE_X, /* 0734 */
+ JOINING_TYPE_X, /* 0735 */
+ JOINING_TYPE_X, /* 0736 */
+ JOINING_TYPE_X, /* 0737 */
+ JOINING_TYPE_X, /* 0738 */
+ JOINING_TYPE_X, /* 0739 */
+ JOINING_TYPE_X, /* 073A */
+ JOINING_TYPE_X, /* 073B */
+ JOINING_TYPE_X, /* 073C */
+ JOINING_TYPE_X, /* 073D */
+ JOINING_TYPE_X, /* 073E */
+ JOINING_TYPE_X, /* 073F */
+ JOINING_TYPE_X, /* 0740 */
+ JOINING_TYPE_X, /* 0741 */
+ JOINING_TYPE_X, /* 0742 */
+ JOINING_TYPE_X, /* 0743 */
+ JOINING_TYPE_X, /* 0744 */
+ JOINING_TYPE_X, /* 0745 */
+ JOINING_TYPE_X, /* 0746 */
+ JOINING_TYPE_X, /* 0747 */
+ JOINING_TYPE_X, /* 0748 */
+ JOINING_TYPE_X, /* 0749 */
+ JOINING_TYPE_X, /* 074A */
+ JOINING_TYPE_X, /* 074B */
+ JOINING_TYPE_X, /* 074C */
+ JOINING_TYPE_R, /* 074D; SOGDIAN ZHAIN; R; ZHAIN */
+ JOINING_TYPE_D, /* 074E; SOGDIAN KHAPH; D; KHAPH */
+ JOINING_TYPE_D, /* 074F; SOGDIAN FE; D; FE */
+
+ /* Arabic Supplement Characters */
+
+ JOINING_TYPE_D, /* 0750; DOTLESS BEH WITH HORIZONTAL 3 DOTS BELOW; D; BEH */
+ JOINING_TYPE_D, /* 0751; BEH WITH 3 DOTS ABOVE; D; BEH */
+ JOINING_TYPE_D, /* 0752; DOTLESS BEH WITH INVERTED 3 DOTS BELOW; D; BEH */
+ JOINING_TYPE_D, /* 0753; DOTLESS BEH WITH INVERTED 3 DOTS BELOW AND 2 DOTS ABOVE; D; BEH */
+ JOINING_TYPE_D, /* 0754; DOTLESS BEH WITH 2 DOTS BELOW AND DOT ABOVE; D; BEH */
+ JOINING_TYPE_D, /* 0755; DOTLESS BEH WITH INVERTED V BELOW; D; BEH */
+ JOINING_TYPE_D, /* 0756; DOTLESS BEH WITH V ABOVE; D; BEH */
+ JOINING_TYPE_D, /* 0757; HAH WITH 2 DOTS ABOVE; D; HAH */
+ JOINING_TYPE_D, /* 0758; HAH WITH INVERTED 3 DOTS BELOW; D; HAH */
+ JOINING_TYPE_R, /* 0759; DAL WITH VERTICAL 2 DOTS BELOW AND TAH ABOVE; R; DAL */
+ JOINING_TYPE_R, /* 075A; DAL WITH INVERTED V BELOW; R; DAL */
+ JOINING_TYPE_R, /* 075B; REH WITH BAR; R; REH */
+ JOINING_TYPE_D, /* 075C; SEEN WITH 4 DOTS ABOVE; D; SEEN */
+ JOINING_TYPE_D, /* 075D; AIN WITH 2 DOTS ABOVE; D; AIN */
+ JOINING_TYPE_D, /* 075E; AIN WITH INVERTED 3 DOTS ABOVE; D; AIN */
+ JOINING_TYPE_D, /* 075F; AIN WITH VERTICAL 2 DOTS ABOVE; D; AIN */
+ JOINING_TYPE_D, /* 0760; DOTLESS FEH WITH 2 DOTS BELOW; D; FEH */
+ JOINING_TYPE_D, /* 0761; DOTLESS FEH WITH INVERTED 3 DOTS BELOW; D; FEH */
+ JOINING_TYPE_D, /* 0762; KEHEH WITH DOT ABOVE; D; GAF */
+ JOINING_TYPE_D, /* 0763; KEHEH WITH 3 DOTS ABOVE; D; GAF */
+ JOINING_TYPE_D, /* 0764; KEHEH WITH INVERTED 3 DOTS BELOW; D; GAF */
+ JOINING_TYPE_D, /* 0765; MEEM WITH DOT ABOVE; D; MEEM */
+ JOINING_TYPE_D, /* 0766; MEEM WITH DOT BELOW; D; MEEM */
+ JOINING_TYPE_D, /* 0767; NOON WITH 2 DOTS BELOW; D; NOON */
+ JOINING_TYPE_D, /* 0768; NOON WITH TAH ABOVE; D; NOON */
+ JOINING_TYPE_D, /* 0769; NOON WITH V ABOVE; D; NOON */
+ JOINING_TYPE_D, /* 076A; LAM WITH BAR; D; LAM */
+ JOINING_TYPE_R, /* 076B; REH WITH VERTICAL 2 DOTS ABOVE; R; REH */
+ JOINING_TYPE_R, /* 076C; REH WITH HAMZA ABOVE; R; REH */
+ JOINING_TYPE_D, /* 076D; SEEN WITH VERTICAL 2 DOTS ABOVE; D; SEEN */
+ JOINING_TYPE_D, /* 076E; HAH WITH TAH BELOW; D; HAH */
+ JOINING_TYPE_D, /* 076F; HAH WITH TAH AND 2 DOTS BELOW; D; HAH */
+ JOINING_TYPE_D, /* 0770; SEEN WITH 2 DOTS AND TAH ABOVE; D; SEEN */
+ JOINING_TYPE_R, /* 0771; REH WITH 2 DOTS AND TAH ABOVE; R; REH */
+ JOINING_TYPE_D, /* 0772; HAH WITH TAH ABOVE; D; HAH */
+ JOINING_TYPE_R, /* 0773; ALEF WITH DIGIT TWO ABOVE; R; ALEF */
+ JOINING_TYPE_R, /* 0774; ALEF WITH DIGIT THREE ABOVE; R; ALEF */
+ JOINING_TYPE_D, /* 0775; FARSI YEH WITH DIGIT TWO ABOVE; D; FARSI YEH */
+ JOINING_TYPE_D, /* 0776; FARSI YEH WITH DIGIT THREE ABOVE; D; FARSI YEH */
+ JOINING_TYPE_D, /* 0777; DOTLESS YEH WITH DIGIT FOUR BELOW; D; YEH */
+ JOINING_TYPE_R, /* 0778; WAW WITH DIGIT TWO ABOVE; R; WAW */
+ JOINING_TYPE_R, /* 0779; WAW WITH DIGIT THREE ABOVE; R; WAW */
+ JOINING_TYPE_D, /* 077A; BURUSHASKI YEH BARREE WITH DIGIT TWO ABOVE; D; BURUSHASKI YEH BARREE */
+ JOINING_TYPE_D, /* 077B; BURUSHASKI YEH BARREE WITH DIGIT THREE ABOVE; D; BURUSHASKI YEH BARREE */
+ JOINING_TYPE_D, /* 077C; HAH WITH DIGIT FOUR BELOW; D; HAH */
+ JOINING_TYPE_D, /* 077D; SEEN WITH DIGIT FOUR ABOVE; D; SEEN */
+ JOINING_TYPE_D, /* 077E; SEEN WITH INVERTED V ABOVE; D; SEEN */
+ JOINING_TYPE_D, /* 077F; KAF WITH 2 DOTS ABOVE; D; KAF */
+
+ /* N'Ko Characters */
+
+ JOINING_TYPE_X, /* 0780 */
+ JOINING_TYPE_X, /* 0781 */
+ JOINING_TYPE_X, /* 0782 */
+ JOINING_TYPE_X, /* 0783 */
+ JOINING_TYPE_X, /* 0784 */
+ JOINING_TYPE_X, /* 0785 */
+ JOINING_TYPE_X, /* 0786 */
+ JOINING_TYPE_X, /* 0787 */
+ JOINING_TYPE_X, /* 0788 */
+ JOINING_TYPE_X, /* 0789 */
+ JOINING_TYPE_X, /* 078A */
+ JOINING_TYPE_X, /* 078B */
+ JOINING_TYPE_X, /* 078C */
+ JOINING_TYPE_X, /* 078D */
+ JOINING_TYPE_X, /* 078E */
+ JOINING_TYPE_X, /* 078F */
+ JOINING_TYPE_X, /* 0790 */
+ JOINING_TYPE_X, /* 0791 */
+ JOINING_TYPE_X, /* 0792 */
+ JOINING_TYPE_X, /* 0793 */
+ JOINING_TYPE_X, /* 0794 */
+ JOINING_TYPE_X, /* 0795 */
+ JOINING_TYPE_X, /* 0796 */
+ JOINING_TYPE_X, /* 0797 */
+ JOINING_TYPE_X, /* 0798 */
+ JOINING_TYPE_X, /* 0799 */
+ JOINING_TYPE_X, /* 079A */
+ JOINING_TYPE_X, /* 079B */
+ JOINING_TYPE_X, /* 079C */
+ JOINING_TYPE_X, /* 079D */
+ JOINING_TYPE_X, /* 079E */
+ JOINING_TYPE_X, /* 079F */
+ JOINING_TYPE_X, /* 07A0 */
+ JOINING_TYPE_X, /* 07A1 */
+ JOINING_TYPE_X, /* 07A2 */
+ JOINING_TYPE_X, /* 07A3 */
+ JOINING_TYPE_X, /* 07A4 */
+ JOINING_TYPE_X, /* 07A5 */
+ JOINING_TYPE_X, /* 07A6 */
+ JOINING_TYPE_X, /* 07A7 */
+ JOINING_TYPE_X, /* 07A8 */
+ JOINING_TYPE_X, /* 07A9 */
+ JOINING_TYPE_X, /* 07AA */
+ JOINING_TYPE_X, /* 07AB */
+ JOINING_TYPE_X, /* 07AC */
+ JOINING_TYPE_X, /* 07AD */
+ JOINING_TYPE_X, /* 07AE */
+ JOINING_TYPE_X, /* 07AF */
+ JOINING_TYPE_X, /* 07B0 */
+ JOINING_TYPE_X, /* 07B1 */
+ JOINING_TYPE_X, /* 07B2 */
+ JOINING_TYPE_X, /* 07B3 */
+ JOINING_TYPE_X, /* 07B4 */
+ JOINING_TYPE_X, /* 07B5 */
+ JOINING_TYPE_X, /* 07B6 */
+ JOINING_TYPE_X, /* 07B7 */
+ JOINING_TYPE_X, /* 07B8 */
+ JOINING_TYPE_X, /* 07B9 */
+ JOINING_TYPE_X, /* 07BA */
+ JOINING_TYPE_X, /* 07BB */
+ JOINING_TYPE_X, /* 07BC */
+ JOINING_TYPE_X, /* 07BD */
+ JOINING_TYPE_X, /* 07BE */
+ JOINING_TYPE_X, /* 07BF */
+ JOINING_TYPE_X, /* 07C0 */
+ JOINING_TYPE_X, /* 07C1 */
+ JOINING_TYPE_X, /* 07C2 */
+ JOINING_TYPE_X, /* 07C3 */
+ JOINING_TYPE_X, /* 07C4 */
+ JOINING_TYPE_X, /* 07C5 */
+ JOINING_TYPE_X, /* 07C6 */
+ JOINING_TYPE_X, /* 07C7 */
+ JOINING_TYPE_X, /* 07C8 */
+ JOINING_TYPE_X, /* 07C9 */
+ JOINING_TYPE_D, /* 07CA; NKO A; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07CB; NKO EE; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07CC; NKO I; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07CD; NKO E; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07CE; NKO U; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07CF; NKO OO; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07D0; NKO O; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07D1; NKO DAGBASINNA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07D2; NKO N; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07D3; NKO BA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07D4; NKO PA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07D5; NKO TA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07D6; NKO JA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07D7; NKO CHA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07D8; NKO DA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07D9; NKO RA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07DA; NKO RRA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07DB; NKO SA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07DC; NKO GBA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07DD; NKO FA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07DE; NKO KA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07DF; NKO LA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07E0; NKO NA WOLOSO; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07E1; NKO MA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07E2; NKO NYA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07E3; NKO NA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07E4; NKO HA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07E5; NKO WA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07E6; NKO YA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07E7; NKO NYA WOLOSO; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07E8; NKO JONA JA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07E9; NKO JONA CHA; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 07EA; NKO JONA RA; D; No_Joining_Group */
+ JOINING_TYPE_X, /* 07EB */
+ JOINING_TYPE_X, /* 07EC */
+ JOINING_TYPE_X, /* 07ED */
+ JOINING_TYPE_X, /* 07EE */
+ JOINING_TYPE_X, /* 07EF */
+ JOINING_TYPE_X, /* 07F0 */
+ JOINING_TYPE_X, /* 07F1 */
+ JOINING_TYPE_X, /* 07F2 */
+ JOINING_TYPE_X, /* 07F3 */
+ JOINING_TYPE_X, /* 07F4 */
+ JOINING_TYPE_X, /* 07F5 */
+ JOINING_TYPE_X, /* 07F6 */
+ JOINING_TYPE_X, /* 07F7 */
+ JOINING_TYPE_X, /* 07F8 */
+ JOINING_TYPE_X, /* 07F9 */
+ JOINING_TYPE_C, /* 07FA; NKO LAJANYALAN; C; No_Joining_Group */
+
+ /* Mandaic Characters */
+
+ JOINING_TYPE_X, /* 07FB */
+ JOINING_TYPE_X, /* 07FC */
+ JOINING_TYPE_X, /* 07FD */
+ JOINING_TYPE_X, /* 07FE */
+ JOINING_TYPE_X, /* 07FF */
+ JOINING_TYPE_X, /* 0800 */
+ JOINING_TYPE_X, /* 0801 */
+ JOINING_TYPE_X, /* 0802 */
+ JOINING_TYPE_X, /* 0803 */
+ JOINING_TYPE_X, /* 0804 */
+ JOINING_TYPE_X, /* 0805 */
+ JOINING_TYPE_X, /* 0806 */
+ JOINING_TYPE_X, /* 0807 */
+ JOINING_TYPE_X, /* 0808 */
+ JOINING_TYPE_X, /* 0809 */
+ JOINING_TYPE_X, /* 080A */
+ JOINING_TYPE_X, /* 080B */
+ JOINING_TYPE_X, /* 080C */
+ JOINING_TYPE_X, /* 080D */
+ JOINING_TYPE_X, /* 080E */
+ JOINING_TYPE_X, /* 080F */
+ JOINING_TYPE_X, /* 0810 */
+ JOINING_TYPE_X, /* 0811 */
+ JOINING_TYPE_X, /* 0812 */
+ JOINING_TYPE_X, /* 0813 */
+ JOINING_TYPE_X, /* 0814 */
+ JOINING_TYPE_X, /* 0815 */
+ JOINING_TYPE_X, /* 0816 */
+ JOINING_TYPE_X, /* 0817 */
+ JOINING_TYPE_X, /* 0818 */
+ JOINING_TYPE_X, /* 0819 */
+ JOINING_TYPE_X, /* 081A */
+ JOINING_TYPE_X, /* 081B */
+ JOINING_TYPE_X, /* 081C */
+ JOINING_TYPE_X, /* 081D */
+ JOINING_TYPE_X, /* 081E */
+ JOINING_TYPE_X, /* 081F */
+ JOINING_TYPE_X, /* 0820 */
+ JOINING_TYPE_X, /* 0821 */
+ JOINING_TYPE_X, /* 0822 */
+ JOINING_TYPE_X, /* 0823 */
+ JOINING_TYPE_X, /* 0824 */
+ JOINING_TYPE_X, /* 0825 */
+ JOINING_TYPE_X, /* 0826 */
+ JOINING_TYPE_X, /* 0827 */
+ JOINING_TYPE_X, /* 0828 */
+ JOINING_TYPE_X, /* 0829 */
+ JOINING_TYPE_X, /* 082A */
+ JOINING_TYPE_X, /* 082B */
+ JOINING_TYPE_X, /* 082C */
+ JOINING_TYPE_X, /* 082D */
+ JOINING_TYPE_X, /* 082E */
+ JOINING_TYPE_X, /* 082F */
+ JOINING_TYPE_X, /* 0830 */
+ JOINING_TYPE_X, /* 0831 */
+ JOINING_TYPE_X, /* 0832 */
+ JOINING_TYPE_X, /* 0833 */
+ JOINING_TYPE_X, /* 0834 */
+ JOINING_TYPE_X, /* 0835 */
+ JOINING_TYPE_X, /* 0836 */
+ JOINING_TYPE_X, /* 0837 */
+ JOINING_TYPE_X, /* 0838 */
+ JOINING_TYPE_X, /* 0839 */
+ JOINING_TYPE_X, /* 083A */
+ JOINING_TYPE_X, /* 083B */
+ JOINING_TYPE_X, /* 083C */
+ JOINING_TYPE_X, /* 083D */
+ JOINING_TYPE_X, /* 083E */
+ JOINING_TYPE_X, /* 083F */
+ JOINING_TYPE_R, /* 0840; MANDAIC HALQA; R; No_Joining_Group */
+ JOINING_TYPE_D, /* 0841; MANDAIC AB; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 0842; MANDAIC AG; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 0843; MANDAIC AD; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 0844; MANDAIC AH; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 0845; MANDAIC USHENNA; D; No_Joining_Group */
+ JOINING_TYPE_R, /* 0846; MANDAIC AZ; R; No_Joining_Group */
+ JOINING_TYPE_D, /* 0847; MANDAIC IT; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 0848; MANDAIC ATT; D; No_Joining_Group */
+ JOINING_TYPE_R, /* 0849; MANDAIC AKSA; R; No_Joining_Group */
+ JOINING_TYPE_D, /* 084A; MANDAIC AK; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 084B; MANDAIC AL; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 084C; MANDAIC AM; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 084D; MANDAIC AN; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 084E; MANDAIC AS; D; No_Joining_Group */
+ JOINING_TYPE_R, /* 084F; MANDAIC IN; R; No_Joining_Group */
+ JOINING_TYPE_D, /* 0850; MANDAIC AP; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 0851; MANDAIC ASZ; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 0852; MANDAIC AQ; D; No_Joining_Group */
+ JOINING_TYPE_D, /* 0853; MANDAIC AR; D; No_Joining_Group */
+ JOINING_TYPE_R, /* 0854; MANDAIC ASH; R; No_Joining_Group */
+ JOINING_TYPE_D, /* 0855; MANDAIC AT; D; No_Joining_Group */
+ JOINING_TYPE_U, /* 0856; MANDAIC DUSHENNA; U; No_Joining_Group */
+ JOINING_TYPE_U, /* 0857; MANDAIC KAD; U; No_Joining_Group */
+ JOINING_TYPE_U, /* 0858; MANDAIC AIN; U; No_Joining_Group */
+
+ /* Arabic Extended-A Characters */
+
+ JOINING_TYPE_X, /* 0859 */
+ JOINING_TYPE_X, /* 085A */
+ JOINING_TYPE_X, /* 085B */
+ JOINING_TYPE_X, /* 085C */
+ JOINING_TYPE_X, /* 085D */
+ JOINING_TYPE_X, /* 085E */
+ JOINING_TYPE_X, /* 085F */
+ JOINING_TYPE_X, /* 0860 */
+ JOINING_TYPE_X, /* 0861 */
+ JOINING_TYPE_X, /* 0862 */
+ JOINING_TYPE_X, /* 0863 */
+ JOINING_TYPE_X, /* 0864 */
+ JOINING_TYPE_X, /* 0865 */
+ JOINING_TYPE_X, /* 0866 */
+ JOINING_TYPE_X, /* 0867 */
+ JOINING_TYPE_X, /* 0868 */
+ JOINING_TYPE_X, /* 0869 */
+ JOINING_TYPE_X, /* 086A */
+ JOINING_TYPE_X, /* 086B */
+ JOINING_TYPE_X, /* 086C */
+ JOINING_TYPE_X, /* 086D */
+ JOINING_TYPE_X, /* 086E */
+ JOINING_TYPE_X, /* 086F */
+ JOINING_TYPE_X, /* 0870 */
+ JOINING_TYPE_X, /* 0871 */
+ JOINING_TYPE_X, /* 0872 */
+ JOINING_TYPE_X, /* 0873 */
+ JOINING_TYPE_X, /* 0874 */
+ JOINING_TYPE_X, /* 0875 */
+ JOINING_TYPE_X, /* 0876 */
+ JOINING_TYPE_X, /* 0877 */
+ JOINING_TYPE_X, /* 0878 */
+ JOINING_TYPE_X, /* 0879 */
+ JOINING_TYPE_X, /* 087A */
+ JOINING_TYPE_X, /* 087B */
+ JOINING_TYPE_X, /* 087C */
+ JOINING_TYPE_X, /* 087D */
+ JOINING_TYPE_X, /* 087E */
+ JOINING_TYPE_X, /* 087F */
+ JOINING_TYPE_X, /* 0880 */
+ JOINING_TYPE_X, /* 0881 */
+ JOINING_TYPE_X, /* 0882 */
+ JOINING_TYPE_X, /* 0883 */
+ JOINING_TYPE_X, /* 0884 */
+ JOINING_TYPE_X, /* 0885 */
+ JOINING_TYPE_X, /* 0886 */
+ JOINING_TYPE_X, /* 0887 */
+ JOINING_TYPE_X, /* 0888 */
+ JOINING_TYPE_X, /* 0889 */
+ JOINING_TYPE_X, /* 088A */
+ JOINING_TYPE_X, /* 088B */
+ JOINING_TYPE_X, /* 088C */
+ JOINING_TYPE_X, /* 088D */
+ JOINING_TYPE_X, /* 088E */
+ JOINING_TYPE_X, /* 088F */
+ JOINING_TYPE_X, /* 0890 */
+ JOINING_TYPE_X, /* 0891 */
+ JOINING_TYPE_X, /* 0892 */
+ JOINING_TYPE_X, /* 0893 */
+ JOINING_TYPE_X, /* 0894 */
+ JOINING_TYPE_X, /* 0895 */
+ JOINING_TYPE_X, /* 0896 */
+ JOINING_TYPE_X, /* 0897 */
+ JOINING_TYPE_X, /* 0898 */
+ JOINING_TYPE_X, /* 0899 */
+ JOINING_TYPE_X, /* 089A */
+ JOINING_TYPE_X, /* 089B */
+ JOINING_TYPE_X, /* 089C */
+ JOINING_TYPE_X, /* 089D */
+ JOINING_TYPE_X, /* 089E */
+ JOINING_TYPE_X, /* 089F */
+ JOINING_TYPE_D, /* 08A0; DOTLESS BEH WITH V BELOW; D; BEH */
+ JOINING_TYPE_X, /* 08A1 */
+ JOINING_TYPE_D, /* 08A2; HAH WITH DOT BELOW AND 2 DOTS ABOVE; D; HAH */
+ JOINING_TYPE_D, /* 08A3; TAH WITH 2 DOTS ABOVE; D; TAH */
+ JOINING_TYPE_D, /* 08A4; DOTLESS FEH WITH DOT BELOW AND 3 DOTS ABOVE; D; FEH */
+ JOINING_TYPE_D, /* 08A5; QAF WITH DOT BELOW; D; QAF */
+ JOINING_TYPE_D, /* 08A6; LAM WITH DOUBLE BAR; D; LAM */
+ JOINING_TYPE_D, /* 08A7; MEEM WITH 3 DOTS ABOVE; D; MEEM */
+ JOINING_TYPE_D, /* 08A8; YEH WITH HAMZA ABOVE; D; YEH */
+ JOINING_TYPE_D, /* 08A9; YEH WITH DOT ABOVE; D; YEH */
+ JOINING_TYPE_R, /* 08AA; REH WITH LOOP; R; REH */
+ JOINING_TYPE_R, /* 08AB; WAW WITH DOT WITHIN; R; WAW */
+ JOINING_TYPE_R, /* 08AC; ROHINGYA YEH; R; ROHINGYA YEH */
+
+};
+
+#define JOINING_TABLE_FIRST 0x0600
+#define JOINING_TABLE_LAST 0x08AC
+
+
+static const uint16_t shaping_table[][4] =
+{
+ {0x0621, 0x0621, 0x0621, 0xFE80}, /* U+0621 ARABIC LETTER HAMZA ISOLATED FORM */
+ {0x0622, 0x0622, 0xFE82, 0xFE81}, /* U+0622 ARABIC LETTER ALEF WITH MADDA ABOVE */
+ {0x0623, 0x0623, 0xFE84, 0xFE83}, /* U+0623 ARABIC LETTER ALEF WITH HAMZA ABOVE */
+ {0x0624, 0x0624, 0xFE86, 0xFE85}, /* U+0624 ARABIC LETTER WAW WITH HAMZA ABOVE */
+ {0x0625, 0x0625, 0xFE88, 0xFE87}, /* U+0625 ARABIC LETTER ALEF WITH HAMZA BELOW */
+ {0xFE8B, 0xFE8C, 0xFE8A, 0xFE89}, /* U+0626 ARABIC LETTER YEH WITH HAMZA ABOVE */
+ {0x0627, 0x0627, 0xFE8E, 0xFE8D}, /* U+0627 ARABIC LETTER ALEF */
+ {0xFE91, 0xFE92, 0xFE90, 0xFE8F}, /* U+0628 ARABIC LETTER BEH */
+ {0x0629, 0x0629, 0xFE94, 0xFE93}, /* U+0629 ARABIC LETTER TEH MARBUTA */
+ {0xFE97, 0xFE98, 0xFE96, 0xFE95}, /* U+062A ARABIC LETTER TEH */
+ {0xFE9B, 0xFE9C, 0xFE9A, 0xFE99}, /* U+062B ARABIC LETTER THEH */
+ {0xFE9F, 0xFEA0, 0xFE9E, 0xFE9D}, /* U+062C ARABIC LETTER JEEM */
+ {0xFEA3, 0xFEA4, 0xFEA2, 0xFEA1}, /* U+062D ARABIC LETTER HAH */
+ {0xFEA7, 0xFEA8, 0xFEA6, 0xFEA5}, /* U+062E ARABIC LETTER KHAH */
+ {0x062F, 0x062F, 0xFEAA, 0xFEA9}, /* U+062F ARABIC LETTER DAL */
+ {0x0630, 0x0630, 0xFEAC, 0xFEAB}, /* U+0630 ARABIC LETTER THAL */
+ {0x0631, 0x0631, 0xFEAE, 0xFEAD}, /* U+0631 ARABIC LETTER REH */
+ {0x0632, 0x0632, 0xFEB0, 0xFEAF}, /* U+0632 ARABIC LETTER ZAIN */
+ {0xFEB3, 0xFEB4, 0xFEB2, 0xFEB1}, /* U+0633 ARABIC LETTER SEEN */
+ {0xFEB7, 0xFEB8, 0xFEB6, 0xFEB5}, /* U+0634 ARABIC LETTER SHEEN */
+ {0xFEBB, 0xFEBC, 0xFEBA, 0xFEB9}, /* U+0635 ARABIC LETTER SAD */
+ {0xFEBF, 0xFEC0, 0xFEBE, 0xFEBD}, /* U+0636 ARABIC LETTER DAD */
+ {0xFEC3, 0xFEC4, 0xFEC2, 0xFEC1}, /* U+0637 ARABIC LETTER TAH */
+ {0xFEC7, 0xFEC8, 0xFEC6, 0xFEC5}, /* U+0638 ARABIC LETTER ZAH */
+ {0xFECB, 0xFECC, 0xFECA, 0xFEC9}, /* U+0639 ARABIC LETTER AIN */
+ {0xFECF, 0xFED0, 0xFECE, 0xFECD}, /* U+063A ARABIC LETTER GHAIN */
+ {0x063B, 0x063B, 0x063B, 0x063B}, /* U+063B */
+ {0x063C, 0x063C, 0x063C, 0x063C}, /* U+063C */
+ {0x063D, 0x063D, 0x063D, 0x063D}, /* U+063D */
+ {0x063E, 0x063E, 0x063E, 0x063E}, /* U+063E */
+ {0x063F, 0x063F, 0x063F, 0x063F}, /* U+063F */
+ {0x0640, 0x0640, 0x0640, 0x0640}, /* U+0640 */
+ {0xFED3, 0xFED4, 0xFED2, 0xFED1}, /* U+0641 ARABIC LETTER FEH */
+ {0xFED7, 0xFED8, 0xFED6, 0xFED5}, /* U+0642 ARABIC LETTER QAF */
+ {0xFEDB, 0xFEDC, 0xFEDA, 0xFED9}, /* U+0643 ARABIC LETTER KAF */
+ {0xFEDF, 0xFEE0, 0xFEDE, 0xFEDD}, /* U+0644 ARABIC LETTER LAM */
+ {0xFEE3, 0xFEE4, 0xFEE2, 0xFEE1}, /* U+0645 ARABIC LETTER MEEM */
+ {0xFEE7, 0xFEE8, 0xFEE6, 0xFEE5}, /* U+0646 ARABIC LETTER NOON */
+ {0xFEEB, 0xFEEC, 0xFEEA, 0xFEE9}, /* U+0647 ARABIC LETTER HEH */
+ {0x0648, 0x0648, 0xFEEE, 0xFEED}, /* U+0648 ARABIC LETTER WAW */
+ {0xFBE8, 0xFBE9, 0xFEF0, 0xFEEF}, /* U+0649 ARABIC LETTER */
+ {0xFEF3, 0xFEF4, 0xFEF2, 0xFEF1}, /* U+064A ARABIC LETTER YEH */
+ {0x064B, 0x064B, 0x064B, 0x064B}, /* U+064B */
+ {0x064C, 0x064C, 0x064C, 0x064C}, /* U+064C */
+ {0x064D, 0x064D, 0x064D, 0x064D}, /* U+064D */
+ {0x064E, 0x064E, 0x064E, 0x064E}, /* U+064E */
+ {0x064F, 0x064F, 0x064F, 0x064F}, /* U+064F */
+ {0x0650, 0x0650, 0x0650, 0x0650}, /* U+0650 */
+ {0x0651, 0x0651, 0x0651, 0x0651}, /* U+0651 */
+ {0x0652, 0x0652, 0x0652, 0x0652}, /* U+0652 */
+ {0x0653, 0x0653, 0x0653, 0x0653}, /* U+0653 */
+ {0x0654, 0x0654, 0x0654, 0x0654}, /* U+0654 */
+ {0x0655, 0x0655, 0x0655, 0x0655}, /* U+0655 */
+ {0x0656, 0x0656, 0x0656, 0x0656}, /* U+0656 */
+ {0x0657, 0x0657, 0x0657, 0x0657}, /* U+0657 */
+ {0x0658, 0x0658, 0x0658, 0x0658}, /* U+0658 */
+ {0x0659, 0x0659, 0x0659, 0x0659}, /* U+0659 */
+ {0x065A, 0x065A, 0x065A, 0x065A}, /* U+065A */
+ {0x065B, 0x065B, 0x065B, 0x065B}, /* U+065B */
+ {0x065C, 0x065C, 0x065C, 0x065C}, /* U+065C */
+ {0x065D, 0x065D, 0x065D, 0x065D}, /* U+065D */
+ {0x065E, 0x065E, 0x065E, 0x065E}, /* U+065E */
+ {0x065F, 0x065F, 0x065F, 0x065F}, /* U+065F */
+ {0x0660, 0x0660, 0x0660, 0x0660}, /* U+0660 */
+ {0x0661, 0x0661, 0x0661, 0x0661}, /* U+0661 */
+ {0x0662, 0x0662, 0x0662, 0x0662}, /* U+0662 */
+ {0x0663, 0x0663, 0x0663, 0x0663}, /* U+0663 */
+ {0x0664, 0x0664, 0x0664, 0x0664}, /* U+0664 */
+ {0x0665, 0x0665, 0x0665, 0x0665}, /* U+0665 */
+ {0x0666, 0x0666, 0x0666, 0x0666}, /* U+0666 */
+ {0x0667, 0x0667, 0x0667, 0x0667}, /* U+0667 */
+ {0x0668, 0x0668, 0x0668, 0x0668}, /* U+0668 */
+ {0x0669, 0x0669, 0x0669, 0x0669}, /* U+0669 */
+ {0x066A, 0x066A, 0x066A, 0x066A}, /* U+066A */
+ {0x066B, 0x066B, 0x066B, 0x066B}, /* U+066B */
+ {0x066C, 0x066C, 0x066C, 0x066C}, /* U+066C */
+ {0x066D, 0x066D, 0x066D, 0x066D}, /* U+066D */
+ {0x066E, 0x066E, 0x066E, 0x066E}, /* U+066E */
+ {0x066F, 0x066F, 0x066F, 0x066F}, /* U+066F */
+ {0x0670, 0x0670, 0x0670, 0x0670}, /* U+0670 */
+ {0x0671, 0x0671, 0xFB51, 0xFB50}, /* U+0671 ARABIC LETTER ALEF WASLA */
+ {0x0672, 0x0672, 0x0672, 0x0672}, /* U+0672 */
+ {0x0673, 0x0673, 0x0673, 0x0673}, /* U+0673 */
+ {0x0674, 0x0674, 0x0674, 0x0674}, /* U+0674 */
+ {0x0675, 0x0675, 0x0675, 0x0675}, /* U+0675 */
+ {0x0676, 0x0676, 0x0676, 0x0676}, /* U+0676 */
+ {0x0677, 0x0677, 0x0677, 0xFBDD}, /* U+0677 ARABIC LETTER U WITH HAMZA ABOVE ISOLATED FORM */
+ {0x0678, 0x0678, 0x0678, 0x0678}, /* U+0678 */
+ {0xFB68, 0xFB69, 0xFB67, 0xFB66}, /* U+0679 ARABIC LETTER TTEH */
+ {0xFB60, 0xFB61, 0xFB5F, 0xFB5E}, /* U+067A ARABIC LETTER TTEHEH */
+ {0xFB54, 0xFB55, 0xFB53, 0xFB52}, /* U+067B ARABIC LETTER BEEH */
+ {0x067C, 0x067C, 0x067C, 0x067C}, /* U+067C */
+ {0x067D, 0x067D, 0x067D, 0x067D}, /* U+067D */
+ {0xFB58, 0xFB59, 0xFB57, 0xFB56}, /* U+067E ARABIC LETTER PEH */
+ {0xFB64, 0xFB65, 0xFB63, 0xFB62}, /* U+067F ARABIC LETTER TEHEH */
+ {0xFB5C, 0xFB5D, 0xFB5B, 0xFB5A}, /* U+0680 ARABIC LETTER BEHEH */
+ {0x0681, 0x0681, 0x0681, 0x0681}, /* U+0681 */
+ {0x0682, 0x0682, 0x0682, 0x0682}, /* U+0682 */
+ {0xFB78, 0xFB79, 0xFB77, 0xFB76}, /* U+0683 ARABIC LETTER NYEH */
+ {0xFB74, 0xFB75, 0xFB73, 0xFB72}, /* U+0684 ARABIC LETTER DYEH */
+ {0x0685, 0x0685, 0x0685, 0x0685}, /* U+0685 */
+ {0xFB7C, 0xFB7D, 0xFB7B, 0xFB7A}, /* U+0686 ARABIC LETTER TCHEH */
+ {0xFB80, 0xFB81, 0xFB7F, 0xFB7E}, /* U+0687 ARABIC LETTER TCHEHEH */
+ {0x0688, 0x0688, 0xFB89, 0xFB88}, /* U+0688 ARABIC LETTER DDAL */
+ {0x0689, 0x0689, 0x0689, 0x0689}, /* U+0689 */
+ {0x068A, 0x068A, 0x068A, 0x068A}, /* U+068A */
+ {0x068B, 0x068B, 0x068B, 0x068B}, /* U+068B */
+ {0x068C, 0x068C, 0xFB85, 0xFB84}, /* U+068C ARABIC LETTER DAHAL */
+ {0x068D, 0x068D, 0xFB83, 0xFB82}, /* U+068D ARABIC LETTER DDAHAL */
+ {0x068E, 0x068E, 0xFB87, 0xFB86}, /* U+068E ARABIC LETTER DUL */
+ {0x068F, 0x068F, 0x068F, 0x068F}, /* U+068F */
+ {0x0690, 0x0690, 0x0690, 0x0690}, /* U+0690 */
+ {0x0691, 0x0691, 0xFB8D, 0xFB8C}, /* U+0691 ARABIC LETTER RREH */
+ {0x0692, 0x0692, 0x0692, 0x0692}, /* U+0692 */
+ {0x0693, 0x0693, 0x0693, 0x0693}, /* U+0693 */
+ {0x0694, 0x0694, 0x0694, 0x0694}, /* U+0694 */
+ {0x0695, 0x0695, 0x0695, 0x0695}, /* U+0695 */
+ {0x0696, 0x0696, 0x0696, 0x0696}, /* U+0696 */
+ {0x0697, 0x0697, 0x0697, 0x0697}, /* U+0697 */
+ {0x0698, 0x0698, 0xFB8B, 0xFB8A}, /* U+0698 ARABIC LETTER JEH */
+ {0x0699, 0x0699, 0x0699, 0x0699}, /* U+0699 */
+ {0x069A, 0x069A, 0x069A, 0x069A}, /* U+069A */
+ {0x069B, 0x069B, 0x069B, 0x069B}, /* U+069B */
+ {0x069C, 0x069C, 0x069C, 0x069C}, /* U+069C */
+ {0x069D, 0x069D, 0x069D, 0x069D}, /* U+069D */
+ {0x069E, 0x069E, 0x069E, 0x069E}, /* U+069E */
+ {0x069F, 0x069F, 0x069F, 0x069F}, /* U+069F */
+ {0x06A0, 0x06A0, 0x06A0, 0x06A0}, /* U+06A0 */
+ {0x06A1, 0x06A1, 0x06A1, 0x06A1}, /* U+06A1 */
+ {0x06A2, 0x06A2, 0x06A2, 0x06A2}, /* U+06A2 */
+ {0x06A3, 0x06A3, 0x06A3, 0x06A3}, /* U+06A3 */
+ {0xFB6C, 0xFB6D, 0xFB6B, 0xFB6A}, /* U+06A4 ARABIC LETTER VEH */
+ {0x06A5, 0x06A5, 0x06A5, 0x06A5}, /* U+06A5 */
+ {0xFB70, 0xFB71, 0xFB6F, 0xFB6E}, /* U+06A6 ARABIC LETTER PEHEH */
+ {0x06A7, 0x06A7, 0x06A7, 0x06A7}, /* U+06A7 */
+ {0x06A8, 0x06A8, 0x06A8, 0x06A8}, /* U+06A8 */
+ {0xFB90, 0xFB91, 0xFB8F, 0xFB8E}, /* U+06A9 ARABIC LETTER KEHEH */
+ {0x06AA, 0x06AA, 0x06AA, 0x06AA}, /* U+06AA */
+ {0x06AB, 0x06AB, 0x06AB, 0x06AB}, /* U+06AB */
+ {0x06AC, 0x06AC, 0x06AC, 0x06AC}, /* U+06AC */
+ {0xFBD5, 0xFBD6, 0xFBD4, 0xFBD3}, /* U+06AD ARABIC LETTER NG */
+ {0x06AE, 0x06AE, 0x06AE, 0x06AE}, /* U+06AE */
+ {0xFB94, 0xFB95, 0xFB93, 0xFB92}, /* U+06AF ARABIC LETTER GAF */
+ {0x06B0, 0x06B0, 0x06B0, 0x06B0}, /* U+06B0 */
+ {0xFB9C, 0xFB9D, 0xFB9B, 0xFB9A}, /* U+06B1 ARABIC LETTER NGOEH */
+ {0x06B2, 0x06B2, 0x06B2, 0x06B2}, /* U+06B2 */
+ {0xFB98, 0xFB99, 0xFB97, 0xFB96}, /* U+06B3 ARABIC LETTER GUEH */
+ {0x06B4, 0x06B4, 0x06B4, 0x06B4}, /* U+06B4 */
+ {0x06B5, 0x06B5, 0x06B5, 0x06B5}, /* U+06B5 */
+ {0x06B6, 0x06B6, 0x06B6, 0x06B6}, /* U+06B6 */
+ {0x06B7, 0x06B7, 0x06B7, 0x06B7}, /* U+06B7 */
+ {0x06B8, 0x06B8, 0x06B8, 0x06B8}, /* U+06B8 */
+ {0x06B9, 0x06B9, 0x06B9, 0x06B9}, /* U+06B9 */
+ {0x06BA, 0x06BA, 0xFB9F, 0xFB9E}, /* U+06BA ARABIC LETTER NOON GHUNNA */
+ {0xFBA2, 0xFBA3, 0xFBA1, 0xFBA0}, /* U+06BB ARABIC LETTER RNOON */
+ {0x06BC, 0x06BC, 0x06BC, 0x06BC}, /* U+06BC */
+ {0x06BD, 0x06BD, 0x06BD, 0x06BD}, /* U+06BD */
+ {0xFBAC, 0xFBAD, 0xFBAB, 0xFBAA}, /* U+06BE ARABIC LETTER HEH DOACHASHMEE */
+ {0x06BF, 0x06BF, 0x06BF, 0x06BF}, /* U+06BF */
+ {0x06C0, 0x06C0, 0xFBA5, 0xFBA4}, /* U+06C0 ARABIC LETTER HEH WITH YEH ABOVE */
+ {0xFBA8, 0xFBA9, 0xFBA7, 0xFBA6}, /* U+06C1 ARABIC LETTER HEH GOAL */
+ {0x06C2, 0x06C2, 0x06C2, 0x06C2}, /* U+06C2 */
+ {0x06C3, 0x06C3, 0x06C3, 0x06C3}, /* U+06C3 */
+ {0x06C4, 0x06C4, 0x06C4, 0x06C4}, /* U+06C4 */
+ {0x06C5, 0x06C5, 0xFBE1, 0xFBE0}, /* U+06C5 ARABIC LETTER KIRGHIZ OE */
+ {0x06C6, 0x06C6, 0xFBDA, 0xFBD9}, /* U+06C6 ARABIC LETTER OE */
+ {0x06C7, 0x06C7, 0xFBD8, 0xFBD7}, /* U+06C7 ARABIC LETTER U */
+ {0x06C8, 0x06C8, 0xFBDC, 0xFBDB}, /* U+06C8 ARABIC LETTER YU */
+ {0x06C9, 0x06C9, 0xFBE3, 0xFBE2}, /* U+06C9 ARABIC LETTER KIRGHIZ YU */
+ {0x06CA, 0x06CA, 0x06CA, 0x06CA}, /* U+06CA */
+ {0x06CB, 0x06CB, 0xFBDF, 0xFBDE}, /* U+06CB ARABIC LETTER VE */
+ {0xFBFE, 0xFBFF, 0xFBFD, 0xFBFC}, /* U+06CC ARABIC LETTER FARSI YEH */
+ {0x06CD, 0x06CD, 0x06CD, 0x06CD}, /* U+06CD */
+ {0x06CE, 0x06CE, 0x06CE, 0x06CE}, /* U+06CE */
+ {0x06CF, 0x06CF, 0x06CF, 0x06CF}, /* U+06CF */
+ {0xFBE6, 0xFBE7, 0xFBE5, 0xFBE4}, /* U+06D0 ARABIC LETTER E */
+ {0x06D1, 0x06D1, 0x06D1, 0x06D1}, /* U+06D1 */
+ {0x06D2, 0x06D2, 0xFBAF, 0xFBAE}, /* U+06D2 ARABIC LETTER YEH BARREE */
+ {0x06D3, 0x06D3, 0xFBB1, 0xFBB0}, /* U+06D3 ARABIC LETTER YEH BARREE WITH HAMZA ABOVE */
+};
+
+#define SHAPING_TABLE_FIRST 0x0621
+#define SHAPING_TABLE_LAST 0x06D3
+
+
+static const struct ligature_set_t {
+ uint16_t first;
+ struct ligature_pairs_t {
+ uint16_t second;
+ uint16_t ligature;
+ } ligatures[4];
+} ligature_table[] =
+{
+ { 0xFEDF, {
+ { 0xFE88, 0xFEF9 }, /* ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM */
+ { 0xFE82, 0xFEF5 }, /* ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM */
+ { 0xFE8E, 0xFEFB }, /* ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM */
+ { 0xFE84, 0xFEF7 }, /* ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM */
+ }},
+ { 0xFEE0, {
+ { 0xFE88, 0xFEFA }, /* ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM */
+ { 0xFE82, 0xFEF6 }, /* ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM */
+ { 0xFE8E, 0xFEFC }, /* ARABIC LIGATURE LAM WITH ALEF FINAL FORM */
+ { 0xFE84, 0xFEF8 }, /* ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM */
+ }},
+};
+
+
+#endif /* HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH */
+
+/* == End of generated table == */
diff --git a/src/hb-ot-shape-complex-arabic.cc b/src/hb-ot-shape-complex-arabic.cc
new file mode 100644
index 0000000..857bf55
--- /dev/null
+++ b/src/hb-ot-shape-complex-arabic.cc
@@ -0,0 +1,352 @@
+/*
+ * Copyright © 2010,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
+ */
+
+#include "hb-ot-shape-complex-private.hh"
+#include "hb-ot-shape-private.hh"
+
+
+
+/* buffer var allocations */
+#define arabic_shaping_action() complex_var_u8_0() /* arabic shaping action */
+
+
+/*
+ * Bits used in the joining tables
+ */
+enum {
+ JOINING_TYPE_U = 0,
+ JOINING_TYPE_R = 1,
+ JOINING_TYPE_D = 2,
+ JOINING_TYPE_C = JOINING_TYPE_D,
+ JOINING_GROUP_ALAPH = 3,
+ JOINING_GROUP_DALATH_RISH = 4,
+ NUM_STATE_MACHINE_COLS = 5,
+
+ /* 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 types:
+ */
+
+#include "hb-ot-shape-complex-arabic-table.hh"
+
+static unsigned int get_joining_type (hb_codepoint_t u, hb_unicode_general_category_t gen_cat)
+{
+ if (likely (hb_in_range<hb_codepoint_t> (u, JOINING_TABLE_FIRST, JOINING_TABLE_LAST))) {
+ unsigned int j_type = joining_table[u - JOINING_TABLE_FIRST];
+ if (likely (j_type != JOINING_TYPE_X))
+ return j_type;
+ }
+
+ /* Mongolian joining data is not in ArabicJoining.txt yet */
+ if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x1800, 0x18AF)))
+ {
+ /* All letters, SIBE SYLLABLE BOUNDARY MARKER, and NIRUGU are D */
+ if (gen_cat == HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER || u == 0x1807 || u == 0x180A)
+ return JOINING_TYPE_D;
+ }
+
+ if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x200C, 0x200D))) {
+ return u == 0x200C ? JOINING_TYPE_U : JOINING_TYPE_C;
+ }
+
+ return (FLAG(gen_cat) & (FLAG(HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) | FLAG(HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) | FLAG(HB_UNICODE_GENERAL_CATEGORY_FORMAT))) ?
+ JOINING_TYPE_T : JOINING_TYPE_U;
+}
+
+static hb_codepoint_t get_arabic_shape (hb_codepoint_t u, unsigned int shape)
+{
+ if (likely (hb_in_range<hb_codepoint_t> (u, SHAPING_TABLE_FIRST, SHAPING_TABLE_LAST)) && shape < 4)
+ return shaping_table[u - SHAPING_TABLE_FIRST][shape];
+ return u;
+}
+
+static uint16_t get_ligature (hb_codepoint_t first, hb_codepoint_t second)
+{
+ if (unlikely (!second)) return 0;
+ for (unsigned i = 0; i < ARRAY_LENGTH (ligature_table); i++)
+ if (ligature_table[i].first == first)
+ for (unsigned j = 0; j < ARRAY_LENGTH (ligature_table[i].ligatures); j++)
+ if (ligature_table[i].ligatures[j].second == second)
+ return ligature_table[i].ligatures[j].ligature;
+ return 0;
+}
+
+static const hb_tag_t arabic_features[] =
+{
+ HB_TAG('i','n','i','t'),
+ HB_TAG('m','e','d','i'),
+ HB_TAG('f','i','n','a'),
+ HB_TAG('i','s','o','l'),
+ /* Syriac */
+ HB_TAG('m','e','d','2'),
+ HB_TAG('f','i','n','2'),
+ HB_TAG('f','i','n','3'),
+ HB_TAG_NONE
+};
+
+
+/* Same order as the feature array */
+enum {
+ INIT,
+ MEDI,
+ FINA,
+ ISOL,
+
+ /* Syriac */
+ MED2,
+ FIN2,
+ FIN3,
+
+ NONE,
+
+ ARABIC_NUM_FEATURES = NONE
+};
+
+static const struct arabic_state_table_entry {
+ uint8_t prev_action;
+ uint8_t curr_action;
+ uint16_t next_state;
+} arabic_state_table[][NUM_STATE_MACHINE_COLS] =
+{
+ /* jt_U, 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}, },
+
+ /* 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}, },
+
+ /* 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 3: prev was D/FINA, willing to join. */
+ { {NONE,NONE,0}, {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}, },
+
+ /* 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}, },
+
+ /* 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}, }
+};
+
+
+
+static void
+collect_features_arabic (hb_ot_shape_planner_t *plan)
+{
+ hb_ot_map_builder_t *map = &plan->map;
+
+ /* For Language forms (in ArabicOT speak), we do the iso/fina/medi/init together,
+ * then rlig and calt each in their own stage. This makes IranNastaliq's ALLAH
+ * ligature work correctly. It's unfortunate though...
+ *
+ * This also makes Arial Bold in Windows7 work. See:
+ * https://bugzilla.mozilla.org/show_bug.cgi?id=644184
+ *
+ * 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_gsub_pause (NULL);
+
+ for (unsigned int i = 0; i < ARABIC_NUM_FEATURES; i++)
+ map->add_bool_feature (arabic_features[i], false);
+
+ map->add_gsub_pause (NULL);
+
+ map->add_bool_feature (HB_TAG('r','l','i','g'));
+ map->add_gsub_pause (NULL);
+
+ map->add_bool_feature (HB_TAG('c','a','l','t'));
+ map->add_gsub_pause (NULL);
+
+ /* ArabicOT spec enables 'cswh' for Arabic where as for basic shaper it's disabled by default. */
+ map->add_bool_feature (HB_TAG('c','s','w','h'));
+}
+
+struct arabic_shape_plan_t
+{
+ ASSERT_POD ();
+
+ bool do_fallback;
+ /* The "+ 1" in the next array is to accommodate for the "NONE" command,
+ * which is not an OpenType feature, but this simplifies the code by not
+ * having to do a "if (... < NONE) ..." and just rely on the fact that
+ * mask_array[NONE] == 0. */
+ hb_mask_t mask_array[ARABIC_NUM_FEATURES + 1];
+};
+
+static void *
+data_create_arabic (const hb_ot_shape_plan_t *plan)
+{
+ arabic_shape_plan_t *arabic_plan = (arabic_shape_plan_t *) calloc (1, sizeof (arabic_shape_plan_t));
+ if (unlikely (!arabic_plan))
+ return NULL;
+
+ hb_mask_t total_masks = 0;
+ for (unsigned int i = 0; i < ARABIC_NUM_FEATURES; i++) {
+ arabic_plan->mask_array[i] = plan->map.get_1_mask (arabic_features[i]);
+ total_masks |= arabic_plan->mask_array[i];
+ }
+
+ /* Pitfalls:
+ * - This path fires if user force-set init/medi/fina/isol off,
+ * - If font does not declare script 'arab', well, what to do?
+ * Most probably it's safe to assume that init/medi/fina/isol
+ * still mean Arabic shaping, although they do not have to.
+ */
+ arabic_plan->do_fallback = 0 == total_masks;
+
+ return arabic_plan;
+}
+
+static void
+data_destroy_arabic (void *data)
+{
+ free (data);
+}
+
+static void
+arabic_fallback_shape (hb_font_t *font, hb_buffer_t *buffer)
+{
+ /* Only Arabic has presentation forms encoded in Unicode. */
+ if (buffer->props.script != HB_SCRIPT_ARABIC)
+ return;
+
+ unsigned int count = buffer->len;
+ hb_codepoint_t glyph;
+
+ /* Shape to presentation forms */
+ for (unsigned int i = 0; i < count; i++) {
+ hb_codepoint_t u = buffer->info[i].codepoint;
+ hb_codepoint_t shaped = get_arabic_shape (u, buffer->info[i].arabic_shaping_action());
+ if (shaped != u && font->get_glyph (shaped, 0, &glyph))
+ buffer->info[i].codepoint = shaped;
+ }
+
+ /* Mandatory ligatures */
+ buffer->clear_output ();
+ for (buffer->idx = 0; buffer->idx + 1 < count;) {
+ hb_codepoint_t ligature = get_ligature (buffer->cur().codepoint,
+ buffer->cur(+1).codepoint);
+ if (likely (!ligature) || !(font->get_glyph (ligature, 0, &glyph))) {
+ buffer->next_glyph ();
+ continue;
+ }
+
+ buffer->replace_glyphs (2, 1, &ligature);
+
+ /* Technically speaking we can skip marks and stuff, like the GSUB path does.
+ * But who cares, we're in fallback! */
+ }
+ for (; buffer->idx < count;)
+ buffer->next_glyph ();
+ buffer->swap_buffers ();
+}
+
+static void
+arabic_joining (hb_buffer_t *buffer)
+{
+ unsigned int count = buffer->len;
+ unsigned int prev = 0, state = 0;
+
+ HB_BUFFER_ALLOCATE_VAR (buffer, arabic_shaping_action);
+
+ for (unsigned int i = 0; i < count; i++)
+ {
+ unsigned int this_type = get_joining_type (buffer->info[i].codepoint, _hb_glyph_info_get_general_category (&buffer->info[i]));
+
+ if (unlikely (this_type == JOINING_TYPE_T)) {
+ buffer->info[i].arabic_shaping_action() = NONE;
+ continue;
+ }
+
+ const arabic_state_table_entry *entry = &arabic_state_table[state][this_type];
+
+ if (entry->prev_action != NONE)
+ buffer->info[prev].arabic_shaping_action() = entry->prev_action;
+
+ buffer->info[i].arabic_shaping_action() = entry->curr_action;
+
+ prev = i;
+ state = entry->next_state;
+ }
+
+ HB_BUFFER_DEALLOCATE_VAR (buffer, arabic_shaping_action);
+}
+
+static void
+preprocess_text_arabic (const hb_ot_shape_plan_t *plan,
+ hb_buffer_t *buffer,
+ hb_font_t *font)
+{
+ const arabic_shape_plan_t *arabic_plan = (const arabic_shape_plan_t *) plan->data;
+
+ if (unlikely (arabic_plan->do_fallback))
+ {
+ arabic_joining (buffer);
+ arabic_fallback_shape (font, buffer);
+ }
+}
+
+static void
+setup_masks_arabic (const hb_ot_shape_plan_t *plan,
+ hb_buffer_t *buffer,
+ hb_font_t *font)
+{
+ const arabic_shape_plan_t *arabic_plan = (const arabic_shape_plan_t *) plan->data;
+
+ if (likely (!arabic_plan->do_fallback))
+ {
+ arabic_joining (buffer);
+ unsigned int count = buffer->len;
+ for (unsigned int i = 0; i < count; i++)
+ buffer->info[i].mask |= arabic_plan->mask_array[buffer->info[i].arabic_shaping_action()];
+ }
+}
+
+const hb_ot_complex_shaper_t _hb_ot_complex_shaper_arabic =
+{
+ "arabic",
+ collect_features_arabic,
+ NULL, /* override_features */
+ data_create_arabic,
+ data_destroy_arabic,
+ preprocess_text_arabic,
+ NULL, /* normalization_preference */
+ setup_masks_arabic,
+ true, /* zero_width_attached_marks */
+};
diff --git a/src/hb-ot-shape-complex-indic-machine.hh b/src/hb-ot-shape-complex-indic-machine.hh
new file mode 100644
index 0000000..4c7282c
--- /dev/null
+++ b/src/hb-ot-shape-complex-indic-machine.hh
@@ -0,0 +1,884 @@
+
+#line 1 "../../src/hb-ot-shape-complex-indic-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_INDIC_MACHINE_HH
+#define HB_OT_SHAPE_COMPLEX_INDIC_MACHINE_HH
+
+#include "hb-private.hh"
+
+
+#line 36 "../../src/hb-ot-shape-complex-indic-machine.hh.tmp"
+static const unsigned char _indic_syllable_machine_trans_keys[] = {
+ 1u, 16u, 13u, 13u, 4u, 14u, 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,
+ 16u, 16u, 4u, 7u, 6u, 6u, 16u, 16u, 4u, 7u, 6u, 6u, 16u, 16u, 4u, 7u,
+ 6u, 6u, 16u, 16u, 4u, 14u, 4u, 14u, 4u, 14u, 4u, 14u, 4u, 14u, 4u, 14u,
+ 4u, 14u, 4u, 14u, 4u, 14u, 1u, 16u, 13u, 13u, 4u, 14u, 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, 16u, 16u, 4u, 7u, 6u, 6u, 16u, 16u, 4u, 7u,
+ 6u, 6u, 16u, 16u, 4u, 7u, 6u, 6u, 16u, 16u, 4u, 14u, 4u, 14u, 4u, 14u,
+ 4u, 14u, 4u, 14u, 4u, 14u, 4u, 14u, 4u, 14u, 4u, 14u, 1u, 16u, 13u, 13u,
+ 4u, 14u, 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, 16u, 16u, 4u, 7u,
+ 6u, 6u, 16u, 16u, 4u, 7u, 6u, 6u, 16u, 16u, 4u, 7u, 6u, 6u, 16u, 16u,
+ 4u, 14u, 4u, 14u, 4u, 14u, 4u, 14u, 4u, 14u, 4u, 14u, 4u, 14u, 4u, 14u,
+ 4u, 14u, 1u, 16u, 3u, 14u, 3u, 14u, 4u, 14u, 1u, 16u, 3u, 14u, 3u, 14u,
+ 4u, 14u, 1u, 16u, 3u, 14u, 3u, 14u, 4u, 14u, 1u, 16u, 3u, 14u, 3u, 14u,
+ 4u, 14u, 1u, 16u, 3u, 14u, 3u, 14u, 4u, 14u, 5u, 14u, 8u, 14u, 5u, 14u,
+ 9u, 14u, 9u, 9u, 3u, 13u, 3u, 9u, 9u, 9u, 3u, 9u, 6u, 14u, 3u, 14u,
+ 4u, 14u, 5u, 14u, 3u, 14u, 4u, 14u, 5u, 14u, 3u, 14u, 4u, 14u, 5u, 14u,
+ 3u, 14u, 4u, 14u, 4u, 14u, 1u, 16u, 3u, 14u, 1u, 16u, 1u, 16u, 1u, 16u,
+ 3u, 14u, 1u, 16u, 1u, 16u, 1u, 16u, 3u, 14u, 1u, 16u, 1u, 16u, 1u, 16u,
+ 3u, 14u, 1u, 16u, 1u, 16u, 1u, 16u, 3u, 14u, 3u, 14u, 3u, 14u, 4u, 14u,
+ 1u, 16u, 3u, 14u, 3u, 14u, 4u, 14u, 1u, 16u, 3u, 14u, 3u, 14u, 4u, 14u,
+ 1u, 16u, 3u, 14u, 3u, 14u, 4u, 14u, 1u, 16u, 3u, 14u, 3u, 14u, 4u, 14u,
+ 5u, 14u, 8u, 14u, 5u, 14u, 9u, 14u, 9u, 9u, 3u, 13u, 3u, 9u, 9u, 9u,
+ 3u, 9u, 6u, 14u, 3u, 14u, 4u, 14u, 5u, 14u, 3u, 14u, 4u, 14u, 5u, 14u,
+ 3u, 14u, 4u, 14u, 5u, 14u, 3u, 14u, 4u, 14u, 1u, 16u, 3u, 14u, 1u, 16u,
+ 1u, 16u, 1u, 16u, 3u, 14u, 1u, 16u, 1u, 16u, 1u, 16u, 3u, 14u, 1u, 16u,
+ 1u, 16u, 1u, 16u, 3u, 14u, 1u, 16u, 1u, 16u, 4u, 14u, 1u, 16u, 3u, 14u,
+ 3u, 14u, 3u, 14u, 4u, 14u, 1u, 16u, 3u, 14u, 3u, 14u, 4u, 14u, 1u, 16u,
+ 3u, 14u, 3u, 14u, 4u, 14u, 1u, 16u, 3u, 14u, 3u, 14u, 4u, 14u, 1u, 16u,
+ 3u, 14u, 3u, 14u, 4u, 14u, 5u, 14u, 8u, 14u, 5u, 14u, 9u, 14u, 9u, 9u,
+ 3u, 13u, 3u, 9u, 9u, 9u, 3u, 9u, 6u, 14u, 3u, 14u, 4u, 14u, 5u, 14u,
+ 3u, 14u, 4u, 14u, 5u, 14u, 3u, 14u, 4u, 14u, 5u, 14u, 3u, 14u, 4u, 14u,
+ 1u, 16u, 3u, 14u, 1u, 16u, 1u, 16u, 1u, 16u, 3u, 14u, 1u, 16u, 1u, 16u,
+ 1u, 16u, 3u, 14u, 1u, 16u, 1u, 16u, 1u, 16u, 3u, 14u, 1u, 16u, 1u, 16u,
+ 1u, 16u, 3u, 14u, 1u, 16u, 3u, 14u, 1u, 16u, 0
+};
+
+static const char _indic_syllable_machine_key_spans[] = {
+ 16, 1, 11, 3, 1, 3, 3, 1,
+ 3, 3, 1, 3, 3, 1, 1, 1,
+ 1, 4, 1, 1, 4, 1, 1, 4,
+ 1, 1, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 16, 1, 11, 3, 1,
+ 3, 3, 1, 3, 3, 1, 3, 3,
+ 1, 1, 1, 1, 4, 1, 1, 4,
+ 1, 1, 4, 1, 1, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 16, 1,
+ 11, 3, 1, 3, 3, 1, 3, 3,
+ 1, 3, 3, 1, 1, 1, 1, 4,
+ 1, 1, 4, 1, 1, 4, 1, 1,
+ 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 16, 12, 12, 11, 16, 12, 12,
+ 11, 16, 12, 12, 11, 16, 12, 12,
+ 11, 16, 12, 12, 11, 10, 7, 10,
+ 6, 1, 11, 7, 1, 7, 9, 12,
+ 11, 10, 12, 11, 10, 12, 11, 10,
+ 12, 11, 11, 16, 12, 16, 16, 16,
+ 12, 16, 16, 16, 12, 16, 16, 16,
+ 12, 16, 16, 16, 12, 12, 12, 11,
+ 16, 12, 12, 11, 16, 12, 12, 11,
+ 16, 12, 12, 11, 16, 12, 12, 11,
+ 10, 7, 10, 6, 1, 11, 7, 1,
+ 7, 9, 12, 11, 10, 12, 11, 10,
+ 12, 11, 10, 12, 11, 16, 12, 16,
+ 16, 16, 12, 16, 16, 16, 12, 16,
+ 16, 16, 12, 16, 16, 11, 16, 12,
+ 12, 12, 11, 16, 12, 12, 11, 16,
+ 12, 12, 11, 16, 12, 12, 11, 16,
+ 12, 12, 11, 10, 7, 10, 6, 1,
+ 11, 7, 1, 7, 9, 12, 11, 10,
+ 12, 11, 10, 12, 11, 10, 12, 11,
+ 16, 12, 16, 16, 16, 12, 16, 16,
+ 16, 12, 16, 16, 16, 12, 16, 16,
+ 16, 12, 16, 12, 16
+};
+
+static const short _indic_syllable_machine_index_offsets[] = {
+ 0, 17, 19, 31, 35, 37, 41, 45,
+ 47, 51, 55, 57, 61, 65, 67, 69,
+ 71, 73, 78, 80, 82, 87, 89, 91,
+ 96, 98, 100, 112, 124, 136, 148, 160,
+ 172, 184, 196, 208, 225, 227, 239, 243,
+ 245, 249, 253, 255, 259, 263, 265, 269,
+ 273, 275, 277, 279, 281, 286, 288, 290,
+ 295, 297, 299, 304, 306, 308, 320, 332,
+ 344, 356, 368, 380, 392, 404, 416, 433,
+ 435, 447, 451, 453, 457, 461, 463, 467,
+ 471, 473, 477, 481, 483, 485, 487, 489,
+ 494, 496, 498, 503, 505, 507, 512, 514,
+ 516, 528, 540, 552, 564, 576, 588, 600,
+ 612, 624, 641, 654, 667, 679, 696, 709,
+ 722, 734, 751, 764, 777, 789, 806, 819,
+ 832, 844, 861, 874, 887, 899, 910, 918,
+ 929, 936, 938, 950, 958, 960, 968, 978,
+ 991, 1003, 1014, 1027, 1039, 1050, 1063, 1075,
+ 1086, 1099, 1111, 1123, 1140, 1153, 1170, 1187,
+ 1204, 1217, 1234, 1251, 1268, 1281, 1298, 1315,
+ 1332, 1345, 1362, 1379, 1396, 1409, 1422, 1435,
+ 1447, 1464, 1477, 1490, 1502, 1519, 1532, 1545,
+ 1557, 1574, 1587, 1600, 1612, 1629, 1642, 1655,
+ 1667, 1678, 1686, 1697, 1704, 1706, 1718, 1726,
+ 1728, 1736, 1746, 1759, 1771, 1782, 1795, 1807,
+ 1818, 1831, 1843, 1854, 1867, 1879, 1896, 1909,
+ 1926, 1943, 1960, 1973, 1990, 2007, 2024, 2037,
+ 2054, 2071, 2088, 2101, 2118, 2135, 2147, 2164,
+ 2177, 2190, 2203, 2215, 2232, 2245, 2258, 2270,
+ 2287, 2300, 2313, 2325, 2342, 2355, 2368, 2380,
+ 2397, 2410, 2423, 2435, 2446, 2454, 2465, 2472,
+ 2474, 2486, 2494, 2496, 2504, 2514, 2527, 2539,
+ 2550, 2563, 2575, 2586, 2599, 2611, 2622, 2635,
+ 2647, 2664, 2677, 2694, 2711, 2728, 2741, 2758,
+ 2775, 2792, 2805, 2822, 2839, 2856, 2869, 2886,
+ 2903, 2920, 2933, 2950, 2963
+};
+
+static const short _indic_syllable_machine_indicies[] = {
+ 1, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1,
+ 0, 3, 0, 4, 5, 5, 6, 0,
+ 0, 0, 0, 0, 0, 4, 0, 7,
+ 7, 6, 0, 6, 0, 8, 8, 9,
+ 0, 10, 10, 9, 0, 9, 0, 11,
+ 11, 12, 0, 13, 13, 12, 0, 12,
+ 0, 14, 14, 15, 0, 16, 16, 15,
+ 0, 15, 0, 17, 0, 18, 0, 19,
+ 0, 20, 14, 14, 15, 0, 21, 0,
+ 22, 0, 23, 11, 11, 12, 0, 24,
+ 0, 25, 0, 26, 8, 8, 9, 0,
+ 27, 0, 28, 0, 4, 5, 5, 6,
+ 0, 0, 0, 0, 0, 29, 4, 0,
+ 30, 5, 5, 6, 0, 0, 0, 0,
+ 0, 0, 30, 0, 30, 5, 5, 6,
+ 0, 0, 0, 0, 0, 31, 30, 0,
+ 32, 5, 5, 6, 0, 0, 0, 0,
+ 0, 0, 32, 0, 32, 5, 5, 6,
+ 0, 0, 0, 0, 0, 33, 32, 0,
+ 34, 5, 5, 6, 0, 0, 0, 0,
+ 0, 0, 34, 0, 34, 5, 5, 6,
+ 0, 0, 0, 0, 0, 35, 34, 0,
+ 36, 5, 5, 6, 0, 0, 0, 0,
+ 0, 0, 36, 0, 36, 5, 5, 6,
+ 0, 0, 0, 0, 0, 37, 36, 0,
+ 39, 40, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 39,
+ 38, 41, 38, 42, 43, 43, 44, 38,
+ 38, 38, 38, 38, 38, 42, 38, 45,
+ 45, 44, 38, 44, 38, 46, 46, 47,
+ 38, 48, 48, 47, 38, 47, 38, 49,
+ 49, 50, 38, 51, 51, 50, 38, 50,
+ 38, 52, 52, 53, 38, 54, 54, 53,
+ 38, 53, 38, 55, 38, 56, 38, 57,
+ 38, 58, 52, 52, 53, 38, 59, 38,
+ 60, 38, 61, 49, 49, 50, 38, 62,
+ 38, 63, 38, 64, 46, 46, 47, 38,
+ 65, 38, 66, 38, 42, 43, 43, 44,
+ 38, 38, 38, 38, 38, 67, 42, 38,
+ 68, 43, 43, 44, 38, 38, 38, 38,
+ 38, 38, 68, 38, 68, 43, 43, 44,
+ 38, 38, 38, 38, 38, 69, 68, 38,
+ 70, 43, 43, 44, 38, 38, 38, 38,
+ 38, 38, 70, 38, 70, 43, 43, 44,
+ 38, 38, 38, 38, 38, 71, 70, 38,
+ 72, 43, 43, 44, 38, 38, 38, 38,
+ 38, 38, 72, 38, 72, 43, 43, 44,
+ 38, 38, 38, 38, 38, 73, 72, 38,
+ 74, 43, 43, 44, 38, 38, 38, 38,
+ 38, 38, 74, 38, 74, 43, 43, 44,
+ 38, 38, 38, 38, 38, 75, 74, 38,
+ 77, 78, 76, 76, 76, 76, 76, 76,
+ 76, 76, 76, 76, 76, 76, 76, 77,
+ 76, 79, 76, 80, 81, 81, 82, 76,
+ 76, 76, 76, 76, 76, 80, 76, 83,
+ 83, 82, 76, 82, 76, 84, 84, 85,
+ 76, 86, 86, 85, 76, 85, 76, 87,
+ 87, 88, 76, 89, 89, 88, 76, 88,
+ 76, 90, 90, 91, 76, 92, 92, 91,
+ 76, 91, 76, 93, 76, 94, 76, 95,
+ 76, 96, 90, 90, 91, 76, 97, 76,
+ 98, 76, 99, 87, 87, 88, 76, 100,
+ 76, 101, 76, 102, 84, 84, 85, 76,
+ 103, 76, 104, 76, 80, 81, 81, 82,
+ 76, 76, 76, 76, 76, 105, 80, 76,
+ 106, 81, 81, 82, 76, 76, 76, 76,
+ 76, 76, 106, 76, 106, 81, 81, 82,
+ 76, 76, 76, 76, 76, 107, 106, 76,
+ 108, 81, 81, 82, 76, 76, 76, 76,
+ 76, 76, 108, 76, 108, 81, 81, 82,
+ 76, 76, 76, 76, 76, 109, 108, 76,
+ 110, 81, 81, 82, 76, 76, 76, 76,
+ 76, 76, 110, 76, 110, 81, 81, 82,
+ 76, 76, 76, 76, 76, 111, 110, 76,
+ 112, 81, 81, 82, 76, 76, 76, 76,
+ 76, 76, 112, 76, 112, 81, 81, 82,
+ 76, 76, 76, 76, 76, 113, 112, 76,
+ 115, 116, 114, 114, 114, 114, 114, 114,
+ 114, 114, 117, 117, 114, 114, 118, 119,
+ 114, 121, 122, 123, 124, 6, 125, 126,
+ 127, 120, 120, 37, 128, 120, 129, 122,
+ 124, 124, 6, 125, 126, 127, 120, 120,
+ 120, 128, 120, 122, 124, 124, 6, 125,
+ 126, 127, 120, 120, 120, 128, 120, 130,
+ 120, 120, 120, 19, 131, 120, 125, 126,
+ 120, 120, 120, 120, 132, 120, 130, 120,
+ 133, 134, 135, 136, 6, 125, 126, 127,
+ 120, 120, 35, 137, 120, 138, 134, 136,
+ 136, 6, 125, 126, 127, 120, 120, 120,
+ 137, 120, 134, 136, 136, 6, 125, 126,
+ 127, 120, 120, 120, 137, 120, 139, 120,
+ 120, 120, 19, 140, 120, 125, 126, 120,
+ 120, 120, 120, 132, 120, 139, 120, 141,
+ 142, 143, 144, 6, 125, 126, 127, 120,
+ 120, 33, 145, 120, 146, 142, 144, 144,
+ 6, 125, 126, 127, 120, 120, 120, 145,
+ 120, 142, 144, 144, 6, 125, 126, 127,
+ 120, 120, 120, 145, 120, 147, 120, 120,
+ 120, 19, 148, 120, 125, 126, 120, 120,
+ 120, 120, 132, 120, 147, 120, 149, 150,
+ 151, 152, 6, 125, 126, 127, 120, 120,
+ 31, 153, 120, 154, 150, 152, 152, 6,
+ 125, 126, 127, 120, 120, 120, 153, 120,
+ 150, 152, 152, 6, 125, 126, 127, 120,
+ 120, 120, 153, 120, 155, 120, 120, 120,
+ 19, 156, 120, 125, 126, 120, 120, 120,
+ 120, 132, 120, 155, 120, 157, 158, 159,
+ 160, 6, 125, 126, 127, 120, 120, 29,
+ 161, 120, 162, 158, 160, 160, 6, 125,
+ 126, 127, 120, 120, 120, 161, 120, 158,
+ 160, 160, 6, 125, 126, 127, 120, 120,
+ 120, 161, 120, 19, 19, 120, 125, 126,
+ 120, 120, 120, 120, 132, 120, 125, 126,
+ 120, 120, 120, 120, 132, 120, 163, 120,
+ 120, 120, 126, 120, 120, 120, 120, 132,
+ 120, 126, 120, 120, 120, 120, 132, 120,
+ 164, 120, 165, 120, 166, 120, 120, 120,
+ 126, 120, 120, 120, 3, 120, 2, 120,
+ 120, 120, 120, 120, 126, 120, 126, 120,
+ 165, 120, 120, 120, 120, 120, 126, 120,
+ 19, 120, 125, 126, 120, 120, 120, 120,
+ 132, 120, 167, 28, 168, 169, 9, 125,
+ 126, 120, 120, 120, 120, 132, 120, 28,
+ 168, 169, 9, 125, 126, 120, 120, 120,
+ 120, 132, 120, 168, 168, 9, 125, 126,
+ 120, 120, 120, 120, 132, 120, 170, 25,
+ 171, 172, 12, 125, 126, 120, 120, 120,
+ 120, 132, 120, 25, 171, 172, 12, 125,
+ 126, 120, 120, 120, 120, 132, 120, 171,
+ 171, 12, 125, 126, 120, 120, 120, 120,
+ 132, 120, 173, 22, 174, 175, 15, 125,
+ 126, 120, 120, 120, 120, 132, 120, 22,
+ 174, 175, 15, 125, 126, 120, 120, 120,
+ 120, 132, 120, 174, 174, 15, 125, 126,
+ 120, 120, 120, 120, 132, 120, 176, 19,
+ 120, 177, 120, 125, 126, 120, 120, 120,
+ 120, 132, 120, 19, 120, 177, 120, 125,
+ 126, 120, 120, 120, 120, 132, 120, 158,
+ 160, 160, 6, 125, 126, 120, 120, 120,
+ 120, 161, 120, 1, 2, 120, 120, 19,
+ 19, 120, 125, 126, 120, 120, 120, 120,
+ 132, 120, 1, 120, 157, 158, 160, 160,
+ 6, 125, 126, 127, 120, 120, 120, 161,
+ 120, 155, 120, 120, 120, 120, 120, 120,
+ 125, 126, 120, 120, 120, 120, 132, 120,
+ 155, 120, 155, 120, 120, 120, 120, 156,
+ 120, 125, 126, 120, 120, 120, 120, 132,
+ 120, 155, 120, 155, 2, 120, 120, 19,
+ 156, 120, 125, 126, 120, 120, 120, 120,
+ 132, 120, 155, 120, 149, 150, 152, 152,
+ 6, 125, 126, 127, 120, 120, 120, 153,
+ 120, 147, 120, 120, 120, 120, 120, 120,
+ 125, 126, 120, 120, 120, 120, 132, 120,
+ 147, 120, 147, 120, 120, 120, 120, 148,
+ 120, 125, 126, 120, 120, 120, 120, 132,
+ 120, 147, 120, 147, 2, 120, 120, 19,
+ 148, 120, 125, 126, 120, 120, 120, 120,
+ 132, 120, 147, 120, 141, 142, 144, 144,
+ 6, 125, 126, 127, 120, 120, 120, 145,
+ 120, 139, 120, 120, 120, 120, 120, 120,
+ 125, 126, 120, 120, 120, 120, 132, 120,
+ 139, 120, 139, 120, 120, 120, 120, 140,
+ 120, 125, 126, 120, 120, 120, 120, 132,
+ 120, 139, 120, 139, 2, 120, 120, 19,
+ 140, 120, 125, 126, 120, 120, 120, 120,
+ 132, 120, 139, 120, 133, 134, 136, 136,
+ 6, 125, 126, 127, 120, 120, 120, 137,
+ 120, 130, 120, 120, 120, 120, 120, 120,
+ 125, 126, 120, 120, 120, 120, 132, 120,
+ 130, 120, 130, 120, 120, 120, 120, 131,
+ 120, 125, 126, 120, 120, 120, 120, 132,
+ 120, 130, 120, 130, 2, 120, 120, 19,
+ 131, 120, 125, 126, 120, 120, 120, 120,
+ 132, 120, 130, 120, 121, 122, 124, 124,
+ 6, 125, 126, 127, 120, 120, 120, 128,
+ 120, 179, 180, 181, 182, 44, 183, 184,
+ 178, 178, 178, 75, 185, 178, 186, 180,
+ 187, 182, 44, 183, 184, 178, 178, 178,
+ 178, 185, 178, 180, 187, 182, 44, 183,
+ 184, 178, 178, 178, 178, 185, 178, 188,
+ 178, 178, 178, 57, 189, 178, 183, 184,
+ 178, 178, 178, 178, 190, 178, 188, 178,
+ 191, 192, 193, 194, 44, 183, 184, 178,
+ 178, 178, 73, 195, 178, 196, 192, 194,
+ 194, 44, 183, 184, 178, 178, 178, 178,
+ 195, 178, 192, 194, 194, 44, 183, 184,
+ 178, 178, 178, 178, 195, 178, 197, 178,
+ 178, 178, 57, 198, 178, 183, 184, 178,
+ 178, 178, 178, 190, 178, 197, 178, 199,
+ 200, 201, 202, 44, 183, 184, 178, 178,
+ 178, 71, 203, 178, 204, 200, 202, 202,
+ 44, 183, 184, 178, 178, 178, 178, 203,
+ 178, 200, 202, 202, 44, 183, 184, 178,
+ 178, 178, 178, 203, 178, 205, 178, 178,
+ 178, 57, 206, 178, 183, 184, 178, 178,
+ 178, 178, 190, 178, 205, 178, 207, 208,
+ 209, 210, 44, 183, 184, 178, 178, 178,
+ 69, 211, 178, 212, 208, 210, 210, 44,
+ 183, 184, 178, 178, 178, 178, 211, 178,
+ 208, 210, 210, 44, 183, 184, 178, 178,
+ 178, 178, 211, 178, 213, 178, 178, 178,
+ 57, 214, 178, 183, 184, 178, 178, 178,
+ 178, 190, 178, 213, 178, 215, 216, 217,
+ 218, 44, 183, 184, 178, 178, 178, 67,
+ 219, 178, 220, 216, 218, 218, 44, 183,
+ 184, 178, 178, 178, 178, 219, 178, 216,
+ 218, 218, 44, 183, 184, 178, 178, 178,
+ 178, 219, 178, 57, 57, 178, 183, 184,
+ 178, 178, 178, 178, 190, 178, 183, 184,
+ 178, 178, 178, 178, 190, 178, 221, 178,
+ 178, 178, 184, 178, 178, 178, 178, 190,
+ 178, 184, 178, 178, 178, 178, 190, 178,
+ 222, 178, 223, 178, 224, 178, 178, 178,
+ 184, 178, 178, 178, 41, 178, 40, 178,
+ 178, 178, 178, 178, 184, 178, 184, 178,
+ 223, 178, 178, 178, 178, 178, 184, 178,
+ 57, 178, 183, 184, 178, 178, 178, 178,
+ 190, 178, 225, 66, 226, 227, 47, 183,
+ 184, 178, 178, 178, 178, 190, 178, 66,
+ 226, 227, 47, 183, 184, 178, 178, 178,
+ 178, 190, 178, 226, 226, 47, 183, 184,
+ 178, 178, 178, 178, 190, 178, 228, 63,
+ 229, 230, 50, 183, 184, 178, 178, 178,
+ 178, 190, 178, 63, 229, 230, 50, 183,
+ 184, 178, 178, 178, 178, 190, 178, 229,
+ 229, 50, 183, 184, 178, 178, 178, 178,
+ 190, 178, 231, 60, 232, 233, 53, 183,
+ 184, 178, 178, 178, 178, 190, 178, 60,
+ 232, 233, 53, 183, 184, 178, 178, 178,
+ 178, 190, 178, 232, 232, 53, 183, 184,
+ 178, 178, 178, 178, 190, 178, 234, 57,
+ 178, 235, 178, 183, 184, 178, 178, 178,
+ 178, 190, 178, 57, 178, 235, 178, 183,
+ 184, 178, 178, 178, 178, 190, 178, 39,
+ 40, 178, 178, 57, 57, 178, 183, 184,
+ 178, 178, 178, 178, 190, 178, 39, 178,
+ 215, 216, 218, 218, 44, 183, 184, 178,
+ 178, 178, 178, 219, 178, 213, 178, 178,
+ 178, 178, 178, 178, 183, 184, 178, 178,
+ 178, 178, 190, 178, 213, 178, 213, 178,
+ 178, 178, 178, 214, 178, 183, 184, 178,
+ 178, 178, 178, 190, 178, 213, 178, 213,
+ 40, 178, 178, 57, 214, 178, 183, 184,
+ 178, 178, 178, 178, 190, 178, 213, 178,
+ 207, 208, 210, 210, 44, 183, 184, 178,
+ 178, 178, 178, 211, 178, 205, 178, 178,
+ 178, 178, 178, 178, 183, 184, 178, 178,
+ 178, 178, 190, 178, 205, 178, 205, 178,
+ 178, 178, 178, 206, 178, 183, 184, 178,
+ 178, 178, 178, 190, 178, 205, 178, 205,
+ 40, 178, 178, 57, 206, 178, 183, 184,
+ 178, 178, 178, 178, 190, 178, 205, 178,
+ 199, 200, 202, 202, 44, 183, 184, 178,
+ 178, 178, 178, 203, 178, 197, 178, 178,
+ 178, 178, 178, 178, 183, 184, 178, 178,
+ 178, 178, 190, 178, 197, 178, 197, 178,
+ 178, 178, 178, 198, 178, 183, 184, 178,
+ 178, 178, 178, 190, 178, 197, 178, 197,
+ 40, 178, 178, 57, 198, 178, 183, 184,
+ 178, 178, 178, 178, 190, 178, 197, 178,
+ 191, 192, 194, 194, 44, 183, 184, 178,
+ 178, 178, 178, 195, 178, 188, 178, 178,
+ 178, 178, 178, 178, 183, 184, 178, 178,
+ 178, 178, 190, 178, 188, 178, 188, 178,
+ 178, 178, 178, 189, 178, 183, 184, 178,
+ 178, 178, 178, 190, 178, 188, 178, 74,
+ 43, 43, 44, 178, 178, 178, 178, 178,
+ 178, 74, 178, 188, 40, 178, 178, 57,
+ 189, 178, 183, 184, 178, 178, 178, 178,
+ 190, 178, 188, 178, 179, 180, 187, 182,
+ 44, 183, 184, 178, 178, 178, 178, 185,
+ 178, 237, 238, 239, 240, 82, 241, 242,
+ 236, 236, 236, 113, 243, 236, 244, 238,
+ 240, 240, 82, 241, 242, 236, 236, 236,
+ 236, 243, 236, 238, 240, 240, 82, 241,
+ 242, 236, 236, 236, 236, 243, 236, 245,
+ 236, 236, 236, 95, 246, 236, 241, 242,
+ 236, 236, 236, 236, 247, 236, 245, 236,
+ 248, 249, 250, 251, 82, 241, 242, 236,
+ 236, 236, 111, 252, 236, 253, 249, 251,
+ 251, 82, 241, 242, 236, 236, 236, 236,
+ 252, 236, 249, 251, 251, 82, 241, 242,
+ 236, 236, 236, 236, 252, 236, 254, 236,
+ 236, 236, 95, 255, 236, 241, 242, 236,
+ 236, 236, 236, 247, 236, 254, 236, 256,
+ 257, 258, 259, 82, 241, 242, 236, 236,
+ 236, 109, 260, 236, 261, 257, 259, 259,
+ 82, 241, 242, 236, 236, 236, 236, 260,
+ 236, 257, 259, 259, 82, 241, 242, 236,
+ 236, 236, 236, 260, 236, 262, 236, 236,
+ 236, 95, 263, 236, 241, 242, 236, 236,
+ 236, 236, 247, 236, 262, 236, 264, 265,
+ 266, 267, 82, 241, 242, 236, 236, 236,
+ 107, 268, 236, 269, 265, 267, 267, 82,
+ 241, 242, 236, 236, 236, 236, 268, 236,
+ 265, 267, 267, 82, 241, 242, 236, 236,
+ 236, 236, 268, 236, 270, 236, 236, 236,
+ 95, 271, 236, 241, 242, 236, 236, 236,
+ 236, 247, 236, 270, 236, 272, 273, 274,
+ 275, 82, 241, 242, 236, 236, 236, 105,
+ 276, 236, 277, 273, 275, 275, 82, 241,
+ 242, 236, 236, 236, 236, 276, 236, 273,
+ 275, 275, 82, 241, 242, 236, 236, 236,
+ 236, 276, 236, 95, 95, 236, 241, 242,
+ 236, 236, 236, 236, 247, 236, 241, 242,
+ 236, 236, 236, 236, 247, 236, 278, 236,
+ 236, 236, 242, 236, 236, 236, 236, 247,
+ 236, 242, 236, 236, 236, 236, 247, 236,
+ 279, 236, 280, 236, 281, 236, 236, 236,
+ 242, 236, 236, 236, 79, 236, 78, 236,
+ 236, 236, 236, 236, 242, 236, 242, 236,
+ 280, 236, 236, 236, 236, 236, 242, 236,
+ 95, 236, 241, 242, 236, 236, 236, 236,
+ 247, 236, 282, 104, 283, 284, 85, 241,
+ 242, 236, 236, 236, 236, 247, 236, 104,
+ 283, 284, 85, 241, 242, 236, 236, 236,
+ 236, 247, 236, 283, 283, 85, 241, 242,
+ 236, 236, 236, 236, 247, 236, 285, 101,
+ 286, 287, 88, 241, 242, 236, 236, 236,
+ 236, 247, 236, 101, 286, 287, 88, 241,
+ 242, 236, 236, 236, 236, 247, 236, 286,
+ 286, 88, 241, 242, 236, 236, 236, 236,
+ 247, 236, 288, 98, 289, 290, 91, 241,
+ 242, 236, 236, 236, 236, 247, 236, 98,
+ 289, 290, 91, 241, 242, 236, 236, 236,
+ 236, 247, 236, 289, 289, 91, 241, 242,
+ 236, 236, 236, 236, 247, 236, 291, 95,
+ 236, 292, 236, 241, 242, 236, 236, 236,
+ 236, 247, 236, 95, 236, 292, 236, 241,
+ 242, 236, 236, 236, 236, 247, 236, 77,
+ 78, 236, 236, 95, 95, 236, 241, 242,
+ 236, 236, 236, 236, 247, 236, 77, 236,
+ 272, 273, 275, 275, 82, 241, 242, 236,
+ 236, 236, 236, 276, 236, 270, 236, 236,
+ 236, 236, 236, 236, 241, 242, 236, 236,
+ 236, 236, 247, 236, 270, 236, 270, 236,
+ 236, 236, 236, 271, 236, 241, 242, 236,
+ 236, 236, 236, 247, 236, 270, 236, 270,
+ 78, 236, 236, 95, 271, 236, 241, 242,
+ 236, 236, 236, 236, 247, 236, 270, 236,
+ 264, 265, 267, 267, 82, 241, 242, 236,
+ 236, 236, 236, 268, 236, 262, 236, 236,
+ 236, 236, 236, 236, 241, 242, 236, 236,
+ 236, 236, 247, 236, 262, 236, 262, 236,
+ 236, 236, 236, 263, 236, 241, 242, 236,
+ 236, 236, 236, 247, 236, 262, 236, 262,
+ 78, 236, 236, 95, 263, 236, 241, 242,
+ 236, 236, 236, 236, 247, 236, 262, 236,
+ 256, 257, 259, 259, 82, 241, 242, 236,
+ 236, 236, 236, 260, 236, 254, 236, 236,
+ 236, 236, 236, 236, 241, 242, 236, 236,
+ 236, 236, 247, 236, 254, 236, 254, 236,
+ 236, 236, 236, 255, 236, 241, 242, 236,
+ 236, 236, 236, 247, 236, 254, 236, 254,
+ 78, 236, 236, 95, 255, 236, 241, 242,
+ 236, 236, 236, 236, 247, 236, 254, 236,
+ 248, 249, 251, 251, 82, 241, 242, 236,
+ 236, 236, 236, 252, 236, 245, 236, 236,
+ 236, 236, 236, 236, 241, 242, 236, 236,
+ 236, 236, 247, 236, 245, 236, 245, 236,
+ 236, 236, 236, 246, 236, 241, 242, 236,
+ 236, 236, 236, 247, 236, 245, 236, 245,
+ 78, 236, 236, 95, 246, 236, 241, 242,
+ 236, 236, 236, 236, 247, 236, 245, 236,
+ 237, 238, 240, 240, 82, 241, 242, 236,
+ 236, 236, 236, 243, 236, 115, 116, 293,
+ 293, 293, 293, 293, 293, 293, 293, 117,
+ 117, 293, 293, 293, 115, 293, 121, 294,
+ 123, 124, 6, 125, 126, 127, 120, 120,
+ 37, 128, 120, 130, 116, 120, 120, 19,
+ 131, 120, 125, 126, 120, 117, 117, 120,
+ 132, 120, 130, 120, 0
+};
+
+static const short _indic_syllable_machine_trans_targs[] = {
+ 105, 130, 132, 133, 134, 3, 135, 4,
+ 6, 138, 7, 9, 141, 10, 12, 144,
+ 13, 15, 16, 126, 18, 19, 143, 21,
+ 22, 140, 24, 25, 137, 148, 150, 152,
+ 154, 156, 158, 160, 162, 164, 105, 189,
+ 191, 192, 193, 38, 194, 39, 41, 197,
+ 42, 44, 200, 45, 47, 203, 48, 50,
+ 51, 185, 53, 54, 202, 56, 57, 199,
+ 59, 60, 196, 206, 208, 210, 212, 214,
+ 216, 218, 220, 223, 105, 248, 250, 251,
+ 252, 73, 253, 74, 76, 256, 77, 79,
+ 259, 80, 82, 262, 83, 85, 86, 244,
+ 88, 89, 261, 91, 92, 258, 94, 95,
+ 255, 265, 267, 269, 271, 273, 275, 277,
+ 279, 281, 105, 106, 165, 224, 282, 283,
+ 105, 107, 109, 34, 33, 127, 129, 146,
+ 163, 108, 110, 161, 0, 111, 113, 32,
+ 31, 159, 112, 114, 157, 115, 117, 30,
+ 29, 155, 116, 118, 153, 119, 121, 28,
+ 27, 151, 120, 122, 149, 123, 125, 26,
+ 2, 147, 124, 128, 105, 131, 1, 136,
+ 5, 23, 139, 8, 20, 142, 11, 17,
+ 145, 14, 105, 166, 168, 69, 221, 186,
+ 188, 222, 167, 68, 169, 219, 35, 170,
+ 172, 67, 66, 217, 171, 173, 215, 174,
+ 176, 65, 64, 213, 175, 177, 211, 178,
+ 180, 63, 62, 209, 179, 181, 207, 182,
+ 184, 61, 37, 205, 183, 187, 105, 190,
+ 36, 195, 40, 58, 198, 43, 55, 201,
+ 46, 52, 204, 49, 105, 225, 227, 104,
+ 103, 245, 247, 280, 226, 228, 278, 70,
+ 229, 231, 102, 101, 276, 230, 232, 274,
+ 233, 235, 100, 99, 272, 234, 236, 270,
+ 237, 239, 98, 97, 268, 238, 240, 266,
+ 241, 243, 96, 72, 264, 242, 246, 105,
+ 249, 71, 254, 75, 93, 257, 78, 90,
+ 260, 81, 87, 263, 84, 105, 284
+};
+
+static const char _indic_syllable_machine_trans_actions[] = {
+ 1, 2, 0, 0, 2, 0, 2, 0,
+ 0, 2, 0, 0, 2, 0, 0, 2,
+ 0, 0, 0, 2, 0, 0, 2, 0,
+ 0, 2, 0, 0, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 3, 2,
+ 0, 0, 2, 0, 2, 0, 0, 2,
+ 0, 0, 2, 0, 0, 2, 0, 0,
+ 0, 2, 0, 0, 2, 0, 0, 2,
+ 0, 0, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 4, 2, 0, 0,
+ 2, 0, 2, 0, 0, 2, 0, 0,
+ 2, 0, 0, 2, 0, 0, 0, 2,
+ 0, 0, 2, 0, 0, 2, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 7, 2, 2, 2, 0, 2,
+ 8, 2, 2, 0, 0, 2, 0, 2,
+ 2, 2, 2, 2, 0, 2, 2, 0,
+ 0, 2, 2, 2, 2, 2, 2, 0,
+ 0, 2, 2, 2, 2, 2, 2, 0,
+ 0, 2, 2, 2, 2, 2, 2, 0,
+ 0, 2, 2, 2, 9, 0, 0, 2,
+ 0, 0, 2, 0, 0, 2, 0, 0,
+ 2, 0, 10, 2, 2, 0, 2, 2,
+ 0, 2, 2, 0, 2, 2, 0, 2,
+ 2, 0, 0, 2, 2, 2, 2, 2,
+ 2, 0, 0, 2, 2, 2, 2, 2,
+ 2, 0, 0, 2, 2, 2, 2, 2,
+ 2, 0, 0, 2, 2, 2, 11, 0,
+ 0, 2, 0, 0, 2, 0, 0, 2,
+ 0, 0, 2, 0, 12, 2, 2, 0,
+ 0, 2, 0, 2, 2, 2, 2, 0,
+ 2, 2, 0, 0, 2, 2, 2, 2,
+ 2, 2, 0, 0, 2, 2, 2, 2,
+ 2, 2, 0, 0, 2, 2, 2, 2,
+ 2, 2, 0, 0, 2, 2, 2, 13,
+ 0, 0, 2, 0, 0, 2, 0, 0,
+ 2, 0, 0, 2, 0, 14, 2
+};
+
+static const char _indic_syllable_machine_to_state_actions[] = {
+ 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, 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, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 5, 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, 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,
+ 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, 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, 0, 0,
+ 0, 0, 0, 0, 0
+};
+
+static const char _indic_syllable_machine_from_state_actions[] = {
+ 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, 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, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 6, 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, 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,
+ 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, 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, 0, 0,
+ 0, 0, 0, 0, 0
+};
+
+static const short _indic_syllable_machine_eof_trans[] = {
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 77, 77,
+ 77, 77, 77, 77, 77, 77, 77, 77,
+ 77, 77, 77, 77, 77, 77, 77, 77,
+ 77, 77, 77, 77, 77, 77, 77, 77,
+ 77, 77, 77, 77, 77, 77, 77, 77,
+ 77, 0, 121, 121, 121, 121, 121, 121,
+ 121, 121, 121, 121, 121, 121, 121, 121,
+ 121, 121, 121, 121, 121, 121, 121, 121,
+ 121, 121, 121, 121, 121, 121, 121, 121,
+ 121, 121, 121, 121, 121, 121, 121, 121,
+ 121, 121, 121, 121, 121, 121, 121, 121,
+ 121, 121, 121, 121, 121, 121, 121, 121,
+ 121, 121, 121, 121, 121, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179,
+ 237, 237, 237, 237, 237, 237, 237, 237,
+ 237, 237, 237, 237, 237, 237, 237, 237,
+ 237, 237, 237, 237, 237, 237, 237, 237,
+ 237, 237, 237, 237, 237, 237, 237, 237,
+ 237, 237, 237, 237, 237, 237, 237, 237,
+ 237, 237, 237, 237, 237, 237, 237, 237,
+ 237, 237, 237, 237, 237, 237, 237, 237,
+ 237, 237, 294, 121, 121
+};
+
+static const int indic_syllable_machine_start = 105;
+static const int indic_syllable_machine_first_final = 105;
+static const int indic_syllable_machine_error = -1;
+
+static const int indic_syllable_machine_en_main = 105;
+
+
+#line 36 "../../src/hb-ot-shape-complex-indic-machine.rl"
+
+
+
+#line 88 "../../src/hb-ot-shape-complex-indic-machine.rl"
+
+
+#define process_syllable(func) \
+ HB_STMT_START { \
+ if (0) fprintf (stderr, "syllable %d..%d %s\n", last, p+1, #func); \
+ for (unsigned int i = last; i < p+1; i++) \
+ info[i].syllable() = syllable_serial; \
+ PASTE (initial_reordering_, func) (plan, buffer, last, p+1); \
+ last = p+1; \
+ syllable_serial++; \
+ if (unlikely (!syllable_serial)) syllable_serial++; \
+ } HB_STMT_END
+
+static void
+find_syllables (const hb_ot_shape_plan_t *plan, hb_buffer_t *buffer)
+{
+ unsigned int p, pe, eof, ts, te, act;
+ int cs;
+ hb_glyph_info_t *info = buffer->info;
+
+#line 759 "../../src/hb-ot-shape-complex-indic-machine.hh.tmp"
+ {
+ cs = indic_syllable_machine_start;
+ ts = 0;
+ te = 0;
+ act = 0;
+ }
+
+#line 110 "../../src/hb-ot-shape-complex-indic-machine.rl"
+
+
+ p = 0;
+ pe = eof = buffer->len;
+
+ unsigned int last = 0;
+ uint8_t syllable_serial = 1;
+
+#line 776 "../../src/hb-ot-shape-complex-indic-machine.hh.tmp"
+ {
+ int _slen;
+ int _trans;
+ const unsigned char *_keys;
+ const short *_inds;
+ if ( p == pe )
+ goto _test_eof;
+_resume:
+ switch ( _indic_syllable_machine_from_state_actions[cs] ) {
+ case 6:
+#line 1 "../../src/hb-ot-shape-complex-indic-machine.rl"
+ {ts = p;}
+ break;
+#line 790 "../../src/hb-ot-shape-complex-indic-machine.hh.tmp"
+ }
+
+ _keys = _indic_syllable_machine_trans_keys + (cs<<1);
+ _inds = _indic_syllable_machine_indicies + _indic_syllable_machine_index_offsets[cs];
+
+ _slen = _indic_syllable_machine_key_spans[cs];
+ _trans = _inds[ _slen > 0 && _keys[0] <=( info[p].indic_category()) &&
+ ( info[p].indic_category()) <= _keys[1] ?
+ ( info[p].indic_category()) - _keys[0] : _slen ];
+
+_eof_trans:
+ cs = _indic_syllable_machine_trans_targs[_trans];
+
+ if ( _indic_syllable_machine_trans_actions[_trans] == 0 )
+ goto _again;
+
+ switch ( _indic_syllable_machine_trans_actions[_trans] ) {
+ case 2:
+#line 1 "../../src/hb-ot-shape-complex-indic-machine.rl"
+ {te = p+1;}
+ break;
+ case 9:
+#line 81 "../../src/hb-ot-shape-complex-indic-machine.rl"
+ {te = p+1;{ process_syllable (consonant_syllable); }}
+ break;
+ case 11:
+#line 82 "../../src/hb-ot-shape-complex-indic-machine.rl"
+ {te = p+1;{ process_syllable (vowel_syllable); }}
+ break;
+ case 13:
+#line 83 "../../src/hb-ot-shape-complex-indic-machine.rl"
+ {te = p+1;{ process_syllable (standalone_cluster); }}
+ break;
+ case 7:
+#line 84 "../../src/hb-ot-shape-complex-indic-machine.rl"
+ {te = p+1;{ process_syllable (non_indic); }}
+ break;
+ case 8:
+#line 81 "../../src/hb-ot-shape-complex-indic-machine.rl"
+ {te = p;p--;{ process_syllable (consonant_syllable); }}
+ break;
+ case 10:
+#line 82 "../../src/hb-ot-shape-complex-indic-machine.rl"
+ {te = p;p--;{ process_syllable (vowel_syllable); }}
+ break;
+ case 12:
+#line 83 "../../src/hb-ot-shape-complex-indic-machine.rl"
+ {te = p;p--;{ process_syllable (standalone_cluster); }}
+ break;
+ case 14:
+#line 84 "../../src/hb-ot-shape-complex-indic-machine.rl"
+ {te = p;p--;{ process_syllable (non_indic); }}
+ break;
+ case 1:
+#line 81 "../../src/hb-ot-shape-complex-indic-machine.rl"
+ {{p = ((te))-1;}{ process_syllable (consonant_syllable); }}
+ break;
+ case 3:
+#line 82 "../../src/hb-ot-shape-complex-indic-machine.rl"
+ {{p = ((te))-1;}{ process_syllable (vowel_syllable); }}
+ break;
+ case 4:
+#line 83 "../../src/hb-ot-shape-complex-indic-machine.rl"
+ {{p = ((te))-1;}{ process_syllable (standalone_cluster); }}
+ break;
+#line 856 "../../src/hb-ot-shape-complex-indic-machine.hh.tmp"
+ }
+
+_again:
+ switch ( _indic_syllable_machine_to_state_actions[cs] ) {
+ case 5:
+#line 1 "../../src/hb-ot-shape-complex-indic-machine.rl"
+ {ts = 0;}
+ break;
+#line 865 "../../src/hb-ot-shape-complex-indic-machine.hh.tmp"
+ }
+
+ if ( ++p != pe )
+ goto _resume;
+ _test_eof: {}
+ if ( p == eof )
+ {
+ if ( _indic_syllable_machine_eof_trans[cs] > 0 ) {
+ _trans = _indic_syllable_machine_eof_trans[cs] - 1;
+ goto _eof_trans;
+ }
+ }
+
+ }
+
+#line 119 "../../src/hb-ot-shape-complex-indic-machine.rl"
+
+}
+
+#endif /* HB_OT_SHAPE_COMPLEX_INDIC_MACHINE_HH */
diff --git a/src/hb-ot-shape-complex-indic-machine.rl b/src/hb-ot-shape-complex-indic-machine.rl
new file mode 100644
index 0000000..b6a372e
--- /dev/null
+++ b/src/hb-ot-shape-complex-indic-machine.rl
@@ -0,0 +1,122 @@
+/*
+ * 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_INDIC_MACHINE_HH
+#define HB_OT_SHAPE_COMPLEX_INDIC_MACHINE_HH
+
+#include "hb-private.hh"
+
+%%{
+ machine indic_syllable_machine;
+ alphtype unsigned char;
+ write data;
+}%%
+
+%%{
+
+# Same order as enum indic_category_t. Not sure how to avoid duplication.
+X = 0;
+C = 1;
+V = 2;
+N = 3;
+H = 4;
+ZWNJ = 5;
+ZWJ = 6;
+M = 7;
+SM = 8;
+VD = 9;
+A = 10;
+NBSP = 11;
+DOTTEDCIRCLE = 12;
+RS = 13;
+Coeng = 14;
+Repha = 15;
+Ra = 16;
+
+c = (C | Ra); # is_consonant
+n = ((ZWNJ?.RS)? (N.N?)?); # is_consonant_modifier
+z = ZWJ|ZWNJ; # is_joiner
+h = H | Coeng; # is_halant_or_coeng
+reph = (Ra H | Repha); # possible reph
+
+cn = c.n?;
+forced_rakar = ZWJ H ZWJ Ra;
+matra_group = z{0,3}.M.N?.(H | forced_rakar)?;
+syllable_tail = (SM.ZWNJ?)? (Coeng (cn|V))? (VD VD?)?;
+place_holder = NBSP | DOTTEDCIRCLE;
+halant_group = (z?.h.ZWJ?);
+final_halant_group = halant_group | h.ZWNJ;
+halant_or_matra_group = (final_halant_group | matra_group{0,4});
+
+
+consonant_syllable = Repha? (cn.halant_group){0,4} cn A? halant_or_matra_group? syllable_tail;
+vowel_syllable = reph? V.n? (ZWJ | (halant_group.cn){0,4} halant_or_matra_group? syllable_tail);
+standalone_cluster = reph? place_holder.n? (halant_group.cn){0,4} halant_or_matra_group? syllable_tail;
+other = any;
+
+main := |*
+ consonant_syllable => { process_syllable (consonant_syllable); };
+ vowel_syllable => { process_syllable (vowel_syllable); };
+ standalone_cluster => { process_syllable (standalone_cluster); };
+ other => { process_syllable (non_indic); };
+*|;
+
+
+}%%
+
+#define process_syllable(func) \
+ HB_STMT_START { \
+ if (0) fprintf (stderr, "syllable %d..%d %s\n", last, p+1, #func); \
+ for (unsigned int i = last; i < p+1; i++) \
+ info[i].syllable() = syllable_serial; \
+ PASTE (initial_reordering_, func) (plan, buffer, last, p+1); \
+ last = p+1; \
+ syllable_serial++; \
+ if (unlikely (!syllable_serial)) syllable_serial++; \
+ } HB_STMT_END
+
+static void
+find_syllables (const hb_ot_shape_plan_t *plan, hb_buffer_t *buffer)
+{
+ unsigned int p, pe, eof, ts, te, act;
+ int cs;
+ hb_glyph_info_t *info = buffer->info;
+ %%{
+ write init;
+ getkey info[p].indic_category();
+ }%%
+
+ p = 0;
+ pe = eof = buffer->len;
+
+ unsigned int last = 0;
+ uint8_t syllable_serial = 1;
+ %%{
+ write exec;
+ }%%
+}
+
+#endif /* HB_OT_SHAPE_COMPLEX_INDIC_MACHINE_HH */
diff --git a/src/hb-ot-shape-complex-indic-private.hh b/src/hb-ot-shape-complex-indic-private.hh
new file mode 100644
index 0000000..79daba5
--- /dev/null
+++ b/src/hb-ot-shape-complex-indic-private.hh
@@ -0,0 +1,387 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OT_SHAPE_COMPLEX_INDIC_PRIVATE_HH
+#define HB_OT_SHAPE_COMPLEX_INDIC_PRIVATE_HH
+
+#include "hb-private.hh"
+
+
+#include "hb-ot-shape-complex-private.hh"
+#include "hb-ot-shape-private.hh" /* XXX Remove */
+
+
+/* buffer var allocations */
+#define indic_category() complex_var_u8_0() /* indic_category_t */
+#define indic_position() complex_var_u8_1() /* indic_matra_category_t */
+
+
+#define INDIC_TABLE_ELEMENT_TYPE uint8_t
+
+/* Cateories used in the OpenType spec:
+ * https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx
+ */
+/* Note: This enum is duplicated in the -machine.rl source file.
+ * Not sure how to avoid duplication. */
+enum indic_category_t {
+ OT_X = 0,
+ OT_C,
+ OT_V,
+ OT_N,
+ OT_H,
+ OT_ZWNJ,
+ OT_ZWJ,
+ OT_M,
+ OT_SM,
+ OT_VD,
+ OT_A,
+ OT_NBSP,
+ OT_DOTTEDCIRCLE, /* Not in the spec, but special in Uniscribe. /Very very/ special! */
+ OT_RS, /* Register Shifter, used in Khmer OT spec */
+ OT_Coeng,
+ OT_Repha,
+ OT_Ra /* Not explicitly listed in the OT spec, but used in the grammar. */
+};
+
+/* Visual positions in a syllable from left to right. */
+enum indic_position_t {
+ POS_START,
+
+ POS_RA_TO_BECOME_REPH,
+ POS_PRE_M,
+ POS_PRE_C,
+
+ POS_BASE_C,
+ POS_AFTER_MAIN,
+
+ POS_ABOVE_C,
+
+ POS_BEFORE_SUB,
+ POS_BELOW_C,
+ POS_AFTER_SUB,
+
+ POS_BEFORE_POST,
+ POS_POST_C,
+ POS_AFTER_POST,
+
+ POS_FINAL_C,
+ POS_SMVD,
+
+ POS_END
+};
+
+/* Categories used in IndicSyllabicCategory.txt from UCD. */
+enum indic_syllabic_category_t {
+ INDIC_SYLLABIC_CATEGORY_OTHER = OT_X,
+
+ INDIC_SYLLABIC_CATEGORY_AVAGRAHA = OT_X,
+ INDIC_SYLLABIC_CATEGORY_BINDU = OT_SM,
+ INDIC_SYLLABIC_CATEGORY_CONSONANT = OT_C,
+ INDIC_SYLLABIC_CATEGORY_CONSONANT_DEAD = OT_C,
+ INDIC_SYLLABIC_CATEGORY_CONSONANT_FINAL = OT_C,
+ INDIC_SYLLABIC_CATEGORY_CONSONANT_HEAD_LETTER = OT_C,
+ INDIC_SYLLABIC_CATEGORY_CONSONANT_MEDIAL = OT_C,
+ INDIC_SYLLABIC_CATEGORY_CONSONANT_PLACEHOLDER = OT_NBSP,
+ INDIC_SYLLABIC_CATEGORY_CONSONANT_SUBJOINED = OT_C,
+ INDIC_SYLLABIC_CATEGORY_CONSONANT_REPHA = OT_Repha,
+ INDIC_SYLLABIC_CATEGORY_MODIFYING_LETTER = OT_X,
+ INDIC_SYLLABIC_CATEGORY_NUKTA = OT_N,
+ INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER = OT_RS,
+ INDIC_SYLLABIC_CATEGORY_TONE_LETTER = OT_X,
+ INDIC_SYLLABIC_CATEGORY_TONE_MARK = OT_X,
+ INDIC_SYLLABIC_CATEGORY_VIRAMA = OT_H,
+ INDIC_SYLLABIC_CATEGORY_VISARGA = OT_SM,
+ INDIC_SYLLABIC_CATEGORY_VOWEL = OT_V,
+ INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT = OT_M,
+ INDIC_SYLLABIC_CATEGORY_VOWEL_INDEPENDENT = OT_V
+};
+
+/* Categories used in IndicSMatraCategory.txt from UCD */
+enum indic_matra_category_t {
+ INDIC_MATRA_CATEGORY_NOT_APPLICABLE = POS_END,
+
+ INDIC_MATRA_CATEGORY_LEFT = POS_PRE_C,
+ INDIC_MATRA_CATEGORY_TOP = POS_ABOVE_C,
+ INDIC_MATRA_CATEGORY_BOTTOM = POS_BELOW_C,
+ INDIC_MATRA_CATEGORY_RIGHT = POS_POST_C,
+
+ /* These should resolve to the position of the last part of the split sequence. */
+ INDIC_MATRA_CATEGORY_BOTTOM_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT,
+ INDIC_MATRA_CATEGORY_LEFT_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT,
+ INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM = INDIC_MATRA_CATEGORY_BOTTOM,
+ INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT,
+ INDIC_MATRA_CATEGORY_TOP_AND_LEFT = INDIC_MATRA_CATEGORY_TOP,
+ INDIC_MATRA_CATEGORY_TOP_AND_LEFT_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT,
+ INDIC_MATRA_CATEGORY_TOP_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT,
+
+ INDIC_MATRA_CATEGORY_INVISIBLE = INDIC_MATRA_CATEGORY_NOT_APPLICABLE,
+ INDIC_MATRA_CATEGORY_OVERSTRUCK = INDIC_MATRA_CATEGORY_NOT_APPLICABLE,
+ INDIC_MATRA_CATEGORY_VISUAL_ORDER_LEFT = INDIC_MATRA_CATEGORY_NOT_APPLICABLE
+};
+
+/* Note: We use ASSERT_STATIC_EXPR_ZERO() instead of ASSERT_STATIC_EXPR() and the comma operation
+ * because gcc fails to optimize the latter and fills the table in at runtime. */
+#define INDIC_COMBINE_CATEGORIES(S,M) \
+ (ASSERT_STATIC_EXPR_ZERO (M == INDIC_MATRA_CATEGORY_NOT_APPLICABLE || (S == INDIC_SYLLABIC_CATEGORY_VIRAMA || S == INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT)) + \
+ ASSERT_STATIC_EXPR_ZERO (S < 16 && M < 16) + \
+ ((M << 4) | 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);
+ };
+ abort ();
+}
+
+
+
+/* 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_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 & 0x0F);
+ indic_position_t pos = (indic_position_t) (type >> 4);
+
+
+ /*
+ * Re-assign category
+ */
+
+
+ /* The spec says U+0952 is OT_A. However, testing shows that Uniscribe
+ * treats U+0951..U+0952 all as OT_VD.
+ * TESTS:
+ * U+092E,U+0947,U+0952
+ * U+092E,U+0952,U+0947
+ * U+092E,U+0947,U+0951
+ * U+092E,U+0951,U+0947
+ * */
+ if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x0951, 0x0954)))
+ cat = OT_VD;
+
+ if (unlikely (u == 0x17D1))
+ cat = OT_X;
+ if (cat == OT_X &&
+ unlikely (hb_in_range<hb_codepoint_t> (u, 0x17CB, 0x17D3))) /* Khmer Various signs */
+ {
+ /* These are like Top Matras. */
+ cat = OT_M;
+ pos = POS_ABOVE_C;
+ }
+ if (u == 0x17C6) /* Khmer Bindu doesn't like to be repositioned. */
+ cat = OT_N;
+
+ if (unlikely (u == 0x17D2)) cat = OT_Coeng; /* Khmer coeng */
+ else if (unlikely (u == 0x200C)) cat = OT_ZWNJ;
+ else if (unlikely (u == 0x200D)) cat = OT_ZWJ;
+ else if (unlikely (u == 0x25CC)) cat = OT_DOTTEDCIRCLE;
+ else if (unlikely (u == 0x0A71)) cat = OT_SM; /* GURMUKHI ADDAK. More like consonant medial. like 0A75. */
+
+ if (cat == OT_Repha) {
+ /* There are two kinds of characters marked as Repha:
+ * - The ones that are GenCat=Mn are already positioned visually, ie. after base. (eg. Khmer)
+ * - The ones that are GenCat=Lo is encoded logically, ie. beginning of syllable. (eg. Malayalam)
+ *
+ * We recategorize the first kind to look like a Nukta and attached to the base directly.
+ */
+ if (_hb_glyph_info_get_general_category (&info) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)
+ cat = OT_N;
+ }
+
+
+
+ /*
+ * Re-assign position.
+ */
+
+ if ((FLAG (cat) & CONSONANT_FLAGS))
+ {
+ pos = consonant_position (u);
+ if (is_ra (u))
+ cat = OT_Ra;
+ }
+ else if (cat == OT_M)
+ {
+ pos = matra_position (u, pos);
+ }
+ else if (cat == OT_SM || cat == OT_VD)
+ {
+ pos = POS_SMVD;
+ }
+
+ if (unlikely (u == 0x0B01)) pos = POS_BEFORE_SUB; /* Oriya Bindu is BeforeSub in the spec. */
+
+
+
+ info.indic_category() = cat;
+ info.indic_position() = pos;
+}
+
+
+
+#endif /* HB_OT_SHAPE_COMPLEX_INDIC_PRIVATE_HH */
diff --git a/src/hb-ot-shape-complex-indic-table.hh b/src/hb-ot-shape-complex-indic-table.hh
new file mode 100644
index 0000000..5b4b344
--- /dev/null
+++ b/src/hb-ot-shape-complex-indic-table.hh
@@ -0,0 +1,872 @@
+/* == 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.1.0.txt
+ * # Date: 2011-08-31, 23:54:00 GMT [KW]
+ * # IndicMatraCategory-6.1.0.txt
+ * # Date: 2011-08-31, 23:50:00 GMT [KW]
+ * # Blocks-6.1.0.txt
+ * # Date: 2011-06-14, 18:26: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 --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
new file mode 100644
index 0000000..6fbd5c8
--- /dev/null
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -0,0 +1,1141 @@
+/*
+ * 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
+ */
+
+#include "hb-ot-shape-complex-indic-private.hh"
+#include "hb-ot-layout-private.hh"
+
+
+/*
+ * Global Indic shaper options.
+ */
+
+struct indic_options_t
+{
+ int initialized : 1;
+ int uniscribe_bug_compatible : 1;
+};
+
+union indic_options_union_t {
+ int i;
+ indic_options_t opts;
+};
+ASSERT_STATIC (sizeof (int) == sizeof (indic_options_union_t));
+
+static indic_options_union_t
+indic_options_init (void)
+{
+ indic_options_union_t u;
+ u.i = 0;
+ u.opts.initialized = 1;
+
+ char *c = getenv ("HB_OT_INDIC_OPTIONS");
+ u.opts.uniscribe_bug_compatible = c && strstr (c, "uniscribe-bug-compatible");
+
+ return u;
+}
+
+static inline indic_options_t
+indic_options (void)
+{
+ static indic_options_union_t options;
+
+ if (unlikely (!options.i)) {
+ /* This is idempotent and threadsafe. */
+ options = indic_options_init ();
+ }
+
+ return options.opts;
+}
+
+
+/*
+ * Indic configurations. Note that we do not want to keep every single script-specific
+ * behavior in these tables necessarily. This should mainly be used for per-script
+ * properties that are cheaper keeping here, than in the code. Ie. if, say, one and
+ * only one script has an exception, that one script can be if'ed directly in the code,
+ * instead of adding a new flag in these structs.
+ */
+
+enum base_position_t {
+ BASE_POS_FIRST,
+ BASE_POS_LAST
+};
+enum reph_position_t {
+ REPH_POS_DEFAULT = POS_BEFORE_POST,
+
+ REPH_POS_AFTER_MAIN = POS_AFTER_MAIN,
+ REPH_POS_BEFORE_SUB = POS_BEFORE_SUB,
+ REPH_POS_AFTER_SUB = POS_AFTER_SUB,
+ REPH_POS_BEFORE_POST = POS_BEFORE_POST,
+ REPH_POS_AFTER_POST = POS_AFTER_POST
+};
+enum reph_mode_t {
+ REPH_MODE_IMPLICIT, /* Reph formed out of initial Ra,H sequence. */
+ REPH_MODE_EXPLICIT, /* Reph formed out of initial Ra,H,ZWJ sequence. */
+ REPH_MODE_VIS_REPHA, /* Encoded Repha character, no reordering needed. */
+ REPH_MODE_LOG_REPHA /* Encoded Repha character, needs reordering. */
+};
+struct indic_config_t
+{
+ hb_script_t script;
+ bool has_old_spec;
+ hb_codepoint_t virama;
+ base_position_t base_pos;
+ reph_position_t reph_pos;
+ reph_mode_t reph_mode;
+};
+
+static const indic_config_t indic_configs[] =
+{
+ /* Default. Should be first. */
+ {HB_SCRIPT_INVALID, false, 0,BASE_POS_LAST, REPH_POS_DEFAULT, REPH_MODE_IMPLICIT},
+ {HB_SCRIPT_DEVANAGARI,true, 0x094D,BASE_POS_LAST, REPH_POS_BEFORE_POST,REPH_MODE_IMPLICIT},
+ {HB_SCRIPT_BENGALI, true, 0x09CD,BASE_POS_LAST, REPH_POS_AFTER_SUB, REPH_MODE_IMPLICIT},
+ {HB_SCRIPT_GURMUKHI, true, 0x0A4D,BASE_POS_LAST, REPH_POS_BEFORE_SUB, REPH_MODE_IMPLICIT},
+ {HB_SCRIPT_GUJARATI, true, 0x0ACD,BASE_POS_LAST, REPH_POS_BEFORE_POST,REPH_MODE_IMPLICIT},
+ {HB_SCRIPT_ORIYA, true, 0x0B4D,BASE_POS_LAST, REPH_POS_AFTER_MAIN, REPH_MODE_IMPLICIT},
+ {HB_SCRIPT_TAMIL, true, 0x0BCD,BASE_POS_LAST, REPH_POS_AFTER_POST, REPH_MODE_IMPLICIT},
+ {HB_SCRIPT_TELUGU, true, 0x0C4D,BASE_POS_LAST, REPH_POS_AFTER_POST, REPH_MODE_EXPLICIT},
+ {HB_SCRIPT_KANNADA, true, 0x0CCD,BASE_POS_LAST, REPH_POS_AFTER_POST, REPH_MODE_IMPLICIT},
+ {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},
+};
+
+
+
+/*
+ * Indic shaper.
+ */
+
+struct feature_list_t {
+ hb_tag_t tag;
+ hb_bool_t is_global;
+};
+
+static const feature_list_t
+indic_features[] =
+{
+ /*
+ * Basic features.
+ * These features are applied in order, one at a time, after initial_reordering.
+ */
+ {HB_TAG('n','u','k','t'), true},
+ {HB_TAG('a','k','h','n'), true},
+ {HB_TAG('r','p','h','f'), false},
+ {HB_TAG('r','k','r','f'), true},
+ {HB_TAG('p','r','e','f'), false},
+ {HB_TAG('h','a','l','f'), false},
+ {HB_TAG('b','l','w','f'), false},
+ {HB_TAG('a','b','v','f'), false},
+ {HB_TAG('p','s','t','f'), false},
+ {HB_TAG('c','f','a','r'), false},
+ {HB_TAG('c','j','c','t'), true},
+ {HB_TAG('v','a','t','u'), true},
+ /*
+ * 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},
+ /* 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},
+};
+
+/*
+ * Must be in the same order as the indic_features array.
+ */
+enum {
+ _NUKT,
+ _AKHN,
+ RPHF,
+ _RKRF,
+ PREF,
+ HALF,
+ BLWF,
+ ABVF,
+ PSTF,
+ CFAR,
+ _CJCT,
+ _VATU,
+
+ INIT,
+ _PRES,
+ _ABVS,
+ _BLWS,
+ _PSTS,
+ _HALN,
+ _DIST,
+ _ABVM,
+ _BLWM,
+
+ INDIC_NUM_FEATURES,
+ INDIC_BASIC_FEATURES = INIT /* Don't forget to update this! */
+};
+
+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_indic (hb_ot_shape_planner_t *plan)
+{
+ hb_ot_map_builder_t *map = &plan->map;
+
+ map->add_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'));
+
+
+ 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_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);
+ }
+}
+
+static void
+override_features_indic (hb_ot_shape_planner_t *plan)
+{
+ /* Uniscribe does not apply 'kern'. */
+ if (indic_options ().uniscribe_bug_compatible)
+ plan->map.add_feature (HB_TAG('k','e','r','n'), 0, true);
+}
+
+
+struct would_substitute_feature_t
+{
+ inline void init (const hb_ot_map_t *map, hb_tag_t feature_tag)
+ {
+ map->get_stage_lookups (0/*GSUB*/,
+ map->get_feature_stage (0/*GSUB*/, feature_tag),
+ &lookups, &count);
+ }
+
+ inline bool would_substitute (hb_codepoint_t *glyphs,
+ unsigned int glyphs_count,
+ hb_face_t *face) const
+ {
+ for (unsigned int i = 0; i < count; i++)
+ if (hb_ot_layout_would_substitute_lookup_fast (face, glyphs, glyphs_count, lookups[i].index))
+ return true;
+ return false;
+ }
+
+ private:
+ const hb_ot_map_t::lookup_map_t *lookups;
+ unsigned int count;
+};
+
+struct indic_shape_plan_t
+{
+ ASSERT_POD ();
+
+ inline bool get_virama_glyph (hb_font_t *font, hb_codepoint_t *pglyph) const
+ {
+ hb_codepoint_t glyph = virama_glyph;
+ if (unlikely (virama_glyph == (hb_codepoint_t) -1))
+ {
+ if (!config->virama || !font->get_glyph (config->virama, 0, &glyph))
+ glyph = 0;
+ /* Technically speaking, the spec says we should apply 'locl' to virama too.
+ * Maybe one day... */
+
+ /* Our get_glyph() function needs a font, so we can't get the virama glyph
+ * during shape planning... Instead, overwrite it here. It's safe. Don't worry! */
+ (const_cast<indic_shape_plan_t *> (this))->virama_glyph = glyph;
+ }
+
+ *pglyph = glyph;
+ return glyph != 0;
+ }
+
+ const indic_config_t *config;
+
+ bool is_old_spec;
+ hb_codepoint_t virama_glyph;
+
+ would_substitute_feature_t pref;
+ would_substitute_feature_t blwf;
+ would_substitute_feature_t pstf;
+
+ hb_mask_t mask_array[INDIC_NUM_FEATURES];
+};
+
+static void *
+data_create_indic (const hb_ot_shape_plan_t *plan)
+{
+ indic_shape_plan_t *indic_plan = (indic_shape_plan_t *) calloc (1, sizeof (indic_shape_plan_t));
+ if (unlikely (!indic_plan))
+ return NULL;
+
+ indic_plan->config = &indic_configs[0];
+ for (unsigned int i = 1; i < ARRAY_LENGTH (indic_configs); i++)
+ if (plan->props.script == indic_configs[i].script) {
+ indic_plan->config = &indic_configs[i];
+ break;
+ }
+
+ indic_plan->is_old_spec = indic_plan->config->has_old_spec && ((plan->map.get_chosen_script (0) & 0x000000FF) != '2');
+ indic_plan->virama_glyph = (hb_codepoint_t) -1;
+
+ indic_plan->pref.init (&plan->map, HB_TAG('p','r','e','f'));
+ indic_plan->blwf.init (&plan->map, HB_TAG('b','l','w','f'));
+ 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);
+
+ return indic_plan;
+}
+
+static void
+data_destroy_indic (void *data)
+{
+ free (data);
+}
+
+static indic_position_t
+consonant_position_from_face (const indic_shape_plan_t *indic_plan,
+ hb_codepoint_t *glyphs, unsigned int glyphs_len,
+ hb_face_t *face)
+{
+ if (indic_plan->pref.would_substitute (glyphs, glyphs_len, face)) return POS_BELOW_C;
+ if (indic_plan->blwf.would_substitute (glyphs, glyphs_len, face)) return POS_BELOW_C;
+ if (indic_plan->pstf.would_substitute (glyphs, glyphs_len, face)) return POS_POST_C;
+ return POS_BASE_C;
+}
+
+
+static void
+setup_masks_indic (const hb_ot_shape_plan_t *plan HB_UNUSED,
+ hb_buffer_t *buffer,
+ hb_font_t *font HB_UNUSED)
+{
+ HB_BUFFER_ALLOCATE_VAR (buffer, indic_category);
+ HB_BUFFER_ALLOCATE_VAR (buffer, indic_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_indic_properties (buffer->info[i]);
+}
+
+static int
+compare_indic_order (const hb_glyph_info_t *pa, const hb_glyph_info_t *pb)
+{
+ int a = pa->indic_position();
+ int b = pb->indic_position();
+
+ return a < b ? -1 : a == b ? 0 : +1;
+}
+
+
+
+static void
+update_consonant_positions (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer)
+{
+ const indic_shape_plan_t *indic_plan = (const indic_shape_plan_t *) plan->data;
+
+ unsigned int consonant_pos = indic_plan->is_old_spec ? 0 : 1;
+ hb_codepoint_t glyphs[2];
+ if (indic_plan->get_virama_glyph (font, &glyphs[1 - consonant_pos]))
+ {
+ hb_face_t *face = font->face;
+ unsigned int count = buffer->len;
+ for (unsigned int i = 0; i < count; i++)
+ if (buffer->info[i].indic_position() == POS_BASE_C) {
+ glyphs[consonant_pos] = buffer->info[i].codepoint;
+ buffer->info[i].indic_position() = consonant_position_from_face (indic_plan, glyphs, 2, face);
+ }
+ }
+}
+
+
+/* Rules from:
+ * https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx */
+
+static void
+initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan, hb_buffer_t *buffer,
+ unsigned int start, unsigned int end)
+{
+ const indic_shape_plan_t *indic_plan = (const indic_shape_plan_t *) plan->data;
+ hb_glyph_info_t *info = buffer->info;
+
+
+ /* 1. Find base consonant:
+ *
+ * The shaping engine finds the base consonant of the syllable, using the
+ * following algorithm: starting from the end of the syllable, move backwards
+ * until a consonant is found that does not have a below-base or post-base
+ * form (post-base forms have to follow below-base forms), or that is not a
+ * pre-base reordering Ra, or arrive at the first consonant. The consonant
+ * stopped at will be the base.
+ *
+ * o If the syllable starts with Ra + Halant (in a script that has Reph)
+ * and has more than one consonant, Ra is excluded from candidates for
+ * base consonants.
+ */
+
+ unsigned int base = end;
+ bool has_reph = false;
+
+ {
+ /* -> If the syllable starts with Ra + Halant (in a script that has Reph)
+ * and has more than one consonant, Ra is excluded from candidates for
+ * base consonants. */
+ unsigned int limit = start;
+ if (indic_plan->mask_array[RPHF] &&
+ start + 3 <= end &&
+ info[start].indic_category() == OT_Ra &&
+ info[start + 1].indic_category() == OT_H &&
+ (/* TODO Handle other Reph modes. */
+ (indic_plan->config->reph_mode == REPH_MODE_IMPLICIT && !is_joiner (info[start + 2])) ||
+ (indic_plan->config->reph_mode == REPH_MODE_EXPLICIT && info[start + 2].indic_category() == OT_ZWJ)
+ ))
+ {
+ limit += 2;
+ while (limit < end && is_joiner (info[limit]))
+ limit++;
+ base = start;
+ has_reph = true;
+ };
+
+ switch (indic_plan->config->base_pos == BASE_POS_LAST)
+ {
+ case BASE_POS_LAST:
+ {
+ /* -> starting from the end of the syllable, move backwards */
+ unsigned int i = end;
+ bool seen_below = false;
+ do {
+ i--;
+ /* -> until a consonant is found */
+ if (is_consonant (info[i]))
+ {
+ /* -> that does not have a below-base or post-base form
+ * (post-base forms have to follow below-base forms), */
+ if (info[i].indic_position() != POS_BELOW_C &&
+ (info[i].indic_position() != POS_POST_C || seen_below))
+ {
+ base = i;
+ break;
+ }
+ if (info[i].indic_position() == POS_BELOW_C)
+ seen_below = true;
+
+ /* -> or that is not a pre-base reordering Ra,
+ *
+ * IMPLEMENTATION NOTES:
+ *
+ * Our pre-base reordering Ra's are marked POS_BELOW, so will be skipped
+ * by the logic above already.
+ */
+
+ /* -> or arrive at the first consonant. The consonant stopped at will
+ * be the base. */
+ base = i;
+ }
+ else
+ {
+ /* A ZWJ after a Halant stops the base search, and requests an explicit
+ * half form.
+ * A ZWJ before a Halant, requests a subjoined form instead, and hence
+ * search continues. This is particularly important for Bengali
+ * sequence Ra,H,Ya that shouls form Ya-Phalaa by subjoining Ya. */
+ if (start < i &&
+ info[i].indic_category() == OT_ZWJ &&
+ info[i - 1].indic_category() == OT_H)
+ break;
+ }
+ } while (i > limit);
+ }
+ break;
+
+ case BASE_POS_FIRST:
+ {
+ /* In scripts without half forms (eg. Khmer), the first consonant is always the base. */
+
+ if (!has_reph)
+ base = limit;
+
+ /* Find the last base consonant that is not blocked by ZWJ. If there is
+ * a ZWJ right before a base consonant, that would request a subjoined form. */
+ for (unsigned int i = limit; i < end; i++)
+ if (is_consonant (info[i]) && info[i].indic_position() == POS_BASE_C)
+ {
+ if (limit < i && info[i - 1].indic_category() == OT_ZWJ)
+ break;
+ else
+ base = i;
+ }
+
+ /* Mark all subsequent consonants as below. */
+ for (unsigned int i = base + 1; i < end; i++)
+ if (is_consonant (info[i]) && info[i].indic_position() == POS_BASE_C)
+ info[i].indic_position() = POS_BELOW_C;
+ }
+ break;
+
+ default:
+ abort ();
+ }
+
+ /* -> If the syllable starts with Ra + Halant (in a script that has Reph)
+ * and has more than one consonant, Ra is excluded from candidates for
+ * base consonants.
+ *
+ * Only do this for unforced Reph. (ie. not for Ra,H,ZWJ. */
+ if (has_reph && base == start && start + 2 == limit) {
+ /* 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:
+ *
+ * Each matra and any syllable modifier sign in the cluster are moved to the
+ * appropriate position relative to the consonant(s) in the cluster. The
+ * shaping engine decomposes two- or three-part matras into their constituent
+ * parts before any repositioning. Matra characters are classified by which
+ * consonant in a conjunct they have affinity for and are reordered to the
+ * following positions:
+ *
+ * o Before first half form in the syllable
+ * o After subjoined consonants
+ * o After post-form consonant
+ * o After main consonant (for above marks)
+ *
+ * IMPLEMENTATION NOTES:
+ *
+ * The normalize() routine has already decomposed matras for us, so we don't
+ * need to worry about that.
+ */
+
+
+ /* 3. Reorder marks to canonical order:
+ *
+ * Adjacent nukta and halant or nukta and vedic sign are always repositioned
+ * if necessary, so that the nukta is first.
+ *
+ * IMPLEMENTATION NOTES:
+ *
+ * We don't need to do this: the normalize() routine already did this for us.
+ */
+
+
+ /* Reorder characters */
+
+ for (unsigned int i = start; i < base; i++)
+ info[i].indic_position() = MIN (POS_PRE_C, (indic_position_t) info[i].indic_position());
+
+ if (base < end)
+ info[base].indic_position() = POS_BASE_C;
+
+ /* Mark final consonants. A final consonant is one appearing after a matra,
+ * like in Khmer. */
+ for (unsigned int i = base + 1; i < end; i++)
+ if (info[i].indic_category() == OT_M) {
+ for (unsigned int j = i + 1; j < end; j++)
+ if (is_consonant (info[j])) {
+ info[j].indic_position() = POS_FINAL_C;
+ break;
+ }
+ break;
+ }
+
+ /* Handle beginning Ra */
+ if (has_reph)
+ info[start].indic_position() = POS_RA_TO_BECOME_REPH;
+
+ /* For old-style Indic script tags, move the first post-base Halant after
+ * last consonant. */
+ if (indic_plan->is_old_spec) {
+ for (unsigned int i = base + 1; i < end; i++)
+ if (info[i].indic_category() == OT_H) {
+ unsigned int j;
+ for (j = end - 1; j > i; j--)
+ if (is_consonant (info[j]))
+ break;
+ if (j > i) {
+ /* Move Halant to after last consonant. */
+ hb_glyph_info_t t = info[i];
+ memmove (&info[i], &info[i + 1], (j - i) * sizeof (info[0]));
+ info[j] = t;
+ }
+ break;
+ }
+ }
+
+ /* Attach misc marks to previous char to move with them. */
+ {
+ indic_position_t last_pos = POS_START;
+ for (unsigned int i = start; i < end; i++)
+ {
+ if ((FLAG (info[i].indic_category()) & (JOINER_FLAGS | FLAG (OT_N) | FLAG (OT_RS) | HALANT_OR_COENG_FLAGS)))
+ {
+ info[i].indic_position() = last_pos;
+ if (unlikely (indic_options ().uniscribe_bug_compatible &&
+ info[i].indic_category() == OT_H &&
+ info[i].indic_position() == POS_PRE_M))
+ {
+ /*
+ * Uniscribe doesn't move the Halant with Left Matra.
+ * TEST: U+092B,U+093F,U+094DE
+ */
+ for (unsigned int j = i; j > start; j--)
+ if (info[j - 1].indic_position() != POS_PRE_M) {
+ info[i].indic_position() = info[j - 1].indic_position();
+ break;
+ }
+ }
+ } else if (info[i].indic_position() != POS_SMVD) {
+ last_pos = (indic_position_t) info[i].indic_position();
+ }
+ }
+ }
+ /* Re-attach ZWJ, ZWNJ, and halant to next char, for after-base consonants. */
+ {
+ unsigned int last_halant = end;
+ for (unsigned int i = base + 1; i < end; i++)
+ if (is_halant_or_coeng (info[i]))
+ last_halant = i;
+ else if (is_consonant (info[i])) {
+ for (unsigned int j = last_halant; j < i; j++)
+ if (info[j].indic_position() != POS_SMVD)
+ info[j].indic_position() = info[i].indic_position();
+ }
+ }
+
+ {
+ /* Things are out-of-control for post base positions, they may shuffle
+ * around like crazy, so merge clusters. For pre-base stuff, we handle
+ * cluster issues in final reordering. */
+ buffer->merge_clusters (base, end);
+ /* Sit tight, rock 'n roll! */
+ hb_bubble_sort (info + start, end - start, compare_indic_order);
+ /* Find base again */
+ base = end;
+ for (unsigned int i = start; i < end; i++)
+ if (info[i].indic_position() == POS_BASE_C) {
+ base = i;
+ break;
+ }
+ }
+
+ /* Setup masks now */
+
+ {
+ hb_mask_t mask;
+
+ /* Reph */
+ for (unsigned int i = start; i < end && info[i].indic_position() == POS_RA_TO_BECOME_REPH; i++)
+ info[i].mask |= indic_plan->mask_array[RPHF];
+
+ /* Pre-base */
+ mask = indic_plan->mask_array[HALF];
+ for (unsigned int i = start; i < base; i++)
+ info[i].mask |= mask;
+ /* Base */
+ mask = 0;
+ if (base < end)
+ info[base].mask |= mask;
+ /* Post-base */
+ mask = indic_plan->mask_array[BLWF] | indic_plan->mask_array[ABVF] | indic_plan->mask_array[PSTF];
+ for (unsigned int i = base + 1; i < end; i++)
+ info[i].mask |= mask;
+ }
+
+ /* XXX This will not match for old-Indic spec since the Halant-Ra order is reversed already. */
+ if (indic_plan->mask_array[PREF] && base + 2 < end)
+ {
+ /* Find a Halant,Ra sequence and mark it for pre-base reordering processing. */
+ for (unsigned int i = base + 1; i + 1 < end; i++)
+ if (is_halant_or_coeng (info[i]) &&
+ info[i + 1].indic_category() == OT_Ra)
+ {
+ info[i++].mask |= indic_plan->mask_array[PREF];
+ info[i++].mask |= indic_plan->mask_array[PREF];
+
+ /* Mark the subsequent stuff with 'cfar'. Used in Khmer.
+ * Read the feature spec.
+ * This allows distinguishing the following cases with MS Khmer fonts:
+ * U+1784,U+17D2,U+179A,U+17D2,U+1782
+ * U+1784,U+17D2,U+1782,U+17D2,U+179A
+ */
+ for (; i < end; i++)
+ info[i].mask |= indic_plan->mask_array[CFAR];
+
+ break;
+ }
+ }
+
+ /* Apply ZWJ/ZWNJ effects */
+ for (unsigned int i = start + 1; i < end; i++)
+ if (is_joiner (info[i])) {
+ bool non_joiner = info[i].indic_category() == OT_ZWNJ;
+ unsigned int j = i;
+
+ do {
+ j--;
+
+ /* A ZWJ disables CJCT, however, it's mere presence is enough
+ * to disable ligation. No explicit action needed. */
+
+ /* A ZWNJ disables HALF. */
+ if (non_joiner)
+ info[j].mask &= ~indic_plan->mask_array[HALF];
+
+ } while (j > start && !is_consonant (info[j]));
+ }
+}
+
+
+static void
+initial_reordering_vowel_syllable (const hb_ot_shape_plan_t *plan,
+ hb_buffer_t *buffer,
+ unsigned int start, unsigned int end)
+{
+ /* We made the vowels look like consonants. So let's call the consonant logic! */
+ initial_reordering_consonant_syllable (plan, buffer, start, end);
+}
+
+static void
+initial_reordering_standalone_cluster (const hb_ot_shape_plan_t *plan,
+ hb_buffer_t *buffer,
+ unsigned int start, unsigned int end)
+{
+ /* 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)
+ {
+ /* For dotted-circle, this is what Uniscribe does:
+ * If dotted-circle is the last glyph, it just does nothing.
+ * Ie. It doesn't form Reph. */
+ if (buffer->info[end - 1].indic_category() == OT_DOTTEDCIRCLE)
+ return;
+ }
+
+ initial_reordering_consonant_syllable (plan, buffer, start, end);
+}
+
+static void
+initial_reordering_non_indic (const hb_ot_shape_plan_t *plan 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. */
+}
+
+#include "hb-ot-shape-complex-indic-machine.hh"
+
+static void
+initial_reordering (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer)
+{
+ update_consonant_positions (plan, font, buffer);
+ find_syllables (plan, buffer);
+}
+
+static void
+final_reordering_syllable (const hb_ot_shape_plan_t *plan,
+ hb_buffer_t *buffer,
+ unsigned int start, unsigned int end)
+{
+ const indic_shape_plan_t *indic_plan = (const indic_shape_plan_t *) plan->data;
+ hb_glyph_info_t *info = buffer->info;
+
+ /* 4. Final reordering:
+ *
+ * After the localized forms and basic shaping forms GSUB features have been
+ * applied (see below), the shaping engine performs some final glyph
+ * reordering before applying all the remaining font features to the entire
+ * cluster.
+ */
+
+ /* Find base again */
+ unsigned int base;
+ for (base = start; base < end; base++)
+ if (info[base].indic_position() >= POS_BASE_C) {
+ if (start < base && info[base].indic_position() > POS_BASE_C)
+ base--;
+ break;
+ }
+
+
+ /* o Reorder matras:
+ *
+ * If a pre-base matra character had been reordered before applying basic
+ * features, the glyph can be moved closer to the main consonant based on
+ * whether half-forms had been formed. Actual position for the matra is
+ * defined as “after last standalone halant glyph, after initial matra
+ * position and before the main consonant”. If ZWJ or ZWNJ follow this
+ * halant, position is moved after it.
+ */
+
+ if (start + 1 < end && start < base) /* Otherwise there can't be any pre-base matra characters. */
+ {
+ /* If we lost track of base, alas, position before last thingy. */
+ unsigned int new_pos = base == end ? base - 2 : base - 1;
+
+ /* Malayalam does not have "half" forms or explicit virama forms.
+ * The glyphs formed by 'half' are Chillus. We want to position
+ * matra after them all.
+ */
+ if (buffer->props.script != HB_SCRIPT_MALAYALAM)
+ {
+ while (new_pos > start &&
+ !(is_one_of (info[new_pos], (FLAG (OT_M) | FLAG (OT_H) | FLAG (OT_Coeng)))))
+ new_pos--;
+
+ /* If we found no Halant we are done.
+ * Otherwise only proceed if the Halant does
+ * not belong to the Matra itself! */
+ if (is_halant_or_coeng (info[new_pos]) &&
+ info[new_pos].indic_position() != POS_PRE_M)
+ {
+ /* -> If ZWJ or ZWNJ follow this halant, position is moved after it. */
+ if (new_pos + 1 < end && is_joiner (info[new_pos + 1]))
+ new_pos++;
+ }
+ else
+ new_pos = start; /* No move. */
+ }
+
+ if (start < new_pos)
+ {
+ /* Now go see if there's actually any matras... */
+ for (unsigned int i = new_pos; i > start; i--)
+ if (info[i - 1].indic_position () == POS_PRE_M)
+ {
+ unsigned int old_pos = i - 1;
+ 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;
+ new_pos--;
+ }
+ buffer->merge_clusters (new_pos, MIN (end, base + 1));
+ } else {
+ for (unsigned int i = start; i < base; i++)
+ if (info[i].indic_position () == POS_PRE_M) {
+ buffer->merge_clusters (i, MIN (end, base + 1));
+ break;
+ }
+ }
+ }
+
+
+ /* o Reorder reph:
+ *
+ * Reph’s original position is always at the beginning of the syllable,
+ * (i.e. it is not reordered at the character reordering stage). However,
+ * it will be reordered according to the basic-forms shaping results.
+ * Possible positions for reph, depending on the script, are; after main,
+ * before post-base consonant forms, and after post-base consonant forms.
+ */
+
+ /* If there's anything after the Ra that has the REPH pos, it ought to be halant.
+ * Which means that the font has failed to ligate the Reph. In which case, we
+ * shouldn't move. */
+ if (start + 1 < end &&
+ info[start].indic_position() == POS_RA_TO_BECOME_REPH &&
+ info[start + 1].indic_position() != POS_RA_TO_BECOME_REPH)
+ {
+ unsigned int new_reph_pos;
+ reph_position_t reph_pos = indic_plan->config->reph_pos;
+
+ /* XXX Figure out old behavior too */
+
+ /* 1. If reph should be positioned after post-base consonant forms,
+ * proceed to step 5.
+ */
+ if (reph_pos == REPH_POS_AFTER_POST)
+ {
+ goto reph_step_5;
+ }
+
+ /* 2. If the reph repositioning class is not after post-base: target
+ * position is after the first explicit halant glyph between the
+ * first post-reph consonant and last main consonant. If ZWJ or ZWNJ
+ * are following this halant, position is moved after it. If such
+ * position is found, this is the target position. Otherwise,
+ * proceed to the next step.
+ *
+ * Note: in old-implementation fonts, where classifications were
+ * fixed in shaping engine, there was no case where reph position
+ * will be found on this step.
+ */
+ {
+ new_reph_pos = start + 1;
+ 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 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++;
+ goto reph_move;
+ }
+ }
+
+ /* 3. If reph should be repositioned after the main consonant: find the
+ * first consonant not ligated with main, or find the first
+ * consonant that is not a potential pre-base reordering Ra.
+ */
+ if (reph_pos == REPH_POS_AFTER_MAIN)
+ {
+ new_reph_pos = base;
+ /* XXX Skip potential pre-base reordering Ra. */
+ while (new_reph_pos + 1 < end && info[new_reph_pos + 1].indic_position() <= POS_AFTER_MAIN)
+ new_reph_pos++;
+ if (new_reph_pos < end)
+ goto reph_move;
+ }
+
+ /* 4. If reph should be positioned before post-base consonant, find
+ * first post-base classified consonant not ligated with main. If no
+ * consonant is found, the target position should be before the
+ * first matra, syllable modifier sign or vedic sign.
+ */
+ /* This is our take on what step 4 is trying to say (and failing, BADLY). */
+ if (reph_pos == REPH_POS_AFTER_SUB)
+ {
+ new_reph_pos = base;
+ while (new_reph_pos < end &&
+ !( FLAG (info[new_reph_pos + 1].indic_position()) & (FLAG (POS_POST_C) | FLAG (POS_AFTER_POST) | FLAG (POS_SMVD))))
+ new_reph_pos++;
+ if (new_reph_pos < end)
+ goto reph_move;
+ }
+
+ /* 5. If no consonant is found in steps 3 or 4, move reph to a position
+ * immediately before the first post-base matra, syllable modifier
+ * sign or vedic sign that has a reordering class after the intended
+ * reph position. For example, if the reordering position for reph
+ * is post-main, it will skip above-base matras that also have a
+ * post-main position.
+ */
+ reph_step_5:
+ {
+ /* Copied from step 2. */
+ new_reph_pos = start + 1;
+ 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 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++;
+ goto reph_move;
+ }
+ }
+
+ /* 6. Otherwise, reorder reph to the end of the syllable.
+ */
+ {
+ new_reph_pos = end - 1;
+ while (new_reph_pos > start && info[new_reph_pos].indic_position() == POS_SMVD)
+ new_reph_pos--;
+
+ /*
+ * If the Reph is to be ending up after a Matra,Halant sequence,
+ * position it before that Halant so it can interact with the Matra.
+ * However, if it's a plain Consonant,Halant we shouldn't do that.
+ * Uniscribe doesn't do this.
+ * TEST: U+0930,U+094D,U+0915,U+094B,U+094D
+ */
+ if (!indic_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) {
+ /* Ok, got it. */
+ new_reph_pos--;
+ }
+ }
+ goto reph_move;
+ }
+
+ reph_move:
+ {
+ /* Yay, one big cluster! Merge before moving. */
+ buffer->merge_clusters (start, end);
+
+ /* Move */
+ 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;
+ }
+ }
+
+
+ /* o Reorder pre-base reordering consonants:
+ *
+ * If a pre-base reordering consonant is found, reorder it according to
+ * the following rules:
+ */
+
+ if (indic_plan->mask_array[PREF] && base + 1 < end) /* Otherwise there can't be any pre-base reordering Ra. */
+ {
+ for (unsigned int i = base + 1; i < end; i++)
+ if ((info[i].mask & indic_plan->mask_array[PREF]) != 0)
+ {
+ /* 1. Only reorder a glyph produced by substitution during application
+ * of the <pref> feature. (Note that a font may shape a Ra consonant with
+ * the feature generally but block it in certain contexts.)
+ */
+ if (i + 1 == end || (info[i + 1].mask & indic_plan->mask_array[PREF]) == 0)
+ {
+ /*
+ * 2. Try to find a target position the same way as for pre-base matra.
+ * If it is found, reorder pre-base consonant glyph.
+ *
+ * 3. If position is not found, reorder immediately before main
+ * consonant.
+ */
+
+ unsigned int new_pos = base;
+ while (new_pos > start &&
+ !(is_one_of (info[new_pos - 1], FLAG(OT_M) | HALANT_OR_COENG_FLAGS)))
+ new_pos--;
+
+ /* In Khmer coeng model, a V,Ra can go *after* matras. If it goes after a
+ * split matra, it should be reordered to *before* the left part of such matra. */
+ if (new_pos > start && info[new_pos - 1].indic_category() == OT_M)
+ {
+ unsigned int old_pos = i;
+ for (unsigned int i = base + 1; i < old_pos; i++)
+ if (info[i].indic_category() == OT_M)
+ {
+ new_pos--;
+ break;
+ }
+ }
+
+ 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;
+ buffer->merge_clusters (new_pos, old_pos + 1);
+ 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;
+ }
+ }
+
+ break;
+ }
+ }
+
+
+ /* Apply 'init' to the Left Matra if it's a word start. */
+ if (info[start].indic_position () == POS_PRE_M &&
+ (!start ||
+ !(FLAG (_hb_glyph_info_get_general_category (&info[start - 1])) &
+ FLAG_RANGE (HB_UNICODE_GENERAL_CATEGORY_FORMAT, HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK))))
+ info[start].mask |= indic_plan->mask_array[INIT];
+
+
+ /*
+ * Finish off the clusters and go home!
+ */
+ if (indic_options ().uniscribe_bug_compatible)
+ {
+ /* Uniscribe merges the entire cluster.
+ * This means, half forms are submerged into the main consonants cluster.
+ * This is unnecessary, and makes cursor positioning harder, but that's what
+ * Uniscribe does. */
+ buffer->merge_clusters (start, end);
+ }
+}
+
+
+static void
+final_reordering (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer)
+{
+ unsigned int count = buffer->len;
+ if (!count) return;
+
+ hb_glyph_info_t *info = buffer->info;
+ 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()) {
+ final_reordering_syllable (plan, buffer, last, i);
+ last = i;
+ last_syllable = info[last].syllable();
+ }
+ final_reordering_syllable (plan, buffer, last, count);
+
+ HB_BUFFER_DEALLOCATE_VAR (buffer, indic_category);
+ HB_BUFFER_DEALLOCATE_VAR (buffer, indic_position);
+}
+
+
+const hb_ot_complex_shaper_t _hb_ot_complex_shaper_indic =
+{
+ "indic",
+ collect_features_indic,
+ override_features_indic,
+ data_create_indic,
+ data_destroy_indic,
+ NULL, /* preprocess_text */
+ NULL, /* normalization_preference */
+ setup_masks_indic,
+ false, /* zero_width_attached_marks */
+};
diff --git a/src/hb-ot-shape-complex-misc.cc b/src/hb-ot-shape-complex-misc.cc
new file mode 100644
index 0000000..13bc22b
--- /dev/null
+++ b/src/hb-ot-shape-complex-misc.cc
@@ -0,0 +1,208 @@
+/*
+ * Copyright © 2010,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
+ */
+
+#include "hb-ot-shape-complex-private.hh"
+
+
+/* TODO Add kana, and other small shapers here */
+
+
+/* The default shaper *only* adds additional per-script features.*/
+
+static const hb_tag_t hangul_features[] =
+{
+ HB_TAG('l','j','m','o'),
+ HB_TAG('v','j','m','o'),
+ HB_TAG('t','j','m','o'),
+ HB_TAG_NONE
+};
+
+static const hb_tag_t tibetan_features[] =
+{
+ HB_TAG('a','b','v','s'),
+ HB_TAG('b','l','w','s'),
+ HB_TAG('a','b','v','m'),
+ HB_TAG('b','l','w','m'),
+ HB_TAG_NONE
+};
+
+static void
+collect_features_default (hb_ot_shape_planner_t *plan)
+{
+ const hb_tag_t *script_features = NULL;
+
+ switch ((hb_tag_t) plan->props.script)
+ {
+ /* Unicode-1.1 additions */
+ case HB_SCRIPT_HANGUL:
+ script_features = hangul_features;
+ break;
+
+ /* Unicode-2.0 additions */
+ case HB_SCRIPT_TIBETAN:
+ script_features = tibetan_features;
+ break;
+ }
+
+ for (; script_features && *script_features; script_features++)
+ plan->map.add_bool_feature (*script_features);
+}
+
+static hb_ot_shape_normalization_mode_t
+normalization_preference_default (const hb_ot_shape_plan_t *plan)
+{
+ switch ((hb_tag_t) plan->props.script)
+ {
+ /* Unicode-1.1 additions */
+ case HB_SCRIPT_HANGUL:
+ return HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_FULL;
+ }
+ return HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS;
+}
+
+const hb_ot_complex_shaper_t _hb_ot_complex_shaper_default =
+{
+ "default",
+ collect_features_default,
+ NULL, /* override_features */
+ NULL, /* data_create */
+ NULL, /* data_destroy */
+ NULL, /* preprocess_text */
+ normalization_preference_default,
+ NULL, /* setup_masks */
+ true, /* zero_width_attached_marks */
+};
+
+
+/* Thai / Lao shaper */
+
+static void
+preprocess_text_thai (const hb_ot_shape_plan_t *plan HB_UNUSED,
+ hb_buffer_t *buffer,
+ hb_font_t *font HB_UNUSED)
+{
+ /* The following is NOT specified in the MS OT Thai spec, however, it seems
+ * to be what Uniscribe and other engines implement. According to Eric Muller:
+ *
+ * When you have a SARA AM, decompose it in NIKHAHIT + SARA AA, *and* move the
+ * NIKHAHIT backwards over any tone mark (0E48-0E4B).
+ *
+ * <0E14, 0E4B, 0E33> -> <0E14, 0E4D, 0E4B, 0E32>
+ *
+ * This reordering is legit only when the NIKHAHIT comes from a SARA AM, not
+ * when it's there to start with. The string <0E14, 0E4B, 0E4D> is probably
+ * not what a user wanted, but the rendering is nevertheless nikhahit above
+ * chattawa.
+ *
+ * Same for Lao.
+ *
+ * Note:
+ *
+ * Uniscribe also does so below-marks reordering. Namely, it positions U+0E3A
+ * after U+0E38 and U+0E39. We do that by modifying the ccc for U+0E3A.
+ * See unicode->modified_combining_class (). Lao does NOT have a U+0E3A
+ * equivalent.
+ */
+
+
+ /*
+ * Here are the characters of significance:
+ *
+ * Thai Lao
+ * SARA AM: U+0E33 U+0EB3
+ * SARA AA: U+0E32 U+0EB2
+ * Nikhahit: U+0E4D U+0ECD
+ *
+ * Testing shows that Uniscribe reorder the following marks:
+ * Thai: <0E31,0E34..0E37,0E47..0E4E>
+ * Lao: <0EB1,0EB4..0EB7,0EC7..0ECE>
+ *
+ * Note how the Lao versions are the same as Thai + 0x80.
+ */
+
+ /* We only get one script at a time, so a script-agnostic implementation
+ * is adequate here. */
+#define IS_SARA_AM(x) (((x) & ~0x0080) == 0x0E33)
+#define NIKHAHIT_FROM_SARA_AM(x) ((x) - 0xE33 + 0xE4D)
+#define SARA_AA_FROM_SARA_AM(x) ((x) - 1)
+#define IS_TONE_MARK(x) (hb_in_ranges<hb_codepoint_t> ((x) & ~0x0080, 0x0E34, 0x0E37, 0x0E47, 0x0E4E, 0x0E31, 0x0E31))
+
+ buffer->clear_output ();
+ unsigned int count = buffer->len;
+ for (buffer->idx = 0; buffer->idx < count;)
+ {
+ hb_codepoint_t u = buffer->cur().codepoint;
+ if (likely (!IS_SARA_AM (u))) {
+ buffer->next_glyph ();
+ continue;
+ }
+
+ /* Is SARA AM. Decompose and reorder. */
+ hb_codepoint_t decomposed[2] = {hb_codepoint_t (NIKHAHIT_FROM_SARA_AM (u)),
+ hb_codepoint_t (SARA_AA_FROM_SARA_AM (u))};
+ buffer->replace_glyphs (1, 2, decomposed);
+ if (unlikely (buffer->in_error))
+ return;
+
+ /* Ok, let's see... */
+ unsigned int end = buffer->out_len;
+ unsigned int start = end - 2;
+ while (start > 0 && IS_TONE_MARK (buffer->out_info[start - 1].codepoint))
+ start--;
+
+ if (start + 2 < end)
+ {
+ /* Move Nikhahit (end-2) to the beginning */
+ buffer->merge_out_clusters (start, end);
+ hb_glyph_info_t t = buffer->out_info[end - 2];
+ memmove (buffer->out_info + start + 1,
+ buffer->out_info + start,
+ sizeof (buffer->out_info[0]) * (end - start - 2));
+ buffer->out_info[start] = t;
+ }
+ else
+ {
+ /* Since we decomposed, and NIKHAHIT is combining, merge clusters with the
+ * previous cluster. */
+ if (start)
+ buffer->merge_out_clusters (start - 1, end);
+ }
+ }
+ buffer->swap_buffers ();
+}
+
+const hb_ot_complex_shaper_t _hb_ot_complex_shaper_thai =
+{
+ "thai",
+ NULL, /* collect_features */
+ NULL, /* override_features */
+ NULL, /* data_create */
+ NULL, /* data_destroy */
+ preprocess_text_thai,
+ NULL, /* normalization_preference */
+ NULL, /* setup_masks */
+ true, /* zero_width_attached_marks */
+};
diff --git a/src/hb-ot-shape-complex-private.hh b/src/hb-ot-shape-complex-private.hh
new file mode 100644
index 0000000..e84c490
--- /dev/null
+++ b/src/hb-ot-shape-complex-private.hh
@@ -0,0 +1,264 @@
+/*
+ * Copyright © 2010,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_PRIVATE_HH
+#define HB_OT_SHAPE_COMPLEX_PRIVATE_HH
+
+#include "hb-private.hh"
+
+#include "hb-ot-shape-private.hh"
+#include "hb-ot-shape-normalize-private.hh"
+
+
+
+/* buffer var allocations, used by complex shapers */
+#define complex_var_u8_0() var2.u8[2]
+#define complex_var_u8_1() var2.u8[3]
+
+
+
+/* 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 (thai) \
+ /* ^--- Add new shapers here */
+
+
+struct hb_ot_complex_shaper_t
+{
+ char name[8];
+
+ /* collect_features()
+ * Called during shape_plan().
+ * Shapers should use plan->map to add their features and callbacks.
+ */
+ void (*collect_features) (hb_ot_shape_planner_t *plan);
+
+ /* override_features()
+ * Called during shape_plan().
+ * Shapers should use plan->map to override features and add callbacks after
+ * common features are added.
+ */
+ void (*override_features) (hb_ot_shape_planner_t *plan);
+
+
+ /* data_create()
+ * Called at the end of shape_plan().
+ * Whatever shapers return will be accessible through plan->data later.
+ * If NULL is returned, means a plan failure.
+ */
+ void *(*data_create) (const hb_ot_shape_plan_t *plan);
+
+ /* data_destroy()
+ * Called when the shape_plan is being destroyed.
+ * plan->data is passed here for destruction.
+ * If NULL is returned, means a plan failure.
+ * May be NULL. */
+ void (*data_destroy) (void *data);
+
+
+ /* preprocess_text()
+ * Called during shape().
+ * Shapers can use to modify text before shaping starts.
+ */
+ void (*preprocess_text) (const hb_ot_shape_plan_t *plan,
+ hb_buffer_t *buffer,
+ hb_font_t *font);
+
+
+ /* normalization_preference()
+ * Called during shape().
+ */
+ hb_ot_shape_normalization_mode_t
+ (*normalization_preference) (const hb_ot_shape_plan_t *plan);
+
+ /* setup_masks()
+ * Called during shape().
+ * Shapers should use map to get feature masks and set on buffer.
+ * Shapers may NOT modify characters.
+ */
+ void (*setup_masks) (const hb_ot_shape_plan_t *plan,
+ hb_buffer_t *buffer,
+ hb_font_t *font);
+
+ bool zero_width_attached_marks;
+};
+
+#define HB_COMPLEX_SHAPER_IMPLEMENT(name) extern HB_INTERNAL const hb_ot_complex_shaper_t _hb_ot_complex_shaper_##name;
+HB_COMPLEX_SHAPERS_IMPLEMENT_SHAPERS
+#undef HB_COMPLEX_SHAPER_IMPLEMENT
+
+
+static inline const hb_ot_complex_shaper_t *
+hb_ot_shape_complex_categorize (const hb_segment_properties_t *props)
+{
+ switch ((hb_tag_t) props->script)
+ {
+ default:
+ return &_hb_ot_complex_shaper_default;
+
+
+ /* Unicode-1.1 additions */
+ case HB_SCRIPT_ARABIC:
+ case HB_SCRIPT_MONGOLIAN:
+ case HB_SCRIPT_SYRIAC:
+
+ /* Unicode-5.0 additions */
+ case HB_SCRIPT_NKO:
+
+ /* Unicode-6.0 additions */
+ case HB_SCRIPT_MANDAIC:
+
+ return &_hb_ot_complex_shaper_arabic;
+
+
+ /* Unicode-1.1 additions */
+ case HB_SCRIPT_THAI:
+ case HB_SCRIPT_LAO:
+
+ return &_hb_ot_complex_shaper_thai;
+
+
+
+ /* ^--- Add new shapers here */
+
+
+#if 0
+ /* Note:
+ *
+ * These disabled scripts are listed in ucd/IndicSyllabicCategory.txt, but according
+ * to Martin Hosken and Jonathan Kew do not require complex shaping.
+ *
+ * TODO We should automate figuring out which scripts do not need complex shaping
+ *
+ * TODO We currently keep data for these scripts in our indic table. Need to fix the
+ * generator to not do that.
+ */
+
+
+ /* Simple? */
+
+ /* Unicode-3.2 additions */
+ case HB_SCRIPT_BUHID:
+ case HB_SCRIPT_HANUNOO:
+
+ /* Unicode-5.1 additions */
+ case HB_SCRIPT_SAURASHTRA:
+
+ /* Unicode-5.2 additions */
+ case HB_SCRIPT_MEETEI_MAYEK:
+
+ /* Unicode-6.0 additions */
+ case HB_SCRIPT_BATAK:
+ case HB_SCRIPT_BRAHMI:
+
+
+ /* Simple */
+
+ /* Unicode-1.1 additions */
+ /* These have their own shaper now. */
+ case HB_SCRIPT_LAO:
+ case HB_SCRIPT_THAI:
+
+ /* Unicode-2.0 additions */
+ case HB_SCRIPT_TIBETAN:
+
+ /* Unicode-3.2 additions */
+ case HB_SCRIPT_TAGALOG:
+ case HB_SCRIPT_TAGBANWA:
+
+ /* Unicode-4.0 additions */
+ case HB_SCRIPT_LIMBU:
+ case HB_SCRIPT_TAI_LE:
+
+ /* Unicode-4.1 additions */
+ case HB_SCRIPT_SYLOTI_NAGRI:
+
+ /* Unicode-5.0 additions */
+ case HB_SCRIPT_PHAGS_PA:
+
+ /* Unicode-5.1 additions */
+ case HB_SCRIPT_KAYAH_LI:
+
+ /* Unicode-5.2 additions */
+ case HB_SCRIPT_TAI_VIET:
+
+
+ /* May need Indic treatment in the future? */
+
+ /* Unicode-3.0 additions */
+ case HB_SCRIPT_MYANMAR:
+
+
+#endif
+
+ /* Unicode-1.1 additions */
+ case HB_SCRIPT_BENGALI:
+ case HB_SCRIPT_DEVANAGARI:
+ case HB_SCRIPT_GUJARATI:
+ case HB_SCRIPT_GURMUKHI:
+ case HB_SCRIPT_KANNADA:
+ case HB_SCRIPT_MALAYALAM:
+ case HB_SCRIPT_ORIYA:
+ case HB_SCRIPT_TAMIL:
+ case HB_SCRIPT_TELUGU:
+
+ /* Unicode-3.0 additions */
+ case HB_SCRIPT_KHMER:
+ case HB_SCRIPT_SINHALA:
+
+ /* Unicode-4.1 additions */
+ case HB_SCRIPT_BUGINESE:
+ case HB_SCRIPT_KHAROSHTHI:
+ 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:
+
+ /* Unicode-5.2 additions */
+ case HB_SCRIPT_JAVANESE:
+ case HB_SCRIPT_KAITHI:
+ case HB_SCRIPT_TAI_THAM:
+
+ /* Unicode-6.1 additions */
+ case HB_SCRIPT_CHAKMA:
+ case HB_SCRIPT_SHARADA:
+ case HB_SCRIPT_TAKRI:
+
+ return &_hb_ot_complex_shaper_indic;
+ }
+}
+
+
+#endif /* HB_OT_SHAPE_COMPLEX_PRIVATE_HH */
diff --git a/src/hb-ot-shape-fallback-private.hh b/src/hb-ot-shape-fallback-private.hh
new file mode 100644
index 0000000..be96c4f
--- /dev/null
+++ b/src/hb-ot-shape-fallback-private.hh
@@ -0,0 +1,39 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OT_SHAPE_FALLBACK_PRIVATE_HH
+#define HB_OT_SHAPE_FALLBACK_PRIVATE_HH
+
+#include "hb-private.hh"
+
+#include "hb-ot-shape-private.hh"
+
+
+HB_INTERNAL void _hb_ot_shape_fallback_position (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer);
+
+#endif /* HB_OT_SHAPE_FALLBACK_PRIVATE_HH */
diff --git a/src/hb-ot-shape-fallback.cc b/src/hb-ot-shape-fallback.cc
new file mode 100644
index 0000000..56a3e7a
--- /dev/null
+++ b/src/hb-ot-shape-fallback.cc
@@ -0,0 +1,326 @@
+/*
+ * 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
+ */
+
+#include "hb-ot-shape-fallback-private.hh"
+
+static void
+zero_mark_advances (hb_buffer_t *buffer,
+ unsigned int start,
+ unsigned int end)
+{
+ for (unsigned int i = start; i < end; i++)
+ if (_hb_glyph_info_get_general_category (&buffer->info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)
+ {
+ buffer->pos[i].x_advance = 0;
+ buffer->pos[i].y_advance = 0;
+ }
+}
+
+static unsigned int
+recategorize_combining_class (unsigned int modified_combining_class)
+{
+ if (modified_combining_class >= 200)
+ return modified_combining_class;
+
+ /* This should be kept in sync with modified combining class mapping
+ * from hb-unicode.cc. */
+ switch (modified_combining_class)
+ {
+
+ /* Hebrew */
+
+ case HB_MODIFIED_COMBINING_CLASS_CCC10: /* sheva */
+ case HB_MODIFIED_COMBINING_CLASS_CCC11: /* hataf segol */
+ case HB_MODIFIED_COMBINING_CLASS_CCC12: /* hataf patah */
+ case HB_MODIFIED_COMBINING_CLASS_CCC13: /* hataf qamats */
+ case HB_MODIFIED_COMBINING_CLASS_CCC14: /* hiriq */
+ case HB_MODIFIED_COMBINING_CLASS_CCC15: /* tsere */
+ case HB_MODIFIED_COMBINING_CLASS_CCC16: /* segol */
+ case HB_MODIFIED_COMBINING_CLASS_CCC17: /* patah */
+ case HB_MODIFIED_COMBINING_CLASS_CCC18: /* qamats */
+ case HB_MODIFIED_COMBINING_CLASS_CCC20: /* qubuts */
+ case HB_MODIFIED_COMBINING_CLASS_CCC22: /* meteg */
+ return HB_UNICODE_COMBINING_CLASS_BELOW;
+
+ case HB_MODIFIED_COMBINING_CLASS_CCC23: /* rafe */
+ return HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE;
+
+ case HB_MODIFIED_COMBINING_CLASS_CCC24: /* shin dot */
+ return HB_UNICODE_COMBINING_CLASS_ABOVE_RIGHT;
+
+ case HB_MODIFIED_COMBINING_CLASS_CCC25: /* sin dot */
+ case HB_MODIFIED_COMBINING_CLASS_CCC19: /* holam */
+ return HB_UNICODE_COMBINING_CLASS_ABOVE_LEFT;
+
+ case HB_MODIFIED_COMBINING_CLASS_CCC26: /* point varika */
+ return HB_UNICODE_COMBINING_CLASS_ABOVE;
+
+ case HB_MODIFIED_COMBINING_CLASS_CCC21: /* dagesh */
+ break;
+
+
+ /* Arabic and Syriac */
+
+ case HB_MODIFIED_COMBINING_CLASS_CCC27: /* fathatan */
+ case HB_MODIFIED_COMBINING_CLASS_CCC28: /* dammatan */
+ case HB_MODIFIED_COMBINING_CLASS_CCC30: /* fatha */
+ case HB_MODIFIED_COMBINING_CLASS_CCC31: /* damma */
+ case HB_MODIFIED_COMBINING_CLASS_CCC33: /* shadda */
+ case HB_MODIFIED_COMBINING_CLASS_CCC34: /* sukun */
+ case HB_MODIFIED_COMBINING_CLASS_CCC35: /* superscript alef */
+ case HB_MODIFIED_COMBINING_CLASS_CCC36: /* superscript alaph */
+ return HB_UNICODE_COMBINING_CLASS_ABOVE;
+
+ case HB_MODIFIED_COMBINING_CLASS_CCC29: /* kasratan */
+ case HB_MODIFIED_COMBINING_CLASS_CCC32: /* kasra */
+ return HB_UNICODE_COMBINING_CLASS_BELOW;
+
+
+ /* Thai */
+
+ /* Note: to be useful we also need to position U+0E3A that has ccc=9 (virama).
+ * But viramas can be both above and below based on the codepoint / script. */
+
+ case HB_MODIFIED_COMBINING_CLASS_CCC103: /* sara u / sara uu */
+ return HB_UNICODE_COMBINING_CLASS_BELOW;
+
+ case HB_MODIFIED_COMBINING_CLASS_CCC107: /* mai */
+ return HB_UNICODE_COMBINING_CLASS_ABOVE;
+
+
+ /* Lao */
+
+ case HB_MODIFIED_COMBINING_CLASS_CCC118: /* sign u / sign uu */
+ return HB_UNICODE_COMBINING_CLASS_BELOW;
+
+ case HB_MODIFIED_COMBINING_CLASS_CCC122: /* mai */
+ return HB_UNICODE_COMBINING_CLASS_ABOVE;
+
+
+ /* Tibetan */
+
+ case HB_MODIFIED_COMBINING_CLASS_CCC129: /* sign aa */
+ return HB_UNICODE_COMBINING_CLASS_BELOW;
+
+ case HB_MODIFIED_COMBINING_CLASS_CCC130: /* sign i*/
+ return HB_UNICODE_COMBINING_CLASS_ABOVE;
+
+ case HB_MODIFIED_COMBINING_CLASS_CCC132: /* sign u */
+ return HB_UNICODE_COMBINING_CLASS_BELOW;
+
+ }
+
+ return modified_combining_class;
+}
+
+static inline void
+position_mark (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer,
+ hb_glyph_extents_t &base_extents,
+ unsigned int i,
+ unsigned int combining_class)
+{
+ hb_glyph_extents_t mark_extents;
+ if (!font->get_glyph_extents (buffer->info[i].codepoint,
+ &mark_extents))
+ return;
+
+ hb_position_t y_gap = font->y_scale / 16;
+
+ hb_glyph_position_t &pos = buffer->pos[i];
+ pos.x_offset = pos.y_offset = 0;
+
+
+ /* We dont position LEFT and RIGHT marks. */
+
+ /* X positioning */
+ switch (combining_class)
+ {
+ case HB_UNICODE_COMBINING_CLASS_DOUBLE_BELOW:
+ case HB_UNICODE_COMBINING_CLASS_DOUBLE_ABOVE:
+ if (buffer->props.direction == HB_DIRECTION_LTR) {
+ pos.x_offset += base_extents.x_bearing - mark_extents.width / 2 - mark_extents.x_bearing;
+ break;
+ } else if (buffer->props.direction == HB_DIRECTION_RTL) {
+ pos.x_offset += base_extents.x_bearing + base_extents.width - mark_extents.width / 2 - mark_extents.x_bearing;
+ break;
+ }
+ /* Fall through */
+
+ case HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW:
+ case HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE:
+ case HB_UNICODE_COMBINING_CLASS_BELOW:
+ case HB_UNICODE_COMBINING_CLASS_ABOVE:
+ /* Center align. */
+ pos.x_offset += base_extents.x_bearing + (base_extents.width - mark_extents.width) / 2 - mark_extents.x_bearing;
+ break;
+
+ case HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW_LEFT:
+ case HB_UNICODE_COMBINING_CLASS_BELOW_LEFT:
+ case HB_UNICODE_COMBINING_CLASS_ABOVE_LEFT:
+ /* Left align. */
+ pos.x_offset += base_extents.x_bearing - mark_extents.x_bearing;
+ break;
+
+ case HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE_RIGHT:
+ case HB_UNICODE_COMBINING_CLASS_BELOW_RIGHT:
+ case HB_UNICODE_COMBINING_CLASS_ABOVE_RIGHT:
+ /* Right align. */
+ pos.x_offset += base_extents.x_bearing + base_extents.width - mark_extents.width - mark_extents.x_bearing;
+ break;
+ }
+
+ /* Y positioning */
+ switch (combining_class)
+ {
+ case HB_UNICODE_COMBINING_CLASS_DOUBLE_BELOW:
+ case HB_UNICODE_COMBINING_CLASS_BELOW_LEFT:
+ case HB_UNICODE_COMBINING_CLASS_BELOW:
+ case HB_UNICODE_COMBINING_CLASS_BELOW_RIGHT:
+ /* Add gap, fall-through. */
+ base_extents.height -= y_gap;
+
+ case HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW_LEFT:
+ case HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW:
+ pos.y_offset += base_extents.y_bearing + base_extents.height - mark_extents.y_bearing;
+ base_extents.height += mark_extents.height;
+ break;
+
+ case HB_UNICODE_COMBINING_CLASS_DOUBLE_ABOVE:
+ case HB_UNICODE_COMBINING_CLASS_ABOVE_LEFT:
+ case HB_UNICODE_COMBINING_CLASS_ABOVE:
+ case HB_UNICODE_COMBINING_CLASS_ABOVE_RIGHT:
+ /* Add gap, fall-through. */
+ base_extents.y_bearing += y_gap;
+ base_extents.height -= y_gap;
+
+ case HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE:
+ case HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE_RIGHT:
+ pos.y_offset += base_extents.y_bearing - (mark_extents.y_bearing + mark_extents.height);
+ base_extents.y_bearing -= mark_extents.height;
+ base_extents.height += mark_extents.height;
+ break;
+ }
+}
+
+static inline void
+position_around_base (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer,
+ unsigned int base,
+ unsigned int end)
+{
+ hb_glyph_extents_t base_extents;
+ if (!font->get_glyph_extents (buffer->info[base].codepoint,
+ &base_extents))
+ {
+ /* If extents don't work, zero marks and go home. */
+ zero_mark_advances (buffer, base + 1, end);
+ return;
+ }
+ base_extents.x_bearing += buffer->pos[base].x_offset;
+ base_extents.y_bearing += buffer->pos[base].y_offset;
+
+ /* XXX Handle ligature component positioning... */
+ HB_UNUSED bool is_ligature = is_a_ligature (buffer->info[base]);
+
+ hb_position_t x_offset = 0, y_offset = 0;
+ if (HB_DIRECTION_IS_FORWARD (buffer->props.direction)) {
+ x_offset -= buffer->pos[base].x_advance;
+ y_offset -= buffer->pos[base].y_advance;
+ }
+ unsigned int last_combining_class = 255;
+ hb_glyph_extents_t cluster_extents;
+ for (unsigned int i = base + 1; i < end; i++)
+ if (_hb_glyph_info_get_general_category (&buffer->info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)
+ {
+ unsigned int this_combining_class = recategorize_combining_class (_hb_glyph_info_get_modified_combining_class (&buffer->info[i]));
+ if (this_combining_class != last_combining_class)
+ cluster_extents = base_extents;
+
+ position_mark (plan, font, buffer, base_extents, i, this_combining_class);
+
+ buffer->pos[i].x_advance = 0;
+ buffer->pos[i].y_advance = 0;
+ buffer->pos[i].x_offset += x_offset;
+ buffer->pos[i].y_offset += y_offset;
+
+ /* combine cluster extents. */
+
+ last_combining_class = this_combining_class;
+ } else {
+ if (HB_DIRECTION_IS_FORWARD (buffer->props.direction)) {
+ x_offset -= buffer->pos[i].x_advance;
+ y_offset -= buffer->pos[i].y_advance;
+ } else {
+ x_offset += buffer->pos[i].x_advance;
+ y_offset += buffer->pos[i].y_advance;
+ }
+ }
+
+
+}
+
+static inline void
+position_cluster (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer,
+ unsigned int start,
+ unsigned int end)
+{
+ if (end - start < 2)
+ return;
+
+ /* Find the base glyph */
+ for (unsigned int i = start; i < end; i++)
+ if (is_a_ligature (buffer->info[i]) ||
+ !(FLAG (_hb_glyph_info_get_general_category (&buffer->info[i])) &
+ (FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) |
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) |
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK))))
+ {
+ position_around_base (plan, font, buffer, i, end);
+ break;
+ }
+}
+
+void
+_hb_ot_shape_fallback_position (const hb_ot_shape_plan_t *plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer)
+{
+ unsigned int start = 0;
+ unsigned int last_cluster = buffer->info[0].cluster;
+ unsigned int count = buffer->len;
+ for (unsigned int i = 1; i < count; i++)
+ if (buffer->info[i].cluster != last_cluster) {
+ position_cluster (plan, font, buffer, start, i);
+ start = i;
+ last_cluster = buffer->info[i].cluster;
+ }
+ position_cluster (plan, font, buffer, start, count);
+}
diff --git a/src/hb-ot-shape-normalize-private.hh b/src/hb-ot-shape-normalize-private.hh
new file mode 100644
index 0000000..462b87d
--- /dev/null
+++ b/src/hb-ot-shape-normalize-private.hh
@@ -0,0 +1,50 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OT_SHAPE_NORMALIZE_PRIVATE_HH
+#define HB_OT_SHAPE_NORMALIZE_PRIVATE_HH
+
+#include "hb-private.hh"
+
+#include "hb-font.h"
+#include "hb-buffer.h"
+
+/* buffer var allocations, used during the normalization process */
+#define glyph_index() var1.u32
+
+enum hb_ot_shape_normalization_mode_t {
+ HB_OT_SHAPE_NORMALIZATION_MODE_DECOMPOSED,
+ HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS, /* never composes base-to-base */
+ HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_FULL, /* including base-to-base composition */
+
+ HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT = HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS
+};
+
+HB_INTERNAL void _hb_ot_shape_normalize (hb_font_t *font,
+ hb_buffer_t *buffer,
+ hb_ot_shape_normalization_mode_t mode);
+
+#endif /* HB_OT_SHAPE_NORMALIZE_PRIVATE_HH */
diff --git a/src/hb-ot-shape-normalize.cc b/src/hb-ot-shape-normalize.cc
new file mode 100644
index 0000000..93dd00c
--- /dev/null
+++ b/src/hb-ot-shape-normalize.cc
@@ -0,0 +1,550 @@
+/*
+ * 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
+ */
+
+#include "hb-ot-shape-normalize-private.hh"
+#include "hb-ot-shape-private.hh"
+
+
+/*
+ * HIGHLEVEL DESIGN:
+ *
+ * This file exports one main function: _hb_ot_shape_normalize().
+ *
+ * This function closely reflects the Unicode Normalization Algorithm,
+ * yet it's different.
+ *
+ * Each shaper specifies whether it prefers decomposed (NFD) or composed (NFC).
+ * The logic however tries to use whatever the font can support.
+ *
+ * In general what happens is that: each grapheme is decomposed in a chain
+ * of 1:2 decompositions, marks reordered, and then recomposed if desired,
+ * so far it's like Unicode Normalization. However, the decomposition and
+ * recomposition only happens if the font supports the resulting characters.
+ *
+ * The goals are:
+ *
+ * - Try to render all canonically equivalent strings similarly. To really
+ * achieve this we have to always do the full decomposition and then
+ * selectively recompose from there. It's kinda too expensive though, so
+ * we skip some cases. For example, if composed is desired, we simply
+ * don't touch 1-character clusters that are supported by the font, even
+ * though their NFC may be different.
+ *
+ * - When a font has a precomposed character for a sequence but the 'ccmp'
+ * feature in the font is not adequate, use the precomposed character
+ * which typically has better mark positioning.
+ *
+ * - When a font does not support a combining mark, but supports it precomposed
+ * with previous base, use that. This needs the itemizer to have this
+ * knowledge too. We need to provide assistance to the itemizer.
+ *
+ * - When a font does not support a character but supports its decomposition,
+ * well, use the decomposition (preferring the canonical decomposition, but
+ * falling back to the compatibility decomposition if necessary). The
+ * compatibility decomposition is really nice to have, for characters like
+ * ellipsis, or various-sized space characters.
+ *
+ * - The complex shapers can customize the compose and decompose functions to
+ * offload some of their requirements to the normalizer. For example, the
+ * Indic shaper may want to disallow recomposing of two matras.
+ *
+ * - We try compatibility decomposition if decomposing through canonical
+ * decomposition alone failed to find a sequence that the font supports.
+ * We don't try compatibility decomposition recursively during the canonical
+ * decomposition phase. This has minimal impact. There are only a handful
+ * of Greek letter that have canonical decompositions that include characters
+ * with compatibility decomposition. Those can be found using this command:
+ *
+ * egrep "`echo -n ';('; grep ';<' UnicodeData.txt | cut -d';' -f1 | tr '\n' '|'; echo ') '`" UnicodeData.txt
+ */
+
+static hb_bool_t
+decompose_func (hb_unicode_funcs_t *unicode,
+ hb_codepoint_t ab,
+ hb_codepoint_t *a,
+ hb_codepoint_t *b)
+{
+ /* XXX FIXME, move these to complex shapers and propagage to normalizer.*/
+ switch (ab) {
+ case 0x0AC9 : return false;
+
+ case 0x0931 : return false;
+ case 0x0B94 : return false;
+
+ /* These ones have Unicode decompositions, but we do it
+ * this way to be close to what Uniscribe does. */
+ case 0x0DDA : *a = 0x0DD9; *b= 0x0DDA; return true;
+ case 0x0DDC : *a = 0x0DD9; *b= 0x0DDC; return true;
+ case 0x0DDD : *a = 0x0DD9; *b= 0x0DDD; return true;
+ case 0x0DDE : *a = 0x0DD9; *b= 0x0DDE; return true;
+
+ case 0x0F77 : *a = 0x0FB2; *b= 0x0F81; return true;
+ case 0x0F79 : *a = 0x0FB3; *b= 0x0F81; return true;
+ case 0x17BE : *a = 0x17C1; *b= 0x17BE; return true;
+ case 0x17BF : *a = 0x17C1; *b= 0x17BF; return true;
+ case 0x17C0 : *a = 0x17C1; *b= 0x17C0; return true;
+ case 0x17C4 : *a = 0x17C1; *b= 0x17C4; return true;
+ case 0x17C5 : *a = 0x17C1; *b= 0x17C5; return true;
+ case 0x1925 : *a = 0x1920; *b= 0x1923; return true;
+ case 0x1926 : *a = 0x1920; *b= 0x1924; return true;
+ case 0x1B3C : *a = 0x1B42; *b= 0x1B3C; return true;
+ case 0x1112E : *a = 0x11127; *b= 0x11131; return true;
+ case 0x1112F : *a = 0x11127; *b= 0x11132; return true;
+#if 0
+ case 0x0B57 : *a = 0xno decomp, -> RIGHT; return true;
+ case 0x1C29 : *a = 0xno decomp, -> LEFT; return true;
+ case 0xA9C0 : *a = 0xno decomp, -> RIGHT; return true;
+ case 0x111BF : *a = 0xno decomp, -> ABOVE; return true;
+#endif
+ }
+ return unicode->decompose (ab, a, b);
+}
+
+static hb_bool_t
+compose_func (hb_unicode_funcs_t *unicode,
+ hb_codepoint_t a,
+ hb_codepoint_t b,
+ hb_codepoint_t *ab)
+{
+ /* XXX, this belongs to indic normalizer. */
+ if ((FLAG (unicode->general_category (a)) &
+ (FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) |
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) |
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK))))
+ return false;
+ /* XXX, add composition-exclusion exceptions to Indic shaper. */
+ if (a == 0x09AF && b == 0x09BC) { *ab = 0x09DF; return true; }
+
+ /* XXX, these belong to the hebew / default shaper. */
+ /* Hebrew presentation-form shaping.
+ * https://bugzilla.mozilla.org/show_bug.cgi?id=728866 */
+ // Hebrew presentation forms with dagesh, for characters 0x05D0..0x05EA;
+ // note that some letters do not have a dagesh presForm encoded
+ static const hb_codepoint_t sDageshForms[0x05EA - 0x05D0 + 1] = {
+ 0xFB30, // ALEF
+ 0xFB31, // BET
+ 0xFB32, // GIMEL
+ 0xFB33, // DALET
+ 0xFB34, // HE
+ 0xFB35, // VAV
+ 0xFB36, // ZAYIN
+ 0, // HET
+ 0xFB38, // TET
+ 0xFB39, // YOD
+ 0xFB3A, // FINAL KAF
+ 0xFB3B, // KAF
+ 0xFB3C, // LAMED
+ 0, // FINAL MEM
+ 0xFB3E, // MEM
+ 0, // FINAL NUN
+ 0xFB40, // NUN
+ 0xFB41, // SAMEKH
+ 0, // AYIN
+ 0xFB43, // FINAL PE
+ 0xFB44, // PE
+ 0, // FINAL TSADI
+ 0xFB46, // TSADI
+ 0xFB47, // QOF
+ 0xFB48, // RESH
+ 0xFB49, // SHIN
+ 0xFB4A // TAV
+ };
+
+ hb_bool_t found = unicode->compose (a, b, ab);
+
+ if (!found && (b & ~0x7F) == 0x0580) {
+ // special-case Hebrew presentation forms that are excluded from
+ // standard normalization, but wanted for old fonts
+ switch (b) {
+ case 0x05B4: // HIRIQ
+ if (a == 0x05D9) { // YOD
+ *ab = 0xFB1D;
+ found = true;
+ }
+ break;
+ case 0x05B7: // patah
+ if (a == 0x05F2) { // YIDDISH YOD YOD
+ *ab = 0xFB1F;
+ found = true;
+ } else if (a == 0x05D0) { // ALEF
+ *ab = 0xFB2E;
+ found = true;
+ }
+ break;
+ case 0x05B8: // QAMATS
+ if (a == 0x05D0) { // ALEF
+ *ab = 0xFB2F;
+ found = true;
+ }
+ break;
+ case 0x05B9: // HOLAM
+ if (a == 0x05D5) { // VAV
+ *ab = 0xFB4B;
+ found = true;
+ }
+ break;
+ case 0x05BC: // DAGESH
+ if (a >= 0x05D0 && a <= 0x05EA) {
+ *ab = sDageshForms[a - 0x05D0];
+ found = (*ab != 0);
+ } else if (a == 0xFB2A) { // SHIN WITH SHIN DOT
+ *ab = 0xFB2C;
+ found = true;
+ } else if (a == 0xFB2B) { // SHIN WITH SIN DOT
+ *ab = 0xFB2D;
+ found = true;
+ }
+ break;
+ case 0x05BF: // RAFE
+ switch (a) {
+ case 0x05D1: // BET
+ *ab = 0xFB4C;
+ found = true;
+ break;
+ case 0x05DB: // KAF
+ *ab = 0xFB4D;
+ found = true;
+ break;
+ case 0x05E4: // PE
+ *ab = 0xFB4E;
+ found = true;
+ break;
+ }
+ break;
+ case 0x05C1: // SHIN DOT
+ if (a == 0x05E9) { // SHIN
+ *ab = 0xFB2A;
+ found = true;
+ } else if (a == 0xFB49) { // SHIN WITH DAGESH
+ *ab = 0xFB2C;
+ found = true;
+ }
+ break;
+ case 0x05C2: // SIN DOT
+ if (a == 0x05E9) { // SHIN
+ *ab = 0xFB2B;
+ found = true;
+ } else if (a == 0xFB49) { // SHIN WITH DAGESH
+ *ab = 0xFB2D;
+ found = true;
+ }
+ break;
+ }
+ }
+
+ return found;
+}
+
+
+static inline void
+set_glyph (hb_glyph_info_t &info, hb_font_t *font)
+{
+ font->get_glyph (info.codepoint, 0, &info.glyph_index());
+}
+
+static inline void
+output_char (hb_buffer_t *buffer, hb_codepoint_t unichar, hb_codepoint_t glyph)
+{
+ buffer->cur().glyph_index() = glyph;
+ buffer->output_glyph (unichar);
+ _hb_glyph_info_set_unicode_props (&buffer->prev(), buffer->unicode);
+}
+
+static inline void
+next_char (hb_buffer_t *buffer, hb_codepoint_t glyph)
+{
+ buffer->cur().glyph_index() = glyph;
+ buffer->next_glyph ();
+}
+
+static inline void
+skip_char (hb_buffer_t *buffer)
+{
+ buffer->skip_glyph ();
+}
+
+/* Returns 0 if didn't decompose, number of resulting characters otherwise. */
+static inline unsigned int
+decompose (hb_font_t *font, hb_buffer_t *buffer, bool shortest, hb_codepoint_t ab)
+{
+ hb_codepoint_t a, b, a_glyph, b_glyph;
+
+ if (!decompose_func (buffer->unicode, ab, &a, &b) ||
+ (b && !font->get_glyph (b, 0, &b_glyph)))
+ return 0;
+
+ bool has_a = font->get_glyph (a, 0, &a_glyph);
+ if (shortest && has_a) {
+ /* Output a and b */
+ output_char (buffer, a, a_glyph);
+ if (likely (b)) {
+ output_char (buffer, b, b_glyph);
+ return 2;
+ }
+ return 1;
+ }
+
+ unsigned int ret;
+ if ((ret = decompose (font, buffer, shortest, a))) {
+ if (b) {
+ output_char (buffer, b, b_glyph);
+ return ret + 1;
+ }
+ return ret;
+ }
+
+ if (has_a) {
+ output_char (buffer, a, a_glyph);
+ if (likely (b)) {
+ output_char (buffer, b, b_glyph);
+ return 2;
+ }
+ return 1;
+ }
+
+ return 0;
+}
+
+/* Returns 0 if didn't decompose, number of resulting characters otherwise. */
+static inline bool
+decompose_compatibility (hb_font_t *font, hb_buffer_t *buffer, hb_codepoint_t u)
+{
+ unsigned int len, i;
+ hb_codepoint_t decomposed[HB_UNICODE_MAX_DECOMPOSITION_LEN];
+ hb_codepoint_t glyphs[HB_UNICODE_MAX_DECOMPOSITION_LEN];
+
+ len = buffer->unicode->decompose_compatibility (u, decomposed);
+ if (!len)
+ return 0;
+
+ for (i = 0; i < len; i++)
+ if (!font->get_glyph (decomposed[i], 0, &glyphs[i]))
+ return 0;
+
+ for (i = 0; i < len; i++)
+ output_char (buffer, decomposed[i], glyphs[i]);
+
+ return len;
+}
+
+/* Returns true if recomposition may be benefitial. */
+static inline bool
+decompose_current_character (hb_font_t *font, hb_buffer_t *buffer, bool shortest)
+{
+ hb_codepoint_t glyph;
+ unsigned int len = 1;
+
+ /* Kind of a cute waterfall here... */
+ if (shortest && font->get_glyph (buffer->cur().codepoint, 0, &glyph))
+ next_char (buffer, glyph);
+ else if ((len = decompose (font, buffer, shortest, buffer->cur().codepoint)))
+ skip_char (buffer);
+ else if (!shortest && font->get_glyph (buffer->cur().codepoint, 0, &glyph))
+ next_char (buffer, glyph);
+ else if ((len = decompose_compatibility (font, buffer, 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
+handle_variation_selector_cluster (hb_font_t *font, hb_buffer_t *buffer, unsigned int end)
+{
+ for (; buffer->idx < end - 1;) {
+ if (unlikely (buffer->unicode->is_variation_selector (buffer->cur(+1).codepoint))) {
+ /* The next two lines are some ugly lines... But work. */
+ font->get_glyph (buffer->cur().codepoint, buffer->cur(+1).codepoint, &buffer->cur().glyph_index());
+ buffer->replace_glyphs (2, 1, &buffer->cur().codepoint);
+ } else {
+ set_glyph (buffer->cur(), font);
+ buffer->next_glyph ();
+ }
+ }
+ if (likely (buffer->idx < end)) {
+ set_glyph (buffer->cur(), font);
+ buffer->next_glyph ();
+ }
+}
+
+/* Returns true if recomposition may be benefitial. */
+static inline bool
+decompose_multi_char_cluster (hb_font_t *font, hb_buffer_t *buffer, unsigned int end)
+{
+ /* TODO Currently if there's a variation-selector we give-up, it's just too hard. */
+ for (unsigned int i = buffer->idx; i < end; i++)
+ if (unlikely (buffer->unicode->is_variation_selector (buffer->info[i].codepoint))) {
+ handle_variation_selector_cluster (font, buffer, end);
+ return false;
+ }
+
+ while (buffer->idx < end)
+ decompose_current_character (font, buffer, 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
+decompose_cluster (hb_font_t *font, hb_buffer_t *buffer, bool recompose, unsigned int end)
+{
+ if (likely (buffer->idx + 1 == end))
+ return decompose_current_character (font, buffer, recompose);
+ else
+ return decompose_multi_char_cluster (font, buffer, end);
+}
+
+
+static int
+compare_combining_class (const hb_glyph_info_t *pa, const hb_glyph_info_t *pb)
+{
+ unsigned int a = _hb_glyph_info_get_modified_combining_class (pa);
+ unsigned int b = _hb_glyph_info_get_modified_combining_class (pb);
+
+ return a < b ? -1 : a == b ? 0 : +1;
+}
+
+
+void
+_hb_ot_shape_normalize (hb_font_t *font, hb_buffer_t *buffer,
+ hb_ot_shape_normalization_mode_t mode)
+{
+ bool recompose = mode != HB_OT_SHAPE_NORMALIZATION_MODE_DECOMPOSED;
+ bool can_use_recompose = false;
+ unsigned int count;
+
+ /* We do a fairly straightforward yet custom normalization process in three
+ * separate rounds: decompose, reorder, recompose (if desired). Currently
+ * this makes two buffer swaps. We can make it faster by moving the last
+ * two rounds into the inner loop for the first round, but it's more readable
+ * this way. */
+
+
+ /* First round, decompose */
+
+ buffer->clear_output ();
+ count = buffer->len;
+ for (buffer->idx = 0; buffer->idx < count;)
+ {
+ unsigned int end;
+ for (end = buffer->idx + 1; end < count; end++)
+ if (buffer->cur().cluster != buffer->info[end].cluster)
+ break;
+
+ can_use_recompose = decompose_cluster (font, buffer, recompose, end) || can_use_recompose;
+ }
+ buffer->swap_buffers ();
+
+
+ if (mode != HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_FULL && !can_use_recompose)
+ return; /* Done! */
+
+
+ /* Second round, reorder (inplace) */
+
+ count = buffer->len;
+ for (unsigned int i = 0; i < count; i++)
+ {
+ if (_hb_glyph_info_get_modified_combining_class (&buffer->info[i]) == 0)
+ continue;
+
+ unsigned int end;
+ for (end = i + 1; end < count; end++)
+ if (_hb_glyph_info_get_modified_combining_class (&buffer->info[end]) == 0)
+ break;
+
+ /* We are going to do a bubble-sort. Only do this if the
+ * sequence is short. Doing it on long sequences can result
+ * in an O(n^2) DoS. */
+ if (end - i > 10) {
+ i = end;
+ continue;
+ }
+
+ hb_bubble_sort (buffer->info + i, end - i, compare_combining_class);
+
+ i = end;
+ }
+
+
+ if (!recompose)
+ return;
+
+ /* Third round, recompose */
+
+ /* As noted in the comment earlier, we don't try to combine
+ * ccc=0 chars with their previous Starter. */
+
+ buffer->clear_output ();
+ count = buffer->len;
+ unsigned int starter = 0;
+ buffer->next_glyph ();
+ while (buffer->idx < count)
+ {
+ 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. */
+ (mode == HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_FULL ||
+ _hb_glyph_info_get_modified_combining_class (&buffer->cur()) != 0) &&
+ /* If there's anything between the starter and this char, they should have CCC
+ * smaller than this character's. */
+ (starter == buffer->out_len - 1 ||
+ _hb_glyph_info_get_modified_combining_class (&buffer->prev()) < _hb_glyph_info_get_modified_combining_class (&buffer->cur())) &&
+ /* And compose. */
+ compose_func (buffer->unicode,
+ buffer->out_info[starter].codepoint,
+ buffer->cur().codepoint,
+ &composed) &&
+ /* And the font has glyph for the composite. */
+ font->get_glyph (composed, 0, &glyph))
+ {
+ /* Composes. */
+ buffer->next_glyph (); /* Copy to out-buffer. */
+ if (unlikely (buffer->in_error))
+ return;
+ buffer->merge_out_clusters (starter, buffer->out_len);
+ buffer->out_len--; /* Remove the second composable. */
+ buffer->out_info[starter].codepoint = composed; /* Modify starter and carry on. */
+ set_glyph (buffer->out_info[starter], font);
+ _hb_glyph_info_set_unicode_props (&buffer->out_info[starter], buffer->unicode);
+
+ continue;
+ }
+
+ /* Blocked, or doesn't compose. */
+ buffer->next_glyph ();
+
+ if (_hb_glyph_info_get_modified_combining_class (&buffer->prev()) == 0)
+ starter = buffer->out_len - 1;
+ }
+ buffer->swap_buffers ();
+
+}
diff --git a/src/hb-ot-shape-private.hh b/src/hb-ot-shape-private.hh
new file mode 100644
index 0000000..f856045
--- /dev/null
+++ b/src/hb-ot-shape-private.hh
@@ -0,0 +1,110 @@
+/*
+ * Copyright © 2010 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_PRIVATE_HH
+#define HB_OT_SHAPE_PRIVATE_HH
+
+#include "hb-private.hh"
+
+#include "hb-ot-map-private.hh"
+
+
+
+/* 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
+{
+ hb_segment_properties_t props;
+ const struct hb_ot_complex_shaper_t *shaper;
+ hb_ot_map_t map;
+ const void *data;
+
+ inline void substitute_closure (hb_face_t *face, hb_set_t *glyphs) const { map.substitute_closure (this, face, glyphs); }
+ inline void substitute (hb_font_t *font, hb_buffer_t *buffer) const { map.substitute (this, font, buffer); }
+ inline void position (hb_font_t *font, hb_buffer_t *buffer) const { map.position (this, font, buffer); }
+
+ void finish (void) { map.finish (); }
+};
+
+struct hb_ot_shape_planner_t
+{
+ /* In the order that they are filled in. */
+ hb_face_t *face;
+ hb_segment_properties_t props;
+ const struct hb_ot_complex_shaper_t *shaper;
+ hb_ot_map_builder_t map;
+
+ hb_ot_shape_planner_t (const hb_shape_plan_t *master_plan) :
+ face (master_plan->face),
+ props (master_plan->props),
+ shaper (NULL),
+ map () {}
+ ~hb_ot_shape_planner_t (void) { map.finish (); }
+
+ inline void compile (hb_ot_shape_plan_t &plan)
+ {
+ plan.props = props;
+ plan.shaper = shaper;
+ map.compile (face, &props, plan.map);
+ }
+
+ private:
+ NO_COPY (hb_ot_shape_planner_t);
+};
+
+
+
+inline void
+_hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_unicode_funcs_t *unicode)
+{
+ info->unicode_props0() = ((unsigned int) unicode->general_category (info->codepoint)) |
+ (unicode->is_zero_width (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 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_zero_width (const hb_glyph_info_t *info)
+{
+ return !!(info->unicode_props0() & 0x80);
+}
+
+#endif /* HB_OT_SHAPE_PRIVATE_HH */
diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc
new file mode 100644
index 0000000..29076cf
--- /dev/null
+++ b/src/hb-ot-shape.cc
@@ -0,0 +1,596 @@
+/*
+ * Copyright © 2009,2010 Red Hat, Inc.
+ * Copyright © 2010,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.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#define HB_SHAPER ot
+#define hb_ot_shaper_face_data_t hb_ot_layout_t
+#define hb_ot_shaper_shape_plan_data_t hb_ot_shape_plan_t
+#include "hb-shaper-impl-private.hh"
+
+#include "hb-ot-shape-private.hh"
+#include "hb-ot-shape-complex-private.hh"
+#include "hb-ot-shape-fallback-private.hh"
+#include "hb-ot-shape-normalize-private.hh"
+
+#include "hb-ot-layout-private.hh"
+#include "hb-set-private.hh"
+
+
+static hb_tag_t common_features[] = {
+ HB_TAG('c','c','m','p'),
+ HB_TAG('l','i','g','a'),
+ HB_TAG('l','o','c','l'),
+ HB_TAG('m','a','r','k'),
+ HB_TAG('m','k','m','k'),
+ HB_TAG('r','l','i','g'),
+};
+
+
+static hb_tag_t horizontal_features[] = {
+ HB_TAG('c','a','l','t'),
+ HB_TAG('c','l','i','g'),
+ HB_TAG('c','u','r','s'),
+ HB_TAG('k','e','r','n'),
+ HB_TAG('r','c','l','t'),
+};
+
+/* Note:
+ * Technically speaking, vrt2 and vert are mutually exclusive.
+ * According to the spec, valt and vpal are also mutually exclusive.
+ * But we apply them all for now.
+ */
+static hb_tag_t vertical_features[] = {
+ HB_TAG('v','a','l','t'),
+ HB_TAG('v','e','r','t'),
+ HB_TAG('v','k','r','n'),
+ HB_TAG('v','p','a','l'),
+ HB_TAG('v','r','t','2'),
+};
+
+
+
+static void
+hb_ot_shape_collect_features (hb_ot_shape_planner_t *planner,
+ const hb_segment_properties_t *props,
+ const hb_feature_t *user_features,
+ unsigned int num_user_features)
+{
+ hb_ot_map_builder_t *map = &planner->map;
+
+ 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'));
+ 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);
+ break;
+ case HB_DIRECTION_TTB:
+ case HB_DIRECTION_BTT:
+ case HB_DIRECTION_INVALID:
+ default:
+ 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);
+
+ if (HB_DIRECTION_IS_HORIZONTAL (props->direction))
+ ADD_FEATURES (horizontal_features);
+ else
+ ADD_FEATURES (vertical_features);
+
+ 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));
+ }
+}
+
+
+/*
+ * shaper face data
+ */
+
+hb_ot_shaper_face_data_t *
+_hb_ot_shaper_face_data_create (hb_face_t *face)
+{
+ return _hb_ot_layout_create (face);
+}
+
+void
+_hb_ot_shaper_face_data_destroy (hb_ot_shaper_face_data_t *data)
+{
+ _hb_ot_layout_destroy (data);
+}
+
+
+/*
+ * shaper font data
+ */
+
+struct hb_ot_shaper_font_data_t {};
+
+hb_ot_shaper_font_data_t *
+_hb_ot_shaper_font_data_create (hb_font_t *font)
+{
+ return (hb_ot_shaper_font_data_t *) HB_SHAPER_DATA_SUCCEEDED;
+}
+
+void
+_hb_ot_shaper_font_data_destroy (hb_ot_shaper_font_data_t *data)
+{
+}
+
+
+/*
+ * shaper shape_plan data
+ */
+
+hb_ot_shaper_shape_plan_data_t *
+_hb_ot_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan,
+ const hb_feature_t *user_features,
+ unsigned int num_user_features)
+{
+ hb_ot_shape_plan_t *plan = (hb_ot_shape_plan_t *) calloc (1, sizeof (hb_ot_shape_plan_t));
+ if (unlikely (!plan))
+ return NULL;
+
+ hb_ot_shape_planner_t planner (shape_plan);
+
+ planner.shaper = hb_ot_shape_complex_categorize (&shape_plan->props);
+
+ hb_ot_shape_collect_features (&planner, &shape_plan->props, user_features, num_user_features);
+
+ planner.compile (*plan);
+
+ if (plan->shaper->data_create) {
+ plan->data = plan->shaper->data_create (plan);
+ if (unlikely (!plan->data))
+ return NULL;
+ }
+
+ return plan;
+}
+
+void
+_hb_ot_shaper_shape_plan_data_destroy (hb_ot_shaper_shape_plan_data_t *plan)
+{
+ if (plan->shaper->data_destroy)
+ plan->shaper->data_destroy (const_cast<void *> (plan->data));
+
+ plan->finish ();
+
+ free (plan);
+}
+
+
+/*
+ * shaper
+ */
+
+struct hb_ot_shape_context_t
+{
+ hb_ot_shape_plan_t *plan;
+ hb_font_t *font;
+ hb_face_t *face;
+ hb_buffer_t *buffer;
+ const hb_feature_t *user_features;
+ unsigned int num_user_features;
+
+ /* Transient stuff */
+ hb_direction_t target_direction;
+};
+
+
+
+/* Main shaper */
+
+
+/* Prepare */
+
+static void
+hb_set_unicode_props (hb_buffer_t *buffer)
+{
+ unsigned int count = buffer->len;
+ for (unsigned int i = 0; i < count; i++)
+ _hb_glyph_info_set_unicode_props (&buffer->info[i], buffer->unicode);
+}
+
+static void
+hb_form_clusters (hb_buffer_t *buffer)
+{
+ unsigned int count = buffer->len;
+ for (unsigned int i = 1; i < count; i++)
+ if (FLAG (_hb_glyph_info_get_general_category (&buffer->info[i])) &
+ (FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) |
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) |
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)))
+ buffer->merge_clusters (i - 1, i + 1);
+}
+
+static void
+hb_ensure_native_direction (hb_buffer_t *buffer)
+{
+ hb_direction_t direction = buffer->props.direction;
+
+ /* TODO vertical:
+ * The only BTT vertical script is Ogham, but it's not clear to me whether OpenType
+ * Ogham fonts are supposed to be implemented BTT or not. Need to research that
+ * first. */
+ if ((HB_DIRECTION_IS_HORIZONTAL (direction) && direction != hb_script_get_horizontal_direction (buffer->props.script)) ||
+ (HB_DIRECTION_IS_VERTICAL (direction) && direction != HB_DIRECTION_TTB))
+ {
+ hb_buffer_reverse_clusters (buffer);
+ buffer->props.direction = HB_DIRECTION_REVERSE (buffer->props.direction);
+ }
+}
+
+
+/* Substitute */
+
+static inline void
+hb_ot_mirror_chars (hb_ot_shape_context_t *c)
+{
+ if (HB_DIRECTION_IS_FORWARD (c->target_direction))
+ return;
+
+ hb_unicode_funcs_t *unicode = c->buffer->unicode;
+ hb_mask_t rtlm_mask = c->plan->map.get_1_mask (HB_TAG ('r','t','l','m'));
+
+ unsigned int count = c->buffer->len;
+ for (unsigned int i = 0; i < count; i++) {
+ hb_codepoint_t codepoint = unicode->mirroring (c->buffer->info[i].codepoint);
+ if (likely (codepoint == c->buffer->info[i].codepoint))
+ c->buffer->info[i].mask |= rtlm_mask;
+ else
+ c->buffer->info[i].codepoint = codepoint;
+ }
+}
+
+static inline void
+hb_ot_shape_setup_masks (hb_ot_shape_context_t *c)
+{
+ hb_ot_map_t *map = &c->plan->map;
+
+ hb_mask_t global_mask = map->get_global_mask ();
+ c->buffer->reset_masks (global_mask);
+
+ if (c->plan->shaper->setup_masks)
+ c->plan->shaper->setup_masks (c->plan, c->buffer, c->font);
+
+ for (unsigned int i = 0; i < c->num_user_features; i++)
+ {
+ const hb_feature_t *feature = &c->user_features[i];
+ if (!(feature->start == 0 && feature->end == (unsigned int)-1)) {
+ unsigned int shift;
+ hb_mask_t mask = map->get_mask (feature->tag, &shift);
+ c->buffer->set_masks (feature->value << shift, mask, feature->start, feature->end);
+ }
+ }
+}
+
+static inline void
+hb_ot_map_glyphs_fast (hb_buffer_t *buffer)
+{
+ /* Normalization process sets up glyph_index(), we just copy it. */
+ unsigned int count = buffer->len;
+ for (unsigned int i = 0; i < count; i++)
+ buffer->info[i].codepoint = buffer->info[i].glyph_index();
+}
+
+static inline void
+hb_ot_substitute_default (hb_ot_shape_context_t *c)
+{
+ if (c->plan->shaper->preprocess_text)
+ c->plan->shaper->preprocess_text (c->plan, c->buffer, c->font);
+
+ hb_ot_mirror_chars (c);
+
+ HB_BUFFER_ALLOCATE_VAR (c->buffer, glyph_index);
+
+ _hb_ot_shape_normalize (c->font, c->buffer,
+ c->plan->shaper->normalization_preference ?
+ c->plan->shaper->normalization_preference (c->plan) :
+ HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT);
+
+ hb_ot_shape_setup_masks (c);
+
+ hb_ot_map_glyphs_fast (c->buffer);
+
+ HB_BUFFER_DEALLOCATE_VAR (c->buffer, glyph_index);
+}
+
+static inline void
+hb_synthesize_glyph_classes (hb_ot_shape_context_t *c)
+{
+ unsigned int count = c->buffer->len;
+ for (unsigned int i = 0; i < count; i++)
+ c->buffer->info[i].glyph_props() = _hb_glyph_info_get_general_category (&c->buffer->info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK ?
+ HB_OT_LAYOUT_GLYPH_CLASS_MARK :
+ HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH;
+}
+
+
+static inline void
+hb_ot_substitute_complex (hb_ot_shape_context_t *c)
+{
+ hb_ot_layout_substitute_start (c->font, c->buffer);
+
+ if (!hb_ot_layout_has_glyph_classes (c->face))
+ hb_synthesize_glyph_classes (c);
+
+ if (hb_ot_layout_has_substitution (c->face))
+ c->plan->substitute (c->font, c->buffer);
+
+ hb_ot_layout_substitute_finish (c->font, c->buffer);
+
+ return;
+}
+
+static inline void
+hb_ot_substitute (hb_ot_shape_context_t *c)
+{
+ hb_ot_substitute_default (c);
+ hb_ot_substitute_complex (c);
+}
+
+/* Position */
+
+static inline void
+hb_ot_position_default (hb_ot_shape_context_t *c)
+{
+ hb_ot_layout_position_start (c->font, c->buffer);
+
+ unsigned int count = c->buffer->len;
+ for (unsigned int i = 0; i < count; i++) {
+ c->font->get_glyph_advance_for_direction (c->buffer->info[i].codepoint,
+ c->buffer->props.direction,
+ &c->buffer->pos[i].x_advance,
+ &c->buffer->pos[i].y_advance);
+ c->font->subtract_glyph_origin_for_direction (c->buffer->info[i].codepoint,
+ c->buffer->props.direction,
+ &c->buffer->pos[i].x_offset,
+ &c->buffer->pos[i].y_offset);
+ }
+}
+
+static inline bool
+hb_ot_position_complex (hb_ot_shape_context_t *c)
+{
+ bool ret = false;
+
+ 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,
+ &c->buffer->pos[i].x_offset,
+ &c->buffer->pos[i].y_offset);
+ }
+
+ c->plan->position (c->font, c->buffer);
+
+ for (unsigned int i = 0; i < count; i++) {
+ c->font->subtract_glyph_origin_for_direction (c->buffer->info[i].codepoint,
+ HB_DIRECTION_LTR,
+ &c->buffer->pos[i].x_offset,
+ &c->buffer->pos[i].y_offset);
+ }
+
+ ret = true;
+ }
+
+ hb_ot_layout_position_finish (c->font, c->buffer, c->plan->shaper->zero_width_attached_marks);
+
+ return ret;
+}
+
+static inline void
+hb_ot_position_complex_fallback (hb_ot_shape_context_t *c)
+{
+ _hb_ot_shape_fallback_position (c->plan, c->font, c->buffer);
+}
+
+static inline void
+hb_ot_truetype_kern (hb_ot_shape_context_t *c)
+{
+ /* TODO Check for kern=0 */
+ unsigned int count = c->buffer->len;
+ for (unsigned int i = 1; i < count; i++) {
+ hb_position_t x_kern, y_kern, kern1, kern2;
+ c->font->get_glyph_kerning_for_direction (c->buffer->info[i - 1].codepoint, c->buffer->info[i].codepoint,
+ c->buffer->props.direction,
+ &x_kern, &y_kern);
+
+ kern1 = x_kern >> 1;
+ kern2 = x_kern - kern1;
+ c->buffer->pos[i - 1].x_advance += kern1;
+ c->buffer->pos[i].x_advance += kern2;
+ c->buffer->pos[i].x_offset += kern2;
+
+ kern1 = y_kern >> 1;
+ kern2 = y_kern - kern1;
+ c->buffer->pos[i - 1].y_advance += kern1;
+ c->buffer->pos[i].y_advance += kern2;
+ c->buffer->pos[i].y_offset += kern2;
+ }
+}
+
+static inline void
+hb_position_complex_fallback_visual (hb_ot_shape_context_t *c)
+{
+ hb_ot_truetype_kern (c);
+}
+
+static inline void
+hb_ot_position (hb_ot_shape_context_t *c)
+{
+ hb_ot_position_default (c);
+
+ hb_bool_t fallback = !hb_ot_position_complex (c);
+
+ if (fallback)
+ hb_ot_position_complex_fallback (c);
+
+ if (HB_DIRECTION_IS_BACKWARD (c->buffer->props.direction))
+ hb_buffer_reverse (c->buffer);
+
+ if (fallback)
+ hb_position_complex_fallback_visual (c);
+}
+
+
+/* Post-process */
+
+static void
+hb_ot_hide_zerowidth (hb_ot_shape_context_t *c)
+{
+ hb_codepoint_t space;
+ if (!c->font->get_glyph (' ', 0, &space))
+ return; /* No point! */
+
+ unsigned int count = c->buffer->len;
+ for (unsigned int i = 0; i < count; i++)
+ if (unlikely (!is_a_ligature (c->buffer->info[i]) &&
+ _hb_glyph_info_is_zero_width (&c->buffer->info[i]))) {
+ c->buffer->info[i].codepoint = space;
+ c->buffer->pos[i].x_advance = 0;
+ c->buffer->pos[i].y_advance = 0;
+ }
+}
+
+
+/* Pull it all together! */
+
+static void
+hb_ot_shape_internal (hb_ot_shape_context_t *c)
+{
+ c->buffer->deallocate_var_all ();
+
+ /* Save the original direction, we use it later. */
+ c->target_direction = c->buffer->props.direction;
+
+ HB_BUFFER_ALLOCATE_VAR (c->buffer, unicode_props0);
+ HB_BUFFER_ALLOCATE_VAR (c->buffer, unicode_props1);
+
+ c->buffer->clear_output ();
+
+ hb_set_unicode_props (c->buffer);
+ hb_form_clusters (c->buffer);
+
+ hb_ensure_native_direction (c->buffer);
+
+ hb_ot_substitute (c);
+ hb_ot_position (c);
+
+ hb_ot_hide_zerowidth (c);
+
+ HB_BUFFER_DEALLOCATE_VAR (c->buffer, unicode_props1);
+ HB_BUFFER_DEALLOCATE_VAR (c->buffer, unicode_props0);
+
+ c->buffer->props.direction = c->target_direction;
+
+ c->buffer->deallocate_var_all ();
+}
+
+
+hb_bool_t
+_hb_ot_shape (hb_shape_plan_t *shape_plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer,
+ const hb_feature_t *features,
+ unsigned int num_features)
+{
+ hb_ot_shape_context_t c = {HB_SHAPER_DATA_GET (shape_plan), font, font->face, buffer, features, num_features};
+ hb_ot_shape_internal (&c);
+
+ return true;
+}
+
+
+
+static inline void
+hb_ot_map_glyphs_dumb (hb_font_t *font,
+ hb_buffer_t *buffer)
+{
+ unsigned int count = buffer->len;
+ for (unsigned int i = 0; i < count; i++)
+ font->get_glyph (buffer->cur().codepoint, 0, &buffer->cur().codepoint);
+}
+
+void
+hb_ot_shape_glyphs_closure (hb_font_t *font,
+ hb_buffer_t *buffer,
+ const hb_feature_t *features,
+ unsigned int num_features,
+ hb_set_t *glyphs)
+{
+ hb_ot_shape_plan_t plan;
+
+ buffer->guess_properties ();
+
+ /* TODO cache / ensure correct backend, etc. */
+ hb_shape_plan_t *shape_plan = hb_shape_plan_create (font->face, &buffer->props, features, num_features, NULL);
+
+ /* TODO: normalization? have shapers do closure()? */
+ /* TODO: Deal with mirrored chars? */
+ hb_ot_map_glyphs_dumb (font, buffer);
+
+ /* Seed it. It's user's responsibility to have cleard glyphs
+ * if that's what they desire. */
+ unsigned int count = buffer->len;
+ for (unsigned int i = 0; i < count; i++)
+ glyphs->add (buffer->info[i].codepoint);
+
+ /* And find transitive closure. */
+ hb_set_t copy;
+ copy.init ();
+
+ do {
+ copy.set (glyphs);
+ HB_SHAPER_DATA_GET (shape_plan)->substitute_closure (font->face, glyphs);
+ } while (!copy.equal (glyphs));
+
+ hb_shape_plan_destroy (shape_plan);
+}
diff --git a/src/hb-ot-tag.cc b/src/hb-ot-tag.cc
new file mode 100644
index 0000000..ac60e96
--- /dev/null
+++ b/src/hb-ot-tag.cc
@@ -0,0 +1,710 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ * Copyright © 2011 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-private.hh"
+#include "hb-ot.h"
+
+#include <string.h>
+
+
+
+/* hb_script_t */
+
+static hb_tag_t
+hb_ot_old_tag_from_script (hb_script_t script)
+{
+ switch ((hb_tag_t) script) {
+ case HB_SCRIPT_INVALID: return HB_OT_TAG_DEFAULT_SCRIPT;
+
+ /* KATAKANA and HIRAGANA both map to 'kana' */
+ case HB_SCRIPT_HIRAGANA: return HB_TAG('k','a','n','a');
+
+ /* Spaces at the end are preserved, unlike ISO 15924 */
+ case HB_SCRIPT_LAO: return HB_TAG('l','a','o',' ');
+ case HB_SCRIPT_YI: return HB_TAG('y','i',' ',' ');
+ /* Unicode-5.0 additions */
+ case HB_SCRIPT_NKO: return HB_TAG('n','k','o',' ');
+ /* Unicode-5.1 additions */
+ case HB_SCRIPT_VAI: return HB_TAG('v','a','i',' ');
+ /* Unicode-5.2 additions */
+ /* Unicode-6.0 additions */
+ }
+
+ /* Else, just change first char to lowercase and return */
+ return ((hb_tag_t) script) | 0x20000000;
+}
+
+static hb_script_t
+hb_ot_old_tag_to_script (hb_tag_t tag)
+{
+ if (unlikely (tag == HB_OT_TAG_DEFAULT_SCRIPT))
+ return HB_SCRIPT_INVALID;
+
+ /* This side of the conversion is fully algorithmic. */
+
+ /* Any spaces at the end of the tag are replaced by repeating the last
+ * letter. Eg 'nko ' -> 'Nkoo' */
+ if (unlikely ((tag & 0x0000FF00) == 0x00002000))
+ tag |= (tag >> 8) & 0x0000FF00; /* Copy second letter to third */
+ if (unlikely ((tag & 0x000000FF) == 0x00000020))
+ tag |= (tag >> 8) & 0x000000FF; /* Copy third letter to fourth */
+
+ /* Change first char to uppercase and return */
+ return (hb_script_t) (tag & ~0x20000000);
+}
+
+static hb_tag_t
+hb_ot_new_tag_from_script (hb_script_t script)
+{
+ switch ((hb_tag_t) script) {
+ case HB_SCRIPT_BENGALI: return HB_TAG('b','n','g','2');
+ case HB_SCRIPT_DEVANAGARI: return HB_TAG('d','e','v','2');
+ case HB_SCRIPT_GUJARATI: return HB_TAG('g','j','r','2');
+ case HB_SCRIPT_GURMUKHI: return HB_TAG('g','u','r','2');
+ case HB_SCRIPT_KANNADA: return HB_TAG('k','n','d','2');
+ case HB_SCRIPT_MALAYALAM: return HB_TAG('m','l','m','2');
+ case HB_SCRIPT_ORIYA: return HB_TAG('o','r','y','2');
+ case HB_SCRIPT_TAMIL: return HB_TAG('t','m','l','2');
+ case HB_SCRIPT_TELUGU: return HB_TAG('t','e','l','2');
+ }
+
+ return HB_OT_TAG_DEFAULT_SCRIPT;
+}
+
+static hb_script_t
+hb_ot_new_tag_to_script (hb_tag_t tag)
+{
+ switch (tag) {
+ case HB_TAG('b','n','g','2'): return HB_SCRIPT_BENGALI;
+ case HB_TAG('d','e','v','2'): return HB_SCRIPT_DEVANAGARI;
+ case HB_TAG('g','j','r','2'): return HB_SCRIPT_GUJARATI;
+ case HB_TAG('g','u','r','2'): return HB_SCRIPT_GURMUKHI;
+ case HB_TAG('k','n','d','2'): return HB_SCRIPT_KANNADA;
+ case HB_TAG('m','l','m','2'): return HB_SCRIPT_MALAYALAM;
+ case HB_TAG('o','r','y','2'): return HB_SCRIPT_ORIYA;
+ case HB_TAG('t','m','l','2'): return HB_SCRIPT_TAMIL;
+ case HB_TAG('t','e','l','2'): return HB_SCRIPT_TELUGU;
+ }
+
+ return HB_SCRIPT_UNKNOWN;
+}
+
+/*
+ * Complete list at:
+ * https://www.microsoft.com/typography/otspec/scripttags.htm
+ * https://www.microsoft.com/typography/otspec160/scripttagsProposed.htm
+ *
+ * Most of the script tags are the same as the ISO 15924 tag but lowercased.
+ * So we just do that, and handle the exceptional cases in a switch.
+ */
+
+void
+hb_ot_tags_from_script (hb_script_t script,
+ hb_tag_t *script_tag_1,
+ hb_tag_t *script_tag_2)
+{
+ hb_tag_t new_tag;
+
+ *script_tag_2 = HB_OT_TAG_DEFAULT_SCRIPT;
+ *script_tag_1 = hb_ot_old_tag_from_script (script);
+
+ new_tag = hb_ot_new_tag_from_script (script);
+ if (unlikely (new_tag != HB_OT_TAG_DEFAULT_SCRIPT)) {
+ *script_tag_2 = *script_tag_1;
+ *script_tag_1 = new_tag;
+ }
+}
+
+hb_script_t
+hb_ot_tag_to_script (hb_tag_t tag)
+{
+ if (unlikely ((tag & 0x000000FF) == '2'))
+ return hb_ot_new_tag_to_script (tag);
+
+ return hb_ot_old_tag_to_script (tag);
+}
+
+
+/* hb_language_t */
+
+typedef struct {
+ char language[6];
+ hb_tag_t tag;
+} LangTag;
+
+/*
+ * Complete list at:
+ * http://www.microsoft.com/typography/otspec/languagetags.htm
+ *
+ * Generated by intersecting the OpenType language tag list from
+ * Draft OpenType 1.5 spec, with with the ISO 639-3 codes from
+ * 2008/08/04, matching on name, and finally adjusted manually.
+ *
+ * Many items still missing. Those are commented out at the end.
+ * Keep sorted for bsearch.
+ */
+
+static const LangTag ot_languages[] = {
+ {"aa", HB_TAG('A','F','R',' ')}, /* Afar */
+ {"ab", HB_TAG('A','B','K',' ')}, /* Abkhazian */
+ {"abq", HB_TAG('A','B','A',' ')}, /* Abaza */
+ {"ady", HB_TAG('A','D','Y',' ')}, /* Adyghe */
+ {"af", HB_TAG('A','F','K',' ')}, /* Afrikaans */
+ {"aiw", HB_TAG('A','R','I',' ')}, /* Aari */
+ {"am", HB_TAG('A','M','H',' ')}, /* Amharic */
+ {"ar", HB_TAG('A','R','A',' ')}, /* Arabic */
+ {"arn", HB_TAG('M','A','P',' ')}, /* Mapudungun */
+ {"as", HB_TAG('A','S','M',' ')}, /* Assamese */
+ {"av", HB_TAG('A','V','R',' ')}, /* Avaric */
+ {"awa", HB_TAG('A','W','A',' ')}, /* Awadhi */
+ {"ay", HB_TAG('A','Y','M',' ')}, /* Aymara */
+ {"az", HB_TAG('A','Z','E',' ')}, /* Azerbaijani */
+ {"ba", HB_TAG('B','S','H',' ')}, /* Bashkir */
+ {"bal", HB_TAG('B','L','I',' ')}, /* Baluchi */
+ {"bcq", HB_TAG('B','C','H',' ')}, /* Bench */
+ {"bem", HB_TAG('B','E','M',' ')}, /* Bemba (Zambia) */
+ {"bfq", HB_TAG('B','A','D',' ')}, /* Badaga */
+ {"bft", HB_TAG('B','L','T',' ')}, /* Balti */
+ {"bg", HB_TAG('B','G','R',' ')}, /* Bulgarian */
+ {"bhb", HB_TAG('B','H','I',' ')}, /* Bhili */
+ {"bho", HB_TAG('B','H','O',' ')}, /* Bhojpuri */
+ {"bik", HB_TAG('B','I','K',' ')}, /* Bikol */
+ {"bin", HB_TAG('E','D','O',' ')}, /* Bini */
+ {"bm", HB_TAG('B','M','B',' ')}, /* Bambara */
+ {"bn", HB_TAG('B','E','N',' ')}, /* Bengali */
+ {"bo", HB_TAG('T','I','B',' ')}, /* Tibetan */
+ {"br", HB_TAG('B','R','E',' ')}, /* Breton */
+ {"brh", HB_TAG('B','R','H',' ')}, /* Brahui */
+ {"bs", HB_TAG('B','O','S',' ')}, /* Bosnian */
+ {"btb", HB_TAG('B','T','I',' ')}, /* Beti (Cameroon) */
+ {"ca", HB_TAG('C','A','T',' ')}, /* Catalan */
+ {"ce", HB_TAG('C','H','E',' ')}, /* Chechen */
+ {"ceb", HB_TAG('C','E','B',' ')}, /* Cebuano */
+ {"chp", HB_TAG('C','H','P',' ')}, /* Chipewyan */
+ {"chr", HB_TAG('C','H','R',' ')}, /* Cherokee */
+ {"cop", HB_TAG('C','O','P',' ')}, /* Coptic */
+ {"cr", HB_TAG('C','R','E',' ')}, /* Cree */
+ {"crh", HB_TAG('C','R','T',' ')}, /* Crimean Tatar */
+ {"crm", HB_TAG('M','C','R',' ')}, /* Moose Cree */
+ {"crx", HB_TAG('C','R','R',' ')}, /* Carrier */
+ {"cs", HB_TAG('C','S','Y',' ')}, /* Czech */
+ {"cu", HB_TAG('C','S','L',' ')}, /* Church Slavic */
+ {"cv", HB_TAG('C','H','U',' ')}, /* Chuvash */
+ {"cwd", HB_TAG('D','C','R',' ')}, /* Woods Cree */
+ {"cy", HB_TAG('W','E','L',' ')}, /* Welsh */
+ {"da", HB_TAG('D','A','N',' ')}, /* Danish */
+ {"dap", HB_TAG('N','I','S',' ')}, /* Nisi (India) */
+ {"dar", HB_TAG('D','A','R',' ')}, /* Dargwa */
+ {"de", HB_TAG('D','E','U',' ')}, /* German */
+ {"din", HB_TAG('D','N','K',' ')}, /* Dinka */
+ {"dng", HB_TAG('D','U','N',' ')}, /* Dungan */
+ {"doi", HB_TAG('D','G','R',' ')}, /* Dogri */
+ {"dsb", HB_TAG('L','S','B',' ')}, /* Lower Sorbian */
+ {"dv", HB_TAG('D','I','V',' ')}, /* Dhivehi */
+ {"dz", HB_TAG('D','Z','N',' ')}, /* Dzongkha */
+ {"ee", HB_TAG('E','W','E',' ')}, /* Ewe */
+ {"efi", HB_TAG('E','F','I',' ')}, /* Efik */
+ {"el", HB_TAG('E','L','L',' ')}, /* Modern Greek (1453-) */
+ {"en", HB_TAG('E','N','G',' ')}, /* English */
+ {"eo", HB_TAG('N','T','O',' ')}, /* Esperanto */
+ {"eot", HB_TAG('B','T','I',' ')}, /* Beti (Côte d'Ivoire) */
+ {"es", HB_TAG('E','S','P',' ')}, /* Spanish */
+ {"et", HB_TAG('E','T','I',' ')}, /* Estonian */
+ {"eu", HB_TAG('E','U','Q',' ')}, /* Basque */
+ {"eve", HB_TAG('E','V','N',' ')}, /* Even */
+ {"evn", HB_TAG('E','V','K',' ')}, /* Evenki */
+ {"fa", HB_TAG('F','A','R',' ')}, /* Persian */
+ {"ff", HB_TAG('F','U','L',' ')}, /* Fulah */
+ {"fi", HB_TAG('F','I','N',' ')}, /* Finnish */
+ {"fil", HB_TAG('P','I','L',' ')}, /* Filipino */
+ {"fj", HB_TAG('F','J','I',' ')}, /* Fijian */
+ {"fo", HB_TAG('F','O','S',' ')}, /* Faroese */
+ {"fon", HB_TAG('F','O','N',' ')}, /* Fon */
+ {"fr", HB_TAG('F','R','A',' ')}, /* French */
+ {"fur", HB_TAG('F','R','L',' ')}, /* Friulian */
+ {"fy", HB_TAG('F','R','I',' ')}, /* Western Frisian */
+ {"ga", HB_TAG('I','R','I',' ')}, /* Irish */
+ {"gaa", HB_TAG('G','A','D',' ')}, /* Ga */
+ {"gag", HB_TAG('G','A','G',' ')}, /* Gagauz */
+ {"gbm", HB_TAG('G','A','W',' ')}, /* Garhwali */
+ {"gd", HB_TAG('G','A','E',' ')}, /* Scottish Gaelic */
+ {"gl", HB_TAG('G','A','L',' ')}, /* Galician */
+ {"gld", HB_TAG('N','A','N',' ')}, /* Nanai */
+ {"gn", HB_TAG('G','U','A',' ')}, /* Guarani */
+ {"gon", HB_TAG('G','O','N',' ')}, /* Gondi */
+ {"grt", HB_TAG('G','R','O',' ')}, /* Garo */
+ {"gu", HB_TAG('G','U','J',' ')}, /* Gujarati */
+ {"guk", HB_TAG('G','M','Z',' ')}, /* Gumuz */
+ {"gv", HB_TAG('M','N','X',' ')}, /* Manx Gaelic */
+ {"ha", HB_TAG('H','A','U',' ')}, /* Hausa */
+ {"har", HB_TAG('H','R','I',' ')}, /* Harari */
+ {"he", HB_TAG('I','W','R',' ')}, /* Hebrew */
+ {"hi", HB_TAG('H','I','N',' ')}, /* Hindi */
+ {"hil", HB_TAG('H','I','L',' ')}, /* Hiligaynon */
+ {"hoc", HB_TAG('H','O',' ',' ')}, /* Ho */
+ {"hr", HB_TAG('H','R','V',' ')}, /* Croatian */
+ {"hsb", HB_TAG('U','S','B',' ')}, /* Upper Sorbian */
+ {"ht", HB_TAG('H','A','I',' ')}, /* Haitian */
+ {"hu", HB_TAG('H','U','N',' ')}, /* Hungarian */
+ {"hy", HB_TAG('H','Y','E',' ')}, /* Armenian */
+ {"id", HB_TAG('I','N','D',' ')}, /* Indonesian */
+ {"ig", HB_TAG('I','B','O',' ')}, /* Igbo */
+ {"igb", HB_TAG('E','B','I',' ')}, /* Ebira */
+ {"inh", HB_TAG('I','N','G',' ')}, /* Ingush */
+ {"is", HB_TAG('I','S','L',' ')}, /* Icelandic */
+ {"it", HB_TAG('I','T','A',' ')}, /* Italian */
+ {"iu", HB_TAG('I','N','U',' ')}, /* Inuktitut */
+ {"ja", HB_TAG('J','A','N',' ')}, /* Japanese */
+ {"jv", HB_TAG('J','A','V',' ')}, /* Javanese */
+ {"ka", HB_TAG('K','A','T',' ')}, /* Georgian */
+ {"kam", HB_TAG('K','M','B',' ')}, /* Kamba (Kenya) */
+ {"kbd", HB_TAG('K','A','B',' ')}, /* Kabardian */
+ {"kdr", HB_TAG('K','R','M',' ')}, /* Karaim */
+ {"kdt", HB_TAG('K','U','Y',' ')}, /* Kuy */
+ {"kfr", HB_TAG('K','A','C',' ')}, /* Kachchi */
+ {"kfy", HB_TAG('K','M','N',' ')}, /* Kumaoni */
+ {"kha", HB_TAG('K','S','I',' ')}, /* Khasi */
+ {"khw", HB_TAG('K','H','W',' ')}, /* Khowar */
+ {"ki", HB_TAG('K','I','K',' ')}, /* Kikuyu */
+ {"kk", HB_TAG('K','A','Z',' ')}, /* Kazakh */
+ {"kl", HB_TAG('G','R','N',' ')}, /* Kalaallisut */
+ {"kln", HB_TAG('K','A','L',' ')}, /* Kalenjin */
+ {"km", HB_TAG('K','H','M',' ')}, /* Central Khmer */
+ {"kmw", HB_TAG('K','M','O',' ')}, /* Komo (Democratic Republic of Congo) */
+ {"kn", HB_TAG('K','A','N',' ')}, /* Kannada */
+ {"ko", HB_TAG('K','O','R',' ')}, /* Korean */
+ {"koi", HB_TAG('K','O','P',' ')}, /* Komi-Permyak */
+ {"kok", HB_TAG('K','O','K',' ')}, /* Konkani */
+ {"kpe", HB_TAG('K','P','L',' ')}, /* Kpelle */
+ {"kpv", HB_TAG('K','O','Z',' ')}, /* Komi-Zyrian */
+ {"kpy", HB_TAG('K','Y','K',' ')}, /* Koryak */
+ {"kqy", HB_TAG('K','R','T',' ')}, /* Koorete */
+ {"kr", HB_TAG('K','N','R',' ')}, /* Kanuri */
+ {"kri", HB_TAG('K','R','I',' ')}, /* Krio */
+ {"krl", HB_TAG('K','R','L',' ')}, /* Karelian */
+ {"kru", HB_TAG('K','U','U',' ')}, /* Kurukh */
+ {"ks", HB_TAG('K','S','H',' ')}, /* Kashmiri */
+ {"ku", HB_TAG('K','U','R',' ')}, /* Kurdish */
+ {"kum", HB_TAG('K','U','M',' ')}, /* Kumyk */
+ {"kvd", HB_TAG('K','U','I',' ')}, /* Kui (Indonesia) */
+ {"kxu", HB_TAG('K','U','I',' ')}, /* Kui (India) */
+ {"ky", HB_TAG('K','I','R',' ')}, /* Kirghiz */
+ {"la", HB_TAG('L','A','T',' ')}, /* Latin */
+ {"lad", HB_TAG('J','U','D',' ')}, /* Ladino */
+ {"lb", HB_TAG('L','T','Z',' ')}, /* Luxembourgish */
+ {"lbe", HB_TAG('L','A','K',' ')}, /* Lak */
+ {"lbj", HB_TAG('L','D','K',' ')}, /* Ladakhi */
+ {"lif", HB_TAG('L','M','B',' ')}, /* Limbu */
+ {"lld", HB_TAG('L','A','D',' ')}, /* Ladin */
+ {"ln", HB_TAG('L','I','N',' ')}, /* Lingala */
+ {"lo", HB_TAG('L','A','O',' ')}, /* Lao */
+ {"lt", HB_TAG('L','T','H',' ')}, /* Lithuanian */
+ {"luo", HB_TAG('L','U','O',' ')}, /* Luo (Kenya and Tanzania) */
+ {"luw", HB_TAG('L','U','O',' ')}, /* Luo (Cameroon) */
+ {"lv", HB_TAG('L','V','I',' ')}, /* Latvian */
+ {"lzz", HB_TAG('L','A','Z',' ')}, /* Laz */
+ {"mai", HB_TAG('M','T','H',' ')}, /* Maithili */
+ {"mdc", HB_TAG('M','L','E',' ')}, /* Male (Papua New Guinea) */
+ {"mdf", HB_TAG('M','O','K',' ')}, /* Moksha */
+ {"mdy", HB_TAG('M','L','E',' ')}, /* Male (Ethiopia) */
+ {"men", HB_TAG('M','D','E',' ')}, /* Mende (Sierra Leone) */
+ {"mg", HB_TAG('M','L','G',' ')}, /* Malagasy */
+ {"mi", HB_TAG('M','R','I',' ')}, /* Maori */
+ {"mk", HB_TAG('M','K','D',' ')}, /* Macedonian */
+ {"ml", HB_TAG('M','L','R',' ')}, /* Malayalam */
+ {"mn", HB_TAG('M','N','G',' ')}, /* Mongolian */
+ {"mnc", HB_TAG('M','C','H',' ')}, /* Manchu */
+ {"mni", HB_TAG('M','N','I',' ')}, /* Manipuri */
+ {"mnk", HB_TAG('M','N','D',' ')}, /* Mandinka */
+ {"mns", HB_TAG('M','A','N',' ')}, /* Mansi */
+ {"mnw", HB_TAG('M','O','N',' ')}, /* Mon */
+ {"mo", HB_TAG('M','O','L',' ')}, /* Moldavian */
+ {"moh", HB_TAG('M','O','H',' ')}, /* Mohawk */
+ {"mpe", HB_TAG('M','A','J',' ')}, /* Majang */
+ {"mr", HB_TAG('M','A','R',' ')}, /* Marathi */
+ {"ms", HB_TAG('M','L','Y',' ')}, /* Malay */
+ {"mt", HB_TAG('M','T','S',' ')}, /* Maltese */
+ {"mwr", HB_TAG('M','A','W',' ')}, /* Marwari */
+ {"my", HB_TAG('B','R','M',' ')}, /* Burmese */
+ {"mym", HB_TAG('M','E','N',' ')}, /* Me'en */
+ {"myv", HB_TAG('E','R','Z',' ')}, /* Erzya */
+ {"nb", HB_TAG('N','O','R',' ')}, /* Norwegian Bokmål */
+ {"nco", HB_TAG('S','I','B',' ')}, /* Sibe */
+ {"ne", HB_TAG('N','E','P',' ')}, /* Nepali */
+ {"new", HB_TAG('N','E','W',' ')}, /* Newari */
+ {"ng", HB_TAG('N','D','G',' ')}, /* Ndonga */
+ {"ngl", HB_TAG('L','M','W',' ')}, /* Lomwe */
+ {"niu", HB_TAG('N','I','U',' ')}, /* Niuean */
+ {"niv", HB_TAG('G','I','L',' ')}, /* Gilyak */
+ {"nl", HB_TAG('N','L','D',' ')}, /* Dutch */
+ {"nn", HB_TAG('N','Y','N',' ')}, /* Norwegian Nynorsk */
+ {"no", HB_TAG('N','O','R',' ')}, /* Norwegian (deprecated) */
+ {"nog", HB_TAG('N','O','G',' ')}, /* Nogai */
+ {"nqo", HB_TAG('N','K','O',' ')}, /* N'Ko */
+ {"nsk", HB_TAG('N','A','S',' ')}, /* Naskapi */
+ {"ny", HB_TAG('C','H','I',' ')}, /* Nyanja */
+ {"oc", HB_TAG('O','C','I',' ')}, /* Occitan (post 1500) */
+ {"oj", HB_TAG('O','J','B',' ')}, /* Ojibwa */
+ {"om", HB_TAG('O','R','O',' ')}, /* Oromo */
+ {"or", HB_TAG('O','R','I',' ')}, /* Oriya */
+ {"os", HB_TAG('O','S','S',' ')}, /* Ossetian */
+ {"pa", HB_TAG('P','A','N',' ')}, /* Panjabi */
+ {"pi", HB_TAG('P','A','L',' ')}, /* Pali */
+ {"pl", HB_TAG('P','L','K',' ')}, /* Polish */
+ {"plp", HB_TAG('P','A','P',' ')}, /* Palpa */
+ {"prs", HB_TAG('D','R','I',' ')}, /* Dari */
+ {"ps", HB_TAG('P','A','S',' ')}, /* Pushto */
+ {"pt", HB_TAG('P','T','G',' ')}, /* Portuguese */
+ {"raj", HB_TAG('R','A','J',' ')}, /* Rajasthani */
+ {"ria", HB_TAG('R','I','A',' ')}, /* Riang (India) */
+ {"ril", HB_TAG('R','I','A',' ')}, /* Riang (Myanmar) */
+ {"ro", HB_TAG('R','O','M',' ')}, /* Romanian */
+ {"rom", HB_TAG('R','O','Y',' ')}, /* Romany */
+ {"ru", HB_TAG('R','U','S',' ')}, /* Russian */
+ {"rue", HB_TAG('R','S','Y',' ')}, /* Rusyn */
+ {"sa", HB_TAG('S','A','N',' ')}, /* Sanskrit */
+ {"sah", HB_TAG('Y','A','K',' ')}, /* Yakut */
+ {"sat", HB_TAG('S','A','T',' ')}, /* Santali */
+ {"sck", HB_TAG('S','A','D',' ')}, /* Sadri */
+ {"sd", HB_TAG('S','N','D',' ')}, /* Sindhi */
+ {"se", HB_TAG('N','S','M',' ')}, /* Northern Sami */
+ {"seh", HB_TAG('S','N','A',' ')}, /* Sena */
+ {"sel", HB_TAG('S','E','L',' ')}, /* Selkup */
+ {"sg", HB_TAG('S','G','O',' ')}, /* Sango */
+ {"shn", HB_TAG('S','H','N',' ')}, /* Shan */
+ {"si", HB_TAG('S','N','H',' ')}, /* Sinhala */
+ {"sid", HB_TAG('S','I','D',' ')}, /* Sidamo */
+ {"sjd", HB_TAG('K','S','M',' ')}, /* Kildin Sami */
+ {"sk", HB_TAG('S','K','Y',' ')}, /* Slovak */
+ {"skr", HB_TAG('S','R','K',' ')}, /* Seraiki */
+ {"sl", HB_TAG('S','L','V',' ')}, /* Slovenian */
+ {"sm", HB_TAG('S','M','O',' ')}, /* Samoan */
+ {"sma", HB_TAG('S','S','M',' ')}, /* Southern Sami */
+ {"smj", HB_TAG('L','S','M',' ')}, /* Lule Sami */
+ {"smn", HB_TAG('I','S','M',' ')}, /* Inari Sami */
+ {"sms", HB_TAG('S','K','S',' ')}, /* Skolt Sami */
+ {"snk", HB_TAG('S','N','K',' ')}, /* Soninke */
+ {"so", HB_TAG('S','M','L',' ')}, /* Somali */
+ {"sq", HB_TAG('S','Q','I',' ')}, /* Albanian */
+ {"sr", HB_TAG('S','R','B',' ')}, /* Serbian */
+ {"srr", HB_TAG('S','R','R',' ')}, /* Serer */
+ {"suq", HB_TAG('S','U','R',' ')}, /* Suri */
+ {"sv", HB_TAG('S','V','E',' ')}, /* Swedish */
+ {"sva", HB_TAG('S','V','A',' ')}, /* Svan */
+ {"sw", HB_TAG('S','W','K',' ')}, /* Swahili */
+ {"swb", HB_TAG('C','M','R',' ')}, /* Comorian */
+ {"syr", HB_TAG('S','Y','R',' ')}, /* Syriac */
+ {"ta", HB_TAG('T','A','M',' ')}, /* Tamil */
+ {"tcy", HB_TAG('T','U','L',' ')}, /* Tulu */
+ {"te", HB_TAG('T','E','L',' ')}, /* Telugu */
+ {"tg", HB_TAG('T','A','J',' ')}, /* Tajik */
+ {"th", HB_TAG('T','H','A',' ')}, /* Thai */
+ {"ti", HB_TAG('T','G','Y',' ')}, /* Tigrinya */
+ {"tig", HB_TAG('T','G','R',' ')}, /* Tigre */
+ {"tk", HB_TAG('T','K','M',' ')}, /* Turkmen */
+ {"tn", HB_TAG('T','N','A',' ')}, /* Tswana */
+ {"tnz", HB_TAG('T','N','G',' ')}, /* Tonga (Thailand) */
+ {"to", HB_TAG('T','N','G',' ')}, /* Tonga (Tonga Islands) */
+ {"tog", HB_TAG('T','N','G',' ')}, /* Tonga (Nyasa) */
+ {"toi", HB_TAG('T','N','G',' ')}, /* Tonga (Zambia) */
+ {"tr", HB_TAG('T','R','K',' ')}, /* Turkish */
+ {"ts", HB_TAG('T','S','G',' ')}, /* Tsonga */
+ {"tt", HB_TAG('T','A','T',' ')}, /* Tatar */
+ {"tw", HB_TAG('T','W','I',' ')}, /* Twi */
+ {"ty", HB_TAG('T','H','T',' ')}, /* Tahitian */
+ {"udm", HB_TAG('U','D','M',' ')}, /* Udmurt */
+ {"ug", HB_TAG('U','Y','G',' ')}, /* Uighur */
+ {"uk", HB_TAG('U','K','R',' ')}, /* Ukrainian */
+ {"unr", HB_TAG('M','U','N',' ')}, /* Mundari */
+ {"ur", HB_TAG('U','R','D',' ')}, /* Urdu */
+ {"uz", HB_TAG('U','Z','B',' ')}, /* Uzbek */
+ {"ve", HB_TAG('V','E','N',' ')}, /* Venda */
+ {"vi", HB_TAG('V','I','T',' ')}, /* Vietnamese */
+ {"wbm", HB_TAG('W','A',' ',' ')}, /* Wa */
+ {"wbr", HB_TAG('W','A','G',' ')}, /* Wagdi */
+ {"wo", HB_TAG('W','L','F',' ')}, /* Wolof */
+ {"xal", HB_TAG('K','L','M',' ')}, /* Kalmyk */
+ {"xh", HB_TAG('X','H','S',' ')}, /* Xhosa */
+ {"xom", HB_TAG('K','M','O',' ')}, /* Komo (Sudan) */
+ {"xsl", HB_TAG('S','S','L',' ')}, /* South Slavey */
+ {"yi", HB_TAG('J','I','I',' ')}, /* Yiddish */
+ {"yo", HB_TAG('Y','B','A',' ')}, /* Yoruba */
+ {"yso", HB_TAG('N','I','S',' ')}, /* Nisi (China) */
+ {"zne", HB_TAG('Z','N','D',' ')}, /* Zande */
+ {"zu", HB_TAG('Z','U','L',' ')} /* Zulu */
+
+ /* I couldn't find the language id for these */
+
+/*{"??", HB_TAG('A','G','W',' ')},*/ /* Agaw */
+/*{"??", HB_TAG('A','L','S',' ')},*/ /* Alsatian */
+/*{"??", HB_TAG('A','L','T',' ')},*/ /* Altai */
+/*{"??", HB_TAG('A','R','K',' ')},*/ /* Arakanese */
+/*{"??", HB_TAG('A','T','H',' ')},*/ /* Athapaskan */
+/*{"??", HB_TAG('B','A','G',' ')},*/ /* Baghelkhandi */
+/*{"??", HB_TAG('B','A','L',' ')},*/ /* Balkar */
+/*{"??", HB_TAG('B','A','U',' ')},*/ /* Baule */
+/*{"??", HB_TAG('B','B','R',' ')},*/ /* Berber */
+/*{"??", HB_TAG('B','C','R',' ')},*/ /* Bible Cree */
+/*{"??", HB_TAG('B','E','L',' ')},*/ /* Belarussian */
+/*{"??", HB_TAG('B','I','L',' ')},*/ /* Bilen */
+/*{"??", HB_TAG('B','K','F',' ')},*/ /* Blackfoot */
+/*{"??", HB_TAG('B','L','N',' ')},*/ /* Balante */
+/*{"??", HB_TAG('B','M','L',' ')},*/ /* Bamileke */
+/*{"??", HB_TAG('B','R','I',' ')},*/ /* Braj Bhasha */
+/*{"??", HB_TAG('C','H','G',' ')},*/ /* Chaha Gurage */
+/*{"??", HB_TAG('C','H','H',' ')},*/ /* Chattisgarhi */
+/*{"??", HB_TAG('C','H','K',' ')},*/ /* Chukchi */
+/*{"??", HB_TAG('D','J','R',' ')},*/ /* Djerma */
+/*{"??", HB_TAG('D','N','G',' ')},*/ /* Dangme */
+/*{"??", HB_TAG('E','C','R',' ')},*/ /* Eastern Cree */
+/*{"??", HB_TAG('F','A','N',' ')},*/ /* French Antillean */
+/*{"??", HB_TAG('F','L','E',' ')},*/ /* Flemish */
+/*{"??", HB_TAG('F','N','E',' ')},*/ /* Forest Nenets */
+/*{"??", HB_TAG('F','T','A',' ')},*/ /* Futa */
+/*{"??", HB_TAG('G','A','R',' ')},*/ /* Garshuni */
+/*{"??", HB_TAG('G','E','Z',' ')},*/ /* Ge'ez */
+/*{"??", HB_TAG('H','A','L',' ')},*/ /* Halam */
+/*{"??", HB_TAG('H','A','R',' ')},*/ /* Harauti */
+/*{"??", HB_TAG('H','A','W',' ')},*/ /* Hawaiin */
+/*{"??", HB_TAG('H','B','N',' ')},*/ /* Hammer-Banna */
+/*{"??", HB_TAG('H','M','A',' ')},*/ /* High Mari */
+/*{"??", HB_TAG('H','N','D',' ')},*/ /* Hindko */
+/*{"??", HB_TAG('I','J','O',' ')},*/ /* Ijo */
+/*{"??", HB_TAG('I','L','O',' ')},*/ /* Ilokano */
+/*{"??", HB_TAG('I','R','T',' ')},*/ /* Irish Traditional */
+/*{"??", HB_TAG('J','U','L',' ')},*/ /* Jula */
+/*{"??", HB_TAG('K','A','R',' ')},*/ /* Karachay */
+/*{"??", HB_TAG('K','E','B',' ')},*/ /* Kebena */
+/*{"??", HB_TAG('K','G','E',' ')},*/ /* Khutsuri Georgian */
+/*{"??", HB_TAG('K','H','A',' ')},*/ /* Khakass */
+/*{"??", HB_TAG('K','H','K',' ')},*/ /* Khanty-Kazim */
+/*{"??", HB_TAG('K','H','S',' ')},*/ /* Khanty-Shurishkar */
+/*{"??", HB_TAG('K','H','V',' ')},*/ /* Khanty-Vakhi */
+/*{"??", HB_TAG('K','I','S',' ')},*/ /* Kisii */
+/*{"??", HB_TAG('K','K','N',' ')},*/ /* Kokni */
+/*{"??", HB_TAG('K','M','S',' ')},*/ /* Komso */
+/*{"??", HB_TAG('K','O','D',' ')},*/ /* Kodagu */
+/*{"??", HB_TAG('K','O','H',' ')},*/ /* Korean Old Hangul */
+/*{"??", HB_TAG('K','O','N',' ')},*/ /* Kikongo */
+/*{"??", HB_TAG('K','R','K',' ')},*/ /* Karakalpak */
+/*{"??", HB_TAG('K','R','N',' ')},*/ /* Karen */
+/*{"??", HB_TAG('K','U','L',' ')},*/ /* Kulvi */
+/*{"??", HB_TAG('L','A','H',' ')},*/ /* Lahuli */
+/*{"??", HB_TAG('L','A','M',' ')},*/ /* Lambani */
+/*{"??", HB_TAG('L','C','R',' ')},*/ /* L-Cree */
+/*{"??", HB_TAG('L','E','Z',' ')},*/ /* Lezgi */
+/*{"??", HB_TAG('L','M','A',' ')},*/ /* Low Mari */
+/*{"??", HB_TAG('L','U','B',' ')},*/ /* Luba */
+/*{"??", HB_TAG('L','U','G',' ')},*/ /* Luganda */
+/*{"??", HB_TAG('L','U','H',' ')},*/ /* Luhya */
+/*{"??", HB_TAG('M','A','K',' ')},*/ /* Makua */
+/*{"??", HB_TAG('M','A','L',' ')},*/ /* Malayalam Traditional */
+/*{"??", HB_TAG('M','B','N',' ')},*/ /* Mbundu */
+/*{"??", HB_TAG('M','I','Z',' ')},*/ /* Mizo */
+/*{"??", HB_TAG('M','L','N',' ')},*/ /* Malinke */
+/*{"??", HB_TAG('M','N','K',' ')},*/ /* Maninka */
+/*{"??", HB_TAG('M','O','R',' ')},*/ /* Moroccan */
+/*{"??", HB_TAG('N','A','G',' ')},*/ /* Naga-Assamese */
+/*{"??", HB_TAG('N','C','R',' ')},*/ /* N-Cree */
+/*{"??", HB_TAG('N','D','B',' ')},*/ /* Ndebele */
+/*{"??", HB_TAG('N','G','R',' ')},*/ /* Nagari */
+/*{"??", HB_TAG('N','H','C',' ')},*/ /* Norway House Cree */
+/*{"??", HB_TAG('N','K','L',' ')},*/ /* Nkole */
+/*{"??", HB_TAG('N','T','A',' ')},*/ /* Northern Tai */
+/*{"??", HB_TAG('O','C','R',' ')},*/ /* Oji-Cree */
+/*{"??", HB_TAG('P','A','A',' ')},*/ /* Palestinian Aramaic */
+/*{"??", HB_TAG('P','G','R',' ')},*/ /* Polytonic Greek */
+/*{"??", HB_TAG('P','L','G',' ')},*/ /* Palaung */
+/*{"??", HB_TAG('Q','I','N',' ')},*/ /* Chin */
+/*{"??", HB_TAG('R','B','U',' ')},*/ /* Russian Buriat */
+/*{"??", HB_TAG('R','C','R',' ')},*/ /* R-Cree */
+/*{"??", HB_TAG('R','M','S',' ')},*/ /* Rhaeto-Romanic */
+/*{"??", HB_TAG('R','U','A',' ')},*/ /* Ruanda */
+/*{"??", HB_TAG('S','A','Y',' ')},*/ /* Sayisi */
+/*{"??", HB_TAG('S','E','K',' ')},*/ /* Sekota */
+/*{"??", HB_TAG('S','I','G',' ')},*/ /* Silte Gurage */
+/*{"??", HB_TAG('S','L','A',' ')},*/ /* Slavey */
+/*{"??", HB_TAG('S','O','G',' ')},*/ /* Sodo Gurage */
+/*{"??", HB_TAG('S','O','T',' ')},*/ /* Sotho */
+/*{"??", HB_TAG('S','W','A',' ')},*/ /* Swadaya Aramaic */
+/*{"??", HB_TAG('S','W','Z',' ')},*/ /* Swazi */
+/*{"??", HB_TAG('S','X','T',' ')},*/ /* Sutu */
+/*{"??", HB_TAG('T','A','B',' ')},*/ /* Tabasaran */
+/*{"??", HB_TAG('T','C','R',' ')},*/ /* TH-Cree */
+/*{"??", HB_TAG('T','G','N',' ')},*/ /* Tongan */
+/*{"??", HB_TAG('T','M','N',' ')},*/ /* Temne */
+/*{"??", HB_TAG('T','N','E',' ')},*/ /* Tundra Nenets */
+/*{"??", HB_TAG('T','O','D',' ')},*/ /* Todo */
+/*{"??", HB_TAG('T','U','A',' ')},*/ /* Turoyo Aramaic */
+/*{"??", HB_TAG('T','U','V',' ')},*/ /* Tuvin */
+/*{"??", HB_TAG('W','C','R',' ')},*/ /* West-Cree */
+/*{"??", HB_TAG('X','B','D',' ')},*/ /* Tai Lue */
+/*{"??", HB_TAG('Y','C','R',' ')},*/ /* Y-Cree */
+/*{"??", HB_TAG('Y','I','C',' ')},*/ /* Yi Classic */
+/*{"??", HB_TAG('Y','I','M',' ')},*/ /* Yi Modern */
+/*{"??", HB_TAG('Z','H','P',' ')},*/ /* Chinese Phonetic */
+};
+
+static const LangTag ot_languages_zh[] = {
+ {"zh-cn", HB_TAG('Z','H','S',' ')}, /* Chinese (China) */
+ {"zh-hk", HB_TAG('Z','H','H',' ')}, /* Chinese (Hong Kong) */
+ {"zh-mo", HB_TAG('Z','H','T',' ')}, /* Chinese (Macao) */
+ {"zh-sg", HB_TAG('Z','H','S',' ')}, /* Chinese (Singapore) */
+ {"zh-tw", HB_TAG('Z','H','T',' ')} /* Chinese (Taiwan) */
+};
+
+static int
+lang_compare_first_component (const char *a,
+ const char *b)
+{
+ unsigned int da, db;
+ const char *p;
+
+ p = strchr (a, '-');
+ da = p ? (unsigned int) (p - a) : strlen (a);
+
+ p = strchr (b, '-');
+ db = p ? (unsigned int) (p - b) : strlen (b);
+
+ return strncmp (a, b, MAX (da, db));
+}
+
+static hb_bool_t
+lang_matches (const char *lang_str, const char *spec)
+{
+ unsigned int len = strlen (spec);
+
+ return strncmp (lang_str, spec, len) == 0 &&
+ (lang_str[len] == '\0' || lang_str[len] == '-');
+}
+
+hb_tag_t
+hb_ot_tag_from_language (hb_language_t language)
+{
+ const char *lang_str, *s;
+ const LangTag *lang_tag;
+
+ if (language == HB_LANGUAGE_INVALID)
+ return HB_OT_TAG_DEFAULT_LANGUAGE;
+
+ lang_str = hb_language_to_string (language);
+
+ s = strstr (lang_str, "x-hbot");
+ if (s) {
+ char tag[4];
+ int i;
+ s += 6;
+ for (i = 0; i < 4 && ISALPHA (s[i]); i++)
+ tag[i] = TOUPPER (s[i]);
+ if (i) {
+ for (; i < 4; i++)
+ tag[i] = ' ';
+ return HB_TAG_CHAR4 (tag);
+ }
+ }
+
+ /* Find a language matching in the first component */
+ lang_tag = (LangTag *) bsearch (lang_str, ot_languages,
+ ARRAY_LENGTH (ot_languages), sizeof (LangTag),
+ (hb_compare_func_t) lang_compare_first_component);
+ if (lang_tag)
+ return lang_tag->tag;
+
+ /* Otherwise, check the Chinese ones */
+ if (0 == lang_compare_first_component (lang_str, "zh"))
+ {
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_LENGTH (ot_languages_zh); i++)
+ {
+ lang_tag = &ot_languages_zh[i];
+ if (lang_matches (lang_tag->language, lang_str))
+ return lang_tag->tag;
+ }
+
+ /* Otherwise just return 'ZHS ' */
+ return HB_TAG('Z','H','S',' ');
+ }
+
+ s = strchr (lang_str, '-');
+ if (!s)
+ s = lang_str + strlen (lang_str);
+ if (s - lang_str == 3) {
+ /* Assume it's ISO-639-3 and upper-case and use it. */
+ return hb_tag_from_string (lang_str, s - lang_str) & ~0x20202000;
+ }
+
+ return HB_OT_TAG_DEFAULT_LANGUAGE;
+}
+
+hb_language_t
+hb_ot_tag_to_language (hb_tag_t tag)
+{
+ unsigned int i;
+
+ if (tag == HB_OT_TAG_DEFAULT_LANGUAGE)
+ return NULL;
+
+ for (i = 0; i < ARRAY_LENGTH (ot_languages); i++)
+ if (ot_languages[i].tag == tag)
+ return hb_language_from_string (ot_languages[i].language, -1);
+
+ /* If tag starts with ZH, it's Chinese */
+ if ((tag & 0xFFFF0000) == 0x5A480000) {
+ switch (tag) {
+ case HB_TAG('Z','H','H',' '): return hb_language_from_string ("zh-hk", -1); /* Hong Kong */
+ default: {
+ /* Encode the tag... */
+ unsigned char buf[14] = "zh-x-hbot";
+ buf[9] = tag >> 24;
+ buf[10] = (tag >> 16) & 0xFF;
+ buf[11] = (tag >> 8) & 0xFF;
+ buf[12] = tag & 0xFF;
+ if (buf[12] == 0x20)
+ buf[12] = '\0';
+ buf[13] = '\0';
+ return hb_language_from_string ((char *) buf, -1);
+ }
+ }
+ }
+
+ /* Else return a custom language in the form of "x-hbotABCD" */
+ {
+ unsigned char buf[11] = "x-hbot";
+ buf[6] = tag >> 24;
+ buf[7] = (tag >> 16) & 0xFF;
+ buf[8] = (tag >> 8) & 0xFF;
+ buf[9] = tag & 0xFF;
+ if (buf[9] == 0x20)
+ buf[9] = '\0';
+ buf[10] = '\0';
+ return hb_language_from_string ((char *) buf, -1);
+ }
+}
+
+
diff --git a/src/hb-ot-tag.h b/src/hb-ot-tag.h
new file mode 100644
index 0000000..1bf12ab
--- /dev/null
+++ b/src/hb-ot-tag.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OT_H_IN
+#error "Include <hb-ot.h> instead."
+#endif
+
+#ifndef HB_OT_TAG_H
+#define HB_OT_TAG_H
+
+#include "hb.h"
+
+HB_BEGIN_DECLS
+
+
+#define HB_OT_TAG_DEFAULT_SCRIPT HB_TAG ('D', 'F', 'L', 'T')
+#define HB_OT_TAG_DEFAULT_LANGUAGE HB_TAG ('d', 'f', 'l', 't')
+
+void
+hb_ot_tags_from_script (hb_script_t script,
+ hb_tag_t *script_tag_1,
+ hb_tag_t *script_tag_2);
+
+hb_script_t
+hb_ot_tag_to_script (hb_tag_t tag);
+
+hb_tag_t
+hb_ot_tag_from_language (hb_language_t language);
+
+hb_language_t
+hb_ot_tag_to_language (hb_tag_t tag);
+
+
+HB_END_DECLS
+
+#endif /* HB_OT_TAG_H */
diff --git a/src/hb-ot.h b/src/hb-ot.h
new file mode 100644
index 0000000..2d750c3
--- /dev/null
+++ b/src/hb-ot.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_OT_H
+#define HB_OT_H
+#define HB_OT_H_IN
+
+#include "hb.h"
+
+#include "hb-ot-layout.h"
+#include "hb-ot-tag.h"
+
+HB_BEGIN_DECLS
+
+void
+hb_ot_shape_glyphs_closure (hb_font_t *font,
+ hb_buffer_t *buffer,
+ const hb_feature_t *features,
+ unsigned int num_features,
+ hb_set_t *glyphs);
+
+HB_END_DECLS
+
+#undef HB_OT_H_IN
+#endif /* HB_OT_H */
diff --git a/src/hb-private.hh b/src/hb-private.hh
new file mode 100644
index 0000000..8655020
--- /dev/null
+++ b/src/hb-private.hh
@@ -0,0 +1,812 @@
+/*
+ * Copyright © 2007,2008,2009 Red Hat, Inc.
+ * 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.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_PRIVATE_HH
+#define HB_PRIVATE_HH
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "hb.h"
+#define HB_H_IN
+#ifdef HAVE_OT
+#include "hb-ot.h"
+#define HB_OT_H_IN
+#endif
+
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#include <assert.h>
+
+/* We only use these two for debug output. However, the debug code is
+ * always seen by the compiler (and optimized out in non-debug builds.
+ * If including these becomes a problem, we can start thinking about
+ * someway around that. */
+#include <stdio.h>
+#include <errno.h>
+#include <stdarg.h>
+
+
+
+/* Essentials */
+
+#ifndef NULL
+# define NULL ((void *) 0)
+#endif
+
+
+/* Basics */
+
+
+#undef MIN
+template <typename Type>
+static inline Type MIN (const Type &a, const Type &b) { return a < b ? a : b; }
+
+#undef MAX
+template <typename Type>
+static inline Type MAX (const Type &a, const Type &b) { return a > b ? a : b; }
+
+
+#undef ARRAY_LENGTH
+template <typename Type, unsigned int n>
+static inline unsigned int ARRAY_LENGTH (const Type (&a)[n]) { return n; }
+
+#define HB_STMT_START do
+#define HB_STMT_END while (0)
+
+#define _ASSERT_STATIC1(_line, _cond) typedef int _static_assert_on_line_##_line##_failed[(_cond)?1:-1]
+#define _ASSERT_STATIC0(_line, _cond) _ASSERT_STATIC1 (_line, (_cond))
+#define ASSERT_STATIC(_cond) _ASSERT_STATIC0 (__LINE__, (_cond))
+
+#define ASSERT_STATIC_EXPR(_cond)((void) sizeof (char[(_cond) ? 1 : -1]))
+#define ASSERT_STATIC_EXPR_ZERO(_cond) (0 * sizeof (char[(_cond) ? 1 : -1]))
+
+#define _PASTE1(a,b) a##b
+#define PASTE(a,b) _PASTE1(a,b)
+
+/* Lets assert int types. Saves trouble down the road. */
+
+ASSERT_STATIC (sizeof (int8_t) == 1);
+ASSERT_STATIC (sizeof (uint8_t) == 1);
+ASSERT_STATIC (sizeof (int16_t) == 2);
+ASSERT_STATIC (sizeof (uint16_t) == 2);
+ASSERT_STATIC (sizeof (int32_t) == 4);
+ASSERT_STATIC (sizeof (uint32_t) == 4);
+ASSERT_STATIC (sizeof (int64_t) == 8);
+ASSERT_STATIC (sizeof (uint64_t) == 8);
+
+ASSERT_STATIC (sizeof (hb_codepoint_t) == 4);
+ASSERT_STATIC (sizeof (hb_position_t) == 4);
+ASSERT_STATIC (sizeof (hb_mask_t) == 4);
+ASSERT_STATIC (sizeof (hb_var_int_t) == 4);
+
+
+/* We like our types POD */
+
+#define _ASSERT_TYPE_POD1(_line, _type) union _type_##_type##_on_line_##_line##_is_not_POD { _type instance; }
+#define _ASSERT_TYPE_POD0(_line, _type) _ASSERT_TYPE_POD1 (_line, _type)
+#define ASSERT_TYPE_POD(_type) _ASSERT_TYPE_POD0 (__LINE__, _type)
+
+#ifdef __GNUC__
+# define _ASSERT_INSTANCE_POD1(_line, _instance) \
+ HB_STMT_START { \
+ typedef __typeof__(_instance) _type_##_line; \
+ _ASSERT_TYPE_POD1 (_line, _type_##_line); \
+ } HB_STMT_END
+#else
+# define _ASSERT_INSTANCE_POD1(_line, _instance) typedef int _assertion_on_line_##_line##_not_tested
+#endif
+# define _ASSERT_INSTANCE_POD0(_line, _instance) _ASSERT_INSTANCE_POD1 (_line, _instance)
+# define ASSERT_INSTANCE_POD(_instance) _ASSERT_INSTANCE_POD0 (__LINE__, _instance)
+
+/* Check _assertion in a method environment */
+#define _ASSERT_POD1(_line) \
+ inline void _static_assertion_on_line_##_line (void) const \
+ { _ASSERT_INSTANCE_POD1 (_line, *this); /* Make sure it's POD. */ }
+# define _ASSERT_POD0(_line) _ASSERT_POD1 (_line)
+# define ASSERT_POD() _ASSERT_POD0 (__LINE__)
+
+
+
+/* Misc */
+
+
+#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__)
+#define _HB_BOOLEAN_EXPR(expr) ((expr) ? 1 : 0)
+#define likely(expr) (__builtin_expect (_HB_BOOLEAN_EXPR(expr), 1))
+#define unlikely(expr) (__builtin_expect (_HB_BOOLEAN_EXPR(expr), 0))
+#else
+#define likely(expr) (expr)
+#define unlikely(expr) (expr)
+#endif
+
+#ifndef __GNUC__
+#undef __attribute__
+#define __attribute__(x)
+#endif
+
+#if __GNUC__ >= 3
+#define HB_PURE_FUNC __attribute__((pure))
+#define HB_CONST_FUNC __attribute__((const))
+#define HB_PRINTF_FUNC(format_idx, arg_idx) __attribute__((__format__ (__printf__, format_idx, arg_idx)))
+#else
+#define HB_PURE_FUNC
+#define HB_CONST_FUNC
+#define HB_PRINTF_FUNC(format_idx, arg_idx)
+#endif
+#if __GNUC__ >= 4
+#define HB_UNUSED __attribute__((unused))
+#else
+#define HB_UNUSED
+#endif
+
+#ifndef HB_INTERNAL
+# ifndef __MINGW32__
+# define HB_INTERNAL __attribute__((__visibility__("hidden")))
+# else
+# define HB_INTERNAL
+# endif
+#endif
+
+
+#if (defined(__WIN32__) && !defined(__WINE__)) || defined(_MSC_VER)
+#define snprintf _snprintf
+#endif
+
+#ifdef _MSC_VER
+#undef inline
+#define inline __inline
+#endif
+
+#ifdef __STRICT_ANSI__
+#undef inline
+#define inline __inline__
+#endif
+
+
+#if __GNUC__ >= 3
+#define HB_FUNC __PRETTY_FUNCTION__
+#elif defined(_MSC_VER)
+#define HB_FUNC __FUNCSIG__
+#else
+#define HB_FUNC __func__
+#endif
+
+
+/* Return the number of 1 bits in mask. */
+static inline HB_CONST_FUNC unsigned int
+_hb_popcount32 (uint32_t mask)
+{
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ return __builtin_popcount (mask);
+#else
+ /* "HACKMEM 169" */
+ register uint32_t y;
+ y = (mask >> 1) &033333333333;
+ y = mask - y - ((y >>1) & 033333333333);
+ return (((y + (y >> 3)) & 030707070707) % 077);
+#endif
+}
+
+/* Returns the number of bits needed to store number */
+static inline HB_CONST_FUNC unsigned int
+_hb_bit_storage (unsigned int number)
+{
+#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__)
+ return likely (number) ? (sizeof (unsigned int) * 8 - __builtin_clz (number)) : 0;
+#else
+ register unsigned int n_bits = 0;
+ while (number) {
+ n_bits++;
+ number >>= 1;
+ }
+ return n_bits;
+#endif
+}
+
+/* Returns the number of zero bits in the least significant side of number */
+static inline HB_CONST_FUNC unsigned int
+_hb_ctz (unsigned int number)
+{
+#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__)
+ return likely (number) ? __builtin_ctz (number) : 0;
+#else
+ register unsigned int n_bits = 0;
+ if (unlikely (!number)) return 0;
+ while (!(number & 1)) {
+ n_bits++;
+ number >>= 1;
+ }
+ return n_bits;
+#endif
+}
+
+static inline bool
+_hb_unsigned_int_mul_overflows (unsigned int count, unsigned int size)
+{
+ return (size > 0) && (count >= ((unsigned int) -1) / size);
+}
+
+
+/* Type of bsearch() / qsort() compare function */
+typedef int (*hb_compare_func_t) (const void *, const void *);
+
+
+
+
+/* arrays and maps */
+
+
+#define HB_PREALLOCED_ARRAY_INIT {0}
+template <typename Type, unsigned int StaticSize>
+struct hb_prealloced_array_t
+{
+ unsigned int len;
+ unsigned int allocated;
+ Type *array;
+ Type static_array[StaticSize];
+
+ void init (void) { memset (this, 0, sizeof (*this)); }
+
+ inline Type& operator [] (unsigned int i) { return array[i]; }
+ inline const Type& operator [] (unsigned int i) const { return array[i]; }
+
+ inline Type *push (void)
+ {
+ if (!array) {
+ array = static_array;
+ allocated = ARRAY_LENGTH (static_array);
+ }
+ if (likely (len < allocated))
+ return &array[len++];
+
+ /* Need to reallocate */
+ unsigned int new_allocated = allocated + (allocated >> 1) + 8;
+ Type *new_array = NULL;
+
+ if (array == static_array) {
+ new_array = (Type *) calloc (new_allocated, sizeof (Type));
+ if (new_array)
+ memcpy (new_array, array, len * sizeof (Type));
+ } else {
+ bool overflows = (new_allocated < allocated) || _hb_unsigned_int_mul_overflows (new_allocated, sizeof (Type));
+ if (likely (!overflows)) {
+ new_array = (Type *) realloc (array, new_allocated * sizeof (Type));
+ }
+ }
+
+ if (unlikely (!new_array))
+ return NULL;
+
+ array = new_array;
+ allocated = new_allocated;
+ return &array[len++];
+ }
+
+ inline void pop (void)
+ {
+ len--;
+ /* TODO: shrink array if needed */
+ }
+
+ inline void shrink (unsigned int l)
+ {
+ if (l < len)
+ len = l;
+ /* TODO: shrink array if needed */
+ }
+
+ template <typename T>
+ inline Type *find (T v) {
+ for (unsigned int i = 0; i < len; i++)
+ if (array[i] == v)
+ return &array[i];
+ return NULL;
+ }
+ template <typename T>
+ inline const Type *find (T v) const {
+ for (unsigned int i = 0; i < len; i++)
+ if (array[i] == v)
+ return &array[i];
+ return NULL;
+ }
+
+ inline void sort (void)
+ {
+ qsort (array, len, sizeof (Type), (hb_compare_func_t) Type::cmp);
+ }
+
+ inline void sort (unsigned int start, unsigned int end)
+ {
+ qsort (array + start, end - start, sizeof (Type), (hb_compare_func_t) Type::cmp);
+ }
+
+ template <typename T>
+ inline Type *bsearch (T *key)
+ {
+ return (Type *) ::bsearch (key, array, len, sizeof (Type), (hb_compare_func_t) Type::cmp);
+ }
+ template <typename T>
+ inline const Type *bsearch (T *key) const
+ {
+ return (const Type *) ::bsearch (key, array, len, sizeof (Type), (hb_compare_func_t) Type::cmp);
+ }
+
+ inline void finish (void)
+ {
+ if (array != static_array)
+ free (array);
+ array = NULL;
+ allocated = len = 0;
+ }
+};
+
+
+#define HB_LOCKABLE_SET_INIT {HB_PREALLOCED_ARRAY_INIT}
+template <typename item_t, typename lock_t>
+struct hb_lockable_set_t
+{
+ hb_prealloced_array_t <item_t, 2> items;
+
+ inline void init (void) { items.init (); }
+
+ template <typename T>
+ inline item_t *replace_or_insert (T v, lock_t &l, bool replace)
+ {
+ l.lock ();
+ item_t *item = items.find (v);
+ if (item) {
+ if (replace) {
+ item_t old = *item;
+ *item = v;
+ l.unlock ();
+ old.finish ();
+ }
+ else {
+ item = NULL;
+ l.unlock ();
+ }
+ } else {
+ item = items.push ();
+ if (likely (item))
+ *item = v;
+ l.unlock ();
+ }
+ return item;
+ }
+
+ template <typename T>
+ inline void remove (T v, lock_t &l)
+ {
+ l.lock ();
+ item_t *item = items.find (v);
+ if (item) {
+ item_t old = *item;
+ *item = items[items.len - 1];
+ items.pop ();
+ l.unlock ();
+ old.finish ();
+ } else {
+ l.unlock ();
+ }
+ }
+
+ template <typename T>
+ inline bool find (T v, item_t *i, lock_t &l)
+ {
+ l.lock ();
+ item_t *item = items.find (v);
+ if (item)
+ *i = *item;
+ l.unlock ();
+ return !!item;
+ }
+
+ template <typename T>
+ inline item_t *find_or_insert (T v, lock_t &l)
+ {
+ l.lock ();
+ item_t *item = items.find (v);
+ if (!item) {
+ item = items.push ();
+ if (likely (item))
+ *item = v;
+ }
+ l.unlock ();
+ return item;
+ }
+
+ inline void finish (lock_t &l)
+ {
+ if (!items.len) {
+ /* No need for locking. */
+ items.finish ();
+ return;
+ }
+ l.lock ();
+ while (items.len) {
+ item_t old = items[items.len - 1];
+ items.pop ();
+ l.unlock ();
+ old.finish ();
+ l.lock ();
+ }
+ items.finish ();
+ l.unlock ();
+ }
+
+};
+
+
+
+
+/* Big-endian handling */
+
+static inline uint16_t hb_be_uint16 (const uint16_t v)
+{
+ const uint8_t *V = (const uint8_t *) &v;
+ return (V[0] << 8) | V[1];
+}
+
+static inline uint16_t hb_uint16_swap (const uint16_t v)
+{
+ return (v >> 8) | (v << 8);
+}
+
+static inline uint32_t hb_uint32_swap (const uint32_t v)
+{
+ return (hb_uint16_swap (v) << 16) | hb_uint16_swap (v >> 16);
+}
+
+/* Note, of the following macros, uint16_get is the one called many many times.
+ * If there is any optimizations to be done, it's in that macro. However, I
+ * already confirmed that on my T400 ThinkPad at least, using bswap_16(), which
+ * results in a single ror instruction, does NOT speed this up. In fact, it
+ * resulted in a minor slowdown. At any rate, note that v may not be correctly
+ * aligned, so I think the current implementation is optimal.
+ */
+
+#define hb_be_uint16_put(v,V) HB_STMT_START { v[0] = (V>>8); v[1] = (V); } HB_STMT_END
+#define hb_be_uint16_get(v) (uint16_t) ((v[0] << 8) + v[1])
+#define hb_be_uint16_eq(a,b) (a[0] == b[0] && a[1] == b[1])
+
+#define hb_be_uint32_put(v,V) HB_STMT_START { v[0] = (V>>24); v[1] = (V>>16); v[2] = (V>>8); v[3] = (V); } HB_STMT_END
+#define hb_be_uint32_get(v) (uint32_t) ((v[0] << 24) + (v[1] << 16) + (v[2] << 8) + v[3])
+#define hb_be_uint32_eq(a,b) (a[0] == b[0] && a[1] == b[1] && a[2] == b[2] && a[3] == b[3])
+
+
+/* ASCII tag/character handling */
+
+static inline unsigned char ISALPHA (unsigned char c)
+{ return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); }
+static inline unsigned char ISALNUM (unsigned char c)
+{ return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9'); }
+static inline unsigned char TOUPPER (unsigned char c)
+{ return (c >= 'a' && c <= 'z') ? c - 'a' + 'A' : c; }
+static inline unsigned char TOLOWER (unsigned char c)
+{ return (c >= 'A' && c <= 'Z') ? c - 'A' + 'a' : c; }
+
+#define HB_TAG_CHAR4(s) (HB_TAG(((const char *) s)[0], \
+ ((const char *) s)[1], \
+ ((const char *) s)[2], \
+ ((const char *) s)[3]))
+
+
+/* C++ helpers */
+
+/* Makes class uncopyable. Use in private: section. */
+#define NO_COPY(T) \
+ T (const T &o); \
+ T &operator = (const T &o)
+
+
+/* Debug */
+
+
+#ifndef HB_DEBUG
+#define HB_DEBUG 0
+#endif
+
+static inline bool
+_hb_debug (unsigned int level,
+ unsigned int max_level)
+{
+ return level < max_level;
+}
+
+#define DEBUG_LEVEL(WHAT, LEVEL) (_hb_debug ((LEVEL), HB_DEBUG_##WHAT))
+#define DEBUG(WHAT) (DEBUG_LEVEL (WHAT, 0))
+
+template <int max_level> inline void
+_hb_debug_msg_va (const char *what,
+ const void *obj,
+ const char *func,
+ bool indented,
+ unsigned int level,
+ int level_dir,
+ const char *message,
+ va_list ap)
+{
+ if (!_hb_debug (level, max_level))
+ return;
+
+ fprintf (stderr, "%-10s", what ? what : "");
+
+ if (obj)
+ fprintf (stderr, "(%0*lx) ", (unsigned int) (2 * sizeof (void *)), (unsigned long) obj);
+ else
+ fprintf (stderr, " %*s ", (unsigned int) (2 * sizeof (void *)), "");
+
+ if (indented) {
+/* One may want to add ASCII version of these. See:
+ * https://bugs.freedesktop.org/show_bug.cgi?id=50970 */
+#define VBAR "\342\224\202" /* U+2502 BOX DRAWINGS LIGHT VERTICAL */
+#define VRBAR "\342\224\234" /* U+251C BOX DRAWINGS LIGHT VERTICAL AND RIGHT */
+#define DLBAR "\342\225\256" /* U+256E BOX DRAWINGS LIGHT ARC DOWN AND LEFT */
+#define ULBAR "\342\225\257" /* U+256F BOX DRAWINGS LIGHT ARC UP AND LEFT */
+#define LBAR "\342\225\264" /* U+2574 BOX DRAWINGS LIGHT LEFT */
+ static const char bars[] = VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR;
+ fprintf (stderr, "%2d %s" VRBAR "%s",
+ level,
+ bars + sizeof (bars) - 1 - MIN ((unsigned int) sizeof (bars), (unsigned int) (sizeof (VBAR) - 1) * level),
+ level_dir ? (level_dir > 0 ? DLBAR : ULBAR) : LBAR);
+ } else
+ fprintf (stderr, " " VRBAR LBAR);
+
+ if (func) {
+ /* If there's a class name, just write that. */
+ const char *dotdot = strstr (func, "::");
+ const char *space = strchr (func, ' ');
+ if (space && dotdot && space < dotdot)
+ func = space + 1;
+ unsigned int func_len = dotdot ? dotdot - func : strlen (func);
+ fprintf (stderr, "%.*s: ", func_len, func);
+ }
+
+ if (message)
+ vfprintf (stderr, message, ap);
+
+ fprintf (stderr, "\n");
+}
+template <> inline void
+_hb_debug_msg_va<0> (const char *what HB_UNUSED,
+ const void *obj HB_UNUSED,
+ const char *func HB_UNUSED,
+ bool indented HB_UNUSED,
+ unsigned int level HB_UNUSED,
+ int level_dir HB_UNUSED,
+ const char *message HB_UNUSED,
+ va_list ap HB_UNUSED) {}
+
+template <int max_level> inline void
+_hb_debug_msg (const char *what,
+ const void *obj,
+ const char *func,
+ bool indented,
+ unsigned int level,
+ int level_dir,
+ const char *message,
+ ...) HB_PRINTF_FUNC(7, 8);
+template <int max_level> inline void
+_hb_debug_msg (const char *what,
+ const void *obj,
+ const char *func,
+ bool indented,
+ unsigned int level,
+ int level_dir,
+ const char *message,
+ ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ _hb_debug_msg_va<max_level> (what, obj, func, indented, level, level_dir, message, ap);
+ va_end (ap);
+}
+template <> inline void
+_hb_debug_msg<0> (const char *what HB_UNUSED,
+ const void *obj HB_UNUSED,
+ const char *func HB_UNUSED,
+ bool indented HB_UNUSED,
+ unsigned int level HB_UNUSED,
+ int level_dir HB_UNUSED,
+ const char *message HB_UNUSED,
+ ...) HB_PRINTF_FUNC(7, 8);
+template <> inline void
+_hb_debug_msg<0> (const char *what HB_UNUSED,
+ const void *obj HB_UNUSED,
+ const char *func HB_UNUSED,
+ bool indented HB_UNUSED,
+ unsigned int level HB_UNUSED,
+ int level_dir HB_UNUSED,
+ const char *message HB_UNUSED,
+ ...) {}
+
+#define DEBUG_MSG_LEVEL(WHAT, OBJ, LEVEL, LEVEL_DIR, ...) _hb_debug_msg<HB_DEBUG_##WHAT> (#WHAT, (OBJ), NULL, true, (LEVEL), (LEVEL_DIR), __VA_ARGS__)
+#define DEBUG_MSG(WHAT, OBJ, ...) _hb_debug_msg<HB_DEBUG_##WHAT> (#WHAT, (OBJ), NULL, false, 0, 0, __VA_ARGS__)
+#define DEBUG_MSG_FUNC(WHAT, OBJ, ...) _hb_debug_msg<HB_DEBUG_##WHAT> (#WHAT, (OBJ), HB_FUNC, false, 0, 0, __VA_ARGS__)
+
+
+/*
+ * Trace
+ */
+
+template <int max_level>
+struct hb_auto_trace_t {
+ explicit inline hb_auto_trace_t (unsigned int *plevel_,
+ const char *what_,
+ const void *obj_,
+ const char *func,
+ const char *message,
+ ...) : plevel (plevel_), what (what_), obj (obj_), returned (false)
+ {
+ if (plevel) ++*plevel;
+
+ va_list ap;
+ va_start (ap, message);
+ _hb_debug_msg_va<max_level> (what, obj, func, true, plevel ? *plevel : 0, +1, message, ap);
+ va_end (ap);
+ }
+ inline ~hb_auto_trace_t (void)
+ {
+ if (unlikely (!returned)) {
+ fprintf (stderr, "OUCH, returned with no call to TRACE_RETURN. This is a bug, please report. Level was %d.\n", plevel ? *plevel : -1);
+ _hb_debug_msg<max_level> (what, obj, NULL, true, plevel ? *plevel : 1, -1, " ");
+ return;
+ }
+
+ if (plevel) --*plevel;
+ }
+
+ inline bool ret (bool v, unsigned int line = 0)
+ {
+ if (unlikely (returned)) {
+ fprintf (stderr, "OUCH, double calls to TRACE_RETURN. This is a bug, please report.\n");
+ return v;
+ }
+
+ _hb_debug_msg<max_level> (what, obj, NULL, true, plevel ? *plevel : 1, -1, "return %s (line %d)", v ? "true" : "false", line);
+ if (plevel) --*plevel;
+ plevel = NULL;
+ returned = true;
+ return v;
+ }
+
+ private:
+ unsigned int *plevel;
+ bool returned;
+ const char *what;
+ const void *obj;
+};
+template <> /* Optimize when tracing is disabled */
+struct hb_auto_trace_t<0> {
+ explicit inline hb_auto_trace_t (unsigned int *plevel_ HB_UNUSED,
+ const char *what HB_UNUSED,
+ const void *obj HB_UNUSED,
+ const char *func HB_UNUSED,
+ const char *message HB_UNUSED,
+ ...) {}
+
+ template <typename T>
+ inline T ret (T v, unsigned int line = 0) { return v; }
+};
+
+#define TRACE_RETURN(RET) trace.ret (RET, __LINE__)
+
+/* Misc */
+
+
+/* Pre-mature optimization:
+ * Checks for lo <= u <= hi but with an optimization if lo and hi
+ * are only different in a contiguous set of lower-most bits.
+ */
+template <typename T> static inline bool
+hb_in_range (T u, T lo, T hi)
+{
+ if ( ((lo^hi) & lo) == 0 &&
+ ((lo^hi) & hi) == (lo^hi) &&
+ ((lo^hi) & ((lo^hi) + 1)) == 0 )
+ return (u & ~(lo^hi)) == lo;
+ else
+ return lo <= u && u <= hi;
+}
+
+template <typename T> static inline bool
+hb_in_ranges (T u, T lo1, T hi1, T lo2, T hi2, T lo3, T hi3)
+{
+ return hb_in_range (u, lo1, hi1) || hb_in_range (u, lo2, hi2) || hb_in_range (u, lo3, hi3);
+}
+
+
+/* Useful for set-operations on small enums.
+ * For example, for testing "x ∈ {x1, x2, x3}" use:
+ * (FLAG(x) & (FLAG(x1) | FLAG(x2) | FLAG(x3)))
+ */
+#define FLAG(x) (1<<(x))
+#define FLAG_RANGE(x,y) (ASSERT_STATIC_EXPR_ZERO ((x) < (y)) + FLAG(y+1) - FLAG(x))
+
+
+template <typename T, typename T2> inline void
+hb_bubble_sort (T *array, unsigned int len, int(*compar)(const T *, const T *), T2 *array2)
+{
+ if (unlikely (!len))
+ return;
+
+ unsigned int k = len - 1;
+ do {
+ unsigned int new_k = 0;
+
+ for (unsigned int j = 0; j < k; j++)
+ if (compar (&array[j], &array[j+1]) > 0)
+ {
+ {
+ T t;
+ t = array[j];
+ array[j] = array[j + 1];
+ array[j + 1] = t;
+ }
+ if (array2)
+ {
+ T2 t;
+ t = array2[j];
+ array2[j] = array2[j + 1];
+ array2[j + 1] = t;
+ }
+
+ new_k = j;
+ }
+ k = new_k;
+ } while (k);
+}
+
+template <typename T> inline void
+hb_bubble_sort (T *array, unsigned int len, int(*compar)(const T *, const T *))
+{
+ hb_bubble_sort (array, len, compar, (int *) NULL);
+}
+
+static inline hb_bool_t
+hb_codepoint_parse (const char *s, unsigned int len, int base, hb_codepoint_t *out)
+{
+ /* Pain because we don't know whether s is nul-terminated. */
+ char buf[64];
+ strncpy (buf, s, MIN (ARRAY_LENGTH (buf) - 1, len));
+ buf[MIN (ARRAY_LENGTH (buf) - 1, len)] = '\0';
+
+ char *end;
+ errno = 0;
+ unsigned long v = strtoul (buf, &end, base);
+ if (errno) return false;
+ if (*end) return false;
+ *out = v;
+ return true;
+}
+
+
+#endif /* HB_PRIVATE_HH */
diff --git a/src/hb-set-private.hh b/src/hb-set-private.hh
new file mode 100644
index 0000000..4413579
--- /dev/null
+++ b/src/hb-set-private.hh
@@ -0,0 +1,276 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_SET_PRIVATE_HH
+#define HB_SET_PRIVATE_HH
+
+#include "hb-private.hh"
+#include "hb-set.h"
+#include "hb-object-private.hh"
+
+
+struct hb_set_digest_common_bits_t
+{
+ ASSERT_POD ();
+
+ typedef unsigned int mask_t;
+
+ inline void init (void) {
+ mask = ~0;
+ value = (mask_t) -1;
+ }
+
+ inline void add (hb_codepoint_t g) {
+ if (unlikely (value == (mask_t) -1)) {
+ value = g;
+ return;
+ }
+
+ mask ^= (g & mask) ^ value;
+ value &= mask;
+ }
+
+ inline void add_range (hb_codepoint_t a, hb_codepoint_t b) {
+ /* The negation here stands for ~(x-1). */
+ mask &= -(1 << _hb_bit_storage (a ^ b));
+ value &= mask;
+ }
+
+ inline bool may_have (hb_codepoint_t g) const {
+ return (g & mask) == value;
+ }
+
+ private:
+ mask_t mask;
+ mask_t value;
+};
+
+struct hb_set_digest_lowest_bits_t
+{
+ ASSERT_POD ();
+
+ typedef unsigned long mask_t;
+
+ inline void init (void) {
+ mask = 0;
+ }
+
+ inline void add (hb_codepoint_t g) {
+ mask |= mask_for (g);
+ }
+
+ inline void add_range (hb_codepoint_t a, hb_codepoint_t b) {
+ if (b - a >= sizeof (mask_t) * 8 - 1)
+ mask = (mask_t) -1;
+ else {
+ mask_t ma = mask_for (a);
+ mask_t mb = mask_for (b);
+ mask |= mb + (mb - ma) - (mb < ma);
+ }
+ }
+
+ inline bool may_have (hb_codepoint_t g) const {
+ return !!(mask & mask_for (g));
+ }
+
+ private:
+
+ mask_t mask_for (hb_codepoint_t g) const { return ((mask_t) 1) << (g & (sizeof (mask_t) * 8 - 1)); }
+ mask_t mask;
+};
+
+struct hb_set_digest_t
+{
+ ASSERT_POD ();
+
+ inline void init (void) {
+ digest1.init ();
+ digest2.init ();
+ }
+
+ inline void add (hb_codepoint_t g) {
+ digest1.add (g);
+ digest2.add (g);
+ }
+
+ inline void add_range (hb_codepoint_t a, hb_codepoint_t b) {
+ digest1.add_range (a, b);
+ digest2.add_range (a, b);
+ }
+
+ inline bool may_have (hb_codepoint_t g) const {
+ return digest1.may_have (g) && digest2.may_have (g);
+ }
+
+ private:
+ hb_set_digest_common_bits_t digest1;
+ hb_set_digest_lowest_bits_t digest2;
+};
+
+
+/* TODO Make this faster and memmory efficient. */
+
+struct hb_set_t
+{
+ hb_object_header_t header;
+ ASSERT_POD ();
+
+ inline void init (void) {
+ header.init ();
+ clear ();
+ }
+ inline void fini (void) {
+ }
+ inline void clear (void) {
+ memset (elts, 0, sizeof elts);
+ }
+ inline bool empty (void) const {
+ for (unsigned int i = 0; i < ARRAY_LENGTH (elts); i++)
+ if (elts[i])
+ return false;
+ return true;
+ }
+ inline void add (hb_codepoint_t g)
+ {
+ if (unlikely (g == SENTINEL)) return;
+ if (unlikely (g > MAX_G)) return;
+ elt (g) |= mask (g);
+ }
+ inline void add_range (hb_codepoint_t a, hb_codepoint_t b)
+ {
+ for (unsigned int i = a; i < b + 1; i++)
+ add (i);
+ }
+ inline void del (hb_codepoint_t g)
+ {
+ if (unlikely (g > MAX_G)) return;
+ elt (g) &= ~mask (g);
+ }
+ inline bool has (hb_codepoint_t g) const
+ {
+ if (unlikely (g > MAX_G)) return false;
+ return !!(elt (g) & mask (g));
+ }
+ inline bool intersects (hb_codepoint_t first,
+ hb_codepoint_t last) const
+ {
+ if (unlikely (first > MAX_G)) return false;
+ if (unlikely (last > MAX_G)) last = MAX_G;
+ unsigned int end = last + 1;
+ for (hb_codepoint_t i = first; i < end; i++)
+ if (has (i))
+ return true;
+ return false;
+ }
+ inline bool equal (const hb_set_t *other) const
+ {
+ for (unsigned int i = 0; i < ELTS; i++)
+ if (elts[i] != other->elts[i])
+ return false;
+ return true;
+ }
+ inline void set (const hb_set_t *other)
+ {
+ for (unsigned int i = 0; i < ELTS; i++)
+ elts[i] = other->elts[i];
+ }
+ inline void union_ (const hb_set_t *other)
+ {
+ for (unsigned int i = 0; i < ELTS; i++)
+ elts[i] |= other->elts[i];
+ }
+ inline void intersect (const hb_set_t *other)
+ {
+ for (unsigned int i = 0; i < ELTS; i++)
+ elts[i] &= other->elts[i];
+ }
+ inline void subtract (const hb_set_t *other)
+ {
+ for (unsigned int i = 0; i < ELTS; i++)
+ elts[i] &= ~other->elts[i];
+ }
+ inline void symmetric_difference (const hb_set_t *other)
+ {
+ for (unsigned int i = 0; i < ELTS; i++)
+ elts[i] ^= other->elts[i];
+ }
+ inline bool next (hb_codepoint_t *codepoint)
+ {
+ if (unlikely (*codepoint == SENTINEL)) {
+ hb_codepoint_t i = get_min ();
+ if (i != SENTINEL) {
+ *codepoint = i;
+ return true;
+ } else
+ return false;
+ }
+ for (hb_codepoint_t i = *codepoint + 1; i < MAX_G + 1; i++)
+ if (has (i)) {
+ *codepoint = i;
+ return true;
+ }
+ return false;
+ }
+ inline hb_codepoint_t get_min (void) const
+ {
+ for (unsigned int i = 0; i < ELTS; i++)
+ if (elts[i])
+ for (unsigned int j = 0; i < BITS; j++)
+ if (elts[i] & (1 << j))
+ return i * BITS + j;
+ return SENTINEL;
+ }
+ inline hb_codepoint_t get_max (void) const
+ {
+ for (unsigned int i = ELTS; i; i--)
+ if (elts[i - 1])
+ for (unsigned int j = BITS; j; j--)
+ if (elts[i - 1] & (1 << (j - 1)))
+ return (i - 1) * BITS + (j - 1);
+ return SENTINEL;
+ }
+
+ typedef uint32_t elt_t;
+ static const unsigned int MAX_G = 65536 - 1; /* XXX Fix this... */
+ static const unsigned int SHIFT = 5;
+ static const unsigned int BITS = (1 << SHIFT);
+ static const unsigned int MASK = BITS - 1;
+ static const unsigned int ELTS = (MAX_G + 1 + (BITS - 1)) / BITS;
+ static const hb_codepoint_t SENTINEL = (hb_codepoint_t) -1;
+
+ elt_t &elt (hb_codepoint_t g) { return elts[g >> SHIFT]; }
+ elt_t elt (hb_codepoint_t g) const { return elts[g >> SHIFT]; }
+ elt_t mask (hb_codepoint_t g) const { return elt_t (1) << (g & MASK); }
+
+ elt_t elts[ELTS]; /* XXX 8kb */
+
+ ASSERT_STATIC (sizeof (elt_t) * 8 == BITS);
+ ASSERT_STATIC (sizeof (elt_t) * 8 * ELTS > MAX_G);
+};
+
+
+
+#endif /* HB_SET_PRIVATE_HH */
diff --git a/src/hb-set.cc b/src/hb-set.cc
new file mode 100644
index 0000000..4225e3c
--- /dev/null
+++ b/src/hb-set.cc
@@ -0,0 +1,191 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-set-private.hh"
+
+
+
+/* Public API */
+
+
+hb_set_t *
+hb_set_create ()
+{
+ hb_set_t *set;
+
+ if (!(set = hb_object_create<hb_set_t> ()))
+ return hb_set_get_empty ();
+
+ set->clear ();
+
+ return set;
+}
+
+hb_set_t *
+hb_set_get_empty (void)
+{
+ static const hb_set_t _hb_set_nil = {
+ HB_OBJECT_HEADER_STATIC,
+
+ {0} /* elts */
+ };
+
+ return const_cast<hb_set_t *> (&_hb_set_nil);
+}
+
+hb_set_t *
+hb_set_reference (hb_set_t *set)
+{
+ return hb_object_reference (set);
+}
+
+void
+hb_set_destroy (hb_set_t *set)
+{
+ if (!hb_object_destroy (set)) return;
+
+ set->fini ();
+
+ free (set);
+}
+
+hb_bool_t
+hb_set_set_user_data (hb_set_t *set,
+ hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy,
+ hb_bool_t replace)
+{
+ return hb_object_set_user_data (set, key, data, destroy, replace);
+}
+
+void *
+hb_set_get_user_data (hb_set_t *set,
+ hb_user_data_key_t *key)
+{
+ return hb_object_get_user_data (set, key);
+}
+
+
+hb_bool_t
+hb_set_allocation_successful (hb_set_t *set HB_UNUSED)
+{
+ return true;
+}
+
+void
+hb_set_clear (hb_set_t *set)
+{
+ set->clear ();
+}
+
+hb_bool_t
+hb_set_empty (hb_set_t *set)
+{
+ return set->empty ();
+}
+
+hb_bool_t
+hb_set_has (hb_set_t *set,
+ hb_codepoint_t codepoint)
+{
+ return set->has (codepoint);
+}
+
+void
+hb_set_add (hb_set_t *set,
+ hb_codepoint_t codepoint)
+{
+ set->add (codepoint);
+}
+
+void
+hb_set_del (hb_set_t *set,
+ hb_codepoint_t codepoint)
+{
+ set->del (codepoint);
+}
+
+hb_bool_t
+hb_set_equal (hb_set_t *set,
+ hb_set_t *other)
+{
+ return set->equal (other);
+}
+
+void
+hb_set_set (hb_set_t *set,
+ hb_set_t *other)
+{
+ set->set (other);
+}
+
+void
+hb_set_union (hb_set_t *set,
+ hb_set_t *other)
+{
+ set->union_ (other);
+}
+
+void
+hb_set_intersect (hb_set_t *set,
+ hb_set_t *other)
+{
+ set->intersect (other);
+}
+
+void
+hb_set_subtract (hb_set_t *set,
+ hb_set_t *other)
+{
+ set->subtract (other);
+}
+
+void
+hb_set_symmetric_difference (hb_set_t *set,
+ hb_set_t *other)
+{
+ set->symmetric_difference (other);
+}
+
+hb_codepoint_t
+hb_set_min (hb_set_t *set)
+{
+ return set->get_min ();
+}
+
+hb_codepoint_t
+hb_set_max (hb_set_t *set)
+{
+ return set->get_max ();
+}
+
+hb_bool_t
+hb_set_next (hb_set_t *set,
+ hb_codepoint_t *codepoint)
+{
+ return set->next (codepoint);
+}
diff --git a/src/hb-set.h b/src/hb-set.h
new file mode 100644
index 0000000..1838889
--- /dev/null
+++ b/src/hb-set.h
@@ -0,0 +1,132 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_H_IN
+#error "Include <hb.h> instead."
+#endif
+
+#ifndef HB_SET_H
+#define HB_SET_H
+
+#include "hb-common.h"
+
+HB_BEGIN_DECLS
+
+
+typedef struct hb_set_t hb_set_t;
+
+
+hb_set_t *
+hb_set_create (void);
+
+hb_set_t *
+hb_set_get_empty (void);
+
+hb_set_t *
+hb_set_reference (hb_set_t *set);
+
+void
+hb_set_destroy (hb_set_t *set);
+
+hb_bool_t
+hb_set_set_user_data (hb_set_t *set,
+ hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy,
+ hb_bool_t replace);
+
+void *
+hb_set_get_user_data (hb_set_t *set,
+ hb_user_data_key_t *key);
+
+
+/* Returns false if allocation has failed before */
+hb_bool_t
+hb_set_allocation_successful (hb_set_t *set);
+
+void
+hb_set_clear (hb_set_t *set);
+
+hb_bool_t
+hb_set_empty (hb_set_t *set);
+
+hb_bool_t
+hb_set_has (hb_set_t *set,
+ hb_codepoint_t codepoint);
+
+/* Right now limited to 16-bit integers. Eventually will do full codepoint range, sans -1
+ * which we will use as a sentinel. */
+void
+hb_set_add (hb_set_t *set,
+ hb_codepoint_t codepoint);
+
+void
+hb_set_del (hb_set_t *set,
+ hb_codepoint_t codepoint);
+
+hb_bool_t
+hb_set_equal (hb_set_t *set,
+ hb_set_t *other);
+
+void
+hb_set_set (hb_set_t *set,
+ hb_set_t *other);
+
+void
+hb_set_union (hb_set_t *set,
+ hb_set_t *other);
+
+void
+hb_set_intersect (hb_set_t *set,
+ hb_set_t *other);
+
+void
+hb_set_subtract (hb_set_t *set,
+ hb_set_t *other);
+
+void
+hb_set_symmetric_difference (hb_set_t *set,
+ hb_set_t *other);
+
+/* Returns -1 if set empty. */
+hb_codepoint_t
+hb_set_min (hb_set_t *set);
+
+/* Returns -1 if set empty. */
+hb_codepoint_t
+hb_set_max (hb_set_t *set);
+
+/* Pass -1 in to get started. */
+hb_bool_t
+hb_set_next (hb_set_t *set,
+ hb_codepoint_t *codepoint);
+
+/* TODO: Add faster iteration API? */
+
+
+HB_END_DECLS
+
+#endif /* HB_SET_H */
diff --git a/src/hb-shape-plan-private.hh b/src/hb-shape-plan-private.hh
new file mode 100644
index 0000000..d6a57d6
--- /dev/null
+++ b/src/hb-shape-plan-private.hh
@@ -0,0 +1,60 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_SHAPE_PLAN_PRIVATE_HH
+#define HB_SHAPE_PLAN_PRIVATE_HH
+
+#include "hb-private.hh"
+
+#include "hb-shape-plan.h"
+
+#include "hb-shaper-private.hh"
+
+
+struct hb_shape_plan_t
+{
+ hb_object_header_t header;
+ ASSERT_POD ();
+
+ hb_bool_t default_shaper_list;
+ hb_face_t *face;
+ hb_segment_properties_t props;
+
+ hb_shape_func_t *shaper_func;
+
+ struct hb_shaper_data_t shaper_data;
+};
+
+#define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS \
+ , const hb_feature_t *user_features \
+ , unsigned int num_user_features
+#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_PROTOTYPE(shaper, shape_plan);
+#include "hb-shaper-list.hh"
+#undef HB_SHAPER_IMPLEMENT
+#undef HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS
+
+
+#endif /* HB_SHAPE_PLAN_PRIVATE_HH */
diff --git a/src/hb-shape-plan.cc b/src/hb-shape-plan.cc
new file mode 100644
index 0000000..038f6af
--- /dev/null
+++ b/src/hb-shape-plan.cc
@@ -0,0 +1,285 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-private.hh"
+
+#include "hb-shape-plan-private.hh"
+#include "hb-shaper-private.hh"
+#include "hb-font-private.hh"
+
+#define HB_SHAPER_IMPLEMENT(shaper) \
+ HB_SHAPER_DATA_ENSURE_DECLARE(shaper, face) \
+ HB_SHAPER_DATA_ENSURE_DECLARE(shaper, font)
+#include "hb-shaper-list.hh"
+#undef HB_SHAPER_IMPLEMENT
+
+
+static void
+hb_shape_plan_plan (hb_shape_plan_t *shape_plan,
+ const hb_feature_t *user_features,
+ unsigned int num_user_features,
+ const char * const *shaper_list)
+{
+ const hb_shaper_pair_t *shapers = _hb_shapers_get ();
+
+#define HB_SHAPER_PLAN(shaper) \
+ HB_STMT_START { \
+ if (hb_##shaper##_shaper_face_data_ensure (shape_plan->face)) { \
+ HB_SHAPER_DATA (shaper, shape_plan) = \
+ HB_SHAPER_DATA_CREATE_FUNC (shaper, shape_plan) (shape_plan, user_features, num_user_features); \
+ shape_plan->shaper_func = _hb_##shaper##_shape; \
+ return; \
+ } \
+ } HB_STMT_END
+
+ if (likely (!shaper_list)) {
+ for (unsigned int i = 0; i < HB_SHAPERS_COUNT; i++)
+ if (0)
+ ;
+#define HB_SHAPER_IMPLEMENT(shaper) \
+ else if (shapers[i].func == _hb_##shaper##_shape) \
+ HB_SHAPER_PLAN (shaper);
+#include "hb-shaper-list.hh"
+#undef HB_SHAPER_IMPLEMENT
+ } else {
+ for (; *shaper_list; shaper_list++)
+ if (0)
+ ;
+#define HB_SHAPER_IMPLEMENT(shaper) \
+ else if (0 == strcmp (*shaper_list, #shaper)) \
+ HB_SHAPER_PLAN (shaper);
+#include "hb-shaper-list.hh"
+#undef HB_SHAPER_IMPLEMENT
+ }
+
+#undef HB_SHAPER_PLAN
+}
+
+
+/*
+ * hb_shape_plan_t
+ */
+
+hb_shape_plan_t *
+hb_shape_plan_create (hb_face_t *face,
+ const hb_segment_properties_t *props,
+ const hb_feature_t *user_features,
+ unsigned int num_user_features,
+ const char * const *shaper_list)
+{
+ assert (props->direction != HB_DIRECTION_INVALID);
+
+ hb_shape_plan_t *shape_plan;
+
+ if (unlikely (!face))
+ face = hb_face_get_empty ();
+ if (unlikely (!props || hb_object_is_inert (face)))
+ return hb_shape_plan_get_empty ();
+ if (!(shape_plan = hb_object_create<hb_shape_plan_t> ()))
+ return hb_shape_plan_get_empty ();
+
+ hb_face_make_immutable (face);
+ shape_plan->default_shaper_list = shaper_list == NULL;
+ shape_plan->face = hb_face_reference (face);
+ shape_plan->props = *props;
+
+ hb_shape_plan_plan (shape_plan, user_features, num_user_features, shaper_list);
+
+ return shape_plan;
+}
+
+hb_shape_plan_t *
+hb_shape_plan_get_empty (void)
+{
+ static const hb_shape_plan_t _hb_shape_plan_nil = {
+ HB_OBJECT_HEADER_STATIC,
+
+ true, /* default_shaper_list */
+ NULL, /* face */
+ _HB_BUFFER_PROPS_DEFAULT, /* props */
+
+ NULL, /* shaper_func */
+
+ {
+#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_INVALID,
+#include "hb-shaper-list.hh"
+#undef HB_SHAPER_IMPLEMENT
+ }
+ };
+
+ return const_cast<hb_shape_plan_t *> (&_hb_shape_plan_nil);
+}
+
+hb_shape_plan_t *
+hb_shape_plan_reference (hb_shape_plan_t *shape_plan)
+{
+ return hb_object_reference (shape_plan);
+}
+
+void
+hb_shape_plan_destroy (hb_shape_plan_t *shape_plan)
+{
+ if (!hb_object_destroy (shape_plan)) return;
+
+#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_DESTROY(shaper, shape_plan);
+#include "hb-shaper-list.hh"
+#undef HB_SHAPER_IMPLEMENT
+
+ hb_face_destroy (shape_plan->face);
+
+ free (shape_plan);
+}
+
+
+hb_bool_t
+hb_shape_plan_execute (hb_shape_plan *shape_plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer,
+ const hb_feature_t *features,
+ unsigned int num_features)
+{
+ if (unlikely (shape_plan->face != font->face))
+ return false;
+
+#define HB_SHAPER_EXECUTE(shaper) \
+ HB_STMT_START { \
+ return HB_SHAPER_DATA (shaper, shape_plan) && \
+ hb_##shaper##_shaper_font_data_ensure (font) && \
+ _hb_##shaper##_shape (shape_plan, font, buffer, features, num_features); \
+ } HB_STMT_END
+
+ if (0)
+ ;
+#define HB_SHAPER_IMPLEMENT(shaper) \
+ else if (shape_plan->shaper_func == _hb_##shaper##_shape) \
+ HB_SHAPER_EXECUTE (shaper);
+#include "hb-shaper-list.hh"
+#undef HB_SHAPER_IMPLEMENT
+
+#undef HB_SHAPER_EXECUTE
+
+ return false;
+}
+
+
+/*
+ * caching
+ */
+
+#if 0
+static unsigned int
+hb_shape_plan_hash (const hb_shape_plan_t *shape_plan)
+{
+ return hb_segment_properties_hash (&shape_plan->props) +
+ shape_plan->default_shaper_list ? 0 : (intptr_t) shape_plan->shaper_func;
+}
+#endif
+
+/* TODO no user-feature caching for now. */
+struct hb_shape_plan_proposal_t
+{
+ const hb_segment_properties_t props;
+ const char * const *shaper_list;
+ hb_shape_func_t *shaper_func;
+};
+
+static hb_bool_t
+hb_shape_plan_matches (const hb_shape_plan_t *shape_plan,
+ const hb_shape_plan_proposal_t *proposal)
+{
+ return hb_segment_properties_equal (&shape_plan->props, &proposal->props) &&
+ ((shape_plan->default_shaper_list && proposal->shaper_list == NULL) ||
+ (shape_plan->shaper_func == proposal->shaper_func));
+}
+
+hb_shape_plan_t *
+hb_shape_plan_create_cached (hb_face_t *face,
+ const hb_segment_properties_t *props,
+ const hb_feature_t *user_features,
+ unsigned int num_user_features,
+ const char * const *shaper_list)
+{
+ if (num_user_features)
+ return hb_shape_plan_create (face, props, user_features, num_user_features, shaper_list);
+
+ hb_shape_plan_proposal_t proposal = {
+ *props,
+ shaper_list,
+ NULL
+ };
+
+ if (shaper_list) {
+ /* Choose shaper. Adapted from hb_shape_plan_plan(). */
+#define HB_SHAPER_PLAN(shaper) \
+ HB_STMT_START { \
+ if (hb_##shaper##_shaper_face_data_ensure (face)) \
+ proposal.shaper_func = _hb_##shaper##_shape; \
+ } HB_STMT_END
+
+ for (const char * const *shaper_item = shaper_list; *shaper_item; shaper_item++)
+ if (0)
+ ;
+#define HB_SHAPER_IMPLEMENT(shaper) \
+ else if (0 == strcmp (*shaper_item, #shaper)) \
+ HB_SHAPER_PLAN (shaper);
+#include "hb-shaper-list.hh"
+#undef HB_SHAPER_IMPLEMENT
+
+#undef HB_SHAPER_PLAN
+
+ if (unlikely (!proposal.shaper_list))
+ return hb_shape_plan_get_empty ();
+ }
+
+
+retry:
+ hb_face_t::plan_node_t *cached_plan_nodes = (hb_face_t::plan_node_t *) hb_atomic_ptr_get (&face->shape_plans);
+ for (hb_face_t::plan_node_t *node = cached_plan_nodes; node; node = node->next)
+ if (hb_shape_plan_matches (node->shape_plan, &proposal))
+ return hb_shape_plan_reference (node->shape_plan);
+
+ /* Not found. */
+
+ hb_shape_plan_t *shape_plan = hb_shape_plan_create (face, props, user_features, num_user_features, shaper_list);
+
+ hb_face_t::plan_node_t *node = (hb_face_t::plan_node_t *) calloc (1, sizeof (hb_face_t::plan_node_t));
+ if (unlikely (!node))
+ return shape_plan;
+
+ node->shape_plan = shape_plan;
+ node->next = cached_plan_nodes;
+
+ if (!hb_atomic_ptr_cmpexch (&face->shape_plans, cached_plan_nodes, node)) {
+ hb_shape_plan_destroy (shape_plan);
+ free (node);
+ goto retry;
+ }
+
+ /* Release our reference on face. */
+ hb_face_destroy (face);
+
+ return hb_shape_plan_reference (shape_plan);
+}
diff --git a/src/hb-shape-plan.h b/src/hb-shape-plan.h
new file mode 100644
index 0000000..f1a14a9
--- /dev/null
+++ b/src/hb-shape-plan.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_SHAPE_PLAN_H
+#define HB_SHAPE_PLAN_H
+
+/* TODO To become public one day */
+
+#include "hb-private.hh"
+
+#include "hb-buffer-private.hh"
+
+
+typedef struct hb_shape_plan_t hb_shape_plan;
+
+/*
+ * hb_shape_plan_t
+ */
+
+HB_INTERNAL hb_shape_plan_t *
+hb_shape_plan_create (hb_face_t *face,
+ const hb_segment_properties_t *props,
+ const hb_feature_t *user_features,
+ unsigned int num_user_features,
+ const char * const *shaper_list);
+
+HB_INTERNAL hb_shape_plan_t *
+hb_shape_plan_create_cached (hb_face_t *face,
+ const hb_segment_properties_t *props,
+ const hb_feature_t *user_features,
+ unsigned int num_user_features,
+ const char * const *shaper_list);
+
+HB_INTERNAL hb_shape_plan_t *
+hb_shape_plan_get_empty (void);
+
+HB_INTERNAL hb_shape_plan_t *
+hb_shape_plan_reference (hb_shape_plan_t *shape_plan);
+
+HB_INTERNAL void
+hb_shape_plan_destroy (hb_shape_plan_t *shape_plan);
+
+
+HB_INTERNAL hb_bool_t
+hb_shape_plan_execute (hb_shape_plan *shape_plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer,
+ const hb_feature_t *features,
+ unsigned int num_features);
+
+
+#endif /* HB_SHAPE_PLAN_H */
diff --git a/src/hb-shape.cc b/src/hb-shape.cc
new file mode 100644
index 0000000..5aa587b
--- /dev/null
+++ b/src/hb-shape.cc
@@ -0,0 +1,103 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#include "hb-private.hh"
+
+#include "hb-shaper-private.hh"
+#include "hb-shape-plan-private.hh"
+#include "hb-buffer-private.hh"
+#include "hb-font-private.hh"
+
+
+static const char **static_shaper_list;
+
+static
+void free_static_shaper_list (void)
+{
+ free (static_shaper_list);
+}
+
+const char **
+hb_shape_list_shapers (void)
+{
+retry:
+ const char **shaper_list = (const char **) hb_atomic_ptr_get (&static_shaper_list);
+
+ if (unlikely (!shaper_list))
+ {
+ /* Not found; allocate one. */
+ shaper_list = (const char **) calloc (1 + HB_SHAPERS_COUNT, sizeof (const char *));
+ if (unlikely (!shaper_list)) {
+ static const char *nil_shaper_list[] = {NULL};
+ return nil_shaper_list;
+ }
+
+ const hb_shaper_pair_t *shapers = _hb_shapers_get ();
+ unsigned int i;
+ for (i = 0; i < HB_SHAPERS_COUNT; i++)
+ shaper_list[i] = shapers[i].name;
+ shaper_list[i] = NULL;
+
+ if (!hb_atomic_ptr_cmpexch (&static_shaper_list, NULL, shaper_list)) {
+ free (shaper_list);
+ goto retry;
+ }
+
+#ifdef HAVE_ATEXIT
+ atexit (free_static_shaper_list); /* First person registers atexit() callback. */
+#endif
+ }
+
+ return shaper_list;
+}
+
+
+hb_bool_t
+hb_shape_full (hb_font_t *font,
+ hb_buffer_t *buffer,
+ const hb_feature_t *features,
+ unsigned int num_features,
+ const char * const *shaper_list)
+{
+ if (unlikely (!buffer->len))
+ return true;
+
+ buffer->guess_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);
+ return res;
+}
+
+void
+hb_shape (hb_font_t *font,
+ hb_buffer_t *buffer,
+ const hb_feature_t *features,
+ unsigned int num_features)
+{
+ hb_shape_full (font, buffer, features, num_features, NULL);
+}
diff --git a/src/hb-shape.h b/src/hb-shape.h
new file mode 100644
index 0000000..84bf3e7
--- /dev/null
+++ b/src/hb-shape.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_H_IN
+#error "Include <hb.h> instead."
+#endif
+
+#ifndef HB_SHAPE_H
+#define HB_SHAPE_H
+
+#include "hb-common.h"
+#include "hb-buffer.h"
+#include "hb-font.h"
+
+HB_BEGIN_DECLS
+
+
+typedef struct hb_feature_t {
+ hb_tag_t tag;
+ uint32_t value;
+ unsigned int start;
+ unsigned int end;
+} hb_feature_t;
+
+
+void
+hb_shape (hb_font_t *font,
+ hb_buffer_t *buffer,
+ const hb_feature_t *features,
+ unsigned int num_features);
+
+hb_bool_t
+hb_shape_full (hb_font_t *font,
+ hb_buffer_t *buffer,
+ const hb_feature_t *features,
+ unsigned int num_features,
+ const char * const *shaper_list);
+
+const char **
+hb_shape_list_shapers (void);
+
+
+HB_END_DECLS
+
+#endif /* HB_SHAPE_H */
diff --git a/src/hb-shaper-impl-private.hh b/src/hb-shaper-impl-private.hh
new file mode 100644
index 0000000..7844081
--- /dev/null
+++ b/src/hb-shaper-impl-private.hh
@@ -0,0 +1,43 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_SHAPER_IMPL_PRIVATE_HH
+#define HB_SHAPER_IMPL_PRIVATE_HH
+
+#include "hb-private.hh"
+
+#include "hb-shaper-private.hh"
+#include "hb-shape-plan-private.hh"
+#include "hb-font-private.hh"
+#include "hb-buffer-private.hh"
+
+
+#ifdef HB_SHAPER
+#define HB_SHAPER_DATA_GET(object) HB_SHAPER_DATA (HB_SHAPER, object)
+#endif
+
+
+#endif /* HB_SHAPER_IMPL_PRIVATE_HH */
diff --git a/src/hb-shaper-list.hh b/src/hb-shaper-list.hh
new file mode 100644
index 0000000..8e67dbd
--- /dev/null
+++ b/src/hb-shaper-list.hh
@@ -0,0 +1,50 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_SHAPER_LIST_HH
+#define HB_SHAPER_LIST_HH
+#endif /* HB_SHAPER_LIST_HH */ /* Dummy header guards */
+
+/* v--- Add new shapers in the right place here. */
+#ifdef HAVE_GRAPHITE2
+HB_SHAPER_IMPLEMENT (graphite2)
+#endif
+#ifdef HAVE_UNISCRIBE
+HB_SHAPER_IMPLEMENT (uniscribe)
+#endif
+#ifdef HAVE_CORETEXT
+HB_SHAPER_IMPLEMENT (coretext)
+#endif
+
+#ifdef HAVE_OT
+HB_SHAPER_IMPLEMENT (ot) /* <--- This is our main OpenType shaper. */
+#endif
+
+#ifdef HAVE_HB_OLD
+HB_SHAPER_IMPLEMENT (old)
+#endif
+
+HB_SHAPER_IMPLEMENT (fallback) /* <--- This should be last. */
diff --git a/src/hb-shaper-private.hh b/src/hb-shaper-private.hh
new file mode 100644
index 0000000..186318d
--- /dev/null
+++ b/src/hb-shaper-private.hh
@@ -0,0 +1,108 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_SHAPER_PRIVATE_HH
+#define HB_SHAPER_PRIVATE_HH
+
+#include "hb-private.hh"
+
+#include "hb-shape-plan.h" /* TODO remove */
+
+typedef hb_bool_t hb_shape_func_t (hb_shape_plan_t *shape_plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer,
+ const hb_feature_t *features,
+ unsigned int num_features);
+
+#define HB_SHAPER_IMPLEMENT(name) \
+ extern "C" HB_INTERNAL hb_shape_func_t _hb_##name##_shape;
+#include "hb-shaper-list.hh"
+#undef HB_SHAPER_IMPLEMENT
+
+struct hb_shaper_pair_t {
+ char name[16];
+ hb_shape_func_t *func;
+};
+
+HB_INTERNAL const hb_shaper_pair_t *
+_hb_shapers_get (void);
+
+
+/* For embedding in face / font / ... */
+struct hb_shaper_data_t {
+#define HB_SHAPER_IMPLEMENT(shaper) void *shaper;
+#include "hb-shaper-list.hh"
+#undef HB_SHAPER_IMPLEMENT
+};
+
+#define HB_SHAPERS_COUNT (sizeof (hb_shaper_data_t) / sizeof (void *))
+
+/* Means: succeeded, but don't need to keep any data. */
+#define HB_SHAPER_DATA_SUCCEEDED ((void *) +1)
+
+/* Means: tried but failed to create. */
+#define HB_SHAPER_DATA_INVALID ((void *) -1)
+#define HB_SHAPER_DATA_IS_INVALID(data) ((void *) (data) == HB_SHAPER_DATA_INVALID)
+
+#define HB_SHAPER_DATA_TYPE(shaper, object) struct hb_##shaper##_shaper_##object##_data_t
+#define HB_SHAPER_DATA_INSTANCE(shaper, object, instance) (* (HB_SHAPER_DATA_TYPE(shaper, object) **) &(instance)->shaper_data.shaper)
+#define HB_SHAPER_DATA(shaper, object) HB_SHAPER_DATA_INSTANCE (shaper, object, object)
+#define HB_SHAPER_DATA_CREATE_FUNC(shaper, object) _hb_##shaper##_shaper_##object##_data_create
+#define HB_SHAPER_DATA_DESTROY_FUNC(shaper, object) _hb_##shaper##_shaper_##object##_data_destroy
+
+#define HB_SHAPER_DATA_PROTOTYPE(shaper, object) \
+ HB_SHAPER_DATA_TYPE (shaper, object); /* Type forward declaration. */ \
+ extern "C" HB_INTERNAL HB_SHAPER_DATA_TYPE (shaper, object) * \
+ HB_SHAPER_DATA_CREATE_FUNC (shaper, object) (hb_##object##_t *object HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS); \
+ extern "C" HB_INTERNAL void \
+ HB_SHAPER_DATA_DESTROY_FUNC (shaper, object) (HB_SHAPER_DATA_TYPE (shaper, object) *data)
+
+#define HB_SHAPER_DATA_DESTROY(shaper, object) \
+ if (object->shaper_data.shaper && \
+ object->shaper_data.shaper != HB_SHAPER_DATA_INVALID && \
+ object->shaper_data.shaper != HB_SHAPER_DATA_SUCCEEDED) \
+ HB_SHAPER_DATA_DESTROY_FUNC (shaper, object) (HB_SHAPER_DATA (shaper, object));
+
+#define HB_SHAPER_DATA_ENSURE_DECLARE(shaper, object) \
+static inline bool \
+hb_##shaper##_shaper_##object##_data_ensure (hb_##object##_t *object) \
+{\
+ retry: \
+ HB_SHAPER_DATA_TYPE (shaper, object) *data = (HB_SHAPER_DATA_TYPE (shaper, object) *) hb_atomic_ptr_get (&HB_SHAPER_DATA (shaper, object)); \
+ if (unlikely (!data)) { \
+ data = HB_SHAPER_DATA_CREATE_FUNC (shaper, object) (object); \
+ if (unlikely (!data)) \
+ data = (HB_SHAPER_DATA_TYPE (shaper, object) *) HB_SHAPER_DATA_INVALID; \
+ if (!hb_atomic_ptr_cmpexch (&HB_SHAPER_DATA (shaper, object), NULL, data)) { \
+ HB_SHAPER_DATA_DESTROY_FUNC (shaper, object) (data); \
+ goto retry; \
+ } \
+ } \
+ return data != NULL && !HB_SHAPER_DATA_IS_INVALID (data); \
+}
+
+
+#endif /* HB_SHAPER_PRIVATE_HH */
diff --git a/src/hb-shaper.cc b/src/hb-shaper.cc
new file mode 100644
index 0000000..a16ffc8
--- /dev/null
+++ b/src/hb-shaper.cc
@@ -0,0 +1,109 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-private.hh"
+
+#include "hb-shaper-private.hh"
+
+
+static const hb_shaper_pair_t all_shapers[] = {
+#define HB_SHAPER_IMPLEMENT(name) {#name, _hb_##name##_shape},
+#include "hb-shaper-list.hh"
+#undef HB_SHAPER_IMPLEMENT
+};
+
+
+/* Thread-safe, lock-free, shapers */
+
+static const hb_shaper_pair_t *static_shapers;
+
+static
+void free_static_shapers (void)
+{
+ if (unlikely (static_shapers != all_shapers))
+ free ((void *) static_shapers);
+}
+
+const hb_shaper_pair_t *
+_hb_shapers_get (void)
+{
+retry:
+ hb_shaper_pair_t *shapers = (hb_shaper_pair_t *) hb_atomic_ptr_get (&static_shapers);
+
+ if (unlikely (!shapers))
+ {
+ char *env = getenv ("HB_SHAPER_LIST");
+ if (!env || !*env) {
+ (void) hb_atomic_ptr_cmpexch (&static_shapers, NULL, &all_shapers[0]);
+ return (const hb_shaper_pair_t *) all_shapers;
+ }
+
+ /* Not found; allocate one. */
+ shapers = (hb_shaper_pair_t *) malloc (sizeof (all_shapers));
+ if (unlikely (!shapers)) {
+ (void) hb_atomic_ptr_cmpexch (&static_shapers, NULL, &all_shapers[0]);
+ return (const hb_shaper_pair_t *) all_shapers;
+ }
+
+ memcpy (shapers, all_shapers, sizeof (all_shapers));
+
+ /* Reorder shaper list to prefer requested shapers. */
+ unsigned int i = 0;
+ char *end, *p = env;
+ for (;;) {
+ end = strchr (p, ',');
+ if (!end)
+ end = p + strlen (p);
+
+ for (unsigned int j = i; j < ARRAY_LENGTH (all_shapers); j++)
+ if (end - p == (int) strlen (shapers[j].name) &&
+ 0 == strncmp (shapers[j].name, p, end - p))
+ {
+ /* Reorder this shaper to position i */
+ struct hb_shaper_pair_t t = shapers[j];
+ memmove (&shapers[i + 1], &shapers[i], sizeof (shapers[i]) * (j - i));
+ shapers[i] = t;
+ i++;
+ }
+
+ if (!*end)
+ break;
+ else
+ p = end + 1;
+ }
+
+ if (!hb_atomic_ptr_cmpexch (&static_shapers, NULL, shapers)) {
+ free (shapers);
+ goto retry;
+ }
+
+#ifdef HAVE_ATEXIT
+ atexit (free_static_shapers); /* First person registers atexit() callback. */
+#endif
+ }
+
+ return shapers;
+}
diff --git a/src/hb-tt-font.cc b/src/hb-tt-font.cc
new file mode 100644
index 0000000..b7198ef
--- /dev/null
+++ b/src/hb-tt-font.cc
@@ -0,0 +1,79 @@
+/*
+ * Copyright © 2011 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-font-private.hh" /* Shall be first since may include windows.h */
+
+#include "hb-open-type-private.hh"
+
+#include "hb-ot-hhea-table.hh"
+#include "hb-ot-hmtx-table.hh"
+
+#include "hb-blob.h"
+
+#include <string.h>
+
+
+
+#if 0
+struct hb_tt_font_t
+{
+ const struct hhea *hhea;
+ hb_blob_t *hhea_blob;
+};
+
+
+static hb_tt_font_t *
+_hb_tt_font_create (hb_font_t *font)
+{
+ /* TODO Remove this object altogether */
+ hb_tt_font_t *tt = (hb_tt_font_t *) calloc (1, sizeof (hb_tt_font_t));
+
+ tt->hhea_blob = Sanitizer<hhea>::sanitize (font->face->reference_table (HB_OT_TAG_hhea));
+ tt->hhea = Sanitizer<hhea>::lock_instance (tt->hhea_blob);
+
+ return tt;
+}
+
+static void
+_hb_tt_font_destroy (hb_tt_font_t *tt)
+{
+ hb_blob_destroy (tt->hhea_blob);
+
+ free (tt);
+}
+
+static inline const hhea&
+_get_hhea (hb_face_t *face)
+{
+// return likely (face->tt && face->tt->hhea) ? *face->tt->hhea : Null(hhea);
+}
+
+
+/*
+ * hb_tt_font_funcs_t
+ */
+
+#endif
diff --git a/src/hb-unicode-private.hh b/src/hb-unicode-private.hh
new file mode 100644
index 0000000..7ef5820
--- /dev/null
+++ b/src/hb-unicode-private.hh
@@ -0,0 +1,271 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ * Copyright © 2011 Codethink Limited
+ * Copyright © 2010,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.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Codethink Author(s): Ryan Lortie
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_UNICODE_PRIVATE_HH
+#define HB_UNICODE_PRIVATE_HH
+
+#include "hb-private.hh"
+
+#include "hb-unicode.h"
+#include "hb-object-private.hh"
+
+
+extern HB_INTERNAL const uint8_t _hb_modified_combining_class[256];
+
+/*
+ * hb_unicode_funcs_t
+ */
+
+#define HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS \
+ HB_UNICODE_FUNC_IMPLEMENT (combining_class) \
+ HB_UNICODE_FUNC_IMPLEMENT (eastasian_width) \
+ HB_UNICODE_FUNC_IMPLEMENT (general_category) \
+ HB_UNICODE_FUNC_IMPLEMENT (mirroring) \
+ HB_UNICODE_FUNC_IMPLEMENT (script) \
+ HB_UNICODE_FUNC_IMPLEMENT (compose) \
+ HB_UNICODE_FUNC_IMPLEMENT (decompose) \
+ HB_UNICODE_FUNC_IMPLEMENT (decompose_compatibility) \
+ /* ^--- Add new callbacks here */
+
+/* Simple callbacks are those taking a hb_codepoint_t and returning a hb_codepoint_t */
+#define HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE \
+ HB_UNICODE_FUNC_IMPLEMENT (hb_unicode_combining_class_t, combining_class) \
+ HB_UNICODE_FUNC_IMPLEMENT (unsigned int, eastasian_width) \
+ HB_UNICODE_FUNC_IMPLEMENT (hb_unicode_general_category_t, general_category) \
+ HB_UNICODE_FUNC_IMPLEMENT (hb_codepoint_t, mirroring) \
+ HB_UNICODE_FUNC_IMPLEMENT (hb_script_t, script) \
+ /* ^--- Add new simple callbacks here */
+
+struct hb_unicode_funcs_t {
+ hb_object_header_t header;
+ ASSERT_POD ();
+
+ hb_unicode_funcs_t *parent;
+
+ bool immutable;
+
+#define HB_UNICODE_FUNC_IMPLEMENT(return_type, name) \
+ inline return_type name (hb_codepoint_t unicode) { return func.name (this, unicode, user_data.name); }
+HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE
+#undef HB_UNICODE_FUNC_IMPLEMENT
+
+ inline hb_bool_t compose (hb_codepoint_t a, hb_codepoint_t b,
+ hb_codepoint_t *ab)
+ {
+ *ab = 0;
+ if (unlikely (!a || !b)) return false;
+ return func.compose (this, a, b, ab, user_data.compose);
+ }
+
+ inline hb_bool_t decompose (hb_codepoint_t ab,
+ hb_codepoint_t *a, hb_codepoint_t *b)
+ {
+ *a = ab; *b = 0;
+ return func.decompose (this, ab, a, b, user_data.decompose);
+ }
+
+ inline unsigned int decompose_compatibility (hb_codepoint_t u,
+ hb_codepoint_t *decomposed)
+ {
+ unsigned int ret = func.decompose_compatibility (this, u, decomposed, user_data.decompose_compatibility);
+ if (ret == 1 && u == decomposed[0]) {
+ decomposed[0] = 0;
+ return 0;
+ }
+ decomposed[ret] = 0;
+ return ret;
+ }
+
+
+ unsigned int
+ modified_combining_class (hb_codepoint_t unicode)
+ {
+ return _hb_modified_combining_class[combining_class (unicode)];
+ }
+
+ inline hb_bool_t
+ is_variation_selector (hb_codepoint_t unicode)
+ {
+ return unlikely (hb_in_ranges<hb_codepoint_t> (unicode,
+ 0x180B, 0x180D, /* MONGOLIAN FREE VARIATION SELECTOR ONE..THREE */
+ 0xFE00, 0xFE0F, /* VARIATION SELECTOR-1..16 */
+ 0xE0100, 0xE01EF)); /* VARIATION SELECTOR-17..256 */
+ }
+
+ /* Zero-Width invisible characters:
+ *
+ * 00AD SOFT HYPHEN
+ * 034F COMBINING GRAPHEME JOINER
+ *
+ * 180E MONGOLIAN VOWEL SEPARATOR
+ *
+ * 200B ZERO WIDTH SPACE
+ * 200C ZERO WIDTH NON-JOINER
+ * 200D ZERO WIDTH JOINER
+ * 200E LEFT-TO-RIGHT MARK
+ * 200F RIGHT-TO-LEFT MARK
+ *
+ * 2028 LINE SEPARATOR
+ *
+ * 202A LEFT-TO-RIGHT EMBEDDING
+ * 202B RIGHT-TO-LEFT EMBEDDING
+ * 202C POP DIRECTIONAL FORMATTING
+ * 202D LEFT-TO-RIGHT OVERRIDE
+ * 202E RIGHT-TO-LEFT OVERRIDE
+ *
+ * 2060 WORD JOINER
+ * 2061 FUNCTION APPLICATION
+ * 2062 INVISIBLE TIMES
+ * 2063 INVISIBLE SEPARATOR
+ *
+ * FEFF ZERO WIDTH NO-BREAK SPACE
+ */
+ inline hb_bool_t
+ is_zero_width (hb_codepoint_t ch)
+ {
+ return ((ch & ~0x007F) == 0x2000 && (hb_in_ranges<hb_codepoint_t> (ch,
+ 0x200B, 0x200F,
+ 0x202A, 0x202E,
+ 0x2060, 0x2064) ||
+ (ch == 0x2028))) ||
+ unlikely (ch == 0x0009 ||
+ ch == 0x00AD ||
+ ch == 0x034F ||
+ ch == 0x180E ||
+ ch == 0xFEFF);
+ }
+
+
+ struct {
+#define HB_UNICODE_FUNC_IMPLEMENT(name) hb_unicode_##name##_func_t name;
+ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_UNICODE_FUNC_IMPLEMENT
+ } func;
+
+ struct {
+#define HB_UNICODE_FUNC_IMPLEMENT(name) void *name;
+ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_UNICODE_FUNC_IMPLEMENT
+ } user_data;
+
+ struct {
+#define HB_UNICODE_FUNC_IMPLEMENT(name) hb_destroy_func_t name;
+ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_UNICODE_FUNC_IMPLEMENT
+ } destroy;
+};
+
+
+extern HB_INTERNAL const hb_unicode_funcs_t _hb_unicode_funcs_nil;
+
+
+/* Modified combining marks */
+
+/* Hebrew
+ *
+ * We permute the "fixed-position" classes 10-26 into the order
+ * described in the SBL Hebrew manual:
+ *
+ * http://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf
+ *
+ * (as recommended by:
+ * http://forum.fontlab.com/archive-old-microsoft-volt-group/vista-and-diacritic-ordering-t6751.0.html)
+ *
+ * More details here:
+ * https://bugzilla.mozilla.org/show_bug.cgi?id=662055
+ */
+#define HB_MODIFIED_COMBINING_CLASS_CCC10 22 /* sheva */
+#define HB_MODIFIED_COMBINING_CLASS_CCC11 15 /* hataf segol */
+#define HB_MODIFIED_COMBINING_CLASS_CCC12 16 /* hataf patah */
+#define HB_MODIFIED_COMBINING_CLASS_CCC13 17 /* hataf qamats */
+#define HB_MODIFIED_COMBINING_CLASS_CCC14 23 /* hiriq */
+#define HB_MODIFIED_COMBINING_CLASS_CCC15 18 /* tsere */
+#define HB_MODIFIED_COMBINING_CLASS_CCC16 19 /* segol */
+#define HB_MODIFIED_COMBINING_CLASS_CCC17 20 /* patah */
+#define HB_MODIFIED_COMBINING_CLASS_CCC18 21 /* qamats */
+#define HB_MODIFIED_COMBINING_CLASS_CCC19 14 /* holam */
+#define HB_MODIFIED_COMBINING_CLASS_CCC20 24 /* qubuts */
+#define HB_MODIFIED_COMBINING_CLASS_CCC21 12 /* dagesh */
+#define HB_MODIFIED_COMBINING_CLASS_CCC22 25 /* meteg */
+#define HB_MODIFIED_COMBINING_CLASS_CCC23 13 /* rafe */
+#define HB_MODIFIED_COMBINING_CLASS_CCC24 10 /* shin dot */
+#define HB_MODIFIED_COMBINING_CLASS_CCC25 11 /* sin dot */
+#define HB_MODIFIED_COMBINING_CLASS_CCC26 26 /* point varika */
+
+/*
+ * Arabic
+ *
+ * Modify to move Shadda (ccc=33) before other marks. See:
+ * http://unicode.org/faq/normalization.html#8
+ * http://unicode.org/faq/normalization.html#9
+ */
+#define HB_MODIFIED_COMBINING_CLASS_CCC27 28 /* fathatan */
+#define HB_MODIFIED_COMBINING_CLASS_CCC28 29 /* dammatan */
+#define HB_MODIFIED_COMBINING_CLASS_CCC29 30 /* kasratan */
+#define HB_MODIFIED_COMBINING_CLASS_CCC30 31 /* fatha */
+#define HB_MODIFIED_COMBINING_CLASS_CCC31 32 /* damma */
+#define HB_MODIFIED_COMBINING_CLASS_CCC32 33 /* kasra */
+#define HB_MODIFIED_COMBINING_CLASS_CCC33 27 /* shadda */
+#define HB_MODIFIED_COMBINING_CLASS_CCC34 34 /* sukun */
+#define HB_MODIFIED_COMBINING_CLASS_CCC35 35 /* superscript alef */
+
+/* Syriac */
+#define HB_MODIFIED_COMBINING_CLASS_CCC36 36 /* superscript alaph */
+
+/* Telugu
+ *
+ * Modify Telugu length marks (ccc=84, ccc=91).
+ * These are the only matras in the main Indic scripts range that have
+ * a non-zero ccc. That makes them reorder with the Halant that is
+ * ccc=9. Just zero them, we don't need them in our Indic shaper.
+ */
+#define HB_MODIFIED_COMBINING_CLASS_CCC84 0 /* length mark */
+#define HB_MODIFIED_COMBINING_CLASS_CCC91 0 /* ai length mark */
+
+/* Thai
+ *
+ * Modify U+0E38 and U+0E39 (ccc=103) to be reordered before U+0E3A (ccc=9).
+ * Assign 3, which is unassigned otherwise.
+ * Uniscribe does this reordering too.
+ */
+#define HB_MODIFIED_COMBINING_CLASS_CCC103 3 /* sara u / sara uu */
+#define HB_MODIFIED_COMBINING_CLASS_CCC107 107 /* mai * */
+
+/* Lao */
+#define HB_MODIFIED_COMBINING_CLASS_CCC118 118 /* sign u / sign uu */
+#define HB_MODIFIED_COMBINING_CLASS_CCC122 122 /* mai * */
+
+/* Tibetan */
+#define HB_MODIFIED_COMBINING_CLASS_CCC129 129 /* sign aa */
+#define HB_MODIFIED_COMBINING_CLASS_CCC130 130 /* sign i */
+#define HB_MODIFIED_COMBINING_CLASS_CCC132 132 /* sign u */
+
+
+#endif /* HB_UNICODE_PRIVATE_HH */
diff --git a/src/hb-unicode.cc b/src/hb-unicode.cc
new file mode 100644
index 0000000..2e2d077
--- /dev/null
+++ b/src/hb-unicode.cc
@@ -0,0 +1,432 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ * Copyright © 2011 Codethink Limited
+ * Copyright © 2010,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.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Codethink Author(s): Ryan Lortie
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-private.hh"
+
+#include "hb-unicode-private.hh"
+
+
+
+/*
+ * hb_unicode_funcs_t
+ */
+
+static hb_unicode_combining_class_t
+hb_unicode_combining_class_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t unicode HB_UNUSED,
+ void *user_data HB_UNUSED)
+{
+ return HB_UNICODE_COMBINING_CLASS_NOT_REORDERED;
+}
+
+static unsigned int
+hb_unicode_eastasian_width_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t unicode HB_UNUSED,
+ void *user_data HB_UNUSED)
+{
+ return 1;
+}
+
+static hb_unicode_general_category_t
+hb_unicode_general_category_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t unicode HB_UNUSED,
+ void *user_data HB_UNUSED)
+{
+ return HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER;
+}
+
+static hb_codepoint_t
+hb_unicode_mirroring_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t unicode HB_UNUSED,
+ void *user_data HB_UNUSED)
+{
+ return unicode;
+}
+
+static hb_script_t
+hb_unicode_script_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t unicode HB_UNUSED,
+ void *user_data HB_UNUSED)
+{
+ return HB_SCRIPT_UNKNOWN;
+}
+
+static hb_bool_t
+hb_unicode_compose_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t a HB_UNUSED,
+ hb_codepoint_t b HB_UNUSED,
+ hb_codepoint_t *ab HB_UNUSED,
+ void *user_data HB_UNUSED)
+{
+ return false;
+}
+
+static hb_bool_t
+hb_unicode_decompose_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t ab HB_UNUSED,
+ hb_codepoint_t *a HB_UNUSED,
+ hb_codepoint_t *b HB_UNUSED,
+ void *user_data HB_UNUSED)
+{
+ return false;
+}
+
+
+static unsigned int
+hb_unicode_decompose_compatibility_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED,
+ hb_codepoint_t u HB_UNUSED,
+ hb_codepoint_t *decomposed HB_UNUSED,
+ void *user_data HB_UNUSED)
+{
+ return 0;
+}
+
+
+#define HB_UNICODE_FUNCS_IMPLEMENT_SET \
+ HB_UNICODE_FUNCS_IMPLEMENT (glib) \
+ HB_UNICODE_FUNCS_IMPLEMENT (icu) \
+ HB_UNICODE_FUNCS_IMPLEMENT (nil) \
+ /* ^--- Add new callbacks before nil */
+
+#define hb_nil_get_unicode_funcs hb_unicode_funcs_get_empty
+
+/* Prototype them all */
+#define HB_UNICODE_FUNCS_IMPLEMENT(set) \
+extern "C" hb_unicode_funcs_t *hb_##set##_get_unicode_funcs (void);
+HB_UNICODE_FUNCS_IMPLEMENT_SET
+#undef HB_UNICODE_FUNCS_IMPLEMENT
+
+
+hb_unicode_funcs_t *
+hb_unicode_funcs_get_default (void)
+{
+#define HB_UNICODE_FUNCS_IMPLEMENT(set) \
+ return hb_##set##_get_unicode_funcs ();
+
+#ifdef HAVE_GLIB
+ HB_UNICODE_FUNCS_IMPLEMENT(glib)
+#elif defined(HAVE_ICU)
+ HB_UNICODE_FUNCS_IMPLEMENT(icu)
+#else
+#define HB_UNICODE_FUNCS_NIL 1
+ HB_UNICODE_FUNCS_IMPLEMENT(nil)
+#endif
+
+#undef HB_UNICODE_FUNCS_IMPLEMENT
+}
+
+#if !defined(HB_NO_UNICODE_FUNCS) && defined(HB_UNICODE_FUNCS_NIL)
+#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.")
+#endif
+
+hb_unicode_funcs_t *
+hb_unicode_funcs_create (hb_unicode_funcs_t *parent)
+{
+ hb_unicode_funcs_t *ufuncs;
+
+ if (!(ufuncs = hb_object_create<hb_unicode_funcs_t> ()))
+ return hb_unicode_funcs_get_empty ();
+
+ if (!parent)
+ parent = hb_unicode_funcs_get_empty ();
+
+ hb_unicode_funcs_make_immutable (parent);
+ ufuncs->parent = hb_unicode_funcs_reference (parent);
+
+ ufuncs->func = parent->func;
+
+ /* We can safely copy user_data from parent since we hold a reference
+ * onto it and it's immutable. We should not copy the destroy notifiers
+ * though. */
+ ufuncs->user_data = parent->user_data;
+
+ return ufuncs;
+}
+
+
+const hb_unicode_funcs_t _hb_unicode_funcs_nil = {
+ HB_OBJECT_HEADER_STATIC,
+
+ NULL, /* parent */
+ true, /* immutable */
+ {
+#define HB_UNICODE_FUNC_IMPLEMENT(name) hb_unicode_##name##_nil,
+ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_UNICODE_FUNC_IMPLEMENT
+ }
+};
+
+hb_unicode_funcs_t *
+hb_unicode_funcs_get_empty (void)
+{
+ return const_cast<hb_unicode_funcs_t *> (&_hb_unicode_funcs_nil);
+}
+
+hb_unicode_funcs_t *
+hb_unicode_funcs_reference (hb_unicode_funcs_t *ufuncs)
+{
+ return hb_object_reference (ufuncs);
+}
+
+void
+hb_unicode_funcs_destroy (hb_unicode_funcs_t *ufuncs)
+{
+ if (!hb_object_destroy (ufuncs)) return;
+
+#define HB_UNICODE_FUNC_IMPLEMENT(name) \
+ if (ufuncs->destroy.name) ufuncs->destroy.name (ufuncs->user_data.name);
+ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_UNICODE_FUNC_IMPLEMENT
+
+ hb_unicode_funcs_destroy (ufuncs->parent);
+
+ free (ufuncs);
+}
+
+hb_bool_t
+hb_unicode_funcs_set_user_data (hb_unicode_funcs_t *ufuncs,
+ hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy,
+ hb_bool_t replace)
+{
+ return hb_object_set_user_data (ufuncs, key, data, destroy, replace);
+}
+
+void *
+hb_unicode_funcs_get_user_data (hb_unicode_funcs_t *ufuncs,
+ hb_user_data_key_t *key)
+{
+ return hb_object_get_user_data (ufuncs, key);
+}
+
+
+void
+hb_unicode_funcs_make_immutable (hb_unicode_funcs_t *ufuncs)
+{
+ if (hb_object_is_inert (ufuncs))
+ return;
+
+ ufuncs->immutable = true;
+}
+
+hb_bool_t
+hb_unicode_funcs_is_immutable (hb_unicode_funcs_t *ufuncs)
+{
+ return ufuncs->immutable;
+}
+
+hb_unicode_funcs_t *
+hb_unicode_funcs_get_parent (hb_unicode_funcs_t *ufuncs)
+{
+ return ufuncs->parent ? ufuncs->parent : hb_unicode_funcs_get_empty ();
+}
+
+
+#define HB_UNICODE_FUNC_IMPLEMENT(name) \
+ \
+void \
+hb_unicode_funcs_set_##name##_func (hb_unicode_funcs_t *ufuncs, \
+ hb_unicode_##name##_func_t func, \
+ void *user_data, \
+ hb_destroy_func_t destroy) \
+{ \
+ if (ufuncs->immutable) \
+ return; \
+ \
+ if (ufuncs->destroy.name) \
+ ufuncs->destroy.name (ufuncs->user_data.name); \
+ \
+ if (func) { \
+ ufuncs->func.name = func; \
+ ufuncs->user_data.name = user_data; \
+ ufuncs->destroy.name = destroy; \
+ } else { \
+ ufuncs->func.name = ufuncs->parent->func.name; \
+ ufuncs->user_data.name = ufuncs->parent->user_data.name; \
+ ufuncs->destroy.name = NULL; \
+ } \
+}
+
+HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_UNICODE_FUNC_IMPLEMENT
+
+
+#define HB_UNICODE_FUNC_IMPLEMENT(return_type, name) \
+ \
+return_type \
+hb_unicode_##name (hb_unicode_funcs_t *ufuncs, \
+ hb_codepoint_t unicode) \
+{ \
+ return ufuncs->name (unicode); \
+}
+HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE
+#undef HB_UNICODE_FUNC_IMPLEMENT
+
+hb_bool_t
+hb_unicode_compose (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t a,
+ hb_codepoint_t b,
+ hb_codepoint_t *ab)
+{
+ return ufuncs->compose (a, b, ab);
+}
+
+hb_bool_t
+hb_unicode_decompose (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t ab,
+ hb_codepoint_t *a,
+ hb_codepoint_t *b)
+{
+ return ufuncs->decompose (ab, a, b);
+}
+
+unsigned int
+hb_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t u,
+ hb_codepoint_t *decomposed)
+{
+ return ufuncs->decompose_compatibility (u, decomposed);
+}
+
+
+/* See hb-unicode-private.hh for details. */
+const uint8_t
+_hb_modified_combining_class[256] =
+{
+ 0, /* HB_UNICODE_COMBINING_CLASS_NOT_REORDERED */
+ 1, /* HB_UNICODE_COMBINING_CLASS_OVERLAY */
+ 2, 3, 4, 5, 6,
+ 7, /* HB_UNICODE_COMBINING_CLASS_NUKTA */
+ 8, /* HB_UNICODE_COMBINING_CLASS_KANA_VOICING */
+ 9, /* HB_UNICODE_COMBINING_CLASS_VIRAMA */
+
+ /* Hebrew */
+ HB_MODIFIED_COMBINING_CLASS_CCC10,
+ HB_MODIFIED_COMBINING_CLASS_CCC11,
+ HB_MODIFIED_COMBINING_CLASS_CCC12,
+ HB_MODIFIED_COMBINING_CLASS_CCC13,
+ HB_MODIFIED_COMBINING_CLASS_CCC14,
+ HB_MODIFIED_COMBINING_CLASS_CCC15,
+ HB_MODIFIED_COMBINING_CLASS_CCC16,
+ HB_MODIFIED_COMBINING_CLASS_CCC17,
+ HB_MODIFIED_COMBINING_CLASS_CCC18,
+ HB_MODIFIED_COMBINING_CLASS_CCC19,
+ HB_MODIFIED_COMBINING_CLASS_CCC20,
+ HB_MODIFIED_COMBINING_CLASS_CCC21,
+ HB_MODIFIED_COMBINING_CLASS_CCC22,
+ HB_MODIFIED_COMBINING_CLASS_CCC23,
+ HB_MODIFIED_COMBINING_CLASS_CCC24,
+ HB_MODIFIED_COMBINING_CLASS_CCC25,
+ HB_MODIFIED_COMBINING_CLASS_CCC26,
+
+ /* Arabic */
+ HB_MODIFIED_COMBINING_CLASS_CCC27,
+ HB_MODIFIED_COMBINING_CLASS_CCC28,
+ HB_MODIFIED_COMBINING_CLASS_CCC29,
+ HB_MODIFIED_COMBINING_CLASS_CCC30,
+ HB_MODIFIED_COMBINING_CLASS_CCC31,
+ HB_MODIFIED_COMBINING_CLASS_CCC32,
+ HB_MODIFIED_COMBINING_CLASS_CCC33,
+ HB_MODIFIED_COMBINING_CLASS_CCC34,
+ HB_MODIFIED_COMBINING_CLASS_CCC35,
+
+ /* Syriac */
+ HB_MODIFIED_COMBINING_CLASS_CCC36,
+
+ 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
+ 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83,
+
+ /* Telugu */
+ HB_MODIFIED_COMBINING_CLASS_CCC84,
+ 85, 86, 87, 88, 89, 90,
+ HB_MODIFIED_COMBINING_CLASS_CCC91,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
+
+ /* Thai */
+ HB_MODIFIED_COMBINING_CLASS_CCC103,
+ 104, 105, 106,
+ HB_MODIFIED_COMBINING_CLASS_CCC107,
+ 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
+
+ /* Lao */
+ HB_MODIFIED_COMBINING_CLASS_CCC118,
+ 119, 120, 121,
+ HB_MODIFIED_COMBINING_CLASS_CCC122,
+ 123, 124, 125, 126, 127, 128,
+
+ /* Tibetan */
+ HB_MODIFIED_COMBINING_CLASS_CCC129,
+ HB_MODIFIED_COMBINING_CLASS_CCC130,
+ 131,
+ HB_MODIFIED_COMBINING_CLASS_CCC132,
+ 133, 134, 135, 136, 137, 138, 139,
+
+
+ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
+
+ 200, /* HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW_LEFT */
+ 201,
+ 202, /* HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW */
+ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
+ 214, /* HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE */
+ 215,
+ 216, /* HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE_RIGHT */
+ 217,
+ 218, /* HB_UNICODE_COMBINING_CLASS_BELOW_LEFT */
+ 219,
+ 220, /* HB_UNICODE_COMBINING_CLASS_BELOW */
+ 221,
+ 222, /* HB_UNICODE_COMBINING_CLASS_BELOW_RIGHT */
+ 223,
+ 224, /* HB_UNICODE_COMBINING_CLASS_LEFT */
+ 225,
+ 226, /* HB_UNICODE_COMBINING_CLASS_RIGHT */
+ 227,
+ 228, /* HB_UNICODE_COMBINING_CLASS_ABOVE_LEFT */
+ 229,
+ 230, /* HB_UNICODE_COMBINING_CLASS_ABOVE */
+ 231,
+ 232, /* HB_UNICODE_COMBINING_CLASS_ABOVE_RIGHT */
+ 233, /* HB_UNICODE_COMBINING_CLASS_DOUBLE_BELOW */
+ 234, /* HB_UNICODE_COMBINING_CLASS_DOUBLE_ABOVE */
+ 235, 236, 237, 238, 239,
+ 240, /* HB_UNICODE_COMBINING_CLASS_IOTA_SUBSCRIPT */
+ 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, /* HB_UNICODE_COMBINING_CLASS_INVALID */
+};
diff --git a/src/hb-unicode.h b/src/hb-unicode.h
new file mode 100644
index 0000000..2e10d98
--- /dev/null
+++ b/src/hb-unicode.h
@@ -0,0 +1,357 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ * Copyright © 2011 Codethink Limited
+ * 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.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ * Codethink Author(s): Ryan Lortie
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_H_IN
+#error "Include <hb.h> instead."
+#endif
+
+#ifndef HB_UNICODE_H
+#define HB_UNICODE_H
+
+#include "hb-common.h"
+
+HB_BEGIN_DECLS
+
+
+/* hb_unicode_general_category_t */
+
+/* Unicode Character Database property: General_Category (gc) */
+typedef enum
+{
+ HB_UNICODE_GENERAL_CATEGORY_CONTROL, /* Cc */
+ HB_UNICODE_GENERAL_CATEGORY_FORMAT, /* Cf */
+ HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED, /* Cn */
+ HB_UNICODE_GENERAL_CATEGORY_PRIVATE_USE, /* Co */
+ HB_UNICODE_GENERAL_CATEGORY_SURROGATE, /* Cs */
+ HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER, /* Ll */
+ HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER, /* Lm */
+ HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER, /* Lo */
+ HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER, /* Lt */
+ HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER, /* Lu */
+ HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK, /* Mc */
+ HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK, /* Me */
+ HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK, /* Mn */
+ HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER, /* Nd */
+ HB_UNICODE_GENERAL_CATEGORY_LETTER_NUMBER, /* Nl */
+ HB_UNICODE_GENERAL_CATEGORY_OTHER_NUMBER, /* No */
+ HB_UNICODE_GENERAL_CATEGORY_CONNECT_PUNCTUATION, /* Pc */
+ HB_UNICODE_GENERAL_CATEGORY_DASH_PUNCTUATION, /* Pd */
+ HB_UNICODE_GENERAL_CATEGORY_CLOSE_PUNCTUATION, /* Pe */
+ HB_UNICODE_GENERAL_CATEGORY_FINAL_PUNCTUATION, /* Pf */
+ HB_UNICODE_GENERAL_CATEGORY_INITIAL_PUNCTUATION, /* Pi */
+ HB_UNICODE_GENERAL_CATEGORY_OTHER_PUNCTUATION, /* Po */
+ HB_UNICODE_GENERAL_CATEGORY_OPEN_PUNCTUATION, /* Ps */
+ HB_UNICODE_GENERAL_CATEGORY_CURRENCY_SYMBOL, /* Sc */
+ HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL, /* Sk */
+ HB_UNICODE_GENERAL_CATEGORY_MATH_SYMBOL, /* Sm */
+ HB_UNICODE_GENERAL_CATEGORY_OTHER_SYMBOL, /* So */
+ HB_UNICODE_GENERAL_CATEGORY_LINE_SEPARATOR, /* Zl */
+ HB_UNICODE_GENERAL_CATEGORY_PARAGRAPH_SEPARATOR, /* Zp */
+ HB_UNICODE_GENERAL_CATEGORY_SPACE_SEPARATOR /* Zs */
+} hb_unicode_general_category_t;
+
+/* hb_unicode_combining_class_t */
+
+/* Note: newer versions of Unicode may add new values. Clients should be ready to handle
+ * any value in the 0..254 range being returned from hb_unicode_combining_class().
+ */
+
+/* Unicode Character Database property: Canonical_Combining_Class (ccc) */
+typedef enum
+{
+ HB_UNICODE_COMBINING_CLASS_NOT_REORDERED = 0,
+ HB_UNICODE_COMBINING_CLASS_OVERLAY = 1,
+ HB_UNICODE_COMBINING_CLASS_NUKTA = 7,
+ HB_UNICODE_COMBINING_CLASS_KANA_VOICING = 8,
+ HB_UNICODE_COMBINING_CLASS_VIRAMA = 9,
+
+ /* Hebrew */
+ HB_UNICODE_COMBINING_CLASS_CCC10 = 10,
+ HB_UNICODE_COMBINING_CLASS_CCC11 = 11,
+ HB_UNICODE_COMBINING_CLASS_CCC12 = 12,
+ HB_UNICODE_COMBINING_CLASS_CCC13 = 13,
+ HB_UNICODE_COMBINING_CLASS_CCC14 = 14,
+ HB_UNICODE_COMBINING_CLASS_CCC15 = 15,
+ HB_UNICODE_COMBINING_CLASS_CCC16 = 16,
+ HB_UNICODE_COMBINING_CLASS_CCC17 = 17,
+ HB_UNICODE_COMBINING_CLASS_CCC18 = 18,
+ HB_UNICODE_COMBINING_CLASS_CCC19 = 19,
+ HB_UNICODE_COMBINING_CLASS_CCC20 = 20,
+ HB_UNICODE_COMBINING_CLASS_CCC21 = 21,
+ HB_UNICODE_COMBINING_CLASS_CCC22 = 22,
+ HB_UNICODE_COMBINING_CLASS_CCC23 = 23,
+ HB_UNICODE_COMBINING_CLASS_CCC24 = 24,
+ HB_UNICODE_COMBINING_CLASS_CCC25 = 25,
+ HB_UNICODE_COMBINING_CLASS_CCC26 = 26,
+
+ /* Arabic */
+ HB_UNICODE_COMBINING_CLASS_CCC27 = 27,
+ HB_UNICODE_COMBINING_CLASS_CCC28 = 28,
+ HB_UNICODE_COMBINING_CLASS_CCC29 = 29,
+ HB_UNICODE_COMBINING_CLASS_CCC30 = 30,
+ HB_UNICODE_COMBINING_CLASS_CCC31 = 31,
+ HB_UNICODE_COMBINING_CLASS_CCC32 = 32,
+ HB_UNICODE_COMBINING_CLASS_CCC33 = 33,
+ HB_UNICODE_COMBINING_CLASS_CCC34 = 34,
+ HB_UNICODE_COMBINING_CLASS_CCC35 = 35,
+
+ /* Syriac */
+ HB_UNICODE_COMBINING_CLASS_CCC36 = 36,
+
+ /* Telugu */
+ HB_UNICODE_COMBINING_CLASS_CCC84 = 84,
+ HB_UNICODE_COMBINING_CLASS_CCC91 = 91,
+
+ /* Thai */
+ HB_UNICODE_COMBINING_CLASS_CCC103 = 103,
+ HB_UNICODE_COMBINING_CLASS_CCC107 = 107,
+
+ /* Lao */
+ HB_UNICODE_COMBINING_CLASS_CCC118 = 118,
+ HB_UNICODE_COMBINING_CLASS_CCC122 = 122,
+
+ /* Tibetan */
+ HB_UNICODE_COMBINING_CLASS_CCC129 = 129,
+ HB_UNICODE_COMBINING_CLASS_CCC130 = 130,
+ HB_UNICODE_COMBINING_CLASS_CCC133 = 132,
+
+
+ HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW_LEFT = 200,
+ HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW = 202,
+ HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE = 214,
+ HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE_RIGHT = 216,
+ HB_UNICODE_COMBINING_CLASS_BELOW_LEFT = 218,
+ HB_UNICODE_COMBINING_CLASS_BELOW = 220,
+ HB_UNICODE_COMBINING_CLASS_BELOW_RIGHT = 222,
+ HB_UNICODE_COMBINING_CLASS_LEFT = 224,
+ HB_UNICODE_COMBINING_CLASS_RIGHT = 226,
+ HB_UNICODE_COMBINING_CLASS_ABOVE_LEFT = 228,
+ HB_UNICODE_COMBINING_CLASS_ABOVE = 230,
+ HB_UNICODE_COMBINING_CLASS_ABOVE_RIGHT = 232,
+ HB_UNICODE_COMBINING_CLASS_DOUBLE_BELOW = 233,
+ HB_UNICODE_COMBINING_CLASS_DOUBLE_ABOVE = 234,
+
+ HB_UNICODE_COMBINING_CLASS_IOTA_SUBSCRIPT = 240,
+
+ HB_UNICODE_COMBINING_CLASS_INVALID = 255
+} hb_unicode_combining_class_t;
+
+
+/*
+ * hb_unicode_funcs_t
+ */
+
+typedef struct hb_unicode_funcs_t hb_unicode_funcs_t;
+
+
+/*
+ * just give me the best implementation you've got there.
+ */
+hb_unicode_funcs_t *
+hb_unicode_funcs_get_default (void);
+
+
+hb_unicode_funcs_t *
+hb_unicode_funcs_create (hb_unicode_funcs_t *parent);
+
+hb_unicode_funcs_t *
+hb_unicode_funcs_get_empty (void);
+
+hb_unicode_funcs_t *
+hb_unicode_funcs_reference (hb_unicode_funcs_t *ufuncs);
+
+void
+hb_unicode_funcs_destroy (hb_unicode_funcs_t *ufuncs);
+
+hb_bool_t
+hb_unicode_funcs_set_user_data (hb_unicode_funcs_t *ufuncs,
+ hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy,
+ hb_bool_t replace);
+
+
+void *
+hb_unicode_funcs_get_user_data (hb_unicode_funcs_t *ufuncs,
+ hb_user_data_key_t *key);
+
+
+void
+hb_unicode_funcs_make_immutable (hb_unicode_funcs_t *ufuncs);
+
+hb_bool_t
+hb_unicode_funcs_is_immutable (hb_unicode_funcs_t *ufuncs);
+
+hb_unicode_funcs_t *
+hb_unicode_funcs_get_parent (hb_unicode_funcs_t *ufuncs);
+
+
+/*
+ * funcs
+ */
+
+/* typedefs */
+
+typedef hb_unicode_combining_class_t (*hb_unicode_combining_class_func_t) (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t unicode,
+ void *user_data);
+typedef unsigned int (*hb_unicode_eastasian_width_func_t) (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t unicode,
+ void *user_data);
+typedef hb_unicode_general_category_t (*hb_unicode_general_category_func_t) (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t unicode,
+ void *user_data);
+typedef hb_codepoint_t (*hb_unicode_mirroring_func_t) (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t unicode,
+ void *user_data);
+typedef hb_script_t (*hb_unicode_script_func_t) (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t unicode,
+ void *user_data);
+
+typedef hb_bool_t (*hb_unicode_compose_func_t) (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t a,
+ hb_codepoint_t b,
+ hb_codepoint_t *ab,
+ void *user_data);
+typedef hb_bool_t (*hb_unicode_decompose_func_t) (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t ab,
+ hb_codepoint_t *a,
+ hb_codepoint_t *b,
+ void *user_data);
+
+/**
+ * hb_unicode_decompose_compatibility_func_t:
+ * @ufuncs: Unicode function structure
+ * @u: codepoint to decompose
+ * @decomposed: address of codepoint array (of length %HB_UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into
+ * @user_data: user data pointer as passed to hb_unicode_funcs_set_decompose_compatibility_func()
+ *
+ * Fully decompose @u to its Unicode compatibility decomposition. The codepoints of the decomposition will be written to @decomposed.
+ * The complete length of the decomposition will be returned.
+ *
+ * If @u has no compatibility decomposition, zero should be returned.
+ *
+ * The Unicode standard guarantees that a buffer of length %HB_UNICODE_MAX_DECOMPOSITION_LEN codepoints will always be sufficient for any
+ * compatibility decomposition plus an terminating value of 0. Consequently, @decompose must be allocated by the caller to be at least this length. Implementations
+ * of this function type must ensure that they do not write past the provided array.
+ *
+ * Return value: number of codepoints in the full compatibility decomposition of @u, or 0 if no decomposition available.
+ */
+typedef unsigned int (*hb_unicode_decompose_compatibility_func_t) (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t u,
+ hb_codepoint_t *decomposed,
+ void *user_data);
+
+/* See Unicode 6.1 for details on the maximum decomposition length. */
+#define HB_UNICODE_MAX_DECOMPOSITION_LEN (18+1) /* codepoints */
+
+/* setters */
+
+void
+hb_unicode_funcs_set_combining_class_func (hb_unicode_funcs_t *ufuncs,
+ hb_unicode_combining_class_func_t combining_class_func,
+ void *user_data, hb_destroy_func_t destroy);
+
+void
+hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs,
+ hb_unicode_eastasian_width_func_t eastasian_width_func,
+ void *user_data, hb_destroy_func_t destroy);
+
+void
+hb_unicode_funcs_set_general_category_func (hb_unicode_funcs_t *ufuncs,
+ hb_unicode_general_category_func_t general_category_func,
+ void *user_data, hb_destroy_func_t destroy);
+
+void
+hb_unicode_funcs_set_mirroring_func (hb_unicode_funcs_t *ufuncs,
+ hb_unicode_mirroring_func_t mirroring_func,
+ void *user_data, hb_destroy_func_t destroy);
+
+void
+hb_unicode_funcs_set_script_func (hb_unicode_funcs_t *ufuncs,
+ hb_unicode_script_func_t script_func,
+ void *user_data, hb_destroy_func_t destroy);
+
+void
+hb_unicode_funcs_set_compose_func (hb_unicode_funcs_t *ufuncs,
+ hb_unicode_compose_func_t compose_func,
+ void *user_data, hb_destroy_func_t destroy);
+
+void
+hb_unicode_funcs_set_decompose_func (hb_unicode_funcs_t *ufuncs,
+ hb_unicode_decompose_func_t decompose_func,
+ void *user_data, hb_destroy_func_t destroy);
+
+void
+hb_unicode_funcs_set_decompose_compatibility_func (hb_unicode_funcs_t *ufuncs,
+ hb_unicode_decompose_compatibility_func_t decompose_compatibility_func,
+ void *user_data, hb_destroy_func_t destroy);
+
+/* accessors */
+
+hb_unicode_combining_class_t
+hb_unicode_combining_class (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t unicode);
+
+unsigned int
+hb_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t unicode);
+
+hb_unicode_general_category_t
+hb_unicode_general_category (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t unicode);
+
+hb_codepoint_t
+hb_unicode_mirroring (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t unicode);
+
+hb_script_t
+hb_unicode_script (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t unicode);
+
+hb_bool_t
+hb_unicode_compose (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t a,
+ hb_codepoint_t b,
+ hb_codepoint_t *ab);
+hb_bool_t
+hb_unicode_decompose (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t ab,
+ hb_codepoint_t *a,
+ hb_codepoint_t *b);
+
+unsigned int
+hb_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t u,
+ hb_codepoint_t *decomposed);
+
+HB_END_DECLS
+
+#endif /* HB_UNICODE_H */
diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc
new file mode 100644
index 0000000..d732b57
--- /dev/null
+++ b/src/hb-uniscribe.cc
@@ -0,0 +1,478 @@
+/*
+ * 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
+ */
+
+#define _WIN32_WINNT 0x0600
+#define WIN32_LEAN_AND_MEAN
+
+#define HB_SHAPER uniscribe
+#include "hb-shaper-impl-private.hh"
+
+#include <windows.h>
+#include <usp10.h>
+
+typedef ULONG WIN_ULONG;
+
+#include "hb-uniscribe.h"
+
+#include "hb-ot-name-table.hh"
+#include "hb-ot-tag.h"
+
+
+#ifndef HB_DEBUG_UNISCRIBE
+#define HB_DEBUG_UNISCRIBE (HB_DEBUG+0)
+#endif
+
+
+/*
+DWORD GetFontData(
+ __in HDC hdc,
+ __in DWORD dwTable,
+ __in DWORD dwOffset,
+ __out LPVOID lpvBuffer,
+ __in DWORD cbData
+);
+*/
+
+
+HB_SHAPER_DATA_ENSURE_DECLARE(uniscribe, face)
+HB_SHAPER_DATA_ENSURE_DECLARE(uniscribe, font)
+
+
+/*
+ * shaper face data
+ */
+
+struct hb_uniscribe_shaper_face_data_t {
+ HANDLE fh;
+};
+
+hb_uniscribe_shaper_face_data_t *
+_hb_uniscribe_shaper_face_data_create (hb_face_t *face)
+{
+ hb_uniscribe_shaper_face_data_t *data = (hb_uniscribe_shaper_face_data_t *) calloc (1, sizeof (hb_uniscribe_shaper_face_data_t));
+ if (unlikely (!data))
+ return NULL;
+
+ hb_blob_t *blob = hb_face_reference_blob (face);
+ unsigned int blob_length;
+ const char *blob_data = hb_blob_get_data (blob, &blob_length);
+ if (unlikely (!blob_length))
+ DEBUG_MSG (UNISCRIBE, face, "Face has empty blob");
+
+ DWORD num_fonts_installed;
+ data->fh = AddFontMemResourceEx ((void *) blob_data, blob_length, 0, &num_fonts_installed);
+ hb_blob_destroy (blob);
+ if (unlikely (!data->fh)) {
+ DEBUG_MSG (UNISCRIBE, face, "Face AddFontMemResourceEx() failed");
+ free (data);
+ return NULL;
+ }
+
+ return data;
+}
+
+void
+_hb_uniscribe_shaper_face_data_destroy (hb_uniscribe_shaper_face_data_t *data)
+{
+ RemoveFontMemResourceEx (data->fh);
+ free (data);
+}
+
+
+/*
+ * shaper font data
+ */
+
+struct hb_uniscribe_shaper_font_data_t {
+ HDC hdc;
+ LOGFONTW log_font;
+ HFONT hfont;
+ SCRIPT_CACHE script_cache;
+};
+
+static bool
+populate_log_font (LOGFONTW *lf,
+ hb_font_t *font)
+{
+ memset (lf, 0, sizeof (*lf));
+ lf->lfHeight = -font->y_scale;
+ lf->lfCharSet = DEFAULT_CHARSET;
+
+ hb_blob_t *blob = Sanitizer<name>::sanitize (hb_face_reference_table (font->face, HB_TAG ('n','a','m','e')));
+ const name *name_table = Sanitizer<name>::lock_instance (blob);
+ unsigned int len = name_table->get_name (3, 1, 0x409, 4,
+ lf->lfFaceName,
+ sizeof (lf->lfFaceName[0]) * LF_FACESIZE)
+ / sizeof (lf->lfFaceName[0]);
+ hb_blob_destroy (blob);
+
+ if (unlikely (!len)) {
+ DEBUG_MSG (UNISCRIBE, NULL, "Didn't find English name table entry");
+ return false;
+ }
+ if (unlikely (len >= LF_FACESIZE)) {
+ DEBUG_MSG (UNISCRIBE, NULL, "Font name too long");
+ return false;
+ }
+
+ for (unsigned int i = 0; i < len; i++)
+ lf->lfFaceName[i] = hb_be_uint16 (lf->lfFaceName[i]);
+ lf->lfFaceName[len] = 0;
+
+ return true;
+}
+
+hb_uniscribe_shaper_font_data_t *
+_hb_uniscribe_shaper_font_data_create (hb_font_t *font)
+{
+ if (unlikely (!hb_uniscribe_shaper_face_data_ensure (font->face))) return NULL;
+
+ hb_uniscribe_shaper_font_data_t *data = (hb_uniscribe_shaper_font_data_t *) calloc (1, sizeof (hb_uniscribe_shaper_font_data_t));
+ if (unlikely (!data))
+ return NULL;
+
+ data->hdc = GetDC (NULL);
+
+ if (unlikely (!populate_log_font (&data->log_font, font))) {
+ DEBUG_MSG (UNISCRIBE, font, "Font populate_log_font() failed");
+ _hb_uniscribe_shaper_font_data_destroy (data);
+ return NULL;
+ }
+
+ data->hfont = CreateFontIndirectW (&data->log_font);
+ if (unlikely (!data->hfont)) {
+ DEBUG_MSG (UNISCRIBE, font, "Font CreateFontIndirectW() failed");
+ _hb_uniscribe_shaper_font_data_destroy (data);
+ return NULL;
+ }
+
+ if (!SelectObject (data->hdc, data->hfont)) {
+ DEBUG_MSG (UNISCRIBE, font, "Font SelectObject() failed");
+ _hb_uniscribe_shaper_font_data_destroy (data);
+ return NULL;
+ }
+
+ return data;
+}
+
+void
+_hb_uniscribe_shaper_font_data_destroy (hb_uniscribe_shaper_font_data_t *data)
+{
+ if (data->hdc)
+ ReleaseDC (NULL, data->hdc);
+ if (data->hfont)
+ DeleteObject (data->hfont);
+ if (data->script_cache)
+ ScriptFreeCache (&data->script_cache);
+ free (data);
+}
+
+
+/*
+ * shaper shape_plan data
+ */
+
+struct hb_uniscribe_shaper_shape_plan_data_t {};
+
+hb_uniscribe_shaper_shape_plan_data_t *
+_hb_uniscribe_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan HB_UNUSED,
+ const hb_feature_t *user_features HB_UNUSED,
+ unsigned int num_user_features HB_UNUSED)
+{
+ return (hb_uniscribe_shaper_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED;
+}
+
+void
+_hb_uniscribe_shaper_shape_plan_data_destroy (hb_uniscribe_shaper_shape_plan_data_t *data HB_UNUSED)
+{
+}
+
+
+/*
+ * shaper
+ */
+
+LOGFONTW *
+hb_uniscribe_font_get_logfontw (hb_font_t *font)
+{
+ if (unlikely (!hb_uniscribe_shaper_font_data_ensure (font))) return NULL;
+ return NULL;
+ hb_uniscribe_shaper_font_data_t *font_data = HB_SHAPER_DATA_GET (font);
+ return &font_data->log_font;
+}
+
+HFONT
+hb_uniscribe_font_get_hfont (hb_font_t *font)
+{
+ if (unlikely (!hb_uniscribe_shaper_font_data_ensure (font))) return NULL;
+ hb_uniscribe_shaper_font_data_t *font_data = HB_SHAPER_DATA_GET (font);
+ return font_data->hfont;
+}
+
+
+hb_bool_t
+_hb_uniscribe_shape (hb_shape_plan_t *shape_plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer,
+ const hb_feature_t *features,
+ unsigned int num_features)
+{
+ hb_face_t *face = font->face;
+ hb_uniscribe_shaper_face_data_t *face_data = HB_SHAPER_DATA_GET (face);
+ hb_uniscribe_shaper_font_data_t *font_data = HB_SHAPER_DATA_GET (font);
+
+#define FAIL(...) \
+ HB_STMT_START { \
+ DEBUG_MSG (UNISCRIBE, NULL, __VA_ARGS__); \
+ return false; \
+ } HB_STMT_END;
+
+ HRESULT hr;
+
+retry:
+
+ unsigned int scratch_size;
+ char *scratch = (char *) buffer->get_scratch_buffer (&scratch_size);
+
+ /* Allocate char buffers; they all fit */
+
+#define ALLOCATE_ARRAY(Type, name, len) \
+ Type *name = (Type *) scratch; \
+ scratch += (len) * sizeof ((name)[0]); \
+ scratch_size -= (len) * sizeof ((name)[0]);
+
+#define utf16_index() var1.u32
+
+ WCHAR *pchars = (WCHAR *) scratch;
+ unsigned int chars_len = 0;
+ for (unsigned int i = 0; i < buffer->len; i++) {
+ hb_codepoint_t c = buffer->info[i].codepoint;
+ buffer->info[i].utf16_index() = chars_len;
+ if (likely (c < 0x10000))
+ pchars[chars_len++] = c;
+ else if (unlikely (c >= 0x110000))
+ pchars[chars_len++] = 0xFFFD;
+ else {
+ pchars[chars_len++] = 0xD800 + ((c - 0x10000) >> 10);
+ pchars[chars_len++] = 0xDC00 + ((c - 0x10000) & ((1 << 10) - 1));
+ }
+ }
+
+ ALLOCATE_ARRAY (WCHAR, wchars, chars_len);
+ ALLOCATE_ARRAY (WORD, log_clusters, chars_len);
+ ALLOCATE_ARRAY (SCRIPT_CHARPROP, char_props, chars_len);
+
+ /* On Windows, we don't care about alignment...*/
+ unsigned int glyphs_size = scratch_size / (sizeof (WORD) +
+ sizeof (SCRIPT_GLYPHPROP) +
+ sizeof (int) +
+ sizeof (GOFFSET) +
+ sizeof (uint32_t));
+
+ ALLOCATE_ARRAY (WORD, glyphs, glyphs_size);
+ ALLOCATE_ARRAY (SCRIPT_GLYPHPROP, glyph_props, glyphs_size);
+ ALLOCATE_ARRAY (int, advances, glyphs_size);
+ ALLOCATE_ARRAY (GOFFSET, offsets, glyphs_size);
+ ALLOCATE_ARRAY (uint32_t, vis_clusters, glyphs_size);
+
+#undef ALLOCATE_ARRAY
+
+#define MAX_ITEMS 256
+
+ SCRIPT_ITEM items[MAX_ITEMS + 1];
+ SCRIPT_CONTROL bidi_control = {0};
+ SCRIPT_STATE bidi_state = {0};
+ WIN_ULONG script_tags[MAX_ITEMS];
+ int item_count;
+
+ /* MinGW32 doesn't define fMergeNeutralItems, so we bruteforce */
+ //bidi_control.fMergeNeutralItems = true;
+ *(uint32_t*)&bidi_control |= 1<<24;
+
+ bidi_state.uBidiLevel = HB_DIRECTION_IS_FORWARD (buffer->props.direction) ? 0 : 1;
+ bidi_state.fOverrideDirection = 1;
+
+ hr = ScriptItemizeOpenType (wchars,
+ chars_len,
+ MAX_ITEMS,
+ &bidi_control,
+ &bidi_state,
+ items,
+ script_tags,
+ &item_count);
+ if (unlikely (FAILED (hr)))
+ FAIL ("ScriptItemizeOpenType() failed: 0x%08xL", hr);
+
+#undef MAX_ITEMS
+
+ int *range_char_counts = NULL;
+ TEXTRANGE_PROPERTIES **range_properties = NULL;
+ int range_count = 0;
+ if (num_features) {
+ /* TODO setup ranges */
+ }
+
+ OPENTYPE_TAG language_tag = hb_uint32_swap (hb_ot_tag_from_language (buffer->props.language));
+
+ unsigned int glyphs_offset = 0;
+ unsigned int glyphs_len;
+ bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction);
+ for (unsigned int j = 0; j < item_count; j++)
+ {
+ unsigned int i = backward ? item_count - 1 - j : j;
+ unsigned int chars_offset = items[i].iCharPos;
+ unsigned int item_chars_len = items[i + 1].iCharPos - chars_offset;
+
+ retry_shape:
+ hr = ScriptShapeOpenType (font_data->hdc,
+ &font_data->script_cache,
+ &items[i].a,
+ script_tags[i],
+ language_tag,
+ range_char_counts,
+ range_properties,
+ range_count,
+ wchars + chars_offset,
+ item_chars_len,
+ glyphs_size - glyphs_offset,
+ /* out */
+ log_clusters + chars_offset,
+ char_props + chars_offset,
+ glyphs + glyphs_offset,
+ glyph_props + glyphs_offset,
+ (int *) &glyphs_len);
+
+ if (unlikely (items[i].a.fNoGlyphIndex))
+ FAIL ("ScriptShapeOpenType() set fNoGlyphIndex");
+ if (unlikely (hr == E_OUTOFMEMORY))
+ {
+ buffer->ensure (buffer->allocated * 2);
+ if (buffer->in_error)
+ FAIL ("Buffer resize failed");
+ goto retry;
+ }
+ if (unlikely (hr == USP_E_SCRIPT_NOT_IN_FONT))
+ {
+ if (items[i].a.eScript == SCRIPT_UNDEFINED)
+ FAIL ("ScriptShapeOpenType() failed: Font doesn't support script");
+ items[i].a.eScript = SCRIPT_UNDEFINED;
+ goto retry_shape;
+ }
+ if (unlikely (FAILED (hr)))
+ {
+ FAIL ("ScriptShapeOpenType() failed: 0x%08xL", hr);
+ }
+
+ for (unsigned int j = chars_offset; j < chars_offset + item_chars_len; j++)
+ log_clusters[j] += glyphs_offset;
+
+ hr = ScriptPlaceOpenType (font_data->hdc,
+ &font_data->script_cache,
+ &items[i].a,
+ script_tags[i],
+ language_tag,
+ range_char_counts,
+ range_properties,
+ range_count,
+ wchars + chars_offset,
+ log_clusters + chars_offset,
+ char_props + chars_offset,
+ item_chars_len,
+ glyphs + glyphs_offset,
+ glyph_props + glyphs_offset,
+ glyphs_len,
+ /* out */
+ advances + glyphs_offset,
+ offsets + glyphs_offset,
+ NULL);
+ if (unlikely (FAILED (hr)))
+ FAIL ("ScriptPlaceOpenType() failed: 0x%08xL", hr);
+
+ glyphs_offset += glyphs_len;
+ }
+ glyphs_len = glyphs_offset;
+
+ /* Ok, we've got everything we need, now compose output buffer,
+ * very, *very*, carefully! */
+
+ /* Calculate visual-clusters. That's what we ship. */
+ for (unsigned int i = 0; i < glyphs_len; i++)
+ vis_clusters[i] = -1;
+ for (unsigned int i = 0; i < buffer->len; i++) {
+ uint32_t *p = &vis_clusters[log_clusters[buffer->info[i].utf16_index()]];
+ *p = MIN (*p, buffer->info[i].cluster);
+ }
+ if (!backward) {
+ for (unsigned int i = 1; i < glyphs_len; i++)
+ if (vis_clusters[i] == -1)
+ vis_clusters[i] = vis_clusters[i - 1];
+ } else {
+ for (int i = glyphs_len - 2; i >= 0; i--)
+ if (vis_clusters[i] == -1)
+ vis_clusters[i] = vis_clusters[i + 1];
+ }
+
+#undef utf16_index
+
+ buffer->ensure (glyphs_len);
+ if (buffer->in_error)
+ FAIL ("Buffer in error");
+
+#undef FAIL
+
+ /* Set glyph infos */
+ buffer->len = 0;
+ for (unsigned int i = 0; i < glyphs_len; i++)
+ {
+ hb_glyph_info_t *info = &buffer->info[buffer->len++];
+
+ info->codepoint = glyphs[i];
+ info->cluster = vis_clusters[i];
+
+ /* The rest is crap. Let's store position info there for now. */
+ info->mask = advances[i];
+ info->var1.u32 = offsets[i].du;
+ info->var2.u32 = offsets[i].dv;
+ }
+
+ /* Set glyph positions */
+ buffer->clear_positions ();
+ for (unsigned int i = 0; i < glyphs_len; i++)
+ {
+ hb_glyph_info_t *info = &buffer->info[i];
+ hb_glyph_position_t *pos = &buffer->pos[i];
+
+ /* TODO vertical */
+ pos->x_advance = info->mask;
+ pos->x_offset = info->var1.u32;
+ pos->y_offset = info->var2.u32;
+ }
+
+ /* Wow, done! */
+ return true;
+}
+
+
diff --git a/src/hb-uniscribe.h b/src/hb-uniscribe.h
new file mode 100644
index 0000000..51887c8
--- /dev/null
+++ b/src/hb-uniscribe.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright © 2011 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_UNISCRIBE_H
+#define HB_UNISCRIBE_H
+
+#include "hb.h"
+
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0600
+#endif
+#include <windows.h>
+
+HB_BEGIN_DECLS
+
+
+LOGFONTW *
+hb_uniscribe_font_get_logfontw (hb_font_t *font);
+
+HFONT
+hb_uniscribe_font_get_hfont (hb_font_t *font);
+
+
+HB_END_DECLS
+
+#endif /* HB_UNISCRIBE_H */
diff --git a/src/hb-version.h b/src/hb-version.h
new file mode 100644
index 0000000..e99b276
--- /dev/null
+++ b/src/hb-version.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright © 2011 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_H_IN
+#error "Include <hb.h> instead."
+#endif
+
+#ifndef HB_VERSION_H
+#define HB_VERSION_H
+
+#include "hb-common.h"
+
+HB_BEGIN_DECLS
+
+
+#define HB_VERSION_MAJOR 0
+#define HB_VERSION_MINOR 9
+#define HB_VERSION_MICRO 3
+
+#define HB_VERSION_STRING "0.9.3"
+
+#define HB_VERSION_CHECK(major,minor,micro) \
+ ((major)*10000+(minor)*100+(micro) >= \
+ HB_VERSION_MAJOR*10000+HB_VERSION_MINOR*100+HB_VERSION_MICRO)
+
+
+void
+hb_version (unsigned int *major,
+ unsigned int *minor,
+ unsigned int *micro);
+
+const char *
+hb_version_string (void);
+
+hb_bool_t
+hb_version_check (unsigned int major,
+ unsigned int minor,
+ unsigned int micro);
+
+
+HB_END_DECLS
+
+#endif /* HB_VERSION_H */
diff --git a/src/hb-version.h.in b/src/hb-version.h.in
new file mode 100644
index 0000000..43634f9
--- /dev/null
+++ b/src/hb-version.h.in
@@ -0,0 +1,66 @@
+/*
+ * Copyright © 2011 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_H_IN
+#error "Include <hb.h> instead."
+#endif
+
+#ifndef HB_VERSION_H
+#define HB_VERSION_H
+
+#include "hb-common.h"
+
+HB_BEGIN_DECLS
+
+
+#define HB_VERSION_MAJOR @HB_VERSION_MAJOR@
+#define HB_VERSION_MINOR @HB_VERSION_MINOR@
+#define HB_VERSION_MICRO @HB_VERSION_MICRO@
+
+#define HB_VERSION_STRING "@HB_VERSION@"
+
+#define HB_VERSION_CHECK(major,minor,micro) \
+ ((major)*10000+(minor)*100+(micro) >= \
+ HB_VERSION_MAJOR*10000+HB_VERSION_MINOR*100+HB_VERSION_MICRO)
+
+
+void
+hb_version (unsigned int *major,
+ unsigned int *minor,
+ unsigned int *micro);
+
+const char *
+hb_version_string (void);
+
+hb_bool_t
+hb_version_check (unsigned int major,
+ unsigned int minor,
+ unsigned int micro);
+
+
+HB_END_DECLS
+
+#endif /* HB_VERSION_H */
diff --git a/src/hb-warning.cc b/src/hb-warning.cc
new file mode 100644
index 0000000..01adcea
--- /dev/null
+++ b/src/hb-warning.cc
@@ -0,0 +1,39 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-atomic-private.hh"
+#include "hb-mutex-private.hh"
+
+
+#if defined(HB_ATOMIC_INT_NIL)
+#pragma message("Could not find any system to define atomic_int macros, library may NOT be thread-safe.")
+#endif
+#if defined(HB_MUTEX_IMPL_NIL)
+#pragma message("Could not find any system to define mutex macros, library may NOT be thread-safe.")
+#endif
+#if defined(HB_ATOMIC_INT_NIL) || defined(HB_MUTEX_IMPL_NIL)
+#pragma message("To suppress these warnings, define HB_NO_MT.")
+#endif
diff --git a/src/hb.h b/src/hb.h
new file mode 100644
index 0000000..d36040e
--- /dev/null
+++ b/src/hb.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_H
+#define HB_H
+#define HB_H_IN
+
+#include "hb-blob.h"
+#include "hb-buffer.h"
+#include "hb-common.h"
+#include "hb-font.h"
+#include "hb-set.h"
+#include "hb-shape.h"
+#include "hb-unicode.h"
+#include "hb-version.h"
+
+HB_BEGIN_DECLS
+HB_END_DECLS
+
+#undef HB_H_IN
+#endif /* HB_H */
diff --git a/src/indic.cc b/src/indic.cc
new file mode 100644
index 0000000..991a772
--- /dev/null
+++ b/src/indic.cc
@@ -0,0 +1,51 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-ot-shape-complex-indic-private.hh"
+
+int
+main (void)
+{
+ hb_unicode_funcs_t *funcs = hb_unicode_funcs_get_default ();
+
+ printf ("There are split matras without a Unicode decomposition:\n");
+ for (hb_codepoint_t u = 0; u < 0x110000; u++)
+ {
+ unsigned int type = get_indic_categories (u);
+
+ unsigned int category = type & 0x0F;
+ unsigned int position = type >> 4;
+
+ hb_unicode_general_category_t cat = hb_unicode_general_category (funcs, u);
+ unsigned int ccc = hb_unicode_combining_class (funcs, u);
+ if (category == OT_M && ccc)
+ printf ("U+%04X %d\n", u, ccc);
+
+// hb_codepoint_t a, b;
+// if (!hb_unicode_decompose (funcs, u, &a, &b))
+// printf ("U+%04X %x %x\n", u, category, position);
+ }
+}
diff --git a/src/main.cc b/src/main.cc
new file mode 100644
index 0000000..07d3d69
--- /dev/null
+++ b/src/main.cc
@@ -0,0 +1,195 @@
+/*
+ * Copyright © 2007,2008,2009 Red Hat, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#include "hb-mutex-private.hh"
+#include "hb-open-file-private.hh"
+#include "hb-ot-layout-gdef-table.hh"
+#include "hb-ot-layout-gsubgpos-private.hh"
+
+#ifdef HAVE_GLIB
+#include <glib.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+
+
+
+int
+main (int argc, char **argv)
+{
+ if (argc != 2) {
+ fprintf (stderr, "usage: %s font-file.ttf\n", argv[0]);
+ exit (1);
+ }
+
+ const char *font_data = NULL;
+ int len = 0;
+
+#ifdef HAVE_GLIB
+ GMappedFile *mf = g_mapped_file_new (argv[1], false, NULL);
+ font_data = g_mapped_file_get_contents (mf);
+ len = g_mapped_file_get_length (mf);
+#else
+ FILE *f = fopen (argv[1], "rb");
+ fseek (f, 0, SEEK_END);
+ len = ftell (f);
+ fseek (f, 0, SEEK_SET);
+ font_data = (const char *) malloc (len);
+ len = fread ((char *) font_data, 1, len, f);
+#endif
+
+ printf ("Opened font file %s: %d bytes long\n", argv[1], len);
+
+ const OpenTypeFontFile &ot = *CastP<OpenTypeFontFile> (font_data);
+
+ switch (ot.get_tag ()) {
+ case OpenTypeFontFile::TrueTypeTag:
+ printf ("OpenType font with TrueType outlines\n");
+ break;
+ case OpenTypeFontFile::CFFTag:
+ printf ("OpenType font with CFF (Type1) outlines\n");
+ break;
+ case OpenTypeFontFile::TTCTag:
+ printf ("TrueType Collection of OpenType fonts\n");
+ break;
+ case OpenTypeFontFile::TrueTag:
+ printf ("Obsolete Apple TrueType font\n");
+ break;
+ case OpenTypeFontFile::Typ1Tag:
+ printf ("Obsolete Apple Type1 font in SFNT container\n");
+ break;
+ default:
+ printf ("Unknown font format\n");
+ break;
+ }
+
+ int num_fonts = ot.get_face_count ();
+ printf ("%d font(s) found in file\n", num_fonts);
+ for (int n_font = 0; n_font < num_fonts; n_font++) {
+ const OpenTypeFontFace &font = ot.get_face (n_font);
+ printf ("Font %d of %d:\n", n_font, num_fonts);
+
+ int num_tables = font.get_table_count ();
+ printf (" %d table(s) found in font\n", num_tables);
+ for (int n_table = 0; n_table < num_tables; n_table++) {
+ const OpenTypeTable &table = font.get_table (n_table);
+ printf (" Table %2d of %2d: %.4s (0x%08x+0x%08x)\n", n_table, num_tables,
+ (const char *)table.tag,
+ (unsigned int) table.offset,
+ (unsigned int) table.length);
+
+ switch (table.tag) {
+
+ case GSUBGPOS::GSUBTag:
+ case GSUBGPOS::GPOSTag:
+ {
+
+ const GSUBGPOS &g = *CastP<GSUBGPOS> (font_data + table.offset);
+
+ int num_scripts = g.get_script_count ();
+ printf (" %d script(s) found in table\n", num_scripts);
+ for (int n_script = 0; n_script < num_scripts; n_script++) {
+ const Script &script = g.get_script (n_script);
+ printf (" Script %2d of %2d: %.4s\n", n_script, num_scripts,
+ (const char *)g.get_script_tag(n_script));
+
+ if (!script.has_default_lang_sys())
+ printf (" No default language system\n");
+ int num_langsys = script.get_lang_sys_count ();
+ printf (" %d language system(s) found in script\n", num_langsys);
+ for (int n_langsys = script.has_default_lang_sys() ? -1 : 0; n_langsys < num_langsys; n_langsys++) {
+ const LangSys &langsys = n_langsys == -1
+ ? script.get_default_lang_sys ()
+ : script.get_lang_sys (n_langsys);
+ if (n_langsys == -1)
+ printf (" Default Language System\n");
+ else
+ printf (" Language System %2d of %2d: %.4s\n", n_langsys, num_langsys,
+ (const char *)script.get_lang_sys_tag (n_langsys));
+ if (langsys.get_required_feature_index () == Index::NOT_FOUND_INDEX)
+ printf (" No required feature\n");
+
+ int num_features = langsys.get_feature_count ();
+ printf (" %d feature(s) found in language system\n", num_features);
+ for (int n_feature = 0; n_feature < num_features; n_feature++) {
+ printf (" Feature index %2d of %2d: %d\n", n_feature, num_features,
+ langsys.get_feature_index (n_feature));
+ }
+ }
+ }
+
+ int num_features = g.get_feature_count ();
+ printf (" %d feature(s) found in table\n", num_features);
+ for (int n_feature = 0; n_feature < num_features; n_feature++) {
+ const Feature &feature = g.get_feature (n_feature);
+ printf (" Feature %2d of %2d: %.4s; %d lookup(s)\n", n_feature, num_features,
+ (const char *)g.get_feature_tag(n_feature),
+ feature.get_lookup_count());
+
+ int num_lookups = feature.get_lookup_count ();
+ printf (" %d lookup(s) found in feature\n", num_lookups);
+ for (int n_lookup = 0; n_lookup < num_lookups; n_lookup++) {
+ printf (" Lookup index %2d of %2d: %d\n", n_lookup, num_lookups,
+ feature.get_lookup_index (n_lookup));
+ }
+ }
+
+ int num_lookups = g.get_lookup_count ();
+ printf (" %d lookup(s) found in table\n", num_lookups);
+ for (int n_lookup = 0; n_lookup < num_lookups; n_lookup++) {
+ const Lookup &lookup = g.get_lookup (n_lookup);
+ printf (" Lookup %2d of %2d: type %d, props 0x%04X\n", n_lookup, num_lookups,
+ lookup.get_type(), lookup.get_props());
+ }
+
+ }
+ break;
+
+ case GDEF::Tag:
+ {
+
+ const GDEF &gdef = *CastP<GDEF> (font_data + table.offset);
+
+ printf (" Has %sglyph classes\n",
+ gdef.has_glyph_classes () ? "" : "no ");
+ printf (" Has %smark attachment types\n",
+ gdef.has_mark_attachment_types () ? "" : "no ");
+ printf (" Has %sattach points\n",
+ gdef.has_attach_points () ? "" : "no ");
+ printf (" Has %slig carets\n",
+ gdef.has_lig_carets () ? "" : "no ");
+ printf (" Has %smark sets\n",
+ gdef.has_mark_sets () ? "" : "no ");
+ break;
+ }
+ }
+ }
+ }
+
+ return 0;
+}
+
+
diff --git a/src/test-would-substitute.cc b/src/test-would-substitute.cc
new file mode 100644
index 0000000..95626ed
--- /dev/null
+++ b/src/test-would-substitute.cc
@@ -0,0 +1,103 @@
+/*
+ * Copyright © 2010,2011 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
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "hb.h"
+#include "hb-ot.h"
+
+#ifdef HAVE_GLIB
+#include <glib.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+
+#ifdef HAVE_FREETYPE
+#include "hb-ft.h"
+#endif
+
+int
+main (int argc, char **argv)
+{
+ hb_blob_t *blob = NULL;
+
+ if (argc != 4 && argc != 5) {
+ fprintf (stderr, "usage: %s font-file lookup-index first-glyph [second-glyph]\n", argv[0]);
+ exit (1);
+ }
+
+ /* Create the blob */
+ {
+ const char *font_data;
+ unsigned int len;
+ hb_destroy_func_t destroy;
+ void *user_data;
+ hb_memory_mode_t mm;
+
+#ifdef HAVE_GLIB
+ GMappedFile *mf = g_mapped_file_new (argv[1], false, NULL);
+ font_data = g_mapped_file_get_contents (mf);
+ len = g_mapped_file_get_length (mf);
+ destroy = (hb_destroy_func_t) g_mapped_file_unref;
+ user_data = (void *) mf;
+ mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
+#else
+ FILE *f = fopen (argv[1], "rb");
+ fseek (f, 0, SEEK_END);
+ len = ftell (f);
+ fseek (f, 0, SEEK_SET);
+ font_data = (const char *) malloc (len);
+ if (!font_data) len = 0;
+ len = fread ((char *) font_data, 1, len, f);
+ destroy = free;
+ user_data = (void *) font_data;
+ fclose (f);
+ mm = HB_MEMORY_MODE_WRITABLE;
+#endif
+
+ blob = hb_blob_create (font_data, len, mm, user_data, destroy);
+ }
+
+ /* Create the face */
+ hb_face_t *face = hb_face_create (blob, 0 /* first face */);
+ hb_blob_destroy (blob);
+ blob = NULL;
+
+ hb_font_t *font = hb_font_create (face);
+#ifdef HAVE_FREETYPE
+ hb_ft_font_set_funcs (font);
+#endif
+
+ unsigned int len = argc - 3;
+ hb_codepoint_t glyphs[2];
+ if (!hb_font_glyph_from_string (font, argv[3], -1, &glyphs[0]) ||
+ (argc > 4 &&
+ !hb_font_glyph_from_string (font, argv[4], -1, &glyphs[1])))
+ return 2;
+ return !hb_ot_layout_would_substitute_lookup (face, glyphs, len, strtol (argv[2], NULL, 0));
+}
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644
index 0000000..16a3cd2
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1,5 @@
+# Process this file with automake to produce Makefile.in
+
+SUBDIRS = api shaping
+
+-include $(top_srcdir)/git.mk
diff --git a/test/Makefile.in b/test/Makefile.in
new file mode 100644
index 0000000..dee13f6
--- /dev/null
+++ b/test/Makefile.in
@@ -0,0 +1,593 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Process this file with automake to produce Makefile.in
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = test
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FT_CFLAGS = @CAIRO_FT_CFLAGS@
+CAIRO_FT_LIBS = @CAIRO_FT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CORETEXT_CFLAGS = @CORETEXT_CFLAGS@
+CORETEXT_LIBS = @CORETEXT_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GRAPHITE2_CFLAGS = @GRAPHITE2_CFLAGS@
+GRAPHITE2_LIBS = @GRAPHITE2_LIBS@
+GREP = @GREP@
+GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
+GTHREAD_LIBS = @GTHREAD_LIBS@
+HB_LIBTOOL_VERSION_INFO = @HB_LIBTOOL_VERSION_INFO@
+HB_VERSION = @HB_VERSION@
+HB_VERSION_MAJOR = @HB_VERSION_MAJOR@
+HB_VERSION_MICRO = @HB_VERSION_MICRO@
+HB_VERSION_MINOR = @HB_VERSION_MINOR@
+ICU_CFLAGS = @ICU_CFLAGS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UNISCRIBE_CFLAGS = @UNISCRIBE_CFLAGS@
+UNISCRIBE_LIBS = @UNISCRIBE_LIBS@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = api shaping
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits test/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnits test/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
+
+
+-include $(top_srcdir)/git.mk
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/test/api/Makefile.am b/test/api/Makefile.am
new file mode 100644
index 0000000..e6c0c01
--- /dev/null
+++ b/test/api/Makefile.am
@@ -0,0 +1,125 @@
+# Process this file with automake to produce Makefile.in
+
+NULL =
+EXTRA_DIST =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+
+if HAVE_GLIB
+AM_CPPFLAGS = -DSRCDIR="\"$(srcdir)\"" -I$(top_srcdir)/src/ -I$(top_builddir)/src/ $(GLIB_CFLAGS) $(GTHREAD_CFLAGS)
+LDADD = $(top_builddir)/src/libharfbuzz.la $(GLIB_LIBS) $(GTHREAD_LIBS)
+
+EXTRA_DIST += hb-test.h
+
+check_PROGRAMS = $(TEST_PROGS)
+noinst_PROGRAMS = $(TEST_PROGS)
+
+TEST_PROGS = \
+ test-blob \
+ test-buffer \
+ test-common \
+ test-font \
+ test-object \
+ test-shape \
+ test-unicode \
+ test-version \
+ $(NULL)
+
+if HAVE_OT
+TEST_PROGS += \
+ test-ot-tag \
+ $(NULL)
+endif
+
+# Tests for header compilation
+TEST_PROGS += \
+ test-c \
+ test-cplusplus \
+ $(NULL)
+test_cplusplus_SOURCES = test-cplusplus.cc
+test_c_CPPFLAGS = $(AM_CPPFLAGS)
+test_cplusplus_CPPFLAGS = $(AM_CPPFLAGS)
+if HAVE_ICU
+test_c_CPPFLAGS += $(ICU_CFLAGS)
+test_cplusplus_CPPFLAGS += $(ICU_CFLAGS)
+endif
+if HAVE_FREETYPE
+test_c_CPPFLAGS += $(FREETYPE_CFLAGS)
+test_cplusplus_CPPFLAGS += $(FREETYPE_CFLAGS)
+endif
+
+
+# Default test running environment
+TESTS = $(TEST_PROGS)
+TESTS_ENVIRONMENT = \
+ MALLOC_CHECK_=2 \
+ MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256)) \
+ G_DEBUG=gc-friendly \
+ G_SLICE=always-malloc \
+ srcdir=$(srcdir) \
+ $(ENV)
+
+
+# check-tool: Run tests under $(TOOL)
+check-tool:
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check \
+ TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) $(top_builddir)/libtool --mode=execute \
+ env $(TOOL)'
+# check-tool-raw: Run tests under $(TOOL), but don't run under libtool
+check-tool-raw:
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check \
+ TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) \
+ env $(TOOL)'
+
+# check-gtester: Run tests under gtester
+GTESTER = gtester
+check-gtester:
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLGS) check-tool-raw TOOL="$(GTESTER) --verbose --keep-going"
+
+
+# Check tests under valgrind. Saves log to log-valgrind.txt
+VALGRIND_FLAGS = \
+ --tool=memcheck --suppressions=$(srcdir)/.valgrind-suppressions \
+ --track-origins=yes \
+ --leak-check=yes
+ $(EXTRA_VALGRIND_FLAGS)
+# Can't do for now: --show-reachable=yes
+CLEANFILES += log-valgrind.txt
+valgrind_verbose = $(valgrind_verbose_$(V))
+valgrind_verbose_ = $(valgrind_verbose_$(AM_DEFAULT_VERBOSITY))
+valgrind_verbose_0 = | \
+ grep '\(^[^=]\|ERROR SUMMARY\|definitely lost\|indirectly lost\)' | grep -v ': 0'
+# TODO: The following check does not fail if valgrind finds error. It should.
+check-valgrind:
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLGS) check-tool TOOL="valgrind $(VALGRIND_FLAGS)" \
+ 2>&1 | tee log-valgrind.txt $(valgrind_verbose)
+
+
+# check-symbols: Finds untested API symbols
+symbols-tested.txt: $(TEST_PROGS)
+ $(AM_V_GEN)$(top_builddir)/libtool --mode=execute nm $^ \
+ | grep ' U hb_' | sed 's/.* U hb_/hb_/' \
+ | sort | uniq > $@.tmp && mv $@.tmp $@
+symbols-exported.txt: $(top_builddir)/src/.libs/libharfbuzz.so
+ $(AM_V_GEN)$(top_builddir)/libtool --mode=execute nm $^ \
+ | grep ' T ' | sed 's/.* T //' | grep -v '^\(_init\|_fini\)$$' \
+ | sort | uniq > $@.tmp && mv $@.tmp $@
+symbols-untested.txt: symbols-tested.txt symbols-exported.txt
+ $(AM_V_GEN)diff $^ > $@.tmp; mv $@.tmp $@
+CLEANFILES += symbols-tested.txt symbols-exported.txt symbols-untested.txt
+check-symbols: symbols-untested.txt
+ @! cat $^ | grep .
+
+
+
+else
+check-am: err-glib
+err-glib:
+ @echo "You need to have glib support enabled to run the tests"
+ @exit 77
+endif
+
+.PHONY: check-symbols check-tool check-valgrind
+
+-include $(top_srcdir)/git.mk
diff --git a/test/api/Makefile.in b/test/api/Makefile.in
new file mode 100644
index 0000000..d6c087a
--- /dev/null
+++ b/test/api/Makefile.in
@@ -0,0 +1,914 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Process this file with automake to produce Makefile.in
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@HAVE_GLIB_TRUE@am__append_1 = hb-test.h
+@HAVE_GLIB_TRUE@check_PROGRAMS = $(am__EXEEXT_3)
+@HAVE_GLIB_TRUE@noinst_PROGRAMS = $(am__EXEEXT_3)
+@HAVE_GLIB_TRUE@@HAVE_OT_TRUE@am__append_2 = \
+@HAVE_GLIB_TRUE@@HAVE_OT_TRUE@ test-ot-tag \
+@HAVE_GLIB_TRUE@@HAVE_OT_TRUE@ $(NULL)
+
+@HAVE_GLIB_TRUE@@HAVE_ICU_TRUE@am__append_3 = $(ICU_CFLAGS)
+@HAVE_GLIB_TRUE@@HAVE_ICU_TRUE@am__append_4 = $(ICU_CFLAGS)
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@am__append_5 = $(FREETYPE_CFLAGS)
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@am__append_6 = $(FREETYPE_CFLAGS)
+@HAVE_GLIB_TRUE@TESTS = $(am__EXEEXT_3)
+# Can't do for now: --show-reachable=yes
+@HAVE_GLIB_TRUE@am__append_7 = log-valgrind.txt symbols-tested.txt \
+@HAVE_GLIB_TRUE@ symbols-exported.txt symbols-untested.txt
+subdir = test/api
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__EXEEXT_1 =
+@HAVE_GLIB_TRUE@@HAVE_OT_TRUE@am__EXEEXT_2 = test-ot-tag$(EXEEXT) \
+@HAVE_GLIB_TRUE@@HAVE_OT_TRUE@ $(am__EXEEXT_1)
+@HAVE_GLIB_TRUE@am__EXEEXT_3 = test-blob$(EXEEXT) test-buffer$(EXEEXT) \
+@HAVE_GLIB_TRUE@ test-common$(EXEEXT) test-font$(EXEEXT) \
+@HAVE_GLIB_TRUE@ test-object$(EXEEXT) test-shape$(EXEEXT) \
+@HAVE_GLIB_TRUE@ test-unicode$(EXEEXT) test-version$(EXEEXT) \
+@HAVE_GLIB_TRUE@ $(am__EXEEXT_1) $(am__EXEEXT_2) \
+@HAVE_GLIB_TRUE@ test-c$(EXEEXT) test-cplusplus$(EXEEXT) \
+@HAVE_GLIB_TRUE@ $(am__EXEEXT_1)
+PROGRAMS = $(noinst_PROGRAMS)
+test_blob_SOURCES = test-blob.c
+test_blob_OBJECTS = test-blob.$(OBJEXT)
+test_blob_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+@HAVE_GLIB_TRUE@test_blob_DEPENDENCIES = \
+@HAVE_GLIB_TRUE@ $(top_builddir)/src/libharfbuzz.la \
+@HAVE_GLIB_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+test_buffer_SOURCES = test-buffer.c
+test_buffer_OBJECTS = test-buffer.$(OBJEXT)
+test_buffer_LDADD = $(LDADD)
+@HAVE_GLIB_TRUE@test_buffer_DEPENDENCIES = \
+@HAVE_GLIB_TRUE@ $(top_builddir)/src/libharfbuzz.la \
+@HAVE_GLIB_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+test_c_SOURCES = test-c.c
+test_c_OBJECTS = test_c-test-c.$(OBJEXT)
+test_c_LDADD = $(LDADD)
+@HAVE_GLIB_TRUE@test_c_DEPENDENCIES = \
+@HAVE_GLIB_TRUE@ $(top_builddir)/src/libharfbuzz.la \
+@HAVE_GLIB_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+test_common_SOURCES = test-common.c
+test_common_OBJECTS = test-common.$(OBJEXT)
+test_common_LDADD = $(LDADD)
+@HAVE_GLIB_TRUE@test_common_DEPENDENCIES = \
+@HAVE_GLIB_TRUE@ $(top_builddir)/src/libharfbuzz.la \
+@HAVE_GLIB_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am__test_cplusplus_SOURCES_DIST = test-cplusplus.cc
+@HAVE_GLIB_TRUE@am_test_cplusplus_OBJECTS = \
+@HAVE_GLIB_TRUE@ test_cplusplus-test-cplusplus.$(OBJEXT)
+test_cplusplus_OBJECTS = $(am_test_cplusplus_OBJECTS)
+test_cplusplus_LDADD = $(LDADD)
+@HAVE_GLIB_TRUE@test_cplusplus_DEPENDENCIES = \
+@HAVE_GLIB_TRUE@ $(top_builddir)/src/libharfbuzz.la \
+@HAVE_GLIB_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+test_font_SOURCES = test-font.c
+test_font_OBJECTS = test-font.$(OBJEXT)
+test_font_LDADD = $(LDADD)
+@HAVE_GLIB_TRUE@test_font_DEPENDENCIES = \
+@HAVE_GLIB_TRUE@ $(top_builddir)/src/libharfbuzz.la \
+@HAVE_GLIB_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+test_object_SOURCES = test-object.c
+test_object_OBJECTS = test-object.$(OBJEXT)
+test_object_LDADD = $(LDADD)
+@HAVE_GLIB_TRUE@test_object_DEPENDENCIES = \
+@HAVE_GLIB_TRUE@ $(top_builddir)/src/libharfbuzz.la \
+@HAVE_GLIB_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+test_ot_tag_SOURCES = test-ot-tag.c
+test_ot_tag_OBJECTS = test-ot-tag.$(OBJEXT)
+test_ot_tag_LDADD = $(LDADD)
+@HAVE_GLIB_TRUE@test_ot_tag_DEPENDENCIES = \
+@HAVE_GLIB_TRUE@ $(top_builddir)/src/libharfbuzz.la \
+@HAVE_GLIB_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+test_shape_SOURCES = test-shape.c
+test_shape_OBJECTS = test-shape.$(OBJEXT)
+test_shape_LDADD = $(LDADD)
+@HAVE_GLIB_TRUE@test_shape_DEPENDENCIES = \
+@HAVE_GLIB_TRUE@ $(top_builddir)/src/libharfbuzz.la \
+@HAVE_GLIB_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+test_unicode_SOURCES = test-unicode.c
+test_unicode_OBJECTS = test-unicode.$(OBJEXT)
+test_unicode_LDADD = $(LDADD)
+@HAVE_GLIB_TRUE@test_unicode_DEPENDENCIES = \
+@HAVE_GLIB_TRUE@ $(top_builddir)/src/libharfbuzz.la \
+@HAVE_GLIB_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+test_version_SOURCES = test-version.c
+test_version_OBJECTS = test-version.$(OBJEXT)
+test_version_LDADD = $(LDADD)
+@HAVE_GLIB_TRUE@test_version_DEPENDENCIES = \
+@HAVE_GLIB_TRUE@ $(top_builddir)/src/libharfbuzz.la \
+@HAVE_GLIB_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = test-blob.c test-buffer.c test-c.c test-common.c \
+ $(test_cplusplus_SOURCES) test-font.c test-object.c \
+ test-ot-tag.c test-shape.c test-unicode.c test-version.c
+DIST_SOURCES = test-blob.c test-buffer.c test-c.c test-common.c \
+ $(am__test_cplusplus_SOURCES_DIST) test-font.c test-object.c \
+ test-ot-tag.c test-shape.c test-unicode.c test-version.c
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FT_CFLAGS = @CAIRO_FT_CFLAGS@
+CAIRO_FT_LIBS = @CAIRO_FT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CORETEXT_CFLAGS = @CORETEXT_CFLAGS@
+CORETEXT_LIBS = @CORETEXT_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GRAPHITE2_CFLAGS = @GRAPHITE2_CFLAGS@
+GRAPHITE2_LIBS = @GRAPHITE2_LIBS@
+GREP = @GREP@
+GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
+GTHREAD_LIBS = @GTHREAD_LIBS@
+HB_LIBTOOL_VERSION_INFO = @HB_LIBTOOL_VERSION_INFO@
+HB_VERSION = @HB_VERSION@
+HB_VERSION_MAJOR = @HB_VERSION_MAJOR@
+HB_VERSION_MICRO = @HB_VERSION_MICRO@
+HB_VERSION_MINOR = @HB_VERSION_MINOR@
+ICU_CFLAGS = @ICU_CFLAGS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UNISCRIBE_CFLAGS = @UNISCRIBE_CFLAGS@
+UNISCRIBE_LIBS = @UNISCRIBE_LIBS@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+EXTRA_DIST = $(am__append_1)
+CLEANFILES = $(am__append_7)
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+@HAVE_GLIB_TRUE@AM_CPPFLAGS = -DSRCDIR="\"$(srcdir)\"" -I$(top_srcdir)/src/ -I$(top_builddir)/src/ $(GLIB_CFLAGS) $(GTHREAD_CFLAGS)
+@HAVE_GLIB_TRUE@LDADD = $(top_builddir)/src/libharfbuzz.la $(GLIB_LIBS) $(GTHREAD_LIBS)
+
+# Tests for header compilation
+@HAVE_GLIB_TRUE@TEST_PROGS = test-blob test-buffer test-common \
+@HAVE_GLIB_TRUE@ test-font test-object test-shape test-unicode \
+@HAVE_GLIB_TRUE@ test-version $(NULL) $(am__append_2) test-c \
+@HAVE_GLIB_TRUE@ test-cplusplus $(NULL)
+@HAVE_GLIB_TRUE@test_cplusplus_SOURCES = test-cplusplus.cc
+@HAVE_GLIB_TRUE@test_c_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_3) \
+@HAVE_GLIB_TRUE@ $(am__append_5)
+@HAVE_GLIB_TRUE@test_cplusplus_CPPFLAGS = $(AM_CPPFLAGS) \
+@HAVE_GLIB_TRUE@ $(am__append_4) $(am__append_6)
+@HAVE_GLIB_TRUE@TESTS_ENVIRONMENT = \
+@HAVE_GLIB_TRUE@ MALLOC_CHECK_=2 \
+@HAVE_GLIB_TRUE@ MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256)) \
+@HAVE_GLIB_TRUE@ G_DEBUG=gc-friendly \
+@HAVE_GLIB_TRUE@ G_SLICE=always-malloc \
+@HAVE_GLIB_TRUE@ srcdir=$(srcdir) \
+@HAVE_GLIB_TRUE@ $(ENV)
+
+
+# check-gtester: Run tests under gtester
+@HAVE_GLIB_TRUE@GTESTER = gtester
+
+# Check tests under valgrind. Saves log to log-valgrind.txt
+@HAVE_GLIB_TRUE@VALGRIND_FLAGS = \
+@HAVE_GLIB_TRUE@ --tool=memcheck --suppressions=$(srcdir)/.valgrind-suppressions \
+@HAVE_GLIB_TRUE@ --track-origins=yes \
+@HAVE_GLIB_TRUE@ --leak-check=yes
+
+@HAVE_GLIB_TRUE@valgrind_verbose = $(valgrind_verbose_$(V))
+@HAVE_GLIB_TRUE@valgrind_verbose_ = $(valgrind_verbose_$(AM_DEFAULT_VERBOSITY))
+@HAVE_GLIB_TRUE@valgrind_verbose_0 = | \
+@HAVE_GLIB_TRUE@ grep '\(^[^=]\|ERROR SUMMARY\|definitely lost\|indirectly lost\)' | grep -v ': 0'
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cc .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits test/api/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnits test/api/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+test-blob$(EXEEXT): $(test_blob_OBJECTS) $(test_blob_DEPENDENCIES)
+ @rm -f test-blob$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_blob_OBJECTS) $(test_blob_LDADD) $(LIBS)
+test-buffer$(EXEEXT): $(test_buffer_OBJECTS) $(test_buffer_DEPENDENCIES)
+ @rm -f test-buffer$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_buffer_OBJECTS) $(test_buffer_LDADD) $(LIBS)
+test-c$(EXEEXT): $(test_c_OBJECTS) $(test_c_DEPENDENCIES)
+ @rm -f test-c$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_c_OBJECTS) $(test_c_LDADD) $(LIBS)
+test-common$(EXEEXT): $(test_common_OBJECTS) $(test_common_DEPENDENCIES)
+ @rm -f test-common$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_common_OBJECTS) $(test_common_LDADD) $(LIBS)
+test-cplusplus$(EXEEXT): $(test_cplusplus_OBJECTS) $(test_cplusplus_DEPENDENCIES)
+ @rm -f test-cplusplus$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(test_cplusplus_OBJECTS) $(test_cplusplus_LDADD) $(LIBS)
+test-font$(EXEEXT): $(test_font_OBJECTS) $(test_font_DEPENDENCIES)
+ @rm -f test-font$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_font_OBJECTS) $(test_font_LDADD) $(LIBS)
+test-object$(EXEEXT): $(test_object_OBJECTS) $(test_object_DEPENDENCIES)
+ @rm -f test-object$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_object_OBJECTS) $(test_object_LDADD) $(LIBS)
+test-ot-tag$(EXEEXT): $(test_ot_tag_OBJECTS) $(test_ot_tag_DEPENDENCIES)
+ @rm -f test-ot-tag$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_ot_tag_OBJECTS) $(test_ot_tag_LDADD) $(LIBS)
+test-shape$(EXEEXT): $(test_shape_OBJECTS) $(test_shape_DEPENDENCIES)
+ @rm -f test-shape$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_shape_OBJECTS) $(test_shape_LDADD) $(LIBS)
+test-unicode$(EXEEXT): $(test_unicode_OBJECTS) $(test_unicode_DEPENDENCIES)
+ @rm -f test-unicode$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_unicode_OBJECTS) $(test_unicode_LDADD) $(LIBS)
+test-version$(EXEEXT): $(test_version_OBJECTS) $(test_version_DEPENDENCIES)
+ @rm -f test-version$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_version_OBJECTS) $(test_version_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-blob.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-buffer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-common.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-font.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-object.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ot-tag.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-shape.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unicode.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-version.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_c-test-c.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_cplusplus-test-cplusplus.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+test_c-test-c.o: test-c.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_c-test-c.o -MD -MP -MF $(DEPDIR)/test_c-test-c.Tpo -c -o test_c-test-c.o `test -f 'test-c.c' || echo '$(srcdir)/'`test-c.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_c-test-c.Tpo $(DEPDIR)/test_c-test-c.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-c.c' object='test_c-test-c.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_c-test-c.o `test -f 'test-c.c' || echo '$(srcdir)/'`test-c.c
+
+test_c-test-c.obj: test-c.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_c-test-c.obj -MD -MP -MF $(DEPDIR)/test_c-test-c.Tpo -c -o test_c-test-c.obj `if test -f 'test-c.c'; then $(CYGPATH_W) 'test-c.c'; else $(CYGPATH_W) '$(srcdir)/test-c.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_c-test-c.Tpo $(DEPDIR)/test_c-test-c.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-c.c' object='test_c-test-c.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_c_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_c-test-c.obj `if test -f 'test-c.c'; then $(CYGPATH_W) 'test-c.c'; else $(CYGPATH_W) '$(srcdir)/test-c.c'; fi`
+
+.cc.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+test_cplusplus-test-cplusplus.o: test-cplusplus.cc
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_cplusplus_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test_cplusplus-test-cplusplus.o -MD -MP -MF $(DEPDIR)/test_cplusplus-test-cplusplus.Tpo -c -o test_cplusplus-test-cplusplus.o `test -f 'test-cplusplus.cc' || echo '$(srcdir)/'`test-cplusplus.cc
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_cplusplus-test-cplusplus.Tpo $(DEPDIR)/test_cplusplus-test-cplusplus.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test-cplusplus.cc' object='test_cplusplus-test-cplusplus.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_cplusplus_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test_cplusplus-test-cplusplus.o `test -f 'test-cplusplus.cc' || echo '$(srcdir)/'`test-cplusplus.cc
+
+test_cplusplus-test-cplusplus.obj: test-cplusplus.cc
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_cplusplus_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test_cplusplus-test-cplusplus.obj -MD -MP -MF $(DEPDIR)/test_cplusplus-test-cplusplus.Tpo -c -o test_cplusplus-test-cplusplus.obj `if test -f 'test-cplusplus.cc'; then $(CYGPATH_W) 'test-cplusplus.cc'; else $(CYGPATH_W) '$(srcdir)/test-cplusplus.cc'; fi`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_cplusplus-test-cplusplus.Tpo $(DEPDIR)/test_cplusplus-test-cplusplus.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test-cplusplus.cc' object='test_cplusplus-test-cplusplus.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_cplusplus_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test_cplusplus-test-cplusplus.obj `if test -f 'test-cplusplus.cc'; then $(CYGPATH_W) 'test-cplusplus.cc'; else $(CYGPATH_W) '$(srcdir)/test-cplusplus.cc'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ echo "$$grn$$dashes"; \
+ else \
+ echo "$$red$$dashes"; \
+ fi; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes$$std"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+ clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool \
+ clean-noinstPROGRAMS ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am
+
+
+# check-tool: Run tests under $(TOOL)
+@HAVE_GLIB_TRUE@check-tool:
+@HAVE_GLIB_TRUE@ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check \
+@HAVE_GLIB_TRUE@ TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) $(top_builddir)/libtool --mode=execute \
+@HAVE_GLIB_TRUE@ env $(TOOL)'
+# check-tool-raw: Run tests under $(TOOL), but don't run under libtool
+@HAVE_GLIB_TRUE@check-tool-raw:
+@HAVE_GLIB_TRUE@ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check \
+@HAVE_GLIB_TRUE@ TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) \
+@HAVE_GLIB_TRUE@ env $(TOOL)'
+@HAVE_GLIB_TRUE@check-gtester:
+@HAVE_GLIB_TRUE@ $(AM_V_at)$(MAKE) $(AM_MAKEFLGS) check-tool-raw TOOL="$(GTESTER) --verbose --keep-going"
+@HAVE_GLIB_TRUE@ $(EXTRA_VALGRIND_FLAGS)
+# TODO: The following check does not fail if valgrind finds error. It should.
+@HAVE_GLIB_TRUE@check-valgrind:
+@HAVE_GLIB_TRUE@ $(AM_V_at)$(MAKE) $(AM_MAKEFLGS) check-tool TOOL="valgrind $(VALGRIND_FLAGS)" \
+@HAVE_GLIB_TRUE@ 2>&1 | tee log-valgrind.txt $(valgrind_verbose)
+
+# check-symbols: Finds untested API symbols
+@HAVE_GLIB_TRUE@symbols-tested.txt: $(TEST_PROGS)
+@HAVE_GLIB_TRUE@ $(AM_V_GEN)$(top_builddir)/libtool --mode=execute nm $^ \
+@HAVE_GLIB_TRUE@ | grep ' U hb_' | sed 's/.* U hb_/hb_/' \
+@HAVE_GLIB_TRUE@ | sort | uniq > $@.tmp && mv $@.tmp $@
+@HAVE_GLIB_TRUE@symbols-exported.txt: $(top_builddir)/src/.libs/libharfbuzz.so
+@HAVE_GLIB_TRUE@ $(AM_V_GEN)$(top_builddir)/libtool --mode=execute nm $^ \
+@HAVE_GLIB_TRUE@ | grep ' T ' | sed 's/.* T //' | grep -v '^\(_init\|_fini\)$$' \
+@HAVE_GLIB_TRUE@ | sort | uniq > $@.tmp && mv $@.tmp $@
+@HAVE_GLIB_TRUE@symbols-untested.txt: symbols-tested.txt symbols-exported.txt
+@HAVE_GLIB_TRUE@ $(AM_V_GEN)diff $^ > $@.tmp; mv $@.tmp $@
+@HAVE_GLIB_TRUE@check-symbols: symbols-untested.txt
+@HAVE_GLIB_TRUE@ @! cat $^ | grep .
+
+@HAVE_GLIB_FALSE@check-am: err-glib
+@HAVE_GLIB_FALSE@err-glib:
+@HAVE_GLIB_FALSE@ @echo "You need to have glib support enabled to run the tests"
+@HAVE_GLIB_FALSE@ @exit 77
+
+.PHONY: check-symbols check-tool check-valgrind
+
+-include $(top_srcdir)/git.mk
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/test/api/hb-test.h b/test/api/hb-test.h
new file mode 100644
index 0000000..8655f41
--- /dev/null
+++ b/test/api/hb-test.h
@@ -0,0 +1,268 @@
+/*
+ * Copyright © 2011 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_TEST_H
+#define HB_TEST_H
+
+#include <config.h>
+
+#include <hb-glib.h>
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+HB_BEGIN_DECLS
+
+/* Just in case */
+#undef G_DISABLE_ASSERT
+
+
+/* Misc */
+
+/* This is too ugly to be public API, but quite handy. */
+#define HB_TAG_CHAR4(s) (HB_TAG(((const char *) s)[0], \
+ ((const char *) s)[1], \
+ ((const char *) s)[2], \
+ ((const char *) s)[3]))
+
+
+static inline const char *
+srcdir (void)
+{
+ static const char *s;
+
+ if (!s) {
+ s = getenv ("srcdir");
+
+#ifdef SRCDIR
+ if (!s || !s[0])
+ s = SRCDIR;
+#endif
+
+ if (!s || !s[0])
+ s = ".";
+ }
+
+ return s;
+}
+
+
+/* Helpers */
+
+static inline void
+hb_test_init (int *argc, char ***argv)
+{
+#if !GLIB_CHECK_VERSION(2,32,0)
+ g_thread_init (NULL);
+#endif
+ g_test_init (argc, argv, NULL);
+}
+
+static inline int
+hb_test_run (void)
+{
+ return g_test_run ();
+}
+
+
+/* Bugzilla helpers */
+
+static inline void
+hb_test_bug (const char *uri_base, unsigned int number)
+{
+ char *s = g_strdup_printf ("%u", number);
+
+ g_test_bug_base (uri_base);
+ g_test_bug (s);
+
+ g_free (s);
+}
+
+static inline void
+hb_test_bug_freedesktop (unsigned int number)
+{
+ hb_test_bug ("http://bugs.freedesktop.org/", number);
+}
+
+static inline void
+hb_test_bug_gnome (unsigned int number)
+{
+ hb_test_bug ("http://bugzilla.gnome.org/", number);
+}
+
+static inline void
+hb_test_bug_mozilla (unsigned int number)
+{
+ hb_test_bug ("http://bugzilla.mozilla.org/", number);
+}
+
+static inline void
+hb_test_bug_redhat (unsigned int number)
+{
+ hb_test_bug ("http://bugzilla.redhat.com/", number);
+}
+
+
+/* Wrap glib test functions to simplify. Should have been in glib already. */
+
+/* Drops the "test_" prefix and converts '_' to '/'.
+ * Essentially builds test path from function name. */
+static inline char *
+hb_test_normalize_path (const char *path)
+{
+ char *s, *p;
+
+ g_assert (0 == strncmp (path, "test_", 5));
+ path += 4;
+
+ s = g_strdup (path);
+ for (p = s; *p; p++)
+ if (*p == '_')
+ *p = '/';
+
+ return s;
+}
+
+
+#if GLIB_CHECK_VERSION(2,25,12)
+typedef GTestFunc hb_test_func_t;
+typedef GTestDataFunc hb_test_data_func_t;
+typedef GTestFixtureFunc hb_test_fixture_func_t;
+#else
+typedef void (*hb_test_func_t) (void);
+typedef void (*hb_test_data_func_t) (gconstpointer user_data);
+typedef void (*hb_test_fixture_func_t) (void);
+#endif
+
+#if !GLIB_CHECK_VERSION(2,30,0)
+#define g_test_fail() g_error("Test failed")
+#endif
+
+static inline void
+hb_test_add_func (const char *test_path,
+ hb_test_func_t test_func)
+{
+ char *normal_path = hb_test_normalize_path (test_path);
+ g_test_add_func (normal_path, test_func);
+ g_free (normal_path);
+}
+#define hb_test_add(Func) hb_test_add_func (#Func, Func)
+
+static inline void
+hb_test_add_func_flavor (const char *test_path,
+ const char *flavor,
+ hb_test_func_t test_func)
+{
+ char *path = g_strdup_printf ("%s/%s", test_path, flavor);
+ hb_test_add_func (path, test_func);
+ g_free (path);
+}
+#define hb_test_add_flavor(Flavor, Func) hb_test_add_func (#Func, Flavor, Func)
+
+static inline void
+hb_test_add_data_func (const char *test_path,
+ gconstpointer test_data,
+ hb_test_data_func_t test_func)
+{
+ char *normal_path = hb_test_normalize_path (test_path);
+ g_test_add_data_func (normal_path, test_data, test_func);
+ g_free (normal_path);
+}
+#define hb_test_add_data(UserData, Func) hb_test_add_data_func (#Func, UserData, Func)
+
+static inline void
+hb_test_add_data_func_flavor (const char *test_path,
+ const char *flavor,
+ gconstpointer test_data,
+ hb_test_data_func_t test_func)
+{
+ char *path = g_strdup_printf ("%s/%s", test_path, flavor);
+ hb_test_add_data_func (path, test_data, test_func);
+ g_free (path);
+}
+#define hb_test_add_data_flavor(UserData, Flavor, Func) hb_test_add_data_func_flavor (#Func, Flavor, UserData, Func)
+
+
+static inline void
+hb_test_add_vtable (const char *test_path,
+ gsize data_size,
+ gconstpointer test_data,
+ hb_test_fixture_func_t data_setup,
+ hb_test_fixture_func_t data_test,
+ hb_test_fixture_func_t data_teardown)
+{
+ char *normal_path = hb_test_normalize_path (test_path);
+ g_test_add_vtable (normal_path, data_size, test_data, data_setup, data_test, data_teardown);
+ g_free (normal_path);
+}
+#define hb_test_add_fixture(FixturePrefix, UserData, Func) \
+G_STMT_START { \
+ typedef G_PASTE (FixturePrefix, _t) Fixture; \
+ void (*add_vtable) (const char*, gsize, gconstpointer, \
+ void (*) (Fixture*, gconstpointer), \
+ void (*) (Fixture*, gconstpointer), \
+ void (*) (Fixture*, gconstpointer)) \
+ = (void (*) (const gchar *, gsize, gconstpointer, \
+ void (*) (Fixture*, gconstpointer), \
+ void (*) (Fixture*, gconstpointer), \
+ void (*) (Fixture*, gconstpointer))) hb_test_add_vtable; \
+ add_vtable (#Func, sizeof (G_PASTE (FixturePrefix, _t)), UserData, \
+ G_PASTE (FixturePrefix, _init), Func, G_PASTE (FixturePrefix, _finish)); \
+} G_STMT_END
+
+static inline void
+hb_test_add_vtable_flavor (const char *test_path,
+ const char *flavor,
+ gsize data_size,
+ gconstpointer test_data,
+ hb_test_fixture_func_t data_setup,
+ hb_test_fixture_func_t data_test,
+ hb_test_fixture_func_t data_teardown)
+{
+ char *path = g_strdup_printf ("%s/%s", test_path, flavor);
+ hb_test_add_vtable (path, data_size, test_data, data_setup, data_test, data_teardown);
+ g_free (path);
+}
+#define hb_test_add_fixture_flavor(FixturePrefix, UserData, Flavor, Func) \
+G_STMT_START { \
+ typedef G_PASTE (FixturePrefix, _t) Fixture; \
+ void (*add_vtable) (const char*, const char *, gsize, gconstpointer, \
+ void (*) (Fixture*, gconstpointer), \
+ void (*) (Fixture*, gconstpointer), \
+ void (*) (Fixture*, gconstpointer)) \
+ = (void (*) (const gchar *, const char *, gsize, gconstpointer, \
+ void (*) (Fixture*, gconstpointer), \
+ void (*) (Fixture*, gconstpointer), \
+ void (*) (Fixture*, gconstpointer))) hb_test_add_vtable_flavor; \
+ add_vtable (#Func, Flavor, sizeof (G_PASTE (FixturePrefix, _t)), UserData, \
+ G_PASTE (FixturePrefix, _init), Func, G_PASTE (FixturePrefix, _finish)); \
+} G_STMT_END
+
+
+HB_END_DECLS
+
+#endif /* HB_TEST_H */
diff --git a/test/api/test-blob.c b/test/api/test-blob.c
new file mode 100644
index 0000000..0e65e2f
--- /dev/null
+++ b/test/api/test-blob.c
@@ -0,0 +1,301 @@
+/*
+ * Copyright © 2011 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-test.h"
+
+/* Unit tests for hb-blob.h */
+
+#if defined(HAVE_SYS_MMAN_H) && defined(HAVE_MPROTECT) && defined(HAVE_MMAP)
+
+# define TEST_MMAP 1
+
+#ifdef HAVE_SYS_MMAN_H
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#include <sys/mman.h>
+#endif /* HAVE_SYS_MMAN_H */
+
+#endif
+
+
+static void
+test_blob_empty (void)
+{
+ hb_blob_t *blob;
+ unsigned int len;
+ const char *data;
+ char *data_writable;
+
+ g_assert (hb_blob_is_immutable (hb_blob_get_empty ()));
+ g_assert (hb_blob_get_empty () != NULL);
+ g_assert (hb_blob_get_empty () == hb_blob_create (NULL, 0, HB_MEMORY_MODE_READONLY, NULL, NULL));
+
+ blob = hb_blob_get_empty ();
+ g_assert (blob == hb_blob_get_empty ());
+
+ len = hb_blob_get_length (blob);
+ g_assert_cmpint (len, ==, 0);
+
+ data = hb_blob_get_data (blob, NULL);
+ g_assert (data == NULL);
+
+ data = hb_blob_get_data (blob, &len);
+ g_assert (data == NULL);
+ g_assert_cmpint (len, ==, 0);
+
+ data_writable = hb_blob_get_data_writable (blob, NULL);
+ g_assert (data_writable == NULL);
+
+ data_writable = hb_blob_get_data_writable (blob, &len);
+ g_assert (data_writable == NULL);
+ g_assert_cmpint (len, ==, 0);
+}
+
+static const char test_data[] = "test\0data";
+
+static const char *blob_names[] = {
+ "duplicate",
+ "readonly",
+ "writable"
+#ifdef TEST_MMAP
+ , "readonly-may-make-writable"
+#endif
+};
+
+typedef struct
+{
+ hb_blob_t *blob;
+ int freed;
+ char *data;
+ unsigned int len;
+} fixture_t;
+
+static void
+free_up (fixture_t *fixture)
+{
+ g_assert_cmpint (fixture->freed, ==, 0);
+ fixture->freed++;
+}
+
+static void
+free_up_free (fixture_t *fixture)
+{
+ free_up (fixture);
+ free (fixture->data);
+}
+
+
+#ifdef TEST_MMAP
+static uintptr_t
+get_pagesize (void)
+{
+ uintptr_t pagesize = -1;
+
+#if defined(HAVE_SYSCONF) && defined(_SC_PAGE_SIZE)
+ pagesize = (uintptr_t) sysconf (_SC_PAGE_SIZE);
+#elif defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE)
+ pagesize = (uintptr_t) sysconf (_SC_PAGESIZE);
+#elif defined(HAVE_GETPAGESIZE)
+ pagesize = (uintptr_t) getpagesize ();
+#endif
+
+ g_assert (pagesize != (uintptr_t) -1);
+
+ return pagesize;
+}
+
+static void
+free_up_munmap (fixture_t *fixture)
+{
+ free_up (fixture);
+ munmap (fixture->data, get_pagesize ());
+}
+#endif
+
+#include <errno.h>
+static void
+fixture_init (fixture_t *fixture, gconstpointer user_data)
+{
+ hb_memory_mode_t mm = (hb_memory_mode_t) GPOINTER_TO_INT (user_data);
+ unsigned int len;
+ const char *data;
+ hb_destroy_func_t free_func;
+
+ switch (GPOINTER_TO_INT (user_data))
+ {
+ case HB_MEMORY_MODE_DUPLICATE:
+ data = test_data;
+ len = sizeof (test_data);
+ free_func = (hb_destroy_func_t) free_up;
+ break;
+
+ case HB_MEMORY_MODE_READONLY:
+ data = test_data;
+ len = sizeof (test_data);
+ free_func = (hb_destroy_func_t) free_up;
+ break;
+
+ case HB_MEMORY_MODE_WRITABLE:
+ data = malloc (sizeof (test_data));
+ memcpy ((char *) data, test_data, sizeof (test_data));
+ len = sizeof (test_data);
+ free_func = (hb_destroy_func_t) free_up_free;
+ break;
+
+#ifdef TEST_MMAP
+ case HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE:
+ {
+ uintptr_t pagesize = get_pagesize ();
+
+ data = mmap (NULL, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
+ g_assert (data != (char *) -1);
+ memcpy ((char *) data, test_data, sizeof (test_data));
+ mprotect ((char *) data, pagesize, PROT_READ);
+ len = sizeof (test_data);
+ free_func = (hb_destroy_func_t) free_up_munmap;
+ break;
+ }
+#endif
+
+ default:
+ g_assert_not_reached ();
+ }
+
+ fixture->freed = 0;
+ fixture->data = (char *) data;
+ fixture->len = len;
+ fixture->blob = hb_blob_create (data, len, mm, fixture, free_func);
+}
+
+static void
+fixture_finish (fixture_t *fixture, gconstpointer user_data)
+{
+ hb_blob_destroy (fixture->blob);
+ g_assert_cmpint (fixture->freed, ==, 1);
+}
+
+
+static void
+test_blob (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;
+
+ g_assert (b);
+
+ len = hb_blob_get_length (b);
+ g_assert_cmpint (len, ==, fixture->len);
+
+ data = hb_blob_get_data (b, &len);
+ g_assert_cmpint (len, ==, fixture->len);
+ if (mm == HB_MEMORY_MODE_DUPLICATE) {
+ g_assert (data != fixture->data);
+ g_assert_cmpint (fixture->freed, ==, 1);
+ mm = HB_MEMORY_MODE_WRITABLE;
+ } else {
+ g_assert (data == fixture->data);
+ g_assert_cmpint (fixture->freed, ==, 0);
+ }
+
+ data_writable = hb_blob_get_data_writable (b, &len);
+ g_assert_cmpint (len, ==, fixture->len);
+ g_assert (data_writable);
+ g_assert (0 == memcmp (data_writable, fixture->data, fixture->len));
+ if (mm == HB_MEMORY_MODE_READONLY) {
+ g_assert (data_writable != data);
+ g_assert_cmpint (fixture->freed, ==, 1);
+ } else {
+ g_assert (data_writable == data);
+ }
+
+ data = hb_blob_get_data (b, &len);
+ g_assert_cmpint (len, ==, fixture->len);
+ g_assert (data == data_writable);
+
+ memset (data_writable, 0, fixture->len);
+
+ /* 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));
+
+ data_writable = hb_blob_get_data_writable (b, &len);
+ g_assert (!data_writable);
+ g_assert_cmpint (len, ==, 0);
+
+ data = hb_blob_get_data (b, &len);
+ g_assert_cmpint (len, ==, fixture->len);
+ for (i = 0; i < len; i++)
+ g_assert ('\0' == data[i]);
+}
+
+static void
+test_blob_subblob (fixture_t *fixture, gconstpointer user_data)
+{
+ hb_blob_t *b = fixture->blob;
+
+ fixture->len -= 2;
+ fixture->data++;
+ fixture->blob = hb_blob_create_sub_blob (b, 1, fixture->len);
+ hb_blob_destroy (b);
+
+ test_blob (fixture, user_data);
+
+ fixture->data--;
+ fixture->len += 2;
+}
+
+
+int
+main (int argc, char **argv)
+{
+ unsigned int i;
+
+ hb_test_init (&argc, &argv);
+
+ hb_test_add (test_blob_empty);
+
+ for (i = 0; i < G_N_ELEMENTS (blob_names); i++)
+ {
+ const void *blob_type = GINT_TO_POINTER (i);
+ const char *blob_name = blob_names[i];
+
+ hb_test_add_fixture_flavor (fixture, blob_type, blob_name, test_blob);
+ hb_test_add_fixture_flavor (fixture, blob_type, blob_name, test_blob_subblob);
+ }
+
+ /*
+ * create_sub_blob
+ */
+
+ return hb_test_run ();
+}
diff --git a/test/api/test-buffer.c b/test/api/test-buffer.c
new file mode 100644
index 0000000..1ddc3d8
--- /dev/null
+++ b/test/api/test-buffer.c
@@ -0,0 +1,783 @@
+/*
+ * Copyright © 2011 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-test.h"
+
+/* Unit tests for hb-buffer.h */
+
+
+static const char utf8[10] = "ab\360\240\200\200defg";
+static const uint16_t utf16[8] = {'a', 'b', 0xD840, 0xDC00, 'd', 'e', 'f', 'g'};
+static const uint32_t utf32[7] = {'a', 'b', 0x20000, 'd', 'e', 'f', 'g'};
+
+
+typedef enum {
+ BUFFER_EMPTY,
+ BUFFER_ONE_BY_ONE,
+ BUFFER_UTF32,
+ BUFFER_UTF16,
+ BUFFER_UTF8,
+ BUFFER_NUM_TYPES,
+} buffer_type_t;
+
+static const char *buffer_names[] = {
+ "empty",
+ "one-by-one",
+ "utf32",
+ "utf16",
+ "utf8"
+};
+
+typedef struct
+{
+ hb_buffer_t *buffer;
+} fixture_t;
+
+static void
+fixture_init (fixture_t *fixture, gconstpointer user_data)
+{
+ hb_buffer_t *b;
+ unsigned int i;
+
+ b = fixture->buffer = hb_buffer_create ();
+
+ switch (GPOINTER_TO_INT (user_data))
+ {
+ case BUFFER_EMPTY:
+ break;
+
+ case BUFFER_ONE_BY_ONE:
+ for (i = 1; i < G_N_ELEMENTS (utf32) - 1; i++)
+ hb_buffer_add (b, utf32[i], 1, i);
+ break;
+
+ case BUFFER_UTF32:
+ hb_buffer_add_utf32 (b, utf32, G_N_ELEMENTS (utf32), 1, G_N_ELEMENTS (utf32) - 2);
+ break;
+
+ case BUFFER_UTF16:
+ hb_buffer_add_utf16 (b, utf16, G_N_ELEMENTS (utf16), 1, G_N_ELEMENTS (utf16) - 2);
+ break;
+
+ case BUFFER_UTF8:
+ hb_buffer_add_utf8 (b, utf8, G_N_ELEMENTS (utf8), 1, G_N_ELEMENTS (utf8) - 2);
+ break;
+
+ default:
+ g_assert_not_reached ();
+ }
+}
+
+static void
+fixture_finish (fixture_t *fixture, gconstpointer user_data)
+{
+ hb_buffer_destroy (fixture->buffer);
+}
+
+
+static void
+test_buffer_properties (fixture_t *fixture, gconstpointer user_data)
+{
+ hb_buffer_t *b = fixture->buffer;
+ hb_unicode_funcs_t *ufuncs;
+
+ /* test default properties */
+
+ g_assert (hb_buffer_get_unicode_funcs (b) == hb_unicode_funcs_get_default ());
+ g_assert (hb_buffer_get_direction (b) == HB_DIRECTION_INVALID);
+ g_assert (hb_buffer_get_script (b) == HB_SCRIPT_INVALID);
+ g_assert (hb_buffer_get_language (b) == NULL);
+
+
+ /* test property changes are retained */
+ ufuncs = hb_unicode_funcs_create (NULL);
+ hb_buffer_set_unicode_funcs (b, ufuncs);
+ hb_unicode_funcs_destroy (ufuncs);
+ g_assert (hb_buffer_get_unicode_funcs (b) == ufuncs);
+
+ hb_buffer_set_direction (b, HB_DIRECTION_RTL);
+ g_assert (hb_buffer_get_direction (b) == HB_DIRECTION_RTL);
+
+ hb_buffer_set_script (b, HB_SCRIPT_ARABIC);
+ g_assert (hb_buffer_get_script (b) == HB_SCRIPT_ARABIC);
+
+ hb_buffer_set_language (b, hb_language_from_string ("fa", -1));
+ g_assert (hb_buffer_get_language (b) == hb_language_from_string ("Fa", -1));
+
+
+ /* test reset clears properties */
+
+ hb_buffer_reset (b);
+
+ g_assert (hb_buffer_get_unicode_funcs (b) == hb_unicode_funcs_get_default ());
+ g_assert (hb_buffer_get_direction (b) == HB_DIRECTION_INVALID);
+ g_assert (hb_buffer_get_script (b) == HB_SCRIPT_INVALID);
+ g_assert (hb_buffer_get_language (b) == NULL);
+}
+
+static void
+test_buffer_contents (fixture_t *fixture, gconstpointer user_data)
+{
+ hb_buffer_t *b = fixture->buffer;
+ unsigned int i, len, len2;
+ buffer_type_t buffer_type = GPOINTER_TO_INT (user_data);
+ hb_glyph_info_t *glyphs;
+
+ if (buffer_type == BUFFER_EMPTY) {
+ g_assert_cmpint (hb_buffer_get_length (b), ==, 0);
+ return;
+ }
+
+ len = hb_buffer_get_length (b);
+ hb_buffer_get_glyph_infos (b, NULL); /* test NULL */
+ glyphs = hb_buffer_get_glyph_infos (b, &len2);
+ g_assert_cmpint (len, ==, len2);
+ g_assert_cmpint (len, ==, 5);
+
+ for (i = 0; i < len; i++) {
+ g_assert_cmphex (glyphs[i].mask, ==, 1);
+ g_assert_cmphex (glyphs[i].var1.u32, ==, 0);
+ g_assert_cmphex (glyphs[i].var2.u32, ==, 0);
+ }
+
+ for (i = 0; i < len; i++) {
+ unsigned int cluster;
+ cluster = 1+i;
+ if (i >= 2) {
+ if (buffer_type == BUFFER_UTF16)
+ cluster++;
+ else if (buffer_type == BUFFER_UTF8)
+ cluster += 3;
+ }
+ g_assert_cmphex (glyphs[i].codepoint, ==, utf32[1+i]);
+ g_assert_cmphex (glyphs[i].cluster, ==, cluster);
+ }
+
+ /* reverse, test, and reverse back */
+
+ hb_buffer_reverse (b);
+ for (i = 0; i < len; i++)
+ g_assert_cmphex (glyphs[i].codepoint, ==, utf32[len-i]);
+
+ hb_buffer_reverse (b);
+ for (i = 0; i < len; i++)
+ g_assert_cmphex (glyphs[i].codepoint, ==, utf32[1+i]);
+
+ /* reverse_clusters works same as reverse for now since each codepoint is
+ * in its own cluster */
+
+ hb_buffer_reverse_clusters (b);
+ for (i = 0; i < len; i++)
+ g_assert_cmphex (glyphs[i].codepoint, ==, utf32[len-i]);
+
+ hb_buffer_reverse_clusters (b);
+ for (i = 0; i < len; i++)
+ g_assert_cmphex (glyphs[i].codepoint, ==, utf32[1+i]);
+
+ /* now form a cluster and test again */
+ glyphs[2].cluster = glyphs[1].cluster;
+
+ /* reverse, test, and reverse back */
+
+ hb_buffer_reverse (b);
+ for (i = 0; i < len; i++)
+ g_assert_cmphex (glyphs[i].codepoint, ==, utf32[len-i]);
+
+ hb_buffer_reverse (b);
+ for (i = 0; i < len; i++)
+ g_assert_cmphex (glyphs[i].codepoint, ==, utf32[1+i]);
+
+ /* reverse_clusters twice still should return the original string,
+ * but when applied once, the 1-2 cluster should be retained. */
+
+ hb_buffer_reverse_clusters (b);
+ for (i = 0; i < len; i++) {
+ unsigned int j = len-1-i;
+ if (j == 1)
+ j = 2;
+ else if (j == 2)
+ j = 1;
+ g_assert_cmphex (glyphs[i].codepoint, ==, utf32[1+j]);
+ }
+
+ hb_buffer_reverse_clusters (b);
+ for (i = 0; i < len; i++)
+ g_assert_cmphex (glyphs[i].codepoint, ==, utf32[1+i]);
+
+
+ /* test setting length */
+
+ /* enlarge */
+ g_assert (hb_buffer_set_length (b, 10));
+ glyphs = hb_buffer_get_glyph_infos (b, NULL);
+ g_assert_cmpint (hb_buffer_get_length (b), ==, 10);
+ for (i = 0; i < 5; i++)
+ g_assert_cmphex (glyphs[i].codepoint, ==, utf32[1+i]);
+ for (i = 5; i < 10; i++)
+ g_assert_cmphex (glyphs[i].codepoint, ==, 0);
+ /* shrink */
+ g_assert (hb_buffer_set_length (b, 3));
+ glyphs = hb_buffer_get_glyph_infos (b, NULL);
+ g_assert_cmpint (hb_buffer_get_length (b), ==, 3);
+ for (i = 0; i < 3; i++)
+ g_assert_cmphex (glyphs[i].codepoint, ==, utf32[1+i]);
+
+
+ g_assert (hb_buffer_allocation_successful (b));
+
+
+ /* test reset clears content */
+
+ hb_buffer_reset (b);
+ g_assert_cmpint (hb_buffer_get_length (b), ==, 0);
+}
+
+static void
+test_buffer_positions (fixture_t *fixture, gconstpointer user_data)
+{
+ hb_buffer_t *b = fixture->buffer;
+ unsigned int i, len, len2;
+ hb_glyph_position_t *positions;
+
+ /* Without shaping, positions should all be zero */
+ len = hb_buffer_get_length (b);
+ hb_buffer_get_glyph_positions (b, NULL); /* test NULL */
+ positions = hb_buffer_get_glyph_positions (b, &len2);
+ g_assert_cmpint (len, ==, len2);
+ for (i = 0; i < len; i++) {
+ g_assert_cmpint (0, ==, positions[i].x_advance);
+ g_assert_cmpint (0, ==, positions[i].y_advance);
+ g_assert_cmpint (0, ==, positions[i].x_offset);
+ g_assert_cmpint (0, ==, positions[i].y_offset);
+ g_assert_cmpint (0, ==, positions[i].var.i32);
+ }
+
+ /* test reset clears content */
+ hb_buffer_reset (b);
+ g_assert_cmpint (hb_buffer_get_length (b), ==, 0);
+}
+
+static void
+test_buffer_allocation (fixture_t *fixture, gconstpointer user_data)
+{
+ hb_buffer_t *b = fixture->buffer;
+
+ g_assert_cmpint (hb_buffer_get_length (b), ==, 0);
+
+ g_assert (hb_buffer_pre_allocate (b, 100));
+ g_assert_cmpint (hb_buffer_get_length (b), ==, 0);
+ g_assert (hb_buffer_allocation_successful (b));
+
+ /* lets try a huge allocation, make sure it fails */
+ g_assert (!hb_buffer_pre_allocate (b, (unsigned int) -1));
+ g_assert_cmpint (hb_buffer_get_length (b), ==, 0);
+ g_assert (!hb_buffer_allocation_successful (b));
+
+ /* small one again */
+ g_assert (hb_buffer_pre_allocate (b, 50));
+ g_assert_cmpint (hb_buffer_get_length (b), ==, 0);
+ g_assert (!hb_buffer_allocation_successful (b));
+
+ hb_buffer_reset (b);
+ g_assert (hb_buffer_allocation_successful (b));
+
+ /* all allocation and size */
+ g_assert (!hb_buffer_pre_allocate (b, ((unsigned int) -1) / 20 + 1));
+ g_assert (!hb_buffer_allocation_successful (b));
+
+ hb_buffer_reset (b);
+ g_assert (hb_buffer_allocation_successful (b));
+
+ /* technically, this one can actually pass on 64bit machines, but
+ * I'm doubtful that any malloc allows 4GB allocations at a time.
+ * But let's only enable it on a 32-bit machine. */
+ if (sizeof (long) == 4) {
+ g_assert (!hb_buffer_pre_allocate (b, ((unsigned int) -1) / 20 - 1));
+ g_assert (!hb_buffer_allocation_successful (b));
+ }
+
+ hb_buffer_reset (b);
+ g_assert (hb_buffer_allocation_successful (b));
+}
+
+
+typedef struct {
+ const char utf8[8];
+ const uint32_t codepoints[8];
+} utf8_conversion_test_t;
+
+/* note: we skip the first and last byte when adding to buffer */
+static const utf8_conversion_test_t utf8_conversion_tests[] = {
+ {"a\303\207", {-1}},
+ {"a\303\207b", {0xC7}},
+ {"ab\303cd", {'b', -1, 'c'}},
+ {"ab\303\302\301cd", {'b', -1, -1, -1, 'c'}}
+};
+
+static void
+test_buffer_utf8_conversion (void)
+{
+ hb_buffer_t *b;
+ hb_glyph_info_t *glyphs;
+ unsigned int bytes, chars, i, j, len;
+
+ b = hb_buffer_create ();
+
+ for (i = 0; i < G_N_ELEMENTS (utf8_conversion_tests); i++)
+ {
+ const utf8_conversion_test_t *test = &utf8_conversion_tests[i];
+ char *escaped;
+
+ escaped = g_strescape (test->utf8, NULL);
+ g_test_message ("UTF-8 test #%d: %s", i, escaped);
+ g_free (escaped);
+
+ bytes = strlen (test->utf8);
+ for (chars = 0; test->codepoints[chars]; chars++)
+ ;
+
+ hb_buffer_reset (b);
+ hb_buffer_add_utf8 (b, test->utf8, bytes, 1, bytes - 2);
+
+ glyphs = hb_buffer_get_glyph_infos (b, &len);
+ g_assert_cmpint (len, ==, chars);
+ for (j = 0; j < chars; j++)
+ g_assert_cmphex (glyphs[j].codepoint, ==, test->codepoints[j]);
+ }
+
+ hb_buffer_destroy (b);
+}
+
+
+
+/* Following test table is adapted from glib/glib/tests/utf8-validate.c
+ * with relicensing permission from Matthias Clasen. */
+
+typedef struct {
+ const char *utf8;
+ int max_len;
+ unsigned int offset;
+ gboolean valid;
+} utf8_validity_test_t;
+
+static const utf8_validity_test_t utf8_validity_tests[] = {
+ /* some tests to check max_len handling */
+ /* length 1 */
+ { "abcde", -1, 5, TRUE },
+ { "abcde", 3, 3, TRUE },
+ { "abcde", 5, 5, TRUE },
+ /* length 2 */
+ { "\xc2\xa9\xc2\xa9\xc2\xa9", -1, 6, TRUE },
+ { "\xc2\xa9\xc2\xa9\xc2\xa9", 1, 0, FALSE },
+ { "\xc2\xa9\xc2\xa9\xc2\xa9", 2, 2, TRUE },
+ { "\xc2\xa9\xc2\xa9\xc2\xa9", 3, 2, FALSE },
+ { "\xc2\xa9\xc2\xa9\xc2\xa9", 4, 4, TRUE },
+ { "\xc2\xa9\xc2\xa9\xc2\xa9", 5, 4, FALSE },
+ { "\xc2\xa9\xc2\xa9\xc2\xa9", 6, 6, TRUE },
+ /* length 3 */
+ { "\xe2\x89\xa0\xe2\x89\xa0", -1, 6, TRUE },
+ { "\xe2\x89\xa0\xe2\x89\xa0", 1, 0, FALSE },
+ { "\xe2\x89\xa0\xe2\x89\xa0", 2, 0, FALSE },
+ { "\xe2\x89\xa0\xe2\x89\xa0", 3, 3, TRUE },
+ { "\xe2\x89\xa0\xe2\x89\xa0", 4, 3, FALSE },
+ { "\xe2\x89\xa0\xe2\x89\xa0", 5, 3, FALSE },
+ { "\xe2\x89\xa0\xe2\x89\xa0", 6, 6, TRUE },
+
+ /* examples from http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt */
+ /* greek 'kosme' */
+ { "\xce\xba\xe1\xbd\xb9\xcf\x83\xce\xbc\xce\xb5", -1, 11, TRUE },
+ /* first sequence of each length */
+ { "\x00", -1, 0, TRUE },
+ { "\xc2\x80", -1, 2, TRUE },
+ { "\xe0\xa0\x80", -1, 3, TRUE },
+ { "\xf0\x90\x80\x80", -1, 4, TRUE },
+ { "\xf8\x88\x80\x80\x80", -1, 0, FALSE },
+ { "\xfc\x84\x80\x80\x80\x80", -1, 0, FALSE },
+ /* last sequence of each length */
+ { "\x7f", -1, 1, TRUE },
+ { "\xdf\xbf", -1, 2, TRUE },
+ { "\xef\xbf\xbf", -1, 0, TRUE },
+ { "\xf7\xbf\xbf\xbf", -1, 0, TRUE },
+ { "\xfb\xbf\xbf\xbf\xbf", -1, 0, FALSE },
+ { "\xfd\xbf\xbf\xbf\xbf\xbf", -1, 0, FALSE },
+ /* other boundary conditions */
+ { "\xed\x9f\xbf", -1, 3, TRUE },
+ { "\xee\x80\x80", -1, 3, TRUE },
+ { "\xef\xbf\xbd", -1, 3, TRUE },
+ { "\xf4\x8f\xbf\xbf", -1, 0, TRUE },
+ /* malformed sequences */
+ /* continuation bytes */
+ { "\x80", -1, 0, FALSE },
+ { "\xbf", -1, 0, FALSE },
+ { "\x80\xbf", -1, 0, FALSE },
+ { "\x80\xbf\x80", -1, 0, FALSE },
+ { "\x80\xbf\x80\xbf", -1, 0, FALSE },
+ { "\x80\xbf\x80\xbf\x80", -1, 0, FALSE },
+ { "\x80\xbf\x80\xbf\x80\xbf", -1, 0, FALSE },
+ { "\x80\xbf\x80\xbf\x80\xbf\x80", -1, 0, FALSE },
+
+ /* all possible continuation byte */
+ { "\x80", -1, 0, FALSE },
+ { "\x81", -1, 0, FALSE },
+ { "\x82", -1, 0, FALSE },
+ { "\x83", -1, 0, FALSE },
+ { "\x84", -1, 0, FALSE },
+ { "\x85", -1, 0, FALSE },
+ { "\x86", -1, 0, FALSE },
+ { "\x87", -1, 0, FALSE },
+ { "\x88", -1, 0, FALSE },
+ { "\x89", -1, 0, FALSE },
+ { "\x8a", -1, 0, FALSE },
+ { "\x8b", -1, 0, FALSE },
+ { "\x8c", -1, 0, FALSE },
+ { "\x8d", -1, 0, FALSE },
+ { "\x8e", -1, 0, FALSE },
+ { "\x8f", -1, 0, FALSE },
+ { "\x90", -1, 0, FALSE },
+ { "\x91", -1, 0, FALSE },
+ { "\x92", -1, 0, FALSE },
+ { "\x93", -1, 0, FALSE },
+ { "\x94", -1, 0, FALSE },
+ { "\x95", -1, 0, FALSE },
+ { "\x96", -1, 0, FALSE },
+ { "\x97", -1, 0, FALSE },
+ { "\x98", -1, 0, FALSE },
+ { "\x99", -1, 0, FALSE },
+ { "\x9a", -1, 0, FALSE },
+ { "\x9b", -1, 0, FALSE },
+ { "\x9c", -1, 0, FALSE },
+ { "\x9d", -1, 0, FALSE },
+ { "\x9e", -1, 0, FALSE },
+ { "\x9f", -1, 0, FALSE },
+ { "\xa0", -1, 0, FALSE },
+ { "\xa1", -1, 0, FALSE },
+ { "\xa2", -1, 0, FALSE },
+ { "\xa3", -1, 0, FALSE },
+ { "\xa4", -1, 0, FALSE },
+ { "\xa5", -1, 0, FALSE },
+ { "\xa6", -1, 0, FALSE },
+ { "\xa7", -1, 0, FALSE },
+ { "\xa8", -1, 0, FALSE },
+ { "\xa9", -1, 0, FALSE },
+ { "\xaa", -1, 0, FALSE },
+ { "\xab", -1, 0, FALSE },
+ { "\xac", -1, 0, FALSE },
+ { "\xad", -1, 0, FALSE },
+ { "\xae", -1, 0, FALSE },
+ { "\xaf", -1, 0, FALSE },
+ { "\xb0", -1, 0, FALSE },
+ { "\xb1", -1, 0, FALSE },
+ { "\xb2", -1, 0, FALSE },
+ { "\xb3", -1, 0, FALSE },
+ { "\xb4", -1, 0, FALSE },
+ { "\xb5", -1, 0, FALSE },
+ { "\xb6", -1, 0, FALSE },
+ { "\xb7", -1, 0, FALSE },
+ { "\xb8", -1, 0, FALSE },
+ { "\xb9", -1, 0, FALSE },
+ { "\xba", -1, 0, FALSE },
+ { "\xbb", -1, 0, FALSE },
+ { "\xbc", -1, 0, FALSE },
+ { "\xbd", -1, 0, FALSE },
+ { "\xbe", -1, 0, FALSE },
+ { "\xbf", -1, 0, FALSE },
+ /* lone start characters */
+ { "\xc0\x20", -1, 0, FALSE },
+ { "\xc1\x20", -1, 0, FALSE },
+ { "\xc2\x20", -1, 0, FALSE },
+ { "\xc3\x20", -1, 0, FALSE },
+ { "\xc4\x20", -1, 0, FALSE },
+ { "\xc5\x20", -1, 0, FALSE },
+ { "\xc6\x20", -1, 0, FALSE },
+ { "\xc7\x20", -1, 0, FALSE },
+ { "\xc8\x20", -1, 0, FALSE },
+ { "\xc9\x20", -1, 0, FALSE },
+ { "\xca\x20", -1, 0, FALSE },
+ { "\xcb\x20", -1, 0, FALSE },
+ { "\xcc\x20", -1, 0, FALSE },
+ { "\xcd\x20", -1, 0, FALSE },
+ { "\xce\x20", -1, 0, FALSE },
+ { "\xcf\x20", -1, 0, FALSE },
+ { "\xd0\x20", -1, 0, FALSE },
+ { "\xd1\x20", -1, 0, FALSE },
+ { "\xd2\x20", -1, 0, FALSE },
+ { "\xd3\x20", -1, 0, FALSE },
+ { "\xd4\x20", -1, 0, FALSE },
+ { "\xd5\x20", -1, 0, FALSE },
+ { "\xd6\x20", -1, 0, FALSE },
+ { "\xd7\x20", -1, 0, FALSE },
+ { "\xd8\x20", -1, 0, FALSE },
+ { "\xd9\x20", -1, 0, FALSE },
+ { "\xda\x20", -1, 0, FALSE },
+ { "\xdb\x20", -1, 0, FALSE },
+ { "\xdc\x20", -1, 0, FALSE },
+ { "\xdd\x20", -1, 0, FALSE },
+ { "\xde\x20", -1, 0, FALSE },
+ { "\xdf\x20", -1, 0, FALSE },
+ { "\xe0\x20", -1, 0, FALSE },
+ { "\xe1\x20", -1, 0, FALSE },
+ { "\xe2\x20", -1, 0, FALSE },
+ { "\xe3\x20", -1, 0, FALSE },
+ { "\xe4\x20", -1, 0, FALSE },
+ { "\xe5\x20", -1, 0, FALSE },
+ { "\xe6\x20", -1, 0, FALSE },
+ { "\xe7\x20", -1, 0, FALSE },
+ { "\xe8\x20", -1, 0, FALSE },
+ { "\xe9\x20", -1, 0, FALSE },
+ { "\xea\x20", -1, 0, FALSE },
+ { "\xeb\x20", -1, 0, FALSE },
+ { "\xec\x20", -1, 0, FALSE },
+ { "\xed\x20", -1, 0, FALSE },
+ { "\xee\x20", -1, 0, FALSE },
+ { "\xef\x20", -1, 0, FALSE },
+ { "\xf0\x20", -1, 0, FALSE },
+ { "\xf1\x20", -1, 0, FALSE },
+ { "\xf2\x20", -1, 0, FALSE },
+ { "\xf3\x20", -1, 0, FALSE },
+ { "\xf4\x20", -1, 0, FALSE },
+ { "\xf5\x20", -1, 0, FALSE },
+ { "\xf6\x20", -1, 0, FALSE },
+ { "\xf7\x20", -1, 0, FALSE },
+ { "\xf8\x20", -1, 0, FALSE },
+ { "\xf9\x20", -1, 0, FALSE },
+ { "\xfa\x20", -1, 0, FALSE },
+ { "\xfb\x20", -1, 0, FALSE },
+ { "\xfc\x20", -1, 0, FALSE },
+ { "\xfd\x20", -1, 0, FALSE },
+ /* missing continuation bytes */
+ { "\x20\xc0", -1, 1, FALSE },
+ { "\x20\xe0\x80", -1, 1, FALSE },
+ { "\x20\xf0\x80\x80", -1, 1, FALSE },
+ { "\x20\xf8\x80\x80\x80", -1, 1, FALSE },
+ { "\x20\xfc\x80\x80\x80\x80", -1, 1, FALSE },
+ { "\x20\xdf", -1, 1, FALSE },
+ { "\x20\xef\xbf", -1, 1, FALSE },
+ { "\x20\xf7\xbf\xbf", -1, 1, FALSE },
+ { "\x20\xfb\xbf\xbf\xbf", -1, 1, FALSE },
+ { "\x20\xfd\xbf\xbf\xbf\xbf", -1, 1, FALSE },
+ /* impossible bytes */
+ { "\x20\xfe\x20", -1, 1, FALSE },
+ { "\x20\xff\x20", -1, 1, FALSE },
+#if 0
+ /* XXX fix these, or document that we don't detect them? */
+ /* overlong sequences */
+ { "\x20\xc0\xaf\x20", -1, 1, FALSE },
+ { "\x20\xe0\x80\xaf\x20", -1, 1, FALSE },
+ { "\x20\xf0\x80\x80\xaf\x20", -1, 1, FALSE },
+ { "\x20\xf8\x80\x80\x80\xaf\x20", -1, 1, FALSE },
+ { "\x20\xfc\x80\x80\x80\x80\xaf\x20", -1, 1, FALSE },
+ { "\x20\xc1\xbf\x20", -1, 1, FALSE },
+ { "\x20\xe0\x9f\xbf\x20", -1, 1, FALSE },
+ { "\x20\xf0\x8f\xbf\xbf\x20", -1, 1, FALSE },
+ { "\x20\xf8\x87\xbf\xbf\xbf\x20", -1, 1, FALSE },
+ { "\x20\xfc\x83\xbf\xbf\xbf\xbf\x20", -1, 1, FALSE },
+ { "\x20\xc0\x80\x20", -1, 1, FALSE },
+ { "\x20\xe0\x80\x80\x20", -1, 1, FALSE },
+ { "\x20\xf0\x80\x80\x80\x20", -1, 1, FALSE },
+ { "\x20\xf8\x80\x80\x80\x80\x20", -1, 1, FALSE },
+ { "\x20\xfc\x80\x80\x80\x80\x80\x20", -1, 1, FALSE },
+ /* illegal code positions */
+ { "\x20\xed\xa0\x80\x20", -1, 1, FALSE },
+ { "\x20\xed\xad\xbf\x20", -1, 1, FALSE },
+ { "\x20\xed\xae\x80\x20", -1, 1, FALSE },
+ { "\x20\xed\xaf\xbf\x20", -1, 1, FALSE },
+ { "\x20\xed\xb0\x80\x20", -1, 1, FALSE },
+ { "\x20\xed\xbe\x80\x20", -1, 1, FALSE },
+ { "\x20\xed\xbf\xbf\x20", -1, 1, FALSE },
+ { "\x20\xed\xa0\x80\xed\xb0\x80\x20", -1, 1, FALSE },
+ { "\x20\xed\xa0\x80\xed\xbf\xbf\x20", -1, 1, FALSE },
+ { "\x20\xed\xad\xbf\xed\xb0\x80\x20", -1, 1, FALSE },
+ { "\x20\xed\xad\xbf\xed\xbf\xbf\x20", -1, 1, FALSE },
+ { "\x20\xed\xae\x80\xed\xb0\x80\x20", -1, 1, FALSE },
+ { "\x20\xed\xae\x80\xed\xbf\xbf\x20", -1, 1, FALSE },
+ { "\x20\xed\xaf\xbf\xed\xb0\x80\x20", -1, 1, FALSE },
+ { "\x20\xed\xaf\xbf\xed\xbf\xbf\x20", -1, 1, FALSE },
+ { "\x20\xef\xbf\xbe\x20", -1, 1, FALSE },
+ { "\x20\xef\xbf\xbf\x20", -1, 1, FALSE },
+#endif
+ { "", -1, 0, TRUE }
+};
+
+static void
+test_buffer_utf8_validity (void)
+{
+ hb_buffer_t *b;
+ unsigned int i;
+
+ b = hb_buffer_create ();
+
+ for (i = 0; i < G_N_ELEMENTS (utf8_validity_tests); i++)
+ {
+ const utf8_validity_test_t *test = &utf8_validity_tests[i];
+ unsigned int text_bytes, segment_bytes, j, len;
+ hb_glyph_info_t *glyphs;
+ char *escaped;
+
+ escaped = g_strescape (test->utf8, NULL);
+ g_test_message ("UTF-8 test #%d: %s", i, escaped);
+ g_free (escaped);
+
+ text_bytes = strlen (test->utf8);
+ if (test->max_len == -1)
+ segment_bytes = text_bytes;
+ else
+ segment_bytes = test->max_len;
+
+ hb_buffer_reset (b);
+ hb_buffer_add_utf8 (b, test->utf8, text_bytes, 0, segment_bytes);
+
+ glyphs = hb_buffer_get_glyph_infos (b, &len);
+ for (j = 0; j < len; j++)
+ if (glyphs[j].codepoint == (hb_codepoint_t) -1)
+ break;
+
+ g_assert (test->valid ? j == len : j < len);
+ if (!test->valid)
+ g_assert (glyphs[j].cluster == test->offset);
+ }
+
+ hb_buffer_destroy (b);
+}
+
+
+typedef struct {
+ const uint16_t utf16[8];
+ const uint32_t codepoints[8];
+} utf16_conversion_test_t;
+
+/* note: we skip the first and last item from utf16 when adding to buffer */
+static const utf16_conversion_test_t utf16_conversion_tests[] = {
+ {{0x41, 0x004D, 0x0430, 0x4E8C, 0xD800, 0xDF02, 0x61} , {0x004D, 0x0430, 0x4E8C, 0x10302}},
+ {{0x41, 0xD800, 0xDF02, 0x61}, {0x10302}},
+ {{0x41, 0xD800, 0xDF02}, {-1}},
+ {{0x41, 0x61, 0xD800, 0xDF02}, {0x61, -1}},
+ {{0x41, 0xD800, 0x61, 0xDF02}, {-1, 0x61}},
+ {{0x41, 0x61}, {}}
+};
+
+static void
+test_buffer_utf16_conversion (void)
+{
+ hb_buffer_t *b;
+ unsigned int i;
+
+ b = hb_buffer_create ();
+
+ for (i = 0; i < G_N_ELEMENTS (utf16_conversion_tests); i++)
+ {
+ const utf16_conversion_test_t *test = &utf16_conversion_tests[i];
+ unsigned int u_len, chars, j, len;
+ hb_glyph_info_t *glyphs;
+
+ g_test_message ("UTF-16 test #%d", i);
+
+ for (u_len = 0; test->utf16[u_len]; u_len++)
+ ;
+ for (chars = 0; test->codepoints[chars]; chars++)
+ ;
+
+ hb_buffer_reset (b);
+ hb_buffer_add_utf16 (b, test->utf16, u_len, 1, u_len - 2);
+
+ glyphs = hb_buffer_get_glyph_infos (b, &len);
+ g_assert_cmpint (len, ==, chars);
+ for (j = 0; j < chars; j++)
+ g_assert_cmphex (glyphs[j].codepoint, ==, test->codepoints[j]);
+ }
+
+ hb_buffer_destroy (b);
+}
+
+static void
+test_empty (hb_buffer_t *b)
+{
+ g_assert_cmpint (hb_buffer_get_length (b), ==, 0);
+ g_assert (!hb_buffer_get_glyph_infos (b, NULL));
+ g_assert (!hb_buffer_get_glyph_positions (b, NULL));
+}
+
+static void
+test_buffer_empty (void)
+{
+ hb_buffer_t *b = hb_buffer_get_empty ();
+
+ g_assert (hb_buffer_get_empty ());
+ g_assert (hb_buffer_get_empty () == b);
+
+ g_assert (!hb_buffer_allocation_successful (b));
+
+ test_empty (b);
+
+ hb_buffer_add_utf32 (b, utf32, G_N_ELEMENTS (utf32), 1, G_N_ELEMENTS (utf32) - 2);
+
+ test_empty (b);
+
+ hb_buffer_reverse (b);
+ hb_buffer_reverse_clusters (b);
+
+ g_assert (!hb_buffer_set_length (b, 10));
+
+ test_empty (b);
+
+ g_assert (hb_buffer_set_length (b, 0));
+
+ test_empty (b);
+
+ g_assert (!hb_buffer_allocation_successful (b));
+
+ hb_buffer_reset (b);
+
+ test_empty (b);
+
+ g_assert (!hb_buffer_allocation_successful (b));
+}
+
+int
+main (int argc, char **argv)
+{
+ unsigned int i;
+
+ hb_test_init (&argc, &argv);
+
+ for (i = 0; i < BUFFER_NUM_TYPES; i++)
+ {
+ const void *buffer_type = GINT_TO_POINTER (i);
+ const char *buffer_name = buffer_names[i];
+
+ hb_test_add_fixture_flavor (fixture, buffer_type, buffer_name, test_buffer_properties);
+ hb_test_add_fixture_flavor (fixture, buffer_type, buffer_name, test_buffer_contents);
+ hb_test_add_fixture_flavor (fixture, buffer_type, buffer_name, test_buffer_positions);
+ }
+
+ hb_test_add_fixture (fixture, GINT_TO_POINTER (BUFFER_EMPTY), test_buffer_allocation);
+
+ hb_test_add (test_buffer_utf8_conversion);
+ hb_test_add (test_buffer_utf8_validity);
+ hb_test_add (test_buffer_utf16_conversion);
+ hb_test_add (test_buffer_empty);
+
+ return hb_test_run();
+}
diff --git a/test/api/test-c.c b/test/api/test-c.c
new file mode 100644
index 0000000..25a38e5
--- /dev/null
+++ b/test/api/test-c.c
@@ -0,0 +1,58 @@
+/*
+ * Copyright © 2011 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
+ */
+
+/* This file tests that all headers can be included from .c files */
+
+
+#include <config.h>
+
+#include <hb.h>
+
+#ifdef HAVE_GLIB
+#include <hb-glib.h>
+#endif
+
+#ifdef HAVE_ICU
+#include <hb-icu.h>
+#endif
+
+#ifdef HAVE_FREETYPE
+#include <hb-ft.h>
+#endif
+
+#ifdef HAVE_OT
+#include <hb-ot.h>
+#endif
+
+#ifdef HAVE_UNISCRIBE
+#include <hb-uniscribe.h>
+#endif
+
+int
+main (int argc, char **argv)
+{
+ return !*hb_shape_list_shapers ();
+}
diff --git a/test/api/test-common.c b/test/api/test-common.c
new file mode 100644
index 0000000..74b50be
--- /dev/null
+++ b/test/api/test-common.c
@@ -0,0 +1,225 @@
+/*
+ * Copyright © 2011 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-test.h"
+
+/* Unit tests for hb-common.h */
+
+
+static void
+test_types_int (void)
+{
+ /* We already ASSERT_STATIC these in hb-private.h, but anyway */
+ g_assert_cmpint (sizeof (int8_t), ==, 1);
+ g_assert_cmpint (sizeof (uint8_t), ==, 1);
+ g_assert_cmpint (sizeof (int16_t), ==, 2);
+ g_assert_cmpint (sizeof (uint16_t), ==, 2);
+ g_assert_cmpint (sizeof (int32_t), ==, 4);
+ g_assert_cmpint (sizeof (uint32_t), ==, 4);
+ g_assert_cmpint (sizeof (int64_t), ==, 8);
+ g_assert_cmpint (sizeof (uint64_t), ==, 8);
+
+ g_assert_cmpint (sizeof (hb_codepoint_t), ==, 4);
+ g_assert_cmpint (sizeof (hb_position_t), ==, 4);
+ g_assert_cmpint (sizeof (hb_mask_t), ==, 4);
+ g_assert_cmpint (sizeof (hb_var_int_t), ==, 4);
+}
+
+static void
+test_types_direction (void)
+{
+ g_assert_cmpint ((signed) HB_DIRECTION_INVALID, ==, 0);
+ g_assert_cmpint (HB_DIRECTION_LTR, !=, 0);
+
+ g_assert (HB_DIRECTION_IS_HORIZONTAL (HB_DIRECTION_LTR));
+ g_assert (HB_DIRECTION_IS_HORIZONTAL (HB_DIRECTION_RTL));
+ g_assert (!HB_DIRECTION_IS_HORIZONTAL (HB_DIRECTION_TTB));
+ g_assert (!HB_DIRECTION_IS_HORIZONTAL (HB_DIRECTION_BTT));
+ g_assert (!HB_DIRECTION_IS_HORIZONTAL (HB_DIRECTION_INVALID));
+
+ g_assert (!HB_DIRECTION_IS_VERTICAL (HB_DIRECTION_LTR));
+ g_assert (!HB_DIRECTION_IS_VERTICAL (HB_DIRECTION_RTL));
+ g_assert (HB_DIRECTION_IS_VERTICAL (HB_DIRECTION_TTB));
+ g_assert (HB_DIRECTION_IS_VERTICAL (HB_DIRECTION_BTT));
+ g_assert (!HB_DIRECTION_IS_VERTICAL (HB_DIRECTION_INVALID));
+
+ g_assert (HB_DIRECTION_IS_FORWARD (HB_DIRECTION_LTR));
+ g_assert (HB_DIRECTION_IS_FORWARD (HB_DIRECTION_TTB));
+ g_assert (!HB_DIRECTION_IS_FORWARD (HB_DIRECTION_RTL));
+ g_assert (!HB_DIRECTION_IS_FORWARD (HB_DIRECTION_BTT));
+ g_assert (!HB_DIRECTION_IS_FORWARD (HB_DIRECTION_INVALID));
+
+ g_assert (!HB_DIRECTION_IS_BACKWARD (HB_DIRECTION_LTR));
+ g_assert (!HB_DIRECTION_IS_BACKWARD (HB_DIRECTION_TTB));
+ g_assert (HB_DIRECTION_IS_BACKWARD (HB_DIRECTION_RTL));
+ g_assert (HB_DIRECTION_IS_BACKWARD (HB_DIRECTION_BTT));
+ g_assert (!HB_DIRECTION_IS_BACKWARD (HB_DIRECTION_INVALID));
+
+ g_assert (HB_DIRECTION_IS_VALID (HB_DIRECTION_LTR));
+ g_assert (HB_DIRECTION_IS_VALID (HB_DIRECTION_TTB));
+ g_assert (HB_DIRECTION_IS_VALID (HB_DIRECTION_RTL));
+ g_assert (HB_DIRECTION_IS_VALID (HB_DIRECTION_BTT));
+ g_assert (!HB_DIRECTION_IS_VALID (HB_DIRECTION_INVALID));
+ g_assert (!HB_DIRECTION_IS_VALID ((hb_direction_t) 0x12345678));
+
+ g_assert_cmpint (HB_DIRECTION_REVERSE (HB_DIRECTION_LTR), ==, HB_DIRECTION_RTL);
+ g_assert_cmpint (HB_DIRECTION_REVERSE (HB_DIRECTION_RTL), ==, HB_DIRECTION_LTR);
+ g_assert_cmpint (HB_DIRECTION_REVERSE (HB_DIRECTION_TTB), ==, HB_DIRECTION_BTT);
+ g_assert_cmpint (HB_DIRECTION_REVERSE (HB_DIRECTION_BTT), ==, HB_DIRECTION_TTB);
+ //g_assert_cmpint (HB_DIRECTION_REVERSE (HB_DIRECTION_INVALID), ==, HB_DIRECTION_INVALID);
+
+ g_assert_cmpint (HB_DIRECTION_INVALID, ==, hb_direction_from_string (NULL, -1));
+ g_assert_cmpint (HB_DIRECTION_INVALID, ==, hb_direction_from_string ("", -1));
+ g_assert_cmpint (HB_DIRECTION_INVALID, ==, hb_direction_from_string ("t", 0));
+ g_assert_cmpint (HB_DIRECTION_INVALID, ==, hb_direction_from_string ("x", -1));
+ g_assert_cmpint (HB_DIRECTION_RTL, ==, hb_direction_from_string ("r", -1));
+ g_assert_cmpint (HB_DIRECTION_RTL, ==, hb_direction_from_string ("rtl", -1));
+ g_assert_cmpint (HB_DIRECTION_RTL, ==, hb_direction_from_string ("RtL", -1));
+ g_assert_cmpint (HB_DIRECTION_RTL, ==, hb_direction_from_string ("right-to-left", -1));
+ g_assert_cmpint (HB_DIRECTION_TTB, ==, hb_direction_from_string ("ttb", -1));
+
+ g_assert (0 == strcmp ("ltr", hb_direction_to_string (HB_DIRECTION_LTR)));
+ g_assert (0 == strcmp ("rtl", hb_direction_to_string (HB_DIRECTION_RTL)));
+ g_assert (0 == strcmp ("ttb", hb_direction_to_string (HB_DIRECTION_TTB)));
+ g_assert (0 == strcmp ("btt", hb_direction_to_string (HB_DIRECTION_BTT)));
+ g_assert (0 == strcmp ("invalid", hb_direction_to_string (HB_DIRECTION_INVALID)));
+}
+
+static void
+test_types_tag (void)
+{
+ g_assert_cmphex (HB_TAG_NONE, ==, 0);
+
+ g_assert_cmphex (HB_TAG ('a','B','c','D'), ==, 0x61426344);
+
+ g_assert_cmphex (hb_tag_from_string ("aBcDe", -1), ==, 0x61426344);
+ g_assert_cmphex (hb_tag_from_string ("aBcD", -1), ==, 0x61426344);
+ g_assert_cmphex (hb_tag_from_string ("aBc", -1), ==, 0x61426320);
+ g_assert_cmphex (hb_tag_from_string ("aB", -1), ==, 0x61422020);
+ g_assert_cmphex (hb_tag_from_string ("a", -1), ==, 0x61202020);
+ g_assert_cmphex (hb_tag_from_string ("aBcDe", 1), ==, 0x61202020);
+ g_assert_cmphex (hb_tag_from_string ("aBcDe", 2), ==, 0x61422020);
+ g_assert_cmphex (hb_tag_from_string ("aBcDe", 3), ==, 0x61426320);
+ g_assert_cmphex (hb_tag_from_string ("aBcDe", 4), ==, 0x61426344);
+ g_assert_cmphex (hb_tag_from_string ("aBcDe", 4), ==, 0x61426344);
+
+ g_assert_cmphex (hb_tag_from_string ("", -1), ==, HB_TAG_NONE);
+ g_assert_cmphex (hb_tag_from_string ("x", 0), ==, HB_TAG_NONE);
+ g_assert_cmphex (hb_tag_from_string (NULL, -1), ==, HB_TAG_NONE);
+}
+
+static void
+test_types_script (void)
+{
+ hb_tag_t arab = HB_TAG_CHAR4 ("arab");
+ hb_tag_t Arab = HB_TAG_CHAR4 ("Arab");
+ hb_tag_t ARAB = HB_TAG_CHAR4 ("ARAB");
+
+ hb_tag_t wWyZ = HB_TAG_CHAR4 ("wWyZ");
+ hb_tag_t Wwyz = HB_TAG_CHAR4 ("Wwyz");
+
+ hb_tag_t x123 = HB_TAG_CHAR4 ("x123");
+
+ g_assert_cmpint (HB_SCRIPT_INVALID, ==, (hb_script_t) HB_TAG_NONE);
+ g_assert_cmphex (HB_SCRIPT_ARABIC, !=, HB_SCRIPT_LATIN);
+
+ g_assert_cmphex (HB_SCRIPT_INVALID, ==, hb_script_from_string (NULL, -1));
+ g_assert_cmphex (HB_SCRIPT_INVALID, ==, hb_script_from_string ("", -1));
+ g_assert_cmphex (HB_SCRIPT_INVALID, ==, hb_script_from_string ("x", 0));
+ g_assert_cmphex (HB_SCRIPT_UNKNOWN, ==, hb_script_from_string ("x", -1));
+
+ g_assert_cmphex (HB_SCRIPT_ARABIC, ==, hb_script_from_string ("arab", -1));
+ g_assert_cmphex (HB_SCRIPT_ARABIC, ==, hb_script_from_string ("Arab", -1));
+ g_assert_cmphex (HB_SCRIPT_ARABIC, ==, hb_script_from_string ("ARAB", -1));
+ g_assert_cmphex (HB_SCRIPT_ARABIC, ==, hb_script_from_string ("Arabic", 6));
+ g_assert_cmphex (HB_SCRIPT_ARABIC, !=, hb_script_from_string ("Arabic", 3));
+
+ g_assert_cmphex (HB_SCRIPT_ARABIC, ==, hb_script_from_iso15924_tag (arab));
+ g_assert_cmphex (HB_SCRIPT_ARABIC, ==, hb_script_from_iso15924_tag (Arab));
+ g_assert_cmphex (HB_SCRIPT_ARABIC, ==, hb_script_from_iso15924_tag (ARAB));
+
+ /* Arbitrary tags that look like may be valid ISO 15924 should be preserved. */
+ g_assert_cmphex (HB_SCRIPT_UNKNOWN, !=, hb_script_from_string ("wWyZ", -1));
+ g_assert_cmphex (HB_SCRIPT_UNKNOWN, !=, hb_script_from_iso15924_tag (wWyZ));
+ /* Otherwise, UNKNOWN should be returned. */
+ g_assert_cmphex (HB_SCRIPT_UNKNOWN, ==, hb_script_from_string ("x123", -1));
+ g_assert_cmphex (HB_SCRIPT_UNKNOWN, ==, hb_script_from_iso15924_tag (x123));
+
+ g_assert_cmphex (hb_script_to_iso15924_tag (HB_SCRIPT_ARABIC), ==, Arab);
+ g_assert_cmphex (hb_script_to_iso15924_tag (hb_script_from_iso15924_tag (wWyZ)), ==, Wwyz);
+
+ g_assert_cmpint (hb_script_get_horizontal_direction (HB_SCRIPT_LATIN), ==, HB_DIRECTION_LTR);
+ g_assert_cmpint (hb_script_get_horizontal_direction (HB_SCRIPT_ARABIC), ==, HB_DIRECTION_RTL);
+ g_assert_cmpint (hb_script_get_horizontal_direction (hb_script_from_iso15924_tag (wWyZ)), ==, HB_DIRECTION_LTR);
+}
+
+static void
+test_types_language (void)
+{
+ hb_language_t fa = hb_language_from_string ("fa", -1);
+ hb_language_t fa_IR = hb_language_from_string ("fa_IR", -1);
+ hb_language_t fa_ir = hb_language_from_string ("fa-ir", -1);
+ hb_language_t en = hb_language_from_string ("en", -1);
+
+ g_assert (HB_LANGUAGE_INVALID == NULL);
+
+ g_assert (fa != NULL);
+ g_assert (fa_IR != NULL);
+ g_assert (fa_IR == fa_ir);
+
+ g_assert (en != NULL);
+ g_assert (en != fa);
+
+ /* Test recall */
+ g_assert (en == hb_language_from_string ("en", -1));
+ g_assert (en == hb_language_from_string ("eN", -1));
+ g_assert (en == hb_language_from_string ("Enx", 2));
+
+ g_assert (HB_LANGUAGE_INVALID == hb_language_from_string (NULL, -1));
+ g_assert (HB_LANGUAGE_INVALID == hb_language_from_string ("", -1));
+ g_assert (HB_LANGUAGE_INVALID == hb_language_from_string ("en", 0));
+ g_assert (HB_LANGUAGE_INVALID != hb_language_from_string ("en", 1));
+ g_assert (NULL == hb_language_to_string (HB_LANGUAGE_INVALID));
+
+ /* Not sure how to test this better. Setting env vars
+ * here doesn't sound like the right approach, and I'm
+ * not sure that it even works. */
+ g_assert (HB_LANGUAGE_INVALID != hb_language_get_default ());
+}
+
+int
+main (int argc, char **argv)
+{
+ hb_test_init (&argc, &argv);
+
+ hb_test_add (test_types_int);
+ hb_test_add (test_types_direction);
+ hb_test_add (test_types_tag);
+ hb_test_add (test_types_script);
+ hb_test_add (test_types_language);
+
+ return hb_test_run();
+}
diff --git a/test/api/test-cplusplus.cc b/test/api/test-cplusplus.cc
new file mode 100644
index 0000000..3313d74
--- /dev/null
+++ b/test/api/test-cplusplus.cc
@@ -0,0 +1,30 @@
+/*
+ * Copyright © 2011 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
+ */
+
+/* This file tests that all headers can be included from .cc files */
+
+
+#include "test-c.c"
diff --git a/test/api/test-font.c b/test/api/test-font.c
new file mode 100644
index 0000000..40540c4
--- /dev/null
+++ b/test/api/test-font.c
@@ -0,0 +1,502 @@
+/*
+ * Copyright © 2011 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-test.h"
+
+/* Unit tests for hb-font.h */
+
+
+static const char test_data[] = "test\0data";
+
+
+static void
+test_face_empty (void)
+{
+ g_assert (hb_face_get_empty ());
+ g_assert (hb_face_get_empty () == hb_face_create (hb_blob_get_empty (), 0));
+ g_assert (hb_face_get_empty () == hb_face_create (NULL, 0));
+
+ g_assert (hb_face_reference_table (hb_face_get_empty (), HB_TAG ('h','e','a','d')) == hb_blob_get_empty ());
+
+ g_assert_cmpint (hb_face_get_upem (hb_face_get_empty ()), ==, 1000);
+}
+
+static void
+test_face_create (void)
+{
+ hb_face_t *face;
+ hb_blob_t *blob;
+
+ blob = hb_blob_create (test_data, sizeof (test_data), HB_MEMORY_MODE_READONLY, NULL, NULL);
+ face = hb_face_create (blob, 0);
+ hb_blob_destroy (blob);
+
+ g_assert (hb_face_reference_table (face, HB_TAG ('h','e','a','d')) == hb_blob_get_empty ());
+
+ g_assert_cmpint (hb_face_get_upem (face), ==, 1000);
+
+ hb_face_destroy (face);
+}
+
+
+static void
+free_up (void *user_data)
+{
+ int *freed = (int *) user_data;
+
+ g_assert (!*freed);
+
+ (*freed)++;
+}
+
+static hb_blob_t *
+get_table (hb_face_t *face, hb_tag_t tag, void *user_data)
+{
+ if (tag == HB_TAG ('a','b','c','d'))
+ return hb_blob_create (test_data, sizeof (test_data), HB_MEMORY_MODE_READONLY, NULL, NULL);
+
+ return hb_blob_get_empty ();
+}
+
+static void
+test_face_createfortables (void)
+{
+ hb_face_t *face;
+ hb_blob_t *blob;
+ const char *data;
+ unsigned int len;
+ int freed = 0;
+
+ face = hb_face_create_for_tables (get_table, &freed, free_up);
+ g_assert (!freed);
+
+ g_assert (hb_face_reference_table (face, HB_TAG ('h','e','a','d')) == hb_blob_get_empty ());
+
+ blob = hb_face_reference_table (face, HB_TAG ('a','b','c','d'));
+ g_assert (blob != hb_blob_get_empty ());
+
+ data = hb_blob_get_data (blob, &len);
+ g_assert_cmpint (len, ==, sizeof (test_data));
+ g_assert (0 == memcmp (data, test_data, sizeof (test_data)));
+ hb_blob_destroy (blob);
+
+ g_assert_cmpint (hb_face_get_upem (face), ==, 1000);
+
+ hb_face_destroy (face);
+ g_assert (freed);
+}
+
+static void
+_test_font_nil_funcs (hb_font_t *font)
+{
+ hb_codepoint_t glyph;
+ hb_position_t x, y;
+ hb_glyph_extents_t extents;
+
+ x = y = 13;
+ g_assert (!hb_font_get_glyph_contour_point (font, 17, 2, &x, &y));
+ g_assert_cmpint (x, ==, 0);
+ g_assert_cmpint (y, ==, 0);
+
+ x = hb_font_get_glyph_h_advance (font, 17);
+ g_assert_cmpint (x, ==, 0);
+
+ extents.x_bearing = extents.y_bearing = 13;
+ extents.width = extents.height = 15;
+ hb_font_get_glyph_extents (font, 17, &extents);
+ g_assert_cmpint (extents.x_bearing, ==, 0);
+ g_assert_cmpint (extents.y_bearing, ==, 0);
+ g_assert_cmpint (extents.width, ==, 0);
+ g_assert_cmpint (extents.height, ==, 0);
+
+ glyph = 3;
+ g_assert (!hb_font_get_glyph (font, 17, 2, &glyph));
+ g_assert_cmpint (glyph, ==, 0);
+
+ x = 13;
+ x = hb_font_get_glyph_h_kerning (font, 17, 19);
+ g_assert_cmpint (x, ==, 0);
+}
+
+static void
+_test_fontfuncs_nil (hb_font_funcs_t *ffuncs)
+{
+ hb_blob_t *blob;
+ hb_face_t *face;
+ hb_font_t *font;
+ hb_font_t *subfont;
+ int freed = 0;
+
+ blob = hb_blob_create (test_data, sizeof (test_data), HB_MEMORY_MODE_READONLY, NULL, NULL);
+ face = hb_face_create (blob, 0);
+ hb_blob_destroy (blob);
+ g_assert (!hb_face_is_immutable (face));
+ font = hb_font_create (face);
+ g_assert (font);
+ g_assert (hb_face_is_immutable (face));
+ hb_face_destroy (face);
+
+
+ hb_font_set_funcs (font, ffuncs, &freed, free_up);
+ g_assert_cmpint (freed, ==, 0);
+
+ _test_font_nil_funcs (font);
+
+ subfont = hb_font_create_sub_font (font);
+ g_assert (subfont);
+
+ g_assert_cmpint (freed, ==, 0);
+ hb_font_destroy (font);
+ g_assert_cmpint (freed, ==, 0);
+
+ _test_font_nil_funcs (subfont);
+
+ hb_font_destroy (subfont);
+ g_assert_cmpint (freed, ==, 1);
+}
+
+static void
+test_fontfuncs_empty (void)
+{
+ g_assert (hb_font_funcs_get_empty ());
+ g_assert (hb_font_funcs_is_immutable (hb_font_funcs_get_empty ()));
+ _test_fontfuncs_nil (hb_font_funcs_get_empty ());
+}
+
+static void
+test_fontfuncs_nil (void)
+{
+ hb_font_funcs_t *ffuncs;
+
+ ffuncs = hb_font_funcs_create ();
+
+ g_assert (!hb_font_funcs_is_immutable (ffuncs));
+ _test_fontfuncs_nil (hb_font_funcs_get_empty ());
+
+ hb_font_funcs_destroy (ffuncs);
+}
+
+static hb_bool_t
+contour_point_func1 (hb_font_t *font, void *font_data,
+ hb_codepoint_t glyph, unsigned int point_index,
+ hb_position_t *x, hb_position_t *y,
+ void *user_data)
+{
+ if (glyph == 1) {
+ *x = 2;
+ *y = 3;
+ return TRUE;
+ }
+ if (glyph == 2) {
+ *x = 4;
+ *y = 5;
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static hb_bool_t
+contour_point_func2 (hb_font_t *font, void *font_data,
+ hb_codepoint_t glyph, unsigned int point_index,
+ hb_position_t *x, hb_position_t *y,
+ void *user_data)
+{
+ if (glyph == 1) {
+ *x = 6;
+ *y = 7;
+ return TRUE;
+ }
+
+ return hb_font_get_glyph_contour_point (hb_font_get_parent (font),
+ glyph, point_index, x, y);
+}
+
+static hb_position_t
+glyph_h_advance_func1 (hb_font_t *font, void *font_data,
+ hb_codepoint_t glyph,
+ void *user_data)
+{
+ if (glyph == 1)
+ return 8;
+
+ return 0;
+}
+
+static void
+test_fontfuncs_subclassing (void)
+{
+ hb_blob_t *blob;
+ hb_face_t *face;
+
+ hb_font_funcs_t *ffuncs1;
+ hb_font_funcs_t *ffuncs2;
+
+ hb_font_t *font1;
+ hb_font_t *font2;
+ hb_font_t *font3;
+
+ hb_position_t x;
+ hb_position_t y;
+
+ blob = hb_blob_create (test_data, sizeof (test_data), HB_MEMORY_MODE_READONLY, NULL, NULL);
+ face = hb_face_create (blob, 0);
+ hb_blob_destroy (blob);
+ font1 = hb_font_create (face);
+ hb_face_destroy (face);
+ hb_font_set_scale (font1, 10, 10);
+
+ /* setup font1 */
+ ffuncs1 = hb_font_funcs_create ();
+ hb_font_funcs_set_glyph_contour_point_func (ffuncs1, contour_point_func1, NULL, NULL);
+ hb_font_funcs_set_glyph_h_advance_func (ffuncs1, glyph_h_advance_func1, NULL, NULL);
+ hb_font_set_funcs (font1, ffuncs1, NULL, NULL);
+ hb_font_funcs_destroy (ffuncs1);
+
+ x = y = 1;
+ g_assert (hb_font_get_glyph_contour_point_for_origin (font1, 1, 2, HB_DIRECTION_LTR, &x, &y));
+ g_assert_cmpint (x, ==, 2);
+ g_assert_cmpint (y, ==, 3);
+ g_assert (hb_font_get_glyph_contour_point_for_origin (font1, 2, 5, HB_DIRECTION_LTR, &x, &y));
+ g_assert_cmpint (x, ==, 4);
+ g_assert_cmpint (y, ==, 5);
+ g_assert (!hb_font_get_glyph_contour_point_for_origin (font1, 3, 7, HB_DIRECTION_RTL, &x, &y));
+ g_assert_cmpint (x, ==, 0);
+ g_assert_cmpint (y, ==, 0);
+ x = hb_font_get_glyph_h_advance (font1, 1);
+ g_assert_cmpint (x, ==, 8);
+ x = hb_font_get_glyph_h_advance (font1, 2);
+ g_assert_cmpint (x, ==, 0);
+
+
+ font2 = hb_font_create_sub_font (font1);
+ g_assert (hb_font_is_immutable (font1));
+ hb_font_destroy (font1);
+
+ /* setup font2 to override some funcs */
+ ffuncs2 = hb_font_funcs_create ();
+ hb_font_funcs_set_glyph_contour_point_func (ffuncs2, contour_point_func2, NULL, NULL);
+ hb_font_set_funcs (font2, ffuncs2, NULL, NULL);
+ hb_font_funcs_destroy (ffuncs2);
+
+ x = y = 1;
+ g_assert (hb_font_get_glyph_contour_point_for_origin (font2, 1, 2, HB_DIRECTION_LTR, &x, &y));
+ g_assert_cmpint (x, ==, 6);
+ g_assert_cmpint (y, ==, 7);
+ g_assert (hb_font_get_glyph_contour_point_for_origin (font2, 2, 5, HB_DIRECTION_RTL, &x, &y));
+ g_assert_cmpint (x, ==, 4);
+ g_assert_cmpint (y, ==, 5);
+ g_assert (!hb_font_get_glyph_contour_point_for_origin (font2, 3, 7, HB_DIRECTION_LTR, &x, &y));
+ g_assert_cmpint (x, ==, 0);
+ g_assert_cmpint (y, ==, 0);
+ x = hb_font_get_glyph_h_advance (font2, 1);
+ g_assert_cmpint (x, ==, 8);
+ x = hb_font_get_glyph_h_advance (font2, 2);
+ g_assert_cmpint (x, ==, 0);
+
+
+ font3 = hb_font_create_sub_font (font2);
+ g_assert (hb_font_is_immutable (font2));
+ hb_font_destroy (font2);
+
+ /* setup font3 to override scale */
+ hb_font_set_scale (font3, 20, 30);
+
+ x = y = 1;
+ g_assert (hb_font_get_glyph_contour_point_for_origin (font3, 1, 2, HB_DIRECTION_RTL, &x, &y));
+ g_assert_cmpint (x, ==, 6*2);
+ g_assert_cmpint (y, ==, 7*3);
+ g_assert (hb_font_get_glyph_contour_point_for_origin (font3, 2, 5, HB_DIRECTION_LTR, &x, &y));
+ g_assert_cmpint (x, ==, 4*2);
+ g_assert_cmpint (y, ==, 5*3);
+ g_assert (!hb_font_get_glyph_contour_point_for_origin (font3, 3, 7, HB_DIRECTION_LTR, &x, &y));
+ g_assert_cmpint (x, ==, 0*2);
+ g_assert_cmpint (y, ==, 0*3);
+ x = hb_font_get_glyph_h_advance (font3, 1);
+ g_assert_cmpint (x, ==, 8*2);
+ x = hb_font_get_glyph_h_advance (font3, 2);
+ g_assert_cmpint (x, ==, 0*2);
+
+
+ hb_font_destroy (font3);
+}
+
+
+static void
+test_font_empty (void)
+{
+ g_assert (hb_font_get_empty ());
+ g_assert (hb_font_get_empty () == hb_font_create (hb_face_get_empty ()));
+ g_assert (hb_font_get_empty () == hb_font_create (NULL));
+ g_assert (hb_font_get_empty () == hb_font_create_sub_font (NULL));
+ g_assert (hb_font_is_immutable (hb_font_get_empty ()));
+
+ g_assert (hb_font_get_face (hb_font_get_empty ()) == hb_face_get_empty ());
+ g_assert (hb_font_get_parent (hb_font_get_empty ()) == NULL);
+}
+
+static void
+test_font_properties (void)
+{
+ hb_blob_t *blob;
+ hb_face_t *face;
+ hb_font_t *font;
+ hb_font_t *subfont;
+ int x_scale, y_scale;
+ unsigned int x_ppem, y_ppem;
+
+ blob = hb_blob_create (test_data, sizeof (test_data), HB_MEMORY_MODE_READONLY, NULL, NULL);
+ face = hb_face_create (blob, 0);
+ hb_blob_destroy (blob);
+ font = hb_font_create (face);
+ hb_face_destroy (face);
+
+
+ g_assert (hb_font_get_face (font) == face);
+ g_assert (hb_font_get_parent (font) == NULL);
+
+
+ /* Check scale */
+
+ hb_font_get_scale (font, NULL, NULL);
+ x_scale = y_scale = 13;
+ hb_font_get_scale (font, &x_scale, NULL);
+ g_assert_cmpint (x_scale, ==, 0);
+ x_scale = y_scale = 13;
+ hb_font_get_scale (font, NULL, &y_scale);
+ g_assert_cmpint (y_scale, ==, 0);
+ x_scale = y_scale = 13;
+ hb_font_get_scale (font, &x_scale, &y_scale);
+ g_assert_cmpint (x_scale, ==, 0);
+ g_assert_cmpint (y_scale, ==, 0);
+
+ hb_font_set_scale (font, 17, 19);
+
+ x_scale = y_scale = 13;
+ hb_font_get_scale (font, &x_scale, &y_scale);
+ g_assert_cmpint (x_scale, ==, 17);
+ g_assert_cmpint (y_scale, ==, 19);
+
+
+ /* Check ppem */
+
+ hb_font_get_ppem (font, NULL, NULL);
+ x_ppem = y_ppem = 13;
+ hb_font_get_ppem (font, &x_ppem, NULL);
+ g_assert_cmpint (x_ppem, ==, 0);
+ x_ppem = y_ppem = 13;
+ hb_font_get_ppem (font, NULL, &y_ppem);
+ g_assert_cmpint (y_ppem, ==, 0);
+ x_ppem = y_ppem = 13;
+ hb_font_get_ppem (font, &x_ppem, &y_ppem);
+ g_assert_cmpint (x_ppem, ==, 0);
+ g_assert_cmpint (y_ppem, ==, 0);
+
+ hb_font_set_ppem (font, 17, 19);
+
+ x_ppem = y_ppem = 13;
+ hb_font_get_ppem (font, &x_ppem, &y_ppem);
+ g_assert_cmpint (x_ppem, ==, 17);
+ g_assert_cmpint (y_ppem, ==, 19);
+
+
+ /* Check immutable */
+
+ g_assert (!hb_font_is_immutable (font));
+ hb_font_make_immutable (font);
+ g_assert (hb_font_is_immutable (font));
+
+ hb_font_set_scale (font, 10, 12);
+ x_scale = y_scale = 13;
+ hb_font_get_scale (font, &x_scale, &y_scale);
+ g_assert_cmpint (x_scale, ==, 17);
+ g_assert_cmpint (y_scale, ==, 19);
+
+ hb_font_set_ppem (font, 10, 12);
+ x_ppem = y_ppem = 13;
+ hb_font_get_ppem (font, &x_ppem, &y_ppem);
+ g_assert_cmpint (x_ppem, ==, 17);
+ g_assert_cmpint (y_ppem, ==, 19);
+
+
+ /* sub_font now */
+ subfont = hb_font_create_sub_font (font);
+ hb_font_destroy (font);
+
+ g_assert (hb_font_get_parent (subfont) == font);
+ g_assert (hb_font_get_face (subfont) == face);
+
+ /* scale */
+ x_scale = y_scale = 13;
+ hb_font_get_scale (subfont, &x_scale, &y_scale);
+ g_assert_cmpint (x_scale, ==, 17);
+ g_assert_cmpint (y_scale, ==, 19);
+ hb_font_set_scale (subfont, 10, 12);
+ x_scale = y_scale = 13;
+ hb_font_get_scale (subfont, &x_scale, &y_scale);
+ g_assert_cmpint (x_scale, ==, 10);
+ g_assert_cmpint (y_scale, ==, 12);
+ x_scale = y_scale = 13;
+ hb_font_get_scale (font, &x_scale, &y_scale);
+ g_assert_cmpint (x_scale, ==, 17);
+ g_assert_cmpint (y_scale, ==, 19);
+
+ /* ppem */
+ x_ppem = y_ppem = 13;
+ hb_font_get_ppem (subfont, &x_ppem, &y_ppem);
+ g_assert_cmpint (x_ppem, ==, 17);
+ g_assert_cmpint (y_ppem, ==, 19);
+ hb_font_set_ppem (subfont, 10, 12);
+ x_ppem = y_ppem = 13;
+ hb_font_get_ppem (subfont, &x_ppem, &y_ppem);
+ g_assert_cmpint (x_ppem, ==, 10);
+ g_assert_cmpint (y_ppem, ==, 12);
+ x_ppem = y_ppem = 13;
+ hb_font_get_ppem (font, &x_ppem, &y_ppem);
+ g_assert_cmpint (x_ppem, ==, 17);
+ g_assert_cmpint (y_ppem, ==, 19);
+
+ hb_font_destroy (subfont);
+}
+
+int
+main (int argc, char **argv)
+{
+ hb_test_init (&argc, &argv);
+
+ hb_test_add (test_face_empty);
+ hb_test_add (test_face_create);
+ hb_test_add (test_face_createfortables);
+
+ hb_test_add (test_fontfuncs_empty);
+ hb_test_add (test_fontfuncs_nil);
+ hb_test_add (test_fontfuncs_subclassing);
+
+ hb_test_add (test_font_empty);
+ hb_test_add (test_font_properties);
+
+ return hb_test_run();
+}
diff --git a/test/api/test-object.c b/test/api/test-object.c
new file mode 100644
index 0000000..66e8d33
--- /dev/null
+++ b/test/api/test-object.c
@@ -0,0 +1,367 @@
+/*
+ * Copyright © 2011 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-test.h"
+
+/* Unit tests for hb-object-private.h */
+
+
+static void *
+create_blob (void)
+{
+ static char data[] = "test data";
+ return hb_blob_create (data, sizeof (data), HB_MEMORY_MODE_READONLY, NULL, NULL);
+}
+static void *
+create_blob_inert (void)
+{
+ return hb_blob_create (NULL, 0, HB_MEMORY_MODE_DUPLICATE, NULL, NULL);
+}
+
+static void *
+create_buffer (void)
+{
+ return hb_buffer_create ();
+}
+static void *
+create_buffer_inert (void)
+{
+ return NULL;
+}
+
+static void *
+create_face (void)
+{
+ hb_blob_t *blob = (hb_blob_t *) create_blob ();
+ hb_face_t *face = hb_face_create (blob, 0);
+ hb_blob_destroy (blob);
+ return face;
+}
+static void *
+create_face_inert (void)
+{
+ return hb_face_create (hb_blob_get_empty (), 0);
+}
+
+static void *
+create_font (void)
+{
+ hb_face_t *face = (hb_face_t *) create_face ();
+ hb_font_t *font = hb_font_create (face);
+ hb_face_destroy (face);
+ return font;
+}
+static void *
+create_font_inert (void)
+{
+ return hb_font_create (hb_face_get_empty ());
+}
+
+static void *
+create_font_funcs (void)
+{
+ return hb_font_funcs_create ();
+}
+static void *
+create_font_funcs_inert (void)
+{
+ return NULL;
+}
+
+static void *
+create_unicode_funcs (void)
+{
+ return hb_unicode_funcs_create (NULL);
+}
+static void *
+create_unicode_funcs_inert (void)
+{
+ return hb_unicode_funcs_get_default ();
+}
+
+
+
+typedef void *(*create_func_t) (void);
+typedef void *(*reference_func_t) (void *obj);
+typedef void (*destroy_func_t) (void *obj);
+typedef hb_bool_t (*set_user_data_func_t) (void *obj, hb_user_data_key_t *key, void *data, hb_destroy_func_t destroy, hb_bool_t replace);
+typedef void * (*get_user_data_func_t) (void *obj, hb_user_data_key_t *key);
+typedef void (*make_immutable_func_t) (void *obj);
+typedef hb_bool_t (*is_immutable_func_t) (void *obj);
+
+typedef struct {
+ create_func_t create;
+ create_func_t create_inert;
+ create_func_t get_empty;
+ reference_func_t reference;
+ destroy_func_t destroy;
+ set_user_data_func_t set_user_data;
+ get_user_data_func_t get_user_data;
+ make_immutable_func_t make_immutable;
+ is_immutable_func_t is_immutable;
+ const char *name;
+} object_t;
+
+#define OBJECT_WITHOUT_IMMUTABILITY(name) \
+ { \
+ (create_func_t) create_##name, \
+ (create_func_t) create_##name##_inert, \
+ (create_func_t) hb_##name##_get_empty, \
+ (reference_func_t) hb_##name##_reference, \
+ (destroy_func_t) hb_##name##_destroy, \
+ (set_user_data_func_t) hb_##name##_set_user_data, \
+ (get_user_data_func_t) hb_##name##_get_user_data, \
+ (make_immutable_func_t) NULL, \
+ (is_immutable_func_t) NULL, \
+ #name, \
+ }
+#define OBJECT_WITH_IMMUTABILITY(name) \
+ { \
+ (create_func_t) create_##name, \
+ (create_func_t) create_##name##_inert, \
+ (create_func_t) hb_##name##_get_empty, \
+ (reference_func_t) hb_##name##_reference, \
+ (destroy_func_t) hb_##name##_destroy, \
+ (set_user_data_func_t) hb_##name##_set_user_data, \
+ (get_user_data_func_t) hb_##name##_get_user_data, \
+ (make_immutable_func_t) hb_##name##_make_immutable, \
+ (is_immutable_func_t) hb_##name##_is_immutable, \
+ #name, \
+ }
+static const object_t objects[] =
+{
+ OBJECT_WITHOUT_IMMUTABILITY (buffer),
+ OBJECT_WITH_IMMUTABILITY (blob),
+ OBJECT_WITH_IMMUTABILITY (face),
+ OBJECT_WITH_IMMUTABILITY (font),
+ OBJECT_WITH_IMMUTABILITY (font_funcs),
+ OBJECT_WITH_IMMUTABILITY (unicode_funcs)
+};
+#undef OBJECT
+
+
+#define MAGIC0 0x12345678
+#define MAGIC1 0x76543210
+
+typedef struct {
+ int value;
+ gboolean freed;
+} data_t;
+
+static int global_data;
+
+static void global_free_up (void *p G_GNUC_UNUSED)
+{
+ global_data++;
+}
+
+static void free_up0 (void *p)
+{
+ data_t *data = (data_t *) p;
+
+ g_assert_cmphex (data->value, ==, MAGIC0);
+ g_assert (!data->freed);
+ data->freed = TRUE;
+}
+
+static void free_up1 (void *p)
+{
+ data_t *data = (data_t *) p;
+
+ g_assert_cmphex (data->value, ==, MAGIC1);
+ g_assert (!data->freed);
+ data->freed = TRUE;
+}
+
+
+typedef struct {
+ const object_t *klass;
+ void *object;
+ hb_user_data_key_t key;
+} deadlock_test_t;
+
+static void free_deadlock_test (void *p)
+{
+ deadlock_test_t *t = (deadlock_test_t *) p;
+
+ g_assert (NULL == t->klass->get_user_data (t->object, &t->key));
+}
+
+
+static void
+test_object (void)
+{
+ unsigned int i;
+
+ for (i = 0; i < G_N_ELEMENTS (objects); i++) {
+ const object_t *o = &objects[i];
+ void *obj;
+ hb_user_data_key_t key[2];
+
+ {
+ unsigned int j;
+ data_t data[2] = {{MAGIC0, FALSE}, {MAGIC1, FALSE}};
+ deadlock_test_t deadlock_test;
+
+ g_test_message ("Testing object %s", o->name);
+
+ g_test_message ("->create()");
+ obj = o->create ();
+ g_assert (obj);
+
+ g_assert (obj == o->reference (obj));
+ o->destroy (obj);
+
+ if (o->is_immutable)
+ g_assert (!o->is_immutable (obj));
+
+ g_assert (o->set_user_data (obj, &key[0], &data[0], free_up0, TRUE));
+ g_assert (o->get_user_data (obj, &key[0]) == &data[0]);
+
+ if (o->is_immutable) {
+ o->make_immutable (obj);
+ g_assert (o->is_immutable (obj));
+ }
+
+ /* Should still work even if object is made immutable */
+ g_assert (o->set_user_data (obj, &key[1], &data[1], free_up1, TRUE));
+ g_assert (o->get_user_data (obj, &key[1]) == &data[1]);
+
+ g_assert (!o->set_user_data (obj, NULL, &data[0], free_up0, TRUE));
+ g_assert (o->get_user_data (obj, &key[0]) == &data[0]);
+ g_assert (o->set_user_data (obj, &key[0], &data[1], NULL, TRUE));
+ g_assert (data[0].freed);
+ g_assert (o->get_user_data (obj, &key[0]) == &data[1]);
+ g_assert (!data[1].freed);
+
+ data[0].freed = FALSE;
+ g_assert (o->set_user_data (obj, &key[0], &data[0], free_up0, TRUE));
+ g_assert (!data[0].freed);
+ g_assert (o->set_user_data (obj, &key[0], NULL, NULL, TRUE));
+ g_assert (data[0].freed);
+
+ data[0].freed = FALSE;
+ global_data = 0;
+ g_assert (o->set_user_data (obj, &key[0], &data[0], free_up0, TRUE));
+ g_assert (!o->set_user_data (obj, &key[0], &data[0], free_up0, FALSE));
+ g_assert_cmpuint (global_data, ==, 0);
+ g_assert (o->set_user_data (obj, &key[0], NULL, global_free_up, TRUE));
+ g_assert_cmpuint (global_data, ==, 0);
+ g_assert (o->set_user_data (obj, &key[0], NULL, NULL, TRUE));
+ g_assert_cmpuint (global_data, ==, 1);
+
+ global_data = 0;
+ for (j = 2; j < 1000; j++)
+ g_assert (o->set_user_data (obj, &key[j], &data[j], global_free_up, TRUE));
+ for (j = 2; j < 1000; j++)
+ g_assert (o->get_user_data (obj, &key[j]) == &data[j]);
+ for (j = 100; j < 1000; j++)
+ g_assert (o->set_user_data (obj, &key[j], NULL, NULL, TRUE));
+ for (j = 2; j < 100; j++)
+ g_assert (o->get_user_data (obj, &key[j]) == &data[j]);
+ for (j = 100; j < 1000; j++)
+ g_assert (!o->get_user_data (obj, &key[j]));
+ g_assert_cmpuint (global_data, ==, 900);
+
+ /* Test set_user_data where the destroy() func calls user_data functions.
+ * Make sure it doesn't deadlock or corrupt memory. */
+ deadlock_test.klass = o;
+ deadlock_test.object = obj;
+ g_assert (o->set_user_data (obj, &deadlock_test.key, &deadlock_test, free_deadlock_test, TRUE));
+ g_assert (o->set_user_data (obj, &deadlock_test.key, NULL, NULL, TRUE));
+
+ g_assert (!data[1].freed);
+ o->destroy (obj);
+ g_assert (data[0].freed);
+ g_assert (data[1].freed);
+ g_assert_cmpuint (global_data, ==, 1000-2);
+ }
+
+ {
+ data_t data[2] = {{MAGIC0, FALSE}, {MAGIC1, FALSE}};
+
+ g_test_message ("->get_empty()");
+ obj = o->get_empty ();
+ g_assert (obj);
+
+ g_assert (obj == o->reference (obj));
+ o->destroy (obj);
+
+ if (o->is_immutable)
+ g_assert (o->is_immutable (obj));
+
+ g_assert (!o->set_user_data (obj, &key[0], &data[0], free_up0, TRUE));
+ g_assert (!o->get_user_data (obj, &key[0]));
+
+ o->destroy (obj);
+ o->destroy (obj);
+ o->destroy (obj);
+ o->destroy (obj);
+ o->destroy (obj);
+
+ g_assert (!data[0].freed);
+ }
+
+ {
+ data_t data[2] = {{MAGIC0, FALSE}, {MAGIC1, FALSE}};
+
+ g_test_message ("->create_inert()");
+ obj = o->create_inert ();
+ if (!obj)
+ continue;
+ if (obj == o->get_empty ())
+ continue; /* Tested already */
+
+ g_assert (obj == o->reference (obj));
+ o->destroy (obj);
+
+ if (o->is_immutable)
+ g_assert (o->is_immutable (obj));
+
+ g_assert (!o->set_user_data (obj, &key[0], &data[0], free_up0, TRUE));
+ g_assert (!o->get_user_data (obj, &key[0]));
+
+ o->destroy (obj);
+ o->destroy (obj);
+ o->destroy (obj);
+ o->destroy (obj);
+ o->destroy (obj);
+
+ g_assert (!data[0].freed);
+ }
+ }
+}
+
+
+int
+main (int argc, char **argv)
+{
+ hb_test_init (&argc, &argv);
+
+ hb_test_add (test_object);
+
+ return hb_test_run ();
+}
diff --git a/test/api/test-ot-tag.c b/test/api/test-ot-tag.c
new file mode 100644
index 0000000..81b6678
--- /dev/null
+++ b/test/api/test-ot-tag.c
@@ -0,0 +1,241 @@
+/*
+ * Copyright © 2011 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-test.h"
+
+#include <hb-ot.h>
+
+/* Unit tests for hb-ot-tag.h */
+
+
+/* https://www.microsoft.com/typography/otspec/scripttags.htm */
+
+static void
+test_simple_tags (const char *s, hb_script_t script)
+{
+ hb_script_t tag;
+ hb_script_t t1, t2;
+
+ g_test_message ("Testing script %c%c%c%c: tag %s", HB_UNTAG (hb_script_to_iso15924_tag (script)), s);
+ tag = hb_tag_from_string (s, -1);
+
+ hb_ot_tags_from_script (script, &t1, &t2);
+
+ g_assert_cmphex (t1, ==, tag);
+ g_assert_cmphex (t2, ==, HB_OT_TAG_DEFAULT_SCRIPT);
+
+ g_assert_cmphex (hb_ot_tag_to_script (tag), ==, script);
+}
+
+static void
+test_indic_tags (const char *s1, const char *s2, hb_script_t script)
+{
+ hb_script_t tag1, tag2;
+ hb_script_t t1, t2;
+
+ g_test_message ("Testing script %c%c%c%c: new tag %s, old tag %s", HB_UNTAG (hb_script_to_iso15924_tag (script)), s1, s2);
+ tag1 = hb_tag_from_string (s1, -1);
+ tag2 = hb_tag_from_string (s2, -1);
+
+ hb_ot_tags_from_script (script, &t1, &t2);
+
+ g_assert_cmphex (t1, ==, tag1);
+ g_assert_cmphex (t2, ==, tag2);
+
+ g_assert_cmphex (hb_ot_tag_to_script (tag1), ==, script);
+ g_assert_cmphex (hb_ot_tag_to_script (tag2), ==, script);
+}
+
+static void
+test_ot_tag_script_degenerate (void)
+{
+ hb_script_t t1, t2;
+
+ g_assert_cmphex (HB_TAG_CHAR4 ("DFLT"), ==, HB_OT_TAG_DEFAULT_SCRIPT);
+
+ /* HIRAGANA and KATAKANA both map to 'kana' */
+ test_simple_tags ("kana", HB_SCRIPT_KATAKANA);
+ hb_ot_tags_from_script (HB_SCRIPT_HIRAGANA, &t1, &t2);
+ g_assert_cmphex (t1, ==, HB_TAG_CHAR4 ("kana"));
+ g_assert_cmphex (t2, ==, HB_OT_TAG_DEFAULT_SCRIPT);
+
+ test_simple_tags ("DFLT", HB_SCRIPT_INVALID);
+
+ /* Spaces are replaced */
+ g_assert_cmphex (hb_ot_tag_to_script (HB_TAG_CHAR4 ("be ")), ==, hb_script_from_string ("Beee", -1));
+}
+
+static void
+test_ot_tag_script_simple (void)
+{
+ /* Arbitrary non-existent script */
+ test_simple_tags ("wwyz", hb_script_from_string ("wWyZ", -1));
+
+ /* These we don't really care about */
+ test_simple_tags ("zyyy", HB_SCRIPT_COMMON);
+ test_simple_tags ("zinh", HB_SCRIPT_INHERITED);
+ test_simple_tags ("zzzz", HB_SCRIPT_UNKNOWN);
+
+ test_simple_tags ("arab", HB_SCRIPT_ARABIC);
+ test_simple_tags ("copt", HB_SCRIPT_COPTIC);
+ test_simple_tags ("kana", HB_SCRIPT_KATAKANA);
+ test_simple_tags ("latn", HB_SCRIPT_LATIN);
+
+ /* These are trickier since their OT script tags have space. */
+ test_simple_tags ("lao ", HB_SCRIPT_LAO);
+ test_simple_tags ("yi ", HB_SCRIPT_YI);
+ /* Unicode-5.0 additions */
+ test_simple_tags ("nko ", HB_SCRIPT_NKO);
+ /* Unicode-5.1 additions */
+ test_simple_tags ("vai ", HB_SCRIPT_VAI);
+
+ /* https://www.microsoft.com/typography/otspec160/scripttagsProposed.htm */
+
+ /* Unicode-5.2 additions */
+ test_simple_tags ("mtei", HB_SCRIPT_MEETEI_MAYEK);
+ /* Unicode-6.0 additions */
+ test_simple_tags ("mand", HB_SCRIPT_MANDAIC);
+}
+
+static void
+test_ot_tag_script_indic (void)
+{
+ test_indic_tags ("bng2", "beng", HB_SCRIPT_BENGALI);
+ test_indic_tags ("dev2", "deva", HB_SCRIPT_DEVANAGARI);
+ test_indic_tags ("gjr2", "gujr", HB_SCRIPT_GUJARATI);
+ test_indic_tags ("gur2", "guru", HB_SCRIPT_GURMUKHI);
+ test_indic_tags ("knd2", "knda", HB_SCRIPT_KANNADA);
+ test_indic_tags ("mlm2", "mlym", HB_SCRIPT_MALAYALAM);
+ test_indic_tags ("ory2", "orya", HB_SCRIPT_ORIYA);
+ test_indic_tags ("tml2", "taml", HB_SCRIPT_TAMIL);
+ test_indic_tags ("tel2", "telu", HB_SCRIPT_TELUGU);
+}
+
+
+
+/* https://www.microsoft.com/typography/otspec/languagetags.htm */
+
+static void
+test_language_two_way (const char *tag_s, const char *lang_s)
+{
+ hb_language_t lang = hb_language_from_string (lang_s, -1);
+ hb_tag_t tag = hb_tag_from_string (tag_s, -1);
+
+ g_test_message ("Testing language %s <-> tag %s", lang_s, tag_s);
+
+ g_assert_cmphex (tag, ==, hb_ot_tag_from_language (lang));
+ g_assert (lang == hb_ot_tag_to_language (tag));
+}
+
+static void
+test_tag_from_language (const char *tag_s, const char *lang_s)
+{
+ hb_language_t lang = hb_language_from_string (lang_s, -1);
+ hb_tag_t tag = hb_tag_from_string (tag_s, -1);
+
+ g_test_message ("Testing language %s -> tag %s", lang_s, tag_s);
+
+ g_assert_cmphex (tag, ==, hb_ot_tag_from_language (lang));
+}
+
+static void
+test_tag_to_language (const char *tag_s, const char *lang_s)
+{
+ hb_language_t lang = hb_language_from_string (lang_s, -1);
+ hb_tag_t tag = hb_tag_from_string (tag_s, -1);
+
+ g_test_message ("Testing tag %s -> language %s", tag_s, lang_s);
+
+ g_assert (lang == hb_ot_tag_to_language (tag));
+}
+
+static void
+test_ot_tag_language (void)
+{
+ g_assert_cmphex (HB_TAG_CHAR4 ("dflt"), ==, HB_OT_TAG_DEFAULT_LANGUAGE);
+ test_language_two_way ("dflt", NULL);
+
+ test_language_two_way ("ARA", "ar");
+
+ test_language_two_way ("AZE", "az");
+ test_tag_from_language ("AZE", "az-ir");
+ test_tag_from_language ("AZE", "az-az");
+
+ test_language_two_way ("ENG", "en");
+ test_tag_from_language ("ENG", "en_US");
+
+ test_language_two_way ("EVN", "eve");
+
+ test_language_two_way ("FAR", "fa");
+ test_tag_from_language ("FAR", "fa_IR");
+
+ test_language_two_way ("ZHH", "zh-hk"); /* Chinese (Hong Kong) */
+
+ test_tag_from_language ("ZHS", "zh-cn"); /* Chinese (China) */
+ test_tag_from_language ("ZHS", "zh-sg"); /* Chinese (Singapore) */
+ test_tag_from_language ("ZHT", "zh-mo"); /* Chinese (Macao) */
+ test_tag_from_language ("ZHT", "zh-tw"); /* Chinese (Taiwan) */
+
+ test_tag_from_language ("ZHS", "zh"); /* Chinese */
+ test_tag_from_language ("ZHS", "zh-xx");
+
+ test_tag_to_language ("ZHS", "zh-x-hbotzhs");
+ test_tag_to_language ("ZHT", "zh-x-hbotzht");
+ test_tag_to_language ("ZHP", "zh-x-hbotzhp");
+
+ test_language_two_way ("ABC", "x-hbotabc");
+ test_tag_from_language ("ABC", "asdf-asdf-wer-x-hbotabc-zxc");
+ test_tag_from_language ("ABC", "asdf-asdf-wer-x-hbotabc");
+ test_tag_from_language ("ABCD", "asdf-asdf-wer-x-hbotabcd");
+
+ test_tag_from_language ("dflt", "asdf-asdf-wer-x-hbot-zxc");
+
+ test_tag_from_language ("dflt", "xy");
+ test_tag_from_language ("XYZ", "xyz"); /* Unknown ISO 639-3 */
+ test_tag_from_language ("XYZ", "xyz-qw"); /* Unknown ISO 639-3 */
+
+ /* Test that x-hbot overrides the base language */
+ test_tag_from_language ("ABC", "fa-x-hbotabc-zxc");
+ test_tag_from_language ("ABC", "fa-ir-x-hbotabc-zxc");
+ test_tag_from_language ("ABC", "zh-x-hbotabc-zxc");
+ test_tag_from_language ("ABC", "zh-cn-x-hbotabc-zxc");
+ test_tag_from_language ("ABC", "zh-xy-x-hbotabc-zxc");
+ test_tag_from_language ("ABC", "xyz-xy-x-hbotabc-zxc");
+}
+
+int
+main (int argc, char **argv)
+{
+ hb_test_init (&argc, &argv);
+
+ hb_test_add (test_ot_tag_script_degenerate);
+ hb_test_add (test_ot_tag_script_simple);
+ hb_test_add (test_ot_tag_script_indic);
+
+ hb_test_add (test_ot_tag_language);
+
+ return hb_test_run();
+}
diff --git a/test/api/test-shape.c b/test/api/test-shape.c
new file mode 100644
index 0000000..ccf6eed
--- /dev/null
+++ b/test/api/test-shape.c
@@ -0,0 +1,165 @@
+/*
+ * Copyright © 2011 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-test.h"
+
+/* Unit tests for hb-shape.h */
+
+/*
+ * This test provides a framework to test aspects of hb_shape() that are
+ * font-independent. Please add tests for any feature that fits that
+ * description.
+ */
+
+/* TODO Make this test data-driven and add some real test data */
+/* TODO Test positions too. And test non-native direction. Test commit 2e18c6dbdfb */
+
+
+static const char test_data[] = "test\0data";
+
+static hb_position_t
+glyph_h_advance_func (hb_font_t *font, void *font_data,
+ hb_codepoint_t glyph,
+ void *user_data)
+{
+ switch (glyph) {
+ case 1: return 10;
+ case 2: return 6;
+ case 3: return 5;
+ }
+ return 0;
+}
+
+static hb_bool_t
+glyph_func (hb_font_t *font, void *font_data,
+ hb_codepoint_t unicode, hb_codepoint_t variant_selector,
+ hb_codepoint_t *glyph,
+ void *user_data)
+{
+ switch (unicode) {
+ case 'T': *glyph = 1; return TRUE;
+ case 'e': *glyph = 2; return TRUE;
+ case 's': *glyph = 3; return TRUE;
+ }
+ return FALSE;
+}
+
+static hb_position_t
+glyph_h_kerning_func (hb_font_t *font, void *font_data,
+ hb_codepoint_t left, hb_codepoint_t right,
+ void *user_data)
+{
+ if (left == 1 && right == 2)
+ return -2;
+
+ return 0;
+}
+
+static const char TesT[] = "TesT";
+
+static void
+test_shape (void)
+{
+ hb_blob_t *blob;
+ hb_face_t *face;
+ hb_font_funcs_t *ffuncs;
+ hb_font_t *font;
+ hb_buffer_t *buffer;
+ unsigned int len;
+ hb_glyph_info_t *glyphs;
+ hb_glyph_position_t *positions;
+
+ blob = hb_blob_create (test_data, sizeof (test_data), HB_MEMORY_MODE_READONLY, NULL, NULL);
+ face = hb_face_create (blob, 0);
+ hb_blob_destroy (blob);
+ font = hb_font_create (face);
+ hb_face_destroy (face);
+ hb_font_set_scale (font, 10, 10);
+
+ ffuncs = hb_font_funcs_create ();
+ hb_font_funcs_set_glyph_h_advance_func (ffuncs, glyph_h_advance_func, NULL, NULL);
+ hb_font_funcs_set_glyph_func (ffuncs, glyph_func, NULL, NULL);
+ hb_font_funcs_set_glyph_h_kerning_func (ffuncs, glyph_h_kerning_func, NULL, NULL);
+ hb_font_set_funcs (font, ffuncs, NULL, NULL);
+ hb_font_funcs_destroy (ffuncs);
+
+ buffer = hb_buffer_create ();
+ hb_buffer_set_direction (buffer, HB_DIRECTION_LTR);
+ hb_buffer_add_utf8 (buffer, TesT, 4, 0, 4);
+
+ hb_shape (font, buffer, NULL, 0);
+
+ len = hb_buffer_get_length (buffer);
+ glyphs = hb_buffer_get_glyph_infos (buffer, NULL);
+ positions = hb_buffer_get_glyph_positions (buffer, NULL);
+
+ {
+ const hb_codepoint_t output_glyphs[] = {1, 2, 3, 1};
+ const hb_position_t output_x_advances[] = {9, 5, 5, 10};
+ const hb_position_t output_x_offsets[] = {0, -1, 0, 0};
+ unsigned int i;
+ g_assert_cmpint (len, ==, 4);
+ for (i = 0; i < len; i++) {
+ g_assert_cmphex (glyphs[i].codepoint, ==, output_glyphs[i]);
+ g_assert_cmphex (glyphs[i].cluster, ==, i);
+ }
+ for (i = 0; i < len; i++) {
+ g_assert_cmpint (output_x_advances[i], ==, positions[i].x_advance);
+ g_assert_cmpint (output_x_offsets [i], ==, positions[i].x_offset);
+ g_assert_cmpint (0, ==, positions[i].y_advance);
+ g_assert_cmpint (0, ==, positions[i].y_offset);
+ }
+ }
+
+ hb_buffer_destroy (buffer);
+ hb_font_destroy (font);
+}
+
+static void
+test_shape_list (void)
+{
+ const char **shapers = hb_shape_list_shapers ();
+
+ unsigned int i;
+ for (i = 0; shapers[i]; i++)
+ ;
+
+ g_assert_cmpint (i, >, 1);
+ g_assert (!strcmp (shapers[i - 1], "fallback"));
+}
+
+int
+main (int argc, char **argv)
+{
+ hb_test_init (&argc, &argv);
+
+ hb_test_add (test_shape);
+ /* TODO test fallback shaper */
+ /* TODO test shaper_full */
+ hb_test_add (test_shape_list);
+
+ return hb_test_run();
+}
diff --git a/test/api/test-unicode.c b/test/api/test-unicode.c
new file mode 100644
index 0000000..96c61dd
--- /dev/null
+++ b/test/api/test-unicode.c
@@ -0,0 +1,937 @@
+/*
+ * Copyright © 2011 Codethink Limited
+ * Copyright © 2011 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.
+ *
+ * Codethink Author(s): Ryan Lortie
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-test.h"
+
+/* Unit tests for hb-unicode.h */
+/* Unit tests for hb-glib.h */
+/* Unit tests for hb-icu.h */
+
+
+#ifdef HAVE_GLIB
+#include <hb-glib.h>
+#endif
+#ifdef HAVE_ICU
+#include <hb-icu.h>
+#endif
+
+
+/* Some useful stuff */
+
+#define MAGIC0 0x12345678
+#define MAGIC1 0x76543210
+
+typedef struct {
+ int value;
+ gboolean freed;
+} data_t;
+
+static void free_up (void *p)
+{
+ data_t *data = (data_t *) p;
+
+ g_assert (data->value == MAGIC0 || data->value == MAGIC1);
+ g_assert (!data->freed);
+ data->freed = TRUE;
+}
+
+static hb_script_t
+simple_get_script (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t codepoint,
+ void *user_data)
+{
+ data_t *data = (data_t *) user_data;
+
+ g_assert (hb_unicode_funcs_get_parent (ufuncs) != NULL);
+ g_assert_cmphex (data->value, ==, MAGIC0);
+ g_assert (!data->freed);
+
+ if ('a' <= codepoint && codepoint <= 'z')
+ return HB_SCRIPT_LATIN;
+ else
+ return HB_SCRIPT_UNKNOWN;
+}
+
+static hb_script_t
+a_is_for_arabic_get_script (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t codepoint,
+ void *user_data)
+{
+ data_t *data = (data_t *) user_data;
+
+ g_assert (hb_unicode_funcs_get_parent (ufuncs) != NULL);
+ g_assert_cmphex (data->value, ==, MAGIC1);
+ g_assert (!data->freed);
+
+ if (codepoint == 'a') {
+ return HB_SCRIPT_ARABIC;
+ } else {
+ hb_unicode_funcs_t *parent = hb_unicode_funcs_get_parent (ufuncs);
+
+ return hb_unicode_script (parent, codepoint);
+ }
+}
+
+
+
+/* Check all properties */
+
+/* Some of the following tables where adapted from glib/glib/tests/utf8-misc.c.
+ * The license is compatible. */
+
+typedef struct {
+ hb_codepoint_t unicode;
+ unsigned int value;
+} test_pair_t;
+
+static const test_pair_t combining_class_tests[] =
+{
+ { 0x0020, 0 },
+ { 0x0334, 1 },
+ { 0x093C, 7 },
+ { 0x3099, 8 },
+ { 0x094D, 9 },
+ { 0x05B0, 10 },
+ { 0x05B1, 11 },
+ { 0x05B2, 12 },
+ { 0x05B3, 13 },
+ { 0x05B4, 14 },
+ { 0x05B5, 15 },
+ { 0x05B6, 16 },
+ { 0x05B7, 17 },
+ { 0x05B8, 18 },
+ { 0x05B9, 19 },
+ { 0x05BB, 20 },
+ { 0x05BC, 21 },
+ { 0x05BD, 22 },
+ { 0x05BF, 23 },
+ { 0x05C1, 24 },
+ { 0x05C2, 25 },
+ { 0xFB1E, 26 },
+ { 0x064B, 27 },
+ { 0x064C, 28 },
+ { 0x064D, 29 },
+ /* ... */
+ { 0x05AE, 228 },
+ { 0x0300, 230 },
+ { 0x302C, 232 },
+ { 0x0362, 233 },
+ { 0x0360, 234 },
+ { 0x0345, 240 },
+
+ { 0x111111, 0 }
+};
+static const test_pair_t combining_class_tests_more[] =
+{
+ /* Unicode-5.1 character additions */
+ { 0x1DCD, 234 },
+
+ /* Unicode-5.2 character additions */
+ { 0xA8E0, 230 },
+
+ /* Unicode-6.0 character additions */
+ { 0x135D, 230 },
+
+ { 0x111111, 0 }
+};
+
+static const test_pair_t eastasian_width_tests[] =
+{
+ /* Neutral */
+ { 0x0000, 1 },
+ { 0x0483, 1 },
+ { 0x0641, 1 },
+ { 0xFFFC, 1 },
+ { 0x10000, 1 },
+ { 0xE0001, 1 },
+
+ /* Narrow */
+ { 0x0020, 1 },
+ { 0x0041, 1 },
+ { 0x27E6, 1 },
+
+ /* Halfwidth */
+ { 0x20A9, 1 },
+ { 0xFF61, 1 },
+ { 0xFF69, 1 },
+ { 0xFFEE, 1 },
+
+ /* Ambiguous */
+ { 0x00A1, 1 },
+ { 0x00D8, 1 },
+ { 0x02DD, 1 },
+ { 0xE0100, 1 },
+ { 0x100000, 1 },
+
+ /* Fullwidth */
+ { 0x3000, 2 },
+ { 0xFF60, 2 },
+
+ /* Wide */
+ { 0x2329, 2 },
+ { 0x3001, 2 },
+ { 0xFE69, 2 },
+ { 0x30000, 2 },
+ { 0x3FFFD, 2 },
+
+ { 0x111111, 1 }
+};
+static const test_pair_t eastasian_width_tests_more[] =
+{
+ /* Default Wide blocks */
+ { 0x4DBF, 2 },
+ { 0x9FFF, 2 },
+ { 0xFAFF, 2 },
+ { 0x2A6DF, 2 },
+ { 0x2B73F, 2 },
+ { 0x2B81F, 2 },
+ { 0x2FA1F, 2 },
+
+ /* Uniode-5.2 character additions */
+ /* Wide */
+ { 0x115F, 2 },
+
+ /* Uniode-6.0 character additions */
+ /* Wide */
+ { 0x2B740, 2 },
+ { 0x1B000, 2 },
+
+ { 0x111111, 1 }
+};
+
+static const test_pair_t general_category_tests[] =
+{
+ { 0x000D, HB_UNICODE_GENERAL_CATEGORY_CONTROL },
+ { 0x200E, HB_UNICODE_GENERAL_CATEGORY_FORMAT },
+ { 0x0378, HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED },
+ { 0xE000, HB_UNICODE_GENERAL_CATEGORY_PRIVATE_USE },
+ { 0xD800, HB_UNICODE_GENERAL_CATEGORY_SURROGATE },
+ { 0x0061, HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER },
+ { 0x02B0, HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER },
+ { 0x3400, HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER },
+ { 0x01C5, HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER },
+ { 0xFF21, HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER },
+ { 0x0903, HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK },
+ { 0x20DD, HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK },
+ { 0xA806, HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK },
+ { 0xFF10, HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER },
+ { 0x16EE, HB_UNICODE_GENERAL_CATEGORY_LETTER_NUMBER },
+ { 0x17F0, HB_UNICODE_GENERAL_CATEGORY_OTHER_NUMBER },
+ { 0x005F, HB_UNICODE_GENERAL_CATEGORY_CONNECT_PUNCTUATION },
+ { 0x058A, HB_UNICODE_GENERAL_CATEGORY_DASH_PUNCTUATION },
+ { 0x0F3B, HB_UNICODE_GENERAL_CATEGORY_CLOSE_PUNCTUATION },
+ { 0x2019, HB_UNICODE_GENERAL_CATEGORY_FINAL_PUNCTUATION },
+ { 0x2018, HB_UNICODE_GENERAL_CATEGORY_INITIAL_PUNCTUATION },
+ { 0x2016, HB_UNICODE_GENERAL_CATEGORY_OTHER_PUNCTUATION },
+ { 0x0F3A, HB_UNICODE_GENERAL_CATEGORY_OPEN_PUNCTUATION },
+ { 0x20A0, HB_UNICODE_GENERAL_CATEGORY_CURRENCY_SYMBOL },
+ { 0x309B, HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL },
+ { 0xFB29, HB_UNICODE_GENERAL_CATEGORY_MATH_SYMBOL },
+ { 0x00A6, HB_UNICODE_GENERAL_CATEGORY_OTHER_SYMBOL },
+ { 0x2028, HB_UNICODE_GENERAL_CATEGORY_LINE_SEPARATOR },
+ { 0x2029, HB_UNICODE_GENERAL_CATEGORY_PARAGRAPH_SEPARATOR },
+ { 0x202F, HB_UNICODE_GENERAL_CATEGORY_SPACE_SEPARATOR },
+
+ { 0x111111, HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED }
+};
+static const test_pair_t general_category_tests_more[] =
+{
+ /* Unicode-5.2 character additions */
+ { 0x1F131, HB_UNICODE_GENERAL_CATEGORY_OTHER_SYMBOL },
+
+ /* Unicode-6.0 character additions */
+ { 0x0620, HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER },
+
+ { 0x111111, HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED }
+};
+
+static const test_pair_t mirroring_tests[] =
+{
+ /* Some characters that do NOT mirror */
+ { 0x0020, 0x0020 },
+ { 0x0041, 0x0041 },
+ { 0x00F0, 0x00F0 },
+ { 0x27CC, 0x27CC },
+ { 0xE01EF, 0xE01EF },
+ { 0x1D7C3, 0x1D7C3 },
+ { 0x100000, 0x100000 },
+
+ /* Some characters that do mirror */
+ { 0x0029, 0x0028 },
+ { 0x0028, 0x0029 },
+ { 0x003E, 0x003C },
+ { 0x003C, 0x003E },
+ { 0x005D, 0x005B },
+ { 0x005B, 0x005D },
+ { 0x007D, 0x007B },
+ { 0x007B, 0x007D },
+ { 0x00BB, 0x00AB },
+ { 0x00AB, 0x00BB },
+ { 0x226B, 0x226A },
+ { 0x226A, 0x226B },
+ { 0x22F1, 0x22F0 },
+ { 0x22F0, 0x22F1 },
+ { 0xFF60, 0xFF5F },
+ { 0xFF5F, 0xFF60 },
+ { 0xFF63, 0xFF62 },
+ { 0xFF62, 0xFF63 },
+
+ { 0x111111, 0x111111 },
+};
+static const test_pair_t mirroring_tests_more[] =
+{
+ /* No new mirroring characters have been encoded in recent Unicode versions. */
+ { 0x111111, 0x111111 }
+};
+
+static const test_pair_t script_tests[] =
+{
+ { 0x002A, HB_SCRIPT_COMMON },
+ { 0x0670, HB_SCRIPT_INHERITED },
+ { 0x060D, HB_SCRIPT_ARABIC },
+ { 0x0559, HB_SCRIPT_ARMENIAN },
+ { 0x09CD, HB_SCRIPT_BENGALI },
+ { 0x31B6, HB_SCRIPT_BOPOMOFO },
+ { 0x13A2, HB_SCRIPT_CHEROKEE },
+ { 0x2CFD, HB_SCRIPT_COPTIC },
+ { 0x0482, HB_SCRIPT_CYRILLIC },
+ { 0x10401, HB_SCRIPT_DESERET },
+ { 0x094D, HB_SCRIPT_DEVANAGARI },
+ { 0x1258, HB_SCRIPT_ETHIOPIC },
+ { 0x10FC, HB_SCRIPT_GEORGIAN },
+ { 0x10341, HB_SCRIPT_GOTHIC },
+ { 0x0375, HB_SCRIPT_GREEK },
+ { 0x0A83, HB_SCRIPT_GUJARATI },
+ { 0x0A3C, HB_SCRIPT_GURMUKHI },
+ { 0x3005, HB_SCRIPT_HAN },
+ { 0x1100, HB_SCRIPT_HANGUL },
+ { 0x05BF, HB_SCRIPT_HEBREW },
+ { 0x309F, HB_SCRIPT_HIRAGANA },
+ { 0x0CBC, HB_SCRIPT_KANNADA },
+ { 0x30FF, HB_SCRIPT_KATAKANA },
+ { 0x17DD, HB_SCRIPT_KHMER },
+ { 0x0EDD, HB_SCRIPT_LAO },
+ { 0x0061, HB_SCRIPT_LATIN },
+ { 0x0D3D, HB_SCRIPT_MALAYALAM },
+ { 0x1843, HB_SCRIPT_MONGOLIAN },
+ { 0x1031, HB_SCRIPT_MYANMAR },
+ { 0x169C, HB_SCRIPT_OGHAM },
+ { 0x10322, HB_SCRIPT_OLD_ITALIC },
+ { 0x0B3C, HB_SCRIPT_ORIYA },
+ { 0x16EF, HB_SCRIPT_RUNIC },
+ { 0x0DBD, HB_SCRIPT_SINHALA },
+ { 0x0711, HB_SCRIPT_SYRIAC },
+ { 0x0B82, HB_SCRIPT_TAMIL },
+ { 0x0C03, HB_SCRIPT_TELUGU },
+ { 0x07B1, HB_SCRIPT_THAANA },
+ { 0x0E31, HB_SCRIPT_THAI },
+ { 0x0FD4, HB_SCRIPT_TIBETAN },
+ { 0x1401, HB_SCRIPT_CANADIAN_ABORIGINAL },
+ { 0xA015, HB_SCRIPT_YI },
+ { 0x1700, HB_SCRIPT_TAGALOG },
+ { 0x1720, HB_SCRIPT_HANUNOO },
+ { 0x1740, HB_SCRIPT_BUHID },
+ { 0x1760, HB_SCRIPT_TAGBANWA },
+
+ /* Unicode-4.0 additions */
+ { 0x2800, HB_SCRIPT_BRAILLE },
+ { 0x10808, HB_SCRIPT_CYPRIOT },
+ { 0x1932, HB_SCRIPT_LIMBU },
+ { 0x10480, HB_SCRIPT_OSMANYA },
+ { 0x10450, HB_SCRIPT_SHAVIAN },
+ { 0x10000, HB_SCRIPT_LINEAR_B },
+ { 0x1950, HB_SCRIPT_TAI_LE },
+ { 0x1039F, HB_SCRIPT_UGARITIC },
+
+ /* Unicode-4.1 additions */
+ { 0x1980, HB_SCRIPT_NEW_TAI_LUE },
+ { 0x1A1F, HB_SCRIPT_BUGINESE },
+ { 0x2C00, HB_SCRIPT_GLAGOLITIC },
+ { 0x2D6F, HB_SCRIPT_TIFINAGH },
+ { 0xA800, HB_SCRIPT_SYLOTI_NAGRI },
+ { 0x103D0, HB_SCRIPT_OLD_PERSIAN },
+ { 0x10A3F, HB_SCRIPT_KHAROSHTHI },
+
+ /* Unicode-5.0 additions */
+ { 0x0378, HB_SCRIPT_UNKNOWN },
+ { 0x1B04, HB_SCRIPT_BALINESE },
+ { 0x12000, HB_SCRIPT_CUNEIFORM },
+ { 0x10900, HB_SCRIPT_PHOENICIAN },
+ { 0xA840, HB_SCRIPT_PHAGS_PA },
+ { 0x07C0, HB_SCRIPT_NKO },
+
+ /* Unicode-5.1 additions */
+ { 0xA900, HB_SCRIPT_KAYAH_LI },
+ { 0x1C00, HB_SCRIPT_LEPCHA },
+ { 0xA930, HB_SCRIPT_REJANG },
+ { 0x1B80, HB_SCRIPT_SUNDANESE },
+ { 0xA880, HB_SCRIPT_SAURASHTRA },
+ { 0xAA00, HB_SCRIPT_CHAM },
+ { 0x1C50, HB_SCRIPT_OL_CHIKI },
+ { 0xA500, HB_SCRIPT_VAI },
+ { 0x102A0, HB_SCRIPT_CARIAN },
+ { 0x10280, HB_SCRIPT_LYCIAN },
+ { 0x1093F, HB_SCRIPT_LYDIAN },
+
+ { 0x111111, HB_SCRIPT_UNKNOWN }
+};
+static const test_pair_t script_tests_more[] =
+{
+ /* Unicode-5.2 additions */
+ { 0x10B00, HB_SCRIPT_AVESTAN },
+ { 0xA6A0, HB_SCRIPT_BAMUM },
+ { 0x13000, HB_SCRIPT_EGYPTIAN_HIEROGLYPHS },
+ { 0x10840, HB_SCRIPT_IMPERIAL_ARAMAIC },
+ { 0x10B60, HB_SCRIPT_INSCRIPTIONAL_PAHLAVI },
+ { 0x10B40, HB_SCRIPT_INSCRIPTIONAL_PARTHIAN },
+ { 0xA980, HB_SCRIPT_JAVANESE },
+ { 0x11082, HB_SCRIPT_KAITHI },
+ { 0xA4D0, HB_SCRIPT_LISU },
+ { 0xABE5, HB_SCRIPT_MEETEI_MAYEK },
+ { 0x10A60, HB_SCRIPT_OLD_SOUTH_ARABIAN },
+ { 0x10C00, HB_SCRIPT_OLD_TURKIC },
+ { 0x0800, HB_SCRIPT_SAMARITAN },
+ { 0x1A20, HB_SCRIPT_TAI_THAM },
+ { 0xAA80, HB_SCRIPT_TAI_VIET },
+
+ /* Unicode-6.0 additions */
+ { 0x1BC0, HB_SCRIPT_BATAK },
+ { 0x11000, HB_SCRIPT_BRAHMI },
+ { 0x0840, HB_SCRIPT_MANDAIC },
+
+ /* Unicode-5.2 character additions */
+ { 0x1CED, HB_SCRIPT_INHERITED },
+ { 0x1400, HB_SCRIPT_CANADIAN_ABORIGINAL },
+
+ { 0x111111, HB_SCRIPT_UNKNOWN }
+};
+
+
+typedef unsigned int (*get_func_t) (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t unicode,
+ void *user_data);
+typedef unsigned int (*func_setter_func_t) (hb_unicode_funcs_t *ufuncs,
+ get_func_t func,
+ void *user_data,
+ hb_destroy_func_t destroy);
+typedef unsigned int (*getter_func_t) (hb_unicode_funcs_t *ufuncs,
+ hb_codepoint_t unicode);
+
+typedef struct {
+ const char *name;
+ func_setter_func_t func_setter;
+ getter_func_t getter;
+ const test_pair_t *tests;
+ unsigned int num_tests;
+ const test_pair_t *tests_more;
+ unsigned int num_tests_more;
+ unsigned int default_value;
+} property_t;
+
+#define RETURNS_UNICODE_ITSELF ((unsigned int) -1)
+
+#define PROPERTY(name, DEFAULT) \
+ { \
+ #name, \
+ (func_setter_func_t) hb_unicode_funcs_set_##name##_func, \
+ (getter_func_t) hb_unicode_##name, \
+ name##_tests, \
+ G_N_ELEMENTS (name##_tests), \
+ name##_tests_more, \
+ G_N_ELEMENTS (name##_tests_more), \
+ DEFAULT \
+ }
+static const property_t properties[] =
+{
+ PROPERTY (combining_class, 0),
+ PROPERTY (eastasian_width, 1),
+ PROPERTY (general_category, (unsigned int) HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER),
+ PROPERTY (mirroring, RETURNS_UNICODE_ITSELF),
+ PROPERTY (script, (unsigned int) HB_SCRIPT_UNKNOWN)
+};
+#undef PROPERTY
+
+static void
+test_unicode_properties (gconstpointer user_data)
+{
+ hb_unicode_funcs_t *uf = (hb_unicode_funcs_t *) user_data;
+ unsigned int i, j;
+ gboolean failed = TRUE;
+
+ g_assert (hb_unicode_funcs_is_immutable (uf));
+ g_assert (hb_unicode_funcs_get_parent (uf));
+
+ for (i = 0; i < G_N_ELEMENTS (properties); i++) {
+ const property_t *p = &properties[i];
+ const test_pair_t *tests;
+
+ g_test_message ("Testing property %s", p->name);
+ tests = p->tests;
+ for (j = 0; j < p->num_tests; j++) {
+ g_test_message ("Test %s #%d: U+%04X", p->name, j, tests[j].unicode);
+ g_assert_cmphex (p->getter (uf, tests[j].unicode), ==, tests[j].value);
+ }
+ /* These tests are from Unicode 5.2 onward and older glib/ICU
+ * don't get them right. Just warn instead of assert. */
+ tests = p->tests_more;
+ for (j = 0; j < p->num_tests_more; j++) {
+ g_test_message ("Test %s more #%d: U+%04X", p->name, j, tests[j].unicode);
+ if (p->getter (uf, tests[j].unicode) != tests[j].value) {
+ g_test_message ("Soft fail: Received %x, expected %x", p->getter (uf, tests[j].unicode), tests[j].value);
+ failed = TRUE;
+ }
+ }
+ }
+
+ if (failed)
+ g_test_message ("Some property tests failed. You probably have an old version of one of the libraries used.");
+}
+
+static hb_codepoint_t
+default_value (hb_codepoint_t _default_value, hb_codepoint_t unicode)
+{
+ return _default_value == RETURNS_UNICODE_ITSELF ? unicode : _default_value;
+}
+
+static void
+_test_unicode_properties_nil (hb_unicode_funcs_t *uf)
+{
+ unsigned int i, j;
+
+ for (i = 0; i < G_N_ELEMENTS (properties); i++) {
+ const property_t *p = &properties[i];
+ const test_pair_t *tests;
+
+ g_test_message ("Testing property %s", p->name);
+ tests = p->tests;
+ for (j = 0; j < p->num_tests; j++) {
+ g_test_message ("Test %s #%d: U+%04X", p->name, j, tests[j].unicode);
+ g_assert_cmphex (p->getter (uf, tests[j].unicode), ==, default_value (p->default_value, tests[j].unicode));
+ }
+ tests = p->tests_more;
+ for (j = 0; j < p->num_tests_more; j++) {
+ g_test_message ("Test %s more #%d: U+%04X", p->name, j, tests[j].unicode);
+ g_assert_cmphex (p->getter (uf, tests[j].unicode), ==, default_value (p->default_value, tests[j].unicode));
+ }
+ }
+}
+
+static void
+test_unicode_properties_nil (void)
+{
+ hb_unicode_funcs_t *uf = hb_unicode_funcs_create (NULL);
+
+ g_assert (!hb_unicode_funcs_is_immutable (uf));
+ _test_unicode_properties_nil (uf);
+
+ hb_unicode_funcs_destroy (uf);
+}
+
+static void
+test_unicode_properties_empty (void)
+{
+ hb_unicode_funcs_t *uf = hb_unicode_funcs_get_empty ();
+
+ g_assert (uf);
+ g_assert (hb_unicode_funcs_is_immutable (uf));
+ _test_unicode_properties_nil (uf);
+}
+
+
+static void
+test_unicode_chainup (void)
+{
+ hb_unicode_funcs_t *uf, *uf2;
+
+ /* Chain-up to nil */
+
+ uf = hb_unicode_funcs_create (NULL);
+ g_assert (!hb_unicode_funcs_is_immutable (uf));
+
+ uf2 = hb_unicode_funcs_create (uf);
+ g_assert (hb_unicode_funcs_is_immutable (uf));
+ hb_unicode_funcs_destroy (uf);
+
+ g_assert (!hb_unicode_funcs_is_immutable (uf2));
+ _test_unicode_properties_nil (uf2);
+
+ hb_unicode_funcs_destroy (uf2);
+
+ /* Chain-up to default */
+
+ uf = hb_unicode_funcs_create (hb_unicode_funcs_get_default ());
+ g_assert (!hb_unicode_funcs_is_immutable (uf));
+
+ uf2 = hb_unicode_funcs_create (uf);
+ g_assert (hb_unicode_funcs_is_immutable (uf));
+ hb_unicode_funcs_destroy (uf);
+
+ g_assert (!hb_unicode_funcs_is_immutable (uf2));
+ hb_unicode_funcs_make_immutable (uf2);
+ test_unicode_properties (uf2);
+
+ hb_unicode_funcs_destroy (uf2);
+
+}
+
+static void
+test_unicode_setters (void)
+{
+ hb_unicode_funcs_t *uf;
+ unsigned int i;
+
+ /* This is cruel: we use script-returning functions to test all properties,
+ * but it works. */
+
+ for (i = 0; i < G_N_ELEMENTS (properties); i++) {
+ const property_t *p = &properties[i];
+ data_t data[2] = {{MAGIC0, FALSE}, {MAGIC1, FALSE}};
+
+ g_test_message ("Testing property %s", p->name);
+
+ uf = hb_unicode_funcs_create (NULL);
+ g_assert (!hb_unicode_funcs_is_immutable (uf));
+
+ p->func_setter (uf, (get_func_t) simple_get_script, &data[0], free_up);
+
+ g_assert_cmphex (p->getter (uf, 'a'), ==, HB_SCRIPT_LATIN);
+ g_assert_cmphex (p->getter (uf, '0'), ==, HB_SCRIPT_UNKNOWN);
+
+ p->func_setter (uf, (get_func_t) NULL, NULL, NULL);
+ g_assert (data[0].freed && !data[1].freed);
+
+ g_assert (!hb_unicode_funcs_is_immutable (uf));
+ hb_unicode_funcs_make_immutable (uf);
+ g_assert (hb_unicode_funcs_is_immutable (uf));
+
+ /* Since uf is immutable now, the following setter should do nothing. */
+ p->func_setter (uf, (get_func_t) a_is_for_arabic_get_script, &data[1], free_up);
+
+ g_assert (data[0].freed && !data[1].freed);
+ hb_unicode_funcs_destroy (uf);
+ g_assert (data[0].freed && !data[1].freed);
+ }
+}
+
+
+
+typedef struct {
+ data_t data[2];
+} data_fixture_t;
+
+static void
+data_fixture_init (data_fixture_t *f, gconstpointer user_data)
+{
+ f->data[0].value = MAGIC0;
+ f->data[1].value = MAGIC1;
+}
+static void
+data_fixture_finish (data_fixture_t *f, gconstpointer user_data)
+{
+}
+
+static void
+test_unicode_subclassing_nil (data_fixture_t *f, gconstpointer user_data)
+{
+ hb_unicode_funcs_t *uf, *aa;
+
+ uf = hb_unicode_funcs_create (NULL);
+
+ aa = hb_unicode_funcs_create (uf);
+
+ hb_unicode_funcs_destroy (uf);
+
+ hb_unicode_funcs_set_script_func (aa, a_is_for_arabic_get_script,
+ &f->data[1], free_up);
+
+ g_assert_cmphex (hb_unicode_script (aa, 'a'), ==, HB_SCRIPT_ARABIC);
+ g_assert_cmphex (hb_unicode_script (aa, 'b'), ==, HB_SCRIPT_UNKNOWN);
+
+ g_assert (!f->data[0].freed && !f->data[1].freed);
+ hb_unicode_funcs_destroy (aa);
+ g_assert (!f->data[0].freed && f->data[1].freed);
+}
+
+static void
+test_unicode_subclassing_default (data_fixture_t *f, gconstpointer user_data)
+{
+ hb_unicode_funcs_t *uf, *aa;
+
+ uf = hb_unicode_funcs_get_default ();
+ aa = hb_unicode_funcs_create (uf);
+
+ hb_unicode_funcs_set_script_func (aa, a_is_for_arabic_get_script,
+ &f->data[1], free_up);
+
+ g_assert_cmphex (hb_unicode_script (aa, 'a'), ==, HB_SCRIPT_ARABIC);
+ g_assert_cmphex (hb_unicode_script (aa, 'b'), ==, HB_SCRIPT_LATIN);
+
+ g_assert (!f->data[0].freed && !f->data[1].freed);
+ hb_unicode_funcs_destroy (aa);
+ g_assert (!f->data[0].freed && f->data[1].freed);
+}
+
+static void
+test_unicode_subclassing_deep (data_fixture_t *f, gconstpointer user_data)
+{
+ hb_unicode_funcs_t *uf, *aa;
+
+ uf = hb_unicode_funcs_create (NULL);
+
+ hb_unicode_funcs_set_script_func (uf, simple_get_script,
+ &f->data[0], free_up);
+
+ aa = hb_unicode_funcs_create (uf);
+
+ hb_unicode_funcs_destroy (uf);
+
+ /* make sure the 'uf' didn't get freed, since 'aa' holds a ref */
+ g_assert (!f->data[0].freed);
+
+ hb_unicode_funcs_set_script_func (aa, a_is_for_arabic_get_script,
+ &f->data[1], free_up);
+
+ g_assert_cmphex (hb_unicode_script (aa, 'a'), ==, HB_SCRIPT_ARABIC);
+ g_assert_cmphex (hb_unicode_script (aa, 'b'), ==, HB_SCRIPT_LATIN);
+ g_assert_cmphex (hb_unicode_script (aa, '0'), ==, HB_SCRIPT_UNKNOWN);
+
+ g_assert (!f->data[0].freed && !f->data[1].freed);
+ hb_unicode_funcs_destroy (aa);
+ g_assert (f->data[0].freed && f->data[1].freed);
+}
+
+
+static hb_script_t
+script_roundtrip_default (hb_script_t script)
+{
+ return hb_script_from_iso15924_tag (hb_script_to_iso15924_tag (script));
+}
+
+#ifdef HAVE_GLIB
+static hb_script_t
+script_roundtrip_glib (hb_script_t script)
+{
+ return hb_glib_script_to_script (hb_glib_script_from_script (script));
+}
+#endif
+
+#ifdef HAVE_ICU
+static hb_script_t
+script_roundtrip_icu (hb_script_t script)
+{
+ return hb_icu_script_to_script (hb_icu_script_from_script (script));
+}
+#endif
+
+static void
+test_unicode_script_roundtrip (gconstpointer user_data)
+{
+ typedef hb_script_t (*roundtrip_func_t) (hb_script_t);
+ roundtrip_func_t roundtrip_func = (roundtrip_func_t) user_data;
+ unsigned int i;
+ gboolean failed = FALSE;
+
+ for (i = 0; i < G_N_ELEMENTS (script_tests); i++) {
+ const test_pair_t *test = &script_tests[i];
+ hb_script_t script = test->value;
+
+ g_test_message ("Test script roundtrip #%d: %x", i, script);
+ g_assert_cmphex (script, ==, roundtrip_func (script));
+ }
+ for (i = 0; i < G_N_ELEMENTS (script_tests_more); i++) {
+ const test_pair_t *test = &script_tests_more[i];
+ hb_script_t script = test->value;
+
+ g_test_message ("Test script roundtrip more #%d: %x", i, script);
+ if (script != roundtrip_func (script)) {
+ g_test_message ("Soft fail: Received %x, expected %x", roundtrip_func (script), script);
+ failed = TRUE;
+ }
+ }
+
+ g_assert_cmphex (HB_SCRIPT_INVALID, ==, roundtrip_func (HB_SCRIPT_INVALID));
+
+ if (failed)
+ g_test_message ("Some script roundtrip tests failed. You probably have an old version of one of the libraries used.");
+}
+
+
+static void
+test_unicode_normalization (gconstpointer user_data)
+{
+ hb_unicode_funcs_t *uf = (hb_unicode_funcs_t *) user_data;
+ gunichar a, b, ab;
+ hb_codepoint_t decomposed[HB_UNICODE_MAX_DECOMPOSITION_LEN];
+
+
+ /* Test compose() */
+
+ /* Not composable */
+ g_assert (!hb_unicode_compose (uf, 0x0041, 0x0042, &ab) && ab == 0);
+ g_assert (!hb_unicode_compose (uf, 0x0041, 0, &ab) && ab == 0);
+ g_assert (!hb_unicode_compose (uf, 0x0066, 0x0069, &ab) && ab == 0);
+
+ /* Singletons should not compose */
+ g_assert (!hb_unicode_compose (uf, 0x212B, 0, &ab) && ab == 0);
+ g_assert (!hb_unicode_compose (uf, 0x00C5, 0, &ab) && ab == 0);
+ g_assert (!hb_unicode_compose (uf, 0x2126, 0, &ab) && ab == 0);
+ g_assert (!hb_unicode_compose (uf, 0x03A9, 0, &ab) && ab == 0);
+
+ /* Non-starter pairs should not compose */
+ g_assert (!hb_unicode_compose (uf, 0x0308, 0x0301, &ab) && ab == 0); /* !0x0344 */
+ g_assert (!hb_unicode_compose (uf, 0x0F71, 0x0F72, &ab) && ab == 0); /* !0x0F73 */
+
+ /* Pairs */
+ g_assert (hb_unicode_compose (uf, 0x0041, 0x030A, &ab) && ab == 0x00C5);
+ g_assert (hb_unicode_compose (uf, 0x006F, 0x0302, &ab) && ab == 0x00F4);
+ g_assert (hb_unicode_compose (uf, 0x1E63, 0x0307, &ab) && ab == 0x1E69);
+ g_assert (hb_unicode_compose (uf, 0x0073, 0x0323, &ab) && ab == 0x1E63);
+ g_assert (hb_unicode_compose (uf, 0x0064, 0x0307, &ab) && ab == 0x1E0B);
+ g_assert (hb_unicode_compose (uf, 0x0064, 0x0323, &ab) && ab == 0x1E0D);
+
+ /* Hangul */
+ g_assert (hb_unicode_compose (uf, 0xD4CC, 0x11B6, &ab) && ab == 0xD4DB);
+ g_assert (hb_unicode_compose (uf, 0x1111, 0x1171, &ab) && ab == 0xD4CC);
+ g_assert (hb_unicode_compose (uf, 0xCE20, 0x11B8, &ab) && ab == 0xCE31);
+ g_assert (hb_unicode_compose (uf, 0x110E, 0x1173, &ab) && ab == 0xCE20);
+
+
+ /* Test decompose() */
+
+ /* Not decomposable */
+ g_assert (!hb_unicode_decompose (uf, 0x0041, &a, &b) && a == 0x0041 && b == 0);
+ g_assert (!hb_unicode_decompose (uf, 0xFB01, &a, &b) && a == 0xFB01 && b == 0);
+ g_assert (!hb_unicode_decompose (uf, 0x1F1EF, &a, &b) && a == 0x1F1EF && b == 0);
+
+ /* Singletons */
+ g_assert (hb_unicode_decompose (uf, 0x212B, &a, &b) && a == 0x00C5 && b == 0);
+ g_assert (hb_unicode_decompose (uf, 0x2126, &a, &b) && a == 0x03A9 && b == 0);
+
+ /* Non-starter pairs decompose, but not compose */
+ g_assert (hb_unicode_decompose (uf, 0x0344, &a, &b) && a == 0x0308 && b == 0x0301);
+ g_assert (hb_unicode_decompose (uf, 0x0F73, &a, &b) && a == 0x0F71 && b == 0x0F72);
+
+ /* Pairs */
+ g_assert (hb_unicode_decompose (uf, 0x00C5, &a, &b) && a == 0x0041 && b == 0x030A);
+ g_assert (hb_unicode_decompose (uf, 0x00F4, &a, &b) && a == 0x006F && b == 0x0302);
+ g_assert (hb_unicode_decompose (uf, 0x1E69, &a, &b) && a == 0x1E63 && b == 0x0307);
+ g_assert (hb_unicode_decompose (uf, 0x1E63, &a, &b) && a == 0x0073 && b == 0x0323);
+ g_assert (hb_unicode_decompose (uf, 0x1E0B, &a, &b) && a == 0x0064 && b == 0x0307);
+ g_assert (hb_unicode_decompose (uf, 0x1E0D, &a, &b) && a == 0x0064 && b == 0x0323);
+
+ /* Hangul */
+ g_assert (hb_unicode_decompose (uf, 0xD4DB, &a, &b) && a == 0xD4CC && b == 0x11B6);
+ g_assert (hb_unicode_decompose (uf, 0xD4CC, &a, &b) && a == 0x1111 && b == 0x1171);
+ g_assert (hb_unicode_decompose (uf, 0xCE31, &a, &b) && a == 0xCE20 && b == 0x11B8);
+ g_assert (hb_unicode_decompose (uf, 0xCE20, &a, &b) && a == 0x110E && b == 0x1173);
+
+
+ /* Test decompose_compatibility() */
+
+ /* Not decomposable */
+ g_assert (hb_unicode_decompose_compatibility (uf, 0x0041, decomposed) == 0);
+ g_assert (hb_unicode_decompose_compatibility (uf, 0x1F632, decomposed) == 0);
+
+ /* Singletons */
+ g_assert (hb_unicode_decompose_compatibility (uf, 0x00B5, decomposed) == 1 && decomposed[0] == 0x03BC);
+ g_assert (hb_unicode_decompose_compatibility (uf, 0x03D6, decomposed) == 1 && decomposed[0] == 0x03C0);
+
+ /* Arabic compatibility */
+ g_assert (hb_unicode_decompose_compatibility (uf, 0xFB54, decomposed) == 1 && decomposed[0] == 0x067B);
+
+ /* Longest decomposition ever */
+ g_assert (18 <= HB_UNICODE_MAX_DECOMPOSITION_LEN);
+ g_assert (hb_unicode_decompose_compatibility (uf, 0xFDFA, decomposed) == 18 && decomposed[17] == 0x0645);
+
+ /* Note: we deliberately don't test characters that have canonical decompositions but no
+ * compatibility decomposition against the decompose_compatibility() function as that we
+ * leave up to implementations (for now). */
+
+ /* Spaces */
+ g_assert (hb_unicode_decompose_compatibility (uf, 0x2002, decomposed) == 1 && decomposed[0] == 0x0020);
+ g_assert (hb_unicode_decompose_compatibility (uf, 0x2003, decomposed) == 1 && decomposed[0] == 0x0020);
+ g_assert (hb_unicode_decompose_compatibility (uf, 0x2004, decomposed) == 1 && decomposed[0] == 0x0020);
+ g_assert (hb_unicode_decompose_compatibility (uf, 0x2005, decomposed) == 1 && decomposed[0] == 0x0020);
+ g_assert (hb_unicode_decompose_compatibility (uf, 0x2006, decomposed) == 1 && decomposed[0] == 0x0020);
+ g_assert (hb_unicode_decompose_compatibility (uf, 0x2008, decomposed) == 1 && decomposed[0] == 0x0020);
+ g_assert (hb_unicode_decompose_compatibility (uf, 0x2009, decomposed) == 1 && decomposed[0] == 0x0020);
+ g_assert (hb_unicode_decompose_compatibility (uf, 0x200A, decomposed) == 1 && decomposed[0] == 0x0020);
+
+ /* Pairs */
+ g_assert (hb_unicode_decompose_compatibility (uf, 0x0587, decomposed) == 2 &&
+ decomposed[0] == 0x0565 && decomposed[1] == 0x0582);
+ g_assert (hb_unicode_decompose_compatibility (uf, 0x2017, decomposed) == 2 &&
+ decomposed[0] == 0x0020 && decomposed[1] == 0x0333);
+ g_assert (hb_unicode_decompose_compatibility (uf, 0x2025, decomposed) == 2 &&
+ decomposed[0] == 0x002E && decomposed[1] == 0x002E);
+ g_assert (hb_unicode_decompose_compatibility (uf, 0x2033, decomposed) == 2 &&
+ decomposed[0] == 0x2032 && decomposed[1] == 0x2032);
+
+ /* Triples */
+ g_assert (hb_unicode_decompose_compatibility (uf, 0x2026, decomposed) == 3 &&
+ decomposed[0] == 0x002E && decomposed[1] == 0x002E && decomposed[2] == 0x002E);
+ g_assert (hb_unicode_decompose_compatibility (uf, 0x2034, decomposed) == 3 &&
+ decomposed[0] == 0x2032 && decomposed[1] == 0x2032 && decomposed[2] == 0x2032);
+ g_assert (hb_unicode_decompose_compatibility (uf, 0x213B, decomposed) == 3 &&
+ decomposed[0] == 0x0046 && decomposed[1] == 0x0041 && decomposed[2] == 0x0058);
+}
+
+
+
+int
+main (int argc, char **argv)
+{
+ hb_test_init (&argc, &argv);
+
+ hb_test_add (test_unicode_properties_nil);
+ hb_test_add (test_unicode_properties_empty);
+
+ hb_test_add_data_flavor (hb_unicode_funcs_get_default (), "default", test_unicode_properties);
+ hb_test_add_data_flavor (hb_unicode_funcs_get_default (), "default", test_unicode_normalization);
+ hb_test_add_data_flavor ((gconstpointer) script_roundtrip_default, "default", test_unicode_script_roundtrip);
+#ifdef HAVE_GLIB
+ hb_test_add_data_flavor (hb_glib_get_unicode_funcs (), "glib", test_unicode_properties);
+ hb_test_add_data_flavor (hb_glib_get_unicode_funcs (), "glib", test_unicode_normalization);
+ hb_test_add_data_flavor ((gconstpointer) script_roundtrip_glib, "glib", test_unicode_script_roundtrip);
+#endif
+#ifdef HAVE_ICU
+ hb_test_add_data_flavor (hb_icu_get_unicode_funcs (), "icu", test_unicode_properties);
+ hb_test_add_data_flavor (hb_icu_get_unicode_funcs (), "icu", test_unicode_normalization);
+ hb_test_add_data_flavor ((gconstpointer) script_roundtrip_icu, "icu", test_unicode_script_roundtrip);
+#endif
+
+ hb_test_add (test_unicode_chainup);
+
+ hb_test_add (test_unicode_setters);
+
+ hb_test_add_fixture (data_fixture, NULL, test_unicode_subclassing_nil);
+ hb_test_add_fixture (data_fixture, NULL, test_unicode_subclassing_default);
+ hb_test_add_fixture (data_fixture, NULL, test_unicode_subclassing_deep);
+
+ return hb_test_run ();
+}
diff --git a/test/api/test-version.c b/test/api/test-version.c
new file mode 100644
index 0000000..4c9bd37
--- /dev/null
+++ b/test/api/test-version.c
@@ -0,0 +1,80 @@
+/*
+ * Copyright © 2011 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-test.h"
+
+/* Unit tests for hb-version.h */
+
+
+static void
+test_version (void)
+{
+ unsigned int major, minor, micro;
+ char *s;
+
+ hb_version (&major, &minor, &micro);
+
+ g_assert_cmpint (major, ==, HB_VERSION_MAJOR);
+ g_assert_cmpint (minor, ==, HB_VERSION_MINOR);
+ g_assert_cmpint (micro, ==, HB_VERSION_MICRO);
+
+ s = g_strdup_printf ("%u.%u.%u", major, minor, micro);
+ g_assert (0 == strcmp (HB_VERSION_STRING, s));
+ g_free (s);
+ g_assert (0 == strcmp (HB_VERSION_STRING, hb_version_string ()));
+
+ g_assert (HB_VERSION_CHECK (major, minor, micro));
+ g_assert (HB_VERSION_CHECK (major+1, minor, micro));
+ g_assert (HB_VERSION_CHECK (major, minor+1, micro));
+ g_assert (HB_VERSION_CHECK (major, minor, micro+1));
+ if (major)
+ g_assert (!HB_VERSION_CHECK (major-1, minor, micro));
+ if (minor)
+ g_assert (!HB_VERSION_CHECK (major, minor-1, micro));
+ if (micro)
+ g_assert (!HB_VERSION_CHECK (major, minor, micro-1));
+
+ g_assert (hb_version_check (major, minor, micro));
+ g_assert (hb_version_check (major+1, minor, micro));
+ g_assert (hb_version_check (major, minor+1, micro));
+ g_assert (hb_version_check (major, minor, micro+1));
+ if (major)
+ g_assert (!hb_version_check (major-1, minor, micro));
+ if (minor)
+ g_assert (!hb_version_check (major, minor-1, micro));
+ if (micro)
+ g_assert (!hb_version_check (major, minor, micro-1));
+}
+
+int
+main (int argc, char **argv)
+{
+ hb_test_init (&argc, &argv);
+
+ hb_test_add (test_version);
+
+ return hb_test_run();
+}
diff --git a/test/shaping/Makefile.am b/test/shaping/Makefile.am
new file mode 100644
index 0000000..4fb762c
--- /dev/null
+++ b/test/shaping/Makefile.am
@@ -0,0 +1,35 @@
+# Process this file with automake to produce Makefile.in
+
+NULL =
+EXTRA_DIST =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+
+manifests:
+ @$(srcdir)/hb-manifest-update "$(srcdir)/texts" "$(srcdir)/fonts"
+
+EXTRA_DIST += \
+ hb-diff \
+ hb-diff-colorize \
+ hb-diff-filter-failures \
+ hb-diff-ngrams \
+ hb-diff-stat \
+ hb-manifest-read \
+ hb-manifest-update \
+ hb-unicode-decode \
+ hb-unicode-encode \
+ hb-unicode-prettyname \
+ $(NULL)
+
+# TODO Figure out Python stuff
+EXTRA_DIST += \
+ hb_test_tools.py \
+ $(NULL)
+CLEANFILES += \
+ hb_test_tools.py[co] \
+ $(NULL)
+
+.PHONY: manifests
+
+-include $(top_srcdir)/git.mk
diff --git a/test/shaping/Makefile.in b/test/shaping/Makefile.in
new file mode 100644
index 0000000..6273f9d
--- /dev/null
+++ b/test/shaping/Makefile.in
@@ -0,0 +1,408 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Process this file with automake to produce Makefile.in
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = test/shaping
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FT_CFLAGS = @CAIRO_FT_CFLAGS@
+CAIRO_FT_LIBS = @CAIRO_FT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CORETEXT_CFLAGS = @CORETEXT_CFLAGS@
+CORETEXT_LIBS = @CORETEXT_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GRAPHITE2_CFLAGS = @GRAPHITE2_CFLAGS@
+GRAPHITE2_LIBS = @GRAPHITE2_LIBS@
+GREP = @GREP@
+GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
+GTHREAD_LIBS = @GTHREAD_LIBS@
+HB_LIBTOOL_VERSION_INFO = @HB_LIBTOOL_VERSION_INFO@
+HB_VERSION = @HB_VERSION@
+HB_VERSION_MAJOR = @HB_VERSION_MAJOR@
+HB_VERSION_MICRO = @HB_VERSION_MICRO@
+HB_VERSION_MINOR = @HB_VERSION_MINOR@
+ICU_CFLAGS = @ICU_CFLAGS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UNISCRIBE_CFLAGS = @UNISCRIBE_CFLAGS@
+UNISCRIBE_LIBS = @UNISCRIBE_LIBS@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+
+# TODO Figure out Python stuff
+EXTRA_DIST = hb-diff hb-diff-colorize hb-diff-filter-failures \
+ hb-diff-ngrams hb-diff-stat hb-manifest-read \
+ hb-manifest-update hb-unicode-decode hb-unicode-encode \
+ hb-unicode-prettyname $(NULL) hb_test_tools.py $(NULL)
+CLEANFILES = hb_test_tools.py[co] $(NULL)
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits test/shaping/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnits test/shaping/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+manifests:
+ @$(srcdir)/hb-manifest-update "$(srcdir)/texts" "$(srcdir)/fonts"
+
+.PHONY: manifests
+
+-include $(top_srcdir)/git.mk
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/test/shaping/hb-diff b/test/shaping/hb-diff
new file mode 100755
index 0000000..6a13fa2
--- /dev/null
+++ b/test/shaping/hb-diff
@@ -0,0 +1,10 @@
+#!/usr/bin/python
+
+from hb_test_tools import *
+import sys, os
+
+if len (sys.argv) < 2:
+ print "usage: %s FILES..." % sys.argv[0]
+ sys.exit (1)
+
+ZipDiffer.diff_files (FileHelpers.open_file_or_stdin (f) for f in sys.argv[1:])
diff --git a/test/shaping/hb-diff-colorize b/test/shaping/hb-diff-colorize
new file mode 100755
index 0000000..4e045d2
--- /dev/null
+++ b/test/shaping/hb-diff-colorize
@@ -0,0 +1,7 @@
+#!/usr/bin/python
+
+from hb_test_tools import *
+
+formatter = ColorFormatter.Auto (sys.argv)
+colorizer = DiffColorizer (formatter=formatter)
+UtilMains.process_multiple_files (FilterHelpers.filter_printer_function_no_newline (colorizer.colorize_diff))
diff --git a/test/shaping/hb-diff-filter-failures b/test/shaping/hb-diff-filter-failures
new file mode 100755
index 0000000..4fe218a
--- /dev/null
+++ b/test/shaping/hb-diff-filter-failures
@@ -0,0 +1,5 @@
+#!/usr/bin/python
+
+from hb_test_tools import *
+
+UtilMains.process_multiple_files (FilterHelpers.filter_printer_function_no_newline (DiffFilters.filter_failures))
diff --git a/test/shaping/hb-diff-ngrams b/test/shaping/hb-diff-ngrams
new file mode 100755
index 0000000..a496447
--- /dev/null
+++ b/test/shaping/hb-diff-ngrams
@@ -0,0 +1,5 @@
+#!/usr/bin/python
+
+from hb_test_tools import *
+
+UtilMains.process_multiple_files (DiffSinks.print_ngrams)
diff --git a/test/shaping/hb-diff-stat b/test/shaping/hb-diff-stat
new file mode 100755
index 0000000..81626e1
--- /dev/null
+++ b/test/shaping/hb-diff-stat
@@ -0,0 +1,5 @@
+#!/usr/bin/python
+
+from hb_test_tools import *
+
+UtilMains.process_multiple_files (DiffSinks.print_stat)
diff --git a/test/shaping/hb-manifest-read b/test/shaping/hb-manifest-read
new file mode 100755
index 0000000..f486bcc
--- /dev/null
+++ b/test/shaping/hb-manifest-read
@@ -0,0 +1,5 @@
+#!/usr/bin/python
+
+from hb_test_tools import *
+
+UtilMains.process_multiple_args (FilterHelpers.filter_printer_function (Manifest.read), mnemonic="DIR")
diff --git a/test/shaping/hb-manifest-update b/test/shaping/hb-manifest-update
new file mode 100755
index 0000000..b963f22
--- /dev/null
+++ b/test/shaping/hb-manifest-update
@@ -0,0 +1,5 @@
+#!/usr/bin/python
+
+from hb_test_tools import *
+
+UtilMains.process_multiple_args (Manifest.update_recursive, mnemonic="DIR")
diff --git a/test/shaping/hb-unicode-decode b/test/shaping/hb-unicode-decode
new file mode 100755
index 0000000..5b00eae
--- /dev/null
+++ b/test/shaping/hb-unicode-decode
@@ -0,0 +1,5 @@
+#!/usr/bin/python
+
+from hb_test_tools import *
+
+UtilMains.filter_multiple_strings_or_stdin (Unicode.decode, "UNICODE_STRING")
diff --git a/test/shaping/hb-unicode-encode b/test/shaping/hb-unicode-encode
new file mode 100755
index 0000000..11bf365
--- /dev/null
+++ b/test/shaping/hb-unicode-encode
@@ -0,0 +1,5 @@
+#!/usr/bin/python
+
+from hb_test_tools import *
+
+UtilMains.filter_multiple_strings_or_stdin (Unicode.encode, "UNICODE_STRING", '')
diff --git a/test/shaping/hb-unicode-prettyname b/test/shaping/hb-unicode-prettyname
new file mode 100755
index 0000000..ecc26cc
--- /dev/null
+++ b/test/shaping/hb-unicode-prettyname
@@ -0,0 +1,6 @@
+#!/usr/bin/python
+
+from hb_test_tools import *
+
+UtilMains.filter_multiple_strings_or_stdin (Unicode.pretty_names, "UNICODE_CODEPOINTS", \
+ concat_separator = ' ')
diff --git a/test/shaping/hb_test_tools.py b/test/shaping/hb_test_tools.py
new file mode 100644
index 0000000..ce46588
--- /dev/null
+++ b/test/shaping/hb_test_tools.py
@@ -0,0 +1,516 @@
+#!/usr/bin/python
+
+import sys, os, re, difflib, unicodedata, errno, cgi
+from itertools import *
+
+diff_symbols = "-+=*&^%$#@!~/"
+diff_colors = ['red', 'green', 'blue']
+
+class ColorFormatter:
+
+ class Null:
+ @staticmethod
+ def start_color (c): return ''
+ @staticmethod
+ def end_color (): return ''
+ @staticmethod
+ def escape (s): return s
+ @staticmethod
+ def newline (): return '\n'
+
+ class ANSI:
+ @staticmethod
+ def start_color (c):
+ return {
+ 'red': '\033[41;37;1m',
+ 'green': '\033[42;37;1m',
+ 'blue': '\033[44;37;1m',
+ }[c]
+ @staticmethod
+ def end_color ():
+ return '\033[m'
+ @staticmethod
+ def escape (s): return s
+ @staticmethod
+ def newline (): return '\n'
+
+ class HTML:
+ @staticmethod
+ def start_color (c):
+ return '<span style="background:%s">' % c
+ @staticmethod
+ def end_color ():
+ return '</span>'
+ @staticmethod
+ def escape (s): return cgi.escape (s)
+ @staticmethod
+ def newline (): return '<br/>\n'
+
+ @staticmethod
+ def Auto (argv = [], out = sys.stdout):
+ format = ColorFormatter.ANSI
+ if "--format" in argv:
+ argv.remove ("--format")
+ format = ColorFormatter.ANSI
+ if "--format=ansi" in argv:
+ argv.remove ("--format=ansi")
+ format = ColorFormatter.ANSI
+ if "--format=html" in argv:
+ argv.remove ("--format=html")
+ format = ColorFormatter.HTML
+ if "--no-format" in argv:
+ argv.remove ("--no-format")
+ format = ColorFormatter.Null
+ return format
+
+
+class DiffColorizer:
+
+ diff_regex = re.compile ('([a-za-z0-9_]*)([^a-za-z0-9_]?)')
+
+ def __init__ (self, formatter, colors=diff_colors, symbols=diff_symbols):
+ self.formatter = formatter
+ self.colors = colors
+ self.symbols = symbols
+
+ def colorize_lines (self, lines):
+ lines = (l if l else '' for l in lines)
+ ss = [self.diff_regex.sub (r'\1\n\2\n', l).splitlines (True) for l in lines]
+ oo = ["",""]
+ st = [False, False]
+ for l in difflib.Differ().compare (*ss):
+ if l[0] == '?':
+ continue
+ if l[0] == ' ':
+ for i in range(2):
+ if st[i]:
+ oo[i] += self.formatter.end_color ()
+ st[i] = False
+ oo = [o + self.formatter.escape (l[2:]) for o in oo]
+ continue
+ if l[0] in self.symbols:
+ i = self.symbols.index (l[0])
+ if not st[i]:
+ oo[i] += self.formatter.start_color (self.colors[i])
+ st[i] = True
+ oo[i] += self.formatter.escape (l[2:])
+ continue
+ for i in range(2):
+ if st[i]:
+ oo[i] += self.formatter.end_color ()
+ st[i] = False
+ oo = [o.replace ('\n', '') for o in oo]
+ return [s1+s2+self.formatter.newline () for (s1,s2) in zip (self.symbols, oo) if s2]
+
+ def colorize_diff (self, f):
+ lines = [None, None]
+ for l in f:
+ if l[0] not in self.symbols:
+ yield self.formatter.escape (l).replace ('\n', self.formatter.newline ())
+ continue
+ i = self.symbols.index (l[0])
+ if lines[i]:
+ # Flush
+ for line in self.colorize_lines (lines):
+ yield line
+ lines = [None, None]
+ lines[i] = l[1:]
+ if (all (lines)):
+ # Flush
+ for line in self.colorize_lines (lines):
+ yield line
+ lines = [None, None]
+ if (any (lines)):
+ # Flush
+ for line in self.colorize_lines (lines):
+ yield line
+
+
+class ZipDiffer:
+
+ @staticmethod
+ def diff_files (files, symbols=diff_symbols):
+ files = tuple (files) # in case it's a generator, copy it
+ try:
+ for lines in izip_longest (*files):
+ if all (lines[0] == line for line in lines[1:]):
+ sys.stdout.writelines ([" ", lines[0]])
+ continue
+
+ for i, l in enumerate (lines):
+ if l:
+ sys.stdout.writelines ([symbols[i], l])
+ except IOError as e:
+ if e.errno != errno.EPIPE:
+ print >> sys.stderr, "%s: %s: %s" % (sys.argv[0], e.filename, e.strerror)
+ sys.exit (1)
+
+
+class DiffFilters:
+
+ @staticmethod
+ def filter_failures (f):
+ for key, lines in DiffHelpers.separate_test_cases (f):
+ lines = list (lines)
+ if not DiffHelpers.test_passed (lines):
+ for l in lines: yield l
+
+class Stat:
+
+ def __init__ (self):
+ self.count = 0
+ self.freq = 0
+
+ def add (self, test):
+ self.count += 1
+ self.freq += test.freq
+
+class Stats:
+
+ def __init__ (self):
+ self.passed = Stat ()
+ self.failed = Stat ()
+ self.total = Stat ()
+
+ def add (self, test):
+ self.total.add (test)
+ if test.passed:
+ self.passed.add (test)
+ else:
+ self.failed.add (test)
+
+ def mean (self):
+ return float (self.passed.count) / self.total.count
+
+ def variance (self):
+ return (float (self.passed.count) / self.total.count) * \
+ (float (self.failed.count) / self.total.count)
+
+ def stddev (self):
+ return self.variance () ** .5
+
+ def zscore (self, population):
+ """Calculate the standard score.
+ Population is the Stats for population.
+ Self is Stats for sample.
+ Returns larger absolute value if sample is highly unlikely to be random.
+ Anything outside of -3..+3 is very unlikely to be random.
+ See: http://en.wikipedia.org/wiki/Standard_score"""
+
+ return (self.mean () - population.mean ()) / population.stddev ()
+
+
+
+
+class DiffSinks:
+
+ @staticmethod
+ def print_stat (f):
+ passed = 0
+ failed = 0
+ # XXX port to Stats, but that would really slow us down here
+ for key, lines in DiffHelpers.separate_test_cases (f):
+ if DiffHelpers.test_passed (lines):
+ passed += 1
+ else:
+ failed += 1
+ total = passed + failed
+ print "%d out of %d tests passed. %d failed (%g%%)" % (passed, total, failed, 100. * failed / total)
+
+ @staticmethod
+ def print_ngrams (f, ns=(1,2,3)):
+ gens = tuple (Ngram.generator (n) for n in ns)
+ allstats = Stats ()
+ allgrams = {}
+ for key, lines in DiffHelpers.separate_test_cases (f):
+ test = Test (lines)
+ allstats.add (test)
+
+ for gen in gens:
+ for ngram in gen (test.unicodes):
+ if ngram not in allgrams:
+ allgrams[ngram] = Stats ()
+ allgrams[ngram].add (test)
+
+ importantgrams = {}
+ for ngram, stats in allgrams.iteritems ():
+ if stats.failed.count >= 30: # for statistical reasons
+ importantgrams[ngram] = stats
+ allgrams = importantgrams
+ del importantgrams
+
+ for ngram, stats in allgrams.iteritems ():
+ print "zscore: %9f failed: %6d passed: %6d ngram: <%s>" % (stats.zscore (allstats), stats.failed.count, stats.passed.count, ','.join ("U+%04X" % u for u in ngram))
+
+
+
+class Test:
+
+ def __init__ (self, lines):
+ self.freq = 1
+ self.passed = True
+ self.identifier = None
+ self.text = None
+ self.unicodes = None
+ self.glyphs = None
+ for l in lines:
+ symbol = l[0]
+ if symbol != ' ':
+ self.passed = False
+ i = 1
+ if ':' in l:
+ i = l.index (':')
+ if not self.identifier:
+ self.identifier = l[1:i]
+ i = i + 2 # Skip colon and space
+ j = -1
+ if l[j] == '\n':
+ j -= 1
+ brackets = l[i] + l[j]
+ l = l[i+1:-2]
+ if brackets == '()':
+ self.text = l
+ elif brackets == '<>':
+ self.unicodes = Unicode.parse (l)
+ elif brackets == '[]':
+ # XXX we don't handle failed tests here
+ self.glyphs = l
+
+
+class DiffHelpers:
+
+ @staticmethod
+ def separate_test_cases (f):
+ '''Reads lines from f, and if the lines have identifiers, ie.
+ have a colon character, groups them by identifier,
+ yielding lists of all lines with the same identifier.'''
+
+ def identifier (l):
+ if ':' in l[1:]:
+ return l[1:l.index (':')]
+ return l
+ return groupby (f, key=identifier)
+
+ @staticmethod
+ def test_passed (lines):
+ lines = list (lines)
+ # XXX This is a hack, but does the job for now.
+ if any (l.find("space|space") >= 0 for l in lines): return True
+ if any (l.find("uni25CC") >= 0 for l in lines): return True
+ if any (l.find("dottedcircle") >= 0 for l in lines): return True
+ return all (l[0] == ' ' for l in lines)
+
+
+class FilterHelpers:
+
+ @staticmethod
+ def filter_printer_function (filter_callback):
+ def printer (f):
+ for line in filter_callback (f):
+ print line
+ return printer
+
+ @staticmethod
+ def filter_printer_function_no_newline (filter_callback):
+ def printer (f):
+ for line in filter_callback (f):
+ sys.stdout.writelines ([line])
+ return printer
+
+
+class Ngram:
+
+ @staticmethod
+ def generator (n):
+
+ def gen (f):
+ l = []
+ for x in f:
+ l.append (x)
+ if len (l) == n:
+ yield tuple (l)
+ l[:1] = []
+
+ gen.n = n
+ return gen
+
+
+class UtilMains:
+
+ @staticmethod
+ def process_multiple_files (callback, mnemonic = "FILE"):
+
+ if "--help" in sys.argv:
+ print "Usage: %s %s..." % (sys.argv[0], mnemonic)
+ sys.exit (1)
+
+ try:
+ files = sys.argv[1:] if len (sys.argv) > 1 else ['-']
+ for s in files:
+ callback (FileHelpers.open_file_or_stdin (s))
+ except IOError as e:
+ if e.errno != errno.EPIPE:
+ print >> sys.stderr, "%s: %s: %s" % (sys.argv[0], e.filename, e.strerror)
+ sys.exit (1)
+
+ @staticmethod
+ def process_multiple_args (callback, mnemonic):
+
+ if len (sys.argv) == 1 or "--help" in sys.argv:
+ print "Usage: %s %s..." % (sys.argv[0], mnemonic)
+ sys.exit (1)
+
+ try:
+ for s in sys.argv[1:]:
+ callback (s)
+ except IOError as e:
+ if e.errno != errno.EPIPE:
+ print >> sys.stderr, "%s: %s: %s" % (sys.argv[0], e.filename, e.strerror)
+ sys.exit (1)
+
+ @staticmethod
+ def filter_multiple_strings_or_stdin (callback, mnemonic, \
+ separator = " ", \
+ concat_separator = False):
+
+ if "--help" in sys.argv:
+ print "Usage:\n %s %s...\nor:\n %s\n\nWhen called with no arguments, input is read from standard input." \
+ % (sys.argv[0], mnemonic, sys.argv[0])
+ sys.exit (1)
+
+ try:
+ if len (sys.argv) == 1:
+ while (1):
+ line = sys.stdin.readline ()
+ if not len (line):
+ break
+ if line[-1] == '\n':
+ line = line[:-1]
+ print callback (line)
+ else:
+ args = sys.argv[1:]
+ if concat_separator != False:
+ args = [concat_separator.join (args)]
+ print separator.join (callback (x) for x in (args))
+ except IOError as e:
+ if e.errno != errno.EPIPE:
+ print >> sys.stderr, "%s: %s: %s" % (sys.argv[0], e.filename, e.strerror)
+ sys.exit (1)
+
+
+class Unicode:
+
+ @staticmethod
+ def decode (s):
+ return '<' + u','.join ("U+%04X" % ord (u) for u in unicode (s, 'utf-8')).encode ('utf-8') + '>'
+
+ @staticmethod
+ def parse (s):
+ s = re.sub (r"[<+>,\\uU\n ]", " ", s)
+ s = re.sub (r"0[xX]", " ", s)
+ return [int (x, 16) for x in s.split (' ') if len (x)]
+
+ @staticmethod
+ def encode (s):
+ return u''.join (unichr (x) for x in Unicode.parse (s)).encode ('utf-8')
+
+ shorthands = {
+ "ZERO WIDTH NON-JOINER": "ZWNJ",
+ "ZERO WIDTH JOINER": "ZWJ",
+ "NARROW NO-BREAK SPACE": "NNBSP",
+ "COMBINING GRAPHEME JOINER": "CGJ",
+ "LEFT-TO-RIGHT MARK": "LRM",
+ "RIGHT-TO-LEFT MARK": "RLM",
+ "LEFT-TO-RIGHT EMBEDDING": "LRE",
+ "RIGHT-TO-LEFT EMBEDDING": "RLE",
+ "POP DIRECTIONAL FORMATTING": "PDF",
+ "LEFT-TO-RIGHT OVERRIDE": "LRO",
+ "RIGHT-TO-LEFT OVERRIDE": "RLO",
+ }
+
+ @staticmethod
+ def pretty_name (u):
+ try:
+ s = unicodedata.name (u)
+ except ValueError:
+ return "XXX"
+ s = re.sub (".* LETTER ", "", s)
+ s = re.sub (".* VOWEL SIGN (.*)", r"\1-MATRA", s)
+ s = re.sub (".* SIGN ", "", s)
+ s = re.sub (".* COMBINING ", "", s)
+ if re.match (".* VIRAMA", s):
+ s = "HALANT"
+ if s in Unicode.shorthands:
+ s = Unicode.shorthands[s]
+ return s
+
+ @staticmethod
+ def pretty_names (s):
+ s = re.sub (r"[<+>\\uU]", " ", s)
+ s = re.sub (r"0[xX]", " ", s)
+ s = [unichr (int (x, 16)) for x in re.split ('[, \n]', s) if len (x)]
+ return u' + '.join (Unicode.pretty_name (x) for x in s).encode ('utf-8')
+
+
+class FileHelpers:
+
+ @staticmethod
+ def open_file_or_stdin (f):
+ if f == '-':
+ return sys.stdin
+ return file (f)
+
+
+class Manifest:
+
+ @staticmethod
+ def read (s, strict = True):
+
+ if not os.path.exists (s):
+ if strict:
+ print >> sys.stderr, "%s: %s does not exist" % (sys.argv[0], s)
+ sys.exit (1)
+ return
+
+ s = os.path.normpath (s)
+
+ if os.path.isdir (s):
+
+ try:
+ m = file (os.path.join (s, "MANIFEST"))
+ items = [x.strip () for x in m.readlines ()]
+ for f in items:
+ for p in Manifest.read (os.path.join (s, f)):
+ yield p
+ except IOError:
+ if strict:
+ print >> sys.stderr, "%s: %s does not exist" % (sys.argv[0], os.path.join (s, "MANIFEST"))
+ sys.exit (1)
+ return
+ else:
+ yield s
+
+ @staticmethod
+ def update_recursive (s):
+
+ for dirpath, dirnames, filenames in os.walk (s, followlinks=True):
+
+ for f in ["MANIFEST", "README", "LICENSE", "COPYING", "AUTHORS", "SOURCES", "ChangeLog"]:
+ if f in dirnames:
+ dirnames.remove (f)
+ if f in filenames:
+ filenames.remove (f)
+ dirnames.sort ()
+ filenames.sort ()
+ ms = os.path.join (dirpath, "MANIFEST")
+ print " GEN %s" % ms
+ m = open (ms, "w")
+ for f in filenames:
+ print >> m, f
+ for f in dirnames:
+ print >> m, f
+ for f in dirnames:
+ Manifest.update_recursive (os.path.join (dirpath, f))
+
+if __name__ == '__main__':
+ pass
diff --git a/util/Makefile.am b/util/Makefile.am
new file mode 100644
index 0000000..944b1aa
--- /dev/null
+++ b/util/Makefile.am
@@ -0,0 +1,74 @@
+# Process this file with automake to produce Makefile.in
+
+NULL =
+EXTRA_DIST =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+
+bin_PROGRAMS =
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/src/ \
+ -I$(top_builddir)/src/ \
+ $(GLIB_CFLAGS) \
+ $(FREETYPE_CFLAGS) \
+ $(CAIRO_FT_CFLAGS) \
+ $(NULL)
+LDADD = \
+ $(top_builddir)/src/libharfbuzz.la \
+ -lm \
+ $(GLIB_LIBS) \
+ $(FREETYPE_LIBS) \
+ $(NULL)
+
+if HAVE_GLIB
+if HAVE_FREETYPE
+
+if HAVE_CAIRO_FT
+hb_view_SOURCES = \
+ hb-view.cc \
+ options.cc \
+ options.hh \
+ main-font-text.hh \
+ shape-consumer.hh \
+ ansi-print.cc \
+ ansi-print.hh \
+ helper-cairo.cc \
+ helper-cairo.hh \
+ helper-cairo-ansi.cc \
+ helper-cairo-ansi.hh \
+ view-cairo.cc \
+ view-cairo.hh \
+ $(NULL)
+hb_view_LDADD = \
+ $(LDADD) \
+ $(CAIRO_LIBS) \
+ $(CAIRO_FT_LIBS) \
+ $(NULL)
+bin_PROGRAMS += hb-view
+endif # HAVE_CAIRO_FT
+
+hb_shape_SOURCES = \
+ hb-shape.cc \
+ options.cc \
+ options.hh \
+ main-font-text.hh \
+ shape-consumer.hh \
+ $(NULL)
+bin_PROGRAMS += hb-shape
+
+if HAVE_OT
+hb_ot_shape_closure_SOURCES = \
+ hb-ot-shape-closure.cc \
+ options.cc \
+ options.hh \
+ main-font-text.hh \
+ $(NULL)
+bin_PROGRAMS += hb-ot-shape-closure
+endif # HAVE_OT
+
+endif # HAVE_FREETYPE
+endif # HAVE_GLIB
+
+-include $(top_srcdir)/git.mk
diff --git a/util/Makefile.in b/util/Makefile.in
new file mode 100644
index 0000000..b796ada
--- /dev/null
+++ b/util/Makefile.in
@@ -0,0 +1,710 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Process this file with automake to produce Makefile.in
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3)
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@am__append_1 = hb-view
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@am__append_2 = hb-shape
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@@HAVE_OT_TRUE@am__append_3 = hb-ot-shape-closure
+subdir = util
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@am__EXEEXT_1 = hb-view$(EXEEXT)
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@am__EXEEXT_2 = hb-shape$(EXEEXT)
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@@HAVE_OT_TRUE@am__EXEEXT_3 = hb-ot-shape-closure$(EXEEXT)
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am__hb_ot_shape_closure_SOURCES_DIST = hb-ot-shape-closure.cc \
+ options.cc options.hh main-font-text.hh
+am__objects_1 =
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@@HAVE_OT_TRUE@am_hb_ot_shape_closure_OBJECTS = hb-ot-shape-closure.$(OBJEXT) \
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@@HAVE_OT_TRUE@ options.$(OBJEXT) \
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@@HAVE_OT_TRUE@ $(am__objects_1)
+hb_ot_shape_closure_OBJECTS = $(am_hb_ot_shape_closure_OBJECTS)
+hb_ot_shape_closure_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+hb_ot_shape_closure_DEPENDENCIES = $(top_builddir)/src/libharfbuzz.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__hb_shape_SOURCES_DIST = hb-shape.cc options.cc options.hh \
+ main-font-text.hh shape-consumer.hh
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@am_hb_shape_OBJECTS = \
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ hb-shape.$(OBJEXT) \
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ options.$(OBJEXT) \
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ $(am__objects_1)
+hb_shape_OBJECTS = $(am_hb_shape_OBJECTS)
+hb_shape_LDADD = $(LDADD)
+hb_shape_DEPENDENCIES = $(top_builddir)/src/libharfbuzz.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am__hb_view_SOURCES_DIST = hb-view.cc options.cc options.hh \
+ main-font-text.hh shape-consumer.hh ansi-print.cc \
+ ansi-print.hh helper-cairo.cc helper-cairo.hh \
+ helper-cairo-ansi.cc helper-cairo-ansi.hh view-cairo.cc \
+ view-cairo.hh
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@am_hb_view_OBJECTS = hb-view.$(OBJEXT) \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ options.$(OBJEXT) \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ ansi-print.$(OBJEXT) \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ helper-cairo.$(OBJEXT) \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ helper-cairo-ansi.$(OBJEXT) \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ view-cairo.$(OBJEXT) \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ $(am__objects_1)
+hb_view_OBJECTS = $(am_hb_view_OBJECTS)
+am__DEPENDENCIES_2 = $(top_builddir)/src/libharfbuzz.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@hb_view_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ $(am__DEPENDENCIES_1) \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ $(am__DEPENDENCIES_1) \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(hb_ot_shape_closure_SOURCES) $(hb_shape_SOURCES) \
+ $(hb_view_SOURCES)
+DIST_SOURCES = $(am__hb_ot_shape_closure_SOURCES_DIST) \
+ $(am__hb_shape_SOURCES_DIST) $(am__hb_view_SOURCES_DIST)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FT_CFLAGS = @CAIRO_FT_CFLAGS@
+CAIRO_FT_LIBS = @CAIRO_FT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CORETEXT_CFLAGS = @CORETEXT_CFLAGS@
+CORETEXT_LIBS = @CORETEXT_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GRAPHITE2_CFLAGS = @GRAPHITE2_CFLAGS@
+GRAPHITE2_LIBS = @GRAPHITE2_LIBS@
+GREP = @GREP@
+GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
+GTHREAD_LIBS = @GTHREAD_LIBS@
+HB_LIBTOOL_VERSION_INFO = @HB_LIBTOOL_VERSION_INFO@
+HB_VERSION = @HB_VERSION@
+HB_VERSION_MAJOR = @HB_VERSION_MAJOR@
+HB_VERSION_MICRO = @HB_VERSION_MICRO@
+HB_VERSION_MINOR = @HB_VERSION_MINOR@
+ICU_CFLAGS = @ICU_CFLAGS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UNISCRIBE_CFLAGS = @UNISCRIBE_CFLAGS@
+UNISCRIBE_LIBS = @UNISCRIBE_LIBS@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+EXTRA_DIST =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/src/ \
+ -I$(top_builddir)/src/ \
+ $(GLIB_CFLAGS) \
+ $(FREETYPE_CFLAGS) \
+ $(CAIRO_FT_CFLAGS) \
+ $(NULL)
+
+LDADD = \
+ $(top_builddir)/src/libharfbuzz.la \
+ -lm \
+ $(GLIB_LIBS) \
+ $(FREETYPE_LIBS) \
+ $(NULL)
+
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@hb_view_SOURCES = \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ hb-view.cc \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ options.cc \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ options.hh \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ main-font-text.hh \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ shape-consumer.hh \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ ansi-print.cc \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ ansi-print.hh \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ helper-cairo.cc \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ helper-cairo.hh \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ helper-cairo-ansi.cc \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ helper-cairo-ansi.hh \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ view-cairo.cc \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ view-cairo.hh \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ $(NULL)
+
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@hb_view_LDADD = \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ $(LDADD) \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ $(CAIRO_LIBS) \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ $(CAIRO_FT_LIBS) \
+@HAVE_CAIRO_FT_TRUE@@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ $(NULL)
+
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@hb_shape_SOURCES = \
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ hb-shape.cc \
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ options.cc \
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ options.hh \
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ main-font-text.hh \
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ shape-consumer.hh \
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@ $(NULL)
+
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@@HAVE_OT_TRUE@hb_ot_shape_closure_SOURCES = \
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@@HAVE_OT_TRUE@ hb-ot-shape-closure.cc \
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@@HAVE_OT_TRUE@ options.cc \
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@@HAVE_OT_TRUE@ options.hh \
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@@HAVE_OT_TRUE@ main-font-text.hh \
+@HAVE_FREETYPE_TRUE@@HAVE_GLIB_TRUE@@HAVE_OT_TRUE@ $(NULL)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits util/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnits util/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+installcheck-binPROGRAMS: $(bin_PROGRAMS)
+ bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \
+ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
+ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
+ esac; \
+ f=`echo "$$p" | \
+ sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ for opt in --help --version; do \
+ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \
+ 2>c$${pid}_.err </dev/null \
+ && test -n "`cat c$${pid}_.out`" \
+ && test -z "`cat c$${pid}_.err`"; then :; \
+ else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
+ done; \
+ done; rm -f c$${pid}_.???; exit $$bad
+hb-ot-shape-closure$(EXEEXT): $(hb_ot_shape_closure_OBJECTS) $(hb_ot_shape_closure_DEPENDENCIES)
+ @rm -f hb-ot-shape-closure$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(hb_ot_shape_closure_OBJECTS) $(hb_ot_shape_closure_LDADD) $(LIBS)
+hb-shape$(EXEEXT): $(hb_shape_OBJECTS) $(hb_shape_DEPENDENCIES)
+ @rm -f hb-shape$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(hb_shape_OBJECTS) $(hb_shape_LDADD) $(LIBS)
+hb-view$(EXEEXT): $(hb_view_OBJECTS) $(hb_view_DEPENDENCIES)
+ @rm -f hb-view$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(hb_view_OBJECTS) $(hb_view_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ansi-print.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hb-ot-shape-closure.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hb-shape.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hb-view.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helper-cairo-ansi.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helper-cairo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/view-cairo.Po@am__quote@
+
+.cc.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am: installcheck-binPROGRAMS
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-libtool ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am \
+ installcheck-binPROGRAMS installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-binPROGRAMS
+
+
+-include $(top_srcdir)/git.mk
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/util/ansi-print.cc b/util/ansi-print.cc
new file mode 100644
index 0000000..873bee8
--- /dev/null
+++ b/util/ansi-print.cc
@@ -0,0 +1,413 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "ansi-print.hh"
+
+#include <assert.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#include <stdio.h>
+#include <math.h>
+#include <fcntl.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h> /* for isatty() */
+#endif
+
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
+
+#define CELL_W 8
+#define CELL_H (2 * CELL_W)
+
+struct color_diff_t
+{
+ int dot (const color_diff_t &o)
+ { return v[0]*o.v[0] + v[1]*o.v[1] + v[2]*o.v[2] + v[3]*o.v[3]; }
+
+ int v[4];
+};
+
+struct color_t
+{
+ static color_t from_ansi (unsigned int x)
+ {
+ color_t c = {(0xFF<<24) | ((0xFF*(x&1))<<16) | ((0xFF*((x >> 1)&1))<<8) | (0xFF*((x >> 2)&1))};
+ return c;
+ }
+ unsigned int to_ansi (void)
+ {
+ return ((v >> 23) & 1) | ((v >> 14)&2) | ((v >> 5)&4);
+ }
+
+ color_diff_t diff (const color_t &o)
+ {
+ color_diff_t d;
+ for (unsigned int i = 0; i < 4; i++)
+ d.v[i] = (int) ((v >> (i*8))&0xFF) - (int) ((o.v >> (i*8))&0xFF);
+ return d;
+ }
+
+ uint32_t v;
+};
+
+struct image_t
+{
+ public:
+
+ image_t (unsigned int width_,
+ unsigned int height_,
+ const uint32_t *data_,
+ unsigned int stride_) :
+ width (width_),
+ height (height_),
+ own_data (false),
+ data ((color_t *) data_),
+ stride (stride_) {}
+ image_t (unsigned int width_,
+ unsigned int height_) :
+ width (width_),
+ height (height_),
+ own_data (true),
+ data ((color_t *) malloc (sizeof (data[0]) * width * height)),
+ stride (width) {}
+ ~image_t (void)
+ { if (own_data) free (data); }
+
+ color_t &operator () (unsigned int x, unsigned int y)
+ { return data[x + y * stride]; }
+
+ color_t operator () (unsigned int x, unsigned int y) const
+ { return data[x + y * stride]; }
+
+ void
+ copy_sub_image (const image_t &s,
+ unsigned int x, unsigned int y,
+ unsigned int w, unsigned int h)
+ {
+ assert (x < width);
+ assert (y < height);
+ for (unsigned int row = 0; row < h; row++) {
+ color_t *p = data + x + MIN (y + row, height - 1) * stride;
+ color_t *q = s.data + row * s.stride;
+ if (x + w <= width)
+ for (unsigned int col = 0; col < w; col++)
+ *q++ = *p++;
+ else {
+ unsigned int limit = width - x;
+ for (unsigned int col = 0; col < limit; col++)
+ *q++ = *p++;
+ p--;
+ for (unsigned int col = limit; col < w; col++)
+ *q++ = *p;
+ }
+ }
+ }
+
+ const unsigned int width;
+ const unsigned int height;
+
+ private:
+ bool own_data;
+ color_t * const data;
+ const unsigned int stride;
+};
+
+struct biimage_t
+{
+ public:
+
+ biimage_t (unsigned int width, unsigned int height) :
+ width (width),
+ height (height),
+ data ((uint8_t *) malloc (sizeof (data[0]) * width * height)) {}
+ ~biimage_t (void)
+ { free (data); }
+
+ void set (const image_t &image)
+ {
+ assert (image.width == width);
+ assert (image.height == height);
+ int freq[8] = {0};
+ for (unsigned int y = 0; y < height; y++)
+ for (unsigned int x = 0; x < width; x++) {
+ color_t c = image (x, y);
+ freq[c.to_ansi ()]++;
+ }
+ bg = 0;
+ for (unsigned int i = 1; i < 8; i++)
+ if (freq[bg] < freq[i])
+ bg = i;
+ fg = 0;
+ for (unsigned int i = 1; i < 8; i++)
+ if (i != bg && freq[fg] < freq[i])
+ fg = i;
+ if (fg == bg || freq[fg] == 0) {
+ fg = bg;
+ unicolor = true;
+ }
+ else
+ unicolor = false;
+
+ /* Set the data... */
+
+ if (unicolor) {
+ memset (data, 0, sizeof (data[0]) * width * height);
+ return;
+ }
+
+ color_t bgc = color_t::from_ansi (bg);
+ color_t fgc = color_t::from_ansi (fg);
+ color_diff_t diff = fgc.diff (bgc);
+ int dd = diff.dot (diff);
+ for (unsigned int y = 0; y < height; y++)
+ for (unsigned int x = 0; x < width; x++) {
+ int d = diff.dot (image (x, y).diff (bgc));
+ (*this)(x, y) = d < 0 ? 0 : d > dd ? 255 : lround (d * 255. / dd);
+ }
+ }
+
+ uint8_t &operator () (unsigned int x, unsigned int y)
+ { return data[x + y * width]; }
+
+ uint8_t operator () (unsigned int x, unsigned int y) const
+ { return data[x + y * width]; }
+
+ const unsigned int width;
+ const unsigned int height;
+ unsigned int bg;
+ unsigned int fg;
+ bool unicolor;
+
+ private:
+ uint8_t * const data;
+};
+
+const char *
+block_best (const biimage_t &bi, unsigned int *score, bool *inverse)
+{
+ assert (bi.width <= CELL_W);
+ assert (bi.height <= CELL_H);
+
+ unsigned int row_sum[CELL_H] = {0};
+ unsigned int col_sum[CELL_W] = {0};
+ unsigned int row_sum_i[CELL_H] = {0};
+ unsigned int col_sum_i[CELL_W] = {0};
+ unsigned int quad[2][2] = {{0}};
+ unsigned int quad_i[2][2] = {{0}};
+ unsigned int total = 0;
+ unsigned int total_i = 0;
+ for (unsigned int y = 0; y < bi.height; y++)
+ for (unsigned int x = 0; x < bi.width; x++) {
+ unsigned int c = bi (x, y);
+ unsigned int c_i = 255 - c;
+ row_sum[y] += c;
+ row_sum_i[y] += c_i;
+ col_sum[x] += c;
+ col_sum_i[x] += c_i;
+ quad[2 * y / bi.height][2 * x / bi.width] += c;
+ quad_i[2 * y / bi.height][2 * x / bi.width] += c_i;
+ total += c;
+ total_i += c_i;
+ }
+
+ /* Make the sums cummulative */
+ for (unsigned int i = 1; i < bi.height; i++) {
+ row_sum[i] += row_sum[i - 1];
+ row_sum_i[i] += row_sum_i[i - 1];
+ }
+ for (unsigned int i = 1; i < bi.width; i++) {
+ col_sum[i] += col_sum[i - 1];
+ col_sum_i[i] += col_sum_i[i - 1];
+ }
+
+ const char *best_c = " ";
+
+ /* Maybe empty is better! */
+ if (total < *score) {
+ *score = total;
+ *inverse = false;
+ best_c = " ";
+ }
+ /* Maybe full is better! */
+ if (total_i < *score) {
+ *score = total_i;
+ *inverse = true;
+ best_c = " ";
+ }
+
+ /* Find best lower line */
+ if (1) {
+ unsigned int best_s = (unsigned int) -1;
+ bool best_inv = false;
+ int best_i = 0;
+ for (unsigned int i = 0; i < bi.height - 1; i++)
+ {
+ unsigned int s;
+ s = row_sum[i] + total_i - row_sum_i[i];
+ if (s < best_s) {
+ best_s = s;
+ best_i = i;
+ best_inv = false;
+ }
+ s = row_sum_i[i] + total - row_sum[i];
+ if (s < best_s) {
+ best_s = s;
+ best_i = i;
+ best_inv = true;
+ }
+ }
+ if (best_s < *score) {
+ static const char *lower[7] = {"▁", "▂", "▃", "▄", "▅", "▆", "▇"};
+ unsigned int which = lround (((best_i + 1) * 8) / bi.height);
+ if (1 <= which && which <= 7) {
+ *score = best_s;
+ *inverse = best_inv;
+ best_c = lower[7 - which];
+ }
+ }
+ }
+
+ /* Find best left line */
+ if (1) {
+ unsigned int best_s = (unsigned int) -1;
+ bool best_inv = false;
+ int best_i = 0;
+ for (unsigned int i = 0; i < bi.width - 1; i++)
+ {
+ unsigned int s;
+ s = col_sum[i] + total_i - col_sum_i[i];
+ if (s < best_s) {
+ best_s = s;
+ best_i = i;
+ best_inv = true;
+ }
+ s = col_sum_i[i] + total - col_sum[i];
+ if (s < best_s) {
+ best_s = s;
+ best_i = i;
+ best_inv = false;
+ }
+ }
+ if (best_s < *score) {
+ static const char *left [7] = {"▏", "▎", "▍", "▌", "▋", "▊", "▉"};
+ unsigned int which = lround (((best_i + 1) * 8) / bi.width);
+ if (1 <= which && which <= 7) {
+ *score = best_s;
+ *inverse = best_inv;
+ best_c = left[which - 1];
+ }
+ }
+ }
+
+ /* Find best quadrant */
+ if (1) {
+ unsigned int q = 0;
+ unsigned int qs = 0;
+ for (unsigned int i = 0; i < 2; i++)
+ for (unsigned int j = 0; j < 2; j++)
+ if (quad[i][j] > quad_i[i][j]) {
+ q += 1 << (2 * i + j);
+ qs += quad_i[i][j];
+ } else
+ qs += quad[i][j];
+ if (qs < *score) {
+ const char *c = NULL;
+ bool inv = false;
+ switch (q) {
+ case 1: c = "▟"; inv = true; break;
+ case 2: c = "▙"; inv = true; break;
+ case 4: c = "▖"; inv = false; break;
+ case 8: c = "▗"; inv = false; break;
+ case 9: c = "▚"; inv = false; break;
+ case 6: c = "▞"; inv = false; break;
+ case 7: c = "▜"; inv = true; break;
+ case 11: c = "▜"; inv = true; break;
+ case 13: c = "▙"; inv = true; break;
+ case 14: c = "▟"; inv = true; break;
+ }
+ if (c) {
+ *score = qs;
+ *inverse = inv;
+ best_c = c;
+ }
+ }
+ }
+
+ return best_c;
+}
+
+void
+ansi_print_image_rgb24 (const uint32_t *data,
+ unsigned int width,
+ unsigned int height,
+ unsigned int stride)
+{
+ image_t image (width, height, data, stride);
+
+ unsigned int rows = (height + CELL_H - 1) / CELL_H;
+ unsigned int cols = (width + CELL_W - 1) / CELL_W;
+ image_t cell (CELL_W, CELL_H);
+ biimage_t bi (CELL_W, CELL_H);
+ unsigned int last_bg = -1, last_fg = -1;
+ for (unsigned int row = 0; row < rows; row++) {
+ for (unsigned int col = 0; col < cols; col++) {
+ image.copy_sub_image (cell, col * CELL_W, row * CELL_H, CELL_W, CELL_H);
+ bi.set (cell);
+ if (bi.unicolor) {
+ if (last_bg != bi.bg) {
+ printf ("\e[%dm", 40 + bi.bg);
+ last_bg = bi.bg;
+ }
+ printf (" ");
+ } else {
+ /* Figure out the closest character to the biimage */
+ unsigned int score = (unsigned int) -1;
+ bool inverse = false;
+ const char *c = block_best (bi, &score, &inverse);
+ if (inverse) {
+ if (last_bg != bi.fg || last_fg != bi.bg) {
+ printf ("\e[%d;%dm", 30 + bi.bg, 40 + bi.fg);
+ last_bg = bi.fg;
+ last_fg = bi.bg;
+ }
+ } else {
+ if (last_bg != bi.bg || last_fg != bi.fg) {
+ printf ("\e[%d;%dm", 40 + bi.bg, 30 + bi.fg);
+ last_bg = bi.bg;
+ last_fg = bi.fg;
+ }
+ }
+ printf ("%s", c);
+ }
+ }
+ printf ("\e[0m\n"); /* Reset */
+ last_bg = last_fg = -1;
+ }
+}
diff --git a/util/ansi-print.hh b/util/ansi-print.hh
new file mode 100644
index 0000000..dad4d4c
--- /dev/null
+++ b/util/ansi-print.hh
@@ -0,0 +1,39 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef ANSI_PRINT_HH
+#define ANSI_PRINT_HH
+
+#include <hb.h> /* for int types */
+
+void
+ansi_print_image_rgb24 (const uint32_t *data,
+ unsigned int width,
+ unsigned int height,
+ unsigned int stride);
+
+
+#endif
diff --git a/util/hb-ot-shape-closure.cc b/util/hb-ot-shape-closure.cc
new file mode 100644
index 0000000..6dce7a1
--- /dev/null
+++ b/util/hb-ot-shape-closure.cc
@@ -0,0 +1,112 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "main-font-text.hh"
+
+#ifdef HAVE_FREETYPE
+#include <hb-ft.h>
+#endif
+
+struct shape_closure_consumer_t : option_group_t
+{
+ shape_closure_consumer_t (option_parser_t *parser) :
+ shaper (parser),
+ show_glyph_names (true)
+ {
+ add_options (parser);
+ }
+
+ void add_options (struct option_parser_t *parser)
+ {
+ GOptionEntry entries[] =
+ {
+ {"no-glyph-names", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &this->show_glyph_names, "Use glyph indices instead of names", NULL},
+ {NULL}
+ };
+ parser->add_group (entries,
+ "format",
+ "Format options:",
+ "Options controlling output formatting",
+ this);
+ }
+
+ void init (const font_options_t *font_opts)
+ {
+ glyphs = hb_set_create ();
+ font = hb_font_reference (font_opts->get_font ());
+ failed = false;
+ }
+ void consume_line (hb_buffer_t *buffer,
+ const char *text,
+ unsigned int text_len)
+ {
+ hb_set_clear (glyphs);
+ shaper.shape_closure (text, text_len, font, buffer, glyphs);
+
+ if (hb_set_empty (glyphs))
+ return;
+
+ /* Print it out! */
+ bool first = true;
+ for (hb_codepoint_t i = -1; hb_set_next (glyphs, &i);)
+ if (hb_set_has (glyphs, i)) {
+ if (first)
+ first = false;
+ else
+ printf (" ");
+ char glyph_name[32];
+ if (show_glyph_names) {
+ hb_font_get_glyph_name (font, i, glyph_name, sizeof (glyph_name));
+ printf ("%s", glyph_name);
+ } else
+ printf ("%u", i);
+ }
+ }
+ void finish (const font_options_t *font_opts)
+ {
+ printf ("\n");
+ hb_font_destroy (font);
+ font = NULL;
+ hb_set_destroy (glyphs);
+ glyphs = NULL;
+ }
+
+ bool failed;
+
+ protected:
+ shape_options_t shaper;
+ hb_bool_t show_glyph_names;
+
+ hb_set_t *glyphs;
+ hb_font_t *font;
+};
+
+int
+main (int argc, char **argv)
+{
+ main_font_text_t<shape_closure_consumer_t> driver;
+ return driver.main (argc, argv);
+}
diff --git a/util/hb-shape.cc b/util/hb-shape.cc
new file mode 100644
index 0000000..b23519b
--- /dev/null
+++ b/util/hb-shape.cc
@@ -0,0 +1,97 @@
+/*
+ * Copyright © 2010 Behdad Esfahbod
+ * 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
+ */
+
+#include "main-font-text.hh"
+#include "shape-consumer.hh"
+
+struct output_buffer_t
+{
+ output_buffer_t (option_parser_t *parser)
+ : options (parser),
+ format (parser) {}
+
+ void init (const font_options_t *font_opts)
+ {
+ options.get_file_handle ();
+ gs = g_string_new (NULL);
+ line_no = 0;
+ font = hb_font_reference (font_opts->get_font ());
+ }
+ void new_line (void)
+ {
+ line_no++;
+ }
+ void consume_text (hb_buffer_t *buffer,
+ const char *text,
+ unsigned int text_len,
+ hb_bool_t utf8_clusters)
+ {
+ g_string_set_size (gs, 0);
+ format.serialize_buffer_of_text (buffer, line_no, text, text_len, font, utf8_clusters, gs);
+ fprintf (options.fp, "%s", gs->str);
+ }
+ void shape_failed (hb_buffer_t *buffer,
+ const char *text,
+ unsigned int text_len,
+ hb_bool_t utf8_clusters)
+ {
+ g_string_set_size (gs, 0);
+ format.serialize_message (line_no, "msg: all shapers failed", gs);
+ fprintf (options.fp, "%s", gs->str);
+ }
+ void consume_glyphs (hb_buffer_t *buffer,
+ const char *text,
+ unsigned int text_len,
+ hb_bool_t utf8_clusters)
+ {
+ g_string_set_size (gs, 0);
+ format.serialize_buffer_of_glyphs (buffer, line_no, text, text_len, font, utf8_clusters, gs);
+ fprintf (options.fp, "%s", gs->str);
+ }
+ void finish (const font_options_t *font_opts)
+ {
+ hb_font_destroy (font);
+ g_string_free (gs, true);
+ gs = NULL;
+ font = NULL;
+ }
+
+ protected:
+ output_options_t options;
+ format_options_t format;
+
+ GString *gs;
+ unsigned int line_no;
+ hb_font_t *font;
+};
+
+int
+main (int argc, char **argv)
+{
+ main_font_text_t<shape_consumer_t<output_buffer_t> > driver;
+ return driver.main (argc, argv);
+}
diff --git a/util/hb-view.cc b/util/hb-view.cc
new file mode 100644
index 0000000..26fad66
--- /dev/null
+++ b/util/hb-view.cc
@@ -0,0 +1,37 @@
+/*
+ * Copyright © 2010 Behdad Esfahbod
+ * 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
+ */
+
+#include "main-font-text.hh"
+#include "shape-consumer.hh"
+#include "view-cairo.hh"
+
+int
+main (int argc, char **argv)
+{
+ main_font_text_t<shape_consumer_t<view_cairo_t> > driver;
+ return driver.main (argc, argv);
+}
diff --git a/util/helper-cairo-ansi.cc b/util/helper-cairo-ansi.cc
new file mode 100644
index 0000000..f7c0660
--- /dev/null
+++ b/util/helper-cairo-ansi.cc
@@ -0,0 +1,102 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "helper-cairo-ansi.hh"
+#include "options.hh"
+
+#include "ansi-print.hh"
+
+
+cairo_status_t
+helper_cairo_surface_write_to_ansi_stream (cairo_surface_t *surface,
+ cairo_write_func_t write_func,
+ void *closure)
+{
+ unsigned int width = cairo_image_surface_get_width (surface);
+ unsigned int height = cairo_image_surface_get_height (surface);
+ if (cairo_image_surface_get_format (surface) != CAIRO_FORMAT_RGB24) {
+ cairo_surface_t *new_surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, height);
+ cairo_t *cr = cairo_create (new_surface);
+ if (cairo_image_surface_get_format (surface) == CAIRO_FORMAT_A8) {
+ cairo_set_source_rgb (cr, 0., 0., 0.);
+ cairo_paint (cr);
+ cairo_set_source_rgb (cr, 1., 1., 1.);
+ cairo_mask_surface (cr, surface, 0, 0);
+ } else {
+ cairo_set_source_rgb (cr, 1., 1., 1.);
+ cairo_paint (cr);
+ cairo_set_source_surface (cr, surface, 0, 0);
+ cairo_paint (cr);
+ }
+ cairo_destroy (cr);
+ surface = new_surface;
+ } else
+ cairo_surface_reference (surface);
+
+ unsigned int stride = cairo_image_surface_get_stride (surface);
+ const uint32_t *data = (uint32_t *) cairo_image_surface_get_data (surface);
+
+ /* We don't have rows to spare on the terminal window...
+ * Find the tight image top/bottom and only print in between. */
+
+ /* Use corner color as background color. */
+ uint32_t bg_color = * (uint32_t *) data;
+
+ /* Drop first row while empty */
+ while (height)
+ {
+ unsigned int i;
+ for (i = 0; i < width; i++)
+ if (data[i] != bg_color)
+ break;
+ if (i < width)
+ break;
+ data += stride / 4;
+ height--;
+ }
+
+ /* Drop last row while empty */
+ unsigned int orig_height = height;
+ while (height)
+ {
+ const uint32_t *row = data + (height - 1) * stride / 4;
+ unsigned int i;
+ for (i = 0; i < width; i++)
+ if (row[i] != bg_color)
+ break;
+ if (i < width)
+ break;
+ height--;
+ }
+ if (height < orig_height)
+ height++; /* Add one last blank row for padding. */
+
+ if (width && height)
+ ansi_print_image_rgb24 (data, width, height, stride / 4);
+
+ cairo_surface_destroy (surface);
+ return CAIRO_STATUS_SUCCESS;
+}
diff --git a/util/helper-cairo-ansi.hh b/util/helper-cairo-ansi.hh
new file mode 100644
index 0000000..eeaaa50
--- /dev/null
+++ b/util/helper-cairo-ansi.hh
@@ -0,0 +1,39 @@
+/*
+ * Copyright © 2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include <cairo.h>
+
+#ifndef HELPER_CAIRO_ANSI_HH
+#define HELPER_CAIRO_ANSI_HH
+
+
+cairo_status_t
+helper_cairo_surface_write_to_ansi_stream (cairo_surface_t *surface,
+ cairo_write_func_t write_func,
+ void *closure);
+
+
+#endif
diff --git a/util/helper-cairo.cc b/util/helper-cairo.cc
new file mode 100644
index 0000000..35340d1
--- /dev/null
+++ b/util/helper-cairo.cc
@@ -0,0 +1,453 @@
+/*
+ * Copyright © 2011 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 "helper-cairo.hh"
+
+#include <cairo-ft.h>
+#include <hb-ft.h>
+
+#include "helper-cairo-ansi.hh"
+#ifdef CAIRO_HAS_SVG_SURFACE
+# include <cairo-svg.h>
+#endif
+#ifdef CAIRO_HAS_PDF_SURFACE
+# include <cairo-pdf.h>
+#endif
+#ifdef CAIRO_HAS_PS_SURFACE
+# include <cairo-ps.h>
+# if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,6,0)
+# define HAS_EPS 1
+
+static cairo_surface_t *
+_cairo_eps_surface_create_for_stream (cairo_write_func_t write_func,
+ void *closure,
+ double width,
+ double height)
+{
+ cairo_surface_t *surface;
+
+ surface = cairo_ps_surface_create_for_stream (write_func, closure, width, height);
+ cairo_ps_surface_set_eps (surface, true);
+
+ return surface;
+}
+
+# else
+# undef HAS_EPS
+# endif
+#endif
+
+cairo_scaled_font_t *
+helper_cairo_create_scaled_font (const font_options_t *font_opts,
+ double font_size)
+{
+ hb_font_t *font = hb_font_reference (font_opts->get_font ());
+
+ cairo_font_face_t *cairo_face;
+ FT_Face ft_face = hb_ft_font_get_face (font);
+ if (!ft_face)
+ /* This allows us to get some boxes at least... */
+ cairo_face = cairo_toy_font_face_create ("@cairo:sans",
+ CAIRO_FONT_SLANT_NORMAL,
+ CAIRO_FONT_WEIGHT_NORMAL);
+ else
+ cairo_face = cairo_ft_font_face_create_for_ft_face (ft_face, 0);
+ cairo_matrix_t ctm, font_matrix;
+ cairo_font_options_t *font_options;
+
+ cairo_matrix_init_identity (&ctm);
+ cairo_matrix_init_scale (&font_matrix,
+ font_size, font_size);
+ font_options = cairo_font_options_create ();
+ cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_NONE);
+ cairo_font_options_set_hint_metrics (font_options, CAIRO_HINT_METRICS_OFF);
+
+ cairo_scaled_font_t *scaled_font = cairo_scaled_font_create (cairo_face,
+ &font_matrix,
+ &ctm,
+ font_options);
+
+ cairo_font_options_destroy (font_options);
+ cairo_font_face_destroy (cairo_face);
+
+ static cairo_user_data_key_t key;
+ if (cairo_scaled_font_set_user_data (scaled_font,
+ &key,
+ (void *) font,
+ (cairo_destroy_func_t) hb_font_destroy))
+ hb_font_destroy (font);
+
+ return scaled_font;
+}
+
+
+struct finalize_closure_t {
+ void (*callback)(finalize_closure_t *);
+ cairo_surface_t *surface;
+ cairo_write_func_t write_func;
+ void *closure;
+};
+static cairo_user_data_key_t finalize_closure_key;
+
+
+static void
+finalize_ansi (finalize_closure_t *closure)
+{
+ cairo_status_t status;
+ status = helper_cairo_surface_write_to_ansi_stream (closure->surface,
+ closure->write_func,
+ closure->closure);
+ if (status != CAIRO_STATUS_SUCCESS)
+ fail (false, "Failed to write output: %s",
+ cairo_status_to_string (status));
+}
+
+static cairo_surface_t *
+_cairo_ansi_surface_create_for_stream (cairo_write_func_t write_func,
+ void *closure,
+ double width,
+ double height,
+ cairo_content_t content)
+{
+ cairo_surface_t *surface;
+ int w = ceil (width);
+ int h = ceil (height);
+
+ switch (content) {
+ case CAIRO_CONTENT_ALPHA:
+ surface = cairo_image_surface_create (CAIRO_FORMAT_A8, w, h);
+ break;
+ default:
+ case CAIRO_CONTENT_COLOR:
+ surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, w, h);
+ break;
+ case CAIRO_CONTENT_COLOR_ALPHA:
+ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, w, h);
+ break;
+ }
+ cairo_status_t status = cairo_surface_status (surface);
+ if (status != CAIRO_STATUS_SUCCESS)
+ fail (false, "Failed to create cairo surface: %s",
+ cairo_status_to_string (status));
+
+ finalize_closure_t *ansi_closure = g_new0 (finalize_closure_t, 1);
+ ansi_closure->callback = finalize_ansi;
+ ansi_closure->surface = surface;
+ ansi_closure->write_func = write_func;
+ ansi_closure->closure = closure;
+
+ if (cairo_surface_set_user_data (surface,
+ &finalize_closure_key,
+ (void *) ansi_closure,
+ (cairo_destroy_func_t) g_free))
+ g_free ((void *) closure);
+
+ return surface;
+}
+
+
+#ifdef CAIRO_HAS_PNG_FUNCTIONS
+
+static void
+finalize_png (finalize_closure_t *closure)
+{
+ cairo_status_t status;
+ status = cairo_surface_write_to_png_stream (closure->surface,
+ closure->write_func,
+ closure->closure);
+ if (status != CAIRO_STATUS_SUCCESS)
+ fail (false, "Failed to write output: %s",
+ cairo_status_to_string (status));
+}
+
+static cairo_surface_t *
+_cairo_png_surface_create_for_stream (cairo_write_func_t write_func,
+ void *closure,
+ double width,
+ double height,
+ cairo_content_t content)
+{
+ cairo_surface_t *surface;
+ int w = ceil (width);
+ int h = ceil (height);
+
+ switch (content) {
+ case CAIRO_CONTENT_ALPHA:
+ surface = cairo_image_surface_create (CAIRO_FORMAT_A8, w, h);
+ break;
+ default:
+ case CAIRO_CONTENT_COLOR:
+ surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, w, h);
+ break;
+ case CAIRO_CONTENT_COLOR_ALPHA:
+ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, w, h);
+ break;
+ }
+ cairo_status_t status = cairo_surface_status (surface);
+ if (status != CAIRO_STATUS_SUCCESS)
+ fail (false, "Failed to create cairo surface: %s",
+ cairo_status_to_string (status));
+
+ finalize_closure_t *png_closure = g_new0 (finalize_closure_t, 1);
+ png_closure->callback = finalize_png;
+ png_closure->surface = surface;
+ png_closure->write_func = write_func;
+ png_closure->closure = closure;
+
+ if (cairo_surface_set_user_data (surface,
+ &finalize_closure_key,
+ (void *) png_closure,
+ (cairo_destroy_func_t) g_free))
+ g_free ((void *) closure);
+
+ return surface;
+}
+
+#endif
+
+static cairo_status_t
+stdio_write_func (void *closure,
+ const unsigned char *data,
+ unsigned int size)
+{
+ FILE *fp = (FILE *) closure;
+
+ while (size) {
+ size_t ret = fwrite (data, 1, size, fp);
+ size -= ret;
+ data += ret;
+ if (size && ferror (fp))
+ fail (false, "Failed to write output: %s", strerror (errno));
+ }
+
+ return CAIRO_STATUS_SUCCESS;
+}
+
+cairo_t *
+helper_cairo_create_context (double w, double h,
+ view_options_t *view_opts,
+ output_options_t *out_opts)
+{
+ cairo_surface_t *(*constructor) (cairo_write_func_t write_func,
+ void *closure,
+ double width,
+ double height) = NULL;
+ cairo_surface_t *(*constructor2) (cairo_write_func_t write_func,
+ void *closure,
+ double width,
+ double height,
+ cairo_content_t content) = NULL;
+
+ const char *extension = out_opts->output_format;
+ if (!extension) {
+#if HAVE_ISATTY
+ if (isatty (fileno (out_opts->get_file_handle ())))
+ extension = "ansi";
+ else
+#endif
+ extension = "png";
+ }
+ if (0)
+ ;
+ else if (0 == strcasecmp (extension, "ansi"))
+ constructor2 = _cairo_ansi_surface_create_for_stream;
+ #ifdef CAIRO_HAS_PNG_FUNCTIONS
+ else if (0 == strcasecmp (extension, "png"))
+ constructor2 = _cairo_png_surface_create_for_stream;
+ #endif
+ #ifdef CAIRO_HAS_SVG_SURFACE
+ else if (0 == strcasecmp (extension, "svg"))
+ constructor = cairo_svg_surface_create_for_stream;
+ #endif
+ #ifdef CAIRO_HAS_PDF_SURFACE
+ else if (0 == strcasecmp (extension, "pdf"))
+ constructor = cairo_pdf_surface_create_for_stream;
+ #endif
+ #ifdef CAIRO_HAS_PS_SURFACE
+ else if (0 == strcasecmp (extension, "ps"))
+ constructor = cairo_ps_surface_create_for_stream;
+ #ifdef HAS_EPS
+ else if (0 == strcasecmp (extension, "eps"))
+ constructor = _cairo_eps_surface_create_for_stream;
+ #endif
+ #endif
+
+
+ unsigned int fr, fg, fb, fa, br, bg, bb, ba;
+ br = bg = bb = 0; ba = 255;
+ sscanf (view_opts->back + (*view_opts->back=='#'), "%2x%2x%2x%2x", &br, &bg, &bb, &ba);
+ fr = fg = fb = 0; fa = 255;
+ sscanf (view_opts->fore + (*view_opts->fore=='#'), "%2x%2x%2x%2x", &fr, &fg, &fb, &fa);
+
+ cairo_content_t content;
+ if (!view_opts->annotate && ba == 255 && br == bg && bg == bb && fr == fg && fg == fb)
+ content = CAIRO_CONTENT_ALPHA;
+ else if (ba == 255)
+ content = CAIRO_CONTENT_COLOR;
+ else
+ content = CAIRO_CONTENT_COLOR_ALPHA;
+
+ cairo_surface_t *surface;
+ FILE *f = out_opts->get_file_handle ();
+ if (constructor)
+ surface = constructor (stdio_write_func, f, w, h);
+ else if (constructor2)
+ surface = constructor2 (stdio_write_func, f, w, h, content);
+ else
+ fail (false, "Unknown output format `%s'", extension);
+
+ cairo_t *cr = cairo_create (surface);
+ content = cairo_surface_get_content (surface);
+
+ switch (content) {
+ case CAIRO_CONTENT_ALPHA:
+ cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
+ cairo_set_source_rgba (cr, 1., 1., 1., br / 255.);
+ cairo_paint (cr);
+ cairo_set_source_rgba (cr, 1., 1., 1.,
+ (fr / 255.) * (fa / 255.) + (br / 255) * (1 - (fa / 255.)));
+ break;
+ default:
+ case CAIRO_CONTENT_COLOR:
+ case CAIRO_CONTENT_COLOR_ALPHA:
+ cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
+ cairo_set_source_rgba (cr, br / 255., bg / 255., bb / 255., ba / 255.);
+ cairo_paint (cr);
+ cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
+ cairo_set_source_rgba (cr, fr / 255., fg / 255., fb / 255., fa / 255.);
+ break;
+ }
+
+ cairo_surface_destroy (surface);
+ return cr;
+}
+
+void
+helper_cairo_destroy_context (cairo_t *cr)
+{
+ finalize_closure_t *closure = (finalize_closure_t *)
+ cairo_surface_get_user_data (cairo_get_target (cr),
+ &finalize_closure_key);
+ if (closure)
+ closure->callback (closure);
+
+ cairo_status_t status = cairo_status (cr);
+ if (status != CAIRO_STATUS_SUCCESS)
+ fail (false, "Failed: %s",
+ cairo_status_to_string (status));
+ cairo_destroy (cr);
+}
+
+
+void
+helper_cairo_line_from_buffer (helper_cairo_line_t *l,
+ hb_buffer_t *buffer,
+ const char *text,
+ unsigned int text_len,
+ double scale,
+ hb_bool_t utf8_clusters)
+{
+ memset (l, 0, sizeof (*l));
+
+ l->num_glyphs = hb_buffer_get_length (buffer);
+ hb_glyph_info_t *hb_glyph = hb_buffer_get_glyph_infos (buffer, NULL);
+ hb_glyph_position_t *hb_position = hb_buffer_get_glyph_positions (buffer, NULL);
+ l->glyphs = cairo_glyph_allocate (l->num_glyphs + 1);
+
+ if (text) {
+ l->utf8 = g_strndup (text, text_len);
+ l->utf8_len = text_len;
+ l->num_clusters = l->num_glyphs ? 1 : 0;
+ for (unsigned int i = 1; i < l->num_glyphs; i++)
+ if (hb_glyph[i].cluster != hb_glyph[i-1].cluster)
+ l->num_clusters++;
+ l->clusters = cairo_text_cluster_allocate (l->num_clusters);
+ }
+
+ if ((l->num_glyphs && !l->glyphs) ||
+ (l->utf8_len && !l->utf8) ||
+ (l->num_clusters && !l->clusters))
+ {
+ l->finish ();
+ return;
+ }
+
+ hb_position_t x = 0, y = 0;
+ int i;
+ for (i = 0; i < (int) l->num_glyphs; i++)
+ {
+ l->glyphs[i].index = hb_glyph[i].codepoint;
+ l->glyphs[i].x = ( hb_position->x_offset + x) * scale;
+ l->glyphs[i].y = (-hb_position->y_offset + y) * scale;
+ x += hb_position->x_advance;
+ y += -hb_position->y_advance;
+
+ hb_position++;
+ }
+ l->glyphs[i].index = -1;
+ l->glyphs[i].x = x * scale;
+ l->glyphs[i].y = y * scale;
+
+ if (l->num_clusters) {
+ memset ((void *) l->clusters, 0, l->num_clusters * sizeof (l->clusters[0]));
+ hb_bool_t backward = HB_DIRECTION_IS_BACKWARD (hb_buffer_get_direction (buffer));
+ l->cluster_flags = backward ? CAIRO_TEXT_CLUSTER_FLAG_BACKWARD : (cairo_text_cluster_flags_t) 0;
+ unsigned int cluster = 0;
+ const char *start = l->utf8, *end;
+ l->clusters[cluster].num_glyphs++;
+ if (backward) {
+ for (i = l->num_glyphs - 2; i >= 0; i--) {
+ if (hb_glyph[i].cluster != hb_glyph[i+1].cluster) {
+ g_assert (hb_glyph[i].cluster > hb_glyph[i+1].cluster);
+ if (utf8_clusters)
+ end = start + hb_glyph[i].cluster - hb_glyph[i+1].cluster;
+ else
+ end = g_utf8_offset_to_pointer (start, hb_glyph[i].cluster - hb_glyph[i+1].cluster);
+ l->clusters[cluster].num_bytes = end - start;
+ start = end;
+ cluster++;
+ }
+ l->clusters[cluster].num_glyphs++;
+ }
+ l->clusters[cluster].num_bytes = l->utf8 + text_len - start;
+ } else {
+ for (i = 1; i < (int) l->num_glyphs; i++) {
+ if (hb_glyph[i].cluster != hb_glyph[i-1].cluster) {
+ g_assert (hb_glyph[i].cluster > hb_glyph[i-1].cluster);
+ if (utf8_clusters)
+ end = start + hb_glyph[i].cluster - hb_glyph[i-1].cluster;
+ else
+ end = g_utf8_offset_to_pointer (start, hb_glyph[i].cluster - hb_glyph[i-1].cluster);
+ l->clusters[cluster].num_bytes = end - start;
+ start = end;
+ cluster++;
+ }
+ l->clusters[cluster].num_glyphs++;
+ }
+ l->clusters[cluster].num_bytes = l->utf8 + text_len - start;
+ }
+ }
+}
diff --git a/util/helper-cairo.hh b/util/helper-cairo.hh
new file mode 100644
index 0000000..2f2c9d4
--- /dev/null
+++ b/util/helper-cairo.hh
@@ -0,0 +1,81 @@
+/*
+ * Copyright © 2011 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 "options.hh"
+
+#include <cairo.h>
+
+#ifndef HELPER_CAIRO_HH
+#define HELPER_CAIRO_HH
+
+
+cairo_scaled_font_t *
+helper_cairo_create_scaled_font (const font_options_t *font_opts,
+ double font_size);
+
+
+cairo_t *
+helper_cairo_create_context (double w, double h,
+ view_options_t *view_opts,
+ output_options_t *out_opts);
+
+void
+helper_cairo_destroy_context (cairo_t *cr);
+
+
+struct helper_cairo_line_t {
+ cairo_glyph_t *glyphs;
+ unsigned int num_glyphs;
+ char *utf8;
+ unsigned int utf8_len;
+ cairo_text_cluster_t *clusters;
+ unsigned int num_clusters;
+ cairo_text_cluster_flags_t cluster_flags;
+
+ void finish (void) {
+ if (glyphs)
+ cairo_glyph_free (glyphs);
+ if (clusters)
+ cairo_text_cluster_free (clusters);
+ if (utf8)
+ g_free (utf8);
+ }
+
+ void get_advance (double *x_advance, double *y_advance) {
+ *x_advance = glyphs[num_glyphs].x;
+ *y_advance = glyphs[num_glyphs].y;
+ }
+};
+
+void
+helper_cairo_line_from_buffer (helper_cairo_line_t *l,
+ hb_buffer_t *buffer,
+ const char *text,
+ unsigned int text_len,
+ double scale,
+ hb_bool_t utf8_clusters);
+
+#endif
diff --git a/util/main-font-text.hh b/util/main-font-text.hh
new file mode 100644
index 0000000..44e3bfb
--- /dev/null
+++ b/util/main-font-text.hh
@@ -0,0 +1,80 @@
+/*
+ * 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
+ */
+
+#include "options.hh"
+
+#ifndef HB_MAIN_FONT_TEXT_HH
+#define HB_MAIN_FONT_TEXT_HH
+
+/* main() body for utilities taking font and processing text.*/
+
+template <typename consumer_t>
+struct main_font_text_t
+{
+ main_font_text_t (void)
+ : options ("[FONT-FILE] [TEXT]"),
+ font_opts (&options),
+ input (&options),
+ consumer (&options) {}
+
+ int
+ main (int argc, char **argv)
+ {
+ options.parse (&argc, &argv);
+
+ argc--, argv++;
+ if (argc && !font_opts.font_file) font_opts.font_file = argv[0], argc--, argv++;
+ if (argc && !input.text && !input.text_file) input.text = argv[0], argc--, argv++;
+ if (argc)
+ fail (true, "Too many arguments on the command line");
+ if (!font_opts.font_file)
+ options.usage ();
+ if (!input.text && !input.text_file)
+ input.text_file = "-";
+
+ consumer.init (&font_opts);
+
+ hb_buffer_t *buffer = hb_buffer_create ();
+ unsigned int text_len;
+ const char *text;
+ while ((text = input.get_line (&text_len)))
+ consumer.consume_line (buffer, text, text_len);
+ hb_buffer_destroy (buffer);
+
+ consumer.finish (&font_opts);
+
+ return consumer.failed ? 1 : 0;
+ }
+
+ protected:
+ option_parser_t options;
+ font_options_t font_opts;
+ text_options_t input;
+ consumer_t consumer;
+};
+
+#endif
+
diff --git a/util/options.cc b/util/options.cc
new file mode 100644
index 0000000..c05cee6
--- /dev/null
+++ b/util/options.cc
@@ -0,0 +1,830 @@
+/*
+ * 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
+ */
+
+#include "options.hh"
+
+#ifdef HAVE_FREETYPE
+#include <hb-ft.h>
+#endif
+
+
+void
+fail (hb_bool_t suggest_help, const char *format, ...)
+{
+ const char *msg;
+
+ va_list vap;
+ va_start (vap, format);
+ msg = g_strdup_vprintf (format, vap);
+ const char *prgname = g_get_prgname ();
+ g_printerr ("%s: %s\n", prgname, msg);
+ if (suggest_help)
+ g_printerr ("Try `%s --help' for more information.\n", prgname);
+
+ exit (1);
+}
+
+
+hb_bool_t debug = false;
+
+static gchar *
+shapers_to_string (void)
+{
+ GString *shapers = g_string_new (NULL);
+ const char **shaper_list = hb_shape_list_shapers ();
+
+ for (; *shaper_list; shaper_list++) {
+ g_string_append (shapers, *shaper_list);
+ g_string_append_c (shapers, ',');
+ }
+ g_string_truncate (shapers, MAX (0, (gint)shapers->len - 1));
+
+ return g_string_free (shapers, false);
+}
+
+static G_GNUC_NORETURN gboolean
+show_version (const char *name G_GNUC_UNUSED,
+ const char *arg G_GNUC_UNUSED,
+ gpointer data G_GNUC_UNUSED,
+ GError **error G_GNUC_UNUSED)
+{
+ g_printf ("%s (%s) %s\n", g_get_prgname (), PACKAGE_NAME, PACKAGE_VERSION);
+
+ char *shapers = shapers_to_string ();
+ g_printf ("Available shapers: %s\n", shapers);
+ g_free (shapers);
+ if (strcmp (HB_VERSION_STRING, hb_version_string ()))
+ g_printf ("Linked HarfBuzz library has a different version: %s\n", hb_version_string ());
+
+ exit(0);
+}
+
+
+void
+option_parser_t::add_main_options (void)
+{
+ GOptionEntry entries[] =
+ {
+ {"version", 0, G_OPTION_FLAG_NO_ARG,
+ G_OPTION_ARG_CALLBACK, (gpointer) &show_version, "Show version numbers", NULL},
+ {"debug", 0, 0, G_OPTION_ARG_NONE, &debug, "Free all resources before exit", NULL},
+ {NULL}
+ };
+ g_option_context_add_main_entries (context, entries, NULL);
+}
+
+static gboolean
+pre_parse (GOptionContext *context G_GNUC_UNUSED,
+ GOptionGroup *group G_GNUC_UNUSED,
+ gpointer data,
+ GError **error)
+{
+ option_group_t *option_group = (option_group_t *) data;
+ option_group->pre_parse (error);
+ return *error == NULL;
+}
+
+static gboolean
+post_parse (GOptionContext *context G_GNUC_UNUSED,
+ GOptionGroup *group G_GNUC_UNUSED,
+ gpointer data,
+ GError **error)
+{
+ option_group_t *option_group = static_cast<option_group_t *>(data);
+ option_group->post_parse (error);
+ return *error == NULL;
+}
+
+void
+option_parser_t::add_group (GOptionEntry *entries,
+ const gchar *name,
+ const gchar *description,
+ const gchar *help_description,
+ option_group_t *option_group)
+{
+ GOptionGroup *group = g_option_group_new (name, description, help_description,
+ static_cast<gpointer>(option_group), NULL);
+ g_option_group_add_entries (group, entries);
+ g_option_group_set_parse_hooks (group, pre_parse, post_parse);
+ g_option_context_add_group (context, group);
+}
+
+void
+option_parser_t::parse (int *argc, char ***argv)
+{
+ setlocale (LC_ALL, "");
+
+ GError *parse_error = NULL;
+ if (!g_option_context_parse (context, argc, argv, &parse_error))
+ {
+ if (parse_error != NULL) {
+ fail (true, "%s", parse_error->message);
+ //g_error_free (parse_error);
+ } else
+ fail (true, "Option parse error");
+ }
+}
+
+
+static gboolean
+parse_margin (const char *name G_GNUC_UNUSED,
+ const char *arg,
+ gpointer data,
+ GError **error G_GNUC_UNUSED)
+{
+ view_options_t *view_opts = (view_options_t *) data;
+ view_options_t::margin_t &m = view_opts->margin;
+ switch (sscanf (arg, "%lf %lf %lf %lf", &m.t, &m.r, &m.b, &m.l)) {
+ case 1: m.r = m.t;
+ case 2: m.b = m.t;
+ case 3: m.l = m.r;
+ case 4: return true;
+ default:
+ g_set_error (error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE,
+ "%s argument should be one to four space-separated numbers",
+ name);
+ return false;
+ }
+}
+
+
+static gboolean
+parse_shapers (const char *name G_GNUC_UNUSED,
+ const char *arg,
+ gpointer data,
+ GError **error G_GNUC_UNUSED)
+{
+ shape_options_t *shape_opts = (shape_options_t *) data;
+ g_strfreev (shape_opts->shapers);
+ shape_opts->shapers = g_strsplit (arg, ",", 0);
+ return true;
+}
+
+static G_GNUC_NORETURN gboolean
+list_shapers (const char *name G_GNUC_UNUSED,
+ const char *arg G_GNUC_UNUSED,
+ gpointer data G_GNUC_UNUSED,
+ GError **error G_GNUC_UNUSED)
+{
+ for (const char **shaper = hb_shape_list_shapers (); *shaper; shaper++)
+ g_printf ("%s\n", *shaper);
+
+ exit(0);
+}
+
+
+
+static void
+parse_space (char **pp)
+{
+ char c;
+#define ISSPACE(c) ((c)==' '||(c)=='\f'||(c)=='\n'||(c)=='\r'||(c)=='\t'||(c)=='\v')
+ while (c = **pp, ISSPACE (c))
+ (*pp)++;
+#undef ISSPACE
+}
+
+static hb_bool_t
+parse_char (char **pp, char c)
+{
+ parse_space (pp);
+
+ if (**pp != c)
+ return false;
+
+ (*pp)++;
+ return true;
+}
+
+static hb_bool_t
+parse_uint (char **pp, unsigned int *pv)
+{
+ char *p = *pp;
+ unsigned int v;
+
+ v = strtol (p, pp, 0);
+
+ if (p == *pp)
+ return false;
+
+ *pv = v;
+ return true;
+}
+
+
+static hb_bool_t
+parse_feature_value_prefix (char **pp, hb_feature_t *feature)
+{
+ if (parse_char (pp, '-'))
+ feature->value = 0;
+ else {
+ parse_char (pp, '+');
+ feature->value = 1;
+ }
+
+ return true;
+}
+
+static hb_bool_t
+parse_feature_tag (char **pp, hb_feature_t *feature)
+{
+ char *p = *pp, c;
+
+ parse_space (pp);
+
+#define ISALNUM(c) (('a' <= (c) && (c) <= 'z') || ('A' <= (c) && (c) <= 'Z') || ('0' <= (c) && (c) <= '9'))
+ while (c = **pp, ISALNUM(c))
+ (*pp)++;
+#undef ISALNUM
+
+ if (p == *pp)
+ return false;
+
+ feature->tag = hb_tag_from_string (p, *pp - p);
+ return true;
+}
+
+static hb_bool_t
+parse_feature_indices (char **pp, hb_feature_t *feature)
+{
+ parse_space (pp);
+
+ hb_bool_t has_start;
+
+ feature->start = 0;
+ feature->end = (unsigned int) -1;
+
+ if (!parse_char (pp, '['))
+ return true;
+
+ has_start = parse_uint (pp, &feature->start);
+
+ if (parse_char (pp, ':')) {
+ parse_uint (pp, &feature->end);
+ } else {
+ if (has_start)
+ feature->end = feature->start + 1;
+ }
+
+ return parse_char (pp, ']');
+}
+
+static hb_bool_t
+parse_feature_value_postfix (char **pp, hb_feature_t *feature)
+{
+ return !parse_char (pp, '=') || parse_uint (pp, &feature->value);
+}
+
+
+static hb_bool_t
+parse_one_feature (char **pp, hb_feature_t *feature)
+{
+ return parse_feature_value_prefix (pp, feature) &&
+ parse_feature_tag (pp, feature) &&
+ parse_feature_indices (pp, feature) &&
+ parse_feature_value_postfix (pp, feature) &&
+ (parse_char (pp, ',') || **pp == '\0');
+}
+
+static void
+skip_one_feature (char **pp)
+{
+ char *e;
+ e = strchr (*pp, ',');
+ if (e)
+ *pp = e + 1;
+ else
+ *pp = *pp + strlen (*pp);
+}
+
+static gboolean
+parse_features (const char *name G_GNUC_UNUSED,
+ const char *arg,
+ gpointer data,
+ GError **error G_GNUC_UNUSED)
+{
+ shape_options_t *shape_opts = (shape_options_t *) data;
+ char *s = (char *) arg;
+ char *p;
+
+ shape_opts->num_features = 0;
+ g_free (shape_opts->features);
+ shape_opts->features = NULL;
+
+ if (!*s)
+ return true;
+
+ /* count the features first, so we can allocate memory */
+ p = s;
+ do {
+ shape_opts->num_features++;
+ p = strchr (p, ',');
+ if (p)
+ p++;
+ } while (p);
+
+ shape_opts->features = (hb_feature_t *) calloc (shape_opts->num_features, sizeof (*shape_opts->features));
+
+ /* now do the actual parsing */
+ p = s;
+ shape_opts->num_features = 0;
+ while (*p) {
+ if (parse_one_feature (&p, &shape_opts->features[shape_opts->num_features]))
+ shape_opts->num_features++;
+ else
+ skip_one_feature (&p);
+ }
+
+ return true;
+}
+
+
+void
+view_options_t::add_options (option_parser_t *parser)
+{
+ GOptionEntry entries[] =
+ {
+ {"annotate", 0, 0, G_OPTION_ARG_NONE, &this->annotate, "Annotate output rendering", NULL},
+ {"background", 0, 0, G_OPTION_ARG_STRING, &this->back, "Set background color (default: "DEFAULT_BACK")", "red/#rrggbb/#rrggbbaa"},
+ {"foreground", 0, 0, G_OPTION_ARG_STRING, &this->fore, "Set foreground color (default: "DEFAULT_FORE")", "red/#rrggbb/#rrggbbaa"},
+ {"line-space", 0, 0, G_OPTION_ARG_DOUBLE, &this->line_space, "Set space between lines (default: 0)", "units"},
+ {"margin", 0, 0, G_OPTION_ARG_CALLBACK, (gpointer) &parse_margin, "Margin around output (default: "G_STRINGIFY(DEFAULT_MARGIN)")","one to four numbers"},
+ {"font-size", 0, 0, G_OPTION_ARG_DOUBLE, &this->font_size, "Font size (default: "G_STRINGIFY(DEFAULT_FONT_SIZE)")","size"},
+ {NULL}
+ };
+ parser->add_group (entries,
+ "view",
+ "View options:",
+ "Options controlling output rendering",
+ this);
+}
+
+void
+shape_options_t::add_options (option_parser_t *parser)
+{
+ GOptionEntry entries[] =
+ {
+ {"list-shapers", 0, G_OPTION_FLAG_NO_ARG,
+ G_OPTION_ARG_CALLBACK, (gpointer) &list_shapers, "List available shapers and quit", NULL},
+ {"shaper", 0, G_OPTION_FLAG_HIDDEN,
+ G_OPTION_ARG_CALLBACK, (gpointer) &parse_shapers, "Hidden duplicate of --shapers", NULL},
+ {"shapers", 0, 0, G_OPTION_ARG_CALLBACK, (gpointer) &parse_shapers, "Comma-separated list of shapers to try","list"},
+ {"direction", 0, 0, G_OPTION_ARG_STRING, &this->direction, "Set text direction (default: auto)", "ltr/rtl/ttb/btt"},
+ {"language", 0, 0, G_OPTION_ARG_STRING, &this->language, "Set text language (default: $LANG)", "langstr"},
+ {"script", 0, 0, G_OPTION_ARG_STRING, &this->script, "Set text script (default: auto)", "ISO-15924 tag"},
+ {"utf8-clusters", 0, 0, G_OPTION_ARG_NONE, &this->utf8_clusters, "Use UTF8 byte indices, not char indices", NULL},
+ {"normalize-glyphs",0, 0, G_OPTION_ARG_NONE, &this->normalize_glyphs, "Rearrange glyph clusters in nominal order", NULL},
+ {NULL}
+ };
+ parser->add_group (entries,
+ "shape",
+ "Shape options:",
+ "Options controlling the shaping process",
+ this);
+
+ const gchar *features_help = "Comma-separated list of font features\n"
+ "\n"
+ " Features can be enabled or disabled, either globally or limited to\n"
+ " specific character ranges.\n"
+ "\n"
+ " The range indices refer to the positions between Unicode characters,\n"
+ " unless the --utf8-clusters is provided, in which case range indices\n"
+ " refer to UTF-8 byte indices. The position before the first character\n"
+ " is always 0.\n"
+ "\n"
+ " The format is Python-esque. Here is how it all works:\n"
+ "\n"
+ " Syntax: Value: Start: End:\n"
+ "\n"
+ " Setting value:\n"
+ " \"kern\" 1 0 ∞ # Turn feature on\n"
+ " \"+kern\" 1 0 ∞ # Turn feature on\n"
+ " \"-kern\" 0 0 ∞ # Turn feature off\n"
+ " \"kern=0\" 0 0 ∞ # Turn feature off\n"
+ " \"kern=1\" 1 0 ∞ # Turn feature on\n"
+ " \"aalt=2\" 2 0 ∞ # Choose 2nd alternate\n"
+ "\n"
+ " Setting index:\n"
+ " \"kern[]\" 1 0 ∞ # Turn feature on\n"
+ " \"kern[:]\" 1 0 ∞ # Turn feature on\n"
+ " \"kern[5:]\" 1 5 ∞ # Turn feature on, partial\n"
+ " \"kern[:5]\" 1 0 5 # Turn feature on, partial\n"
+ " \"kern[3:5]\" 1 3 5 # Turn feature on, range\n"
+ " \"kern[3]\" 1 3 3+1 # Turn feature on, single char\n"
+ "\n"
+ " Mixing it all:\n"
+ "\n"
+ " \"kern[3:5]=0\" 1 3 5 # Turn feature off for range";
+
+ GOptionEntry entries2[] =
+ {
+ {"features", 0, 0, G_OPTION_ARG_CALLBACK, (gpointer) &parse_features, features_help, "list"},
+ {NULL}
+ };
+ parser->add_group (entries2,
+ "features",
+ "Features options:",
+ "Options controlling font features used",
+ this);
+}
+
+void
+font_options_t::add_options (option_parser_t *parser)
+{
+ GOptionEntry entries[] =
+ {
+ {"font-file", 0, 0, G_OPTION_ARG_STRING, &this->font_file, "Font file-name", "filename"},
+ {"face-index", 0, 0, G_OPTION_ARG_INT, &this->face_index, "Face index (default: 0)", "index"},
+ {NULL}
+ };
+ parser->add_group (entries,
+ "font",
+ "Font options:",
+ "Options controlling the font",
+ this);
+}
+
+void
+text_options_t::add_options (option_parser_t *parser)
+{
+ GOptionEntry entries[] =
+ {
+ {"text", 0, 0, G_OPTION_ARG_STRING, &this->text, "Set input text", "string"},
+ {"text-file", 0, 0, G_OPTION_ARG_STRING, &this->text_file, "Set input text file-name\n\n If no text is provided, standard input is used for input.", "filename"},
+ {NULL}
+ };
+ parser->add_group (entries,
+ "text",
+ "Text options:",
+ "Options controlling the input text",
+ this);
+}
+
+void
+output_options_t::add_options (option_parser_t *parser)
+{
+ GOptionEntry entries[] =
+ {
+ {"output-file", 0, 0, G_OPTION_ARG_STRING, &this->output_file, "Set output file-name (default: stdout)","filename"},
+ {"output-format", 0, 0, G_OPTION_ARG_STRING, &this->output_format, "Set output format", "format"},
+ {NULL}
+ };
+ parser->add_group (entries,
+ "output",
+ "Output options:",
+ "Options controlling the output",
+ this);
+}
+
+
+
+hb_font_t *
+font_options_t::get_font (void) const
+{
+ if (font)
+ return font;
+
+ hb_blob_t *blob = NULL;
+
+ /* Create the blob */
+ {
+ char *font_data;
+ unsigned int len = 0;
+ hb_destroy_func_t destroy;
+ void *user_data;
+ hb_memory_mode_t mm;
+
+ /* This is a hell of a lot of code for just reading a file! */
+ if (!font_file)
+ fail (true, "No font file set");
+
+ if (0 == strcmp (font_file, "-")) {
+ /* read it */
+ GString *gs = g_string_new (NULL);
+ char buf[BUFSIZ];
+#ifdef HAVE__SETMODE
+ _setmode (fileno (stdin), _O_BINARY);
+#endif
+ while (!feof (stdin)) {
+ size_t ret = fread (buf, 1, sizeof (buf), stdin);
+ if (ferror (stdin))
+ fail (false, "Failed reading font from standard input: %s",
+ strerror (errno));
+ g_string_append_len (gs, buf, ret);
+ }
+ len = gs->len;
+ font_data = g_string_free (gs, false);
+ user_data = font_data;
+ destroy = (hb_destroy_func_t) g_free;
+ mm = HB_MEMORY_MODE_WRITABLE;
+ } else {
+ GError *error = NULL;
+ GMappedFile *mf = g_mapped_file_new (font_file, false, &error);
+ if (mf) {
+ font_data = g_mapped_file_get_contents (mf);
+ len = g_mapped_file_get_length (mf);
+ if (len) {
+ destroy = (hb_destroy_func_t) g_mapped_file_unref;
+ user_data = (void *) mf;
+ mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
+ } else
+ g_mapped_file_unref (mf);
+ } else {
+ fail (false, "%s", error->message);
+ //g_error_free (error);
+ }
+ if (!len) {
+ /* GMappedFile is buggy, it doesn't fail if file isn't regular.
+ * Try reading.
+ * https://bugzilla.gnome.org/show_bug.cgi?id=659212 */
+ GError *error = NULL;
+ gsize l;
+ if (g_file_get_contents (font_file, &font_data, &l, &error)) {
+ len = l;
+ destroy = (hb_destroy_func_t) g_free;
+ user_data = (void *) font_data;
+ mm = HB_MEMORY_MODE_WRITABLE;
+ } else {
+ fail (false, "%s", error->message);
+ //g_error_free (error);
+ }
+ }
+ }
+
+ blob = hb_blob_create (font_data, len, mm, user_data, destroy);
+ }
+
+ /* Create the face */
+ hb_face_t *face = hb_face_create (blob, face_index);
+ hb_blob_destroy (blob);
+
+
+ font = hb_font_create (face);
+
+ unsigned int upem = hb_face_get_upem (face);
+ hb_font_set_scale (font, upem, upem);
+ hb_face_destroy (face);
+
+#ifdef HAVE_FREETYPE
+ hb_ft_font_set_funcs (font);
+#endif
+
+ return font;
+}
+
+
+const char *
+text_options_t::get_line (unsigned int *len)
+{
+ if (text) {
+ if (text_len == (unsigned int) -1)
+ text_len = strlen (text);
+
+ if (!text_len) {
+ *len = 0;
+ return NULL;
+ }
+
+ const char *ret = text;
+ const char *p = (const char *) memchr (text, '\n', text_len);
+ unsigned int ret_len;
+ if (!p) {
+ ret_len = text_len;
+ text += ret_len;
+ text_len = 0;
+ } else {
+ ret_len = p - ret;
+ text += ret_len + 1;
+ text_len -= ret_len + 1;
+ }
+
+ *len = ret_len;
+ return ret;
+ }
+
+ if (!fp) {
+ if (!text_file)
+ fail (true, "At least one of text or text-file must be set");
+
+ if (0 != strcmp (text_file, "-"))
+ fp = fopen (text_file, "r");
+ else
+ fp = stdin;
+
+ if (!fp)
+ fail (false, "Failed opening text file `%s': %s",
+ text_file, strerror (errno));
+
+ gs = g_string_new (NULL);
+ }
+
+ g_string_set_size (gs, 0);
+ char buf[BUFSIZ];
+ while (fgets (buf, sizeof (buf), fp)) {
+ unsigned int bytes = strlen (buf);
+ if (bytes && buf[bytes - 1] == '\n') {
+ bytes--;
+ g_string_append_len (gs, buf, bytes);
+ break;
+ }
+ g_string_append_len (gs, buf, bytes);
+ }
+ if (ferror (fp))
+ fail (false, "Failed reading text: %s",
+ strerror (errno));
+ *len = gs->len;
+ return !*len && feof (fp) ? NULL : gs->str;
+}
+
+
+FILE *
+output_options_t::get_file_handle (void)
+{
+ if (fp)
+ return fp;
+
+ if (output_file)
+ fp = fopen (output_file, "wb");
+ else {
+#ifdef HAVE__SETMODE
+ _setmode (fileno (stdout), _O_BINARY);
+#endif
+ fp = stdout;
+ }
+ if (!fp)
+ fail (false, "Cannot open output file `%s': %s",
+ g_filename_display_name (output_file), strerror (errno));
+
+ return fp;
+}
+
+static gboolean
+parse_verbose (const char *name G_GNUC_UNUSED,
+ const char *arg G_GNUC_UNUSED,
+ gpointer data G_GNUC_UNUSED,
+ GError **error G_GNUC_UNUSED)
+{
+ format_options_t *format_opts = (format_options_t *) data;
+ format_opts->show_text = format_opts->show_unicode = format_opts->show_line_num = true;
+ return true;
+}
+
+void
+format_options_t::add_options (option_parser_t *parser)
+{
+ GOptionEntry entries[] =
+ {
+ {"no-glyph-names", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &this->show_glyph_names, "Use glyph indices instead of names", NULL},
+ {"no-positions", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &this->show_positions, "Do not show glyph positions", NULL},
+ {"no-clusters", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &this->show_clusters, "Do not show cluster mapping", NULL},
+ {"show-text", 0, 0, G_OPTION_ARG_NONE, &this->show_text, "Show input text", NULL},
+ {"show-unicode", 0, 0, G_OPTION_ARG_NONE, &this->show_unicode, "Show input Unicode codepoints", NULL},
+ {"show-line-num", 0, 0, G_OPTION_ARG_NONE, &this->show_line_num, "Show line numbers", NULL},
+ {"verbose", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,(gpointer) &parse_verbose, "Show everything", NULL},
+ {NULL}
+ };
+ parser->add_group (entries,
+ "format",
+ "Format options:",
+ "Options controlling the formatting of buffer contents",
+ this);
+}
+
+void
+format_options_t::serialize_unicode (hb_buffer_t *buffer,
+ GString *gs)
+{
+ unsigned int num_glyphs = hb_buffer_get_length (buffer);
+ hb_glyph_info_t *info = hb_buffer_get_glyph_infos (buffer, NULL);
+
+ g_string_append_c (gs, '<');
+ for (unsigned int i = 0; i < num_glyphs; i++)
+ {
+ if (i)
+ g_string_append_c (gs, ',');
+ g_string_append_printf (gs, "U+%04X", info->codepoint);
+ info++;
+ }
+ g_string_append_c (gs, '>');
+}
+
+void
+format_options_t::serialize_glyphs (hb_buffer_t *buffer,
+ hb_font_t *font,
+ hb_bool_t utf8_clusters,
+ GString *gs)
+{
+ unsigned int num_glyphs = hb_buffer_get_length (buffer);
+ hb_glyph_info_t *info = hb_buffer_get_glyph_infos (buffer, NULL);
+ hb_glyph_position_t *pos = hb_buffer_get_glyph_positions (buffer, NULL);
+
+ g_string_append_c (gs, '[');
+ for (unsigned int i = 0; i < num_glyphs; i++)
+ {
+ if (i)
+ g_string_append_c (gs, '|');
+
+ char glyph_name[128];
+ if (show_glyph_names) {
+ hb_font_glyph_to_string (font, info->codepoint, glyph_name, sizeof (glyph_name));
+ g_string_append_printf (gs, "%s", glyph_name);
+ } else
+ g_string_append_printf (gs, "%u", info->codepoint);
+
+ if (show_clusters) {
+ g_string_append_printf (gs, "=%u", info->cluster);
+ if (utf8_clusters)
+ g_string_append (gs, "u8");
+ }
+
+ if (show_positions && (pos->x_offset || pos->y_offset)) {
+ g_string_append_c (gs, '@');
+ if (pos->x_offset) g_string_append_printf (gs, "%d", pos->x_offset);
+ if (pos->y_offset) g_string_append_printf (gs, ",%d", pos->y_offset);
+ }
+ if (show_positions && (pos->x_advance || pos->y_advance)) {
+ g_string_append_c (gs, '+');
+ if (pos->x_advance) g_string_append_printf (gs, "%d", pos->x_advance);
+ if (pos->y_advance) g_string_append_printf (gs, ",%d", pos->y_advance);
+ }
+
+ info++;
+ pos++;
+ }
+ g_string_append_c (gs, ']');
+}
+void
+format_options_t::serialize_line_no (unsigned int line_no,
+ GString *gs)
+{
+ if (show_line_num)
+ g_string_append_printf (gs, "%d: ", line_no);
+}
+void
+format_options_t::serialize_buffer_of_text (hb_buffer_t *buffer,
+ unsigned int line_no,
+ const char *text,
+ unsigned int text_len,
+ hb_font_t *font,
+ hb_bool_t utf8_clusters,
+ GString *gs)
+{
+ if (show_text) {
+ serialize_line_no (line_no, gs);
+ g_string_append_c (gs, '(');
+ g_string_append_len (gs, text, text_len);
+ g_string_append_c (gs, ')');
+ g_string_append_c (gs, '\n');
+ }
+
+ if (show_unicode) {
+ serialize_line_no (line_no, gs);
+ serialize_unicode (buffer, gs);
+ g_string_append_c (gs, '\n');
+ }
+}
+void
+format_options_t::serialize_message (unsigned int line_no,
+ const char *msg,
+ GString *gs)
+{
+ serialize_line_no (line_no, gs);
+ g_string_append_printf (gs, "%s", msg);
+ g_string_append_c (gs, '\n');
+}
+void
+format_options_t::serialize_buffer_of_glyphs (hb_buffer_t *buffer,
+ unsigned int line_no,
+ const char *text,
+ unsigned int text_len,
+ hb_font_t *font,
+ hb_bool_t utf8_clusters,
+ GString *gs)
+{
+ serialize_line_no (line_no, gs);
+ serialize_glyphs (buffer, font, utf8_clusters, gs);
+ g_string_append_c (gs, '\n');
+}
diff --git a/util/options.hh b/util/options.hh
new file mode 100644
index 0000000..5d25d9e
--- /dev/null
+++ b/util/options.hh
@@ -0,0 +1,373 @@
+/*
+ * Copyright © 2011 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 OPTIONS_HH
+#define OPTIONS_HH
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#include <stdio.h>
+#include <math.h>
+#include <locale.h>
+#include <errno.h>
+#include <fcntl.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h> /* for isatty() */
+#endif
+#ifdef HAVE_IO_H
+#include <io.h> /* for _setmode() under Windows */
+#endif
+
+#include <hb.h>
+#ifdef HAVE_OT
+#include <hb-ot.h>
+#endif
+#include <glib.h>
+#include <glib/gprintf.h>
+
+#undef MIN
+template <typename Type> static inline Type MIN (const Type &a, const Type &b) { return a < b ? a : b; }
+
+#undef MAX
+template <typename Type> static inline Type MAX (const Type &a, const Type &b) { return a > b ? a : b; }
+
+
+void fail (hb_bool_t suggest_help, const char *format, ...) G_GNUC_NORETURN;
+
+
+extern hb_bool_t debug;
+
+struct option_group_t
+{
+ virtual void add_options (struct option_parser_t *parser) = 0;
+
+ virtual void pre_parse (GError **error G_GNUC_UNUSED) {};
+ virtual void post_parse (GError **error G_GNUC_UNUSED) {};
+};
+
+
+struct option_parser_t
+{
+ option_parser_t (const char *usage) {
+ memset (this, 0, sizeof (*this));
+ usage_str = usage;
+ context = g_option_context_new (usage);
+
+ add_main_options ();
+ }
+ ~option_parser_t (void) {
+ g_option_context_free (context);
+ }
+
+ void add_main_options (void);
+
+ void add_group (GOptionEntry *entries,
+ const gchar *name,
+ const gchar *description,
+ const gchar *help_description,
+ option_group_t *option_group);
+
+ void parse (int *argc, char ***argv);
+
+ G_GNUC_NORETURN void usage (void) {
+ g_printerr ("Usage: %s [OPTION...] %s\n", g_get_prgname (), usage_str);
+ exit (1);
+ }
+
+ const char *usage_str;
+ GOptionContext *context;
+};
+
+
+#define DEFAULT_MARGIN 16
+#define DEFAULT_FORE "#000000"
+#define DEFAULT_BACK "#FFFFFF"
+#define DEFAULT_FONT_SIZE 256
+
+struct view_options_t : option_group_t
+{
+ view_options_t (option_parser_t *parser) {
+ annotate = false;
+ fore = DEFAULT_FORE;
+ back = DEFAULT_BACK;
+ line_space = 0;
+ margin.t = margin.r = margin.b = margin.l = DEFAULT_MARGIN;
+ font_size = DEFAULT_FONT_SIZE;
+
+ add_options (parser);
+ }
+
+ void add_options (option_parser_t *parser);
+
+ hb_bool_t annotate;
+ const char *fore;
+ const char *back;
+ double line_space;
+ struct margin_t {
+ double t, r, b, l;
+ } margin;
+ double font_size;
+};
+
+
+struct shape_options_t : option_group_t
+{
+ shape_options_t (option_parser_t *parser)
+ {
+ direction = language = script = NULL;
+ features = NULL;
+ num_features = 0;
+ shapers = NULL;
+ utf8_clusters = false;
+ normalize_glyphs = false;
+
+ add_options (parser);
+ }
+ ~shape_options_t (void)
+ {
+ free (features);
+ g_strfreev (shapers);
+ }
+
+ void add_options (option_parser_t *parser);
+
+ void setup_buffer (hb_buffer_t *buffer)
+ {
+ hb_buffer_set_direction (buffer, hb_direction_from_string (direction, -1));
+ hb_buffer_set_script (buffer, hb_script_from_string (script, -1));
+ hb_buffer_set_language (buffer, hb_language_from_string (language, -1));
+ }
+
+ void populate_buffer (hb_buffer_t *buffer, const char *text, int text_len)
+ {
+ hb_buffer_reset (buffer);
+ hb_buffer_add_utf8 (buffer, text, text_len, 0, text_len);
+
+ if (!utf8_clusters) {
+ /* Reset cluster values to refer to Unicode character index
+ * instead of UTF-8 index. */
+ unsigned int num_glyphs = hb_buffer_get_length (buffer);
+ hb_glyph_info_t *info = hb_buffer_get_glyph_infos (buffer, NULL);
+ for (unsigned int i = 0; i < num_glyphs; i++)
+ {
+ info->cluster = i;
+ info++;
+ }
+ }
+
+ setup_buffer (buffer);
+ }
+
+ hb_bool_t shape (hb_font_t *font, hb_buffer_t *buffer)
+ {
+ hb_bool_t res = hb_shape_full (font, buffer, features, num_features, shapers);
+ if (normalize_glyphs)
+ hb_buffer_normalize_glyphs (buffer);
+ return res;
+ }
+
+ void shape_closure (const char *text, int text_len,
+ hb_font_t *font, hb_buffer_t *buffer,
+ hb_set_t *glyphs)
+ {
+ hb_buffer_reset (buffer);
+ hb_buffer_add_utf8 (buffer, text, text_len, 0, text_len);
+ setup_buffer (buffer);
+ hb_ot_shape_glyphs_closure (font, buffer, features, num_features, glyphs);
+ }
+
+ const char *direction;
+ const char *language;
+ const char *script;
+ hb_feature_t *features;
+ unsigned int num_features;
+ char **shapers;
+ hb_bool_t utf8_clusters;
+ hb_bool_t normalize_glyphs;
+};
+
+
+struct font_options_t : option_group_t
+{
+ font_options_t (option_parser_t *parser) {
+ font_file = NULL;
+ face_index = 0;
+
+ font = NULL;
+
+ add_options (parser);
+ }
+ ~font_options_t (void) {
+ hb_font_destroy (font);
+ }
+
+ void add_options (option_parser_t *parser);
+
+ hb_font_t *get_font (void) const;
+
+ const char *font_file;
+ int face_index;
+
+ private:
+ mutable hb_font_t *font;
+};
+
+
+struct text_options_t : option_group_t
+{
+ text_options_t (option_parser_t *parser) {
+ text = NULL;
+ text_file = NULL;
+
+ fp = NULL;
+ gs = NULL;
+ text_len = (unsigned int) -1;
+
+ add_options (parser);
+ }
+ ~text_options_t (void) {
+ if (gs)
+ g_string_free (gs, true);
+ if (fp)
+ fclose (fp);
+ }
+
+ void add_options (option_parser_t *parser);
+
+ void post_parse (GError **error G_GNUC_UNUSED) {
+ if (text && text_file)
+ g_set_error (error,
+ G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE,
+ "Only one of text and text-file can be set");
+
+ };
+
+ const char *get_line (unsigned int *len);
+
+ const char *text;
+ const char *text_file;
+
+ private:
+ FILE *fp;
+ GString *gs;
+ unsigned int text_len;
+};
+
+struct output_options_t : option_group_t
+{
+ output_options_t (option_parser_t *parser) {
+ output_file = NULL;
+ output_format = NULL;
+
+ fp = NULL;
+
+ add_options (parser);
+ }
+ ~output_options_t (void) {
+ if (fp)
+ fclose (fp);
+ }
+
+ void add_options (option_parser_t *parser);
+
+ void post_parse (GError **error G_GNUC_UNUSED)
+ {
+ if (output_file && !output_format) {
+ output_format = strrchr (output_file, '.');
+ if (output_format)
+ output_format++; /* skip the dot */
+ }
+
+ if (output_file && 0 == strcmp (output_file, "-"))
+ output_file = NULL; /* STDOUT */
+ }
+
+ FILE *get_file_handle (void);
+
+ const char *output_file;
+ const char *output_format;
+
+ mutable FILE *fp;
+};
+
+struct format_options_t : option_group_t
+{
+ format_options_t (option_parser_t *parser) {
+ show_glyph_names = true;
+ show_positions = true;
+ show_clusters = true;
+ show_text = false;
+ show_unicode = false;
+ show_line_num = false;
+
+ add_options (parser);
+ }
+
+ void add_options (option_parser_t *parser);
+
+ void serialize_unicode (hb_buffer_t *buffer,
+ GString *gs);
+ void serialize_glyphs (hb_buffer_t *buffer,
+ hb_font_t *font,
+ hb_bool_t utf8_clusters,
+ GString *gs);
+ void serialize_line_no (unsigned int line_no,
+ GString *gs);
+ void serialize_buffer_of_text (hb_buffer_t *buffer,
+ unsigned int line_no,
+ const char *text,
+ unsigned int text_len,
+ hb_font_t *font,
+ hb_bool_t utf8_clusters,
+ GString *gs);
+ void serialize_message (unsigned int line_no,
+ const char *msg,
+ GString *gs);
+ void serialize_buffer_of_glyphs (hb_buffer_t *buffer,
+ unsigned int line_no,
+ const char *text,
+ unsigned int text_len,
+ hb_font_t *font,
+ hb_bool_t utf8_clusters,
+ GString *gs);
+
+
+ hb_bool_t show_glyph_names;
+ hb_bool_t show_positions;
+ hb_bool_t show_clusters;
+ hb_bool_t show_text;
+ hb_bool_t show_unicode;
+ hb_bool_t show_line_num;
+};
+
+
+#endif
diff --git a/util/shape-consumer.hh b/util/shape-consumer.hh
new file mode 100644
index 0000000..220daa4
--- /dev/null
+++ b/util/shape-consumer.hh
@@ -0,0 +1,82 @@
+/*
+ * 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
+ */
+
+#include "options.hh"
+
+#ifndef HB_SHAPE_CONSUMER_HH
+#define HB_SHAPE_CONSUMER_HH
+
+
+template <typename output_t>
+struct shape_consumer_t
+{
+ shape_consumer_t (option_parser_t *parser)
+ : shaper (parser),
+ output (parser) {}
+
+ void init (const font_options_t *font_opts)
+ {
+ font = hb_font_reference (font_opts->get_font ());
+ output.init (font_opts);
+ failed = false;
+ }
+ void consume_line (hb_buffer_t *buffer,
+ const char *text,
+ unsigned int text_len)
+ {
+ output.new_line ();
+
+ shaper.populate_buffer (buffer, text, text_len);
+ output.consume_text (buffer, text, text_len, shaper.utf8_clusters);
+
+ if (!shaper.shape (font, buffer)) {
+ failed = true;
+ hb_buffer_set_length (buffer, 0);
+ output.shape_failed (buffer, text, text_len, shaper.utf8_clusters);
+ return;
+ }
+
+ output.consume_glyphs (buffer, text, text_len, shaper.utf8_clusters);
+ }
+ void finish (const font_options_t *font_opts)
+ {
+ output.finish (font_opts);
+ hb_font_destroy (font);
+ font = NULL;
+ }
+
+ public:
+ bool failed;
+
+ protected:
+ shape_options_t shaper;
+ output_t output;
+
+ hb_font_t *font;
+};
+
+
+#endif
diff --git a/util/view-cairo.cc b/util/view-cairo.cc
new file mode 100644
index 0000000..666013e
--- /dev/null
+++ b/util/view-cairo.cc
@@ -0,0 +1,126 @@
+/*
+ * Copyright © 2011 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 "view-cairo.hh"
+
+void
+view_cairo_t::get_surface_size (cairo_scaled_font_t *scaled_font,
+ double *w, double *h)
+{
+ cairo_font_extents_t font_extents;
+
+ cairo_scaled_font_extents (scaled_font, &font_extents);
+
+ bool vertical = HB_DIRECTION_IS_VERTICAL (direction);
+ (vertical ? *w : *h) = (int) lines->len * (font_extents.height + view_options.line_space) - view_options.line_space;
+ (vertical ? *h : *w) = 0;
+ for (unsigned int i = 0; i < lines->len; i++) {
+ helper_cairo_line_t &line = g_array_index (lines, helper_cairo_line_t, i);
+ double x_advance, y_advance;
+ line.get_advance (&x_advance, &y_advance);
+ if (vertical)
+ *h = MAX (*h, y_advance);
+ else
+ *w = MAX (*w, x_advance);
+ }
+
+ *w += view_options.margin.l + view_options.margin.r;
+ *h += view_options.margin.t + view_options.margin.b;
+}
+
+void
+view_cairo_t::render (const font_options_t *font_opts)
+{
+ cairo_scaled_font_t *scaled_font = helper_cairo_create_scaled_font (font_opts, view_options.font_size);
+ double w, h;
+ get_surface_size (scaled_font, &w, &h);
+ cairo_t *cr = helper_cairo_create_context (w, h, &view_options, &output_options);
+ cairo_set_scaled_font (cr, scaled_font);
+ cairo_scaled_font_destroy (scaled_font);
+
+ draw (cr);
+
+ helper_cairo_destroy_context (cr);
+}
+
+void
+view_cairo_t::draw (cairo_t *cr)
+{
+ cairo_save (cr);
+
+ bool vertical = HB_DIRECTION_IS_VERTICAL (direction);
+ int v = vertical ? 1 : 0;
+ int h = vertical ? 0 : 1;
+ cairo_font_extents_t font_extents;
+ cairo_font_extents (cr, &font_extents);
+ cairo_translate (cr, view_options.margin.l, view_options.margin.t);
+ double descent;
+ if (vertical)
+ descent = font_extents.height * (lines->len + .5);
+ else
+ descent = font_extents.height - font_extents.ascent;
+ cairo_translate (cr, v * descent, h * -descent);
+ for (unsigned int i = 0; i < lines->len; i++)
+ {
+ helper_cairo_line_t &l = g_array_index (lines, helper_cairo_line_t, i);
+
+ if (i)
+ cairo_translate (cr, v * -view_options.line_space, h * view_options.line_space);
+
+ cairo_translate (cr, v * -font_extents.height, h * font_extents.height);
+
+ if (view_options.annotate) {
+ cairo_save (cr);
+
+ /* Draw actual glyph origins */
+ cairo_set_source_rgba (cr, 1., 0., 0., .5);
+ cairo_set_line_width (cr, 5);
+ cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
+ for (unsigned i = 0; i < l.num_glyphs; i++) {
+ cairo_move_to (cr, l.glyphs[i].x, l.glyphs[i].y);
+ cairo_rel_line_to (cr, 0, 0);
+ }
+ cairo_stroke (cr);
+
+ cairo_restore (cr);
+ }
+
+ if (0 && cairo_surface_get_type (cairo_get_target (cr)) == CAIRO_SURFACE_TYPE_IMAGE) {
+ /* cairo_show_glyphs() doesn't support subpixel positioning */
+ cairo_glyph_path (cr, l.glyphs, l.num_glyphs);
+ cairo_fill (cr);
+ } else if (l.num_clusters)
+ cairo_show_text_glyphs (cr,
+ l.utf8, l.utf8_len,
+ l.glyphs, l.num_glyphs,
+ l.clusters, l.num_clusters,
+ l.cluster_flags);
+ else
+ cairo_show_glyphs (cr, l.glyphs, l.num_glyphs);
+ }
+
+ cairo_restore (cr);
+}
diff --git a/util/view-cairo.hh b/util/view-cairo.hh
new file mode 100644
index 0000000..c621984
--- /dev/null
+++ b/util/view-cairo.hh
@@ -0,0 +1,99 @@
+/*
+ * Copyright © 2011 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 "options.hh"
+#include "helper-cairo.hh"
+
+#ifndef VIEW_CAIRO_HH
+#define VIEW_CAIRO_HH
+
+
+struct view_cairo_t {
+ view_cairo_t (option_parser_t *parser)
+ : output_options (parser),
+ view_options (parser) {}
+ ~view_cairo_t (void) {
+ if (debug)
+ cairo_debug_reset_static_data ();
+ }
+
+ void init (const font_options_t *font_opts)
+ {
+ lines = g_array_new (false, false, sizeof (helper_cairo_line_t));
+ scale = double (view_options.font_size) / hb_face_get_upem (hb_font_get_face (font_opts->get_font ()));
+ }
+ void new_line (void)
+ {
+ }
+ void consume_text (hb_buffer_t *buffer,
+ const char *text,
+ unsigned int text_len,
+ hb_bool_t utf8_clusters)
+ {
+ }
+ void shape_failed (hb_buffer_t *buffer,
+ const char *text,
+ unsigned int text_len,
+ hb_bool_t utf8_clusters)
+ {
+ fail (false, "all shapers failed");
+ }
+ void consume_glyphs (hb_buffer_t *buffer,
+ const char *text,
+ unsigned int text_len,
+ hb_bool_t utf8_clusters)
+ {
+ direction = hb_buffer_get_direction (buffer);
+ helper_cairo_line_t l;
+ helper_cairo_line_from_buffer (&l, buffer, text, text_len, scale, utf8_clusters);
+ g_array_append_val (lines, l);
+ }
+ void finish (const font_options_t *font_opts)
+ {
+ render (font_opts);
+
+ for (unsigned int i = 0; i < lines->len; i++) {
+ helper_cairo_line_t &line = g_array_index (lines, helper_cairo_line_t, i);
+ line.finish ();
+ }
+ g_array_unref (lines);
+ }
+
+ protected:
+
+ output_options_t output_options;
+ view_options_t view_options;
+
+ void render (const font_options_t *font_opts);
+ void get_surface_size (cairo_scaled_font_t *scaled_font, double *w, double *h);
+ void draw (cairo_t *cr);
+
+ hb_direction_t direction; // Remove this, make segment_properties accessible
+ GArray *lines;
+ double scale;
+};
+
+#endif