FONTWIDTH (function): Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:_FONTWIDTH (function)}}
{{DISPLAYTITLE:_FONTWIDTH (function)}}
 
The '''_FONTWIDTH''' function returns the point-size width of a monospace font.
The [[_FONTWIDTH (function)|_FONTWIDTH]] function returns the point-size width of a monospace font.




{{PageSyntax}}
{{PageSyntax}}
:<code>''result&'' = [[_FONTWIDTH (function)|_FONTWIDTH]]({{Parameter|fontHandle&}})</code>
: {{Parameter|result&}} = [[_FONTWIDTH (function)|_FONTWIDTH]]({{Parameter|fontHandle&}})




Line 11: Line 10:
* If {{Parameter|fontHandle&}} is omitted, it is assumed to be the font of the current write page.
* If {{Parameter|fontHandle&}} is omitted, it is assumed to be the font of the current write page.
* If {{Parameter|fontHandle&}} is an invalid handle, an [[ERROR Codes|invalid handle]] error is thrown.
* If {{Parameter|fontHandle&}} is an invalid handle, an [[ERROR Codes|invalid handle]] error is thrown.
* If the font specified by {{Parameter|fontHandle&}} is not a monospace font, 0 (zero) is returned.
* If the font specified by {{Parameter|fontHandle&}} is not a monospace font, ''zero(0)'' is returned.





Latest revision as of 00:34, 18 November 2024

The _FONTWIDTH function returns the point-size width of a monospace font.


Syntax

result& = _FONTWIDTH(fontHandle&)


Description

  • If fontHandle& is omitted, it is assumed to be the font of the current write page.
  • If fontHandle& is an invalid handle, an invalid handle error is thrown.
  • If the font specified by fontHandle& is not a monospace font, zero(0) is returned.


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link