SUMMARY:
java.lang.Object
org.apache.batik.svggen.font.SVGFont
- All Implemented Interfaces:
- FeatureTags, ScriptTags, CSSConstants, SVGConstants, XMLConstants
public class SVGFont
- extends java.lang.Object
- implements XMLConstants, SVGConstants, ScriptTags, FeatureTags
Converts a TrueType font to an SVG embedded font.
SVGFont
public SVGFont()
encodeEntities
protected static java.lang.String encodeEntities(java.lang.String s)
getContourAsSVGPathData
protected static java.lang.String getContourAsSVGPathData(Glyph glyph,
int startIndex,
int count)
getSVGFontFaceElement
protected static java.lang.String getSVGFontFaceElement(Font font)
writeFontAsSVGFragment
protected static void writeFontAsSVGFragment(java.io.PrintStream ps,
Font font,
java.lang.String id,
int first,
int last,
boolean autoRange,
boolean forceAscii)
throws java.lang.Exception
- Returns a <font>...</font> block,
defining the specified font.
- Parameters:
font
- The TrueType font to be converted to SVGid
- An XML id attribute for the font elementfirst
- The first character in the output rangelast
- The last character in the output rangeforceAscii
- Force the use of the ASCII character map
- Throws:
java.lang.Exception
getGlyphAsSVG
protected static java.lang.String getGlyphAsSVG(Font font,
Glyph glyph,
int glyphIndex,
int defaultHorizAdvanceX,
java.lang.String attrib,
java.lang.String code)
getGlyphAsSVG
protected static java.lang.String getGlyphAsSVG(Font font,
Glyph glyph,
int glyphIndex,
int defaultHorizAdvanceX,
SingleSubst arabInitSubst,
SingleSubst arabMediSubst,
SingleSubst arabTermSubst,
java.lang.String code)
getKerningPairAsSVG
protected static java.lang.String getKerningPairAsSVG(KerningPair kp,
PostTable post)
writeSvgBegin
protected static void writeSvgBegin(java.io.PrintStream ps)
writeSvgDefsBegin
protected static void writeSvgDefsBegin(java.io.PrintStream ps)
writeSvgDefsEnd
protected static void writeSvgDefsEnd(java.io.PrintStream ps)
writeSvgEnd
protected static void writeSvgEnd(java.io.PrintStream ps)
writeSvgTestCard
protected static void writeSvgTestCard(java.io.PrintStream ps,
java.lang.String fontFamily)
main
public static void main(java.lang.String[] args)
- Starts the application.
- Parameters:
args
- an array of command-line arguments