]> git.pld-linux.org Git - packages/cssed.git/commitdiff
- patch from anjuta fixing pango >= 1.8.0 rendering bug
authorpaladine <paladine@pld-linux.org>
Tue, 16 Aug 2005 16:51:41 +0000 (16:51 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    cssed-pango.patch -> 1.1

cssed-pango.patch [new file with mode: 0644]

diff --git a/cssed-pango.patch b/cssed-pango.patch
new file mode 100644 (file)
index 0000000..3818f7d
--- /dev/null
@@ -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) {
This page took 0.072112 seconds and 4 git commands to generate.