Skip to main content

SVG Text to Path / Outline - Complete Guide

Convert text to vector outlines for advanced animation, styling control, and font-independent rendering. This guide covers the Text Outliner feature for transforming editable text into SVG paths.


Overview

The Convert to Outlines feature transforms text objects into vector paths. This is essential for:

  • Draw-in animations - Hand-drawn text reveal effects
  • Font independence - Export without font embedding concerns
  • Advanced styling - Apply gradients, patterns, and path effects
  • Precision control - Edit individual letter shapes
TEXT OUTLINING WORKFLOW
┌─────────────────────────────────────────────────────────────────────────┐
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ HELLO │ ───▶ │ Outliner │ ───▶ │ ▓▓▓▓▓▓▓▓ │ │
│ │ (Text) │ │ Engine │ │ (Paths) │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │
│ Editable text svg-text-to-path Vector outlines │
│ │
└─────────────────────────────────────────────────────────────────────────┘

Convert to Outlines Panel

Location

Select a text object → Inspector Panel → Convert to outlines section

Interface

┌──────────────────────────────────────────────────────────────────────┐
│ Convert to outlines │
├──────────────────────────────────────────────────────────────────────┤
│ │
│ Create editable paths │
│ │
│ [ Preview ] [ Convert ] │
│ │
└──────────────────────────────────────────────────────────────────────┘

Controls

ButtonDescription
PreviewShows outline preview before converting
ConvertConverts text to vector paths

Preview Panel

┌──────────────────────────────────────────────────────────────────────┐
│ Outline preview │
├──────────────────────────────────────────────────────────────────────┤
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ │ │
│ │ ▓▓▓▓ ▓▓▓▓ ▓ ▓ ▓▓▓▓ │ │
│ │ ▓ ▓ ▓ ▓ ▓ ▓ ▓ │ │
│ │ ▓▓▓▓ ▓▓▓ ▓ ▓ ▓ ▓ │ │
│ │ ▓ ▓ ▓ ▓ ▓ ▓ ▓ │ │
│ │ ▓ ▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓▓▓ │ │
│ │ │ │
│ │ "HELLO" as outlined paths │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
└──────────────────────────────────────────────────────────────────────┘

Conversion Process

Step-by-Step

CONVERSION PIPELINE
┌─────────────────────────────────────────────────────────────────────────┐
│ │
│ 1. SELECT TEXT │
│ ┌───────────────┐ │
│ │ Hello! 👋 │ ← Click text object │
│ └───────────────┘ │
│ │ │
│ ▼ │
│ 2. CLICK "PREVIEW" (Optional) │
│ ┌───────────────────────────────────────────────┐ │
│ │ Preview shows what outlines will look like │ │
│ └───────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ 3. CLICK "CONVERT" │
│ ┌───────────────────────────────────────────────┐ │
│ │ • Font loaded from project fonts │ │
│ │ • svg-text-to-path engine processes text │ │
│ │ • Glyph outlines extracted as SVG paths │ │
│ └───────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ 4. RESULT │
│ ┌───────────────────────────────────────────────┐ │
│ │ ✓ Text replaced with SVG path group │ │
│ │ ✓ Original transform/position preserved │ │
│ │ ✓ Fill/stroke colors maintained │ │
│ │ ✓ "Outlined text" badge shown │ │
│ └───────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────┘

What Happens During Conversion

StepDescription
Font LoadingRequired font file loaded from project fonts
Text ParsingText content, size, weight, style extracted
Glyph TracingEach character converted to vector path
Path AssemblyPaths grouped preserving layout
Store UpdateText object replaced with outlined paths

Supported Fonts

The outliner supports these bundled fonts:

Sans-Serif Fonts

FontWeightsUse Case
Noto SansVariable (100-900)Multi-language support
MuktaExtraLight, Regular, MediumClean modern text
HindLight, Regular, BoldUI and body text

Serif Fonts

FontWeightsUse Case
Noto SerifVariable (100-900)Formal documents

Display/Script Fonts

FontWeightsUse Case
Jumps WinterRegularPlayful headlines
KalamRegular, BoldHandwritten style

Devanagari Fonts

FontWeightsUse Case
Noto Sans DevanagariVariableHindi/Sanskrit UI
Noto Serif DevanagariVariableHindi/Sanskrit formal
Tiro Devanagari HindiRegular, ItalicHindi body text
tip

For best results, use bundled fonts. Custom fonts may not outline correctly if the font file is not available.


What Gets Preserved

Properties Maintained

