Skip to content

Add option in export to convert text to outlines in SVG #1972

@jelmerdemaat

Description

@jelmerdemaat

It would be a nice feature if you can export text as outlines inside an SVG.

Example:

Screenshot 2020-07-27 at 18 15 13

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:

  1. for some reason a viewer can not fetch an external font (e.g. due to security policies), or
  2. software can't display external fonts. Like the default macOS finder:

Screenshot 2020-07-27 at 18 13 32

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions