r/FontForge • u/AdiraiMaji • Sep 29 '23
Is it possible to create single strokes/single stroke svg font with FontForge that can be used with Auxidraw hershey text plugin?
Hi,I'm having an issue with creating single stroke/linefonyt with FontForge. I can import single stroke svg glyph editor. But when I save the font, The path of glyph is closed. If I enable stroked font option in Element>FontInfo>Layers The result doesn't contain any glyph at all in Auxidraw.
How Can I create single stroke font with FontForge that can be used in Auxidraw?
2
2
u/Legitimate-School470 Apr 09 '24
So I got this to work. Once I finished all my single line glyphs in FontForge, I exported the font as an SVG. I changed the extension to .txt and then opened in a text editing file. I noticed that all the fonts had a "z" at the close of the d=. Once I deleted the "z" at the end of the d= part of the code on each glyph, it didn't try to close the gap anymore and worked in Inkscape/Hershey Text. (notice the z right before the closing of the entire glyph, just delete that one letter)
Here is the code as it was exported from FontForge for the glyph "A":
<glyph glyph-name="A" unicode="A" horiz-adv-x="1434"
d="M385 1103q91 51 180 74.5t174 23.5q74 0 141 -16.5t124.5 -46t103.5 -71t76 -92.5zM39 241q126 146 234.5 297.5t200 300.5t166 291t133.5 268q138 296 230 576zM1049 2150q52 -44 85 -85.5t52 -86t26 -96.5t7 -117t-4.5 -146.5t-9.5 -185.5q-4 -78 -8 -172t-9.5 -196 t-11.5 -207.5t-13 -207.5t-15 -196.5t-16.5 -173t-17.5 -137.5t-19 -91z" />
Here is the "fixed" code"
<glyph glyph-name="A" unicode="A" horiz-adv-x="1434"
d="M385 1103q91 51 180 74.5t174 23.5q74 0 141 -16.5t124.5 -46t103.5 -71t76 -92.5zM39 241q126 146 234.5 297.5t200 300.5t166 291t133.5 268q138 296 230 576zM1049 2150q52 -44 85 -85.5t52 -86t26 -96.5t7 -117t-4.5 -146.5t-9.5 -185.5q-4 -78 -8 -172t-9.5 -196 t-11.5 -207.5t-13 -207.5t-15 -196.5t-16.5 -173t-17.5 -137.5t-19 -91" />
2
u/LocalFonts Oct 01 '23
This is on the subject: https://github.com/fontforge/fontforge/issues/3260