| |||||||||||||||||||
HanGlyph — a Chinese Character Descripton LanguageHanGlyph is a Chinese character description language. It is defined based on the historic and contemporary studies of the structure of Chinese characters. The most crucial characteristic of this language is that it is abstract and it captures only the topological relation of the strokes that form a character.
On the other hand, some characters are very similar. For example, the following two characters, 土 and 士, comprise exactly the same strokes and in exactly the same arrangement. The only difference between them is the relative length of the two horizontal strokes. How much longer a horizontal stroke is in these characters is unimportant for distinguishing between them. To recognize the character 土, the threshold is that the upper horizontal stroke must be shorter than the lower one. Therefore, the HanGlyph language does not describe the precise geometric information of the characters.
The strokesStrokes are the primitive building blocks of characters. The set of strokes in HanGlyph consists of 41 shapes. They are based on the modern writing style of Kai (楷書). Their selection is the results of careful study of many Chinese linguistic and graphological works. When writing HanGlyph expressions, it is important to view strokes as abstract entities. For instance, a horizontal stroke (橫) is merely a trajectory whose two ends are at the similar height. The thickness and any possible decoration are irrelevant, they are considered only when the character is rendered. Each primitive stroke is assigned a Latin letter as its code so that users can write HanGlyph expressions using a standard qwerty keyboard easily. All strokes are listed in the stroke table (in pdf format), and their properties are described in Strokes Section of the HanGlyph Language Reference Manual. The operators and relationsTo form a Chinese character, one combines primitive strokes using operations. Five operators are defined as listed in operators table. Each operator combines two operands to form a stroke cluster. This operation continues recursively until the desired character is formed. For example, to describe the character 土, one may first combine two horizontal strokes using the top-bottom operator, then use the cross operator to add a vertical stroke. The HanGlyph expression for this character (written in ASCII characters) is h h=s+. HanGlyph expression is written in postfix notation, i.e., you write the strokes first, then the operator that combines the strokes. A summary of the language can be found here. | |||||||||||||||||||
| Last modified Tuesday, 18-Sep-2012 16:08:35 HKT |