Class FileSystemFontProvider.FSFontInfo

    • Field Detail

      • postScriptName

        private final java.lang.String postScriptName
      • 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
      • file

        private final java.io.File file
      • hash

        private final java.lang.String hash
      • lastModified

        private final long lastModified
    • Constructor Detail

      • FSFontInfo

        private FSFontInfo​(java.io.File file,
                           FontFormat format,
                           java.lang.String postScriptName,
                           CIDSystemInfo cidSystemInfo,
                           int usWeightClass,
                           int sFamilyClass,
                           int ulCodePageRange1,
                           int ulCodePageRange2,
                           int macStyle,
                           byte[] panose,
                           FileSystemFontProvider parent,
                           java.lang.String hash,
                           long lastModified)
    • Method Detail

      • getPostScriptName

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

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

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

        public FontBoxFont getFont()
        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.

        The method returns null if there was an error opening the font.

        Specified by:
        getFont in class FontInfo
        Returns:
        a new FontBox instance of the font
      • 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
        Returns:
        the FamilyClass of the font
      • 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
        Returns:
        the WeightClass of the font
      • 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
        Returns:
        the CodePageRange1 of the font if present
      • 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
        Returns:
        the CodePageRange2 of the font if present
      • 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
        Returns:
        the MacStyle of the font
      • getPanose

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

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

        private TrueTypeFont getTrueTypeFont​(java.lang.String postScriptName,
                                             java.io.File file)
      • readTrueTypeFont

        private TrueTypeFont readTrueTypeFont​(java.lang.String postScriptName,
                                              java.io.File file)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • getOTFFont

        private OpenTypeFont getOTFFont​(java.lang.String postScriptName,
                                        java.io.File file)
      • getType1Font

        private Type1Font getType1Font​(java.lang.String postScriptName,
                                       java.io.File file)