Root.SetFontFamily Property
| Explanation | Add available fonts. Specifies the font that corresponds to the FontKind property setting defined for each class. In the initial state, "MS Gothic" and "MS P Gothic" are set in $ STD, and "MS Mincho" and "MS P Mincho" are set in $ FONT1. If you want to use a font other than these, you can assign any font to the setting value of the FontKind property with the SetFontFamily method. Displaying with the assigned font is valid only for the FontKind property that is set after executing the SetFontFamily method. The already displayed font cannot be changed with the SetFontFamily method. Normally, call the SetFontFamily method before displaying the screen when the application is initialized. Also, the FontKind properties $ STD and $ FONT1 are used by the system and should not be changed. The font allocation returns to the initial state when the Login and Logout methods are executed. Be sure to specify the font installed on your computer for p_font> and c_font. If you specify a font that does not exist on your computer, the display result is undefined. In addition, the display result of characters that the font does not have (for example, when Japanese is displayed with the alphabetic font "Arial") is also undefined. Added since Ver.4.0.1 Not supported in Mobile The following specifications have been added in ver4.1.3.4 or later. For the font name specified in p_font> and c_font, you can specify the adjustment value of the character size when actually using it in the following format. Specify the font name in fontname and the magnification of the font size in ratio. If the ratio is a positive number, it is based on the cell size, and if it is a negative number, it is based on the glyph size. Example "Merio" It is the same specification as before. Font size is based on cell size. "Merio / 120" It is 120% of the size based on the cell size. "Merio / -100" It will be 100% based on the glyph size. | |
| Call format | //.SetFontFamily( kind, p_font [, c_font ] ) | |
| Return value | None | |
| Arguments | integer kind | Setting value of FontKind property to assign font Specify $ FONT2 to $ FONT7 |
| String p_font | Specify the font name used in the proportional display. | |
| String c_font | Specifies the font used for fixed pitch display. If this parameter is omitted, the same font as p_font will be used for fixed pitch display. If you specify the $ FIXED attribute for the FontFace property, it will be displayed in the font specified here, but it will be displayed at a fixed pitch only when the specified font is defined as a fixed pitch. If the font is defined with a variable pitch, it may be displayed with a variable pitch even if the $ FIXED attribute is specified. | |
| Exception | PKG-59 | FontKind argument is invalid |
| PKG-59 | FontName argument is invalid | |
| Example of use | | |
| Related item | GetFontFamily method | |