On 1 Feb 2009, at 11:29, Greg Ercolano wrote: >>> Fl::set_font(FL_COURIER, "-*-courier-medium-r-*-*-18-*-*-*-*- >>> *-*-*"); >> >> Wow! This is great! >> >> Just a question, if i copy that statement on my source it render >> the correct face but it does not scale very well, >> in fact it seems that it does not scale at all! :-) > > That's probably because in my example I pasted a selection > that included the pixel size (-18-) in the font name. > > If you change the '18' to '*' then it should wildcard > the size so that FLTK can control the sizes. > > Or you can probably use the more generic 'postscript' names > as well; I don't have a full understanding of what Fl::set_font() > does behind the scenes to lookup font names. Other folks here may > chime in with more info on that..
If you are indeed using the XFT renderer, rather than the XLFD+Xlib one, it will make a fair go of understanding XLFD style font names, but they are not its "natural" format. The XFT "natural" names look very much like the names that font would have on OSX or Windows, not the XLFD style. If you build a copy of fltk-1.3 and run the "utf8" font demo from a shell, then each time you "select" a font from the list, the "actual name" of the font, as seen by fltk, will be printed to the shell. You can then pass that name back to Fl::set_font() to select that particular face in the future. Works for me, anyway...! HTH, -- Ian _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

