Export to PDF won't embed custom font

Asked by Chad Saunders

I've tried three different ways of embedding a font in my SVG using the "inkscape" command in the CLI to export it to a PDF.

In my SVG I've tried these three ways to use the custom font.

1) Using a base64 encoded TTF font in the <style> tag inside a @font-face using the data uri.
2) Using a URL in the <style> tag inside a @font-face
2) Embedding an SVG font inside the <defs> section

Each time it just uses a default Arial font

What is the best way to embed a custom font into the exported PDF from an SVG?

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
su_v
Solved:
Last query:
Last reply:
Revision history for this message
Best su_v (suv-lp) said :
#1

Inkscape does not use embedded SVG fonts - neither for rendering on-canvas when opening the SVG file in the GUI, nor when exporting to PDF on the command line. The CSS rule @font-face is not supported, either.

You have to install the font regularly on your system to be able to use it in Inkscape (just like other installed fonts).

Revision history for this message
Chad Saunders (chadsaun) said :
#2

Thanks ~suv, that solved my question.

Revision history for this message
su_v (suv-lp) said :
#3

Related feature requests are tracked in:
- Bug #741135 “@font-face location management”
  <https://bugs.launchpad.net/inkscape/+bug/741135>
- Bug #170963 (sf1326220) “Support for SVG fonts (rendering, embedding,...)”
  <https://bugs.launchpad.net/inkscape/+bug/172240>