## 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.

Field Summary
`protected int` `ascent`
`protected int` `avgWidth`
`protected java.lang.String` `basefont`
`protected int` `capHeight`
`protected int` `descent`
`protected int` `flags`
`protected PDFRectangle` `fontBBox`
`protected PDFStream` `fontfile`
`protected int` `italicAngle`
`protected int` `leading`
`protected int` `maxWidth`
`protected int` `missingWidth`
`protected int` `stemH`
`protected int` `stemV`
`protected byte` `subtype`
`protected int` `xHeight`

Fields inherited from class org.apache.fop.pdf.PDFObject
`generation, number`

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.
`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 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

### 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

Constructor Detail

### 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 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

### 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 stream
    `fontfile` - 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-2001 Apache Software Foundation. All Rights Reserved.