org.apache.fop.pdf

Class PDFFontType3

Implemented Interfaces:
PDFWritable

public class PDFFontType3
extends PDFFontNonBase14

Class representing a Type3 font.

CAUTION: this is not yet fully implemented!!!!!!! the /CharProcs is still missing its toPDF() method.

Type3 fonts are specified on page 206 and onwards of the PDF 1.3 spec.

Field Summary

protected PDFCharProcs
charProcs
font's required /CharProcs dictionary
protected PDFRectangle
fontBBox
font's required /FontBBox bounding box
protected PDFArray
fontMatrix
font's required /FontMatrix array
protected PDFResources
resources
font's optional /Resources object

Fields inherited from class org.apache.fop.pdf.PDFFontNonBase14

descriptor, firstChar, lastChar, widths

Fields inherited from class org.apache.fop.pdf.PDFFont

basefont, encoding, fontname, subtype

Fields inherited from class org.apache.fop.pdf.PDFObject

DATE_FORMAT, log

Constructor Summary

PDFFontType3(String fontname, String basefont, Object encoding)
Create the /Font object
PDFFontType3(String fontname, String basefont, Object encoding, PDFRectangle fontBBox, PDFArray fontMatrix, PDFCharProcs charProcs)
Create the /Font object

Method Summary

protected void
fillInPDF(StringBuffer target)
void
setCharProcs(PDFCharProcs chars)
Set the glyphs' definitions.
void
setFontBBox(PDFRectangle bbox)
Set the font's bounding box
void
setFontMatrix(PDFArray matrix)
Set the font's transformation matrix

Methods inherited from class org.apache.fop.pdf.PDFFontNonBase14

fillInPDF, getDescriptor, setDescriptor, setWidthMetrics, validate

Methods inherited from class org.apache.fop.pdf.PDFFont

createFont, createFont, fillInPDF, getName, getPDFNameForFontType, toPDFString, validate

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, toPDFString

Field Details

charProcs

protected PDFCharProcs charProcs
font's required /CharProcs dictionary

fontBBox

protected PDFRectangle fontBBox
font's required /FontBBox bounding box

fontMatrix

protected PDFArray fontMatrix
font's required /FontMatrix array

resources

protected PDFResources resources
font's optional /Resources object

Constructor Details

PDFFontType3

public PDFFontType3(String fontname,
                    String basefont,
                    Object encoding)
Create the /Font object
Parameters:
fontname - the internal name for the font
basefont - the base font name
encoding - the character encoding schema used by the font

PDFFontType3

public PDFFontType3(String fontname,
                    String basefont,
                    Object encoding,
                    PDFRectangle fontBBox,
                    PDFArray fontMatrix,
                    PDFCharProcs charProcs)
Create the /Font object
Parameters:
fontname - the internal name for the font
basefont - the base font name
encoding - the character encoding schema used by the font
fontBBox - the font's bounding box
fontMatrix - the font's transformation matrix
charProcs - the glyphs' definitions

Method Details

fillInPDF

protected void fillInPDF(StringBuffer target)
Overrides:
fillInPDF in interface PDFFontNonBase14

setCharProcs

public void setCharProcs(PDFCharProcs chars)
Set the glyphs' definitions.

The /CharProcs object needs to be registered in the document's resources.

Parameters:
chars - the glyphs' dictionary

setFontBBox

public void setFontBBox(PDFRectangle bbox)
Set the font's bounding box
Parameters:
bbox - bounding box for the font

setFontMatrix

public void setFontMatrix(PDFArray matrix)
Set the font's transformation matrix
Parameters:
matrix - the transformation matrix for the font

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.