FreeHEP API
Version current

org.freehep.graphicsio.ps
Class PSFontEmbedder

java.lang.Object
  extended byorg.freehep.graphicsio.font.FontIncluder
      extended byorg.freehep.graphicsio.font.FontEmbedder
          extended byorg.freehep.graphicsio.ps.PSFontEmbedder

public class PSFontEmbedder
extends FontEmbedder

Type 3 Font Embedder class for Postscript.

Version:
$Id: PSFontEmbedder.java,v 1.3 2005/01/04 00:45:56 duns Exp $
Author:
Sami Kama
Source Code:
PSFontEmbedder.java

Field Summary
protected  int dictSize
           
protected  PrintStream os
           
 
Fields inherited from class org.freehep.graphicsio.font.FontEmbedder
NOTDEF
 
Fields inherited from class org.freehep.graphicsio.font.FontIncluder
FONT_SIZE
 
Constructor Summary
PSFontEmbedder(FontRenderContext context, PrintStream os)
           
 
Method Summary
protected  void closeEmbedFont()
          Closes font dictionary.
protected  void closeGlyphs()
          Closes Glyphs dictionary.
protected  void closeIncludeFont()
          Closes font dictionary.
protected  void openGlyphs()
          Writes necessary commands to find Glyphs dictionary from font dictionary and puts it on the stack, opens dictionary to write glyph definitions.
protected  void openIncludeFont()
          Writes initial parts of the font dictionary.
protected  void writeBuildProcs()
           
protected  void writeEncoding(CharTable charTable)
          writes encoding array.
protected  void writeGlyph(String unicodeName, Shape glyph, GlyphMetrics glyphMetrics)
          Writes Glyph definition of given glyph.
protected  void writeWidths(double[] widths)
          writes metric dictionary for the font.
 
Methods inherited from class org.freehep.graphicsio.font.FontEmbedder
getAdvanceWidth, getAdvanceWidths, getGlyph, getGlyphMetrics, includeFont
 
Methods inherited from class org.freehep.graphicsio.font.FontIncluder
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

dictSize

protected int dictSize

os

protected PrintStream os
Constructor Detail

PSFontEmbedder

public PSFontEmbedder(FontRenderContext context,
                      PrintStream os)
Method Detail

writeGlyph

protected void writeGlyph(String unicodeName,
                          Shape glyph,
                          GlyphMetrics glyphMetrics)
                   throws IOException
Writes Glyph definition of given glyph.

Specified by:
writeGlyph in class FontEmbedder
Parameters:
unicodeName - the character's name according to the unicode standard
glyph - the shape that represents this glyph
glyphMetrics - the metrics of this glyph
Throws:
IOException

writeWidths

protected void writeWidths(double[] widths)
                    throws IOException
writes metric dictionary for the font.

Specified by:
writeWidths in class FontEmbedder
Throws:
IOException

writeEncoding

protected void writeEncoding(CharTable charTable)
                      throws IOException
writes encoding array.

Specified by:
writeEncoding in class FontIncluder
Throws:
IOException

openIncludeFont

protected void openIncludeFont()
                        throws IOException
Writes initial parts of the font dictionary.

Specified by:
openIncludeFont in class FontIncluder
Throws:
IOException

closeIncludeFont

protected void closeIncludeFont()
                         throws IOException
Closes font dictionary.

Overrides:
closeIncludeFont in class FontIncluder
Throws:
IOException

writeBuildProcs

protected void writeBuildProcs()
                        throws IOException
Throws:
IOException

openGlyphs

protected void openGlyphs()
                   throws IOException
Writes necessary commands to find Glyphs dictionary from font dictionary and puts it on the stack, opens dictionary to write glyph definitions.

Overrides:
openGlyphs in class FontEmbedder
Throws:
IOException

closeGlyphs

protected void closeGlyphs()
                    throws IOException
Closes Glyphs dictionary.

Overrides:
closeGlyphs in class FontEmbedder
Throws:
IOException

closeEmbedFont

protected void closeEmbedFont()
                       throws IOException
Closes font dictionary.

Specified by:
closeEmbedFont in class FontEmbedder
Throws:
IOException

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.