fop 0.95

org.apache.fop.render.ps
Class PSFontUtils

java.lang.Object
  extended by org.apache.xmlgraphics.ps.PSFontUtils
      extended by org.apache.fop.render.ps.PSFontUtils

public class PSFontUtils
extends org.apache.xmlgraphics.ps.PSFontUtils

Utility code for font handling in PostScript.


Field Summary
protected static org.apache.commons.logging.Log log
          logging instance
 
Fields inherited from class org.apache.xmlgraphics.ps.PSFontUtils
WINANSI_ENCODING_RESOURCE
 
Constructor Summary
PSFontUtils()
           
 
Method Summary
static java.util.Map determineSuppliedFonts(org.apache.xmlgraphics.ps.dsc.ResourceTracker resTracker, FontInfo fontInfo, java.util.Map fonts)
          Determines the set of fonts that will be supplied with the PS file and registers them with the resource tracker.
static void embedFont(org.apache.xmlgraphics.ps.PSGenerator gen, Typeface tf, org.apache.xmlgraphics.ps.PSResource fontRes)
          Embeds a font in the PostScript file.
static java.util.Map writeFontDict(org.apache.xmlgraphics.ps.PSGenerator gen, FontInfo fontInfo)
          Generates the PostScript code for the font dictionary.
static java.util.Map writeFontDict(org.apache.xmlgraphics.ps.PSGenerator gen, FontInfo fontInfo, java.util.Map fonts)
          Generates the PostScript code for the font dictionary.
 
Methods inherited from class org.apache.xmlgraphics.ps.PSFontUtils
defineWinAnsiEncoding, embedType1Font, redefineFontEncoding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log
logging instance

Constructor Detail

PSFontUtils

public PSFontUtils()
Method Detail

writeFontDict

public static java.util.Map writeFontDict(org.apache.xmlgraphics.ps.PSGenerator gen,
                                          FontInfo fontInfo)
                                   throws java.io.IOException
Generates the PostScript code for the font dictionary.

Parameters:
gen - PostScript generator to use for output
fontInfo - available fonts
Returns:
a Map of PSResource instances representing all defined fonts (key: font key)
Throws:
java.io.IOException - in case of an I/O problem

writeFontDict

public static java.util.Map writeFontDict(org.apache.xmlgraphics.ps.PSGenerator gen,
                                          FontInfo fontInfo,
                                          java.util.Map fonts)
                                   throws java.io.IOException
Generates the PostScript code for the font dictionary.

Parameters:
gen - PostScript generator to use for output
fontInfo - available fonts
fonts - the set of fonts to work with
Returns:
a Map of PSResource instances representing all defined fonts (key: font key)
Throws:
java.io.IOException - in case of an I/O problem

embedFont

public static void embedFont(org.apache.xmlgraphics.ps.PSGenerator gen,
                             Typeface tf,
                             org.apache.xmlgraphics.ps.PSResource fontRes)
                      throws java.io.IOException
Embeds a font in the PostScript file.

Parameters:
gen - the PostScript generator
tf - the font
fontRes - the PSResource associated with the font
Throws:
java.io.IOException - In case of an I/O error

determineSuppliedFonts

public static java.util.Map determineSuppliedFonts(org.apache.xmlgraphics.ps.dsc.ResourceTracker resTracker,
                                                   FontInfo fontInfo,
                                                   java.util.Map fonts)
Determines the set of fonts that will be supplied with the PS file and registers them with the resource tracker. All the fonts that are being processed are returned as a Map.

Parameters:
resTracker - the resource tracker
fontInfo - available fonts
fonts - the set of fonts to work with
Returns:
a Map of PSResource instances representing all defined fonts (key: font key)

fop 0.95

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.