Next: get-family
Up: Class Reference
Previous: set-event-type
Superclass: wx:object%
A font is an object which determines the appearance of text, primarily
when drawing text to a canvas or device context. A font is determined by
five parameters:
- point size -- the size of the text in points (1/72 inch)
- face -- the name of a font
- family -- the families are:
- wx:const-default
- wx:const-decorative
- wx:const-roman
- wx:const-script
- wx:const-swiss
- wx:const-modern (always fixed width)
The family determines roughly what the font looks like if the face
cannot be found. - style -- the slant of the font, one of:
- wx:const-normal
- wx:const-slant (always exists)
- wx:const-italic (sometimes does not exist under X Windows)
- weight -- the wieght of the font, one of:
- wx:const-normal
- wx:const-light
- wx:const-bold
- underlining -- #t or #f
To avoid creating multiple fonts with the same characteristics, use
the global wx:font-list% object wx:the-font-list.
See also
wx:font-name-directory%.
- (make-object wx:font%) -> wx:font% object
Creates an instance of the default font.
- (make-object wx:font% size family-or-font-id style weight underline) -> wx:font% object
size : small integer
family-or-font-id : small integer
style : small integer
weight : small integer
underline = #f : boolean
See
wx:font% for the list of possible values for family-or-font-id (as a family),
style, and weight. For information about font ids, see
wx:font-name-directory%.
- (make-object wx:font% size name family style weight underline) -> wx:font% object
size : small integer
name : string
family : small integer
style : small integer
weight : small integer
underline = #f : boolean
See
wx:font% for the list of possible values for family, style,
and weight. See also
wx:font-name-directory% about the possible values for name.
Methods:
Next: get-family
Up: Class Reference
Previous: set-event-type
PLT