Hershey is a textual vector format.
A Hershey vector font is a text file in which each line represents a glyph encoded in five parts:
id[5]: The id of the glyph in decimal.length[3]: The number of points, in decimal.left[1]: The left position of the boundary box.right[1]: The right position of the boundary box.points[?]: A list of points, ending with a linebreak.
A point is made of two characters(x, y) representing each a signed value,
where capital R is 0, Q is -1, S is 1,
and so on. For example, NW is equal to -4,5. Here is an example
file containing 12 glyphs:
ID---LENLRPOINTS------------------------
1 9MWRMNV RRMVV RPSTS
2 16MWOMOV ROMSMUNUPSQ ROQSQURUUSVOV
3 11MXVNTMRMPNOPOSPURVTVVU
4 12MWOMOV ROMRMTNUPUSTURVOV
5 12MWOMOV ROMUM ROQSQ ROVUV
6 9MVOMOV ROMUM ROQSQ
7 15MXVNTMRMPNOPOSPURVTVVUVR RSRVR
8 9MWOMOV RUMUV ROQUQ
9 3PTRMRV
10 7NUSMSTRVPVOTOS
11 9MWOMOV RUMOS RQQUV
12 6MVOMOV ROVUV
The position " R"(space followed by capital R) is special, it means lifting the pen, the position that follows will not draw a stroke.
| J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
| -8 | -7 | -6 | -5 | -4 | -3 | -2 | -1 | 0 | +1 | +2 | +3 | +4 | +5 | +6 | +7 | +8 |
- Hershey Renderer, Uxntal
- Hershey Vector Font, Paul Bourke
- Hershey Fonts