Skip to content
Apexify.jsDocs
Apexify.js version v5.4.5

Node / Text Rendering · guide

Glow, shadow & stroke

Current Apexify.js 6.0.0 documentation for Glow, shadow & stroke.

apexify.jsRuntime: nodeCURRENTSince 6.0.0

Group halo/shadow under effects (effects.glow, effects.shadow) — legacy top-level glow / shadow still merge (resolveTextEffects).

Per straight line, renderEnhancedTextLine composites in this order — details in Paint order:

highlight → glow → shadow → stroke → fill → decorations

Arc mode repeats the same ordering per grapheme in local tangent space (renderRotatedGlyph).


Glow — effects.glow

KeyRole
colorshadowColor when gradient omitted (default #ffffff vibe via blur stack).
gradientTwo-pass fillText: blurred halo using placeholder shadow colour, then gradient fillText overlay (renderTextGlow).
intensityMaps to shadowBlur pixels (default 10).
opacityglobalAlpha during glow passes (default 0.8).

Glow fillText runs before the main renderTextFill — final glyph colour always comes from the dedicated fill pass.


Shadow — effects.shadow

Uses Canvas shadow properties (not the same shape as ShadowOptions on createImage).

KeyDefaultNotes
colorrgba(0,0,0,0.5)shadowColor without gradient.
gradient—Builds horizontal gradient; shadowColor borrows first stop tint for blur composite.
offsetX, offsetY2shadowOffsetX / shadowOffsetY.
blur4shadowBlur.
opacity1 when colour-onlySets globalAlpha when provided.

Stroke — stroke

KeyRole
colorstrokeStyle fallback (#000000).
widthlineWidth (default 1).
gradientHorizontal gradient across measured advance (gx0 → gx1).
opacityglobalAlpha during strokeText passes.
stylesolid, dashed, dotted, groove, ridge, double — dashed/dotted dash gaps scale with stroke width; groove/ridge/double multi-pass (renderComplexTextStroke).
SOURCEtypescript
typescript
Studio
await painter.createText(  {    text: 'Outlined headline',    x: 64,    y: 160,    font: { size: 52, family: 'Arial' },    stroke: { color: '#0f172a', width: 3, style: 'solid', opacity: 1 },    effects: {      shadow: { offsetX: 0, offsetY: 6, blur: 14, opacity: 0.4, color: '#020617' },    },    fill: { color: '#f8fafc' },  },  buffer);

Next steps