Skip to content

leekangsan/kanji-sod-svg

 
 

Repository files navigation

Kanji-sod-svg
This repository is part of the project found at http://kanjisod.kicks-ass.net

The repository consists of 2 directories 
	base-character-images : This directory contains all the glyphs from a chinese font extracted into individual svg files. Each file contains only 1 path. The files are 1000px by 1000px. Despite this large canvas size, the files themselves are less than 4K.
	completed-sod-svg-files : this directory contains the completed stroke order images in svg format. Each image follow a strict yet simple format. The format is described in more detail below. 

Programs :
	sod2png - This is a C program that takes a svg file input and modifies it according to user selected options.
		- You may remove the arrows, numbers or start marks from the files.
		- You may currently output to either sag or png

Scripts :
	kdc - this short bash script is for removing the non-Japanese kanji from the repo.
		- Just type ./kdc <kanji>
		- It deletes the kanji from the base-character-images and commits the change with the comment "removed non-japanese kanji <kanji>"

The files are in svg format. These files should validate under svg 1.1 specifications which can be found at http://www.w3.org/TR/SVG/

The files should be layed out as follows

The bottom layer should contain only the complete unaltered glyph.

Each stroke of the kanji should be represented by a group of 4 layers.
The bottom most layer of the group should contain the stroke path only, in black (RGB #000000)
Above that is the Start mark layer. This should be a single circle path that fits just inside the bounds of the stroke path. It should be coloured green (RGB #00FF00)
Above that should be an arrow path indicating the direction of the stroke. This line should have a stroke with of 12px and be coloured red (RGB #FF0000)
The top layer of the group should contain a text number, at 72px (or closest size for fit). The number should be placed next to the arrow on the level below. It should be blue (RGB #0000FF).

Each layer should have it's id/name set for what it contains
for example, the first stroke in a kanji should be represented as described below:

layer -- > 1 (#0000FF)
layer --> Arrow (#FF0000)
layer --> Start Mark (#00FF00)
layer --> Stroke (#000000)

Each stroke should be layered atop the one that proceeded it.

ie.
stroke 4
stroke 3
stroke 2
stroke 1
kanji


About

Japanese stroke order of kanji images in svg files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 94.3%
  • Makefile 3.5%
  • Objective-C 1.9%
  • Other 0.3%