Blitz3D+ Command Reference

SetGadgetFont gadget,font

Parameters

gadget - gadget whose font to change

font - font handle from LoadFont or RequestFont

Description

Sets the font a gadget uses for its text.

Requires Extended language mode.

Gadgets start with the standard Windows UI font at the right size for the monitor's DPI, which is what most tools should keep. Change it for the cases that earn it: a fixed-width font for a log or code pane, or a bigger label for a headline in a launcher.

The font must be a system font - one from LoadFont or RequestFont. Font sheets loaded with LoadFontSheet are for 2D Text drawing only, and passing one here stops with a runtime error saying native gadgets require a system font.

The change applies to that one gadget (children keep their own fonts), and GadgetFont reads back an equivalent handle.

See also: GadgetFont, SetTextAreaFont, RequestFont, LoadFont.

Index