summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Hosken <martin_hosken@sil.org>2011-05-16 20:07:36 +0200
committerPetr Mladek <pmladek@suse.cz>2011-05-16 20:07:36 +0200
commit2b46dd6afee72839d96d0646dbf52cfe3a9a7236 (patch)
treea09952752872e7f7e28986dfe62617b450731ec9
parent6adac1ade2de3e7e8ad5812a2d9c59e45013d7c3 (diff)
Fix graphite2-0.9.2 particulary for LinLibertineG (fdo#36510, fdo#36752)
Signed-off-by: Petr Mladek <pmladek@suse.cz>
-rw-r--r--graphite/graphite2-0.9.2.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/graphite/graphite2-0.9.2.patch b/graphite/graphite2-0.9.2.patch
index 35f0bd2..a775c1f 100644
--- a/graphite/graphite2-0.9.2.patch
+++ b/graphite/graphite2-0.9.2.patch
@@ -402,3 +402,52 @@ diff current src/List.h
#ifdef GR2_EXPORTING
#ifdef __GNUC__
#define GR2_API __attribute__((dllexport))
+diff -r b3a86877ec68 src/Pass.cpp
+--- misc/build/graphite2-0.9.2/src/Pass.cpp Wed May 11 09:34:52 2011 +0700
++++ misc/build/graphite2-0.9.2/src/Pass.cpp Mon May 16 13:54:00 2011 +0700
+@@ -513,6 +513,7 @@
+ bool Pass::testConstraint(const Rule &r, Machine & m) const
+ {
+ if (r.sort - r.preContext > (int)m.slotMap().size() - m.slotMap().context()) return false;
++ if (m.slotMap().context() - r.preContext < 0) return false;
+ if (!*r.constraint) return true;
+ assert(r.constraint->constraint());
+
+@@ -527,6 +528,7 @@
+ Machine::status_t status = Machine::finished;
+ for (int n = r.sort; n && map; --n, ++map)
+ {
++ if (!*map) continue;
+ const int32 ret = r.constraint->run(m, map, status);
+ if (!ret || status != Machine::finished)
+ {
+diff -r b3a86877ec68 src/Rule.h
+--- misc/build/graphite2-0.9.2/src/Rule.h Wed May 11 09:34:52 2011 +0700
++++ misc/build/graphite2-0.9.2/src/Rule.h Mon May 16 13:54:00 2011 +0700
+@@ -187,8 +187,9 @@
+ // Merge the new sorted rules list into the current sorted result set.
+ const RuleEntry * lre = begin(), * rre = state.rules;
+ RuleEntry * out = m_rules + (m_begin == m_rules)*MAX_RULES;
++ const RuleEntry * lrend = out + MAX_RULES;
+ m_begin = out;
+- while (lre != end())
++ while (lre != end() && out != lrend)
+ {
+ if (*lre < *rre) *out++ = *lre++;
+ else if (*rre < *lre) { *out++ = *rre++; }
+@@ -196,12 +197,12 @@
+
+ if (rre == state.rules_end)
+ {
+- while (lre != end()) { *out++ = *lre++; }
++ while (lre != end() && out != lrend) { *out++ = *lre++; }
+ m_end = out;
+ return;
+ }
+ }
+- while (rre != state.rules_end) { *out++ = *rre++; }
++ while (rre != state.rules_end && out != lrend) { *out++ = *rre++; }
+ m_end = out;
+ }
+
+