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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CIDSystemInfo
private final File
private final FontFormat
private final int
private final PDPanoseClassification
private final FileSystemFontProvider
private final String
private final int
private final int
private final int
private final int
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
FSFontInfo
(File file, FontFormat format, String postScriptName, CIDSystemInfo cidSystemInfo, int usWeightClass, int sFamilyClass, int ulCodePageRange1, int ulCodePageRange2, int macStyle, byte[] panose, FileSystemFontProvider parent) -
Method Summary
Modifier and TypeMethodDescriptionReturns the CIDSystemInfo associated with the font, if any.int
Returns the ulCodePageRange1 field of the "OS/2" table, or 0.int
Returns the ulCodePageRange2 field of the "OS/2" table, or 0.int
Returns the sFamilyClass field of the "OS/2" table, or -1.getFont()
Returns a new FontBox font instance for the font.Returns the font's format.int
Returns the macStyle field of the "head" table, or -1.private OpenTypeFont
getOTFFont
(String postScriptName, File file) Returns the Panose classification of the font, if any.Returns the PostScript name of the font.private TrueTypeFont
getTrueTypeFont
(String postScriptName, File file) private Type1Font
getType1Font
(String postScriptName, File file) int
Returns the usWeightClass field of the "OS/2" table, or -1.private TrueTypeFont
readTrueTypeFont
(String postScriptName, File file) toString()
Methods inherited from class org.apache.pdfbox.pdmodel.font.FontInfo
getCodePageRange, getWeightClassAsPanose
-
Field Details
-
postScriptName
-
format
-
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
-
file
-
parent
-
-
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, FileSystemFontProvider parent)
-
-
Method Details
-
getPostScriptName
Description copied from class:FontInfo
Returns the PostScript name of the font.- Specified by:
getPostScriptName
in classFontInfo
-
getFormat
Description copied from class:FontInfo
Returns the font's format. -
getCIDSystemInfo
Description copied from class:FontInfo
Returns the CIDSystemInfo associated with the font, if any.- Specified by:
getCIDSystemInfo
in classFontInfo
-
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
Description copied from class:FontInfo
Returns the Panose classification of the font, if any. -
toString
-
getTrueTypeFont
-
readTrueTypeFont
- Throws:
IOException
-
getOTFFont
-
getType1Font
-