🎨Creative SoftwareDEV CommunityContent type: Blog

Render any font to a crisp SVG path in the browser with opentype.js (opens in new tab)

Discussed on DEV

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
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help