NextPrevUpTopContentsIndex

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

Attribute

Possible values

Comments

:family

string

Values are not portable.

:weight

(member :normal :bold)

 

:slant

(member :roman :italic)

 

:size

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

:any means a scalable font

:stock

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

Stock fonts are guaranteed to exist.

:charset

keyword

 


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

NextPrevUpTopContentsIndex