public final class FontFactory extends Object
| Constructor and Description |
|---|
FontFactory() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getNumBytesNeededToIdentify()
Returns the number of initial bytes necessary to identify a stream as a type1 font
|
static int |
getNumBytesNeededToIdentifyAFM()
Returns the number of initial bytes necessary to identify a stream as an AFM
|
static int |
getNumBytesNeededToIdentifyPFM()
Returns the number of initial bytes necessary to identify a stream as a PFM
|
static boolean |
isAFM(byte[] startingBytes)
Determines if startingBytes represents the start of an AFM
|
static boolean |
isPFM(byte[] startingBytes)
Determines if startingBytes represents the start of a PFM
|
static boolean |
isType1(byte[] startingBytes)
Determines if startingBytes represents the start of a type1 font
|
static Type1Font[] |
load(FontInputStream in,
URL url)
Given an input stream, creates Type1Font objects that represent it.
|
static MetricFile |
loadAFM(FontInputStream str,
URL url)
If the stream contains an AFM, it creates an AFM and returns it.
|
static MetricFile |
loadPFM(FontInputStream str,
URL url)
If the stream contains an PFM, it creates an PFM object and returns it.
|
public static int getNumBytesNeededToIdentify()
public static boolean isType1(byte[] startingBytes)
startingBytes - The initial file bytespublic static int getNumBytesNeededToIdentifyAFM()
public static boolean isAFM(byte[] startingBytes)
startingBytes - The initial file bytespublic static int getNumBytesNeededToIdentifyPFM()
public static boolean isPFM(byte[] startingBytes)
startingBytes - The initial file bytespublic static Type1Font[] load(FontInputStream in, URL url) throws IOException, InvalidFontException, UnsupportedFontException
in - The input streamIOException - Thrown if the stream cannot be readInvalidFontException - Thrown if the stream does not represent a valid type1 font.UnsupportedFontExceptionpublic static MetricFile loadAFM(FontInputStream str, URL url) throws IOException, InvalidFontException
str - The stream to be probed.IOException - Thrown if the stream cannot be readInvalidFontException - Thrown if the stream does not represent a valid AFMpublic static MetricFile loadPFM(FontInputStream str, URL url) throws IOException, InvalidFontException
str - The stream to be probed.IOException - Thrown if the stream cannot be readInvalidFontExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved