On 21.10.2010, at 13:44, MacArthur, Ian (SELEX GALILEO, UK) wrote:
>
>> Yes, I think that we should do at least some fundamental checks to
>> prevent a crash, but I'd prefer to set a default font, as it seems
>> to be done for some platforms. But it's definitive dependent on the
>> platform and configuration (e.g. XFT). We need to check all
>> platforms.
>
> Does the XFT build set a default font?
> I did not think that it did... I may well be wrong though!
Well, I don't know in general, but the small code snippet I posted
recently seems to indicate something like that. See line #323 of
src/fl_font_x.cxx:
$ svn blame src/fl_font_x.cxx | cat -n | grep -2 323
321 7617 manolo void Fl_Graphics_Driver::draw(const char* c, int n,
int x, int y) {
322 1987 easysw if (font_gc != fl_gc) {
323 7474 ianmacarthur if (!current_font) fl_font(FL_HELVETICA, 14);
324 1987 easysw font_gc = fl_gc;
325 7474 ianmacarthur XSetFont(fl_display, fl_gc, current_font->fid);
I didn't investigate further though - this may be something completely
different, but that's what I found searching for "FL_HELVETICA".
I *believe* that this Fl_Graphics_Driver::draw() is called from fl_draw(...).
Albrecht
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev