Skip to content

FontHeight

Claude edited this page Oct 27, 2026 · 5 revisions

Blitz3DBlitzPlusBlitzBasic

FontHeight

FontHeight:Int32

Returns: The height of a character in pixels.

Description

The height in pixels of a character of the current font, as set by SetFont. Use it to place lines of text below each other.

Differences

  • The height is the height that was requested, as with Windows fonts. For a font that is not found, the built-in bitmap font is used, where FontWidth is the same number.

Examples

Graphics 320, 240, 0, 2
SetBuffer BackBuffer()
Cls
Local small = LoadFont("Arial", 8)
Local big = LoadFont("Arial", 24)
SetFont small
Text 10, 10, "Small: " + FontWidth() + " x " + FontHeight()
SetFont big
Text 10, 40, "Big: " + FontWidth() + " x " + FontHeight()
Flip
WaitKey

Related Commands

FontWidth, FreeFont, LoadFont, SetFont, StringHeight

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally