Closeable, AutoCloseablepublic class TrueTypeCollection extends Object implements Closeable
| Modifier and Type | Class | Description |
|---|---|---|
static interface |
TrueTypeCollection.TrueTypeFontProcessor |
Implement the callback method to call
processAllFonts(TrueTypeFontProcessor). |
| Constructor | Description |
|---|---|
TrueTypeCollection(File file) |
Creates a new TrueTypeCollection from a .ttc file.
|
TrueTypeCollection(InputStream stream) |
Creates a new TrueTypeCollection from a .ttc input stream.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
TrueTypeFont |
getFontByName(String name) |
Get a TT font from a collection.
|
void |
processAllFonts(TrueTypeCollection.TrueTypeFontProcessor trueTypeFontProcessor) |
Run the callback for each TT font in the collection.
|
public TrueTypeCollection(File file) throws IOException
file - The TTC file.IOException - If the font could not be parsed.public TrueTypeCollection(InputStream stream) throws IOException
stream - A TTC input stream.IOException - If the font could not be parsed.public void processAllFonts(TrueTypeCollection.TrueTypeFontProcessor trueTypeFontProcessor) throws IOException
trueTypeFontProcessor - the object with the callback method.IOExceptionpublic TrueTypeFont getFontByName(String name) throws IOException
name - The postscript name of the font.IOExceptionpublic void close()
throws IOException
close in interface AutoCloseableclose in interface CloseableIOExceptionCopyright © 2008–2018. All rights reserved.