[HarfBuzz] harfbuzz: Branch 'master'

Lars Knoll lars at kemper.freedesktop.org
Wed Nov 18 04:14:30 PST 2009


 src/harfbuzz-indic.cpp |   10 ++--------
 tests/shaping/main.cpp |   34 ++++++++++++++++++++++++++++++++--
 2 files changed, 34 insertions(+), 10 deletions(-)

New commits:
commit b0d396aa88b3cdf8cea896bfeeba197656e1cdb1
Author: Lars Knoll <lars.knoll at nokia.com>
Date:   Wed Nov 18 13:14:31 2009 +0100

    Post substitutions should apply to the whole indic syllable
    
    This fixes a bug in the rendering of Malayalam

diff --git a/src/harfbuzz-indic.cpp b/src/harfbuzz-indic.cpp
index 3008fca..3c9df93 100644
--- a/src/harfbuzz-indic.cpp
+++ b/src/harfbuzz-indic.cpp
@@ -1551,6 +1551,7 @@ static bool indic_shape_syllable(HB_Bool openType, HB_ShaperItem *item, bool inv
                               | PreSubstProperty
                               | BelowSubstProperty
                               | AboveSubstProperty
+                              | PostSubstProperty
                               | HalantProperty
                               | PositioningProperties);
 
@@ -1608,14 +1609,7 @@ static bool indic_shape_syllable(HB_Bool openType, HB_ShaperItem *item, bool inv
         // pres always applies
         // blws always applies
         // abvs always applies
-
-        // psts
-        // ### this looks slightly different from before, but I believe it's correct
-        if (reordered[len-1] != halant || base != len-2)
-            properties[base] &= ~PostSubstProperty;
-        for (i = base+1; i < len; ++i)
-            properties[i] &= ~PostSubstProperty;
-
+        // psts always applies
         // halant always applies
 
 #ifdef INDIC_DEBUG
diff --git a/tests/shaping/main.cpp b/tests/shaping/main.cpp
index 12fa7c4..827ac30 100644
--- a/tests/shaping/main.cpp
+++ b/tests/shaping/main.cpp
@@ -686,7 +686,7 @@ void tst_QScriptEngine::bengali()
 void tst_QScriptEngine::gurmukhi()
 {
     {
-        FT_Face face = loadFace("lohit.punjabi.1.1.ttf");
+        FT_Face face = loadFace("lohit_pa.ttf");
         if (face) {
 	    const ShapeTable shape_table [] = {
 		{ { 0xA15, 0xA4D, 0xa39, 0x0 },
@@ -998,6 +998,36 @@ void tst_QScriptEngine::malayalam()
 	    QSKIP("couln't find AkrutiMal2Normal.ttf", SkipAll);
 	}
     }
+
+    {
+        FT_Face face = loadFace("Rachana.ttf");
+        if (face) {
+            const ShapeTable shape_table [] = {
+                { { 0xd37, 0xd4d, 0xd1f, 0xd4d, 0xd30, 0xd40, 0x0 },
+                  { 0x385, 0xa3, 0x0 } },
+                { { 0xd2f, 0xd4d, 0xd15, 0xd4d, 0xd15, 0xd41, 0x0 },
+                  { 0x2ff, 0x0 } },
+                { { 0xd33, 0xd4d, 0xd33, 0x0 },
+                  { 0x3f8, 0x0 } },
+                { { 0xd2f, 0xd4d, 0xd15, 0xd4d, 0xd15, 0xd41, 0x0 },
+                  { 0x2ff, 0x0 } },
+
+                { {0}, {0} }
+            };
+
+
+            const ShapeTable *s = shape_table;
+            while (s->unicode[0]) {
+                QVERIFY( shaping(face, s, HB_Script_Malayalam) );
+                ++s;
+            }
+
+            FT_Done_Face(face);
+        } else {
+            QSKIP("couln't find Rachana.ttf", SkipAll);
+        }
+    }
+
 }
 
 void tst_QScriptEngine::sinhala()
@@ -1113,7 +1143,7 @@ void tst_QScriptEngine::nko()
 void tst_QScriptEngine::linearB()
 {
     {
-        FT_Face face = loadFace("PENUTURE.TTF");
+        FT_Face face = loadFace("penuture.ttf");
         if (face) {
 	    const ShapeTable shape_table [] = {
 		{ { 0xd800, 0xdc01, 0xd800, 0xdc02, 0xd800, 0xdc03,  0 },



More information about the HarfBuzz mailing list