I would like to export a SVG to PDF using the command line.
I want to use embedded SVG fonts, to see beautiful text in the PDF.
As explained in the documentation: "Used fonts are subset and embedded".
Does someone could write a working example of SVG ?
Thanks!
Here is the command line used:
Code: Select all
$ inkscape test.svg --export-pdf test.pdf
I tried to use font-face but it's not working.
Here is the code I used int the SVG file for my tests:
Code: Select all
<?xml version="1.0" standalone="no" ?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<font id="MyFont">
<font-face font-family="MyFont" />
<missing-glyph horiz-adv-x="638" />
<glyph horiz-adv-x="2048" />
<glyph horiz-adv-x="2048" />
(...)
<hkern g1="quoteleft,quotedblleft" g2="B" k="130" />
<hkern g1="quoteleft,quotedblleft" g2="P" k="100" />
</font>
</defs>
<text x="65" y="50" style="font-family: MyFont; font-size: 16; stroke: none; fill: #000000;">
<tspan baseline-shift="-1em" x="85" y="72">Here is my text</tspan>
</tspan>
</text>
</svg>
Where (...) is the SVG font data. And MyFont is my specific font name.