|
|||||||||
| 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 java.lang.String |
ASCENT
|
static java.lang.String |
AVG_WIDTH
|
static java.lang.String |
CAP_HEIGHT
|
static java.lang.String |
DESCENT
|
static java.lang.String |
FLAGS
|
static java.lang.String |
FONT_BBOX
|
static java.lang.String |
FONT_FAMILY
|
static java.lang.String |
FONT_NAME
|
static java.lang.String |
FONT_WEIGHT
|
static java.lang.String |
ITALIC_ANGLE
|
static java.lang.String |
LEADING
|
static java.lang.String |
MAX_WIDTH
|
static java.lang.String |
MISSING_Stretch
|
static java.lang.String |
MISSING_WIDTH
|
static java.lang.String |
STEM_H
|
static java.lang.String |
STEM_V
|
static java.lang.String |
X_HEIGHT
|
| Fields inherited from class org.icepdf.core.pobjects.Dictionary |
|---|
entries, inited, isDeleted, isNew, library, SUBTYPE_KEY, TYPE_KEY |
| Constructor Summary | |
|---|---|
FontDescriptor(Library l,
java.util.Hashtable 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, 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 java.lang.String FONT_NAME
public static final java.lang.String FONT_FAMILY
public static final java.lang.String MISSING_Stretch
public static final java.lang.String FONT_WEIGHT
public static final java.lang.String FLAGS
public static final java.lang.String FONT_BBOX
public static final java.lang.String ITALIC_ANGLE
public static final java.lang.String ASCENT
public static final java.lang.String DESCENT
public static final java.lang.String LEADING
public static final java.lang.String CAP_HEIGHT
public static final java.lang.String X_HEIGHT
public static final java.lang.String STEM_V
public static final java.lang.String STEM_H
public static final java.lang.String AVG_WIDTH
public static final java.lang.String MAX_WIDTH
public static final java.lang.String MISSING_WIDTH
| Constructor Detail |
|---|
public FontDescriptor(Library l,
java.util.Hashtable 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 | ||||||||