.NEL[CCC5]

nu-Edenian Language

CONSTRUCTED LANGUAGE // SPEC: CCC5 // TYPE: ISOLATE // SCRIPTS: KANJI + KANA + HANGUL + ZHUYIN
IN PROGRESS
EDENIAN TECHLANGUAGE SYSTEMS

nu-Edenian Technical Archive

GLYPH ENGINE, GENERATION LOGIC, DESIGN RATIONALE, AND CCC5 MATERIAL
ARCHIVE ACTIVE
kage_system_spec.ne

//KAGE System

This article is about the technical KAGE engine architecture. For , see .

Overview

The KAGE (Kanji Automatic Glyph Engine) is a stroke-based vector glyph rendering system ported from JavaScript to TypeScript. It converts stroke data strings into SVG polygon outlines suitable for display on the web.

Stroke Data Format

Each stroke is encoded as an 11-tuple:

data_block
type:startOpt:endOpt:x1:y1:x2:y2:x3:y3:x4:y4

Multiple strokes are concatenated with $ delimiters to form complete glyph data:

data_block
1:0:0:10:20:190:20:0:0:0:0$1:0:0:100:10:100:190:0:0:0:0

Stroke Types

TypeNameDescription
1STRAIGHTLine from (x1,y1) to (x2,y2)
2CURVEQuadratic Bézier with control point
3BENDINGTwo connected straight segments
4BENDING_ROUNDRounded bending stroke
6BEZIERCubic Bézier curve
7VCURVEVertical curve with control points
99REFERENCEComponent reference (buhin lookup)

Start/End Decorations

Start and end options control how stroke terminals are rendered — connecting lines to adjacent strokes, corner treatments, sweep directions, and stop marks.

Rendering Pipeline

data_block
Stroke data string
  → Parse (split by $, extract 11-tuples)
  → StrokeData arrays
  → Font renderer (Mincho or Gothic)
  → Polygon outlines
  → SVG path data
  → Inline <svg> element

Font Renderers

Mincho (Default)

Variable-width calligraphic renderer (~850 lines). Produces strokes with traditional brush-style decoration:

  • Uroko (鱗) — Fish-scale serifs at stroke ends
  • Kakato (踵) — Heel marks at corners
  • Hane (跳ね) — Upward flicks
  • Mage (曲げ) — Decorative bends

Supports 4 size presets and 5 named weights. The default renderer for all edenji display.

Gothic

Uniform-width stroke renderer. Produces clean, even strokes without calligraphic decoration. Used for technical display, small sizes, and UI elements.

Component System (Buhin)

The Buhin (部品) system stores reusable stroke components. When a stroke with type 99 (REFERENCE) is encountered, the engine:

  1. Looks up the referenced component name
  2. Retrieves its stroke data
  3. Applies bounding-box transformation (scale + translate) to fit the reference into the target region
  4. Recursively processes the referenced strokes

This enables efficient component reuse — a radical defined once can appear at any size in any layout slot.

Coordinate System

All glyph coordinates exist in a 200×200 grid. Stroke positions, control points, and bounding boxes are specified in this coordinate space. The final SVG is scaled to display size.

Key Modules

ModulePurpose
kage.tsMain engine class — makeGlyph, stroke parsing, buhin resolution
mincho.tsMincho font renderer with calligraphic decoration
gothic.tsGothic font renderer with uniform strokes
polygons.tsPolygon collection with SVG generation
polygon.tsIndividual polygon path builder
buhin.tsComponent storage and lookup
fontcanvas.tsDrawing primitives (~25 geometric operations)
bezier.tsVariable-width Bézier stroke outlines
fitcurve.tsSchneider's least-squares cubic curve fitting
2d.tsLine intersection and crossing detection
util.tsMath utilities, seeded random, hashing
pointmaker.tsVector/direction helpers for stroke construction
types.tsCore type definitions
NU-EDEN.VERSE v.0.9.1nERF-NET v1.4.3
◆ SECURE CHANNEL═══════════════