Commit 5f4be64c authored by liucougar's avatar liucougar Committed by Dom Lachowicz

librsvg can not render text-decoration=underline text. Bug #566365 ditto

2009-02-19  liucougar <liucougar@gmail.com>

        * rsvg-text.c: librsvg can not render text-decoration=underline text. Bug #566365
        * rsvg-cairo-draw.c: ditto


svn path=/trunk/; revision=1200
parent fec08529
2009-02-19 liucougar <liucougar@gmail.com>
* rsvg-text.c: librsvg can not render text-decoration=underline text. Bug #566365
* rsvg-cairo-draw.c: ditto
2009-02-19 Luis Menina <liberforce@freeside.fr>
* *: GNOME Goal: Clean up GLib and GTK+ includes. Bug #563789
......
......@@ -490,11 +490,9 @@ rsvg_cairo_render_pango_layout (RsvgDrawingCtx * ctx, PangoLayout * layout, doub
bbox.h = ink.height / (double)PANGO_SCALE;
bbox.virgin = 0;
if (state->fill) {
cairo_move_to (render->cr, x, y);
rsvg_bbox_insert (&render->bbox, &bbox);
if (state->fill) {
_set_source_rsvg_paint_server (ctx,
state->current_color,
state->fill,
......@@ -505,6 +503,8 @@ rsvg_cairo_render_pango_layout (RsvgDrawingCtx * ctx, PangoLayout * layout, doub
}
if (state->stroke) {
cairo_move_to (render->cr, x, y);
rsvg_bbox_insert (&render->bbox, &bbox);
pango_cairo_layout_path (render->cr, layout);
_set_source_rsvg_paint_server (ctx,
......
......@@ -551,6 +551,22 @@ rsvg_text_create_layout (RsvgDrawingCtx * ctx,
attribute->start_index = 0;
attribute->end_index = G_MAXINT;
pango_attr_list_insert (attr_list, attribute);
if (state->has_font_decor && text) {
if (state->font_decor & TEXT_UNDERLINE) {
attribute = pango_attr_underline_new (PANGO_UNDERLINE_SINGLE);
attribute->start_index = 0;
attribute->end_index = -1;
pango_attr_list_insert (attr_list, attribute);
}
if (state->font_decor & TEXT_STRIKE) {
attribute = pango_attr_strikethrough_new (TRUE);
attribute->start_index = 0;
attribute->end_index = -1;
pango_attr_list_insert (attr_list, attribute);
}
}
pango_layout_set_attributes (layout, attr_list);
pango_attr_list_unref (attr_list);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment