org.apache.fop.pdf
Class PDFFontDescriptor
java.lang.Object
|
+--org.apache.fop.pdf.PDFObject
|
+--org.apache.fop.pdf.PDFFontDescriptor
- Direct Known Subclasses:
- PDFCIDFontDescriptor
- public class PDFFontDescriptor
- extends PDFObject
class representing a font descriptor.
Font descriptors are specified on page 222 and onwards of the PDF 1.3 spec.
Constructor Summary |
PDFFontDescriptor(int number,
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.
the given buffer already contains the fields common to all descriptors. |
void |
setFontFile(byte subtype,
PDFStream 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 |
byte[] |
toPDF()
produce the PDF representation for the object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ascent
protected int ascent
capHeight
protected int capHeight
descent
protected int descent
flags
protected int flags
fontBBox
protected PDFRectangle fontBBox
basefont
protected java.lang.String basefont
italicAngle
protected int italicAngle
stemV
protected int stemV
stemH
protected int stemH
xHeight
protected int xHeight
leading
protected int leading
avgWidth
protected int avgWidth
maxWidth
protected int maxWidth
missingWidth
protected int missingWidth
fontfile
protected PDFStream fontfile
subtype
protected byte subtype
PDFFontDescriptor
public PDFFontDescriptor(int number,
java.lang.String basefont,
int ascent,
int descent,
int capHeight,
int flags,
PDFRectangle fontBBox,
int italicAngle,
int stemV)
- create the /FontDescriptor object
- Parameters:
number
- the object's numberascent
- 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 glyphs
setMetrics
public void setMetrics(int avgWidth,
int maxWidth,
int missingWidth,
int leading,
int stemH,
int xHeight)
- set the optional metrics
setFontFile
public void setFontFile(byte subtype,
PDFStream fontfile)
- set the optional font file stream
- Parameters:
subtype
- the font type defined in the font streamfontfile
- the stream containing an embedded font
toPDF
public byte[] toPDF()
- produce the PDF representation for the object
- Returns:
- the PDF
fillInPDF
protected void fillInPDF(java.lang.StringBuffer begin)
- fill in the specifics for the font's descriptor.
the given buffer already contains the fields common to all descriptors.
- Parameters:
begin
- the buffer to be completed with the specific fields
Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.