A C++11 implementation of the KAGE ("shadow") engine, based on ge9's modified KAGE engine. It generates glyph outlines from KAGE stroke data and reusable component references. The project is licensed under GPL-3.0; see LICENSE.
- Fits curved strokes with cubic Bezier curves instead of approximating them with segmented polylines.
- Improves serif details and hooks on vertical, sweep, and horizontal strokes.
- Fixes negative adjustment rendering and rotation/flip handling in the Gothic renderer.
- Provides per-stroke separated rendering for selection and editing workflows.
- Exports rendered outlines to SVG and FontForge SFD.
The project requires CMake 3.15 or newer and a C++11 compiler.
cmake -S . -B build
cmake --build build --target KageCppTest --parallel 2The optional kage_cpp pybind11 module exposes the glyph-engine core. It does not include the HTTP server and does not require SQLite, Crow, librsvg, or Cairo. The Python target is disabled by default.
Building the Python module requires CMake 3.18 or newer, a C++11 compiler, the development headers for the selected Python interpreter, and pybind11's CMake package. Use matching Python, compiler, and target architectures.
cmake -S . -B build-python `
-DKAGE_BUILD_PYTHON=ON `
-DPython3_EXECUTABLE=C:/path/to/python.exe `
-Dpybind11_DIR=C:/path/to/pybind11/cmake
cmake --build build-python --target KagePython --parallel 2The extension is written to build-python/python. On Windows, a MinGW build also needs its runtime DLLs to be discoverable, for example by adding the MinGW bin directory to PATH or placing the required DLLs beside the .pyd. Import the module with the same Python version and architecture used to build it:
$env:PYTHONPATH = "$PWD\build-python\python;$env:PYTHONPATH"
python -c "import kage_cpp; print(kage_cpp)"Example:
import kage_cpp
engine = kage_cpp.Engine(kage_cpp.FontType.MINCHO)
engine.set_buhin("u4e00", "1:0:0:20:100:180:100")
svg = engine.render_svg("u4e00")
strokes = engine.extract("u4e00")
status = engine.check("u4e00")Engine also provides local component storage, lookup, deletion and export, glyph validation, stroke extraction, and render_data_separated for rendering outlines grouped by input data line. Module-level helpers include parse, serialize, bounding-box calculation, and SVG/SFD export. See the Python binding reference for the full API.
The project is distributed under GPL-3.0. Glyph data generated from GlyphWiki is subject to GlyphWiki's own terms; see its copyright and license information. The repository includes utfcpp.