org.apache.fop.pdf
Class PDFFontDescriptor
- PDFWritable
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.
PDFFontDescriptor(String basefont, int ascent, int descent, int capHeight, int flags, PDFRectangle fontBBox, int italicAngle, int stemV) - Create the /FontDescriptor object
|
encode , encodeBinaryToHexString , encodeString , encodeText , formatDateTime , formatDateTime , formatObject , getDocument , getDocumentSafely , getGeneration , getObjectID , getObjectNumber , getParent , hasObjectNumber , makeReference , output , outputInline , referencePDF , setDocument , setObjectNumber , setParent , toPDF , toPDFString |
PDFFontDescriptor
public PDFFontDescriptor(String basefont,
int ascent,
int descent,
int capHeight,
int flags,
PDFRectangle fontBBox,
int italicAngle,
int stemV)
Create the /FontDescriptor object
basefont
- the base font nameascent
- 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 fontitalicAngle
- the angle of the vertical dominant strokesstemV
- the width of the dominant vertical stems of glyphs
getCIDSet
public AbstractPDFStream getCIDSet()
- the CIDSet stream or null if not applicable
getFontFile
public AbstractPDFStream getFontFile()
- the FontFile or null if the font is not embedded
setCIDSet
public void setCIDSet(AbstractPDFStream cidSet)
Sets the CIDSet stream for this font descriptor. (Optional)
cidSet
- the CIDSet stream
setFontFile
public void setFontFile(FontType subtype,
AbstractPDFStream fontfile)
Set the optional font file stream
subtype
- the font type defined in the font streamfontfile
- 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.
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.
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.