Package com.itextpdf.layout.font
Class FontInfo
java.lang.Object
com.itextpdf.layout.font.FontInfo
Contains all font related data to create
FontProgram
and PdfFont
.
FontProgramDescriptor
fetches with FontProgramDescriptorFactory
.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private final FontProgramDescriptor
private final String
private final byte[]
private final String
private static final Map
<FontCacheKey, FontProgramDescriptor> private final int
private final Range
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
calculateHashCode
(String fontName, byte[] bytes, String encoding, Range range) (package private) static FontInfo
static FontInfo
create
(FontProgram fontProgram, String encoding, String alias) static FontInfo
create
(FontProgram fontProgram, String encoding, String alias, Range range) static FontInfo
static FontInfo
(package private) static FontInfo
boolean
getAlias()
Gets font alias.byte[]
Gets font data, ifFontInfo
was created withbyte[]
.Gets path to font, ifFontInfo
was created by String.private static FontProgramDescriptor
int
hashCode()
private static void
putFontNamesToCache
(FontCacheKey key, FontProgramDescriptor descriptor) toString()
-
Field Details
-
fontNamesCache
-
fontName
-
fontData
private final byte[] fontData -
descriptor
-
range
-
hash
private final int hash -
encoding
-
alias
-
-
Constructor Details
-
FontInfo
private FontInfo(String fontName, byte[] fontData, String encoding, FontProgramDescriptor descriptor, Range unicodeRange, String alias)
-
-
Method Details
-
create
-
create
-
create
-
create
-
create
-
create
-
getDescriptor
-
getFontUnicodeRange
-
getFontName
Gets path to font, ifFontInfo
was created by String. Note, to get PostScript or full name, usegetDescriptor()
.- Returns:
- the font name
-
getFontData
public byte[] getFontData()Gets font data, ifFontInfo
was created withbyte[]
.- Returns:
- font data
-
getEncoding
-
getAlias
Gets font alias.- Returns:
- alias if exist, otherwise null.
-
equals
-
hashCode
public int hashCode() -
toString
-
calculateHashCode
-
getFontNamesFromCache
-
putFontNamesToCache
-