|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.icepdf.core.pobjects.Dictionary
org.icepdf.core.pobjects.fonts.FontDescriptor
public class FontDescriptor
This class represents a PDF FontDescriptor. A FontDescriptor object
holds extra information about a particular parent Font object. In particular
information on font widths, flags, to unicode and embedded font program streams.
Font| Field Summary | |
|---|---|
static Name |
ASCENT
|
static Name |
AVG_WIDTH
|
static Name |
CAP_HEIGHT
|
static Name |
DESCENT
|
static Name |
FLAGS
|
static Name |
FONT_BBOX
|
static Name |
FONT_FAMILY
|
static Name |
FONT_FILE
|
static Name |
FONT_FILE_2
|
static Name |
FONT_FILE_3
|
static Name |
FONT_FILE_3_CID_FONT_TYPE_0
|
static Name |
FONT_FILE_3_CID_FONT_TYPE_0C
|
static Name |
FONT_FILE_3_CID_FONT_TYPE_2
|
static Name |
FONT_FILE_3_OPEN_TYPE
|
static Name |
FONT_FILE_3_TYPE_1C
|
static Name |
FONT_NAME
|
static Name |
FONT_WEIGHT
|
static Name |
ITALIC_ANGLE
|
static Name |
LEADING
|
static Name |
MAX_WIDTH
|
static Name |
MISSING_Stretch
|
static Name |
MISSING_WIDTH
|
static Name |
STEM_H
|
static Name |
STEM_V
|
static Name |
TYPE
|
static Name |
X_HEIGHT
|
| Fields inherited from class org.icepdf.core.pobjects.Dictionary |
|---|
entries, FORM_TYPE_KEY, inited, isDeleted, isNew, LENGTH_KEY, library, SUBTYPE_KEY, TYPE_KEY |
| Constructor Summary | |
|---|---|
FontDescriptor(Library l,
java.util.HashMap h)
Creates a new instance of a FontDescriptor. |
|
| Method Summary | |
|---|---|
static FontDescriptor |
createDescriptor(Library library,
AFM afm)
Utility method for creating a FontDescriptor based on the font metrics of the AFM |
float |
getAscent()
Gets the ascent of glyphs in the font. |
float |
getAverageWidth()
Gets the average width of glyphs in the font. |
float |
getDescent()
Gets the descent of glyphs in the font. |
FontFile |
getEmbeddedFont()
Gets the embeddedFont if any. |
int |
getFlags()
Gets the font flag value, which is a collection of various characteristics that describe the font. |
PRectangle |
getFontBBox()
Gets the fonts bounding box. |
java.lang.String |
getFontFamily()
Gets a string specifying the preferred font family name. |
java.lang.String |
getFontName()
Returns the PostScript name of the font. |
float |
getFontWeight()
Gets the weight (thickness) component of the fully-qualified font name or font specifier. |
float |
getMaxWidth()
Gets the maximum width of glyphs in the font. |
float |
getMissingWidth()
Gets the width to use for character codes whose widths are not specifed in the font's dictionary. |
void |
init()
Initiate the Font Descriptor object. |
java.lang.String |
toString()
Return a string representation of the all the FontDescriptor object's parsed attributes. |
| Methods inherited from class org.icepdf.core.pobjects.Dictionary |
|---|
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getPObjectReference, isDeleted, isNew, setDeleted, setNew, setPObjectReference |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Name TYPE
public static final Name FONT_NAME
public static final Name FONT_FAMILY
public static final Name MISSING_Stretch
public static final Name FONT_WEIGHT
public static final Name FLAGS
public static final Name FONT_BBOX
public static final Name ITALIC_ANGLE
public static final Name ASCENT
public static final Name DESCENT
public static final Name LEADING
public static final Name CAP_HEIGHT
public static final Name X_HEIGHT
public static final Name STEM_V
public static final Name STEM_H
public static final Name AVG_WIDTH
public static final Name MAX_WIDTH
public static final Name MISSING_WIDTH
public static final Name FONT_FILE
public static final Name FONT_FILE_2
public static final Name FONT_FILE_3
public static final Name FONT_FILE_3_TYPE_1C
public static final Name FONT_FILE_3_CID_FONT_TYPE_0
public static final Name FONT_FILE_3_CID_FONT_TYPE_2
public static final Name FONT_FILE_3_CID_FONT_TYPE_0C
public static final Name FONT_FILE_3_OPEN_TYPE
| Constructor Detail |
|---|
public FontDescriptor(Library l,
java.util.HashMap h)
l - Libaray of all objects in PDFh - hash of parsed FontDescriptor attributes| Method Detail |
|---|
public static FontDescriptor createDescriptor(Library library,
AFM afm)
AFM
library - document libraryafm - adobe font metrics data
FontDescriptorpublic java.lang.String getFontName()
public java.lang.String getFontFamily()
public float getFontWeight()
public float getMissingWidth()
public float getAverageWidth()
public float getMaxWidth()
public float getAscent()
public float getDescent()
public FontFile getEmbeddedFont()
public PRectangle getFontBBox()
public int getFlags()
public void init()
init in class Dictionarypublic java.lang.String toString()
toString in class Dictionary
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||