Class PFBParser


  • public class PFBParser
    extends java.lang.Object
    This class represents a parser for Adobe Type 1 PFB files.
    See Also:
    PFBData
    • Constructor Summary

      Constructors 
      Constructor Description
      PFBParser()  
    • Field Detail

      • CURRENTFILE_EEXEC

        private static final byte[] CURRENTFILE_EEXEC
      • CLEARTOMARK

        private static final byte[] CLEARTOMARK
    • Constructor Detail

      • PFBParser

        public PFBParser()
    • Method Detail

      • parsePFB

        public PFBData parsePFB​(java.io.InputStream in)
                         throws java.io.IOException
        Parses a PFB file into a PFBData object.
        Parameters:
        in - InputStream to load the PFB file from
        Returns:
        PFBData memory representation of the font
        Throws:
        java.io.IOException - In case of an I/O problem
      • swapInteger

        private static int swapInteger​(int value)
      • parsePCFormat

        private void parsePCFormat​(PFBData pfb,
                                   java.io.DataInputStream din)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • byteCmp

        private static boolean byteCmp​(byte[] src,
                                       int srcOffset,
                                       byte[] cmp)
      • calcLengths

        private void calcLengths​(PFBData pfb,
                                 byte[] originalData)
      • parseRAWFormat

        private void parseRAWFormat​(PFBData pfb,
                                    java.io.BufferedInputStream bin)
                             throws java.io.IOException
        Throws:
        java.io.IOException