FreeHEP API
Version v1.1

org.freehep.graphicsio.ps
Class PSFontTable

java.lang.Object
  |
  +--org.freehep.graphicsio.font.FontTable
        |
        +--org.freehep.graphicsio.ps.PSFontTable

public class PSFontTable
extends FontTable

FontTable for PS files. The fonts name is used as a reference for the font. When the font is first used, it is embedded to the file if it is not a standard font. If it is unknown it is not substituted.

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

Nested Class Summary
 
Nested classes inherited from class org.freehep.graphicsio.font.FontTable
FontTable.Entry
 
Constructor Summary
PSFontTable(OutputStream out, FontRenderContext context)
           
 
Method Summary
 String createFontReference(Font font)
          Uses the font name as a reference.
 void firstRequest(FontTable.Entry e)
          Called whenever a specific font is used for the first time.
 CharTable getLatinTable()
          Returns a default CharTable to be used for normal text (not Symbol or Dingbats).
static boolean isStandardFont(Font font)
           
 void setEmbed(int embed)
           
 void setFontRenderContext(FontRenderContext context)
           
 
Methods inherited from class org.freehep.graphicsio.font.FontTable
fontReference, getEntries
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PSFontTable

public PSFontTable(OutputStream out,
                   FontRenderContext context)
Method Detail

setFontRenderContext

public void setFontRenderContext(FontRenderContext context)

getLatinTable

public CharTable getLatinTable()
Description copied from class: FontTable
Returns a default CharTable to be used for normal text (not Symbol or Dingbats).

Specified by:
getLatinTable in class FontTable

setEmbed

public void setEmbed(int embed)

firstRequest

public void firstRequest(FontTable.Entry e)
                  throws IOException
Description copied from class: FontTable
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.

Specified by:
firstRequest in class FontTable
IOException

isStandardFont

public static boolean isStandardFont(Font font)

createFontReference

public String createFontReference(Font font)
Uses the font name as a reference. Whitespace is stripped. The font style (italic/bold) is added as a suffix delimited by a dash.

Specified by:
createFontReference in class FontTable

FreeHEP API
Version v1.1

Copyright © 2000-2002 FreeHEP, All Rights Reserved.