ufmGetTypefaceList(3w)
ufmGetTypefaceList - get a list of typefaces
As shipped in IRIX 6.5.19. Unchanged since IRIX 6.5.
NAME ufmGetTypefaceList - get a list of typefaces C SYNOPSIS #include <ufm.h> int ufmGetTypefaceList(ufmPropertiesMask propertiesMask, ufmTypefaceProps *typefaceProps, ufmTypefaceMask typefaceMask, unsigned int *nTypefaces, ufmTypeface **typefaces) DESCRIPTION ufmGetTypefaceList gets a list of available typefaces that satisfy specified requirements. By default, ufmGetTypefaceList gets a list of all available typefaces. propertiesMask has a bit flag for each property that can be used to select typefaces, such as the ufmFoundry, ufmFamilyName and ufmRelativeWeight properties. This mask is used to specify which properties should be used to produce a list of typefaces. If you set the value of the whole mask to 0 (set all bit flags to 0), no typeface properties are used to prepare a list of typefaces. Bits in the argument propertiesMask are defined as follows in the header file <ufm.h>: typedef unsigned int ufmPropertiesMask; /* bits for the typeface properties mask */ #define ufmFoundry (1<<0) #define ufmFamilyName (1<<1) #define ufmRelativeWeight (1<<2) #define ufmRelativeSlant (1<<3) #define ufmRelativeWidth (1<<4) #define ufmAddStyleName (1<<5) #define ufmSpacing (1<<6) #define ufmCharsetRegistry (1<<7) #define ufmCharsetEncoding (1<<8) #define ufmAllProperties (ufmFoundry | ufmFamilyName | ufmRelativeWeight | ufmRelativeSlant | ufmRelativeWidth | ufmAddStyleName | ufmSpacing | ufm CharsetRegistry | ufmCharsetEncoding) The type of data structure ufmTypefaceProps is defined as follows in the header file <ufm.h>/: typedef struct ufm_TypefaceProps { /* typeface properties */ char *foundry; /* which company designed or prepared typeface */ char *familyName; /* e.g., Helvetica */ int relativeWeight; /* 0=undefined, 10=ultralight, ..., 90=ultrabold */ int relativeSlant; /* 0=no slant, 1=slant, -1=polymorphic */ int relativeWidth; /* 0=undefined, 10=ultracondensed, ..., */ char *addStyleName; /* serif, sans, decorated, informal, etc. */ char *spacing; /* p=proportional, m=monospaced, etc. */ char *charsetRegistry; /* for example: iso8859 */ char *charsetEncoding; /* for example: 1 */ } ufmTypefaceProps; If you specify some typeface properties, you will get a list of only those typefaces that have those properties. The values of string properties are compared in a case insensitive way. Set the properties you do not care about to NULL. typefaceProps specify those property values that should be used to produce a list of typefaces, that is, those properties whose bit flags you have switched on in the typeface properties mask (propertiesMask). Bits in the argument typefaceMask are specified as follows in the header file <ufm.h>: typedef unsigned int ufmTypefaceMask; /* bits for the typeface type mask */ #define ufmTypefaceBitmaps (1<<0) #define ufmTypefaceOutlines (1<<1) #define ufmTypefaceScalableMetrics (1<<2) #define ufmTypefaceAll 0 Set the argument typefaceMask to ufmTypefaceAll if you want a list of all available typefaces. Set it to ufmTypefaceBitmaps if you want a list of only those typefaces from which you can get character bitmaps. If bitmap or outline font files were found for a typeface, you will be able to get character bitmaps for that typeface. Set the argument typefaceMask to ufmTypefaceOutlines if you want a list of only those typefaces from which you can get approximations of character outlines and/or exact outlines. If no outline font files were found for a typeface, you will not be able to get character outlines for that typeface. Set the argument typefaceMask to ufmTypefaceScalableMetrics if you want a list of only those typefaces for which you can get scalable metrics. Set it to: ufmTypefaceBitmaps | ufmTypefaceOutlines if you want a list of only those typefaces from which you can get both character bitmaps and outlines. ufmGetTypefaceList uses the argument nTypefaces to return the number of entries in the array typefaces, that is, the number of typefaces it finds. ufmGetTypefaceList uses the argument typefaces to return a pointer to an array of nTypefaces data structures of the type ufmTypeface. If ufmGetTypefaceList does not find any typefaces, it sets nTypefaces to 0, and it sets typefaces to NULL. Use the following table to specify a value for the property relativeWeight: Code Name Description 0 undefined Undefined or unknown 10 ultralight The lowest ratio of stem width to height 20 extralight ExtraLight 30 light Light 40 semilight SemiLight 40 book Book 50 medium Medium 50 normal Normal 50 regular Regular 60 semibold SemiBold 60 demibold DemiBold 60 demi Demi 70 bold Bold 80 extrabold ExtraBold 80 heavy Heavy 90 ultrabold The highest ratio of stem width to height 90 black Black Use the following table to specify a value for the property relativeWidth: Code Name Description 0 undefined Undefined or unknown 10 ultracondensed The lowest ratio of width to height 20 extracondensed ExtraCondensed 30 condensed Condensed 30 narrow Narrow 30 compressed Compressed 40 semicondensed SemiCondensed 50 medium Medium 50 normal Normal 50 regular Regular 60 semiexpanded SemiExpanded 60 demiexpanded DemiExpanded 70 expanded Expanded 80 extraexpanded ExtraExpanded 80 wide Wide 90 ultraexpanded The highest ratio of width to height Set the property relativeSlant to 0 if you are looking for typefaces with no slant. Set that property to 1 if you are looking for slanted (italic or oblique) typefaces. If you are looking for polymorphic typefaces, such as the Adobe Multiple Master typefaces, specify the special value of -1 for relativeWeight, relativeSlant and relativeWidth. Polymorphic fonts are fonts that can be varied in ways other than size or resolution. If ufmGetTypefaceList finds a polymorphic typeface, it may set the value of relativeWeight, relativeSlant or relativeWidth to -1. When your program is finished with a list of typefaces, it should free the memory allocated for that list by calling the function ufmFreeTypefaceList. SEE ALSO ufmFreeTypefaceList(3w). DIAGNOSTICS If ufmGetTypefaceList is not able to allocate the memory it needs, it will return the value UFM_OUT_OF_MEMORY. If it does not find the specified typeface, it will return the value UFM_INVALID_VALUE. Else, it will return UFM_NO_ERROR. UFM_OUT_OF_MEMORY, UFM_INVALID_VALUE and UFM_NO_ERROR are defined in the header file <ufm.h>.