Class TrueTypeCollection
Use this class for working with true type collection font (*.ttc)
public class TrueTypeCollection
- Inheritance
-
TrueTypeCollection
- Inherited Members
Constructors
TrueTypeCollection(byte[])
Creates a new TrueTypeCollection instance by its bytes.
public TrueTypeCollection(byte[] ttc)
Parameters
ttc
byte[]the byte contents of the collection
TrueTypeCollection(string)
Creates a new TrueTypeCollection instance by its file path.
public TrueTypeCollection(string ttcPath)
Parameters
ttcPath
stringthe path of the collection
Fields
raf
protected RandomAccessFileOrArray raf
Field Value
Methods
GetFontByTccIndex(int)
method return TrueTypeFont by ttc index
public virtual FontProgram GetFontByTccIndex(int ttcIndex)
Parameters
ttcIndex
intthe index for the TTC font
Returns
- FontProgram
TrueTypeFont
GetTTCSize()
returns the number of fonts in True Type Collection (file or bytes array)
public virtual int GetTTCSize()
Returns
- int
returns the number of fonts
IsCached()
Indicates if fonts created by the call to GetFontByTccIndex(int) will be cached or not.
public virtual bool IsCached()
Returns
- bool
true
if the created fonts will be cached,false
otherwise
SetCached(bool)
Sets if fonts created by the call to GetFontByTccIndex(int) will be cached or not.
public virtual void SetCached(bool cached)
Parameters
cached
booltrue
if the created fonts will be cached,false
otherwise