FONTWIDTH: Difference between revisions
Jump to navigation
Jump to search
Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link
No edit summary Tag: Reverted |
No edit summary Tag: Manual revert |
||
Line 22: | Line 22: | ||
{{PageNavigation}} | {{PageNavigation}} | ||
Revision as of 17:37, 25 November 2022
The _FONTWIDTH function returns the font width of a MONOSPACE font handle created by _LOADFONT.
Syntax
- 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 "MONOSPACE" style option is used.
- QB64 version 1.000 and up can load a variable width font as monospaced with the "MONOSPACE" style parameter.
- The font width is generally 3/4 of the _FONTHEIGHT specified when loading the font.
- In graphics screen modes, _PRINTWIDTH can return the total pixel width of a literal or variable string of text.
See also