Family font information

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

3 posts / 0 new
Last post
Family font information

Submitted by Anonymous on Tue, 02/26/2002 - 10:29. Developers
Hi to everybody,
I need to know, in my program, all the installed fonts on a machine. Unfortunately normally there are too many fonts so, is there the possibility to have just a list of the font families?
Thank you very much
Regards

ICS_support

You could winnow the information down after your call to XListFonts(). Generally, though, the function is set up to work in the other direction -- rather than giving limited information about the fonts available, you give it a pattern, and it gives you all the data available. If you have a particular size font in mind, then you can put that font value in the constructed pattern, and the values returned to you would be the set of fonts (families) including that font for the particular X server. In this way, you can limit the data returned to you.

Anonymous

thanks for answering. Actually my need is to provide the user with a list of available font-families (everyone available in the system) to choose amongst. Once the family is choosen, the user will be shown all the font-sizes for that family. Therefore I must know first a complete list of available foundry+font-family, just one for each couple. But the XListFonts() requires a parameter to limit the list, and it returns ALL fonts of ALL foundry+font-families.