Class SVGFont

    • Constructor Detail

      • SVGFont

        public SVGFont()
    • Method Detail

      • 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 SVG
        id - An XML id attribute for the font element
        first - The first character in the output range
        last - The last character in the output range
        forceAscii - 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