mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-06 00:00:22 +00:00
6912727753
Help file snapshot as of 07/31/2022.
28 lines
1,022 B
Plaintext
28 lines
1,022 B
Plaintext
{{QBDLDATE:07-31-2022}}
|
|
{{QBDLTIME:23:37:50}}
|
|
{{DISPLAYTITLE:_FONTWIDTH}}
|
|
The [[_FONTWIDTH]] function returns the font width of a MONOSPACE font handle created by [[_LOADFONT]].
|
|
|
|
|
|
{{PageSyntax}}
|
|
:{{Parameter|pixelWidth%}} = [[_FONTWIDTH]][({{Parameter|fontHandle&}})]
|
|
|
|
|
|
* Returns the character width of the last font used if a handle is not specified.
|
|
* '''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}}
|
|
*[[_FONTHEIGHT]]
|
|
*[[_FONT]]
|
|
* [[_LOADFONT]]
|
|
* [[_PRINTWIDTH]]
|
|
|
|
|
|
{{PageNavigation}}
|
|
|
|
[[Category:Latest]]
|