SOURCES: gphpedit-pango.patch (NEW) - patch from anjuta fixing pan...
paladine
paladine at pld-linux.org
Tue Aug 16 22:39:45 CEST 2005
Author: paladine Date: Tue Aug 16 20:39:45 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- patch from anjuta fixing pango >= 1.8.0 rendering bug
---- Files affected:
SOURCES:
gphpedit-pango.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/gphpedit-pango.patch
diff -u /dev/null SOURCES/gphpedit-pango.patch:1.1
--- /dev/null Tue Aug 16 22:39:45 2005
+++ SOURCES/gphpedit-pango.patch Tue Aug 16 22:39:40 2005
@@ -0,0 +1,72 @@
+diff -urN gphpedit-0.9.50.orig/src/gtkscintilla2/scintilla/gtk/PlatGTK.cxx gphpedit-0.9.50/src/gtkscintilla2/scintilla/gtk/PlatGTK.cxx
+--- gphpedit-0.9.50.orig/src/gtkscintilla2/scintilla/gtk/PlatGTK.cxx 2005-08-16 22:00:13.267732592 +0200
++++ gphpedit-0.9.50/src/gtkscintilla2/scintilla/gtk/PlatGTK.cxx 2005-08-16 22:06:01.115851640 +0200
+@@ -1252,6 +1252,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);
+@@ -1266,6 +1267,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);
+@@ -1275,7 +1277,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) {
+@@ -1291,6 +1296,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);
+@@ -1305,9 +1311,12 @@
+ utfIndex += UTF8CharLength(utfForm+utfIndex);
+ }
+ }
++ while (i < lenPositions)
++ positions[i++] = PANGO_PIXELS(pos.x + pos.width);
+ pango_layout_iter_free (iter);
+ delete []utfForm;
+ iconv_close(iconvhMeasure);
++ PLATFORM_ASSERT(i == lenPositions);
+ }
+ }
+ if (positionsCalculated < 1 ) {
+@@ -1321,16 +1330,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) {
================================================================
More information about the pld-cvs-commit
mailing list