PRESERVED PROPERTIES
┌─────────────────────────────────────────────────────────────────────────┐
│ │
│ ORIGINAL TEXT OUTLINED PATHS │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ Position (x,y) │ ═══════▶ │ Position (x,y) │ ✓ Preserved │
│ │ Fill color │ │ Fill color │ ✓ Preserved │
│ │ Stroke color │ │ Stroke color │ ✓ Preserved │
│ │ Stroke width │ │ Stroke width │ ✓ Preserved │
│ │ Opacity │ │ Opacity │ ✓ Preserved │
│ │ Transform │ │ Transform │ ✓ Preserved │
│ │ Layer order │ │ Layer order │ ✓ Preserved │
│ └─────────────────┘ └─────────────────┘ │
│ │
│ LOST AFTER CONVERSION │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ • Editable text content (becomes fixed paths) │ │
│ │ • Font family (embedded in path shapes) │ │
│ │ • Font size changes (must scale paths instead) │ │
│ │ • Text alignment adjustments │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────┘

Path Structure

Each character becomes one or more paths:

OUTLINED TEXT STRUCTURE
┌─────────────────────────────────────────────────────────────────────────┐
│ │
│ "Aa" │
│ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ paths: [ │ │
│ │ { id: "text-1-outline-0", d: "M10 20 L..." }, ← 'A' │ │
│ │ { id: "text-1-outline-1", d: "M50 20 L..." }, ← 'a' │ │
│ │ ] │ │
│ │ │ │
│ │ Each path includes: │ │
│ │ • d: SVG path data │ │
│ │ • fill: inherited fill color │ │
│ │ • stroke: inherited stroke color │ │
│ │ • strokeWidth: inherited width │ │
│ │ • fillRule: 'nonzero' or 'evenodd' │ │
│ │ • len: total path length (for draw animation) │ │
│ │ • bbox: bounding box {x, y, width, height} │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────┘

Use Cases

1. Draw-In Animation

Convert text to paths for hand-drawn reveal effect:

DRAW-IN ANIMATION WORKFLOW
┌─────────────────────────────────────────────────────────────────────────┐
│ │
│ 1. Create text → 2. Convert to outlines → 3. Enable Draw-In │
│ │
│ ┌──────────┐ ┌──────────────────┐ ┌──────────────────────┐ │
│ │ Hello │ ─▶ │ ▓▓▓▓▓ (paths) │ ─▶ │ ✋ draws "Hello" │ │
│ │ (text) │ │ │ │ with pen tool │ │
│ └──────────┘ └──────────────────┘ └──────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────┘

2. Gradient Fill

Apply gradient to text (not possible with editable text):

GRADIENT TEXT
┌─────────────────────────────────────────────────────────────────────────┐
│ │
│ Before: "HELLO" (solid fill) │
│ After: "HELLO" (gradient fill from blue to purple) │
│ │
│ ░░░▒▒▒▓▓▓███████▓▓▓▒▒▒░░░ │
│ H E L L O │
│ │
└─────────────────────────────────────────────────────────────────────────┘

3. Font-Free Export

Export animations without font embedding issues:

Without OutliningWith Outlining
Font file requiredNo font required
Text may render differentlyAlways renders correctly
Larger file if embeddingPaths self-contained

Status Messages

Success

┌──────────────────────────────────────────────────────┐
│ ✓ Text converted to outlines. Undo with Ctrl+Z. │
└──────────────────────────────────────────────────────┘

Partial Success

┌─────────────────────────────────────────────────────────────────────────┐
│ ⚠ Some characters are not supported by the current outline font │
│ and were skipped. │
└─────────────────────────────────────────────────────────────────────────┘

Error

┌──────────────────────────────────────────────────────┐
│ ✕ Could not convert text to outlines │
│ (no paths produced). │
└──────────────────────────────────────────────────────┘

Undo/Redo

Conversion is a single atomic operation:

ActionKeyboardEffect
UndoCtrl+Z / ⌘+ZRestores original editable text
RedoCtrl+Shift+Z / ⌘+Shift+ZRe-applies outlined paths
note

After undo, your original text is restored exactly as before - all editing capabilities return.


Inspector Badge

After conversion, outlined paths show a badge:

OUTLINED TEXT BADGE
┌──────────────────────────────────────────────────────────────────────┐
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ 📐 SVG Path [ OUTLINED TEXT ] │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
│ Mode [ Standard ▼ ] │
│ Speed [ Duration ▼ ] [ 1 ] │
│ Stroke [ ████ ] Width [ 1 ] │
│ │
└──────────────────────────────────────────────────────────────────────┘
tip

The "OUTLINED TEXT" badge is runtime-only and helps identify converted text. After project reload, outlined paths appear as regular SVG paths.


Limitations

Selection Rules

SelectionConvert Available?
Single text object✅ Yes
Multiple text objects❌ No (select one at a time)
Mixed selection (text + shapes)❌ No
Non-text object❌ No

Font Support

