org.freehep.graphicsio.pdf
Class PDFFontEmbedder
java.lang.Object
org.freehep.graphicsio.font.FontIncluder
org.freehep.graphicsio.font.FontEmbedder
org.freehep.graphicsio.pdf.PDFFontEmbedder
- Direct Known Subclasses:
- PDFFontEmbedderType3
public abstract class PDFFontEmbedder
- extends org.freehep.graphicsio.font.FontEmbedder
Superclass of all FontEmbedders for PDF documents. Subclasses must implement
all abstract methods which are called in the following order:
- addAdditionalEntries
- addAdditionalInitDicts
- writeGlyph once for each glyph in the order of the encoding
- Version:
- $Id: PDFFontEmbedder.java 8584 2006-08-10 23:06:37Z duns $
- Author:
- Simon Fischer
Field Summary |
protected PDFWriter |
pdf
sloppily declared protected |
Fields inherited from class org.freehep.graphicsio.font.FontEmbedder |
NOTDEF |
Fields inherited from class org.freehep.graphicsio.font.FontIncluder |
FONT_SIZE |
Methods inherited from class org.freehep.graphicsio.font.FontEmbedder |
closeGlyphs, getAdvanceWidth, getAdvanceWidths, getGlyph, getGlyphMetrics, includeFont, openGlyphs, writeGlyph |
Methods inherited from class org.freehep.graphicsio.font.FontIncluder |
closeIncludeFont, getCharName, getContext, getEncodingTable, getFont, getFontBBox, getFontName, getNODefinedChars, getUndefinedWidth, getUnicode, getUnicode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pdf
protected PDFWriter pdf
- sloppily declared protected
PDFFontEmbedder
public PDFFontEmbedder(FontRenderContext context,
PDFWriter pdf,
String reference,
PDFRedundanceTracker tracker)
getSubtype
protected abstract String getSubtype()
- Returns the font subtype (currently only Type3).
addAdditionalEntries
protected abstract void addAdditionalEntries(PDFDictionary fontDict)
throws IOException
- Add additional entries to the font Dictionary.
- Throws:
IOException
addAdditionalInitDicts
protected abstract void addAdditionalInitDicts()
throws IOException
- Add additional dicionaries to the PDFWriter which may be referenced by
entries generated by addAdditionalEntries()
- Throws:
IOException
getReference
protected String getReference()
- Returns the reference String that identifies the font dictionary. Use
this reference plus underscore plus suffix for other dictionaries.
openIncludeFont
protected void openIncludeFont()
throws IOException
- Specified by:
openIncludeFont
in class org.freehep.graphicsio.font.FontIncluder
- Throws:
IOException
closeEmbedFont
protected void closeEmbedFont()
- Specified by:
closeEmbedFont
in class org.freehep.graphicsio.font.FontEmbedder
writeWidths
protected void writeWidths(double[] widths)
throws IOException
- Specified by:
writeWidths
in class org.freehep.graphicsio.font.FontEmbedder
- Throws:
IOException
writeEncoding
protected void writeEncoding(org.freehep.graphics2d.font.CharTable charTable)
throws IOException
- Specified by:
writeEncoding
in class org.freehep.graphicsio.font.FontIncluder
- Throws:
IOException
writeEncoding
public static void writeEncoding(PDFWriter pdf,
String ref,
org.freehep.graphics2d.font.CharTable charTable)
throws IOException
- Throws:
IOException
createCharacterReference
protected String createCharacterReference(String characterName)
Copyright © 2000-2006 FreeHEP. All Rights Reserved.