Author: paladine                     Date: Tue Aug 16 16:51:46 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- patch from anjuta fixing pango >= 1.8.0 rendering bug

---- Files affected:
SOURCES:
   cssed-pango.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/cssed-pango.patch
diff -u /dev/null SOURCES/cssed-pango.patch:1.1
--- /dev/null   Tue Aug 16 18:51:46 2005
+++ SOURCES/cssed-pango.patch   Tue Aug 16 18:51:41 2005
@@ -0,0 +1,71 @@
+diff -urN cssed-0.3.0.orig/scintilla/gtk/PlatGTK.cxx 
cssed-0.3.0/scintilla/gtk/PlatGTK.cxx
+--- cssed-0.3.0.orig/scintilla/gtk/PlatGTK.cxx 2005-08-16 18:31:10.883464824 
+0200
++++ cssed-0.3.0/scintilla/gtk/PlatGTK.cxx      2005-08-16 18:44:20.587411576 
+0200
+@@ -1243,6 +1243,7 @@
+       if (font_.GetID()) {
+               int totalWidth = 0;
+ #ifdef USE_PANGO
++              const int lenPositions = len;
+               if (PFont(font_)->pfd) {
+                       if (len == 1) {
+                               int width = PFont(font_)->CharWidth(*s, et);
+@@ -1257,6 +1258,7 @@
+                               // Simple and direct as UTF-8 is native Pango 
encoding
+                               pango_layout_set_text(layout, s, len);
+                               PangoLayoutIter *iter = pango_layout_get_iter 
(layout);
++                              pango_layout_iter_get_cluster_extents(iter, 
NULL, &pos);
+                               int i = 0;
+                               while (pango_layout_iter_next_cluster (iter)) {
+                                       
pango_layout_iter_get_cluster_extents(iter, NULL, &pos);
+@@ -1266,7 +1268,10 @@
+                                               positions[i++] = position;
+                                       }
+                               }
++                              while (i < lenPositions)
++                                      positions[i++] = PANGO_PIXELS(pos.x + 
pos.width);
+                               pango_layout_iter_free (iter);
++                              PLATFORM_ASSERT(i == lenPositions);
+                       } else {
+                               int positionsCalculated = 0;
+                               if (et == dbcs) {
+@@ -1281,6 +1286,7 @@
+                                               int i = 0;
+                                               int utfIndex = 0;
+                                               PangoLayoutIter *iter = 
pango_layout_get_iter (layout);
++                                              
pango_layout_iter_get_cluster_extents(iter, NULL, &pos);
+                                               while 
(pango_layout_iter_next_cluster (iter)) {
+                                                       
pango_layout_iter_get_cluster_extents (iter, NULL, &pos);
+                                                       int position = 
PANGO_PIXELS(pos.x);
+@@ -1295,8 +1301,11 @@
+                                                               utfIndex += 
UTF8CharLength(utfForm+utfIndex);
+                                                       }
+                                               }
++                                              while (i < lenPositions)
++                                                      positions[i++] = 
PANGO_PIXELS(pos.x + pos.width);
+                                               pango_layout_iter_free (iter);
+                                               delete []utfForm;
++                                              PLATFORM_ASSERT(i == 
lenPositions);
+                                       }
+                               }
+                               if (positionsCalculated < 1 ) {
+@@ -1310,16 +1319,20 @@
+                                       pango_layout_set_text(layout, utfForm, 
strlen(utfForm));
+                                       int i = 0;
+                                       PangoLayoutIter *iter = 
pango_layout_get_iter (layout);
++                                      
pango_layout_iter_get_cluster_extents(iter, NULL, &pos);
+                                       while (pango_layout_iter_next_cluster 
(iter)) {
+                                               
pango_layout_iter_get_cluster_extents(iter, NULL, &pos);
+                                               positions[i++] = 
PANGO_PIXELS(pos.x);
+                                       }
++                                      while (i < lenPositions)
++                                              positions[i++] = 
PANGO_PIXELS(pos.x + pos.width);
+                                       pango_layout_iter_free(iter);
+                                       if (useGFree) {
+                                               g_free(utfForm);
+                                       } else {
+                                               delete []utfForm;
+                                       }
++                                      PLATFORM_ASSERT(i == lenPositions);
+                               }
+                       }
+                       if (len == 1) {
================================================================
_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to