forked from Galleondragon/qb64
-
Notifications
You must be signed in to change notification settings - Fork 23
_FONTWIDTH
Cory Smith edited this page Sep 1, 2022
·
3 revisions
The _FONTWIDTH function returns the font width of a MONOSPACE font handle created by _LOADFONT.
pixelWidth% = _FONTWIDTH[(fontHandle&)]
- Returns the character width of the last font used if a handle is not specified.
- Variable width fonts always return pixelWidth% = 0. Even fixed width fonts return 0 unless the LOADFONT style option is used.
- QB64 version 1.000 and up can load a variable width font as monospaced with the LOADFONT style parameter.
- The font width is generally 3/4 of the _FONTHEIGHT specified when loading the font.
- In graphics SCREEN (statement) modes, _PRINTWIDTH can return the total pixel width of a literal or variable STRING of text.