|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.fop.pdf.PDFObject | +--org.apache.fop.pdf.PDFFont
class representing a /Font object. A more complete object expressing the base font name and encoding of a font along with an internal name for the font used within streams of content. Fonts are specified on page 198 and onwards of the PDF 1.3 spec.
Field Summary | |
protected java.lang.String |
basefont
the base font name (eg "Helvetica") |
protected java.lang.Object |
encoding
the character encoding scheme used by the font. |
protected java.lang.String |
fontname
the internal name for the font (eg "F1") |
static byte |
MMTYPE1
font subtype to be used as parameter to createFont() |
protected byte |
subtype
the font's subtype (as defined by the constants TYPE0, TYPE1, MMTYPE1, TYPE3, TRUETYPE) |
static byte |
TRUETYPE
font subtype to be used as parameter to createFont() |
protected static java.lang.String[] |
TYPE_NAMES
font subtype names as output in the PDF |
static byte |
TYPE0
font subtype to be used as parameter to createFont() |
static byte |
TYPE1
font subtype to be used as parameter to createFont() |
static byte |
TYPE3
font subtype to be used as parameter to createFont() |
Fields inherited from class org.apache.fop.pdf.PDFObject |
generation,
number |
Constructor Summary | |
PDFFont(int number,
java.lang.String fontname,
byte subtype,
java.lang.String basefont,
java.lang.Object encoding)
create the /Font object |
Method Summary | |
static PDFFont |
createFont(int number,
java.lang.String fontname,
byte subtype,
java.lang.String basefont,
java.lang.Object encoding)
factory method with the basic parameters |
static PDFFont |
createFont(int number,
java.lang.String fontname,
byte subtype,
java.lang.String basefont,
java.lang.Object encoding,
int firstChar,
int lastChar,
PDFArray widths,
PDFFontDescriptor descriptor)
factory method with the extended parameters for Type1, MMType1 and TrueType |
protected void |
fillInPDF(java.lang.StringBuffer begin)
fill in the specifics for the font's subtype. |
java.lang.String |
getName()
get the internal name used for this font |
byte[] |
toPDF()
produce the PDF representation for the object |
Methods inherited from class org.apache.fop.pdf.PDFObject |
getNumber,
output,
referencePDF |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final byte TYPE0
public static final byte TYPE1
public static final byte MMTYPE1
public static final byte TYPE3
public static final byte TRUETYPE
protected static final java.lang.String[] TYPE_NAMES
protected java.lang.String fontname
protected byte subtype
protected java.lang.String basefont
protected java.lang.Object encoding
null
then not written out in the PDF.Constructor Detail |
public PDFFont(int number, java.lang.String fontname, byte subtype, java.lang.String basefont, java.lang.Object encoding)
number
- the object's numberfontname
- the internal name for the fontsubtype
- the font's subtypebasefont
- the base font nameencoding
- the character encoding schema used by the fontmapping
- the Unicode mapping mechanismMethod Detail |
public static PDFFont createFont(int number, java.lang.String fontname, byte subtype, java.lang.String basefont, java.lang.Object encoding)
number
- the object's numberfontname
- the internal name for the fontsubtype
- the font's subtypebasefont
- the base font nameencoding
- the character encoding schema used by the fontpublic static PDFFont createFont(int number, java.lang.String fontname, byte subtype, java.lang.String basefont, java.lang.Object encoding, int firstChar, int lastChar, PDFArray widths, PDFFontDescriptor descriptor)
number
- the object's numberfontname
- the internal name for the fontsubtype
- the font's subtypebasefont
- the base font nameencoding
- the character encoding schema used by the fontfirstChar
- the first character code in the fontlastChar
- the last character code in the fontwidths
- an array of size (lastChar - firstChar +1)descriptor
- the descriptor for other font's metricspublic java.lang.String getName()
public byte[] toPDF()
protected void fillInPDF(java.lang.StringBuffer begin)
begin
- the buffer to be completed with the type specific fields
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |