Package org.apache.pdfbox.pdmodel.font
Class FileSystemFontProvider.FSFontInfo
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.font.FontInfo
-
- org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.FSFontInfo
-
- Direct Known Subclasses:
FileSystemFontProvider.FSIgnored
- Enclosing class:
- FileSystemFontProvider
private static class FileSystemFontProvider.FSFontInfo extends FontInfo
-
-
Field Summary
Fields Modifier and Type Field Description private CIDSystemInfo
cidSystemInfo
private java.io.File
file
private FontFormat
format
private int
macStyle
private PDPanoseClassification
panose
private FileSystemFontProvider
parent
private java.lang.String
postScriptName
private int
sFamilyClass
private int
ulCodePageRange1
private int
ulCodePageRange2
private int
usWeightClass
-
Constructor Summary
Constructors Modifier Constructor Description 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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CIDSystemInfo
getCIDSystemInfo()
Returns the CIDSystemInfo associated with the font, if any.int
getCodePageRange1()
Returns the ulCodePageRange1 field of the "OS/2" table, or 0.int
getCodePageRange2()
Returns the ulCodePageRange2 field of the "OS/2" table, or 0.int
getFamilyClass()
Returns the sFamilyClass field of the "OS/2" table, or -1.FontBoxFont
getFont()
Returns a new FontBox font instance for the font.FontFormat
getFormat()
Returns the font's format.int
getMacStyle()
Returns the macStyle field of the "head" table, or -1.private OpenTypeFont
getOTFFont(java.lang.String postScriptName, java.io.File file)
PDPanoseClassification
getPanose()
Returns the Panose classification of the font, if any.java.lang.String
getPostScriptName()
Returns the PostScript name of the font.private TrueTypeFont
getTrueTypeFont(java.lang.String postScriptName, java.io.File file)
private Type1Font
getType1Font(java.lang.String postScriptName, java.io.File file)
int
getWeightClass()
Returns the usWeightClass field of the "OS/2" table, or -1.private TrueTypeFont
readTrueTypeFont(java.lang.String postScriptName, java.io.File file)
java.lang.String
toString()
-
Methods inherited from class org.apache.pdfbox.pdmodel.font.FontInfo
getCodePageRange, getWeightClassAsPanose
-
-
-
-
Field Detail
-
postScriptName
private final java.lang.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 java.io.File file
-
parent
private final FileSystemFontProvider parent
-
-
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 classFontInfo
-
getFormat
public FontFormat getFormat()
Description copied from class:FontInfo
Returns the font's format.
-
getCIDSystemInfo
public CIDSystemInfo getCIDSystemInfo()
Description copied from class:FontInfo
Returns the CIDSystemInfo associated with the font, if any.- Specified by:
getCIDSystemInfo
in classFontInfo
-
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 currentFontCache
.The method returns null if there is there was an error opening 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 classFontInfo
-
getWeightClass
public int getWeightClass()
Description copied from class:FontInfo
Returns the usWeightClass field of the "OS/2" table, or -1.- Specified by:
getWeightClass
in classFontInfo
-
getCodePageRange1
public int getCodePageRange1()
Description copied from class:FontInfo
Returns the ulCodePageRange1 field of the "OS/2" table, or 0.- Specified by:
getCodePageRange1
in classFontInfo
-
getCodePageRange2
public int getCodePageRange2()
Description copied from class:FontInfo
Returns the ulCodePageRange2 field of the "OS/2" table, or 0.- Specified by:
getCodePageRange2
in classFontInfo
-
getMacStyle
public int getMacStyle()
Description copied from class:FontInfo
Returns the macStyle field of the "head" table, or -1.- Specified by:
getMacStyle
in classFontInfo
-
getPanose
public PDPanoseClassification getPanose()
Description copied from class:FontInfo
Returns the Panose classification of the font, if any.
-
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)
-
-