iText 7 7.1.8 API
iText.IO.Font.TrueTypeCollection Class Reference

Use this class for working with true type collection font (*.ttc) More...

Public Member Functions

  TrueTypeCollection (byte[] ttc)
  Creates a new TrueTypeCollection instance by its bytes. More...
 
  TrueTypeCollection (String ttcPath)
  Creates a new TrueTypeCollection instance by its file path. More...
 
virtual FontProgram  GetFontByTccIndex (int ttcIndex)
  method return TrueTypeFont by ttc index More...
 
virtual int  GetTTCSize ()
  returns the number of fonts in True Type Collection (file or bytes array) More...
 
virtual bool  IsCached ()
  Indicates if fonts created by the call to GetFontByTccIndex(int) will be cached or not. More...
 
virtual void  SetCached (bool cached)
  Sets if fonts created by the call to GetFontByTccIndex(int) will be cached or not. More...
 

Detailed Description

Use this class for working with true type collection font (*.ttc)

Constructor & Destructor Documentation

◆ TrueTypeCollection() [1/2]

iText.IO.Font.TrueTypeCollection.TrueTypeCollection ( byte[]  ttc )
inline

Creates a new TrueTypeCollection instance by its bytes.

Parameters
ttc the byte contents of the collection
Exceptions
System.IO.IOException in case the input in mal-formatted

◆ TrueTypeCollection() [2/2]

iText.IO.Font.TrueTypeCollection.TrueTypeCollection ( String  ttcPath )
inline

Creates a new TrueTypeCollection instance by its file path.

Parameters
ttcPath the path of the collection
Exceptions
System.IO.IOException in case the input in mal-formatted

Member Function Documentation

◆ GetFontByTccIndex()

virtual FontProgram iText.IO.Font.TrueTypeCollection.GetFontByTccIndex ( int  ttcIndex )
inlinevirtual

method return TrueTypeFont by ttc index

Parameters
ttcIndex the index for the TTC font
Returns
TrueTypeFont
Exceptions
System.IO.IOException

◆ GetTTCSize()

virtual int iText.IO.Font.TrueTypeCollection.GetTTCSize ( )
inlinevirtual

returns the number of fonts in True Type Collection (file or bytes array)

Returns
returns the number of fonts

◆ IsCached()

virtual bool iText.IO.Font.TrueTypeCollection.IsCached ( )
inlinevirtual

Indicates if fonts created by the call to GetFontByTccIndex(int) will be cached or not.

Returns
true
if the created fonts will be cached,
false
otherwise

◆ SetCached()

virtual void iText.IO.Font.TrueTypeCollection.SetCached ( bool  cached )
inlinevirtual

Sets if fonts created by the call to GetFontByTccIndex(int) will be cached or not.

Parameters
cached
true
if the created fonts will be cached,
false
otherwise