Smaji Glyph Outline Description
Smaji Glyph Stroke Description
I’d like to introduce two practical applications of the Smaji Glyph Path library: Smaji Glyph Outline Description(god) and Smaji Glyph Stroke Description(gsd). Currently, these aren’t published on opam yet; I’ve just provided the links here as examples of how you can use the Smaji Glyph Path library. If you find these examples helpful, please let me know by replying or giving it a “like”—that’ll let me know there’s interest so I can get them onto opam for better maintenance.
I’ve designed a markup language that makes it very easy to build glyphs by combining different strokes. Thanks to Smaji Glyph Path, creating a glyph is basically like playing with building blocks—you can even generate an animation of the entire writing process!
Check out these examples:
Example 1: Building the “八” character by combining two strokes.
<god version="1.0">
<glyph unicode="516b,0">
<stroke type="t" x="0" y="0" width="56" height="112"/>
<stroke type="p" x="76" y="0" width="56" height="112"/>
</glyph>
</god>
Example 2: Combining an existing “god” (不) and a horizontal stroke (一) to create “丕” (with animation).
<god version="1.0">
<glyph unicode="4e15,0">
<character utf8= "不" x="0" y="0" width="128" height="120"/>
<stroke type="h" x="0" y="114" width="128" height="14"/>
</glyph>
</god>
If this image is still, try to reload the image or open this image in a new tab or window to restart the animation.
After using GOD for a while, I realized it’s actually better suited for phonetic scripts rather than ideograph. Because of that, I designed a new library specifically for ideograph (especially Chinese): Smaji Glyph Stroke Description (GSD).
For a deeper dive into GOD, the differences between it and GSD, and the pros/cons of each use case, check out the links at the beginning. I’ll keep it brief here—feel free to check those out if you’re interested!