I think this change (which works for the case reported) is more in line with what I'm trying to do. The problem with just using the max-advance property is that for fonts with a mixture of single- and double-column glyphs, there's no reliable way to get the width of a single-column glyph.
So I did the scan in checkXft to get a "good" estimate. (It's not perfect, which is why I added the menu entry, etc). diff -u -r1.314 fontutils.c --- fontutils.c 2009/09/30 09:37:45 1.314 +++ fontutils.c 2009/10/11 18:43:18 @@ -1,4 +1,4 @@ -/* $XTermId: fontutils.c,v 1.314 2009/09/30 09:37:45 tom Exp $ */ +/* $XTermId: fontutils.c,v 1.315 2009/10/11 18:43:18 tom Exp $ */ /************************************************************ @@ -1571,7 +1571,7 @@ XGlyphInfo extents; XftTextExtents32(XtDisplay(xw), xft, &c, 1, &extents); - if (width < extents.width) + if (width < extents.width && extents.width <= data->map.max_width) width = extents.width; } } -- Thomas E. Dickey <dic...@invisible-island.net> http://invisible-island.net ftp://invisible-island.net
signature.asc
Description: Digital signature