Next: , Previous: , Up: Fonts   [Contents][Index]


49.2.2 Font Instances

Function: font-instance-p object

This predicate returns t if object is a font instance, and nil otherwise.

Function: make-font-instance name &optional device noerror

This function creates a new font-instance object of the specified name. device specifies the device this object applies to and defaults to the selected device. An error is signalled if the font is unknown or cannot be allocated; however, if noerror is non-nil, nil is simply returned in this case.

The returned object is a normal, first-class lisp object. The way you “deallocate” the font is the way you deallocate any other lisp object: you drop all pointers to it and allow it to be garbage collected. When these objects are GCed, the underlying X data is deallocated as well.