blob: 0f20dfd19e59cd6c61a606f124ef121326d8755c [file] [log] [blame]
reed@android.com54696072010-04-08 18:48:12 +00001diff --git a/contrib/harfbuzz-unicode.c b/contrib/harfbuzz-unicode.c
2index 51dd4ea..cb7a85b 100644
3--- a/contrib/harfbuzz-unicode.c
4+++ b/contrib/harfbuzz-unicode.c
5@@ -171,7 +171,10 @@ hb_utf16_script_run_prev(unsigned *num_code_points, HB_ScriptItem *output,
6 current_script = script;
7 continue;
8 } else if (script == HB_Script_Inherited) {
9- current_script = script;
10+ // Just assume that whatever follows this combining character is within
11+ // the same script. This is incorrect if you had language1 + combining
12+ // char + language 2, but that is rare and this code is suspicious
13+ // anyway.
14 continue;
15 } else {
16 *iter = prev_iter;
17diff --git a/src/harfbuzz-shaper.cpp b/src/harfbuzz-shaper.cpp
18index f3ec8e1..2b0dfde 100644
19--- a/src/harfbuzz-shaper.cpp
20+++ b/src/harfbuzz-shaper.cpp
21@@ -433,7 +433,7 @@ void HB_HeuristicSetGlyphAttributes(HB_ShaperItem *item)
22
23 // ### zeroWidth and justification are missing here!!!!!
24
25- assert(item->num_glyphs <= length);
26+ assert(length <= item->num_glyphs);
27
28 // qDebug("QScriptEngine::heuristicSetGlyphAttributes, num_glyphs=%d", item->num_glyphs);
29 HB_GlyphAttributes *attributes = item->attributes;
30@@ -451,7 +451,6 @@ void HB_HeuristicSetGlyphAttributes(HB_ShaperItem *item)
31 }
32 ++glyph_pos;
33 }
34- assert(glyph_pos == item->num_glyphs);
35
36 // first char in a run is never (treated as) a mark
37 int cStart = 0;