On Sat, 2009-03-07 at 22:25 +0100, Jean-Philippe Bernardy wrote: > This clearly should not happen: descent + ascent should be (about) the > height of a line. I guess that the font was not taken into account by the time > the metrics were extracted. Would you like to investigate? > Otherwise it's worth writing down the "state of affairs" as comments > in the code.
I've looked at this a bit closer, and the problem appears to reside in Yi.UI.Pango.mkFontDescr. When configFontSize is not explicitly defined (as in the default config and my config), no value is assumed, so the metrics seem to be working with a font of size 0.0 pixels. I'm currently looking to see how to use the system-wide monospace font. In GNOME, this is set in gnome-appearance-properties (and apparently defaults to Monospace-10), but I suspect this is an interface to a property that exists whenever X or GTK is available (i.e. that default setting is defined when GNOME is not installed). I'm not having much luck finding how to use this setting, unfortunately. The current Yi source defaults to Monospace and no specific size (so Pango uses 10px on my system). Jeff Wheeler (I've differentiated between the specific font "Monospace" and the category of fonts, monospace, with capitalization.) --~--~---------~--~----~------------~-------~--~----~ Yi development mailing list [email protected] http://groups.google.com/group/yi-devel -~----------~----~----~----~------~----~------~--~---
