DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L2550
Version: 1.3-current


Try putting fl_font(FL_HELVETICA, 14); above the fl_text_extents() call so
that it knows what font to use to measure the text. I'm not sure if that
will solve the crash, but it would be required in order for
fl_text_extents() to know what font you want to measure with.

I believe fl_text_extents(), fl_draw() etc. all require you to have set a
font face and font size first, otherwise it will crash.

Without any other initialization, the font and font size is completely
undefined. (so that an application that doesn't draw any text doesn't need
the overhead of loading the font library). 

The docs should probably cover that fl_text_extents() depends on the
'current font' being set with fl_font().

Perhaps too, a reference to fl_text_extents() should be added to the
documentation/src/drawing.dox file.


Link: http://www.fltk.org/str.php?L2550
Version: 1.3-current

_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to