FONTWIDTH - QB64 Wiki

FONTWIDTH

From QB64 Wiki

Revision as of 20:47, 12 February 2012 by Clippy (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The _FONTWIDTH function returns the font width of a MONOSPACE font handle created by _LOADFONT.


Syntax:

pixel_width% = _FONTWIDTH[(font_handle)]


  • Will return width of last font used if a handle is not designated.
  • Variable width fonts always return width 0. Even fixed width fonts will return 0 unless the "MONOSPACE" style option is used.
  • "MONOSPACE" cannot be used on a variable width font.
  • 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:



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page