Class Type3Font


  • public class Type3Font
    extends PDFFont
    A Type 3 Font, in which each glyph consists of a sequence of PDF commands.
    • Field Detail

      • rsrc

        java.util.HashMap<java.lang.String,​PDFObject> rsrc
        resources for the character definitions
      • charProcs

        java.util.Map charProcs
        the character processes, mapped by name
      • bbox

        java.awt.geom.Rectangle2D bbox
        bounding box for the font characters
      • at

        java.awt.geom.AffineTransform at
        affine transform for the font characters
      • widths

        float[] widths
        the widths
      • firstChar

        int firstChar
        the start code
      • lastChar

        int lastChar
        the end code
    • Constructor Detail

      • Type3Font

        public Type3Font​(java.lang.String baseFont,
                         PDFObject fontObj,
                         java.util.HashMap<java.lang.String,​PDFObject> resources,
                         PDFFontDescriptor descriptor)
                  throws java.io.IOException
        Generate a Type 3 font.
        Parameters:
        baseFont - the postscript name of this font
        fontObj - a dictionary containing references to the character definitions and font information
        resources - a set of resources used by the character definitions
        descriptor - the descriptor for this font
        Throws:
        java.io.IOException
    • Method Detail

      • getFirstChar

        public int getFirstChar()
        Get the first character code
      • getLastChar

        public int getLastChar()
        Get the last character code
      • getGlyph

        protected PDFGlyph getGlyph​(char src,
                                    java.lang.String name)
        Get the glyph for a given character code and name The preferred method of getting the glyph should be by name. If the name is null or not valid, then the character code should be used. If the both the code and the name are invalid, the undefined glyph should be returned. Note this method must *always* return a glyph.
        Specified by:
        getGlyph in class PDFFont
        Parameters:
        src - the character code of this glyph
        name - the name of this glyph or null if unknown
        Returns:
        a glyph for this character