FreeHEP API
Version current

org.freehep.graphicsio.pdf
Class PDFFontEmbedder

java.lang.Object
  extended byorg.freehep.graphicsio.font.FontIncluder
      extended byorg.freehep.graphicsio.font.FontEmbedder
          extended byorg.freehep.graphicsio.pdf.PDFFontEmbedder
Direct Known Subclasses:
PDFFontEmbedderType3

public abstract class PDFFontEmbedder
extends FontEmbedder

Superclass of all FontEmbedders for PDF documents. Subclasses must implement all abstract methods which are called in the following order:

Version:
$Id: PDFFontEmbedder.java,v 1.2 2005/01/04 00:45:54 duns Exp $
Author:
Simon Fischer
Source Code:
PDFFontEmbedder.java

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
 
Constructor Summary
PDFFontEmbedder(FontRenderContext context, PDFWriter pdf, String reference, PDFRedundanceTracker tracker)
           
 
Method Summary
protected abstract  void addAdditionalEntries(PDFDictionary fontDict)
          Add additional entries to the font Dictionary.
protected abstract  void addAdditionalInitDicts()
          Add additional dicionaries to the PDFWriter which may be referenced by entries generated by addAdditionalEntries()
protected  void closeEmbedFont()
           
protected  String createCharacterReference(String characterName)
           
protected  String getReference()
          Returns the reference String that identifies the font dictionary.
protected abstract  String getSubtype()
          Returns the font subtype (currently only Type3).
protected  void openIncludeFont()
          Writes the given information about the font into the file.
protected  void writeEncoding(CharTable charTable)
          Writes the encoding table to the file.
static void writeEncoding(PDFWriter pdf, String ref, CharTable charTable)
           
protected  void writeWidths(double[] widths)
          Writes the character widths to the file.
 
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
 

Field Detail

pdf

protected PDFWriter pdf
sloppily declared protected

Constructor Detail

PDFFontEmbedder

public PDFFontEmbedder(FontRenderContext context,
                       PDFWriter pdf,
                       String reference,
                       PDFRedundanceTracker tracker)
Method Detail

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
Description copied from class: FontIncluder
Writes the given information about the font into the file. When this method is called all getXXX() are guaranteed to return reasonable values.

Specified by:
openIncludeFont in class FontIncluder
Throws:
IOException

closeEmbedFont

protected void closeEmbedFont()
Specified by:
closeEmbedFont in class FontEmbedder

writeWidths

protected void writeWidths(double[] widths)
                    throws IOException
Description copied from class: FontEmbedder
Writes the character widths to the file.

Specified by:
writeWidths in class FontEmbedder
Throws:
IOException

writeEncoding

protected void writeEncoding(CharTable charTable)
                      throws IOException
Description copied from class: FontIncluder
Writes the encoding table to the file.

Specified by:
writeEncoding in class FontIncluder
Throws:
IOException

writeEncoding

public static void writeEncoding(PDFWriter pdf,
                                 String ref,
                                 CharTable charTable)
                          throws IOException
Throws:
IOException

createCharacterReference

protected String createCharacterReference(String characterName)

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.