On 13 Aug 2009, at 18:51, Steve Bennett wrote: > Okay, this is a weird problem that's beginning to drive me crazy, > and I don't know where to look. As background, what I have here > is a custom live CD linux distribution creating using Buildroot. > I've got FLTK 1.1.7 included in this, and have enabled Xft support > and included the liberation fonts.
(Side question) Why 1.1.7 and not something more recent? If you are building your own lib, you might as well use a recent one. > I've added my own custom package to the Buildroot setup to add a > FLTK based program to the distribution. The program is working > fine except that I cannot get freetype anti-aliased fonts. OK, questions:- - Should we understand that you have two linux systems here, in effect? - One a regular desktop system, and one a liveCD Buildroot system. You can boot your PC from either of these, and with the regular boot, the AA works for the fonts, but with the liveCD it does not? - The exact same executable can be run in either environment, and the AA works/does not work as outlined...? - What distro is your desktop? - What is the basis of the liveCD? > When I run the "fonts" test program built with the fltk package, it > runs just fine, detects the freetype fonts, and displays them > correctly with anti-aliasing. Works - on your regular system, or running on the liveCD? > If I take the same exact fonts.cxx module, copy it to my package > and build it in place of my code, I don't get the freetype fonts or > the anti-aliasing. This is building on the liveCD system? > Clearly, *something* is different between the two different builds, > but it's far from clear what it is. I've run the fltk-config > script from within the build fltk folder, and looked at the > parameters it says to use, and added the missing ones to the > buildroot build. This mostly sounds a lot like your liveCD does not have fontconfig or libXft installed, actually. Or, if it does have them, either ldconfig hasn't run or something (so that that libxft isn't being found by the application at runtime) or fontconfig hasn't updated the font cache on the liveCD, so the fonts you added are not found. XFT only really checks the fontcache, it does not "look" for fonts itself, so simply adding the fonts to the liveCD isn't going to be enough unless you also refresh the fontcache on the image to list them. > For cxxflags, this meant adding <root path>/usr/include/freetype2 > to the include paths. (oddly, fltk-config also listed /usr/include/ > freetype2/freetype2, which doesn't exist -- typo? Or possibly > related?) Can you not simply re-run configure ? Or indeed build the entire fltk tarball on the liveCD system and see what it reports. Here, a later fltk build might be better, as current fltk configure scripts print a summary of what they found, which might be handy for debugging further. > For ldflags, this meant adding -lXft -lpthread -lm -lXext -lX11 to > the library list. configure ought to have done that anyway... If configure did not find Xft, that means you are probably missing some key libraries, or at least the dev-headers for them... That'll probably do for now. Let us know how you are getting on. -- Ian _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

