|
intarsys PDF library API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.intarsys.pdf.cos.COSBasedObject
de.intarsys.pdf.pd.PDObject
de.intarsys.pdf.font.PDFont
public abstract class PDFont
A PDF font object.
Nested Class Summary | |
---|---|
static class |
PDFont.MetaClass
The meta class implementation |
Field Summary | |
---|---|
static COSName |
CN_Subtype_CIDFontType0
|
static COSName |
CN_Subtype_CIDFontType2
|
static COSName |
CN_Subtype_MMType1
|
static COSName |
CN_Subtype_TrueType
|
static COSName |
CN_Subtype_Type0
|
static COSName |
CN_Subtype_Type1
|
static COSName |
CN_Subtype_Type3
|
static COSName |
CN_Type_Font
|
static COSName |
DK_BaseFont
|
static COSName |
DK_Encoding
|
static COSName |
DK_FirstChar
|
static COSName |
DK_FontDescriptor
|
static COSName |
DK_LastChar
|
static COSName |
DK_Name
|
static COSName |
DK_ToUnicode
|
static COSName |
DK_Widths
|
static PDFont.MetaClass |
META
The meta class instance |
Fields inherited from class de.intarsys.pdf.pd.PDObject |
---|
DK_Subtype, DK_Type |
Method Summary | |
---|---|
void |
compress()
|
COSName |
getBaseFont()
|
Encoding |
getEncoding()
The encoding of the glyphs in the font |
int |
getFirstChar()
The first codepoint defined in the font. |
PDFontDescriptor |
getFontDescriptor()
|
static String |
getFontFamilyName(String name)
|
static String |
getFontName(String name)
extracts the "name" portion from the given font name string |
static FontStyle |
getFontStyle(String name)
extracts the "style" portion from the given font name |
int |
getGlyphWidth(int codePoint)
return the glyph width of a codepoint in the receiver font |
int[] |
getGlyphWidths()
|
int |
getLastChar()
|
int |
getMacintoshRomanCode(int codePoint)
This is a special mapping that is used if we have a font on the physical device using a Macintosh Roman encoding character map. |
int |
getMissingWidth()
|
abstract CID |
getNextCID(byte[] bytes,
int offset)
|
CMap |
getToUnicode()
|
abstract float |
getUnderlinePosition()
|
abstract int |
getUnderlineThickness()
|
int |
getUnicode(int byteCode)
|
boolean |
isCharUsed(int c)
|
boolean |
isEmbedded()
Answer true if this font's program is embedded within the document. |
boolean |
isStandardFont()
Answer true if this is one of the 14 standard fonts. |
boolean |
isSubset()
Answer true if this font is partially embedded in the document. |
void |
setBaseFont(String name)
|
void |
setCharUsed(int c)
|
void |
setEncoding(Encoding newFontEncoding)
set an encoding for the font |
void |
setFontDescriptor(PDFontDescriptor descriptor)
|
String |
toString()
|
Methods inherited from class de.intarsys.pdf.pd.PDObject |
---|
cosGetFieldDescendant, cosGetFieldInheritable, cosGetFieldInherited, cosGetSubtype, cosGetType, cosRemoveFieldInheritable, cosSetFieldInheritable, cosSetSubtype, cosSetType, getDoc, getGenericChildren, getGenericParent, setGenericParent |
Methods inherited from class de.intarsys.pdf.cos.COSBasedObject |
---|
changed, cosGetArray, cosGetDict, cosGetDoc, cosGetField, cosGetObject, cosGetStream, cosHasField, cosRemoveField, cosSetField, getAttribute, getFieldBoolean, getFieldDate, getFieldFixed, getFieldFixedArray, getFieldInt, getFieldMLString, getFieldString, invalidateCaches, removeAttribute, setAttribute, setFieldBoolean, setFieldFixed, setFieldInt, setFieldMLString, setFieldName, setFieldObject, setFieldString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.intarsys.font.IFont |
---|
getFontFamilyName, getFontName, getFontStyle |
Field Detail |
---|
public static final COSName CN_Subtype_CIDFontType0
public static final COSName CN_Subtype_CIDFontType2
public static final COSName CN_Subtype_MMType1
public static final COSName CN_Subtype_TrueType
public static final COSName CN_Subtype_Type0
public static final COSName CN_Subtype_Type1
public static final COSName CN_Subtype_Type3
public static final COSName CN_Type_Font
public static final COSName DK_BaseFont
public static final COSName DK_Encoding
public static final COSName DK_FirstChar
public static final COSName DK_FontDescriptor
public static final COSName DK_LastChar
public static final COSName DK_ToUnicode
public static final COSName DK_Widths
public static final COSName DK_Name
public static final PDFont.MetaClass META
Method Detail |
---|
public static String getFontFamilyName(String name)
public static String getFontName(String name)
name
- a font name
public static FontStyle getFontStyle(String name)
name
- a font name
public void compress()
public COSName getBaseFont()
public Encoding getEncoding()
public int getFirstChar()
public PDFontDescriptor getFontDescriptor()
public int getGlyphWidth(int codePoint)
codePoint
- the index of the glyph in the font
public int[] getGlyphWidths()
public int getLastChar()
public int getMacintoshRomanCode(int codePoint)
See PDF docs, "Encodings for True Type fonts".
codePoint
-
codePoint
public int getMissingWidth()
public abstract CID getNextCID(byte[] bytes, int offset)
public CMap getToUnicode()
public abstract float getUnderlinePosition()
public abstract int getUnderlineThickness()
public int getUnicode(int byteCode)
public boolean isCharUsed(int c)
public boolean isEmbedded()
public boolean isStandardFont()
public boolean isSubset()
public void setBaseFont(String name)
public void setCharUsed(int c)
public void setEncoding(Encoding newFontEncoding)
newFontEncoding
- the new encoding to usepublic void setFontDescriptor(PDFontDescriptor descriptor)
public String toString()
toString
in class PDObject
|
intarsys PDF library API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |