MSFonts
MSFonts(PRINTER), MSFonts
parameters: PRINTER
Parameters | Position | Description |
---|---|---|
Stack(in) | ] | |
... | ||
[ | ||
Integer | ||
Stack(Out) | String |
The number on the stack indicates the number of the font to be set. The array describes the properties of the new font. The system first tries to find exactly the specified font. If this does not work, a font as similar as possible is set. The result string describes the result font.
Attention!
Entries 0-3 in the font table of this machine are used as default fonts by the InstantView widgets. For example, the font for all buttons in the machine can be changed at once. At the same time, this should be taken into account when changing the fonts. It is recommended to use the entries 10-20 of the font table for specific fonts that are only needed in a few places.
Without parameters, the same font description is used for the screen and printer, with the parameter only for the printer. Since printers may support different fonts than the screen, it is possible that the printout may differ from the screen display.
The font description can contain the following components, which can be combined in any way:
- Font name: String
- Size: Integer in PicaPoint
- BOLD: constant that produces a bold font
- ITALIC: constant that creates an italic font
- ORIENTATION degrees: rotation angle in degrees, 0 degrees: from left to right, 90 degrees: top to bottom
-
Flag Code page Description VIEW_CHARTSET ?1252 BALTIC_CHARSET 1257 Baltic languages CHINESEBIG5_CHARSET 950 Chinese (Taiwan) DEFAULT_CHARSET ?1252 EASTEUROPE_CHARSET 1250 Eastern European languages (currently not supported) GB2312_CHARSET 936 Simplified Chinese (PR China) GREEK_CHARSET 1253 Greek HANGUL_CHARSET 949 Korean MAC_CHARSET ? OEM_CHARSET ?437 ASCII with graphic symbols RUSSIAN_CHARSET 1251 Russian SHIFTJIS_CHARSET 932 Japanese SYMBOL_CHARSET ? Symbol Character set TURKISH_CHARSET 1254 Turkish VIETNAMESE_CHARSET 1258 Vietnamese JOHAB_CHARSET 1361 Korean ARABIC_CHARSET 1256 Arabic HEBREW_CHARSET 1255 Hebrew
If the font name is omitted, the Windows font is selected as the underlying font. This is the font "Segoe UI" as of Windows Vista. A font size is also bound to this Windows font, which is determined by Windows. (Also depends on settings in the control panel). If no font is set with MSFonts, then this font is also set for all fonts 0-20. The group font (Font 2) is slightly larger by default from Windows 8 onwards due to a redesign of the Windows interface. This behaviour can be overridden by manually overwriting font 2 with an empty font as follows 2 [] MSFonts
Examples
3 [ "Arial" 8 BOLD ] MSFonts | sets font 3 to Arial Bold 8 pt for screen and printer |
1 [ ITALIC ] MSFonts | sets font 1 for screen and printer to the Windows font in italics |
7 [ ] MSFonts | sets font 7 to the default Windows font |
0 [ "Courier New" 20 ITALIC ] MSFonts | sets font 0 for screen and printer to Courier New Italic, 20pt |
1 [ "Arial" 12 ORIENTATION 90 ] MSFonts(PRINTER) | sets font 1 for the printer to Arial 12pt rotated by 90 degrees |
2 [ "Garamond" 16 BOLD ITALIC ] MSFonts | sets Font 2 for screen and printer to Garamond Bold Italic 16pt |
0 [ "Times New Roman" 16 RUSSIAN_CHARSET ] MsFonts | sets font for output with Cyrillic characters |