Add option in export to convert text to outlines in SVG
See original GitHub issueIt would be a nice feature if you can export text as outlines inside an SVG.
Example:
Right now text exports as real text by default:
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 65 45">
<!-- svg-source:excalidraw -->
<defs>
<style>
@font-face {
font-family: "Virgil";
src: url("https://excalidraw.com/FG_Virgil.woff2");
}
@font-face {
font-family: "Cascadia";
src: url("https://excalidraw.com/Cascadia.woff2");
}
</style>
</defs>
<g transform="translate(10 10) rotate(0 22.5 12.5)">
<text x="0" y="18" font-family="Virgil" font-size="20px" fill="#000000" text-anchor="start" style="white-space: pre;" direction="ltr">Test</text>
</g>
</svg>
But that only works if you want to display a real font. It fails if:
- for some reason a viewer can not fetch an external font (e.g. due to security policies), or
- software can’t display external fonts. Like the default macOS finder:
When a user would be able to choose to convert text to outlines (like in a vector program) this could be used to overcome this problem.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:12
- Comments:23 (13 by maintainers)
Top Results From Across the Web
SVG option to convert text to outlines when exporting
You may find the option in the Font dropdown menu. Select Convert To Outlines in the SVG Export dialog. The text in your...
Read more >Automatically convert text to outlines on export? - Sketch Talk
When exporting an SVG that has text, is it possible (natively or with a plugin) to automatically convert the text to outlines?
Read more >Add SVG export option: outline strokes - Share an idea
I'm currently working on a set of icons which are a mix of bought and customised vectors. The bought icons are all shapes...
Read more >Converting Text to Outlines The Right Way
For each spread that contains text that you want converted to outlines, put a transparency object on it. If you want to convert...
Read more >How to Outline a Font - Convert Font To SVG Online - Vector Ink
Step 1. Add text to the canvas. Tap on the Text icon located at the bottom of the toolbar. · Step 2. Choose...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@vjeux weird, but looking at the source, those two svg paths for the shape are not identical. Seems like the
post
is optimized SVG while thepre
isn’t. The inlined font itself is definitely ~15kb large, though, if you count it manually.Text consisting of more than ~600 characters in total. Our font has 534 glyphs, according to https://fontdrop.info/, but some characters are more complex than others so if you stick to just latin chars, the tipping point will probably be above those 534, maybe even closer to 700. Dunno, we’d have to test.