summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/libs/README4
-rw-r--r--Build/source/libs/graphite2/ChangeLog5
-rwxr-xr-xBuild/source/libs/graphite2/configure24
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.2/src/Bidi.cpp826
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3-PATCHES/ChangeLog (renamed from Build/source/libs/graphite2/graphite2-1.3.2-PATCHES/ChangeLog)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3-PATCHES/TL-Changes (renamed from Build/source/libs/graphite2/graphite2-1.3.2-PATCHES/TL-Changes)2
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/.hg_archival.txt (renamed from Build/source/libs/graphite2/graphite2-1.3.2/.hg_archival.txt)4
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/.hgeol (renamed from Build/source/libs/graphite2/graphite2-1.3.2/.hgeol)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/.hgignore (renamed from Build/source/libs/graphite2/graphite2-1.3.2/.hgignore)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/.hgtags (renamed from Build/source/libs/graphite2/graphite2-1.3.2/.hgtags)1
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/CMakeLists.txt (renamed from Build/source/libs/graphite2/graphite2-1.3.2/CMakeLists.txt)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/COPYING (renamed from Build/source/libs/graphite2/graphite2-1.3.2/COPYING)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/ChangeLog (renamed from Build/source/libs/graphite2/graphite2-1.3.2/ChangeLog)8
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/Graphite.cmake (renamed from Build/source/libs/graphite2/graphite2-1.3.2/Graphite.cmake)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/LICENSE (renamed from Build/source/libs/graphite2/graphite2-1.3.2/LICENSE)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/Todo.txt (renamed from Build/source/libs/graphite2/graphite2-1.3.2/Todo.txt)1
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/graphite2.pc.in (renamed from Build/source/libs/graphite2/graphite2-1.3.2/graphite2.pc.in)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/include/graphite2/Font.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/include/graphite2/Font.h)2
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/include/graphite2/Log.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/include/graphite2/Log.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/include/graphite2/Segment.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/include/graphite2/Segment.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/include/graphite2/Types.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/include/graphite2/Types.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/CMakeLists.txt (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/CMakeLists.txt)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/CachedFace.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/CachedFace.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/CmapCache.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/CmapCache.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/Code.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/Code.cpp)4
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/Collider.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/Collider.cpp)486
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/Decompressor.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/Decompressor.cpp)40
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/Face.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/Face.cpp)2
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/FeatureMap.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/FeatureMap.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/FileFace.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/FileFace.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/Font.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/Font.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/GlyphCache.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/GlyphCache.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/GlyphFace.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/GlyphFace.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/Intervals.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/Intervals.cpp)8
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/Justifier.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/Justifier.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/NameTable.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/NameTable.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/Pass.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/Pass.cpp)15
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/Position.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/Position.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/SegCache.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/SegCache.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/SegCacheEntry.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/SegCacheEntry.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/SegCacheStore.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/SegCacheStore.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/Segment.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/Segment.cpp)67
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/Silf.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/Silf.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/Slot.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/Slot.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/Sparse.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/Sparse.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/TtfUtil.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/TtfUtil.cpp)4
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/UtfCodec.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/UtfCodec.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/call_machine.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/call_machine.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/direct_machine.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/direct_machine.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/files.mk (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/files.mk)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/gr_char_info.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/gr_char_info.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/gr_face.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/gr_face.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/gr_features.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/gr_features.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/gr_font.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/gr_font.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/gr_logging.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/gr_logging.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/gr_segment.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/gr_segment.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/gr_slot.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/gr_slot.cpp)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Bidi.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Bidi.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/CachedFace.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/CachedFace.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/CharInfo.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/CharInfo.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/CmapCache.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/CmapCache.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Code.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Code.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Collider.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Collider.h)3
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Compression.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Compression.h)31
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Decompressor.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Decompressor.h)18
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Endian.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Endian.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Error.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Error.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Face.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Face.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/FeatureMap.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/FeatureMap.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/FeatureVal.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/FeatureVal.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/FileFace.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/FileFace.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Font.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Font.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/GlyphCache.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/GlyphCache.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/GlyphFace.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/GlyphFace.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Intervals.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Intervals.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/List.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/List.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Machine.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Machine.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Main.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Main.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/NameTable.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/NameTable.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Pass.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Pass.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Position.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Position.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Rule.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Rule.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/SegCache.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/SegCache.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/SegCacheEntry.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/SegCacheEntry.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/SegCacheStore.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/SegCacheStore.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Segment.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Segment.h)58
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Silf.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Silf.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Slot.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Slot.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Sparse.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Sparse.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/TtfTypes.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/TtfTypes.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/TtfUtil.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/TtfUtil.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/UtfCodec.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/UtfCodec.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/bits.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/bits.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/debug.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/debug.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/json.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/json.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/locale2lcid.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/locale2lcid.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/opcode_table.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/opcode_table.h)0
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/inc/opcodes.h (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/inc/opcodes.h)2
-rw-r--r--Build/source/libs/graphite2/graphite2-1.3.3/src/json.cpp (renamed from Build/source/libs/graphite2/graphite2-1.3.2/src/json.cpp)0
-rw-r--r--Build/source/libs/graphite2/version.ac2
100 files changed, 357 insertions, 1260 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README
index 35b7a61343f..a4e0d829390 100644
--- a/Build/source/libs/README
+++ b/Build/source/libs/README
@@ -21,7 +21,7 @@ gd 2.1.1 - checked 14jan15
gmp 6.0.0 - checked 25mar14
http://ftp.gnu.org/gnu/gmp/
-graphite2 1.3.2 - checked 11sep15
+graphite2 1.3.3 - checked 27sep15
http://sourceforge.net/projects/silgraphite/files/graphite2/
harfbuzz 1.0.3 - checked 2sep15
@@ -46,7 +46,7 @@ luajit 2.1.0-beta1 - checked 7sep15
mpfr 3.1.3 - checked 20jun15
http://ftp.gnu.org/gnu/mpfr/
-pixman 0.32.6 - checked 7jul14
+pixman 0.32.8 - checked 27sep15
http://cairographics.org/releases/
poppler 0.36.0 - checked 10sep15
diff --git a/Build/source/libs/graphite2/ChangeLog b/Build/source/libs/graphite2/ChangeLog
index d22bca944aa..bea2c3874cb 100644
--- a/Build/source/libs/graphite2/ChangeLog
+++ b/Build/source/libs/graphite2/ChangeLog
@@ -1,3 +1,8 @@
+2015-09-26 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Import graphite2-1.3.3.
+ * version.ac: Adjusted.
+
2015-09-11 Peter Breitenlohner <peb@mppmu.mpg.de>
Import graphite2-1.3.2.
diff --git a/Build/source/libs/graphite2/configure b/Build/source/libs/graphite2/configure
index 1796a850a9d..82ab029dcc4 100755
--- a/Build/source/libs/graphite2/configure
+++ b/Build/source/libs/graphite2/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for graphite2 (TeX Live) 1.3.2.
+# Generated by GNU Autoconf 2.69 for graphite2 (TeX Live) 1.3.3.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -579,12 +579,12 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='graphite2 (TeX Live)'
PACKAGE_TARNAME='graphite2--tex-live-'
-PACKAGE_VERSION='1.3.2'
-PACKAGE_STRING='graphite2 (TeX Live) 1.3.2'
+PACKAGE_VERSION='1.3.3'
+PACKAGE_STRING='graphite2 (TeX Live) 1.3.3'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
-ac_unique_file="graphite2-1.3.2/graphite2.pc.in"
+ac_unique_file="graphite2-1.3.3/graphite2.pc.in"
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
@@ -1254,7 +1254,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures graphite2 (TeX Live) 1.3.2 to adapt to many kinds of systems.
+\`configure' configures graphite2 (TeX Live) 1.3.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1321,7 +1321,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of graphite2 (TeX Live) 1.3.2:";;
+ short | recursive ) echo "Configuration of graphite2 (TeX Live) 1.3.3:";;
esac
cat <<\_ACEOF
@@ -1419,7 +1419,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-graphite2 (TeX Live) configure 1.3.2
+graphite2 (TeX Live) configure 1.3.3
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1558,7 +1558,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by graphite2 (TeX Live) $as_me 1.3.2, which was
+It was created by graphite2 (TeX Live) $as_me 1.3.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3481,7 +3481,7 @@ fi
# Define the identity of the package.
PACKAGE='graphite2--tex-live-'
- VERSION='1.3.2'
+ VERSION='1.3.3'
cat >>confdefs.h <<_ACEOF
@@ -5009,7 +5009,7 @@ $as_echo "#define GRAPHITE2_NTRACING 1" >>confdefs.h
fi
-GRAPHITE2_TREE=graphite2-1.3.2
+GRAPHITE2_TREE=graphite2-1.3.3
ac_config_files="$ac_config_files Makefile include/graphite2/Makefile"
@@ -5577,7 +5577,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by graphite2 (TeX Live) $as_me 1.3.2, which was
+This file was extended by graphite2 (TeX Live) $as_me 1.3.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5643,7 +5643,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-graphite2 (TeX Live) config.status 1.3.2
+graphite2 (TeX Live) config.status 1.3.3
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/Bidi.cpp b/Build/source/libs/graphite2/graphite2-1.3.2/src/Bidi.cpp
deleted file mode 100644
index 48ec2ebfcd5..00000000000
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/Bidi.cpp
+++ /dev/null
@@ -1,826 +0,0 @@
-/* GRAPHITE2 LICENSING
-
- Copyright 2011, SIL International
- All rights reserved.
-
- This library is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2.1 of 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
- Lesser General Public License for more details.
-
- You should also have received a copy of the GNU Lesser General Public
- License along with this library in the file named "LICENSE".
- If not, write to the Free Software Foundation, 51 Franklin Street,
- suite 500, Boston, MA 02110-1335, USA or visit their web page on the
- internet at http://www.fsf.org/licenses/lgpl.html.
-
-Alternatively, the contents of this file may be used under the terms of the
-Mozilla Public License (http://mozilla.org/MPL) or 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.
-*/
-#include "inc/Main.h"
-#include "inc/Slot.h"
-#include "inc/Segment.h"
-#include "inc/Bidi.h"
-
-using namespace graphite2;
-
-enum DirCode { // Hungarian: dirc
- Unk = -1,
- N = 0, // other neutrals (default) - ON
- L = 1, // left-to-right, strong - L
- R = 2, // right-to-left, strong - R
- AL = 3, // Arabic letter, right-to-left, strong, AR
- EN = 4, // European number, left-to-right, weak - EN
- EUS = 5, // European separator, left-to-right, weak - ES
- ET = 6, // European number terminator, left-to-right, weak - ET
- AN = 7, // Arabic number, left-to-right, weak - AN
- CUS = 8, // Common number separator, left-to-right, weak - CS
- WS = 9, // white space, neutral - WS
- BN = 10, // boundary neutral - BN
-
- LRO = 11, // LTR override
- RLO = 12, // RTL override
- LRE = 13, // LTR embedding
- RLE = 14, // RTL embedding
- PDF = 15, // pop directional format
- NSM = 16, // non-space mark
- LRI = 17, // LRI isolate
- RLI = 18, // RLI isolate
- FSI = 19, // FSI isolate
- PDI = 20, // pop isolate
- OPP = 21, // opening paired parenthesis
- CPP = 22, // closing paired parenthesis
-
- ON = N
-};
-
-enum DirMask {
- WSflag = int8(1 << 7), // keep track of WS for eos handling
- WSMask = int8(~(1 << 7))
-};
-
-inline uint8 BaseClass(Slot *s) { return s->getBidiClass() & WSMask; }
-
-unsigned int bidi_class_map[] = { 0, 1, 2, 5, 4, 8, 9, 3, 7, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0 };
-// Algorithms based on Unicode reference standard code. Thanks Asmus Freitag.
-
-void resolveWeak(Slot *start, int sos, int eos);
-void resolveNeutrals(Slot *s, int baseLevel, int sos, int eos);
-void processParens(Slot *s, Segment *seg, uint8 aMirror, int level, BracketPairStack &stack);
-
-inline int calc_base_level(Slot *s)
-{
- int count = 0;
- for ( ; s; s = s->next())
- {
- int cls = s->getBidiClass();
- if (count)
- {
- switch(cls)
- {
- case LRI :
- case RLI :
- case FSI :
- ++count;
- break;
- case PDI :
- --count;
- }
- }
- else
- {
- switch(cls)
- {
- case L :
- return 0;
- case R :
- case AL :
- return 1;
- case LRI :
- case RLI :
- case FSI :
- ++count;
- }
- }
- }
- return 0;
-}
-
-// inline or not?
-void do_resolves(Slot *start, int level, int sos, int eos, int &bmask, Segment *seg, uint8 aMirror, BracketPairStack &stack)
-{
- if (bmask & 0x1F1178)
- resolveWeak(start, sos, eos);
- if (bmask & 0x200000)
- processParens(start, seg, aMirror, level, stack);
- if (bmask & 0x7E0361)
- resolveNeutrals(start, level, sos, eos);
- bmask = 0;
-}
-
-enum maxs
-{
- MAX_LEVEL = 125,
-};
-
-// returns where we are up to in processing
-Slot *process_bidi(Slot *start, int level, int prelevel, int &nextLevel, int dirover, int isol, int &cisol, int &isolerr, int &embederr, int init, Segment *seg, uint8 aMirror, BracketPairStack &bstack)
-{
- int bmask = 0;
- Slot *s = start;
- Slot *slast = start;
- Slot *scurr = 0;
- Slot *stemp;
- int lnextLevel = nextLevel;
- int newLevel;
- int empty = 1;
- for ( ; s; s = s ? s->next() : s)
- {
- int cls = s->getBidiClass();
- bmask |= (1 << cls);
- s->setBidiLevel(level);
- // we keep s->prev() pointing backwards for PDI repeating
-
- switch (cls)
- {
- case BN :
- if (slast == s) slast = s->next(); // ignore if at front of text
- continue;
- case LRE :
- case LRO :
- case RLE :
- case RLO :
- switch (cls)
- {
- case LRE :
- case LRO :
- newLevel = level + (level & 1 ? 1 : 2);
- break;
- case RLE :
- case RLO :
- newLevel = level + (level & 1 ? 2 : 1);
- break;
- }
- s->setBidiClass(BN);
- if (isolerr || newLevel > MAX_LEVEL || embederr)
- {
- if (!isolerr) ++embederr;
- break;
- }
- stemp = scurr;
- if (scurr)
- scurr->prev(0); // don't include control in string
- lnextLevel = newLevel;
- scurr = s;
- s->setBidiLevel(newLevel); // to make it vanish
- // recurse for the new subsequence. A sequence only contains text at the same level
- s = process_bidi(s->next(), newLevel, level, lnextLevel, cls < LRE, 0, cisol, isolerr, embederr, 0, seg, aMirror, bstack);
- // s points at PDF or end of sequence
- // try to keep extending the run and not process it until we have to
- if (lnextLevel != level || !s) // if the subsequence really had something in it, or we are at the end of the run
- {
- if (slast != scurr) // process the run now, don't try to extend it
- {
- // process text preceeding embedding
- do_resolves(slast, level, (prelevel > level ? prelevel : level) & 1, lnextLevel & 1, bmask, seg, aMirror, bstack);
- empty = 0;
- nextLevel = level;
- }
- else if (lnextLevel != level) // the subsequence had something
- {
- empty = 0; // so we aren't empty either
- nextLevel = lnextLevel; // but since we really are empty, pass back our level from the subsequence
- }
- if (s) // if still more to process
- {
- prelevel = lnextLevel; // future text starts out with sos of the higher subsequence
- lnextLevel = level; // and eos is our level
- }
- slast = s ? s->next() : s;
- }
- else if (stemp)
- stemp->prev(s);
- break;
-
- case PDF :
- s->setBidiClass(BN);
- s->prev(0); // unstitch us since we skip final stitching code when we return
- if (isol || isolerr || init) // boundary error conditions
- break;
- if (embederr)
- {
- --embederr;
- break;
- }
- if (slast != s)
- {
- scurr->prev(0); // if slast, then scurr. Terminate before here
- do_resolves(slast, level, level & 1, level & 1, bmask, seg, aMirror, bstack);
- empty = 0;
- }
- if (empty)
- {
- nextLevel = prelevel; // no contents? set our level to that of parent
- s->setBidiLevel(prelevel);
- }
- return s;
-
- case FSI :
- case LRI :
- case RLI :
- switch (cls)
- {
- case FSI :
- if (calc_base_level(s->next()))
- newLevel = level + (level & 1 ? 2 : 1);
- else
- newLevel = level + (level & 1 ? 1 : 2);
- break;
- case LRI :
- newLevel = level + (level & 1 ? 1 : 2);
- break;
- case RLI :
- newLevel = level + (level & 1 ? 2 : 1);
- break;
- }
- if (newLevel > MAX_LEVEL || isolerr)
- {
- ++isolerr;
- s->setBidiClass(ON | WSflag);
- break;
- }
- ++cisol;
- if (scurr) scurr->prev(s);
- scurr = s; // include FSI
- lnextLevel = newLevel;
- // recurse for the new sub sequence
- s = process_bidi(s->next(), newLevel, newLevel, lnextLevel, 0, 1, cisol, isolerr, embederr, 0, seg, aMirror, bstack);
- // s points at PDI
- if (s)
- {
- bmask |= 1 << BaseClass(s); // include the PDI in the mask
- s->setBidiLevel(level); // reset its level to our level
- }
- lnextLevel = level;
- break;
-
- case PDI :
- if (isolerr)
- {
- --isolerr;
- s->setBidiClass(ON | WSflag);
- break;
- }
- if (init || !cisol)
- {
- s->setBidiClass(ON | WSflag);
- break;
- }
- embederr = 0;
- if (!isol) // we are in an embedded subsequence, we have to return through all those
- {
- if (empty) // if empty, reset the level to tell embedded parent
- nextLevel = prelevel;
- return s->prev(); // keep working up the stack pointing at this PDI until we get to an isolate entry
- }
- else // we are terminating an isolate sequence
- {
- if (slast != s) // process any remaining content in this subseqence
- {
- scurr->prev(0);
- do_resolves(slast, level, prelevel & 1, level & 1, bmask, seg, aMirror, bstack);
- }
- --cisol; // pop the isol sequence from the stack
- return s;
- }
-
- default :
- if (dirover)
- s->setBidiClass((level & 1 ? R : L) | (WSflag * (cls == WS)));
- }
- if (s) s->prev(0); // unstitch us
- if (scurr) // stitch in text for processing
- scurr->prev(s);
- scurr = s; // add us to text to process
- }
- if (slast != s)
- {
- do_resolves(slast, level, (level > prelevel ? level : prelevel) & 1, lnextLevel & 1, bmask, seg, aMirror, bstack);
- empty = 0;
- }
- if (empty || isol)
- nextLevel = prelevel;
- return s;
-}
-
-// === RESOLVE WEAK TYPES ================================================
-
-enum bidi_state // possible states
-{
- xa, // arabic letter
- xr, // right leter
- xl, // left letter
-
- ao, // arabic lett. foll by ON
- ro, // right lett. foll by ON
- lo, // left lett. foll by ON
-
- rt, // ET following R
- lt, // ET following L
-
- cn, // EN, AN following AL
- ra, // arabic number foll R
- re, // european number foll R
- la, // arabic number foll L
- le, // european number foll L
-
- ac, // CS following cn
- rc, // CS following ra
- rs, // CS,ES following re
- lc, // CS following la
- ls, // CS,ES following le
-
- ret, // ET following re
- let, // ET following le
-} ;
-
-const bidi_state stateWeak[][10] =
-{
- // N, L, R, AN, EN, AL,NSM, CS, ES, ET,
-{ /*xa*/ ao, xl, xr, cn, cn, xa, xa, ao, ao, ao, /* arabic letter */ },
-{ /*xr*/ ro, xl, xr, ra, re, xa, xr, ro, ro, rt, /* right letter */ },
-{ /*xl*/ lo, xl, xr, la, le, xa, xl, lo, lo, lt, /* left letter */ },
-
-{ /*ao*/ ao, xl, xr, cn, cn, xa, ao, ao, ao, ao, /* arabic lett. foll by ON*/ },
-{ /*ro*/ ro, xl, xr, ra, re, xa, ro, ro, ro, rt, /* right lett. foll by ON */ },
-{ /*lo*/ lo, xl, xr, la, le, xa, lo, lo, lo, lt, /* left lett. foll by ON */ },
-
-{ /*rt*/ ro, xl, xr, ra, re, xa, rt, ro, ro, rt, /* ET following R */ },
-{ /*lt*/ lo, xl, xr, la, le, xa, lt, lo, lo, lt, /* ET following L */ },
-
-{ /*cn*/ ao, xl, xr, cn, cn, xa, cn, ac, ao, ao, /* EN, AN following AL */ },
-{ /*ra*/ ro, xl, xr, ra, re, xa, ra, rc, ro, rt, /* arabic number foll R */ },
-{ /*re*/ ro, xl, xr, ra, re, xa, re, rs, rs,ret, /* european number foll R */ },
-{ /*la*/ lo, xl, xr, la, le, xa, la, lc, lo, lt, /* arabic number foll L */ },
-{ /*le*/ lo, xl, xr, la, le, xa, le, ls, ls,let, /* european number foll L */ },
-
-{ /*ac*/ ao, xl, xr, cn, cn, xa, ao, ao, ao, ao, /* CS following cn */ },
-{ /*rc*/ ro, xl, xr, ra, re, xa, ro, ro, ro, rt, /* CS following ra */ },
-{ /*rs*/ ro, xl, xr, ra, re, xa, ro, ro, ro, rt, /* CS,ES following re */ },
-{ /*lc*/ lo, xl, xr, la, le, xa, lo, lo, lo, lt, /* CS following la */ },
-{ /*ls*/ lo, xl, xr, la, le, xa, lo, lo, lo, lt, /* CS,ES following le */ },
-
-{ /*ret*/ ro, xl, xr, ra, re, xa,ret, ro, ro,ret, /* ET following re */ },
-{ /*let*/ lo, xl, xr, la, le, xa,let, lo, lo,let, /* ET following le */ },
-
-
-};
-
-enum bidi_action // possible actions
-{
- // primitives
- IX = 0x100, // increment
- XX = 0xF, // no-op
-
- // actions
- xxx = (XX << 4) + XX, // no-op
- xIx = IX + xxx, // increment run
- xxN = (XX << 4) + ON, // set current to N
- xxE = (XX << 4) + EN, // set current to EN
- xxA = (XX << 4) + AN, // set current to AN
- xxR = (XX << 4) + R, // set current to R
- xxL = (XX << 4) + L, // set current to L
- Nxx = (ON << 4) + 0xF, // set run to neutral
- Axx = (AN << 4) + 0xF, // set run to AN
- ExE = (EN << 4) + EN, // set run to EN, set current to EN
- NIx = (ON << 4) + 0xF + IX, // set run to N, increment
- NxN = (ON << 4) + ON, // set run to N, set current to N
- NxR = (ON << 4) + R, // set run to N, set current to R
- NxE = (ON << 4) + EN, // set run to N, set current to EN
-
- AxA = (AN << 4) + AN, // set run to AN, set current to AN
- NxL = (ON << 4) + L, // set run to N, set current to L
- LxL = (L << 4) + L, // set run to L, set current to L
-};
-
-
-const bidi_action actionWeak[][10] =
-{
- // N,.. L, R, AN, EN, AL, NSM, CS,..ES, ET,
-{ /*xa*/ xxx, xxx, xxx, xxx, xxA, xxR, xxR, xxN, xxN, xxN, /* arabic letter */ },
-{ /*xr*/ xxx, xxx, xxx, xxx, xxE, xxR, xxR, xxN, xxN, xIx, /* right leter */ },
-{ /*xl*/ xxx, xxx, xxx, xxx, xxL, xxR, xxL, xxN, xxN, xIx, /* left letter */ },
-
-{ /*ao*/ xxx, xxx, xxx, xxx, xxA, xxR, xxN, xxN, xxN, xxN, /* arabic lett. foll by ON */ },
-{ /*ro*/ xxx, xxx, xxx, xxx, xxE, xxR, xxN, xxN, xxN, xIx, /* right lett. foll by ON */ },
-{ /*lo*/ xxx, xxx, xxx, xxx, xxL, xxR, xxN, xxN, xxN, xIx, /* left lett. foll by ON */ },
-
-{ /*rt*/ Nxx, Nxx, Nxx, Nxx, ExE, NxR, xIx, NxN, NxN, xIx, /* ET following R */ },
-{ /*lt*/ Nxx, Nxx, Nxx, Nxx, LxL, NxR, xIx, NxN, NxN, xIx, /* ET following L */ },
-
-{ /*cn*/ xxx, xxx, xxx, xxx, xxA, xxR, xxA, xIx, xxN, xxN, /* EN, AN following AL */ },
-{ /*ra*/ xxx, xxx, xxx, xxx, xxE, xxR, xxA, xIx, xxN, xIx, /* arabic number foll R */ },
-{ /*re*/ xxx, xxx, xxx, xxx, xxE, xxR, xxE, xIx, xIx, xxE, /* european number foll R */ },
-{ /*la*/ xxx, xxx, xxx, xxx, xxL, xxR, xxA, xIx, xxN, xIx, /* arabic number foll L */ },
-{ /*le*/ xxx, xxx, xxx, xxx, xxL, xxR, xxL, xIx, xIx, xxL, /* european number foll L */ },
-
-{ /*ac*/ Nxx, Nxx, Nxx, Axx, AxA, NxR, NxN, NxN, NxN, NxN, /* CS following cn */ },
-{ /*rc*/ Nxx, Nxx, Nxx, Axx, NxE, NxR, NxN, NxN, NxN, NIx, /* CS following ra */ },
-{ /*rs*/ Nxx, Nxx, Nxx, Nxx, ExE, NxR, NxN, NxN, NxN, NIx, /* CS,ES following re */ },
-{ /*lc*/ Nxx, Nxx, Nxx, Axx, NxL, NxR, NxN, NxN, NxN, NIx, /* CS following la */ },
-{ /*ls*/ Nxx, Nxx, Nxx, Nxx, LxL, NxR, NxN, NxN, NxN, NIx, /* CS,ES following le */ },
-
-{ /*ret*/xxx, xxx, xxx, xxx, xxE, xxR, xxE, xxN, xxN, xxE, /* ET following re */ },
-{ /*let*/xxx, xxx, xxx, xxx, xxL, xxR, xxL, xxN, xxN, xxL, /* ET following le */ },
-};
-
-inline uint8 GetDeferredType(bidi_action a) { return (a >> 4) & 0xF; }
-inline uint8 GetResolvedType(bidi_action a) { return a & 0xF; }
-inline DirCode EmbeddingDirection(int l) { return l & 1 ? R : L; }
-
-// Neutrals
-enum neutral_action
-{
- // action to resolve previous input
- nL = L, // resolve EN to L
- En = 3 << 4, // resolve neutrals run to embedding level direction
- Rn = R << 4, // resolve neutrals run to strong right
- Ln = L << 4, // resolved neutrals run to strong left
- In = (1<<8), // increment count of deferred neutrals
- LnL = (1<<4)+L, // set run and EN to L
-};
-
-// ->prev() here means ->next()
-void SetDeferredRunClass(Slot *s, Slot *sRun, int nval)
-{
- if (!sRun || s == sRun) return;
- for (Slot *p = sRun; p != s; p = p->prev())
- if (p->getBidiClass() == WS) p->setBidiClass(nval | WSflag);
- else if (BaseClass(p) != BN) p->setBidiClass(nval | (p->getBidiClass() & WSflag));
-}
-
-void SetThisDeferredRunClass(Slot *s, Slot *sRun, int nval)
-{
- if (!sRun) return;
- for (Slot *p = sRun, *e = s->prev(); p != e; p = p->prev())
- if (p->getBidiClass() == WS) p->setBidiClass(nval | WSflag);
- else if (BaseClass(p) != BN) p->setBidiClass(nval | (p->getBidiClass() & WSflag));
-}
-
-void resolveWeak(Slot *start, int sos, int eos)
-{
- int state = (sos & 1) ? xr : xl;
- int cls;
- Slot *s = start;
- Slot *sRun = NULL;
- Slot *sLast = s;
-
- for ( ; s; s = s->prev())
- {
- sLast = s;
- cls = BaseClass(s);
- switch (cls)
- {
- case BN :
- if (s == start) start = s->prev(); // skip initial BNs for NSM resolving
- continue;
- case LRI :
- case RLI :
- case FSI :
- case PDI :
- {
- Slot *snext = s->prev();
- if (snext && snext->getBidiClass() == NSM)
- snext->setBidiClass(ON);
- s->setBidiClass(ON | WSflag);
- }
- break;
-
- case NSM :
- if (s == start)
- {
- cls = EmbeddingDirection(sos);
- s->setBidiClass(cls);
- }
- break;
- }
-
- bidi_action action = actionWeak[state][bidi_class_map[cls]];
- int clsRun = GetDeferredType(action);
- if (clsRun != XX)
- {
- SetDeferredRunClass(s, sRun, clsRun);
- sRun = NULL;
- }
- int clsNew = GetResolvedType(action);
- if (clsNew != XX)
- s->setBidiClass(clsNew);
- if (!sRun && (IX & action))
- sRun = s;
- state = stateWeak[state][bidi_class_map[cls]];
- }
-
- cls = EmbeddingDirection(eos);
- int clsRun = GetDeferredType(actionWeak[state][bidi_class_map[cls]]);
- if (clsRun != XX)
- SetThisDeferredRunClass(sLast, sRun, clsRun);
-}
-
-void processParens(Slot *s, Segment *seg, uint8 aMirror, int level, BracketPairStack &stack)
-{
- uint8 mask = 0;
- int8 lastDir = -1;
- BracketPair *p;
- for ( ; s; s = s->prev()) // walk the sequence
- {
- uint16 ogid = seg->glyphAttr(s->gid(), aMirror) || s->gid();
- int cls = BaseClass(s);
-
- switch(cls)
- {
- case OPP :
- stack.orin(mask);
- stack.push(ogid, s, lastDir, lastDir != CPP);
- mask = 0;
- lastDir = OPP;
- break;
- case CPP :
- stack.orin(mask);
- p = stack.scan(s->gid());
- if (!p) break;
- mask = 0;
- stack.close(p, s);
- lastDir = CPP;
- break;
- case L :
- lastDir = L;
- mask |= 1;
- break;
- case R :
- case AL :
- case AN :
- case EN :
- lastDir = R;
- mask |= 2;
- }
- }
- if (stack.size())
- {
- for (p = stack.start(); p; p =p->next()) // walk the stack
- {
- if (p->close() && p->mask())
- {
- int dir = (level & 1) + 1;
- if (p->mask() & dir)
- { }
- else if (p->mask() & (1 << (~level & 1))) // if inside has strong other embedding
- {
- int ldir = p->before();
- if ((p->before() == OPP || p->before() == CPP) && p->prev())
- {
- for (BracketPair *q = p->prev(); q; q = q->prev())
- {
- ldir = q->open()->getBidiClass();
- if (ldir < 3) break;
- ldir = q->before();
- if (ldir < 3) break;
- }
- if (ldir > 2) ldir = 0;
- }
- if (ldir > 0 && (ldir - 1) != (level & 1)) // is dir given opp. to level dir (ldir == R or L)
- dir = (~level & 1) + 1;
- }
- p->open()->setBidiClass(dir);
- p->close()->setBidiClass(dir);
- }
- }
- stack.clear();
- }
-}
-
-int GetDeferredNeutrals(int action, int level)
-{
- action = (action >> 4) & 0xF;
- if (action == (En >> 4))
- return EmbeddingDirection(level);
- else
- return action;
-}
-
-int GetResolvedNeutrals(int action)
-{
- return action & 0xF;
-}
-
-// state values
-enum neutral_state
-{
- // new temporary class
- r, // R and characters resolved to R
- l, // L and characters resolved to L
- rn, // N preceded by right
- ln, // N preceded by left
- a, // AN preceded by left (the abbrev 'la' is used up above)
- na, // N preceeded by a
-} ;
-
-const uint8 neutral_class_map[] = { 0, 1, 2, 0, 4, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-
-const int actionNeutrals[][5] =
-{
-// cls= N, L, R, AN, EN, state =
-{ In, 0, 0, 0, 0, }, // r right
-{ In, 0, 0, 0, L, }, // l left
-
-{ In, En, Rn, Rn, Rn, }, // rn N preceded by right
-{ In, Ln, En, En, LnL, }, // ln N preceded by left
-
-{ In, 0, 0, 0, L, }, // a AN preceded by left
-{ In, En, Rn, Rn, En, }, // na N preceded by a
-} ;
-
-const int stateNeutrals[][5] =
-{
-// cls= N, L, R, AN, EN state =
-{ rn, l, r, r, r, }, // r right
-{ ln, l, r, a, l, }, // l left
-
-{ rn, l, r, r, r, }, // rn N preceded by right
-{ ln, l, r, a, l, }, // ln N preceded by left
-
-{ na, l, r, a, l, }, // a AN preceded by left
-{ na, l, r, a, l, }, // na N preceded by la
-} ;
-
-void resolveNeutrals(Slot *s, int baseLevel, int sos, int eos)
-{
- int state = (sos & 1) ? r : l;
- int cls;
- Slot *sRun = NULL;
- Slot *sLast = s;
- int level = baseLevel;
-
- for ( ; s; s = s->prev())
- {
- sLast = s;
- cls = BaseClass(s);
- switch (cls)
- {
- case BN :
- continue;
- case LRI :
- case RLI :
- case FSI :
- s->setBidiClass(BN | WSflag);
- continue;
-
- default :
- int action = actionNeutrals[state][neutral_class_map[cls]];
- int clsRun = GetDeferredNeutrals(action, level);
- if (clsRun != N)
- {
- SetDeferredRunClass(s, sRun, clsRun);
- sRun = NULL;
- }
- int clsNew = GetResolvedNeutrals(action);
- if (clsNew != N)
- s->setBidiClass(clsNew);
- if (!sRun && (action & In))
- sRun = s;
- state = stateNeutrals[state][neutral_class_map[cls]];
- }
- }
- cls = EmbeddingDirection(eos);
- int clsRun = GetDeferredNeutrals(actionNeutrals[state][neutral_class_map[cls]], level);
- if (clsRun != N)
- SetThisDeferredRunClass(sLast, sRun, clsRun);
-}
-
-const int addLevel[][4] =
-{
- // cls = L, R, AN, EN level =
-/* even */ { 0, 1, 2, 2, }, // EVEN
-/* odd */ { 1, 0, 1, 1, }, // ODD
-
-};
-
-void resolveImplicit(Slot *s, Segment *seg, uint8 aMirror)
-{
- bool rtl = seg->dir() & 1;
- int level = rtl;
- Slot *slast = 0;
- for ( ; s; s = s->next())
- {
- int cls = BaseClass(s);
- s->prev(slast); // restitch the prev() side of the doubly linked list
- slast = s;
- if (cls == AN)
- cls = AL; // use AL value as the index for AN, no property change
- if (cls < 5 && cls > 0)
- {
- level = s->getBidiLevel();
- level += addLevel[level & 1][cls - 1];
- s->setBidiLevel(level);
- }
- if (aMirror)
- {
- int hasChar = seg->glyphAttr(s->gid(), aMirror + 1);
- if ( ((level & 1) && (!(seg->dir() & 4) || !hasChar))
- || ((rtl ^ (level & 1)) && (seg->dir() & 4) && hasChar) )
- {
- unsigned short g = seg->glyphAttr(s->gid(), aMirror);
- if (g) s->setGlyph(seg, g);
- }
- }
- }
-}
-
-void resolveWhitespace(int baseLevel, Slot *s)
-{
- for ( ; s; s = s->prev())
- {
- int8 cls = s->getBidiClass();
- if (cls == WS || (cls & WSflag))
- s->setBidiLevel(baseLevel);
- else if (cls != BN)
- break;
- }
-}
-
-
-/*
-Stitch two spans together to make another span (with ends tied together).
-If the level is odd then swap the order of the two spans
-*/
-inline
-Slot * join(int level, Slot * a, Slot * b)
-{
- if (!a) return b;
- if (level & 1) { Slot * const t = a; a = b; b = t; }
- Slot * const t = b->prev();
- a->prev()->next(b); b->prev(a->prev()); // splice middle
- t->next(a); a->prev(t); // splice ends
- return a;
-}
-
-/*
-Given the first slot in a run of slots with the same bidi level, turn the run
-into it's own little doubly linked list ring (a span) with the two ends joined together.
-If the run is rtl then reverse its direction.
-Returns the first slot after the span
-*/
-Slot * span(Slot * & cs, const bool rtl)
-{
- Slot * r = cs, * re = cs; cs = cs->next();
- if (rtl)
- {
- Slot * t = r->next(); r->next(r->prev()); r->prev(t);
- for (int l = r->getBidiLevel(); cs && (l == cs->getBidiLevel() || cs->getBidiClass() == BN); cs = cs->prev())
- {
- re = cs;
- t = cs->next(); cs->next(cs->prev()); cs->prev(t);
- }
- r->next(re);
- re->prev(r);
- r = re;
- }
- else
- {
- for (int l = r->getBidiLevel(); cs && (l == cs->getBidiLevel() || cs->getBidiClass() == BN); cs = cs->next())
- re = cs;
- r->prev(re);
- re->next(r);
- }
- if (cs) cs->prev(0);
- return r;
-}
-
-inline int getlevel(const Slot *cs, const int level)
-{
- while (cs && cs->getBidiClass() == BN)
- { cs = cs->next(); }
- if (cs)
- return cs->getBidiLevel();
- else
- return level;
-}
-
-Slot *resolveOrder(Slot * & cs, const bool reordered, const int level)
-{
- Slot * r = 0;
- int ls;
- while (cs && level <= (ls = getlevel(cs, level) - reordered))
- {
- r = join(level, r, level < ls
- ? resolveOrder(/* updates */cs, reordered, level+1) // find span of heighest level
- : span(/* updates */cs, level & 1));
- }
- return r;
-}
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2-PATCHES/ChangeLog b/Build/source/libs/graphite2/graphite2-1.3.3-PATCHES/ChangeLog
index 8d3061edbaf..8d3061edbaf 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2-PATCHES/ChangeLog
+++ b/Build/source/libs/graphite2/graphite2-1.3.3-PATCHES/ChangeLog
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2-PATCHES/TL-Changes b/Build/source/libs/graphite2/graphite2-1.3.3-PATCHES/TL-Changes
index e3aa57cb155..ff34dd7a00d 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2-PATCHES/TL-Changes
+++ b/Build/source/libs/graphite2/graphite2-1.3.3-PATCHES/TL-Changes
@@ -1,4 +1,4 @@
-Changes applied to the graphite2-1.3.2/ tree as obtained from:
+Changes applied to the graphite2-1.3.3/ tree as obtained from:
http://sourceforge.net/projects/silgraphite/files/graphite2/
Removed unused dirs:
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/.hg_archival.txt b/Build/source/libs/graphite2/graphite2-1.3.3/.hg_archival.txt
index 9945022b1d9..de4c9cc26ee 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/.hg_archival.txt
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/.hg_archival.txt
@@ -1,5 +1,5 @@
repo: 999e2033695c3bcf2f65d611737ac9008805bd58
-node: 0f9edca718496582b5d97fdb3c32c34192b10c37
+node: ff457b44c490e38901c7a064ff54cdbc4d3487b4
branch: default
-latesttag: 1.3.2
+latesttag: 1.3.3
latesttagdistance: 1
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/.hgeol b/Build/source/libs/graphite2/graphite2-1.3.3/.hgeol
index 5eb1fc19d0f..5eb1fc19d0f 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/.hgeol
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/.hgeol
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/.hgignore b/Build/source/libs/graphite2/graphite2-1.3.3/.hgignore
index 59c168c2179..59c168c2179 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/.hgignore
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/.hgignore
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/.hgtags b/Build/source/libs/graphite2/graphite2-1.3.3/.hgtags
index a77aa5abf35..ef318023552 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/.hgtags
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/.hgtags
@@ -36,3 +36,4 @@ fb4b0c347a953f6aa656a4e414f8e42e91c00c2b 1.2.0
1c1f050f234665cba946f3f4624baf55e3e54299 1.3.1
07d926106a065faba719db1829c59ec836ec1ded 1.3.1
158e147bfb47d9f5b292230a841ff65466c8669d 1.3.2
+57f777f15780a83462fd714b6c76d9b163b8f3d0 1.3.3
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/CMakeLists.txt b/Build/source/libs/graphite2/graphite2-1.3.3/CMakeLists.txt
index bb8d75bd63a..bb8d75bd63a 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/CMakeLists.txt
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/CMakeLists.txt
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/COPYING b/Build/source/libs/graphite2/graphite2-1.3.3/COPYING
index d40f2d84587..d40f2d84587 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/COPYING
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/COPYING
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/ChangeLog b/Build/source/libs/graphite2/graphite2-1.3.3/ChangeLog
index f005fb55e5e..a2dddc1de25 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/ChangeLog
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/ChangeLog
@@ -1,3 +1,11 @@
+1.3.3
+ . Slight speed up in Collision Avoidance
+ . Remove dead bidi code
+ . Bug fixes
+ . Between pass bidi reorderings and at the end
+ . Decompressor fuzz bugs
+ . Other fuzz bugs
+
1.3.2
. Remove full bidi. All segments are assumed to be single directioned.
. Bug fixes:
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/Graphite.cmake b/Build/source/libs/graphite2/graphite2-1.3.3/Graphite.cmake
index 30980a506c7..30980a506c7 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/Graphite.cmake
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/Graphite.cmake
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/LICENSE b/Build/source/libs/graphite2/graphite2-1.3.3/LICENSE
index 2d2d780e601..2d2d780e601 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/LICENSE
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/LICENSE
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/Todo.txt b/Build/source/libs/graphite2/graphite2-1.3.3/Todo.txt
index c4e680ddeb9..72ab26feb0e 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/Todo.txt
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/Todo.txt
@@ -2,7 +2,6 @@ Expected changes to come:
* Change regression testing to use binary diffs of fonts instead of font locations
* Move to github
* Reduce size of committed test/ tree
-* Remove dead bidi code
Questions:
* Do we support glyphid as a slot attribute?
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/graphite2.pc.in b/Build/source/libs/graphite2/graphite2-1.3.3/graphite2.pc.in
index a4f19b39ce4..a4f19b39ce4 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/graphite2.pc.in
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/graphite2.pc.in
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/include/graphite2/Font.h b/Build/source/libs/graphite2/graphite2-1.3.3/include/graphite2/Font.h
index ec84bf5cd64..665685beb74 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/include/graphite2/Font.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/include/graphite2/Font.h
@@ -30,7 +30,7 @@
#define GR2_VERSION_MAJOR 1
#define GR2_VERSION_MINOR 3
-#define GR2_VERSION_BUGFIX 2
+#define GR2_VERSION_BUGFIX 3
#ifdef __cplusplus
extern "C"
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/include/graphite2/Log.h b/Build/source/libs/graphite2/graphite2-1.3.3/include/graphite2/Log.h
index d1c6f0fe36f..d1c6f0fe36f 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/include/graphite2/Log.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/include/graphite2/Log.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/include/graphite2/Segment.h b/Build/source/libs/graphite2/graphite2-1.3.3/include/graphite2/Segment.h
index 0c3c49a3acf..0c3c49a3acf 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/include/graphite2/Segment.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/include/graphite2/Segment.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/include/graphite2/Types.h b/Build/source/libs/graphite2/graphite2-1.3.3/include/graphite2/Types.h
index e8e45c1ff8f..e8e45c1ff8f 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/include/graphite2/Types.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/include/graphite2/Types.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/CMakeLists.txt b/Build/source/libs/graphite2/graphite2-1.3.3/src/CMakeLists.txt
index 9983e019705..9983e019705 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/CMakeLists.txt
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/CMakeLists.txt
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/CachedFace.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/CachedFace.cpp
index fd599bde8aa..fd599bde8aa 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/CachedFace.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/CachedFace.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/CmapCache.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/CmapCache.cpp
index a945ef23443..a945ef23443 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/CmapCache.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/CmapCache.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/Code.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/Code.cpp
index 0cbb9f62e69..a83cf0c8546 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/Code.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/Code.cpp
@@ -214,8 +214,8 @@ Machine::Code::Code(bool is_constraint, const byte * bytecode_begin, const byte
// Now we know exactly how much code and data the program really needs
// realloc the buffers to exactly the right size so we don't waste any
// memory.
- assert((bytecode_end - bytecode_begin) >= std::ptrdiff_t(_instr_count));
- assert((bytecode_end - bytecode_begin) >= std::ptrdiff_t(_data_size));
+ assert((bytecode_end - bytecode_begin) >= ptrdiff_t(_instr_count));
+ assert((bytecode_end - bytecode_begin) >= ptrdiff_t(_data_size));
memmove(_code + (_instr_count+1), _data, _data_size*sizeof(byte));
size_t const total_sz = ((_instr_count+1) + (_data_size + sizeof(instr)-1)/sizeof(instr))*sizeof(instr);
if (_out)
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/Collider.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/Collider.cpp
index fa8ed0d40a6..51873a2841f 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/Collider.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/Collider.cpp
@@ -51,7 +51,7 @@ bool ShiftCollider::initSlot(Segment *seg, Slot *aSlot, const Rect &limit, float
const Position &currShift, const Position &currOffset, int dir, GR_MAYBE_UNUSED json * const dbgout)
{
int i;
- float max, min;
+ float mx, mn;
float a, shift;
const GlyphCache &gc = seg->getFace()->glyphs();
unsigned short gid = aSlot->gid();
@@ -71,36 +71,36 @@ bool ShiftCollider::initSlot(Segment *seg, Slot *aSlot, const Rect &limit, float
{
switch (i) {
case 0 : // x direction
- min = _limit.bl.x + currOffset.x;
- max = _limit.tr.x + currOffset.x;
+ mn = _limit.bl.x + currOffset.x;
+ mx = _limit.tr.x + currOffset.x;
_len[i] = bb.xa - bb.xi;
a = currOffset.y + currShift.y;
- _ranges[i].initialise<XY>(min, max, margin, marginWeight, a);
+ _ranges[i].initialise<XY>(mn, mx, margin, marginWeight, a);
break;
case 1 : // y direction
- min = _limit.bl.y + currOffset.y;
- max = _limit.tr.y + currOffset.y;
+ mn = _limit.bl.y + currOffset.y;
+ mx = _limit.tr.y + currOffset.y;
_len[i] = bb.ya - bb.yi;
a = currOffset.x + currShift.x;
- _ranges[i].initialise<XY>(min, max, margin, marginWeight, a);
+ _ranges[i].initialise<XY>(mn, mx, margin, marginWeight, a);
break;
case 2 : // sum (negatively sloped diagonal boundaries)
// pick closest x,y limit boundaries in s direction
shift = currOffset.x + currOffset.y + currShift.x + currShift.y;
- min = -2 * std::min(currShift.x - _limit.bl.x, currShift.y - _limit.bl.y) + shift;
- max = 2 * std::min(_limit.tr.x - currShift.x, _limit.tr.y - currShift.y) + shift;
+ mn = -2 * min(currShift.x - _limit.bl.x, currShift.y - _limit.bl.y) + shift;
+ mx = 2 * min(_limit.tr.x - currShift.x, _limit.tr.y - currShift.y) + shift;
_len[i] = sb.sa - sb.si;
a = currOffset.x - currOffset.y + currShift.x - currShift.y;
- _ranges[i].initialise<SD>(min, max, margin / ISQRT2, marginWeight, a);
+ _ranges[i].initialise<SD>(mn, mx, margin / ISQRT2, marginWeight, a);
break;
case 3 : // diff (positively sloped diagonal boundaries)
// pick closest x,y limit boundaries in d direction
shift = currOffset.x - currOffset.y + currShift.x - currShift.y;
- min = -2 * std::min(currShift.x - _limit.bl.x, _limit.tr.y - currShift.y) + shift;
- max = 2 * std::min(_limit.tr.x - currShift.x, currShift.y - _limit.bl.y) + shift;
+ mn = -2 * min(currShift.x - _limit.bl.x, _limit.tr.y - currShift.y) + shift;
+ mx = 2 * min(_limit.tr.x - currShift.x, currShift.y - _limit.bl.y) + shift;
_len[i] = sb.da - sb.di;
a = currOffset.x + currOffset.y + currShift.x + currShift.y;
- _ranges[i].initialise<SD>(min, max, margin / ISQRT2, marginWeight, a);
+ _ranges[i].initialise<SD>(mn, mx, margin / ISQRT2, marginWeight, a);
break;
}
}
@@ -175,8 +175,8 @@ void ShiftCollider::addBox_slope(bool isx, const Rect &box, const BBox &bb, cons
{
float d = org.x - org.y + 0.5f * (sb.di + sb.da);
c = 0.5f * (sb.si + sb.sa);
- float smax = std::min(2 * box.tr.x - d, 2 * box.tr.y + d);
- float smin = std::max(2 * box.bl.x - d, 2 * box.bl.y + d);
+ float smax = min(2 * box.tr.x - d, 2 * box.tr.y + d);
+ float smin = max(2 * box.bl.x - d, 2 * box.bl.y + d);
if (smin > smax) return;
float si;
a = d;
@@ -192,8 +192,8 @@ void ShiftCollider::addBox_slope(bool isx, const Rect &box, const BBox &bb, cons
{
float s = org.x + org.y + 0.5f * (sb.si + sb.sa);
c = 0.5f * (sb.di + sb.da);
- float dmax = std::min(2 * box.tr.x - s, s - 2 * box.bl.y);
- float dmin = std::max(2 * box.bl.x - s, s - 2 * box.tr.y);
+ float dmax = min(2 * box.tr.x - s, s - 2 * box.bl.y);
+ float dmin = max(2 * box.bl.x - s, s - 2 * box.tr.y);
if (dmin > dmax) return;
float di;
a = s;
@@ -268,10 +268,6 @@ bool ShiftCollider::mergeSlot(Segment *seg, Slot *slot, const Position &currShif
GR_MAYBE_UNUSED json * const dbgout )
{
bool isCol = false;
- const float tx = _currOffset.x + _currShift.x;
- const float ty = _currOffset.y + _currShift.y;
- const float td = tx - ty;
- const float ts = tx + ty;
const float sx = slot->origin().x - _origin.x + currShift.x;
const float sy = slot->origin().y - _origin.y + currShift.y;
const float sd = sx - sy;
@@ -284,11 +280,7 @@ bool ShiftCollider::mergeSlot(Segment *seg, Slot *slot, const Position &currShif
const unsigned short gid = slot->gid();
if (!gc.check(gid))
return false;
- const unsigned short tgid = _target->gid();
const BBox &bb = gc.getBoundingBBox(gid);
- const SlantBox &sb = gc.getBoundingSlantBox(gid);
- const BBox &tbb = gc.getBoundingBBox(tgid);
- const SlantBox &tsb = gc.getBoundingSlantBox(tgid);
SlotCollision * cslot = seg->collisionInfo(slot);
int orderFlags = 0;
@@ -297,220 +289,253 @@ bool ShiftCollider::mergeSlot(Segment *seg, Slot *slot, const Position &currShif
&& (sameClass || (_seqProxClass != 0 && cslot->seqClass() == _seqProxClass)))
// Force the target glyph to be in the specified direction from the slot we're testing.
orderFlags = _seqOrder;
- float seq_above_wt = cslot->seqAboveWt();
- float seq_below_wt = cslot->seqBelowWt();
- float seq_valign_wt = cslot->seqValignWt();
- // if isAfter, invert orderFlags for diagonal orders.
- if (isAfter)
- {
- // invert appropriate bits
- orderFlags ^= (sameClass ? 0x3F : 0x3);
- // consider 2 bits at a time, non overlapping. If both bits set, clear them
- orderFlags = orderFlags ^ ((((orderFlags >> 1) & orderFlags) & 0x15) * 3);
- }
+ // short circuit if only interested in direct collision and we are out of range
+ if (orderFlags || (sx + bb.xa + _margin >= _limit.bl.x && sx + bb.xi - _margin <= _limit.tr.x)
+ || (sy + bb.ya + _margin >= _limit.bl.y && sy + bb.yi - _margin <= _limit.tr.y))
-#if !defined GRAPHITE2_NTRACING
- if (dbgout)
- dbgout->setenv(0, slot);
-#endif
-
- // Process main bounding octabox.
- for (int i = 0; i < 4; ++i)
{
- switch (i) {
- case 0 : // x direction
- vmin = std::max(std::max(bb.xi - tbb.xa + sx, sb.di - tsb.da + ty + sd), sb.si - tsb.sa - ty + ss);
- vmax = std::min(std::min(bb.xa - tbb.xi + sx, sb.da - tsb.di + ty + sd), sb.sa - tsb.si - ty + ss);
- otmin = tbb.yi + ty;
- otmax = tbb.ya + ty;
- omin = bb.yi + sy;
- omax = bb.ya + sy;
- torg = _currOffset.x;
- cmin = _limit.bl.x + torg;
- cmax = _limit.tr.x - tbb.xi + tbb.xa + torg;
- break;
- case 1 : // y direction
- vmin = std::max(std::max(bb.yi - tbb.ya + sy, tsb.di - sb.da + tx - sd), sb.si - tsb.sa - tx + ss);
- vmax = std::min(std::min(bb.ya - tbb.yi + sy, tsb.da - sb.di + tx - sd), sb.sa - tsb.si - tx + ss);
- otmin = tbb.xi + tx;
- otmax = tbb.xa + tx;
- omin = bb.xi + sx;
- omax = bb.xa + sx;
- torg = _currOffset.y;
- cmin = _limit.bl.y + torg;
- cmax = _limit.tr.y - tbb.yi + tbb.ya + torg;
- break;
- case 2 : // sum - moving along the positively-sloped vector, so the boundaries are the
- // negatively-sloped boundaries.
- vmin = std::max(std::max(sb.si - tsb.sa + ss, 2 * (bb.yi - tbb.ya + sy) + td), 2 * (bb.xi - tbb.xa + sx) - td);
- vmax = std::min(std::min(sb.sa - tsb.si + ss, 2 * (bb.ya - tbb.yi + sy) + td), 2 * (bb.xa - tbb.xi + sx) - td);
- otmin = tsb.di + td;
- otmax = tsb.da + td;
- omin = sb.di + sd;
- omax = sb.da + sd;
- torg = _currOffset.x + _currOffset.y;
- cmin = _limit.bl.x + _limit.bl.y + torg;
- cmax = _limit.tr.x + _limit.tr.y - tsb.si + tsb.sa + torg;
- break;
- case 3 : // diff - moving along the negatively-sloped vector, so the boundaries are the
- // positively-sloped boundaries.
- vmin = std::max(std::max(sb.di - tsb.da + sd, 2 * (bb.xi - tbb.xa + sx) - ts), -2 * (bb.ya - tbb.yi + sy) + ts);
- vmax = std::min(std::min(sb.da - tsb.di + sd, 2 * (bb.xa - tbb.xi + sx) - ts), -2 * (bb.yi - tbb.ya + sy) + ts);
- otmin = tsb.si + ts;
- otmax = tsb.sa + ts;
- omin = sb.si + ss;
- omax = sb.sa + ss;
- torg = _currOffset.x - _currOffset.y;
- cmin = _limit.bl.x - _limit.tr.y + torg;
- cmax = _limit.tr.x - _limit.bl.y - tsb.di + tsb.da + torg;
- break;
- default :
- continue;
+ const float tx = _currOffset.x + _currShift.x;
+ const float ty = _currOffset.y + _currShift.y;
+ const float td = tx - ty;
+ const float ts = tx + ty;
+ const SlantBox &sb = gc.getBoundingSlantBox(gid);
+ const unsigned short tgid = _target->gid();
+ const BBox &tbb = gc.getBoundingBBox(tgid);
+ const SlantBox &tsb = gc.getBoundingSlantBox(tgid);
+ float seq_above_wt = cslot->seqAboveWt();
+ float seq_below_wt = cslot->seqBelowWt();
+ float seq_valign_wt = cslot->seqValignWt();
+ // if isAfter, invert orderFlags for diagonal orders.
+ if (isAfter)
+ {
+ // invert appropriate bits
+ orderFlags ^= (sameClass ? 0x3F : 0x3);
+ // consider 2 bits at a time, non overlapping. If both bits set, clear them
+ orderFlags = orderFlags ^ ((((orderFlags >> 1) & orderFlags) & 0x15) * 3);
}
-
+
#if !defined GRAPHITE2_NTRACING
if (dbgout)
- dbgout->setenv(1, reinterpret_cast<void *>(-1));
-#define DBGTAG(x) if (dbgout) dbgout->setenv(1, reinterpret_cast<void *>(-x));
-#else
-#define DBGTAG(x)
+ dbgout->setenv(0, slot);
#endif
- if (orderFlags)
+ // Process main bounding octabox.
+ for (int i = 0; i < 4; ++i)
{
- Position org(tx, ty);
- float xminf = _limit.bl.x + _currOffset.x + tbb.xi;
- float xpinf = _limit.tr.x + _currOffset.x + tbb.xa;
- float ypinf = _limit.tr.y + _currOffset.y + tbb.ya;
- float yminf = _limit.bl.y + _currOffset.y + tbb.yi;
- switch (orderFlags) {
- case SlotCollision::SEQ_ORDER_RIGHTUP :
- {
- float r1Xedge = cslot->seqAboveXoff() + 0.5f * (bb.xi + bb.xa) + sx;
- float r3Xedge = cslot->seqBelowXlim() + bb.xa + sx + 0.5f * (tbb.xa - tbb.xi);
- float r2Yedge = 0.5f * (bb.yi + bb.ya) + sy;
-
- // DBGTAG(1x) means the regions are up and right
- // region 1
- DBGTAG(11)
- addBox_slope(true, Rect(Position(xminf, r2Yedge), Position(r1Xedge, ypinf)),
- tbb, tsb, org, 0, seq_above_wt, true, i);
- // region 2
- DBGTAG(12)
- removeBox(Rect(Position(xminf, yminf), Position(r3Xedge, r2Yedge)), tbb, tsb, org, i);
- // region 3, which end is zero is irrelevant since m weight is 0
- DBGTAG(13)
- addBox_slope(true, Rect(Position(r3Xedge, yminf), Position(xpinf, r2Yedge - cslot->seqValignHt())),
- tbb, tsb, org, seq_below_wt, 0, true, i);
- // region 4
- DBGTAG(14)
- addBox_slope(false, Rect(Position(sx + bb.xi, r2Yedge), Position(xpinf, r2Yedge + cslot->seqValignHt())),
- tbb, tsb, org, 0, seq_valign_wt, true, i);
- // region 5
- DBGTAG(15)
- addBox_slope(false, Rect(Position(sx + bb.xi, r2Yedge - cslot->seqValignHt()), Position(xpinf, r2Yedge)),
- tbb, tsb, org, seq_below_wt, seq_valign_wt, false, i);
- break;
- }
- case SlotCollision::SEQ_ORDER_LEFTDOWN :
- {
- float r1Xedge = 0.5f * (bb.xi + bb.xa) + cslot->seqAboveXoff() + sx;
- float r3Xedge = bb.xi - cslot->seqBelowXlim() + sx - 0.5f * (tbb.xa - tbb.xi);
- float r2Yedge = 0.5f * (bb.yi + bb.ya) + sy;
- // DBGTAG(2x) means the regions are up and right
- // region 1
- DBGTAG(21)
- addBox_slope(true, Rect(Position(r1Xedge, yminf), Position(xpinf, r2Yedge)),
- tbb, tsb, org, 0, seq_above_wt, false, i);
- // region 2
- DBGTAG(22)
- removeBox(Rect(Position(r3Xedge, r2Yedge), Position(xpinf, ypinf)), tbb, tsb, org, i);
- // region 3
- DBGTAG(23)
- addBox_slope(true, Rect(Position(xminf, r2Yedge - cslot->seqValignHt()), Position(r3Xedge, ypinf)),
- tbb, tsb, org, seq_below_wt, 0, false, i);
- // region 4
- DBGTAG(24)
- addBox_slope(false, Rect(Position(xminf, r2Yedge), Position(sx + bb.xa, r2Yedge + cslot->seqValignHt())),
- tbb, tsb, org, 0, seq_valign_wt, true, i);
- // region 5
- DBGTAG(25)
- addBox_slope(false, Rect(Position(xminf, r2Yedge - cslot->seqValignHt()),
- Position(sx + bb.xa, r2Yedge)), tbb, tsb, org, seq_below_wt, seq_valign_wt, false, i);
- break;
- }
- case SlotCollision::SEQ_ORDER_NOABOVE : // enforce neighboring glyph being above
- DBGTAG(31);
- removeBox(Rect(Position(bb.xi - tbb.xa + sx, sy + bb.ya),
- Position(bb.xa - tbb.xi + sx, ypinf)), tbb, tsb, org, i);
+ switch (i) {
+ case 0 : // x direction
+ vmin = max(max(bb.xi - tbb.xa + sx, sb.di - tsb.da + ty + sd), sb.si - tsb.sa - ty + ss);
+ vmax = min(min(bb.xa - tbb.xi + sx, sb.da - tsb.di + ty + sd), sb.sa - tsb.si - ty + ss);
+ otmin = tbb.yi + ty;
+ otmax = tbb.ya + ty;
+ omin = bb.yi + sy;
+ omax = bb.ya + sy;
+ torg = _currOffset.x;
+ cmin = _limit.bl.x + torg;
+ cmax = _limit.tr.x - tbb.xi + tbb.xa + torg;
break;
- case SlotCollision::SEQ_ORDER_NOBELOW : // enforce neighboring glyph being below
- DBGTAG(32);
- removeBox(Rect(Position(bb.xi - tbb.xa + sx, yminf),
- Position(bb.xa - tbb.xi + sx, sy + bb.yi)), tbb, tsb, org, i);
+ case 1 : // y direction
+ vmin = max(max(bb.yi - tbb.ya + sy, tsb.di - sb.da + tx - sd), sb.si - tsb.sa - tx + ss);
+ vmax = min(min(bb.ya - tbb.yi + sy, tsb.da - sb.di + tx - sd), sb.sa - tsb.si - tx + ss);
+ otmin = tbb.xi + tx;
+ otmax = tbb.xa + tx;
+ omin = bb.xi + sx;
+ omax = bb.xa + sx;
+ torg = _currOffset.y;
+ cmin = _limit.bl.y + torg;
+ cmax = _limit.tr.y - tbb.yi + tbb.ya + torg;
break;
- case SlotCollision::SEQ_ORDER_NOLEFT : // enforce neighboring glyph being to the left
- DBGTAG(33)
- removeBox(Rect(Position(xminf, bb.yi - tbb.ya + sy),
- Position(bb.xi - tbb.xa + sx, bb.ya - tbb.yi + sy)), tbb, tsb, org, i);
+ case 2 : // sum - moving along the positively-sloped vector, so the boundaries are the
+ // negatively-sloped boundaries.
+ vmin = max(max(sb.si - tsb.sa + ss, 2 * (bb.yi - tbb.ya + sy) + td), 2 * (bb.xi - tbb.xa + sx) - td);
+ vmax = min(min(sb.sa - tsb.si + ss, 2 * (bb.ya - tbb.yi + sy) + td), 2 * (bb.xa - tbb.xi + sx) - td);
+ otmin = tsb.di + td;
+ otmax = tsb.da + td;
+ omin = sb.di + sd;
+ omax = sb.da + sd;
+ torg = _currOffset.x + _currOffset.y;
+ cmin = _limit.bl.x + _limit.bl.y + torg;
+ cmax = _limit.tr.x + _limit.tr.y - tsb.si + tsb.sa + torg;
break;
- case SlotCollision::SEQ_ORDER_NORIGHT : // enforce neighboring glyph being to the right
- DBGTAG(34)
- removeBox(Rect(Position(bb.xa - tbb.xi + sx, bb.yi - tbb.ya + sy),
- Position(xpinf, bb.ya - tbb.yi + sy)), tbb, tsb, org, i);
+ case 3 : // diff - moving along the negatively-sloped vector, so the boundaries are the
+ // positively-sloped boundaries.
+ vmin = max(max(sb.di - tsb.da + sd, 2 * (bb.xi - tbb.xa + sx) - ts), -2 * (bb.ya - tbb.yi + sy) + ts);
+ vmax = min(min(sb.da - tsb.di + sd, 2 * (bb.xa - tbb.xi + sx) - ts), -2 * (bb.yi - tbb.ya + sy) + ts);
+ otmin = tsb.si + ts;
+ otmax = tsb.sa + ts;
+ omin = sb.si + ss;
+ omax = sb.sa + ss;
+ torg = _currOffset.x - _currOffset.y;
+ cmin = _limit.bl.x - _limit.tr.y + torg;
+ cmax = _limit.tr.x - _limit.bl.y - tsb.di + tsb.da + torg;
break;
default :
- break;
+ continue;
}
- }
-
- if (vmax < cmin - _margin || vmin > cmax + _margin || omax < otmin - _margin || omin > otmax + _margin)
- continue;
+
+#if !defined GRAPHITE2_NTRACING
+ if (dbgout)
+ dbgout->setenv(1, reinterpret_cast<void *>(-1));
+#define DBGTAG(x) if (dbgout) dbgout->setenv(1, reinterpret_cast<void *>(-x));
+#else
+#define DBGTAG(x)
+#endif
- // Process sub-boxes that are defined for this glyph.
- // We only need to do this if there was in fact a collision with the main octabox.
- uint8 numsub = gc.numSubBounds(gid);
- if (numsub > 0)
- {
- bool anyhits = false;
- for (int j = 0; j < numsub; ++j)
+ if (orderFlags)
{
- const BBox &sbb = gc.getSubBoundingBBox(gid, j);
- const SlantBox &ssb = gc.getSubBoundingSlantBox(gid, j);
- switch (i) {
- case 0 : // x
- vmin = std::max(std::max(sbb.xi-tbb.xa+sx, ssb.di-tsb.da+sd+ty), ssb.si-tsb.sa+ss-ty);
- vmax = std::min(std::min(sbb.xa-tbb.xi+sx, ssb.da-tsb.di+sd+ty), ssb.sa-tsb.si+ss-ty);
- omin = sbb.yi + sy;
- omax = sbb.ya + sy;
+ Position org(tx, ty);
+ float xminf = _limit.bl.x + _currOffset.x + tbb.xi;
+ float xpinf = _limit.tr.x + _currOffset.x + tbb.xa;
+ float ypinf = _limit.tr.y + _currOffset.y + tbb.ya;
+ float yminf = _limit.bl.y + _currOffset.y + tbb.yi;
+ switch (orderFlags) {
+ case SlotCollision::SEQ_ORDER_RIGHTUP :
+ {
+ float r1Xedge = cslot->seqAboveXoff() + 0.5f * (bb.xi + bb.xa) + sx;
+ float r3Xedge = cslot->seqBelowXlim() + bb.xa + sx + 0.5f * (tbb.xa - tbb.xi);
+ float r2Yedge = 0.5f * (bb.yi + bb.ya) + sy;
+
+ // DBGTAG(1x) means the regions are up and right
+ // region 1
+ DBGTAG(11)
+ addBox_slope(true, Rect(Position(xminf, r2Yedge), Position(r1Xedge, ypinf)),
+ tbb, tsb, org, 0, seq_above_wt, true, i);
+ // region 2
+ DBGTAG(12)
+ removeBox(Rect(Position(xminf, yminf), Position(r3Xedge, r2Yedge)), tbb, tsb, org, i);
+ // region 3, which end is zero is irrelevant since m weight is 0
+ DBGTAG(13)
+ addBox_slope(true, Rect(Position(r3Xedge, yminf), Position(xpinf, r2Yedge - cslot->seqValignHt())),
+ tbb, tsb, org, seq_below_wt, 0, true, i);
+ // region 4
+ DBGTAG(14)
+ addBox_slope(false, Rect(Position(sx + bb.xi, r2Yedge), Position(xpinf, r2Yedge + cslot->seqValignHt())),
+ tbb, tsb, org, 0, seq_valign_wt, true, i);
+ // region 5
+ DBGTAG(15)
+ addBox_slope(false, Rect(Position(sx + bb.xi, r2Yedge - cslot->seqValignHt()), Position(xpinf, r2Yedge)),
+ tbb, tsb, org, seq_below_wt, seq_valign_wt, false, i);
break;
- case 1 : // y
- vmin = std::max(std::max(sbb.yi-tbb.ya+sy, tsb.di-ssb.da-sd+tx), ssb.si-tsb.sa+ss-tx);
- vmax = std::min(std::min(sbb.ya-tbb.yi+sy, tsb.da-ssb.di-sd+tx), ssb.sa-tsb.si+ss-tx);
- omin = sbb.xi + sx;
- omax = sbb.xa + sx;
+ }
+ case SlotCollision::SEQ_ORDER_LEFTDOWN :
+ {
+ float r1Xedge = 0.5f * (bb.xi + bb.xa) + cslot->seqAboveXoff() + sx;
+ float r3Xedge = bb.xi - cslot->seqBelowXlim() + sx - 0.5f * (tbb.xa - tbb.xi);
+ float r2Yedge = 0.5f * (bb.yi + bb.ya) + sy;
+ // DBGTAG(2x) means the regions are up and right
+ // region 1
+ DBGTAG(21)
+ addBox_slope(true, Rect(Position(r1Xedge, yminf), Position(xpinf, r2Yedge)),
+ tbb, tsb, org, 0, seq_above_wt, false, i);
+ // region 2
+ DBGTAG(22)
+ removeBox(Rect(Position(r3Xedge, r2Yedge), Position(xpinf, ypinf)), tbb, tsb, org, i);
+ // region 3
+ DBGTAG(23)
+ addBox_slope(true, Rect(Position(xminf, r2Yedge - cslot->seqValignHt()), Position(r3Xedge, ypinf)),
+ tbb, tsb, org, seq_below_wt, 0, false, i);
+ // region 4
+ DBGTAG(24)
+ addBox_slope(false, Rect(Position(xminf, r2Yedge), Position(sx + bb.xa, r2Yedge + cslot->seqValignHt())),
+ tbb, tsb, org, 0, seq_valign_wt, true, i);
+ // region 5
+ DBGTAG(25)
+ addBox_slope(false, Rect(Position(xminf, r2Yedge - cslot->seqValignHt()),
+ Position(sx + bb.xa, r2Yedge)), tbb, tsb, org, seq_below_wt, seq_valign_wt, false, i);
break;
- case 2 : // sum
- vmin = std::max(std::max(ssb.si-tsb.sa+ss, 2*(sbb.yi-tbb.ya+sy)+td), 2*(sbb.xi-tbb.xa+sx)-td);
- vmax = std::min(std::min(ssb.sa-tsb.si+ss, 2*(sbb.ya-tbb.yi+sy)+td), 2*(sbb.xa-tbb.xi+sx)-td);
- omin = ssb.di + sd;
- omax = ssb.da + sd;
+ }
+ case SlotCollision::SEQ_ORDER_NOABOVE : // enforce neighboring glyph being above
+ DBGTAG(31);
+ removeBox(Rect(Position(bb.xi - tbb.xa + sx, sy + bb.ya),
+ Position(bb.xa - tbb.xi + sx, ypinf)), tbb, tsb, org, i);
break;
- case 3 : // diff
- vmin = std::max(std::max(ssb.di-tsb.da+sd, 2*(sbb.xi-tbb.xa+sx)-ts), -2*(sbb.ya-tbb.yi+sy)+ts);
- vmax = std::min(std::min(ssb.da-tsb.di+sd, 2*(sbb.xa-tbb.xi+sx)-ts), -2*(sbb.yi-tbb.ya+sy)+ts);
- omin = ssb.si + ss;
- omax = ssb.sa + ss;
+ case SlotCollision::SEQ_ORDER_NOBELOW : // enforce neighboring glyph being below
+ DBGTAG(32);
+ removeBox(Rect(Position(bb.xi - tbb.xa + sx, yminf),
+ Position(bb.xa - tbb.xi + sx, sy + bb.yi)), tbb, tsb, org, i);
+ break;
+ case SlotCollision::SEQ_ORDER_NOLEFT : // enforce neighboring glyph being to the left
+ DBGTAG(33)
+ removeBox(Rect(Position(xminf, bb.yi - tbb.ya + sy),
+ Position(bb.xi - tbb.xa + sx, bb.ya - tbb.yi + sy)), tbb, tsb, org, i);
+ break;
+ case SlotCollision::SEQ_ORDER_NORIGHT : // enforce neighboring glyph being to the right
+ DBGTAG(34)
+ removeBox(Rect(Position(bb.xa - tbb.xi + sx, bb.yi - tbb.ya + sy),
+ Position(xpinf, bb.ya - tbb.yi + sy)), tbb, tsb, org, i);
+ break;
+ default :
break;
}
- if (vmax < cmin - _margin || vmin > cmax + _margin || omax < otmin - _margin || omin > otmax + _margin)
- continue;
+ }
+
+ if (vmax < cmin - _margin || vmin > cmax + _margin || omax < otmin - _margin || omin > otmax + _margin)
+ continue;
+
+ // Process sub-boxes that are defined for this glyph.
+ // We only need to do this if there was in fact a collision with the main octabox.
+ uint8 numsub = gc.numSubBounds(gid);
+ if (numsub > 0)
+ {
+ bool anyhits = false;
+ for (int j = 0; j < numsub; ++j)
+ {
+ const BBox &sbb = gc.getSubBoundingBBox(gid, j);
+ const SlantBox &ssb = gc.getSubBoundingSlantBox(gid, j);
+ switch (i) {
+ case 0 : // x
+ vmin = max(max(sbb.xi-tbb.xa+sx, ssb.di-tsb.da+sd+ty), ssb.si-tsb.sa+ss-ty);
+ vmax = min(min(sbb.xa-tbb.xi+sx, ssb.da-tsb.di+sd+ty), ssb.sa-tsb.si+ss-ty);
+ omin = sbb.yi + sy;
+ omax = sbb.ya + sy;
+ break;
+ case 1 : // y
+ vmin = max(max(sbb.yi-tbb.ya+sy, tsb.di-ssb.da-sd+tx), ssb.si-tsb.sa+ss-tx);
+ vmax = min(min(sbb.ya-tbb.yi+sy, tsb.da-ssb.di-sd+tx), ssb.sa-tsb.si+ss-tx);
+ omin = sbb.xi + sx;
+ omax = sbb.xa + sx;
+ break;
+ case 2 : // sum
+ vmin = max(max(ssb.si-tsb.sa+ss, 2*(sbb.yi-tbb.ya+sy)+td), 2*(sbb.xi-tbb.xa+sx)-td);
+ vmax = min(min(ssb.sa-tsb.si+ss, 2*(sbb.ya-tbb.yi+sy)+td), 2*(sbb.xa-tbb.xi+sx)-td);
+ omin = ssb.di + sd;
+ omax = ssb.da + sd;
+ break;
+ case 3 : // diff
+ vmin = max(max(ssb.di-tsb.da+sd, 2*(sbb.xi-tbb.xa+sx)-ts), -2*(sbb.ya-tbb.yi+sy)+ts);
+ vmax = min(min(ssb.da-tsb.di+sd, 2*(sbb.xa-tbb.xi+sx)-ts), -2*(sbb.yi-tbb.ya+sy)+ts);
+ omin = ssb.si + ss;
+ omax = ssb.sa + ss;
+ break;
+ }
+ if (vmax < cmin - _margin || vmin > cmax + _margin || omax < otmin - _margin || omin > otmax + _margin)
+ continue;
#if !defined GRAPHITE2_NTRACING
- if (dbgout)
- dbgout->setenv(1, reinterpret_cast<void *>(j));
+ if (dbgout)
+ dbgout->setenv(1, reinterpret_cast<void *>(j));
+#endif
+ if (omin > otmax)
+ _ranges[i].weightedAxis(i, vmin - _margin, vmax + _margin, 0, 0, 0, 0, 0,
+ sqr(_margin - omin + otmax) * _marginWt, false);
+ else if (omax < otmin)
+ _ranges[i].weightedAxis(i, vmin - _margin, vmax + _margin, 0, 0, 0, 0, 0,
+ sqr(_margin - otmin + omax) * _marginWt, false);
+ else
+ _ranges[i].exclude_with_margins(vmin, vmax, i);
+ anyhits = true;
+ }
+ if (anyhits)
+ isCol = true;
+ }
+ else // no sub-boxes
+ {
+#if !defined GRAPHITE2_NTRACING
+ if (dbgout)
+ dbgout->setenv(1, reinterpret_cast<void *>(-1));
#endif
+ isCol = true;
if (omin > otmax)
_ranges[i].weightedAxis(i, vmin - _margin, vmax + _margin, 0, 0, 0, 0, 0,
sqr(_margin - omin + otmax) * _marginWt, false);
@@ -519,27 +544,8 @@ bool ShiftCollider::mergeSlot(Segment *seg, Slot *slot, const Position &currShif
sqr(_margin - otmin + omax) * _marginWt, false);
else
_ranges[i].exclude_with_margins(vmin, vmax, i);
- anyhits = true;
- }
- if (anyhits)
- isCol = true;
- }
- else // no sub-boxes
- {
-#if !defined GRAPHITE2_NTRACING
- if (dbgout)
- dbgout->setenv(1, reinterpret_cast<void *>(-1));
-#endif
- isCol = true;
- if (omin > otmax)
- _ranges[i].weightedAxis(i, vmin - _margin, vmax + _margin, 0, 0, 0, 0, 0,
- sqr(_margin - omin + otmax) * _marginWt, false);
- else if (omax < otmin)
- _ranges[i].weightedAxis(i, vmin - _margin, vmax + _margin, 0, 0, 0, 0, 0,
- sqr(_margin - otmin + omax) * _marginWt, false);
- else
- _ranges[i].exclude_with_margins(vmin, vmax, i);
+ }
}
}
bool res = true;
@@ -882,8 +888,8 @@ bool KernCollider::initSlot(Segment *seg, Slot *aSlot, const Rect &limit, float
// Loop over slices.
// Note smin might not be zero if glyph s is not at the bottom of the cluster; similarly for smax.
float toffset = c->shift().y - _miny + 1 + s->origin().y;
- int smin = std::max(0, int((bs.yi + toffset) / _sliceWidth));
- int smax = std::min(numSlices - 1, int((bs.ya + toffset) / _sliceWidth + 1));
+ int smin = max(0, int((bs.yi + toffset) / _sliceWidth));
+ int smax = min(numSlices - 1, int((bs.ya + toffset) / _sliceWidth + 1));
for (int i = smin; i <= smax; ++i)
{
float t;
@@ -935,8 +941,8 @@ bool KernCollider::mergeSlot(Segment *seg, Slot *slot, const Position &currShift
return false;
const float sy = slot->origin().y + currShift.y;
- int smin = std::max(0, int((bb.bl.y + (1 - _miny + sy)) / _sliceWidth + 1));
- int smax = std::min((int)_edges.size() - 1, int((bb.tr.y + (1 - _miny + sy)) / _sliceWidth + 1));
+ int smin = max(0, int((bb.bl.y + (1 - _miny + sy)) / _sliceWidth + 1));
+ int smax = min((int)_edges.size() - 1, int((bb.tr.y + (1 - _miny + sy)) / _sliceWidth + 1));
bool collides = false;
for (int i = smin; i <= smax; ++i)
@@ -949,8 +955,8 @@ bool KernCollider::mergeSlot(Segment *seg, Slot *slot, const Position &currShift
float m = get_edge(seg, slot, currShift, y, _sliceWidth, rtl > 0) + 2 * rtl * currSpace;
t = rtl * (_edges[i] - m);
// Check slices above and below (if any).
- if (i < (int)_edges.size() - 1) t = std::min(t, rtl * (_edges[i+1] - m));
- if (i > 0) t = std::min(t, rtl * (_edges[i-1] - m));
+ if (i < (int)_edges.size() - 1) t = min(t, rtl * (_edges[i+1] - m));
+ if (i > 0) t = min(t, rtl * (_edges[i-1] - m));
// _mingap is positive to shrink
if (t < _mingap)
{
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/Decompressor.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/Decompressor.cpp
index ec5dfcdc26f..b49c8d9982d 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/Decompressor.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/Decompressor.cpp
@@ -35,7 +35,7 @@ namespace {
inline
u32 read_literal(u8 const * &s, u8 const * const e, u32 l) {
- if (unlikely(l == 15) && likely(s != e))
+ if (l == 15 && s != e)
{
u8 b = 0;
do { l += b = *s++; } while(b==0xff && s != e);
@@ -51,23 +51,23 @@ bool read_sequence(u8 const * &src, u8 const * const end, u8 const * &literal, u
literal = src;
src += literal_len;
- if (unlikely(src > end - 2))
+ if (src > end - 2)
return false;
match_dist = *src++;
match_dist |= *src++ << 8;
match_len = read_literal(src, end, token & 0xf);
- return true;
+ return src <= end-5;
}
}
int lz4::decompress(void const *in, size_t in_size, void *out, size_t out_size)
{
- if (out_size <= in_size)
+ if (out_size <= in_size || in_size < sizeof(unsigned long)+1)
return -1;
-
+
u8 const * src = static_cast<u8 const *>(in),
* literal = 0,
* const src_end = src + in_size;
@@ -81,24 +81,30 @@ int lz4::decompress(void const *in, size_t in_size, void *out, size_t out_size)
while (read_sequence(src, src_end, literal, literal_len, match_len, match_dist))
{
- // Copy in literal. At this point the last full sequence must be at
- // least MINMATCH + 5 from the end of the output buffer.
- if (unlikely(literal + align(literal_len) > src_end
- || dst + align(literal_len) > dst_end - MINMATCH+5))
- return -1;
- dst = overrun_copy(dst, literal, literal_len);
-
+ if (literal_len != 0)
+ {
+ // Copy in literal. At this point the last full sequence must be at
+ // least MINMATCH + 5 from the end of the output buffer.
+ if (dst + align(literal_len) > dst_end - MINMATCH+5)
+ return -1;
+ dst = overrun_copy(dst, literal, literal_len);
+ }
+
// Copy, possibly repeating, match from earlier in the
// decoded output.
u8 const * const pcpy = dst - match_dist;
- if (unlikely(pcpy < static_cast<u8*>(out)
- || dst + align(match_len + MINMATCH) > dst_end))
+ if (pcpy < static_cast<u8*>(out)
+ || dst + match_len + MINMATCH > dst_end - 5)
return -1;
- dst = copy(dst, pcpy, match_len + MINMATCH);
+ if (dst > pcpy+sizeof(unsigned long)
+ && dst + align(match_len + MINMATCH) <= dst_end)
+ dst = overrun_copy(dst, pcpy, match_len + MINMATCH);
+ else
+ dst = safe_copy(dst, pcpy, match_len + MINMATCH);
}
- if (unlikely(literal + literal_len > src_end
- || dst + literal_len > dst_end))
+ if (literal + literal_len > src_end
+ || dst + literal_len > dst_end)
return -1;
dst = fast_copy(dst, literal, literal_len);
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/Face.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/Face.cpp
index e10f09b248f..834eec0fb9c 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/Face.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/Face.cpp
@@ -312,7 +312,7 @@ Face::Table & Face::Table::operator = (const Table & rhs) throw()
Error Face::Table::decompress()
{
Error e;
- if (e.test(_sz < 2 * sizeof(uint32) + 3, E_BADSIZE))
+ if (e.test(_sz < 5 * sizeof(uint32), E_BADSIZE))
return e;
byte * uncompressed_table = 0;
size_t uncompressed_size = 0;
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/FeatureMap.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/FeatureMap.cpp
index b8c8405276a..b8c8405276a 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/FeatureMap.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/FeatureMap.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/FileFace.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/FileFace.cpp
index 43aff71a719..43aff71a719 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/FileFace.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/FileFace.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/Font.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/Font.cpp
index 5cec362bfc6..5cec362bfc6 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/Font.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/Font.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/GlyphCache.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/GlyphCache.cpp
index d1e2b48fbd7..d1e2b48fbd7 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/GlyphCache.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/GlyphCache.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/GlyphFace.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/GlyphFace.cpp
index 9fc11b2157e..9fc11b2157e 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/GlyphFace.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/GlyphFace.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/Intervals.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/Intervals.cpp
index 3a252c54fed..917da5add3c 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/Intervals.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/Intervals.cpp
@@ -85,8 +85,8 @@ void Zones::insert(Exclusion e)
#if !defined GRAPHITE2_NTRACING
addDebug(&e);
#endif
- e.x = std::max(e.x, _pos);
- e.xm = std::min(e.xm, _posm);
+ e.x = max(e.x, _pos);
+ e.xm = min(e.xm, _posm);
if (e.x >= e.xm) return;
for (iterator i = _exclusions.begin(), ie = _exclusions.end(); i != ie && e.x < e.xm; ++i)
@@ -141,8 +141,8 @@ void Zones::remove(float x, float xm)
#if !defined GRAPHITE2_NTRACING
removeDebug(x, xm);
#endif
- x = std::max(x, _pos);
- xm = std::min(xm, _posm);
+ x = max(x, _pos);
+ xm = min(xm, _posm);
if (x >= xm) return;
for (iterator i = _exclusions.begin(), ie = _exclusions.end(); i != ie; ++i)
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/Justifier.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/Justifier.cpp
index e75d7508f0d..e75d7508f0d 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/Justifier.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/Justifier.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/NameTable.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/NameTable.cpp
index f83adb09cd8..f83adb09cd8 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/NameTable.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/NameTable.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/Pass.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/Pass.cpp
index c1764b350b9..656c424fc76 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/Pass.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/Pass.cpp
@@ -130,7 +130,8 @@ bool Pass::readPass(const byte * const pass_start, size_t pass_length, size_t su
return face.error(e);
m_successStart = m_numStates - m_numSuccess;
- if (e.test(p + numRanges * 6 - 4 > pass_end, E_BADPASSLENGTH)) return face.error(e);
+ // test for beyond end - 1 to account for reading uint16
+ if (e.test(p + numRanges * 6 - 2 > pass_end, E_BADPASSLENGTH)) return face.error(e);
m_numGlyphs = be::peek<uint16>(p + numRanges * 6 - 4) + 1;
// Calculate the start of various arrays.
const byte * const ranges = p;
@@ -263,7 +264,11 @@ bool Pass::readRules(const byte * rule_map, const size_t num_entries,
}
byte * moved_progs = static_cast<byte *>(realloc(m_progs, prog_pool_free - m_progs));
- if (e.test(!moved_progs, E_OUTOFMEM)) return face.error(e);
+ if (e.test(!moved_progs, E_OUTOFMEM))
+ {
+ if (prog_pool_free - m_progs == 0) m_progs = 0;
+ return face.error(e);
+ }
if (moved_progs != m_progs)
{
@@ -383,7 +388,11 @@ bool Pass::runGraphite(vm::Machine & m, FiniteStateMachine & fsm, bool reverse)
{
Slot *s = m.slotMap().segment.first();
if (!s || !testPassConstraint(m)) return true;
- if (reverse) m.slotMap().segment.reverseSlots();
+ if (reverse)
+ {
+ m.slotMap().segment.reverseSlots();
+ s = m.slotMap().segment.first();
+ }
if (m_numRules)
{
Slot *currHigh = s->next();
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/Position.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/Position.cpp
index 17247987591..17247987591 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/Position.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/Position.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/SegCache.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/SegCache.cpp
index b577efa270a..b577efa270a 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/SegCache.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/SegCache.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/SegCacheEntry.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/SegCacheEntry.cpp
index d35912d5aed..d35912d5aed 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/SegCacheEntry.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/SegCacheEntry.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/SegCacheStore.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/SegCacheStore.cpp
index 236fb707ffa..236fb707ffa 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/SegCacheStore.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/SegCacheStore.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/Segment.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/Segment.cpp
index d24dfe4f723..ddbc45fc46f 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/Segment.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/Segment.cpp
@@ -36,7 +36,6 @@ of the License or (at your option) any later version.
#include "inc/Slot.h"
#include "inc/Main.h"
#include "inc/CmapCache.h"
-//#include "inc/Bidi.h"
#include "inc/Collider.h"
#include "graphite2/Segment.h"
@@ -156,12 +155,6 @@ void Segment::appendSlot(int id, int cid, int gid, int iFeats, size_t coffset)
aSlot->originate(id);
aSlot->before(id);
aSlot->after(id);
-// uint8 aBidi = m_silf->aBidi();
-// if (aBidi != 0xFF)
-// {
-// unsigned int bAttr = glyphAttr(gid, aBidi);
-// aSlot->setBidiClass((bAttr <= 22) * bAttr);
-// }
if (m_last) m_last->next(aSlot);
aSlot->prev(m_last);
m_last = aSlot;
@@ -409,6 +402,14 @@ Position Segment::positionSlots(const Font *font, Slot * iStart, Slot * iEnd, bo
float clusterMin = 0.;
Rect bbox;
+ if (currdir() != isRtl)
+ {
+ Slot *temp;
+ reverseSlots();
+ temp = iStart;
+ iStart = iEnd;
+ iEnd = temp;
+ }
if (!iStart) iStart = m_first;
if (!iEnd) iEnd = m_last;
@@ -502,58 +503,6 @@ bool Segment::read_text(const Face *face, const Features* pFeats/*must not be NU
return true;
}
-#if 0
-Slot *process_bidi(Slot *start, int level, int prelevel, int &nextLevel, int dirover, int isol, int &cisol, int &isolerr, int &embederr, int init, Segment *seg, uint8 aMirror, BracketPairStack &stack);
-void resolveImplicit(Slot *s, Segment *seg, uint8 aMirror);
-void resolveWhitespace(int baseLevel, Slot *s);
-Slot *resolveOrder(Slot * & s, const bool reordered, const int level = 0);
-
-void Segment::bidiPass(int paradir, uint8 aMirror)
-{
- if (slotCount() == 0)
- return;
-
- Slot *s;
- int baseLevel = paradir ? 1 : 0;
- unsigned int bmask = 0;
- unsigned int ssize = 0;
- for (s = first(); s; s = s->next())
- {
- if (getSlotBidiClass(s) < 0)
- s->setBidiClass(0);
- bmask |= (1 << s->getBidiClass());
- s->setBidiLevel(baseLevel);
- if (s->getBidiClass() == 21)
- ++ssize;
- }
-
- BracketPairStack bstack(ssize);
- if (bmask & (paradir ? 0x2E7892 : 0x2E789C))
- {
- // O(8N) algorithm, with no working data beyond what is needed for processParens
- int nextLevel = paradir;
- int e, i, c;
- process_bidi(first(), baseLevel, paradir, nextLevel, 0, 0, c = 0, i = 0, e = 0, 1, this, aMirror, bstack);
- resolveImplicit(first(), this, aMirror);
- resolveWhitespace(baseLevel, last());
- s = resolveOrder(s = first(), baseLevel != 0);
- if (s)
- {
- first(s); last(s->prev());
- s->prev()->next(0); s->prev(0);
- }
- }
- else if (!(dir() & 4) && baseLevel && aMirror)
- {
- for (s = first(); s; s = s->next())
- {
- unsigned short g = glyphAttr(s->gid(), aMirror);
- if (g) s->setGlyph(this, g);
- }
- }
-}
-#endif
-
void Segment::doMirror(uint16 aMirror)
{
Slot * s;
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/Silf.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/Silf.cpp
index a5a0efc75b3..a5a0efc75b3 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/Silf.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/Silf.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/Slot.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/Slot.cpp
index dd2a89bc9cd..dd2a89bc9cd 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/Slot.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/Slot.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/Sparse.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/Sparse.cpp
index aa43113669b..aa43113669b 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/Sparse.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/Sparse.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/TtfUtil.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/TtfUtil.cpp
index 7be8ecdb573..9248e9af879 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/TtfUtil.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/TtfUtil.cpp
@@ -852,10 +852,11 @@ const void * FindCmapSubtable(const void * pCmap, int nPlatformId, /* =3 */ int
const uint8 * pRtn = reinterpret_cast<const uint8 *>(pCmap) + offset;
if (length)
{
- if (offset > length) return NULL;
+ if (offset + 2 > length) return NULL;
uint16 format = be::read<uint16>(pRtn);
if (format == 4)
{
+ if (offset + 4 > length) return NULL;
uint16 subTableLength = be::peek<uint16>(pRtn);
if (i + 1 == csuPlatforms)
{
@@ -867,6 +868,7 @@ const void * FindCmapSubtable(const void * pCmap, int nPlatformId, /* =3 */ int
}
if (format == 12)
{
+ if (offset + 6 > length) return NULL;
uint32 subTableLength = be::peek<uint32>(pRtn);
if (i + 1 == csuPlatforms)
{
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/UtfCodec.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/UtfCodec.cpp
index d1db5fa11f1..d1db5fa11f1 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/UtfCodec.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/UtfCodec.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/call_machine.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/call_machine.cpp
index e1d0ce5d2ff..e1d0ce5d2ff 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/call_machine.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/call_machine.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/direct_machine.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/direct_machine.cpp
index b6b9ee04235..b6b9ee04235 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/direct_machine.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/direct_machine.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/files.mk b/Build/source/libs/graphite2/graphite2-1.3.3/src/files.mk
index fde83761c56..fde83761c56 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/files.mk
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/files.mk
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/gr_char_info.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/gr_char_info.cpp
index ebcb68e593f..ebcb68e593f 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/gr_char_info.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/gr_char_info.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/gr_face.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/gr_face.cpp
index fe1eb838207..fe1eb838207 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/gr_face.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/gr_face.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/gr_features.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/gr_features.cpp
index 38cebb7b5db..38cebb7b5db 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/gr_features.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/gr_features.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/gr_font.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/gr_font.cpp
index ed70ab7381e..ed70ab7381e 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/gr_font.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/gr_font.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/gr_logging.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/gr_logging.cpp
index 3e453ba8e2c..3e453ba8e2c 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/gr_logging.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/gr_logging.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/gr_segment.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/gr_segment.cpp
index 0ab7a0854cc..0ab7a0854cc 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/gr_segment.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/gr_segment.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/gr_slot.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/gr_slot.cpp
index 0e41f6cb519..0e41f6cb519 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/gr_slot.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/gr_slot.cpp
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Bidi.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Bidi.h
index 9593c7e149a..9593c7e149a 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Bidi.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Bidi.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/CachedFace.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/CachedFace.h
index 53674754ee2..53674754ee2 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/CachedFace.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/CachedFace.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/CharInfo.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/CharInfo.h
index d9e56eeed64..d9e56eeed64 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/CharInfo.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/CharInfo.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/CmapCache.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/CmapCache.h
index 7820c958b0e..7820c958b0e 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/CmapCache.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/CmapCache.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Code.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Code.h
index 02d09a109d6..02d09a109d6 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Code.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Code.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Collider.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Collider.h
index bfa290978b0..bcbf3a22490 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Collider.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Collider.h
@@ -26,13 +26,10 @@ of the License or (at your option) any later version.
*/
#pragma once
-#include <utility>
#include "inc/List.h"
-//#include "inc/Slot.h"
#include "inc/Position.h"
#include "inc/Intervals.h"
#include "inc/debug.h"
-//#include "inc/Segment.h"
namespace graphite2 {
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Compression.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Compression.h
index 2a665f3a364..61351c416ea 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Compression.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Compression.h
@@ -31,18 +31,6 @@ of the License or (at your option) any later version.
#include <cstddef>
#include <cstring>
-#include <iterator>
-
-#if ((defined GCC_VERSION && GCC_VERSION >= 302) || (defined __INTEL_COMPILER && __INTEL_COMPILER >= 800) || defined(__clang__))
- #define expect(expr,value) (__builtin_expect ((expr),(value)) )
-#else
- #define expect(expr,value) (expr)
-#endif
-
-#define likely(expr) expect((expr) != 0, 1)
-#define unlikely(expr) expect((expr) != 0, 0)
-
-
namespace
{
@@ -72,6 +60,12 @@ size_t align(size_t p) {
return (p + sizeof(unsigned long)-1) & ~(sizeof(unsigned long)-1);
}
+inline
+u8 * safe_copy(u8 * d, u8 const * s, size_t n) {
+ while (n--) *d++ = *s++;
+ return d;
+}
+
inline
u8 * overrun_copy(u8 * d, u8 const * s, size_t n) {
size_t const WS = sizeof(unsigned long);
@@ -100,21 +94,10 @@ u8 * fast_copy(u8 * d, u8 const * s, size_t n) {
s += WS;
}
n &= WS-1;
- while (n--) {*d++ = *s++; }
-
- return d;
+ return safe_copy(d, s, n);
}
-inline
-u8 * copy(u8 * d, u8 const * s, size_t n) {
- if (likely(d>s+sizeof(unsigned long)))
- return overrun_copy(d,s,n);
- else
- while (n--) *d++ = *s++;
- return d;
-}
-
} // end of anonymous namespace
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Decompressor.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Decompressor.h
index ddda0c0f58c..3d81864d108 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Decompressor.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Decompressor.h
@@ -32,7 +32,23 @@ of the License or (at your option) any later version.
namespace lz4
{
-// return value is either decompressed size of -1
+// decompress an LZ4 block
+// Parameters:
+// @in - Input buffer containing an LZ4 block.
+// @in_size - Size of the input LZ4 block in bytes.
+// @out - Output buffer to hold decompressed results.
+// @out_size - The size of the buffer pointed to by @out.
+// Invariants:
+// @in - This buffer must be at least 1 machine word in length,
+// regardless of the actual LZ4 block size.
+// @in_size - This must be at least 4 and must also be <= to the
+// allocated buffer @in.
+// @out - This must be bigger than the input buffer and at least
+// 13 bytes.
+// @out_size - Must always be big enough to hold the expected size.
+// Return:
+// -1 - Decompression failed.
+// size - Actual number of bytes decompressed.
int decompress(void const *in, size_t in_size, void *out, size_t out_size);
} // end of namespace shrinker
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Endian.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Endian.h
index fc84ec27898..fc84ec27898 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Endian.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Endian.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Error.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Error.h
index 899b44fd2c9..899b44fd2c9 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Error.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Error.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Face.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Face.h
index 7682dfaca3e..7682dfaca3e 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Face.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Face.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/FeatureMap.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/FeatureMap.h
index fc845f6e165..fc845f6e165 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/FeatureMap.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/FeatureMap.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/FeatureVal.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/FeatureVal.h
index 5fbcf082063..5fbcf082063 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/FeatureVal.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/FeatureVal.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/FileFace.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/FileFace.h
index 81e501bab25..81e501bab25 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/FileFace.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/FileFace.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Font.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Font.h
index bc7084050e5..bc7084050e5 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Font.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Font.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/GlyphCache.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/GlyphCache.h
index cf7c2469c3c..cf7c2469c3c 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/GlyphCache.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/GlyphCache.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/GlyphFace.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/GlyphFace.h
index 89ed5aea91a..89ed5aea91a 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/GlyphFace.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/GlyphFace.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Intervals.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Intervals.h
index 34fecce1795..34fecce1795 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Intervals.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Intervals.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/List.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/List.h
index 020560235c1..020560235c1 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/List.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/List.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Machine.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Machine.h
index 4efb70cd946..4efb70cd946 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Machine.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Machine.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Main.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Main.h
index 5c654691688..5c654691688 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Main.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Main.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/NameTable.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/NameTable.h
index 0fdbeb4d85f..0fdbeb4d85f 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/NameTable.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/NameTable.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Pass.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Pass.h
index c8f1aa20ba5..c8f1aa20ba5 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Pass.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Pass.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Position.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Position.h
index 97bc1cdf7a8..97bc1cdf7a8 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Position.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Position.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Rule.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Rule.h
index 36c8d89a63d..36c8d89a63d 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Rule.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Rule.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/SegCache.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/SegCache.h
index b360f7c9337..b360f7c9337 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/SegCache.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/SegCache.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/SegCacheEntry.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/SegCacheEntry.h
index 9a7d930677c..9a7d930677c 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/SegCacheEntry.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/SegCacheEntry.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/SegCacheStore.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/SegCacheStore.h
index 1e6a6e216e7..1e6a6e216e7 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/SegCacheStore.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/SegCacheStore.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Segment.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Segment.h
index 08f6afdd711..056b0daea51 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Segment.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Segment.h
@@ -35,11 +35,9 @@ of the License or (at your option) any later version.
#include "inc/FeatureVal.h"
#include "inc/GlyphCache.h"
#include "inc/GlyphFace.h"
-//#include "inc/Silf.h"
#include "inc/Slot.h"
#include "inc/Position.h"
#include "inc/List.h"
-//#include "inc/Bidi.h"
#include "inc/Collider.h"
#define MAX_SEG_GROWTH_FACTOR 256
@@ -244,62 +242,6 @@ bool Segment::isWhitespace(const int cid) const
+ (cid == 0x3000)) != 0;
}
-//inline
-//bool Segment::isWhitespace(const int cid) const
-//{
-// switch (cid >> 8)
-// {
-// case 0x00:
-// switch (cid)
-// {
-// case 0x09:
-// case 0x0A:
-// case 0x0B:
-// case 0x0C:
-// case 0x0D:
-// case 0x20:
-// return true;
-// default:
-// break;
-// }
-// break;
-// case 0x16:
-// return cid == 0x1680;
-// break;
-// case 0x18:
-// return cid == 0x180E;
-// break;
-// case 0x20:
-// switch (cid)
-// {
-// case 0x00:
-// case 0x01:
-// case 0x02:
-// case 0x03:
-// case 0x04:
-// case 0x05:
-// case 0x06:
-// case 0x07:
-// case 0x08:
-// case 0x09:
-// case 0x0A:
-// case 0x28:
-// case 0x29:
-// case 0x2F:
-// case 0x5F:
-// return true
-// default:
-// break;
-// }
-// break;
-// case 0x30:
-// return cid == 0x3000;
-// break;
-// }
-//
-// return false;
-//}
-
} // namespace graphite2
struct gr_segment : public graphite2::Segment {};
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Silf.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Silf.h
index 8e49f70c942..8e49f70c942 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Silf.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Silf.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Slot.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Slot.h
index a6e05491c6d..a6e05491c6d 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Slot.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Slot.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Sparse.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Sparse.h
index 2c9248f3272..2c9248f3272 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/Sparse.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/Sparse.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/TtfTypes.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/TtfTypes.h
index ea20e5775fc..ea20e5775fc 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/TtfTypes.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/TtfTypes.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/TtfUtil.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/TtfUtil.h
index 43ef2daa9ed..43ef2daa9ed 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/TtfUtil.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/TtfUtil.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/UtfCodec.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/UtfCodec.h
index c60ba41e72e..c60ba41e72e 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/UtfCodec.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/UtfCodec.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/bits.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/bits.h
index 615c6cba67f..615c6cba67f 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/bits.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/bits.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/debug.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/debug.h
index 97175eb2cc4..97175eb2cc4 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/debug.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/debug.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/json.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/json.h
index 90b8573d655..90b8573d655 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/json.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/json.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/locale2lcid.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/locale2lcid.h
index bc3e3d83047..bc3e3d83047 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/locale2lcid.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/locale2lcid.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/opcode_table.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/opcode_table.h
index 73a99c82043..73a99c82043 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/opcode_table.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/opcode_table.h
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/opcodes.h b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/opcodes.h
index ec84b517585..ce87092b64f 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/inc/opcodes.h
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/inc/opcodes.h
@@ -643,7 +643,7 @@ ENDOP
STARTOP(temp_copy)
slotref newSlot = seg.newSlot();
- if (!newSlot) DIE;
+ if (!newSlot || !is) DIE;
int16 *tempUserAttrs = newSlot->userAttrs();
memcpy(newSlot, is, sizeof(Slot));
memcpy(tempUserAttrs, is->userAttrs(), seg.numAttrs() * sizeof(uint16));
diff --git a/Build/source/libs/graphite2/graphite2-1.3.2/src/json.cpp b/Build/source/libs/graphite2/graphite2-1.3.3/src/json.cpp
index d6e5518a1c3..d6e5518a1c3 100644
--- a/Build/source/libs/graphite2/graphite2-1.3.2/src/json.cpp
+++ b/Build/source/libs/graphite2/graphite2-1.3.3/src/json.cpp
diff --git a/Build/source/libs/graphite2/version.ac b/Build/source/libs/graphite2/version.ac
index ac3afabe4be..5a151ce3b24 100644
--- a/Build/source/libs/graphite2/version.ac
+++ b/Build/source/libs/graphite2/version.ac
@@ -8,4 +8,4 @@ dnl
dnl --------------------------------------------------------
dnl
dnl m4-include this file to define the current graphite2 version
-m4_define([graphite2_version], [1.3.2])
+m4_define([graphite2_version], [1.3.3])