public class ExternalFontMapper
extends com.lowagie.text.pdf.DefaultFontMapper
Constructor and Description |
---|
ExternalFontMapper(String[] fontLocations)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
com.lowagie.text.pdf.BaseFont |
awtToPdf(Font font) |
static ExternalFontMapper |
createMapperFromResourceList(InputStream in)
Creates a font mapper given a stream of strings giving resource paths,
for resources available on the classpath.
|
static ExternalFontMapper |
createMapperFromResourcePaths(String[] paths)
Creates a font mapper given a list of font resource paths,
for resources available on the classpath.
|
static void |
main(String[] args)
When given the names of one or more zip/jar files as arguments,
this writes to standard output the absolute paths of any entries
that appear to be a TTF file.
|
static String[] |
readLines(InputStream in)
Reads lines of text from a stream.
|
static void |
writeLines(String[] lines,
OutputStream out)
Writes lines of text to a stream.
|
public ExternalFontMapper(String[] fontLocations)
fontLocations
- locations for font TTF files as supplied to the
FontFactory.register method; URLs work (probably files too)public com.lowagie.text.pdf.BaseFont awtToPdf(Font font)
awtToPdf
in interface com.lowagie.text.pdf.FontMapper
awtToPdf
in class com.lowagie.text.pdf.DefaultFontMapper
public static ExternalFontMapper createMapperFromResourcePaths(String[] paths)
paths
- absolute resource path strings for TTF filespublic static ExternalFontMapper createMapperFromResourceList(InputStream in) throws IOException
createMapperFromResourcePaths(java.lang.String[])
is called.
Each resource is on a separate line, encoding is UTF-8.in
- input streamIOException
public static String[] readLines(InputStream in) throws IOException
in
- input streamIOException
public static void writeLines(String[] lines, OutputStream out) throws IOException
lines
- lines to writeout
- output streamIOException
public static void main(String[] args) throws IOException
createMapperFromResourceList(java.io.InputStream)
method.args
- list of zip file namesIOException
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.