de.dante.extex.backend.documentWriter.postscript.util
Class FontManager

java.lang.Object
  extended byde.dante.extex.backend.documentWriter.postscript.util.FontManager

public class FontManager
extends java.lang.Object

The font manager keeps track of the fonts and characters used.

Version:
$Revision: 1.3 $
Author:
Gerd Neugebauer

Constructor Summary
FontManager()
          Creates a new object.
 
Method Summary
 java.lang.String add(Font font, UnicodeChar c)
          Receive the information that a character in a certain font has been used and should be remembered.
 void clear()
          Clear the memory and forget everything about fonts used.
 Font[] listFonts()
          Getter for the list of fonts.
 void write(java.io.OutputStream stream)
          Write all fonts to a given PostScript stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontManager

public FontManager()
Creates a new object.

Method Detail

add

public java.lang.String add(Font font,
                            UnicodeChar c)
Receive the information that a character in a certain font has been used and should be remembered.

Parameters:
font - the font which is used
c - the character in the font which is used
Returns:
true iff the font is not the one previously reported

clear

public void clear()
Clear the memory and forget everything about fonts used.


listFonts

public Font[] listFonts()
Getter for the list of fonts.

Returns:
the list of fonts

write

public void write(java.io.OutputStream stream)
           throws java.io.IOException
Write all fonts to a given PostScript stream.

Parameters:
stream - the target stream
Throws:
java.io.IOException - in case of an IO error