summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--ChangeLog.pre-1-1013
-rw-r--r--ChangeLog.pre-1-413
-rw-r--r--ChangeLog.pre-1-613
-rw-r--r--ChangeLog.pre-1-813
-rw-r--r--pango/pango-attributes.h3
-rw-r--r--pango/pango-layout.c6
-rw-r--r--pango/pango-markup.c2
-rw-r--r--pango/pangoft2.c23
-rw-r--r--pango/pangowin32.c23
-rw-r--r--pango/pangox.c21
11 files changed, 142 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 54b51c5b..49af948f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Sun Feb 29 15:31:09 2004 Owen Taylor <otaylor@redhat.com>
+
+ Patch from Nicolas Setton, #114237
+
+ * pango/pango-attributes.h pango/pango-markup.c: Add a
+ new underline type, PANGO_UNDERLINE_ERROR.
+
+ * pango/pangowin32.c pango/pangox.c pango/pangoft2.c:
+ Implement drawing of PANGO_UNDERLINE_ERROR.
+
+ * pango/pango-layout.c (pango_layout_run_get_extents):
+ Handle PANGO_UNDERLINE_ERROR.
+
2003-02-29 Noah Levitt <nlevitt@columbia.edu>
* docs/pango_markup.sgml:
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index 54b51c5b..49af948f 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,16 @@
+Sun Feb 29 15:31:09 2004 Owen Taylor <otaylor@redhat.com>
+
+ Patch from Nicolas Setton, #114237
+
+ * pango/pango-attributes.h pango/pango-markup.c: Add a
+ new underline type, PANGO_UNDERLINE_ERROR.
+
+ * pango/pangowin32.c pango/pangox.c pango/pangoft2.c:
+ Implement drawing of PANGO_UNDERLINE_ERROR.
+
+ * pango/pango-layout.c (pango_layout_run_get_extents):
+ Handle PANGO_UNDERLINE_ERROR.
+
2003-02-29 Noah Levitt <nlevitt@columbia.edu>
* docs/pango_markup.sgml:
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index 54b51c5b..49af948f 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,16 @@
+Sun Feb 29 15:31:09 2004 Owen Taylor <otaylor@redhat.com>
+
+ Patch from Nicolas Setton, #114237
+
+ * pango/pango-attributes.h pango/pango-markup.c: Add a
+ new underline type, PANGO_UNDERLINE_ERROR.
+
+ * pango/pangowin32.c pango/pangox.c pango/pangoft2.c:
+ Implement drawing of PANGO_UNDERLINE_ERROR.
+
+ * pango/pango-layout.c (pango_layout_run_get_extents):
+ Handle PANGO_UNDERLINE_ERROR.
+
2003-02-29 Noah Levitt <nlevitt@columbia.edu>
* docs/pango_markup.sgml:
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index 54b51c5b..49af948f 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,16 @@
+Sun Feb 29 15:31:09 2004 Owen Taylor <otaylor@redhat.com>
+
+ Patch from Nicolas Setton, #114237
+
+ * pango/pango-attributes.h pango/pango-markup.c: Add a
+ new underline type, PANGO_UNDERLINE_ERROR.
+
+ * pango/pangowin32.c pango/pangox.c pango/pangoft2.c:
+ Implement drawing of PANGO_UNDERLINE_ERROR.
+
+ * pango/pango-layout.c (pango_layout_run_get_extents):
+ Handle PANGO_UNDERLINE_ERROR.
+
2003-02-29 Noah Levitt <nlevitt@columbia.edu>
* docs/pango_markup.sgml:
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index 54b51c5b..49af948f 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,16 @@
+Sun Feb 29 15:31:09 2004 Owen Taylor <otaylor@redhat.com>
+
+ Patch from Nicolas Setton, #114237
+
+ * pango/pango-attributes.h pango/pango-markup.c: Add a
+ new underline type, PANGO_UNDERLINE_ERROR.
+
+ * pango/pangowin32.c pango/pangox.c pango/pangoft2.c:
+ Implement drawing of PANGO_UNDERLINE_ERROR.
+
+ * pango/pango-layout.c (pango_layout_run_get_extents):
+ Handle PANGO_UNDERLINE_ERROR.
+
2003-02-29 Noah Levitt <nlevitt@columbia.edu>
* docs/pango_markup.sgml:
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h
index 30a2fb24..48241860 100644
--- a/pango/pango-attributes.h
+++ b/pango/pango-attributes.h
@@ -88,7 +88,8 @@ typedef enum {
PANGO_UNDERLINE_NONE,
PANGO_UNDERLINE_SINGLE,
PANGO_UNDERLINE_DOUBLE,
- PANGO_UNDERLINE_LOW
+ PANGO_UNDERLINE_LOW,
+ PANGO_UNDERLINE_ERROR,
} PangoUnderline;
struct _PangoAttribute
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 645aba6a..c09d238f 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -3595,6 +3595,12 @@ pango_layout_run_get_extents (PangoLayoutRun *run,
{
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);
diff --git a/pango/pango-markup.c b/pango/pango-markup.c
index 3764fdcb..a4bd108c 100644
--- a/pango/pango-markup.c
+++ b/pango/pango-markup.c
@@ -1151,6 +1151,8 @@ span_parse_func (MarkupData *md,
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
diff --git a/pango/pangoft2.c b/pango/pangoft2.c
index cc1b4c54..a6706c76 100644
--- a/pango/pangoft2.c
+++ b/pango/pangoft2.c
@@ -807,6 +807,29 @@ pango_ft2_render_layout_line (FT_Bitmap *bitmap,
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;
+ int end_x = x + PANGO_PIXELS (x_off + ink_rect.x + ink_rect.width);
+
+ for (point_x = x + PANGO_PIXELS (x_off + ink_rect.x) - 1;
+ point_x < end_x;
+ point_x += 2)
+ {
+ if (counter)
+ pango_ft2_draw_hline (bitmap,
+ risen_y + 2,
+ point_x, MIN (point_x + 1, end_x));
+ else
+ pango_ft2_draw_hline (bitmap,
+ risen_y + 3,
+ point_x, MIN (point_x + 1, end_x));
+
+ counter = (counter + 1) % 2;
+ }
+ }
+ break;
case PANGO_UNDERLINE_LOW:
pango_ft2_draw_hline (bitmap,
risen_y + PANGO_PIXELS (ink_rect.y + ink_rect.height),
diff --git a/pango/pangowin32.c b/pango/pangowin32.c
index 97e84d46..d143aef9 100644
--- a/pango/pangowin32.c
+++ b/pango/pangowin32.c
@@ -801,6 +801,29 @@ pango_win32_render_layout_line (HDC hdc,
points[0].y = points[1].y = y + 2;
Polyline (hdc, points, 2);
break;
+ case PANGO_UNDERLINE_ERROR:
+ {
+ int point_x;
+ int counter = 0;
+ int end_x = x + PANGO_PIXELS (x_off + ink_rect.x + ink_rect.width);
+
+ for (point_x = x + PANGO_PIXELS (x_off + ink_rect.x) - 1;
+ point_x < end_x;
+ point_x += 2)
+ {
+ points[0].x = point_x;
+ points[1].x = MAX (point_x + 1, end_x);
+
+ 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;
diff --git a/pango/pangox.c b/pango/pangox.c
index 91c3c75e..f0708ffa 100644
--- a/pango/pangox.c
+++ b/pango/pangox.c
@@ -1500,6 +1500,27 @@ pango_x_render_layout_line (Display *display,
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;
+ int end_x = x + (x_off + ink_rect.x + ink_rect.width) / PANGO_SCALE;
+
+ for (point_x = x + PANGO_PIXELS (x_off + ink_rect.x) - 1;
+ point_x < end_x;
+ point_x += 2)
+ {
+ if (counter)
+ XDrawLine (display, drawable, gc,
+ point_x, y + 2, MIN (point_x + 1, end_x), y + 2);
+ else
+ XDrawLine (display, drawable, gc,
+ point_x, y + 3, MIN (point_x + 1, end_x), y + 3);
+
+ counter = (counter + 1) % 2;
+ }
+ }
+ 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,