
When you consistently write a Chinese character in the same stroke order, you’re building muscle memory. Those who have the habit of writing “o” counterclockwise will be more efficient at forming words from left to write, especially if writing in cursive.įor children who are learning to write Chinese characters, understanding the correct stroke order sequence makes writing more efficient. But eventually, single letters will combine into words. Some kids instinctively write their “o” counterclockwise while others move their pencil clockwise. Let’s use the English alphabet as an example. And just like washing our hands, we’re more likely to follow Chinese stroke order if we can understand why it’s helpful.

The project page has more information on the format.What’s the point? Why can’t I just write Chinese in any order? These are questions my children have asked, and to be honest, I’ve wondered this as well.Īuthoritative replies like “this is the way Chinese people have been writing for centuries” aren’t going to motivate many people. The dictionary also contains character decomposition data in an interesting format, derived from Unihan and CJKLib. To ascertain which part of the paths represent the radical, one may do a lookup in dictionary.txt.

The stroke information is in SVG path format, using quadratic bezier curves. Also, unlike the ZDT data, a single path defines a single stroke. The 'make me a hanzi demo' path data (graphics.txt) does not contain stroke direction information. It records the direction of stroke, whether the current path is the final part of a stroke or part of the initial paths of a stroke and whether the current path is part of a radical. The prefix format is explained well by Chase. Regarding the differences between the two data formats used by the projects above, the ZDT format may include multiple paths for a single stroke, in cases where the direction of stroke changes mid stroke. Update: You also need to replace tabs with semi-colons and add a final semi-colon first. Nicely done Chase! To draw a new stroke, you can grab zdtStrokeData.txt from the first project mentioned here, then cut and paste the paths for the stroke you want to draw over the string where the 'strokes' array is defined (currently line 291).
Hanzi stroke order code#
One more i've come across that uses the same data format as ZDT but which doesn't reveal license terms is worth mentioning, as the code is brief and easy to follow. If you would prefer to render the characters algorithmically, you may wish to explore some of the other branches, such as demo (check the lib sub-folder) and tools (which seems to be where recent developments are taking place).

At present, the main things of interest on the master branch are the two data files graphics.txt and dictionary.txt and a complete collection of animated SVG's of the characters.
Hanzi stroke order free#
This data was extracted from two free chinese fonts using a semi-automated algorithmic approach.

It contains stroke animations for 9507 characters (includes traditional chars). As of, it is also able to show radicals in different colors, based on data in make me a hanzi demo.Īnother great recent project is make me a hanzi demo. Update: Recently, the library has been made significantly smaller. It uses javascript to draw and animate the strokes, directly from json versions of the character path data. One is hanzi writer, which was based on the data for 3195 strokes contained in ZDT but now uses the more complete character data from make me a hanzi demo. There are some recent open source efforts that have opened this up a bit.
