Around 12 o'clock on Dec 1, Juliusz Chroboczek wrote:
> Can you provide me with some code to produce a list of pairs of > (XLFD, filename) out of an Xft config file? Hmm. I can give you everything except average width; for that field, I'd have to rasterize the appropriate subset of the font and compute it. Certainly for the scalable names, it's easy enough. You can play with the existing XftListFonts interface if you want to see how it might work. The essential operation is to list the fonts with an empty pattern and a selection of all of the fields you're interested in, for XLFD, that will be XFT_FOUNDRY, XFT_FAMILY, XFT_WEIGHT, XFT_SLANT, XFT_STYLE, XFT_PIXEL_SIZE, XFT_SIZE and XFT_SPACING; the file name is available as well if you want (XFT_FILE), but it's not relevant for listing fonts. Not all fonts will include all values, so you'll have to do a bit of defaulting; fonts without XFT_SIZE or XFT_PIXEL_SIZE are scalable. Figuring out the list of supported encodings will require a small amount of additional work; you'll want to use the new font configuration library for that as it includes unicode coverage in the font name itself, then select encodings which are reasonably well covered by the font. Keith Packard XFree86 Core Team SuSE, Inc. _______________________________________________ Fonts mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/fonts