Class FileSystemFontProvider.FSFontInfo

java.lang.Object
org.sejda.sambox.pdmodel.font.FontInfo
org.sejda.sambox.pdmodel.font.FileSystemFontProvider.FSFontInfo
Direct Known Subclasses:
FileSystemFontProvider.FSIgnored
Enclosing class:
FileSystemFontProvider

private static class FileSystemFontProvider.FSFontInfo extends FontInfo
  • Field Details

    • postScriptName

      private final String postScriptName
    • format

      private final FontFormat format
    • cidSystemInfo

      private final CIDSystemInfo cidSystemInfo
    • usWeightClass

      private final int usWeightClass
    • sFamilyClass

      private final int sFamilyClass
    • ulCodePageRange1

      private final int ulCodePageRange1
    • ulCodePageRange2

      private final int ulCodePageRange2
    • macStyle

      private final int macStyle
    • panose

      private final PDPanoseClassification panose
    • file

      private final File file
  • Constructor Details

    • FSFontInfo

      private FSFontInfo(File file, FontFormat format, String postScriptName, CIDSystemInfo cidSystemInfo, int usWeightClass, int sFamilyClass, int ulCodePageRange1, int ulCodePageRange2, int macStyle, byte[] panose)
  • Method Details

    • getPostScriptName

      public String getPostScriptName()
      Description copied from class: FontInfo
      Returns the PostScript name of the font.
      Specified by:
      getPostScriptName in class FontInfo
    • getFormat

      public FontFormat getFormat()
      Description copied from class: FontInfo
      Returns the font's format.
      Specified by:
      getFormat in class FontInfo
    • getCIDSystemInfo

      public CIDSystemInfo getCIDSystemInfo()
      Description copied from class: FontInfo
      Returns the CIDSystemInfo associated with the font, if any.
      Specified by:
      getCIDSystemInfo in class FontInfo
    • getFont

      public org.apache.fontbox.FontBoxFont getFont()
      Description copied from class: FontInfo
      Returns a new FontBox font instance for the font. Implementors of this method must not cache the return value of this method unless doing so via the current FontCache.
      Specified by:
      getFont in class FontInfo
    • getFamilyClass

      public int getFamilyClass()
      Description copied from class: FontInfo
      Returns the sFamilyClass field of the "OS/2" table, or -1.
      Specified by:
      getFamilyClass in class FontInfo
    • getWeightClass

      public int getWeightClass()
      Description copied from class: FontInfo
      Returns the usWeightClass field of the "OS/2" table, or -1.
      Specified by:
      getWeightClass in class FontInfo
    • getCodePageRange1

      public int getCodePageRange1()
      Description copied from class: FontInfo
      Returns the ulCodePageRange1 field of the "OS/2" table, or 0.
      Specified by:
      getCodePageRange1 in class FontInfo
    • getCodePageRange2

      public int getCodePageRange2()
      Description copied from class: FontInfo
      Returns the ulCodePageRange2 field of the "OS/2" table, or 0.
      Specified by:
      getCodePageRange2 in class FontInfo
    • getMacStyle

      public int getMacStyle()
      Description copied from class: FontInfo
      Returns the macStyle field of the "head" table, or -1.
      Specified by:
      getMacStyle in class FontInfo
    • getPanose

      public PDPanoseClassification getPanose()
      Description copied from class: FontInfo
      Returns the Panose classification of the font, if any.
      Specified by:
      getPanose in class FontInfo
    • toString

      public String toString()
      Overrides:
      toString in class FontInfo
    • getTrueTypeFont

      private org.apache.fontbox.ttf.TrueTypeFont getTrueTypeFont(String postScriptName, File file)
    • readTrueTypeFont

      private org.apache.fontbox.ttf.TrueTypeFont readTrueTypeFont(String postScriptName, File file) throws IOException
      Throws:
      IOException
    • getOTFFont

      private static org.apache.fontbox.ttf.OpenTypeFont getOTFFont(String postScriptName, File file)
    • getType1Font

      private static org.apache.fontbox.type1.Type1Font getType1Font(String postScriptName, File file)