UI module

set_scale

procedureextensionexperimentalsince 0.31.0Source

Set the device scale; glyphs rasterized at another scale stay in the cache under their own size.

Example↗
ui := headless();
defer free_ui(*ui);
set_scale(*ui.text, 2);  // a Retina display
set_scale :: (text: *Text_System, scale: float)

Set the device scale; glyphs rasterized at another scale stay in the cache under their own size.

Parameters

text: *Text_System
the text system to change.
scale: float
device pixels per point. Values under 0.25 are raised to 0.25.
Example↗
ui := headless();
defer free_ui(*ui);
set_scale(*ui.text, 2);  // a Retina display

See also