Docsv2.12.12
Back to API Reference
Class

OutlineModifier

Applies an outline effect by appending duplicate glyph geometry behind the face. Supports both solid colour and per-vertex gradient outlines via an optional IGradientProvider.

Remarks

Tag format (strictly positional — empty slots fall back to defaults, matching GradientModifier): <outline=color-or-gradient,dilate,shape,angle>. <outline> — defaults: colour = #000000FF, dilate = 0.2. <outline=#ff0000> — red, default dilate. <outline=,0.3> — default colour, custom dilate (note the leading comma). <outline=#ff0000,0.3> — both. <outline=rainbow> — gradient (when Provider is set). <outline=rainbow,0.3,radial,45> — gradient + dilate + shape + angle. <outline=rainbow,,radial,45> — gradient, default dilate, radial, 45°. Slot 0 resolves as a gradient name first (when Provider is set and the token matches a known gradient) and falls back to colour parsing otherwise — so existing colour tags keep working unchanged when a provider happens to be attached. Shape accepts linear/l, radial/r, angular/a.
public bool FixedPixelSize{ get; set }

When, dilate is interpreted in fixed pixels and compensated by the glyph's gradientScale so the outline has a constant on-screen thickness independent of font size. Default — dilate scales with the glyph SDF padding.

public IGradientProvider Provider{ get; set }

Optional source of named gradients. When non-, a tag-parameter token that resolves to a known gradient renders this outline range as a per-vertex gradient; otherwise the token is parsed as a colour. disables gradient resolution and the modifier behaves purely as a solid-colour outline.

protected override void OnEnable()
protected override void OnDisable()
protected override void OnDestroy()
protected override void ResetOwnRequests()
protected override void OnApply()
protected override void OnGlyphEffect()
protected override void OnEmitQuad()