public class PSFontUtils
extends org.apache.xmlgraphics.ps.PSFontUtils
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log
logging instance
|
Constructor and Description |
---|
PSFontUtils() |
Modifier and Type | Method and Description |
---|---|
static org.apache.xmlgraphics.ps.PSResource |
defineDerivedFont(org.apache.xmlgraphics.ps.PSGenerator gen,
java.lang.String baseFontName,
java.lang.String fontName,
java.lang.String encoding)
Derives a new font based on an existing font with a given encoding.
|
static org.apache.xmlgraphics.ps.PSResource |
defineEncoding(org.apache.xmlgraphics.ps.PSGenerator gen,
SingleByteEncoding encoding)
Defines the single-byte encoding for use in PostScript files.
|
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.
|
public static java.util.Map writeFontDict(org.apache.xmlgraphics.ps.PSGenerator gen, FontInfo fontInfo) throws java.io.IOException
gen
- PostScript generator to use for outputfontInfo
- available fontsjava.io.IOException
- in case of an I/O problempublic static java.util.Map writeFontDict(org.apache.xmlgraphics.ps.PSGenerator gen, FontInfo fontInfo, java.util.Map fonts) throws java.io.IOException
gen
- PostScript generator to use for outputfontInfo
- available fontsfonts
- the set of fonts to work withjava.io.IOException
- in case of an I/O problempublic static void embedFont(org.apache.xmlgraphics.ps.PSGenerator gen, Typeface tf, org.apache.xmlgraphics.ps.PSResource fontRes) throws java.io.IOException
gen
- the PostScript generatortf
- the fontfontRes
- the PSResource associated with the fontjava.io.IOException
- In case of an I/O errorpublic static java.util.Map determineSuppliedFonts(org.apache.xmlgraphics.ps.dsc.ResourceTracker resTracker, FontInfo fontInfo, java.util.Map fonts)
resTracker
- the resource trackerfontInfo
- available fontsfonts
- the set of fonts to work withpublic static org.apache.xmlgraphics.ps.PSResource defineEncoding(org.apache.xmlgraphics.ps.PSGenerator gen, SingleByteEncoding encoding) throws java.io.IOException
gen
- the PostScript generatorencoding
- the single-byte encodingjava.io.IOException
- In case of an I/O problempublic static org.apache.xmlgraphics.ps.PSResource defineDerivedFont(org.apache.xmlgraphics.ps.PSGenerator gen, java.lang.String baseFontName, java.lang.String fontName, java.lang.String encoding) throws java.io.IOException
gen
- the PostScript generatorbaseFontName
- the font name of the font to derive fromfontName
- the font name of the new font to be defineencoding
- the new encoding (must be predefined in the PS file)java.io.IOException
- In case of an I/O problemCopyright 1999-2010 The Apache Software Foundation. All Rights Reserved.