? pango-underline_error.diff
Index: pango/pango-attributes.h
===================================================================
RCS file: /cvs/gnome/pango/pango/pango-attributes.h,v
retrieving revision 1.20
diff -u -r1.20 pango-attributes.h
--- pango/pango-attributes.h	10 Dec 2002 23:45:26 -0000	1.20
+++ pango/pango-attributes.h	17 Nov 2003 10:50:54 -0000
@@ -87,6 +87,7 @@
   PANGO_UNDERLINE_NONE,
   PANGO_UNDERLINE_SINGLE,
   PANGO_UNDERLINE_DOUBLE,
+  PANGO_UNDERLINE_ERROR,
   PANGO_UNDERLINE_LOW
 } PangoUnderline;
 
Index: pango/pango-layout.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pango-layout.c,v
retrieving revision 1.105
diff -u -r1.105 pango-layout.c
--- pango/pango-layout.c	31 Oct 2003 17:40:24 -0000	1.105
+++ pango/pango-layout.c	17 Nov 2003 10:50:55 -0000
@@ -3577,6 +3577,12 @@
     {
     case PANGO_UNDERLINE_NONE:
       break;
+    case PANGO_UNDERLINE_ERROR:
+      if (run_ink)
+        run_ink->height = MAX (run_ink->height, 3 * PANGO_SCALE - run_ink->y);
+      if (run_logical)
+	run_logical->height = MAX (run_logical->height, 3 * PANGO_SCALE - run_logical->y);
+      break;
     case PANGO_UNDERLINE_SINGLE:
       if (run_ink)
         run_ink->height = MAX (run_ink->height, 2 * PANGO_SCALE - run_ink->y);
Index: pango/pango-markup.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pango-markup.c,v
retrieving revision 1.16
diff -u -r1.16 pango-markup.c
--- pango/pango-markup.c	2 Jul 2002 17:15:22 -0000	1.16
+++ pango/pango-markup.c	17 Nov 2003 10:50:55 -0000
@@ -1133,6 +1133,8 @@
         ul = PANGO_UNDERLINE_DOUBLE;
       else if (strcmp (underline, "low") == 0)
         ul = PANGO_UNDERLINE_LOW;
+      else if (strcmp (underline, "error") == 0)
+        ul = PANGO_UNDERLINE_ERROR;
       else if (strcmp (underline, "none") == 0)
         ul = PANGO_UNDERLINE_NONE;
       else
Index: pango/pangoft2.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pangoft2.c,v
retrieving revision 1.61
diff -u -r1.61 pangoft2.c
--- pango/pangoft2.c	1 Nov 2003 15:02:16 -0000	1.61
+++ pango/pangoft2.c	17 Nov 2003 10:50:55 -0000
@@ -838,6 +838,28 @@
 				x + PANGO_PIXELS (x_off + ink_rect.x),
 				x + PANGO_PIXELS (x_off + ink_rect.x + ink_rect.width));
 	  break;
+	case PANGO_UNDERLINE_ERROR:
+          {
+            int point_x;
+            int counter = 0;
+
+            for (point_x = x + PANGO_PIXELS (x_off + ink_rect.x) - 1;
+                 point_x < x + PANGO_PIXELS (x_off + ink_rect.x + ink_rect.width);
+                 point_x = point_x + 2)
+            {
+              if (counter)
+	        pango_ft2_draw_hline (bitmap,
+				      risen_y + 2,
+				      point_x, point_x + 1);
+              else
+	        pango_ft2_draw_hline (bitmap,
+				      risen_y + 3,
+				      point_x, point_x + 1);
+
+              counter = (counter + 1) % 2;
+            }
+          }
+	  break;
 	case PANGO_UNDERLINE_LOW:
 	  pango_ft2_draw_hline (bitmap,
 				risen_y + PANGO_PIXELS (ink_rect.y + ink_rect.height),
Index: pango/pangowin32.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pangowin32.c,v
retrieving revision 1.43
diff -u -r1.43 pangowin32.c
--- pango/pangowin32.c	2 Apr 2003 18:25:34 -0000	1.43
+++ pango/pangowin32.c	17 Nov 2003 10:50:56 -0000
@@ -780,6 +780,28 @@
 	  points[0].y = points[1].y = y + 2;
 	  Polyline (hdc, points, 2);
 	  break;
+	case PANGO_UNDERLINE_ERROR:
+          {
+            int point_x;
+            int counter = 0;
+
+            for (point_x = x + PANGO_PIXELS (x_off + ink_rect.x) - 1;
+                 point_x < x + PANGO_PIXELS (x_off + ink_rect.x + ink_rect.width);
+                 point_x = point_x + 2)
+            {
+	      points[0].x = point_x;
+	      points[1].x = point_x + 1;
+
+              if (counter)
+	        points[0].y = points[1].y = y + 2;
+              else
+	        points[0].y = points[1].y = y + 3;
+
+	      Polyline (hdc, points, 2);
+              counter = (counter + 1) % 2;
+            }
+          }
+	  break;
 	case PANGO_UNDERLINE_LOW:
 	  points[0].x = x + PANGO_PIXELS (x_off + ink_rect.x) - 1;
 	  points[0].y = points[1].y = y + PANGO_PIXELS (ink_rect.y + ink_rect.height) + 2;
Index: pango/pangox.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pangox.c,v
retrieving revision 1.81
diff -u -r1.81 pangox.c
--- pango/pangox.c	2 Aug 2003 18:18:30 -0000	1.81
+++ pango/pangox.c	17 Nov 2003 10:50:56 -0000
@@ -1500,6 +1500,26 @@
 		     x + (x_off + ink_rect.x) / PANGO_SCALE - 1, y + 2,
 		     x + (x_off + ink_rect.x + ink_rect.width) / PANGO_SCALE, y + 2);
 	  break;
+	case PANGO_UNDERLINE_ERROR:
+          {
+            int point_x;
+            int counter = 0;
+
+            for (point_x = x + (x_off + ink_rect.x) / PANGO_SCALE - 1;
+                 point_x < x + (x_off + ink_rect.x + ink_rect.width) / PANGO_SCALE;
+                 point_x++)
+            {
+              if (counter < 2)
+                XDrawPoint
+                 (display, drawable, fg_gc, point_x, y + 2);
+              else
+                XDrawPoint
+                 (display, drawable, fg_gc, point_x, y + 3);
+
+              counter = (counter + 1) % 4;
+            }
+          }
+	  break;
 	case PANGO_UNDERLINE_LOW:
 	  XDrawLine (display, drawable, fg_gc,
 		     x + (x_off + ink_rect.x) / PANGO_SCALE - 1, y + (ink_rect.y + ink_rect.height) / PANGO_SCALE + 2,
