Package org.apache.pdfbox.pdmodel.font
Class FontInfo
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.font.FontInfo
-
- Direct Known Subclasses:
FileSystemFontProvider.FSFontInfo
public abstract class FontInfo extends java.lang.ObjectInformation about a font on the system.
-
-
Constructor Summary
Constructors Constructor Description FontInfo()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract CIDSystemInfogetCIDSystemInfo()Returns the CIDSystemInfo associated with the font, if present.(package private) longgetCodePageRange()Returns the ulCodePageRange1 and ulCodePageRange1 field of the "OS/2" table, or 0.abstract intgetCodePageRange1()Returns the ulCodePageRange1 field of the "OS/2" table, or 0.abstract intgetCodePageRange2()Returns the ulCodePageRange2 field of the "OS/2" table, or 0.abstract intgetFamilyClass()Returns the sFamilyClass field of the "OS/2" table, or -1.abstract FontBoxFontgetFont()Returns a new FontBox font instance for the font.abstract FontFormatgetFormat()Returns the font's format.abstract intgetMacStyle()Returns the macStyle field of the "head" table, or -1.abstract PDPanoseClassificationgetPanose()Returns the Panose classification of the font, if any.abstract java.lang.StringgetPostScriptName()Returns the PostScript name of the font.abstract intgetWeightClass()Returns the usWeightClass field of the "OS/2" table, or -1.(package private) intgetWeightClassAsPanose()Returns the usWeightClass field as a Panose Weight.java.lang.StringtoString()
-
-
-
Method Detail
-
getPostScriptName
public abstract java.lang.String getPostScriptName()
Returns the PostScript name of the font.- Returns:
- the PostScript name of the font
-
getFormat
public abstract FontFormat getFormat()
Returns the font's format.- Returns:
- the format of the font
-
getCIDSystemInfo
public abstract CIDSystemInfo getCIDSystemInfo()
Returns the CIDSystemInfo associated with the font, if present.- Returns:
- the CIDSystemInfo of the font if any
-
getFont
public abstract 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.- Returns:
- a new FontBox instance of the font
-
getFamilyClass
public abstract int getFamilyClass()
Returns the sFamilyClass field of the "OS/2" table, or -1.- Returns:
- the FamilyClass of the font
-
getWeightClass
public abstract int getWeightClass()
Returns the usWeightClass field of the "OS/2" table, or -1.- Returns:
- the WeightClass of the font
-
getWeightClassAsPanose
final int getWeightClassAsPanose()
Returns the usWeightClass field as a Panose Weight.- Returns:
- the WeightClass of the font as Panose weight
-
getCodePageRange1
public abstract int getCodePageRange1()
Returns the ulCodePageRange1 field of the "OS/2" table, or 0.- Returns:
- the CodePageRange1 of the font if present
-
getCodePageRange2
public abstract int getCodePageRange2()
Returns the ulCodePageRange2 field of the "OS/2" table, or 0.- Returns:
- the CodePageRange2 of the font if present
-
getCodePageRange
final long getCodePageRange()
Returns the ulCodePageRange1 and ulCodePageRange1 field of the "OS/2" table, or 0.- Returns:
- the CodePageRange of the font
-
getMacStyle
public abstract int getMacStyle()
Returns the macStyle field of the "head" table, or -1.- Returns:
- the MacStyle of the font
-
getPanose
public abstract PDPanoseClassification getPanose()
Returns the Panose classification of the font, if any.- Returns:
- the PanoseClassification of the font
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-