The system is queried for available fonts by sending the listFonts:maxnames: message to a CgDisplay. The message includes two arguments: a pattern-matching string and the maximum number of font string names to be returned.
The CdLogicalFontDescription class can be used to assist in creating XLFD font names and in parsing the fields out of font names. Its use is illustrated in Determining whether a font is scalable and Parsing a scalable font name.The listFonts: method is not required to include scalable fonts in the returned list unless all XLFD fields are specified in the pattern. To ensure that scalable fonts are included in the list, specify all 14 XLFD fields as in the previous example rather than using a single wildcard to match across several fields.
|