MCPcopy
hub / github.com/gkurt/tegaki

github.com/gkurt/tegaki @0.20.0 sqlite

repository ↗ · DeepWiki ↗ · release 0.20.0 ↗
516 symbols 1,143 edges 132 files 83 documented · 16%
README

Tegaki

Handwriting animation for any font

Tegaki (手書き) turns any font into animated handwriting. No manual path authoring. No native dependencies. Just pick a font.

npm license

Tegaki is awesome handwriting animation


Quick Start

1. Install

npm install tegaki

2. Use (React example)

import { TegakiRenderer } from 'tegaki';
import caveat from 'tegaki/fonts/caveat';

function App() {
  return (
    <TegakiRenderer font={caveat} style={{ fontSize: '48px' }}>
      Hello World
    </TegakiRenderer>
  );
}

That's it. The text draws itself stroke by stroke with natural timing.

Command Line

Don't want to wire up a component? Generate an animated handwriting SVG straight from your terminal — nothing to install:

npx tegaki "Tegaki is awesome"

This writes a self-drawing, looping tegaki-is-awesome.svg — drop it into a README, a slide, or any page. Pick a font, mode, size, or color:

npx tegaki "Hello World" --font tangerine --mode once -o hello.svg
npx tegaki "ABC" --stagger 80% --size 140 --color "#222"

--mode is loop (repeats forever, the default), once (draws itself a single time), or static (finished artwork). Run npx tegaki --help for every option and --list-fonts for the bundled fonts. The CLI emits SVG only — for PNG, GIF, or WebM use the interactive studio.

Framework Support

Tegaki works with all major frameworks:

import { TegakiRenderer } from 'tegaki/react';   // React
import { TegakiRenderer } from 'tegaki/svelte';  // Svelte
import { TegakiRenderer } from 'tegaki/vue';     // Vue
import { TegakiRenderer } from 'tegaki/solid';   // SolidJS
---
import TegakiRenderer from 'tegaki/astro';       // Astro
---
import { TegakiEngine } from 'tegaki/core';      // Vanilla JS
import { registerTegakiElement } from 'tegaki/wc'; // Web Components

Built-in Fonts

Several handwriting fonts are bundled and ready to use:

  • Caveattegaki/fonts/caveat (Latin)
  • Italiannotegaki/fonts/italianno (Latin)
  • Tangerinetegaki/fonts/tangerine (Latin)
  • Parisiennetegaki/fonts/parisienne (Latin)
  • Suez Onetegaki/fonts/suez-one (Hebrew + Latin)
  • Amiritegaki/fonts/amiri (Arabic + Latin)
  • Tillanategaki/fonts/tillana (Devanagari + Latin)
  • Klee Onetegaki/fonts/klee-one (Japanese: kana + Kyōiku grade 1–2 kanji + Latin)
  • Nanum Pen Scripttegaki/fonts/nanum-pen-script (Korean: Hangul syllables + jamo + Latin)

For other fonts, use the interactive studio to create a custom bundle.

Documentation

Visit gkurt.com/tegaki for full documentation:

Integrations

License

MIT

Extension points exported contracts — how you extend this code

UncontrolledShared (Interface)
Fields shared by both speed- and duration-paced uncontrolled modes.
packages/renderer/src/core/types.ts
PipelineResult (Interface)
(no doc)
packages/generator/src/commands/generate.ts
WriteFrameOptions (Interface)
(no doc)
packages/website/src/types/gifenc.d.ts
GlyphStroke (Interface)
(no doc)
scripts/generate-readme-svg.ts
RowProps (Interface)
(no doc)
examples/remotion/src/ScriptsPromo.tsx
Point (Interface)
(no doc)
packages/renderer/src/types.ts
ParsedFontInfo (Interface)
(no doc)
packages/generator/src/commands/generate.ts
GifEncoderInstance (Interface)
(no doc)
packages/website/src/types/gifenc.d.ts

Core symbols most depended-on inside this repo

fmt
called by 52
packages/renderer/src/lib/svgExport.ts
computeTimeline
called by 28
packages/renderer/src/lib/timeline.ts
add
called by 26
packages/renderer/src/lib/timeline.ts
update
called by 18
packages/renderer/src/core/engine.ts
lerp
called by 18
packages/renderer/src/lib/catmullRom.ts
get
called by 16
packages/generator/src/processing/skeletonize/guo-hall.ts
get
called by 16
packages/generator/src/processing/skeletonize/zhang-suen.ts
getEffectDefinition
called by 15
packages/renderer/src/lib/effects.ts

Shape

Function 348
Interface 82
Method 78
Class 8

Languages

TypeScript100%

Modules by API surface

packages/renderer/src/core/engine.ts38 symbols
packages/renderer/src/wc/TegakiElement.ts26 symbols
packages/renderer/src/lib/timeline.ts24 symbols
packages/renderer/src/lib/drawGlyph.ts16 symbols
packages/generator/src/processing/voronoi-medial-axis.ts15 symbols
packages/generator/src/processing/visualize.ts14 symbols
packages/generator/src/processing/trace.ts14 symbols
packages/generator/src/font/enumerate-variants.ts14 symbols
packages/generator/src/commands/generate.ts14 symbols
packages/renderer/src/shaper-harfbuzz/index.ts13 symbols
packages/website/src/components/preview/export.ts11 symbols
packages/renderer/src/lib/effects.ts11 symbols

Dependencies from manifests, versioned

@anthropic-ai/bedrock-sdk0.31.0 · 1×
@astrojs/check0.9.9 · 1×
@astrojs/react6.0.0 · 1×
@astrojs/solid-js7.0.0 · 1×
@astrojs/starlight0.41.1 · 1×
@astrojs/starlight-tailwind5.0.0 · 1×
@astrojs/svelte9.0.0 · 1×
@astrojs/vue7.0.0 · 1×
@biomejs/biome2.5.1 · 1×
@nuxt/kit4.4.8 · 1×
@nuxt/schema4.4.8 · 1×
@playwright/test1.61.1 · 1×

For agents

$ claude mcp add tegaki \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact