How to reproduce:
I do not have small code snippet to demonstrate the bug, but interested people
can easily enough reproduce this bug by compiling 'plan' program and putting
Plan*fontList: -*-arial-medium-r-normal-*-*-140-*-*-*-*-iso8859-1 in .Xdefaults
Why Lesstif dumps core:
Function FontInit contains the following code in two places:
Out_FontAverageWidth(o) =
(fs->max_bounds.width + fs->min_bounds.width) / 2;
TrueType backend (XFree86 4.0, xfsft module) returns XFontStruct which has
min_bounds.width = -max_bounds.width, thus FontInit will set average character
width for TrueType fonts to 0. Later in the same file in function
_XmTextOutputCreate, Lesstif tries to estimate the number of visible characters
using the following code at line 2476:
Out_Columns(o) = (XtWidth(w) - ( Out_LeftMargin(o) + Out_RightMargin(o))
) / Out_FontAverageWidth(o);
Obviously, the code fails with divide-by-zero error.
----------------------------------
E-Mail: Alexander N. Kabaev <[EMAIL PROTECTED]>
Date: 27-Apr-00
Time: 17:48:59
----------------------------------