On 31 Mar 2010, at 17:57, Greg Ercolano wrote: > imacarthur wrote: >> So we use XFT to handle the rendering (XFT wraps FT and the old >> "core" fonts and conceivably other font rendering methods we haven't >> thought of yet) and Fontconfig to manage the choosing of fonts and >> setting languages orthographies and all that stuff. > > Fontconfig -- interesting. Didn't know that was an API.
Yup - it's a set of tools for managing fonts in user/system space, AND it's an API your app can use to manipulate fonts... The only docs I know of that describe the API are: http://fontconfig.org/fontconfig-devel/ Which can be a bit terse - I guess they assume we already know a lot of this stuff... and I don't. > I don't see any manpages or docs offhand on my machine > for that, but there is a libfontconfig, and doing a 'locate > fontconfig' > I see there is a pretty hefty 'cache' in /var/cache/fontconfig, > so it seems to be heavily used. Yup - the user/system space part makes up cache info for all the fonts yours apps use, including language orthography info and coverage and all that good stuff... so if we can hook into that from the fltk app side, it can be a Good Thing. > I'll sniff into that next. Brave... > Didn't have time last night to have that stiff drink and descend > into xft docs, but I'll definitely try the zip you posted. XFT and FC pretty much evolved together and have *very* similar API's in places. Indeed, a lot of the "special types" that XFT uses are #def'd from the equivalent FC types. In our font loading code, we currently use the XFT functions to build the font matching patterns to find a load a suitable font, e.g. XftPatternAddInteger(...) But we could, and probably should, use the equivalent FC function instead, which happens to be called FcPatternAddInteger(...) and takes the same params and returns the same result (only the names have been changed, presumably to *confuse* the innocent...) There's a lot of that, in fact... > > Usually when the docs don't read well on successful projects, > the code reads well. So if the docs don't make sense, I'll try > to look at their code. As I say, I find the docs (XFT and FC) quite terse, but it seems to work well. Keith Packard and Jim Gettys, I think, were behind it, and they do know their stuff... Maybe they just don't describe it in ways that mere mortals can comprehend! Certainly, if we can find some "worked examples", that might help a lot! Cheers, -- Ian _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

