Original Author Paul Laughton, 2011
Page 171
De Re BASIC!
Style Name
Abbreviation
"NORMAL"
"N"
"BOLD"
"B"
"ITALIC"
"I"
"BOLD_ITALIC"
"BI"
Notes: The "monospace" font family always displays as "normal", regardless of the style parameter.
Some devices do not support all of the styles.
You may use the optional Paint pointer parameter <paint_nexp> to specify a Paint object to modify.
Normally this parameter is omitted. See Gr.color, Advanced usage for more information.
Gr.text.typeface {{<font_nexp>} {, <style_nexp>} {,<paint_nexp>}}
Set the text typeface and style. Both of these parameters are optional. The default value if you omit
either parameter is 1. All valid values and their meanings are shown in this table:
The values for <font_nexp> are:
The values for <style_nexp> are:
1
Default font
1
Normal (not bold or italic)
2
Monospace font
2
Bold
3
Sans-serif font
3
Italic
4
Serif font
4
Bold and italic
This command is similar to the newer Gr.text.setfont, except that it is limited to the four typefaces
listed in the table. It cannot specify fonts loaded by the Font.load command.
Notes: The "Monospace" font (font 2) always displays as "Normal" (style 1), regardless of the style
parameter. Some devices do not support all of the styles.
You may use the optional Paint pointer parameter <paint_nexp> to specify a Paint object to modify.
Normally this parameter is omitted. See Gr.color, Advanced usage for more information.
Gr.text.height {<height_nvar>} {, <up_nvar>} {, <down_nvar>}
Returns height information for the current font and text size. All of the parameters are optional; use
commas to indicate omitted parameters (see Optional Parameters).
If the height variable <height_nvar> is present, it is set to the height in pixels of the space that will be
used to print most text in most languages. This is the value you set with Gr.text.size. In typeface
terminology, it is the "ascent" plus the "descent". The space contains the ascenders of letters like "h"
and the descenders of letters like "y".
Some letters, such as the Polish letter "", may not fit in this space. The position of a line high enough to
contain all possible characters is returned in the up variable <up_nvar>, if it is present.
If the down variable <down_nvar> is present, it is set to the "descent" value. This position is low enough
to contain the lowest part of all possible characters, such as the tail of a "y".