
- Mike Mattison and Derek Trucks
Font
Font Methods
Derived Classes
None
See Also
Class Hierarchy, Window, Color
public method Font(string FontName, int PointSize, Display Target = null)
Parameters
FontName
Name of font (e.g. "courier")
PointSize
Point size for specified font
Target
Display object where font is created and used
Return Value
None
Description
Constructor for the Font class. The font is based on the name and the point size passed in. This Font object can then be attached to any window to control the appearance of text drawn in that window. The local display is used if Target is null.
Font Class
public method<bool> IsValid()
Parameters
None
Return Value
Returns true if the font object is valid
Description
This method returns true if the font is valid (based on the specified font name and size).
Font Class
public method<Display> Display()
Parameters
None
Return Value
Returns reference to Display object
Description
This method returns the reference to the Display object where the Font was created (the Display that was passed into the constructor). If a null was passed into the constructor, the local display is used, and this method returns the reference to the local Display object.
A Font resource is created within the context of a Display, and it can only be used with that Display. If a Font is used with a Display where it was not created, a DisplayException will be fired.
Font Class