org.apache.fop.pdf

Class PDFFontNonBase14

Implemented Interfaces:
PDFWritable
Known Direct Subclasses:
PDFFontTrueType, 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

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

entries, order

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

DATE_FORMAT, log

Constructor Summary

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

Method Summary

PDFFontDescriptor
getDescriptor()
void
setDescriptor(PDFFontDescriptor descriptor)
Set the font descriptor (unused for the Type3 fonts)
void
setToUnicode(PDFCMap cmap)
Sets a ToUnicode CMap.
void
setWidthMetrics(int firstChar, int lastChar, PDFArray widths)
Set the width metrics for the font
protected void
validate()

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

createFont, getBaseFont, getName, getPDFNameForFontType, output, setEncoding, setEncoding, validate

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

get, output, put, put, writeDictionary

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

encode, encodeBinaryToHexString, encodeString, encodeText, formatDateTime, formatDateTime, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, output, outputInline, referencePDF, setDocument, setObjectNumber, setParent, toPDF, toPDFString

Constructor Details

PDFFontNonBase14

public PDFFontNonBase14(String fontname,
                        FontType subtype,
                        String basefont,
                        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 Details

getDescriptor

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

setDescriptor

public void setDescriptor(PDFFontDescriptor descriptor)
Set the font descriptor (unused for the Type3 fonts)
Parameters:
descriptor - the descriptor for other font's metrics

setToUnicode

public void setToUnicode(PDFCMap cmap)
Sets a ToUnicode CMap.
Parameters:
cmap - the ToUnicode character map

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)

validate

protected void validate()
Overrides:
validate in interface PDFFont

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