The Hershey Fonts are a set of vector stroke fonts originally developed in the 1960s, commonly used in CNC, plotting, and graphics applications. They are defined by sequences of vector line commands for each character.
The "Simplex" style is one of the Hershey font styles (usually style 1), and includes basic glyphs defined in a standardized code format.
Objective
You want to create a UK-style pound sign (£) in the Simplex Hershey font style that fits stylistically with other symbols in the font.
About Hershey Font Encoding
-
Each character in Hershey fonts is encoded as a string following this schema:
<char_id><left_offset><right_offset><vector_commands>
The commands typically use pairs of characters denoting coordinates on a grid, from 'R' (origin) upwards.
-
Vector commands:
- 'Mxy' - move to coordinate (x,y) (lift pen)
- 'Lxy' - draw line to (x,y) (pen down)
-
Coordinates are expressed as ASCII letters starting from 'R' representing zero, increasing per ASCII letter.
Existing Pound Sign in Hershey Fonts
The original Hershey Simplex font includes the "unicode" range characters but does not have an exact UK £ pound symbol; it typically uses ASCII and some common symbols.
However, some extended versions or later font sets add a pound sign.
Step 1: Understand coordinate system
- Coordinates are letter pairs: x and y, where 'R' corresponds to 0, 'S' to 1, etc.
- Example: 'RT' is (0,1), 'UV' is (3,4), etc.
Step 2: Design the Pound Sign
The UK pound symbol (£) generally looks like:
- A vertical stroke with two horizontal bars crossing it near top and middle.
- A curved tail or a hook at the bottom left.
In a simple geometric style consistent with Simplex (mainly straight strokes), a rough approximation can be:
- Vertical line from bottom (say at x=6) near y=0 to near top (y=9 or 10)
- Two short horizontal lines intersecting this vertical near y=7 and y=4
- A little "hook" going left from bottom near y=0-3.
Coordinates on Hershey grid
- Let's reserve the character width between x=1 (left) and x=11 (right)
- vertical line at x=7 from y = 2 to y=10
- top stroke from x=4 to x=9 at y=9
- middle stroke from x=4 to x=9 at y=6
- hook appropriate
Step 3: Construct the vector commands
We need to write the Hershey vector commands for this stroke font.
- Move to (7, 10), draw line down to (7, 2) — vertical line
- Move to (4, 9), draw line right to (9, 9) — top bar
- Move to (4, 6), draw line right to (9, 6) — middle bar
- Move to (7, 2), draw line left-down to (5, 0) — bottom hook
Step 4: Convert coordinates to letters
Recall: 'R' = 0
Coordinates:
| Point | x | y | Hershey letter (x) | Hershey letter (y) |
|---|
| (7,10) | 7 | 10 | 'Y' (R + 7) | 'B' (R + 10) |
| (7,2) | 7 | 2 | 'Y' | 'T' (R + 2) |
| (4,9) | 4 | 9 | 'V' (R + 4) | 'A' (R + 9) |
| (9,9) | 9 | 9 | 'Z' (R + 9) | 'A' |
| (4,6) | 4 | 6 | 'V' | 'X' (R + 6) |
| (9,6) | 9 | 6 | 'Z' | 'X' |
| (5,0) | 5 | 0 | 'W' (R + 5) | 'R' (R + 0) |
Note: Because Hershey letters must be uppercase ASCII letters, make sure 0..25 is covered by letters 'R'..'Z' and beyond. Hershey font typically uses letters over a wider range, but for simplex style using capital letters starting at 'R' is standard.
A full Hershey vector command string
Structure:
- The character code (number) - 3 digits
- Left offset - single char (often defining left side bearing)
- Right offset - single char (defining right side bearing)
- Vector commands
Let's pick a code number for the custom £ sign - for example 163 (ASCII code for £ or 0xA3)
Left bearing: 'I' (x=1)
Right bearing: 'P' (x=8)
The bearing is the horizontal space of the glyph extent, e.g. 1 to 8 = width 7 units.
Vector command syntax
- 'Mxy' for move to coord (pen up)
- 'Lxy' for line to coord (pen down)
Writing the commands:
- Move pen to (7,10): M Y B
- Draw line to (7,2): L Y T
- Move pen to (4,9): M V A
- Draw line to (9,9): L Z A
- Move pen to (4,6): M V X
- Draw line to (9,6): L Z X
- Move pen to (7,2): M Y T
- Draw line to (5,0): L W R
Final vector string:
M Y B L Y T M V A L Z A M V X L Z X M Y T L W R
or concatenated:
MYBLYT MVALZA MVXLZX MYTLWR
(without spaces)
Putting it all together
Let's write the full Hershey character line:
163.IPMYBLYTMVALZAMVXLZXMYTLWR
Meaning:
- 163 : glyph code
- . : delimiter
- I : left side bearing (offset)
- P : right side bearing (offset)
- MYBLYTMVALZAMVXLZXMYTLWR : vector commands
Summary
- You can add this character into the Simplex Hershey font set.
- It fits style: simple strokes, straight lines, with basic geometric form.
- It approximates the UK £ symbol with two horizontal bars crossing a vertical, and a simple hook.
If you want me to generate an exact Hershey font file snippet or help integrate this into a Hershey font file, or render it graphically, just ask!