ScenarioBehavior
Bundled font✅ Full outline support
Web font (Google Fonts)⚠️ Requires font URL access
System font⚠️ May fallback to sans-serif
Custom uploaded font⚠️ Depends on font file format

Character Support

CharactersSupport
Latin A-Z, a-z✅ Full
Numbers 0-9✅ Full
Common punctuation✅ Full
Devanagari (Hindi)✅ Full (with Devanagari fonts)
Emoji⚠️ Limited
Complex scripts⚠️ Varies by font

Performance

Guidelines

Text LengthExpected TimeNotes
< 50 chars< 50msInstant
50-200 chars50-200msFast
200-400 chars200-500msAcceptable
> 400 chars500ms+Consider splitting text
warning

For very long text (400+ characters), consider splitting into multiple text objects before converting. Large conversions may cause brief UI lag.

Worker Execution

The outliner runs in a Web Worker to avoid blocking the UI:

WORKER ARCHITECTURE
┌─────────────────────────────────────────────────────────────────────────┐
│ │
│ ┌─────────────┐ ┌─────────────────────┐ ┌────────────┐ │
│ │ Main │ ───▶ │ Web Worker │ ───▶ │ Result │ │
│ │ Thread │ │ (svg-text-to-path) │ │ Paths │ │
│ │ │ │ │ │ │ │
│ │ UI stays │ │ Heavy font parsing │ │ Paths │ │
│ │ responsive │ │ + glyph tracing │ │ returned │ │
│ └─────────────┘ └─────────────────────┘ └────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────┘

Technical Details

Data Flow

TEXT TO PATH DATA FLOW
┌─────────────────────────────────────────────────────────────────────────┐
│ │
│ SceneObject (type: 'text') │
│ ├── id: "text-abc123" │
│ ├── content: "Hello World" │
│ ├── fontFamily: "Mukta" │
│ ├── fontSize: 48 │
│ ├── fontWeight: 500 │
│ ├── fill: "#333333" │
│ └── x: 100, y: 200 │
│ │ │
│ ▼ │
│ TextToPathRequest │
│ ├── textNodes: [{ id, content, fontFamily, fontSize, ... }] │
│ │ │
│ ▼ │
│ svg-text-to-path Engine │
│ ├── Load font via ConfigProvider │
│ ├── Parse text → glyph outlines │
│ ├── Generate SVG <path> elements │
│ │ │
│ ▼ │
│ TextToPathResponse │
│ ├── status: 'success' | 'partialSuccess' │
│ ├── results: [{ originalNodeId, pathData, bbox }] │
│ └── diagnostics: { totalGlyphs, durationMs, workerUsed } │
│ │ │
│ ▼ │
│ SceneObject (type: 'svgPath') │
│ ├── id: "text-abc123" (preserved) │
│ ├── paths: [{ id, d, fill, stroke, ... }] │
│ ├── x: 100, y: 200 (preserved) │
│ └── metadata: { outlinedText: true } (runtime only) │
│ │
└─────────────────────────────────────────────────────────────────────────┘

Error Codes

CodeDescription
UnsupportedFontFont file not available or incompatible
MalformedTextNodeText content or properties invalid
ConversionTimeoutConversion took too long
WorkerErrorWeb Worker failed to process

Best Practices

When to Convert

Convert when:

  • You need draw-in animation on text
  • Exporting to platforms without font support
  • Applying gradient/pattern fills
  • Final polish before export

Don't convert when:

  • Text may need future edits
  • Working on draft content
  • Font is already embedded in export

Workflow Tips

  1. Finalize text first - Edit all content before converting
  2. Use Preview - Check outline quality before committing
  3. Keep original - Duplicate layer before converting if unsure
  4. Batch wisely - Convert text objects one at a time

Troubleshooting

Outlines Look Different from Text

  1. Check if using a bundled font
  2. Verify font weight matches (Regular vs Bold)
  3. Preview before converting to compare

Missing Characters

  1. Check if font supports the characters
  2. Use a different font with broader character set
  3. For Hindi text, use Devanagari fonts

Conversion Fails

  1. Check if text object is selected (not group)
  2. Ensure text is not empty
  3. Try a different font
  4. Check browser console for errors

Undo Not Working

  1. Undo immediately after conversion
  2. Check undo history hasn't been cleared
  3. Reload project if undo stack corrupted

File Locations

ComponentPath
Text Outliner Actionfrontend/src/features/properties-panel/TextOutlinerAction.tsx
Outliner Bridgefrontend/src/plugins/text-outliner/textOutlinerBridge.ts
Text-to-Path Servicecore/vector/trunk/services/textToPathService.ts
Environment Portcore/vector/roots/nodes/textToPathRoot.ts
Contractscore/vector/trunk/contracts/textToPathContracts.ts
Implementation Plandocs/features/text-outliner-implementation-plan.md