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 CIDSystemInfoprivate final Fileprivate final FontFormatprivate final intprivate final PDPanoseClassificationprivate final FileSystemFontProviderprivate final Stringprivate final intprivate final intprivate final intprivate final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateFSFontInfo(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.intReturns the ulCodePageRange1 field of the "OS/2" table, or 0.intReturns the ulCodePageRange2 field of the "OS/2" table, or 0.intReturns 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.intReturns the macStyle field of the "head" table, or -1.private OpenTypeFontgetOTFFont(String postScriptName, File file) Returns the Panose classification of the font, if any.Returns the PostScript name of the font.private TrueTypeFontgetTrueTypeFont(String postScriptName, File file) private Type1FontgetType1Font(String postScriptName, File file) intReturns the usWeightClass field of the "OS/2" table, or -1.private TrueTypeFontreadTrueTypeFont(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:FontInfoReturns the PostScript name of the font.- Specified by:
getPostScriptNamein classFontInfo
-
getFormat
Description copied from class:FontInfoReturns the font's format. -
getCIDSystemInfo
Description copied from class:FontInfoReturns the CIDSystemInfo associated with the font, if any.- Specified by:
getCIDSystemInfoin 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:FontInfoReturns the sFamilyClass field of the "OS/2" table, or -1.- Specified by:
getFamilyClassin classFontInfo
-
getWeightClass
public int getWeightClass()Description copied from class:FontInfoReturns the usWeightClass field of the "OS/2" table, or -1.- Specified by:
getWeightClassin classFontInfo
-
getCodePageRange1
public int getCodePageRange1()Description copied from class:FontInfoReturns the ulCodePageRange1 field of the "OS/2" table, or 0.- Specified by:
getCodePageRange1in classFontInfo
-
getCodePageRange2
public int getCodePageRange2()Description copied from class:FontInfoReturns the ulCodePageRange2 field of the "OS/2" table, or 0.- Specified by:
getCodePageRange2in classFontInfo
-
getMacStyle
public int getMacStyle()Description copied from class:FontInfoReturns the macStyle field of the "head" table, or -1.- Specified by:
getMacStylein classFontInfo
-
getPanose
Description copied from class:FontInfoReturns the Panose classification of the font, if any. -
toString
-
getTrueTypeFont
-
readTrueTypeFont
- Throws:
IOException
-
getOTFFont
-
getType1Font
-