mirror of
https://github.com/FellippeHeitor/InForm.git
synced 2024-09-18 19:54:44 +00:00
Updated Font (markdown)
parent
505e8959cf
commit
1368f2c2f5
1 changed files with 23 additions and 1 deletions
24
Font.md
24
Font.md
|
@ -2,7 +2,29 @@ The Font property holds then handle of the loaded font associated with a control
|
|||
|
||||
Control(ControlID).Font = SetFont(FontName$, FontSize%, Attributes$)
|
||||
|
||||
## Controls that use the Font property:
|
||||
* FontName$ must reference a font file. Only TTF fonts are accepted.
|
||||
* If you don't specify a path, the current path is used.
|
||||
* In Windows, if a path isn't specified the default font location **C:\Windows\Font** is searched.
|
||||
* FontSize% is in pixels, not points.
|
||||
* Attributes$ follow QB64's _LOADFONT parameters, but notice that BOLD and ITALIC parameters mostly have no effect, as there is usually a separate font file rendered with such attributes for different fonts.
|
||||
* MONOSPACE will work to load a font with all characters having the same _FONTWIDTH.
|
||||
|
||||
You can also use QB64's builtin fonts (_FONT 16 or _FONT 8). To do so, specify only the FontSize% parameter:
|
||||
|
||||
Control(ControlID).Font = SetFont("", 8, "")
|
||||
Control(ControlID).Font = SetFont("", 16, "")
|
||||
|
||||
To specify a font at design time, use the following syntax in the editor:
|
||||
|
||||
fontfile*attributes*size
|
||||
|
||||
The default font for controls is:
|
||||
|
||||
segoeui.ttf**12
|
||||
|
||||
If you don't set a control's font property, it will inherit its container's font (either the main form or a frame, if any).
|
||||
|
||||
## Controls that can use the Font property:
|
||||
* [[Button]]
|
||||
* [[Label]]
|
||||
* [[Textbox]]
|
||||
|
|
Loading…
Reference in a new issue