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
    • 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)
    • 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
      • 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 is there was an error opening the font.

        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
      • 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)