Good progress on the qt patch status

Praveen A pravi.a at gmail.com
Wed Jun 10 01:12:25 PDT 2009


It is indeed a welcome change.

<j4v4m4n> trying to do a merge request for http://is.gd/WLXQ , can't
find any docs/howtos :-(
* tronical (n=shausman at 62.70.27.104) has joined #qt-labs
* ChanServ gives voice to tronical
* johan-s (n=johan-s at 62.70.27.104) has joined #qt-labs
* ChanServ gives voice to johan-s
* kkalland (n=kkalland at 62.70.27.104) has joined #qt-labs
* ChanServ gives voice to kkalland
<jpnurmi> j4v4m4n: you should see a "request merge" link on the right
at http://qt.gitorious.org/~pravi/qt/pravis-clone
<j4v4m4n> jpnurmi, thanks
<rittk> j4v4m4n: you need to remove "patch by suresh ..." first )
<j4v4m4n> rittk, well, he developed it, or may be I will let him do the request
* rosch (n=qt at 62.70.27.104) has joined #qt-labs
* ChanServ gives voice to rosch
* girishr has quit (Remote closed the connection)
<rittk> j4v4m4n: trolls can not aprove such request if author !=
committer anyway
<j4v4m4n> rittk, I will talk to him and let him do the request
<rittk> j4v4m4n: also I see meny code styling issues in that patch
<rittk> *many
<j4v4m4n> rittk, thanks for the review, will fix those before the request
<rittk> j4v4m4n: and one more thing...most important thing...
<rittk> j4v4m4n: you need to update authotests :)
<rittk> tests/auto/somathing_about-glyphs
<rittk> f??c
<rittk> *something
* rittk almost sleeping
<j4v4m4n> rittk, what should it have?
<j4v4m4n> rittk, any pointers?
<rittk> wait a minute
<j4v4m4n> ok
<rittk> j4v4m4n: how/where I can see a difference if I'll apply ur patch?
<rittk> there are no autotests for harfbuzz. so this should be qfont*
or something like that...
* lbt (n=david at 78.32.229.233) has joined #qt-labs
* jobor (n=jbornema at berlin-gw.trolltech.de) has joined #qt-labs
* ChanServ gives voice to jobor
<TZander> tronical: ^^
* _kde_pepo (n=pepo at p5B3BD571.dip.t-dialin.net) has joined #qt-labs
<tronical> j4v4m4n: the tests are in harfbuzz itself. can you
subscribe yourself to the harfbuzz mailing list and post the patches
there? they should go upstream right away :)
<j4v4m4n> tronical, ok, I will post the patch to harfbuzz list.
<tronical> j4v4m4n: thanks!
<tronical> j4v4m4n: check tests/shaping/README in the harfbuzz repository
<j4v4m4n> tronical, ok
<tronical> j4v4m4n: it would be great if you could add tests for your
changes there. feel free to bug me here about it:)
<j4v4m4n> tronical, I will give it a shot
<rittk> darktears: ping
<tronical> j4v4m4n: thanks :)
<j4v4m4n> tronical, time to go today, I will do it in coming days,
thanks for the bug offer :-)
<tronical> j4v4m4n: have a nice day :)

Suresh (and others), have a look at the patch and see if we want to do
all the changes (how to handle ഖ്ര യ്ര ...).

--- a/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
@@ -1606,6 +1606,13 @@
         for (i = base+1; i < len; ++i)
             properties[i] &= ~PostSubstProperty;

+       // patch by suresh for Malayalam for traditional script
conjuncts with postbase matra
+        if (script == HB_Script_Malayalam) {
+           for (i = 0; i < len; ++i)
+            properties[i] &= ~PostSubstProperty;
+       }
+
+
         // halant always applies

 #ifdef INDIC_DEBUG
@@ -1641,6 +1648,35 @@
             }
         }

+       // patch by suresh for fixing Malayalam vattu ra glyph for
reformed script
+
+       if (script == HB_Script_Malayalam       /* && len-newLen < 4
*/ && reordered[base+1] == 0x0d30  && reordered[base+2] == 0x0d4d) {
+           int basePos = 0;
+           bool raSignFix = TRUE;
+           while (basePos < newLen &&
(int)otl_glyphs[basePos].cluster <= base)
+               basePos++;
+           --basePos;
+           // don't apply fix for traditional script
+           if ((newLen-basePos == 1)
+               || ( len > base+3
+                   && newLen-basePos == 2
+                   && (form(reordered[base+3]) == Matra
+                       || form(reordered[base+3]) == LengthMark
+                       || form(reordered[base+3]) == VowelMark
+                       || form(reordered[base+3]) == Halant
+                            )))
+               raSignFix = FALSE;
+           if (basePos <= newLen && raSignFix) {
+               IDEBUG("moving halant + ra to position %d in syllable
newlen=%d", basePos, newLen);
+               HB_GlyphItemRec r = otl_glyphs[basePos+1];
+               HB_GlyphItemRec b = otl_glyphs[basePos];
+
+               otl_glyphs[basePos] = r;
+               otl_glyphs[basePos+1] = b;
+
+           }
+       }
+
         HB_Bool positioned = HB_OpenTypePosition(item, availableGlyphs, false);

         HB_FREE_STACKARRAY(clusters);

@@ -1715,12 +1751,15 @@
         switch(newState) {
         case Control:
             newState = state;
- 	    if (state == Halant && uc[pos] == 0x200d /* ZWJ */)
-  		break;
+	    // Patch by suresh for Malayalam for fixing chillu + postbase
consonant + virama
+	    if (script != HB_Script_Malayalam && state == Halant && uc[pos]
== 0x200d /* ZWJ */)
+		break;
             // the control character should be the last char in the item
             ++pos;
             goto finish;
         case Consonant:
+	    if (state == Halant && (script != HB_Script_Malayalam ||
uc[pos-1] == 0x200d /* ZWJ */))
+	         break;
 	    if (state == Halant && (script != HB_Script_Sinhala || uc[pos-1]
== 0x200d /* ZWJ */))
                 break;
             goto finish;
@@ -1731,6 +1770,9 @@
             if (script == HB_Script_Bengali && pos == 1 &&
                  (uc[0] == 0x0985 || uc[0] == 0x098f))
                 break;
+	   // Patch by suresh for Malayalam SAMVRUTHOKARA
+	   if (script == HB_Script_Malayalam && uc[pos] == 0x0d4d &&
uc[pos-1] == 0x0d41)
+	        break;
             goto finish;
         case Nukta:
             if (state == Consonant)

-- 
പ്രവീണ്‍ അരിമ്പ്രത്തൊടിയില്‍
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
Join The DRM Elimination Crew Now!
http://fci.wikia.com/wiki/Anti-DRM-Campaign


More information about the discuss mailing list