org.apache.fop.pdf
Class PDFFontDescriptor

org.apache.fop.pdf.PDFObject
  |
  +--org.apache.fop.pdf.PDFFontDescriptor

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, String basefont, int ascent, int descent, int capHeight, int flags, PDFRectangle fontBBox, int italicAngle, int stemV)
          create the /FontDescriptor object

Method Summary
 voidsetFontFile(byte subtype, PDFStream fontfile)
          set the optional font file stream
 voidsetMetrics(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 org.apache.fop.pdf.PDFObject
getNumber, referencePDF

Constructor Detail

PDFFontDescriptor

public PDFFontDescriptor(int number, 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 number
ascent - the maximum height above the baseline
descent - the maximum depth below the baseline
capHeight - height of the capital letters
flags - various characteristics of the font
fontBBox - the bounding box for the described font
basefont - the base font name
italicAngle - the angle of the vertical dominant strokes
stemV - the width of the dominant vertical stems of glyphs
Method Detail

setFontFile

public void setFontFile(byte subtype, PDFStream fontfile)
set the optional font file stream
Parameters:
subtype - the font type defined in the font stream
fontfile - the stream containing an embedded font

setMetrics

public void setMetrics(int avgWidth, int maxWidth, int missingWidth, int leading, int stemH, int xHeight)
set the optional metrics

toPDF

public byte[] toPDF()
produce the PDF representation for the object
Returns: the PDF

Association Links

to Class org.apache.fop.pdf.PDFRectangle

to Class java.lang.String

to Class org.apache.fop.pdf.PDFStream