|
fop 0.90alpha1 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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") |
protected FontType |
subtype
the font's subtype (as defined by the constants FontType: TYPE0, TYPE1, MMTYPE1, TYPE3, TRUETYPE) |
Fields inherited from class org.apache.fop.pdf.PDFObject |
DATE_FORMAT, log |
Constructor Summary | |
PDFFont(java.lang.String fontname,
FontType subtype,
java.lang.String basefont,
java.lang.Object encoding)
create the /Font object |
Method Summary | |
static PDFFont |
createFont(java.lang.String fontname,
FontType subtype,
java.lang.String basefont,
java.lang.Object encoding)
factory method with the basic parameters |
static PDFFont |
createFont(java.lang.String fontname,
FontType 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 target)
This method is called to receive the specifics for the font's subtype. |
java.lang.String |
getName()
get the internal name used for this font |
protected java.lang.String |
getPDFNameForFontType(FontType fontType)
Returns the PDF name for a certain font type. |
java.lang.String |
toPDFString()
This method returns a String representation of the PDF object. |
Methods inherited from class org.apache.fop.pdf.PDFObject |
encode, encodeString, encodeText, formatDateTime, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, hasObjectNumber, output, referencePDF, setDocument, setObjectNumber, toPDF |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String fontname
protected FontType subtype
protected java.lang.String basefont
protected java.lang.Object encoding
null
then not written out in the PDF.
Constructor Detail |
public PDFFont(java.lang.String fontname, FontType subtype, java.lang.String basefont, java.lang.Object encoding)
fontname
- the internal name for the fontsubtype
- the font's subtypebasefont
- the base font nameencoding
- the character encoding schema used by the fontMethod Detail |
public static PDFFont createFont(java.lang.String fontname, FontType subtype, java.lang.String basefont, java.lang.Object encoding)
fontname
- the internal name for the fontsubtype
- the font's subtypebasefont
- the base font nameencoding
- the character encoding schema used by the font
public static PDFFont createFont(java.lang.String fontname, FontType subtype, java.lang.String basefont, java.lang.Object encoding, int firstChar, int lastChar, PDFArray widths, PDFFontDescriptor descriptor)
fontname
- 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 metrics
public java.lang.String getName()
protected java.lang.String getPDFNameForFontType(FontType fontType)
fontType
- font type
public java.lang.String toPDFString()
PDFObject
toPDFString
in class PDFObject
PDFObject.toPDFString()
protected void fillInPDF(java.lang.StringBuffer target)
The given buffer already contains the fields common to all font types.
target
- the buffer to be completed with the type specific fields
|
fop 0.90alpha1 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |