org.apache.fop.pdf
Class PDFFontNonBase14

java.lang.Object
  extended byorg.apache.fop.pdf.PDFObject
      extended byorg.apache.fop.pdf.PDFFont
          extended byorg.apache.fop.pdf.PDFFontNonBase14
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, MMTYPE1, subtype, TRUETYPE, TYPE_NAMES, TYPE0, TYPE1, TYPE3
 
Fields inherited from class org.apache.fop.pdf.PDFObject
generation, number
 
Constructor Summary
PDFFontNonBase14(int number, String fontname, byte subtype, String basefont, Object encoding)
          create the /Font object
 
Method Summary
protected  void fillInPDF(StringBuffer p)
          fill in the specifics for the font's subtype
 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
 
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

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

fillInPDF

protected void fillInPDF(StringBuffer p)
fill in the specifics for the font's subtype

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


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