When using a sketch pen with my plotter, I prefer the true single line SVG fonts that draw the lines only once. But – as these true single line fonts cannot be installed and be used as regular outline fonts I would like to offer my single line fonts as stick fonts too. A stick font is an outline font with zero with so that the letters will be traced twice of you use it as it is. The stick font can be used while you do your design still working with text objects. If you define the path for your svg-fonts to the Hershey Text tool it will automatically select the corresponding single line font by the font name of your text object.
I wrote an Inkscape extension to effectively converting a single line SVG font to a TTF stick font. Read on to learn how to.
Update 24.08.2021: I realize that with this method some glyphs in the ttf font may be corrupt when used f.x. in Silhouette Studio. My current method for making stick fonts is now through the simpler: convert stroke to path after setting the stroke very narrow. This will avoid crossing of paths which the ttf format do not like some much. In Inkscape it works fine though.
Set up Inkscape
- Inkscape with updated paths.py
- You will need Inkscape v1 or more
- You will need to update the paths.py of Inkscape (writing this pr nov 2020 using Inkscape v1.0.1) as my extension will use the reverse function which was not implemented in v1.0.1.
- Download the .py file from here
- Replace the paths.py of …\Inkscape\share\inkscape\extensions\inkex
- Install my extension
- Download the zip fil with .inx and .py files from my Inkscape Resources or from Gitlab (for Gitlab you will need an account).
- Unzip and place the .inx/.py in your User extensions folder. (Check Inkscape Preferences (Shift+Ctrl+P) and find your local User extensions folder specified in the System tab).
- Restart Inkscape to update with the new extension.
Generate the sticky paths
- Open your svg-template file or generate one using the Stroke Font extension by Khemadeva to edit the single line svg font you want to convert to a stick font.
- Select the layer ‘Glyphs’
- If you have a glyph with path id ” (quotation mark) and or # (hash) – change that temporarily to “temp” or something as the extension will fail with ” or # as path id.
- Select all paths/glyphs (Ctrl+A)
- Select Extensions > Cutlings > Duplicate, reverse, join…
- Press Apply
- Change the path id of ” and # glyphs back to original.
- Generate a SVG stickfont using the Custom Stroke Font extension “Generate Font Data”.
- Use hints from here and here to ease the process and prepare the svg font for FontForge.
- Follow the last steps of this post to convert from SVG to TTF.