The TrueType Font to SVG (ttf2svg) application lets you
convert a range of characters from a TrueType Font into the SVG font
format.
If you are using the Batik binary distribution, type the following at the command line:
If you are using the Batik source distribution, type the following at the command line:
In both cases, the options are the same:
where:
For example:
will convert characters 48 to 57, i.e., '0' to
'9', in the myFont.ttf file into their SVG
equivalent in the mySVGFont.svg file, appending a test
card so that the font can be visualized.
The TrueType Font converter application is helpful to be able to embed font definitions in SVG files. This will ensure that the SVG document will look exactly the same on all platform by not relying on system fonts.
Note that users of the tool should make sure that they have the right to embed the font before embedding it in an SVG file and should refer to the font license for information. Note that TrueType Font files contain a flag that defines the “embeddability” of a font and there are tools for checking that flag.