Skip to content
This repository

Kanji description and vectorial data in correct stroke order

branch: master
Octocat-spinner-32 kanji Remove trailing whitespace in copyright April 02, 2014
Octocat-spinner-32 kanji_mismatch Remove trailing whitespace in copyright April 02, 2014
Octocat-spinner-32 .gitattributes Line ending normalization: git attributes file January 25, 2013
Octocat-spinner-32 .gitignore Merge branch 'ben/use-xml-svg-directories' July 22, 2011
Octocat-spinner-32 COPYING Initial commit November 03, 2009
Octocat-spinner-32 KanjiVG.pm Committed errors found so far with the new script. July 15, 2011
Octocat-spinner-32 README README altered November 03, 2009
Octocat-spinner-32 check-1.0 Various stroke order edits. July 21, 2011
Octocat-spinner-32 check-all-strokes.pl Various stroke order edits. July 21, 2011
Octocat-spinner-32 find-ie.pl Added script for 豕 errors; found one error in 6726 reversed l/r sides July 13, 2011
Octocat-spinner-32 find-radical.pl Added script for 豕 errors; found one error in 6726 reversed l/r sides July 13, 2011
Octocat-spinner-32 find-sanzui.pl Added script for 豕 errors; found one error in 6726 reversed l/r sides July 13, 2011
Octocat-spinner-32 harmonize-svg.py Specify python version in interpreter line December 04, 2010
Octocat-spinner-32 kanjivg.py Remove trailing whitespace in copyright April 02, 2014
Octocat-spinner-32 kvg.py Update copyright September 01, 2013
Octocat-spinner-32 listmissingcomponents.py Explicitly use python2 for scripts April 01, 2012
Octocat-spinner-32 strokes.txt Add possible stroke values file December 27, 2010
Octocat-spinner-32 swap-strokes.py Support script to assist fixing some problems by hand. March 12, 2013
Octocat-spinner-32 template.svg Added copyright information to all files November 04, 2009
Octocat-spinner-32 updatepublic.sh Fix release update script September 01, 2013
Octocat-spinner-32 viewer.py Some more work with fancy renderer December 31, 2010
Octocat-spinner-32 xmlhandler.py Initial commit November 03, 2009
README
This is the KanjiVG source repository. It is rather raw, so you probably want
to process it before using it.

Licence
-------
KanjiVG is copyright Ulrich Apel and released under the Creative Commons
Attribution-Share Aline 3.0 licence:

http://creativecommons.org/licenses/by-sa/3.0/

See the COPYING file for more details.

Description
-----------
This repository is made of two directories: SVG and XML, as well as a set of
Python scripts.

The SVG and XML directories contain the structural and graphical description
of each kanji, respectively. Each Kanji is described by a file in both
directories, named after its unicode encoding in hexadecimal. Variations of
a Kanji are followed by a textual suffix.

The XML file describes the different components and strokes that make the 
kanji in a structured way. In addition, other information such as radicals
and phonetic keys are also given as attributes.

The SVG file guidelines for the graphical representation of various properties
of the Kanji. It is visible as is, but is more interesting when its various
layers are taken differently. Layers are accessible through an attribute:

- The StrokesPaths layer contains <path> elements that should be drawn in
order to render the Kanji. The <path> elements are given following the
correct stroke order and match their corresponding <stroke> element in the XML
description.
- The StrokesNumbers layer contains <text> elements that give a hint as to
where the number of a given stroke should appear for maximum visibility.

There are other layers but they are mostly here as helpers to allow easy
editing within your favorite SVG editor.

The official KanjiVG release is a single XML file that merges the information
contained within the two sets of files. Its syntax is close and compatible with
the individual XML files, but stroke paths and stroke number hints are merged
with every path.

The Python scripts are here to maintain the data and perform simple processing.
- The xmlhandler.py and kanjivg.py files contain a loader for the KanjiVG 
release file and different in-memory representations.

- harmonize-svg.py is used to ensure all SVG files have the same structure and
same attributes despite of the editor that has been used to alter them. SVG
editors tend to mess a lot with the styles and the structure of the file they
manipulate and add plenty of attributes. This script loads the essential
information from altered SVG files and regenerate a clean file from the
template.svg file. All changed SVG files must be passed through this filter
before being commited.


Something went wrong with that request. Please try again.