FreeHEP API
Version v1.1

org.freehep.graphicsio.font
Class FontTable

java.lang.Object
  |
  +--org.freehep.graphicsio.font.FontTable
Direct Known Subclasses:
PDFFontTable, PSFontTable

public abstract class FontTable
extends Object

A table to remember which fonts were used while writing a document.

Version:
$Id: FontTable.java,v 1.1 2002/07/30 19:11:24 duns Exp $
Author:
Simon Fischer

Nested Class Summary
protected  class FontTable.Entry
           
 
Constructor Summary
FontTable()
           
 
Method Summary
abstract  String createFontReference(Font f)
          Creates a unique reference to address this font.
abstract  void firstRequest(FontTable.Entry e)
          Called whenever a specific font is used for the first time.
 String fontReference(Font font)
          Returns a name for this font that can be used in the document.
 Collection getEntries()
          Returns a Collection view of all fonts.
abstract  CharTable getLatinTable()
          Returns a default CharTable to be used for normal text (not Symbol or Dingbats).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontTable

public FontTable()
Method Detail

getLatinTable

public abstract CharTable getLatinTable()
Returns a default CharTable to be used for normal text (not Symbol or Dingbats).


firstRequest

public abstract void firstRequest(FontTable.Entry e)
                           throws IOException
Called whenever a specific font is used for the first time. Subclasses may use this method to include the font instantly. This method may change the value of the reference by calling e.setReference(String) e.g. if it wants to substitute the font by a standard font that can be addressed under a name different from the generated one.

IOException

createFontReference

public abstract String createFontReference(Font f)
Creates a unique reference to address this font.


fontReference

public String fontReference(Font font)
Returns a name for this font that can be used in the document. A new name is generated if the font was not used yet. For different fontsizes the same name is returned.


getEntries

public Collection getEntries()
Returns a Collection view of all fonts. The elements of the collection are Entries.


FreeHEP API
Version v1.1

Copyright © 2000-2002 FreeHEP, All Rights Reserved.