|
fop 0.94 | |||||||||
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.PDFFontDescriptor
public class PDFFontDescriptor
Class representing a font descriptor (/FontDescriptor object).
Font descriptors are specified on page 222 and onwards of the PDF 1.3 spec.
Field Summary |
---|
Fields inherited from class org.apache.fop.pdf.PDFObject |
---|
DATE_FORMAT, log |
Constructor Summary | |
---|---|
PDFFontDescriptor(java.lang.String basefont,
int ascent,
int descent,
int capHeight,
int flags,
PDFRectangle fontBBox,
int italicAngle,
int stemV)
Create the /FontDescriptor object |
Method Summary | |
---|---|
protected void |
fillInPDF(java.lang.StringBuffer begin)
Fill in the specifics for the font's descriptor. |
AbstractPDFStream |
getCIDSet()
|
AbstractPDFStream |
getFontFile()
|
void |
setCIDSet(AbstractPDFStream cidSet)
Sets the CIDSet stream for this font descriptor. |
void |
setFontFile(FontType subtype,
AbstractPDFStream fontfile)
Set the optional font file stream |
void |
setMetrics(int avgWidth,
int maxWidth,
int missingWidth,
int leading,
int stemH,
int xHeight)
Set the optional metrics. |
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, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, hasObjectNumber, makeReference, output, referencePDF, setDocument, setObjectNumber, toInlinePDFString, toPDF |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PDFFontDescriptor(java.lang.String basefont, int ascent, int descent, int capHeight, int flags, PDFRectangle fontBBox, int italicAngle, int stemV)
ascent
- the maximum height above the baselinedescent
- the maximum depth below the baselinecapHeight
- height of the capital lettersflags
- various characteristics of the fontfontBBox
- the bounding box for the described fontbasefont
- the base font nameitalicAngle
- the angle of the vertical dominant strokesstemV
- the width of the dominant vertical stems of glyphsMethod Detail |
---|
public void setMetrics(int avgWidth, int maxWidth, int missingWidth, int leading, int stemH, int xHeight)
avgWidth
- The average width of characters in this font.
The default value is 0.maxWidth
- The maximum width of characters in this font.
The default value is 0.missingWidth
- missing widthleading
- the desired spacing between lines of text.
The default value is 0.stemH
- The vertical width of the dominant horizontal stems of
glyphs in the font. The default value is 0.xHeight
- The y-coordinate of the top of flat non-ascending
lowercase letters, measured from the baseline. The default value is 0.public void setFontFile(FontType subtype, AbstractPDFStream fontfile)
subtype
- the font type defined in the font streamfontfile
- the stream containing an embedded fontpublic AbstractPDFStream getFontFile()
public void setCIDSet(AbstractPDFStream cidSet)
cidSet
- the CIDSet streampublic AbstractPDFStream getCIDSet()
public java.lang.String toPDFString()
PDFObject
toPDFString
in class PDFObject
PDFObject.toPDFString()
protected void fillInPDF(java.lang.StringBuffer begin)
The given buffer already contains the fields common to all descriptors.
begin
- the buffer to be completed with the specific fields
|
fop 0.94 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |