DrawTextOutlined

Draw text with a 1px outline for readability on any background.

Syntax

Susano.DrawTextOutlined(x, y, text, size_px, r, g, b, a, outR, outG, outB[, outA][, fontId]) -> void

Parameters

x, y (number): Position in pixels.

text (string): The text to render.

size_px (number): Font size in pixels. Pass 0 for the font's default.

r, g, b, a (number): Foreground color. Accepts 0..1 floats or 0..255 integers.

outR, outG, outB (number): Outline color. Accepts 0..1 floats or 0..255 integers.

outA (number, optional): Outline alpha. Default: 1.0.

fontId (number, optional): Font handle from LoadFont/LoadFontFromBuffer.

Return(s)

None

Behavior

Draws 4 offset copies of the text (up, down, left, right by 1px) in the outline color, then draws the foreground text on top. Creates a readable outline effect.

Example(s)

Susano.BeginFrame()
Susano.DrawTextOutlined(100, 100, "Outlined", 20, 255,255,255,255, 0,0,0,255)
Susano.SubmitFrame()