Skip to content

RequestFont

Narta Xaymar Dirks edited this page Oct 31, 2026 · 5 revisions
BlitzPlus

RequestFont

RequestFont:Int32

Returns: A font handle, or 0 if cancelled.

Description

Opens a font picker and gives a font that was chosen, or 0 if the user cancelled. The font works with SetFont, SetGadgetFont and FontName.

Differences

  • Only the size can be picked, from 8 to 32 points in a list, and the result is always the built-in font. There is no font name, bold, italic or underline choice, and no preview. The picker is drawn by the runtime inside the program's active window (the window of Graphics where there is none).

Examples

Graphics 480, 360, 32, 2
win   = CreateWindow("Fonts", 20, 20, 300, 120, Desktop(), 3)
label = CreateLabel("The quick brown fox", 10, 10, 270, 50, win)
font = RequestFont()
If font Then SetGadgetFont label, font
Repeat
Until WaitEvent() = $803

Media

RequestFont

Related Commands

RequestColor, RequestDir, RequestedRed, RequestFile

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally