Class BuiltinFont


public class BuiltinFont extends Type1Font
This class represents the 14 built-in fonts. It reads these fonts from files in the "res" directory, as specified in BaseNames.properties.
  • Field Details

    • props

      private static Properties props
      the properties file
    • fonts

      private static Map fonts
      the fonts themselves
    • baseFonts

      private static final String[] baseFonts
      the names of the 14 base fonts
    • mappedFonts

      private static final String[] mappedFonts
      fonts others (e.g. Acrobad PDFWriter 3.02 for Windows) assume are there, even though they're not in the spec. Grrr... the format is
  • Constructor Details

    • BuiltinFont

      public BuiltinFont(String baseFont, PDFObject fontObj) throws IOException
      Create a new Builtin object based on the name of a built-in font This must be the name of one of the 14 built-in fonts!
      Parameters:
      baseFont - the name of the font, from the PDF file
      fontObj - the object containing font information
      Throws:
      IOException
    • BuiltinFont

      public BuiltinFont(String baseFont, PDFObject fontObj, PDFFontDescriptor descriptor) throws IOException
      create a new BuiltingFont object based on a description of the font from the PDF file. Parse the description for key information and use that to generate an appropriate font.
      Throws:
      IOException
  • Method Details

    • parseFont

      private void parseFont(String baseFont) throws IOException
      Parse a font given only the name of a builtin font
      Throws:
      IOException