Hershey Fonts in SVG

by schmarty, published

Hershey Fonts in SVG by schmarty Feb 6, 2011



Public Domain
Hershey Fonts in SVG by schmarty is licensed under the Public Domain license.

Liked By

View All

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.

Print Thing Tag

Thing Statistics

13165Views 17991Downloads Found in Art Tools


Making text for Unicorn or EggBot plots isn't always a fun process. Most tools require you to convert text into paths, and even then you get the outlines of shapes, which can often turn messy at small sizes.

mifga pointed me towards the Hershey fonts[1]. They're a set of fonts for vector plotters named after creator Dr. A. V. Hershey who made them for the National Bureau of Standards.

These files are in a weird, weird, format. But after some normalizing, wailing, and gnashing of teeth, I was able to write some code to parse them and spit them back out as SVG! Now you can use these fonts in your Unicorn drawings.

Each SVG contains a layout of one of the Hershey fonts. The hershey_svg.zip file below contains all of the SVG files. The hershey.zip file contains the (cleaned up) original .jhf files. math-drawing.svg is just an example of using these glyphs, including scaling and stretching. I think the result is nice!

To use these in Unicorn plots, you'll want to grab my Unicorn G-Code extension for Inkscape[2].

[1] Hershey fonts - http://emergent.unpythonic.net/software/hershey
[2] Unicorn output for Inkscape - http://www.thingiverse.com/thing:5986


To use these fonts in your Unicorn plots:

  1. Download the SVG file containing the font of your choice, or grab the whole hershey_svg.zip to get them all.
  2. In your Inkscape drawing, use File | Import to load the font you want
  3. Drag around and duplicate the characters that you want to use.
  4. Delete the ones that you don't.
    5a. (Unicorn users) Save your file and Save a Copy to get your .gcode!
    5b. (EggBot users) Plot directly from Inkscape. :)

More from Art Tools

view more

File Name



All Apps

Upgrade this Thing with Thingiverse Apps

Tools and Utilities

Repair, slice, or enhance this Thing

Auto-magically prepare your 3D models for 3D printing. A cloud based 3D models Preparing and Healing solution for 3D Printing, MakePrintable provides features for model repairing, wall thickness...

App Info Launch App

Any chance you could share the source code for this? I am attempting to write a procedural pipeline for hershey font rendering and I've come across two ports of .jhf to other weird formats... many thanks! :)

Hey vaporstack,

Unfortunately I don't know where that code wound up.

From what I recall it was a pretty direct translation from the Hershey .jhf format to SVG paths because they use a similar move/stroke model.

I think I was able to follow the rendering instructions as described on the link in the description of this thing.

Ah well, thanks anyway!

I'm wanting to get into designing for 3D printers so I can make jewelry with math and physics equations to satisfy my nerd girl needs, and I am forever in your debt for this! Ahhhhh making the Maxwell's equations bangle of my dreams just got way less intimidating! I was thinking I was gonna have to try and build a math font of my own. Thank you, thank you, thank you!

man this is very, very cool...

Thank you for the "fonts". I understand that these are not actual fonts that I can use with the keyboard, rather these are illustrations of the fonts that can be copied and placed in the canvas as needed. If I am correct, is there a way to create real fonts that can be typed on the keyboard that have a single stroke?


Hi Shab,

You are correct, these are made for copy-and-pasting. It would be feasible to make an Inkscape plugin that works in two parts. First, an ASCII mapping that lets you enter text for which it will generate the glyphs. Second, an old Windows-style character map that lets you select the characters tha
t are not mapped to keys on a keyboard.

I might take a crack at it in the future, but feel free to make it first!

Hi Shmarty,

"I might take a crack at it in the future, but feel free to make it first!" I am afraid I am not that smart, I wish I were...However I created a very primitive font based on single strokes, which also requires copy-and-paste. You may see it on this webpage:



Hi Shab,

We've posted an Inkscape extension that does generate single-stroke font text as typed from the keyboard: http://www.evilmadscientist.com/go/hersheyhttp://www.evilmadscientist.co...

(You've probably seen this already, but I'm adding this comment in case others have the same question in the future.)


Thanks for doing this.