If you are using the Batik binary distribution, type the following at the command line:
java -jar batik-ttf2svg.jar [options]
If you are using the Batik source distribution, type the following at the command line:
build ttf2svg [options]
In both cases, the options are the same:
Options: <ttf-path> [-l <range-begin>] [-h <range-end>] [-ascii] [-id <id>] [-o <output-path>] [-testcard]
Where:
<ttf-path>
specifies the True Type Font file containing the characters to be converted
[-l <range-begin>] [-h <range-end>]
specify the low and high value of the range of characters to be
converted to SVG.
[-ascii]
forces usage of the ASCII character map
[-id <id>]
specifies the value for the generated <font>
element.
[-o <output-path>]
specifies the path for the generated SVG Font file
[-testcard]
specifies that a set of SVG <text>
element should be appended to
the SVG Font file to visualize and test the characters in the SVG Font. This provides an easy way to
validate the generated SVG Font file visually
For example:
java -jar batik-ttf2svg.jar /usr/home/myFont.ttf -l 48 -h 57 -id MySVGFont -o mySVGFont.svg -testcard
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 easily.