[Resending this to the list, and casting a vote for having Reply-To: list]
On Mon, 24 Feb 2003, Havoc Pennington wrote: > On Mon, Feb 24, 2003 at 10:36:37AM -0600, Lars Clausen wrote: >> >> In working on using a TextView widget for editing text in Dia, I notice >> that there's a significant difference in the height of multi-line text, >> about 12%. We use the FT2 backend for internal Dia rendering, but the >> TextView of course uses either the gdk renderer or xft, depending on the >> GDK_USE_XFT setting. The length of the text is unaffected. We use >> pango_ft2_render_layout to do the whole rendering, while GtkTextView >> uses gtk_text_layout_draw, which does line-by-line rendering. Is the >> line space wrong in one or the other of these? >> > > TextView has settings for the amount of inter-paragraph and inter-line > spacing, that default to nonzero. If you're referring to gtk_text_view_get_pixels_[above|below]_lines, they default to zero. Upon further investigation, it looks like PangoFT2 ignores font metrics for line distance, and just uses the height given, while PangoXFT and PangoX use either ascent+descent or baselineskip or some other amount found in the font. FT2's method has the advantage that when I ask for a 1cm high font, I know there'll be 1cm between lines, if nothing else. The other method probably looks better, though, as the line distance is font dependant. -Lars -- Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| Hårdgrim of Numenor "I do not agree with a word that you say, but I |---------------------------- will defend to the death your right to say it." | Where are we going, and --Evelyn Beatrice Hall paraphrasing Voltaire | what's with the handbasket? _______________________________________________ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list