public class TrueTypeCollection extends Object
Modifier and Type | Field and Description |
---|---|
protected RandomAccessFileOrArray |
raf |
Constructor and Description |
---|
TrueTypeCollection(byte[] ttc)
Creates a new TrueTypeCollection instance by its bytes.
|
TrueTypeCollection(byte[] ttc, String encoding)
Deprecated.
Will be removed in 7.1. Use
TrueTypeCollection(byte[]) instead
|
TrueTypeCollection(String ttcPath)
Creates a new TrueTypeCollection instance by its file path.
|
TrueTypeCollection(String ttcPath, String encoding)
Deprecated.
Will be removed in 7.1. Use
TrueTypeCollection(String) instead
|
Modifier and Type | Method and Description |
---|---|
FontProgram |
getFontByTccIndex(int ttcIndex)
method return TrueTypeFont by ttc index
|
int |
getTTCSize()
returns the number of fonts in True Type Collection (file or bytes array)
|
boolean |
isCached()
Indicates if fonts created by the call to getFontByTccIndex(int) will be cached or not.
|
void |
setCached(boolean cached)
Sets if fonts created by the call to getFontByTccIndex(int) will be cached or not.
|
protected RandomAccessFileOrArray raf
@Deprecated public TrueTypeCollection(byte[] ttc, String encoding) throws IOException
TrueTypeCollection(byte[])
instead
IOException
public TrueTypeCollection(byte[] ttc) throws IOException
TrueTypeCollection
instance by its bytes.
ttc
- the byte contents of the collection
IOException
- in case the input in mal-formatted
@Deprecated public TrueTypeCollection(String ttcPath, String encoding) throws IOException
TrueTypeCollection(String)
instead
IOException
public TrueTypeCollection(String ttcPath) throws IOException
TrueTypeCollection
instance by its file path.
ttcPath
- the path of the collection
IOException
- in case the input in mal-formatted
public FontProgram getFontByTccIndex(int ttcIndex) throws IOException
ttcIndex
- the index for the TTC font
IOException
public int getTTCSize()
public boolean isCached()
getFontByTccIndex(int)
will be cached or not.
true
if the created fonts will be cached, false
otherwise
public void setCached(boolean cached)
getFontByTccIndex(int)
will be cached or not.
cached
- true
if the created fonts will be cached, false
otherwise
Copyright © 1998–2016 iText Group NV. All rights reserved.