public final class FontFactory
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
boolean |
fingerprintFont()
Get the state of the fingerprinting option for fonts that are loaded.
|
void |
fingerprintFont(boolean fingerprint)
Toggle whether fonts that are loaded are fingerprinted with a SHA-1 hash.
|
static FontFactory |
getInstance()
Factory method for the construction of a font factory.
|
Font[] |
loadFonts(byte[] b)
Load the font(s) from the byte array.
|
Font[] |
loadFonts(java.io.InputStream is)
Load the font(s) from the input stream.
|
Font.Builder[] |
loadFontsForBuilding(byte[] b)
Load the font(s) from the byte array into font builders.
|
Font.Builder[] |
loadFontsForBuilding(java.io.InputStream is)
Load the font(s) from the input stream into font builders.
|
Font.Builder |
newFontBuilder()
Get an empty font builder for creating a new font from scratch.
|
void |
serializeFont(Font font,
java.io.OutputStream os)
Serialize the font to the output stream.
|
void |
setSerializationTableOrdering(java.util.List<java.lang.Integer> tableOrdering)
Set the table ordering to be used in serializing a font.
|
public static FontFactory getInstance()
public void fingerprintFont(boolean fingerprint)
fingerprint - whether fingerprinting should be turned on or offfingerprintFont(),
Font.digest()public boolean fingerprintFont()
fingerprintFont(boolean),
Font.digest()public Font[] loadFonts(java.io.InputStream is) throws java.io.IOException
is - the input stream font datajava.io.IOExceptionpublic Font.Builder[] loadFontsForBuilding(java.io.InputStream is) throws java.io.IOException
is - the input stream font datajava.io.IOExceptionpublic Font[] loadFonts(byte[] b) throws java.io.IOException
b - the font datajava.io.IOExceptionpublic Font.Builder[] loadFontsForBuilding(byte[] b) throws java.io.IOException
b - the byte array font datajava.io.IOExceptionpublic void serializeFont(Font font, java.io.OutputStream os) throws java.io.IOException
font - the font to serializeos - the destination stream for the fontjava.io.IOExceptionpublic void setSerializationTableOrdering(java.util.List<java.lang.Integer> tableOrdering)
tableOrdering - the table orderingpublic Font.Builder newFontBuilder()