Render any font to a crisp SVG path in the browser with opentype.js (opens in new tab)
A designer asked me for a logo word as an SVG path — not a PNG, not "the font file," an actual they could drop into Figma and a cutting machine. My first instinct was to screenshot it and trace it. Don't do that. If you have the font file, the outlines are already vectors — you just have to ask for them. Here's how I do it client-side with opentype.js. The idea A font glyph is a set of Bézier curves. opentype.js parses a .ttf/.otf and hands you those curves as an SVG path string. No tr...
Read the original article