Draw underlines one pixel higher.

2000-11-14  Havoc Pennington  <hp@redhat.com>

	* gdk/gdkpango.c (gdk_draw_layout_line): Draw underlines one pixel
	higher.

	* gtk/gtktextdisplay.c (render_layout_line): Take rise into
	account. Also, render rise, underline, background, etc. for
	pixbufs as well as text. Also, draw underlines one pixel higher.

	* gtk/gtktextlayout.c (gtk_text_layout_get_line_display): Add a
	PangoAttribute for the rise, so it gets drawn properly. Also,
	add the GtkTextAppearance attribute for pixbuf/widget segments
	as well; we should go ahead and have rise, underline, background,
	stipple work for those

	* gtk/gtktexttag.c: Rename "offset" property to "rise" to match
	Pango
This commit is contained in:
Havoc Pennington
2000-11-15 00:23:37 +00:00
committed by Havoc Pennington
parent 2d24862ffd
commit fe8da19f2a
17 changed files with 357 additions and 121 deletions

View File

@ -145,13 +145,13 @@ create_tags (GtkTextBuffer *buffer)
tag = gtk_text_buffer_create_tag (buffer, "superscript");
g_object_set (G_OBJECT (tag),
"offset", 10 * PANGO_SCALE, /* 10 pixels */
"rise", 10 * PANGO_SCALE, /* 10 pixels */
"size", 8 * PANGO_SCALE, /* 8 points */
NULL);
tag = gtk_text_buffer_create_tag (buffer, "subscript");
g_object_set (G_OBJECT (tag),
"offset", -10 * PANGO_SCALE, /* 10 pixels */
"rise", -10 * PANGO_SCALE, /* 10 pixels */
"size", 8 * PANGO_SCALE, /* 8 points */
NULL);
}