[AC] Cater to the fact that default face height might be 0
Stephen J. Turnbull
stephen at xemacs.org
Tue Nov 21 05:56:19 EST 2006
Michael Sperber writes:
> - int char_height;
> + int char_height = 0;
> - char_height = avail_height / defheight;
> + if (defheight)
> + char_height = avail_height / defheight;
Aidan caught this one or a similar one (for width?) a few days ago, I
think. While we may as well apply the patch(es), there's something
deeper wrong here. Default character metrics for a font should not be
zero, at least not for Xft fonts, and I don't think so for X11 core
fonts either. We go to some trouble to compute something more or less
sane.
It may just be that somehow the default metrics are being requested
while the font object is being built "just this once" at dump time,
but it worries me. I kinda think this should be an assert....
More information about the XEmacs-Patches
mailing list