> > 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".

Hmm, and it's got my name on it...

That's for the X11 rather than the XFT build - though line 506 of
fl_font_xft.cxx does something similar, so... (though in that case it is
Matt rather than me that gets the "credit")

Anyway - I'm not sure the XFT stuff would actually work with just this
tweak to set the font in draw(), as lots of other bits of the font
handling test for current_font being set and simply return if it is not,
so I'm not sure that net result will be adequate.
Maybe it is enough, if the other functions are only ever called from
within draw() (which is usually the case) then this simple fix should
get it going.

But that doesn't tie up with what Duncan reported though, does it?

This is all for 1.3 of course, perhaps 1.1 is different in this area?


SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

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

Reply via email to