Documentation Index
Fetch the complete documentation index at: https://mintlify.com/open-pencil/open-pencil/llms.txt
Use this file to discover all available pages before exploring further.
Overview
OpenPencil is designed to be Figma-compatible, allowing you to work seamlessly with native Figma files and transfer content between applications..fig File Support
OpenPencil can open and save native Figma.fig files using the same Kiwi binary format.
What’s Supported
- Full import/export — Read and write native Figma files
- All node types — Frames, shapes, text, components, instances, sections, groups
- Design properties — Fills, strokes, effects, transforms, constraints
- Auto-layout — Flexbox layouts with gap, padding, alignment
- Components — Main components, instances, overrides, variants
- Variables — Design tokens with modes and collections
- Text styling — Rich text with mixed styles, fonts, line heights
- Vector paths — Pen tool paths with vector networks
- Effects — Shadows, blurs, blend modes
File Format Details
Figma files use the Kiwi binary codec with Zstd compression:Copy & Paste Between Apps
OpenPencil supports clipboard interoperability with Figma:- From Figma to OpenPencil — Select nodes in Figma, copy (Cmd+C), paste in OpenPencil (Cmd+V)
- From OpenPencil to Figma — Select nodes in OpenPencil, copy, paste in Figma
.fig files, ensuring perfect fidelity.
What Transfers
- Node structure and hierarchy
- All visual properties (fills, strokes, effects)
- Layout and constraints
- Text content and styling
- Component instances (references preserved where possible)
Rendering Compatibility
Both OpenPencil and Figma use Skia (CanvasKit WASM) for rendering, providing:- Identical rendering primitives — Same graphics engine
- Text shaping — Same font rendering with Skia’s text engine
- Effects — Shadows, blurs, and blend modes work identically
- Vector paths — Precise path rendering
Known Differences
- Corner smoothing — Figma’s squircle implementation may have minor differences
- Subpixel rendering — Minor rounding differences at fractional coordinates
- Font availability — Results depend on fonts available on your system
Current Limitations
While we aim for 100% compatibility, some features are still in development:- Shader effects (SkSL) — Planned
- Skewing — Planned
- OkHCL color support — Planned
- Advanced prototyping — Basic prototype data is preserved but not fully interactive
Importing Figma Files
Via Desktop App
- Click File → Open (or Cmd+O)
- Select a
.figfile - The file opens in a new document
Via CLI
Exporting to Figma Format
From the Editor
- Click File → Save As (or Cmd+Shift+S)
- Choose
.figformat - Select location and save
From the CLI
Testing Compatibility
To verify that a file renders correctly:- Open the
.figfile in Figma and take a screenshot - Open the same file in OpenPencil
- Compare the visual output
Why Compatibility Matters
Figma’s binary format (.fig) is the de facto standard for design files. By supporting it natively, OpenPencil:
- Preserves your investment — Use existing Figma files without conversion
- Enables migration — Switch tools without losing work
- Supports collaboration — Work with Figma users via file exchange
- Ensures data ownership — Open source tools mean you control your files
Technical Details
OpenPencil’s Figma compatibility comes from:- Kiwi binary codec — 533-definition schema matching Figma’s internal format
- NodeChange structure — 538 fields covering all node properties
- Vector network encoding — Reverse-engineered binary format for paths
- Skia rendering — Same graphics engine (CanvasKit WASM)
- Yoga layout — CSS Flexbox engine for auto-layout
packages/core/src/kiwi/.