org.apache.fop.render.ps

Class PSFontUtils


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

Utility code for font handling in PostScript.

Field Summary

protected static Log
log
logging instance

Method Summary

static Map
determineSuppliedFonts(ResourceTracker resTracker, FontInfo fontInfo, 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(PSGenerator gen, Typeface tf, PSResource fontRes)
Embeds a font in the PostScript file.
static Map
writeFontDict(PSGenerator gen, FontInfo fontInfo)
Generates the PostScript code for the font dictionary.
static Map
writeFontDict(PSGenerator gen, FontInfo fontInfo, Map fonts)
Generates the PostScript code for the font dictionary.

Field Details

log

protected static Log log
logging instance

Method Details

determineSuppliedFonts

public static Map determineSuppliedFonts(ResourceTracker resTracker,
                                         FontInfo fontInfo,
                                         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)

embedFont

public static void embedFont(PSGenerator gen,
                             Typeface tf,
                             PSResource fontRes)
            throws IOException
Embeds a font in the PostScript file.
Parameters:
gen - the PostScript generator
tf - the font
fontRes - the PSResource associated with the font

writeFontDict

public static Map writeFontDict(PSGenerator gen,
                                FontInfo fontInfo)
            throws 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)

writeFontDict

public static Map writeFontDict(PSGenerator gen,
                                FontInfo fontInfo,
                                Map fonts)
            throws 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)

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