fop 0.94

org.apache.fop.pdf
Class PDFFontNonBase14

java.lang.Object
  extended by org.apache.fop.pdf.PDFObject
      extended by org.apache.fop.pdf.PDFFont
          extended by org.apache.fop.pdf.PDFFontNonBase14
All Implemented Interfaces:
PDFWritable
Direct Known Subclasses:
PDFFontTrueType, PDFFontType0, PDFFontType1, PDFFontType3

public abstract class PDFFontNonBase14
extends PDFFont

A common ancestor for Type1, TrueType, MMType1 and Type3 fonts (all except base 14 fonts).


Field Summary
protected  PDFFontDescriptor descriptor
          descriptor of font metrics
protected  int firstChar
          first character code in the font
protected  int lastChar
          last character code in the font
protected  PDFArray widths
          widths of characters from firstChar to lastChar
 
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
PDFFontNonBase14(java.lang.String fontname, FontType subtype, java.lang.String basefont, java.lang.Object encoding)
          Create the /Font object
 
Method Summary
protected  void fillInPDF(java.lang.StringBuffer target)
          This method is called to receive the specifics for the font's subtype.
 PDFFontDescriptor getDescriptor()
           
 void setDescriptor(PDFFontDescriptor descriptor)
          Set the font descriptor (unused for the Type3 fonts)
 void setWidthMetrics(int firstChar, int lastChar, PDFArray widths)
          Set the width metrics for the font
protected  void validate()
          Validates the PDF object prior to serialization.
 
Methods inherited from class org.apache.fop.pdf.PDFFont
createFont, createFont, getName, getPDFNameForFontType, toPDFString
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

firstChar

protected int firstChar
first character code in the font


lastChar

protected int lastChar
last character code in the font


widths

protected PDFArray widths
widths of characters from firstChar to lastChar


descriptor

protected PDFFontDescriptor descriptor
descriptor of font metrics

Constructor Detail

PDFFontNonBase14

public PDFFontNonBase14(java.lang.String fontname,
                        FontType subtype,
                        java.lang.String basefont,
                        java.lang.Object encoding)
Create the /Font object

Parameters:
fontname - the internal name for the font
subtype - the font's subtype
basefont - the base font name
encoding - the character encoding schema used by the font
Method Detail

setWidthMetrics

public void setWidthMetrics(int firstChar,
                            int lastChar,
                            PDFArray widths)
Set the width metrics for the font

Parameters:
firstChar - the first character code in the font
lastChar - the last character code in the font
widths - an array of size (lastChar - firstChar +1)

setDescriptor

public void setDescriptor(PDFFontDescriptor descriptor)
Set the font descriptor (unused for the Type3 fonts)

Parameters:
descriptor - the descriptor for other font's metrics

getDescriptor

public PDFFontDescriptor getDescriptor()
Returns:
the FontDescriptor or null if there is none

validate

protected void validate()
Description copied from class: PDFFont
Validates the PDF object prior to serialization.

Overrides:
validate in class PDFFont
See Also:
PDFFont.validate()

fillInPDF

protected void fillInPDF(java.lang.StringBuffer target)
Description copied from class: PDFFont
This method is called to receive the specifics for the font's subtype.

The given buffer already contains the fields common to all font types.

Overrides:
fillInPDF in class PDFFont
Parameters:
target - the buffer to be completed with the type specific fields
See Also:
PDFFont.fillInPDF(StringBuffer)

fop 0.94

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