1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 15:00:38 +00:00
QB64-PE/internal/help/_FONTWIDTH.txt

25 lines
961 B
Plaintext
Raw Normal View History

2016-03-18 11:36:04 +00:00
{{DISPLAYTITLE:_FONTWIDTH}}
2017-10-10 14:55:21 +00:00
The [[_FONTWIDTH]] function returns the font width of a MONOSPACE font handle created by [[_LOADFONT]].
{{PageSyntax}}
2017-10-10 14:55:21 +00:00
:{{Parameter|pixelWidth%}} = [[_FONTWIDTH]][({{Parameter|fontHandle&}})]
2017-10-10 14:55:21 +00:00
* Returns the character width of the last font used if a handle is not specified.
2019-04-15 01:15:33 +00:00
* '''Variable width fonts always return {{Parameter|pixelWidth%}} = 0.''' Even fixed width fonts return 0 unless the [[LOADFONT|"MONOSPACE"]] style option is used.
* QB64 '''version 1.000 and up''' can load a variable width font as monospaced with the [[LOADFONT|"MONOSPACE"]] style parameter.
* The font width is generally 3/4 of the [[_FONTHEIGHT]] specified when loading the font.
* In '''graphics''' [[SCREEN (statement)|screen]] modes, [[_PRINTWIDTH]] can return the total '''pixel width''' of a literal or variable [[STRING|string]] of text.
{{PageSeeAlso}}
2016-03-18 11:36:04 +00:00
*[[_FONTHEIGHT]]
*[[_FONT]]
* [[_LOADFONT]]
* [[_PRINTWIDTH]]
2019-04-15 01:15:33 +00:00
{{PageNavigation}}
<