12.7.1 Font attributes and font descriptions

Font attributes are properties of a font, which can be combined to uniquely specify a font on a given platform. There are some portable attributes which can be used on all platforms; other attributes are platform specific and will be ignored or signal errors when used on the wrong platform.

Font descriptions are externalizable objects which contain a set of font attributes. When using a font description in a font lookup operation, missing attributes are treated as wildcards (as are those with value :wild ) and invalid attributes signal errors. The result of a font lookup contains all the attributes needed to uniquely specify a font on that platform.

The :stock font attribute is special: it can be used to reliably look up a system font on all platforms.

Font descriptions can be manipulated using the functions merge-font-descriptions and augment-font-description .

These are the current set of portable font attributes and their portable types:


Set of portable font attributes


Possible values




Values are not portable.


(member :normal :bold)



(member :roman :italic)



(or (eql :any) (integer 0 *))

:any means a scalable font


(member :system-font :system-fixed-font)

Stock fonts are guaranteed to exist.




LispWorks CAPI User Guide (Windows version) - 17 Mar 2008