Module org.sejda.sambox
Package org.sejda.sambox.pdmodel.font
Class FileSystemFontProvider.FSFontInfo
java.lang.Object
org.sejda.sambox.pdmodel.font.FontInfo
org.sejda.sambox.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 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) -
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.org.apache.fontbox.FontBoxFontgetFont()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 static org.apache.fontbox.ttf.OpenTypeFontgetOTFFont(String postScriptName, File file) Returns the Panose classification of the font, if any.Returns the PostScript name of the font.private org.apache.fontbox.ttf.TrueTypeFontgetTrueTypeFont(String postScriptName, File file) private static org.apache.fontbox.type1.Type1FontgetType1Font(String postScriptName, File file) intReturns the usWeightClass field of the "OS/2" table, or -1.private org.apache.fontbox.ttf.TrueTypeFontreadTrueTypeFont(String postScriptName, File file) toString()Methods inherited from class org.sejda.sambox.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
-
-
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)
-
-
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
public org.apache.fontbox.FontBoxFont getFont()Description copied from class:FontInfoReturns 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. -
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
private org.apache.fontbox.ttf.TrueTypeFont readTrueTypeFont(String postScriptName, File file) throws IOException - Throws:
IOException
-
getOTFFont
-
getType1Font
-