_UFONTHEIGHT

From QB64 Phoenix Edition Wiki
Revision as of 03:19, 30 April 2023 by A740g (talk | contribs) (Add availability)
Jump to navigation Jump to search

The _UFONTHEIGHT function returns the true font height of a font handle created by _LOADFONT.

Syntax

pixelHeight& = _UFONTHEIGHT[(fontHandle&)]

Parameters

  • fontHandle& is an optional font handle.

Description

  • Returns the height of the last font used if a handle is not designated.
  • If no font is set, it returns the current screen mode's text block height.
  • This is different from _FONTHEIGHT as it may return larger values when using scalable fonts.

Availability

Examples

Example: _UFONTHEIGHT vs. _FONTHEIGHT.

DIM fh AS LONG: fh = _LOADFONT("LHANDW.TTF", 23)

PRINT "_FONTHEIGHT ="; _FONTHEIGHT(fh)
PRINT "_UFONTHEIGHT ="; _UFONTHEIGHT(fh)
_FONTHEIGHT = 23
_UFONTHEIGHT = 32

See also


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