| superclass(es) | object |
| subclass(es) | - |
| description | The font class can be used for selecting or changing the properties of a font for a window or for drawing text with a canvas instance. |
| see also | control - canvas |
With the font class the properties of a font can be
retrieved or changed, these properties include the height of the font (in pixels), how
characters are displayed (bold, italic, underlined, strikout), the name of the font (for
instance: Arial, Times New Roman) and the color of the characters. The font of a control can be changed by calling the method putFont/1 of the class control. |
| func | Set the height of the font, the height is specified in pixels. |
| pre | The Pixels variable must contain an integer value. |
| post | The height of the font was set to the value of the variable Pixels. |
| func | Get the height of the font. |
| pre | TRUE. |
| post | The height of the font was assigned to the variable Output. |
| func | Set or remove the bold property of the font. |
| pre | The variable YesNo must contain true or false. |
| post | If the variable YesNo contained true the bold property was set else it was removed. |
| func | Determine if the bold property of the font is set or not. |
| pre | TRUE. |
| post | If the bold property is set then true was assigned to the variable Output, else false was assigned. |
| func | Set or remove the italic property of the font. |
| pre | The variable YesNo must contain true or false. |
| post | If the variable YesNo contained true the italic property was set else it was removed. |
| func | Determine if the italic property of the font is set or not. |
| pre | TRUE. |
| post | If the italic property is set then true was assigned to the variable Output, else false was assigned. |
| func | Set or remove the strikeout property of the font. |
| pre | The variable YesNo must contain true or false. |
| post | If the variable YesNo contained true the strikeout property was set else it was removed. |
| func | Determine if the strikeout property of the font is set or not. |
| pre | TRUE. |
| post | If the strikeout property is set then true was assigned to the variable Output, else false was assigned. |
| func | Set or remove the underline property of the font. |
| pre | The variable YesNo must contain true or false. |
| post | If the variable YesNo contained true the underline property was set else it was removed. |
| func | Determine if the underline property of the font is set or not. |
| pre | TRUE. |
| post | If the underline property is set then true was assigned to the variable Output, else false was assigned. |
| func | Set the name of the font. |
| pre | The variable Name must contain a string value. |
| post | The name of the font was set to the value of the variable of Name. |
| func | Get the name of the font. |
| pre | TRUE. |
| post | The name of the font was assigned to Output. |
| func | Set the color of the font, the variables R(ed), G(reen) and B(lue) determine the color of the font. |
| pre | The variables R, G and B must contain integer values which must be in the range [0, 255]. |
| post | The color of the font was changed to the color specified by the values of the variables. |
| func | Get the color of the font. |
| pre | TRUE. |
| post | The R(ed), G(reen) and B(lue) values of the color of the font were assigned to R, G and B. |
| func | Display the standard dialog window "Font" and if the dialog is closed by pressing on the "OK" button the values choosen are assigned to the font instance. |
| pre | The variable Parent must refer to a parent window. |
| post | If the "OK" button was pressed then true was assigned to Output, else false was assigned to Output. |