org.apache.fop.pdf
Class PDFFontType3

java.lang.Object
  extended by org.apache.fop.pdf.PDFObject
      extended by org.apache.fop.pdf.PDFFont
          extended by org.apache.fop.pdf.PDFFontNonBase14
              extended by org.apache.fop.pdf.PDFFontType3

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, MMTYPE1, subtype, TRUETYPE, TYPE_NAMES, TYPE0, TYPE1, TYPE3
 
Fields inherited from class org.apache.fop.pdf.PDFObject
generation, number
 
Constructor Summary
PDFFontType3(int number, String fontname, byte subtype, String basefont, Object encoding)
          create the /Font object
PDFFontType3(int number, String fontname, byte subtype, String basefont, Object encoding, PDFRectangle fontBBox, PDFArray fontMatrix, PDFCharProcs charProcs)
          create the /Font object
 
Method Summary
protected  void fillInPDF(StringBuffer p)
          fill in the specifics for the font's subtype.
 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
setDescriptor, setWidthMetrics
 
Methods inherited from class org.apache.fop.pdf.PDFFont
createFont, createFont, getName, toPDF
 
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

fontBBox

protected PDFRectangle fontBBox
font's required /FontBBox bounding box


fontMatrix

protected PDFArray fontMatrix
font's required /FontMatrix array


charProcs

protected PDFCharProcs charProcs
font's required /CharProcs dictionary


resources

protected PDFResources resources
font's optional /Resources object

Constructor Detail

PDFFontType3

public PDFFontType3(int number,
                    String fontname,
                    byte subtype,
                    String basefont,
                    Object encoding)
create the /Font object

Parameters:
number - the object's number
fontname - the internal name for the font
subtype - the font's subtype (PDFFont.TYPE3)
basefont - the base font name
encoding - the character encoding schema used by the font
mapping - the Unicode mapping mechanism

PDFFontType3

public PDFFontType3(int number,
                    String fontname,
                    byte subtype,
                    String basefont,
                    Object encoding,
                    PDFRectangle fontBBox,
                    PDFArray fontMatrix,
                    PDFCharProcs charProcs)
create the /Font object

Parameters:
number - the object's number
fontname - the internal name for the font
subtype - the font's subtype (PDFFont.TYPE3)
basefont - the base font name
encoding - the character encoding schema used by the font
mapping - the Unicode mapping mechanism
fontBBox - the font's bounding box
fontMatrix - the font's transformation matrix
charProcs - the glyphs' definitions
Method Detail

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

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

fillInPDF

protected void fillInPDF(StringBuffer p)
fill in the specifics for the font's subtype. the given buffer already contains the fields common to all font types.

Overrides:
fillInPDF in class PDFFontNonBase14
Parameters:
p - the buffer to be completed with the type specific fields


Copyright ? 1999-2003 Apache Software Foundation. All Rights Reserved.