Classes

Method XbpFont():configure() Foundation

Installs a font corresponding to the updated instance variable values of the XbpFont object.

Syntax
:configure( [<cFontName>] ) --> self
Parameters
<cFontName>
The optional parameter <cFontName> can be used to specify the name of the font to load. The parameter <cFontName> is a character expression starting with a number specifying the point size. After the point size must be a period followed by the complete name of the font as it is defined in the instance variable :compoundName.

Using parameter :<cFontName> to describe a font to be created essentially causes the values assigned to the font object's properties, such as :familyName or :codePage, to be ignored.

Return

This method returns the object executing the method (self).

Description

After a font is created using the method :create(), the instance variables of the XbpFont object can be assigned new values that describe a different font. The method :configure() can then be used to load the new font into memory. Executing :create() is not necessary once the XbpFont object has created a font. After :configure() is called, the previous font is discarded and is no longer available.

As with the method :create() (see the :create() method for more information), a font name can be optionally passed as a character string defining the point size and the new font name.

Note that XbpFont objects that have been created (including those returned by the method :list()) have their properties set up to describe the font selected. Therefore, care must be taken when making changes to an XbpFont object's instance variables prior to calling :configure(). Changing just one property may not cause the correct font to be selected due to the values in other properties of the font object. The following table shows the font properties respected during the font selection process:

Properties for font creation (in descending order of precedence)
Property Notes
:codePage Incorrect codepage may cause wrong characters to appear
:familyName Determines general style of the font
:generic
:width
:weightClass May be simlulated by the OS, if an exact match cannot be found
:bold
:height May be simlulated by the OS, if an exact match cannot be found
:nominalPointSize May be simlulated by the OS, if an exact match cannot be found

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.