Skip to content
Xerobi Icons

Drawing in Affinity Designer

Set up a 256 by 256 px document, draw with a 16 px centred stroke, export a clean SVG and import it as an icon source file.

Last updated

Affinity Designer exports clean SVG when its settings are right. Menu names vary by version.

1. Set up the document

  1. File > New: units Pixels, 256 × 256 px, DPI 96, color format RGB/8.
  2. Document > Grid and Axis Manager: spacing 16 px, subdivisions 4. Turn on Snapping (to grid, to key geometry) and Force Pixel Alignment off, so you can place curves freely.
  3. Add guides at 32 and 224 on both axes for the live area.

2. Draw

  • Stroke: width 16 px, Align stroke: Center, Cap: Round, Join: Round.
  • Use the Pen, Ellipse and Rounded Rectangle tools. Keep points on whole numbers; rounded rectangles use a radius of 16, or 8 for small parts.
  • Never Layer > Expand Stroke: keep strokes as strokes.
  • Avoid effects, gradients, text, and rasters. Convert text to curves (Layer > Convert to Curves) if the icon truly needs letters.
  • Draw shapes at their final size. If you transform one, apply Layer > Expand or reset so that no shape keeps a transform.

3. Export

File > Export, format SVG, then More and set:

Option Setting
Preset SVG (for export)
Rasterize Nothing
Export text as curves on
Flatten transforms on
Use hex colors any
Set viewBox on
Decimal places 2 or more

The file must have viewBox="0 0 256 256" and presentation attributes rather than a <style> block.

4. Import and check

cd tooling/generator
uv run scripts/icon.py import ~/Documents/lamp.svg lamp-desk -c Objects -t light,desk,office
uv run scripts/icon.py check lamp-desk
uv run scripts/icon.py weights lamp-desk

The import sends stroked shapes to line and filled shapes to area. Review area yourself, using the weights page.