Hi John!
That's pretty cool. Monospace only? Replicatable in gtk-demo? With unstable gtk2? It's probably Pango, but file a bug with Gtk and it can be changed to Pango if that turns out to be the case. If it doesn't replicate in gtk-demo, try to make a minimal program that demonstrates the problem (look in tests for a starting point).
Here is a patch to gtk-demo/textview.c that illustrates the problem: bash-3.2$ diff -u textview-orig.c textview.c --- textview-orig.c2013-03-09 14:05:50.000000000 -0800 +++ textview.c2013-03-09 14:04:27.000000000 -0800 @@ -444,6 +444,14 @@ Â Â Â Â * a view widget. Â Â Â Â */ Â Â Â Â view1 = gtk_text_view_new (); + + Â Â Â // begin Monospace modification + Â Â Â PangoFontDescription *pfd = pango_font_description_new(); + Â Â Â pango_font_description_set_family(pfd, "Monospace"); + Â Â Â gtk_widget_modify_font(view1, pfd); + Â Â Â pango_font_description_free(pfd); + Â Â Â // end Monospace modification + Â Â Â Â buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view1)); Â Â Â Â view2 = gtk_text_view_new_with_buffer (buffer); Â Â Â Â I also attach a screenshot that shows the "Text Widget/Multiple Views" demo of gtk-demo with this change and a line of underscores inserted. Â It only happens with the Monospace font (top GtkTextView) and not with the default one (bottom GtkTextView). This is with gtk2 stable. Â I am not able to compile gtk2 unstable. Â When compiling gopbject-introspection it misses some symbols in libffi. Â But maybe you can verify that this problem still exists in the latest build? Best regards, Steffen
Attachment:
Monospace-underscores.png
Description: PNG image