iText 8.0.2 API
iText.IO.Font.FontCache Class Reference

Static Public Member Functions

static String  GetCompatibleCidFont (String cmap)
  Finds a CJK font family which is compatible to the given CMap. More...
 
static ICollection< String >  GetCompatibleCmaps (String fontName)
  Finds all CMap names that belong to the same registry to which a given font belongs. More...
 
static IDictionary< String, IDictionary< String, Object > >  GetAllPredefinedCidFonts ()
 
static IDictionary< String, ICollection< String > >  GetRegistryNames ()
 
static CMapCidUni  GetCid2UniCmap (String uniMap)
  Parses CMap with a given name producing it in a form of cid to unicode mapping. More...
 
static CMapUniCid  GetUni2CidCmap (String uniMap)
 
static CMapByteCid  GetByte2CidCmap (String cmap)
 
static CMapCidToCodepoint  GetCidToCodepointCmap (String cmap)
 
static CMapCodepointToCid  GetCodepointToCidCmap (String uniMap)
 
static void  ClearSavedFonts ()
  Clears the cache by removing fonts that were added via SaveFont(FontProgram, System.String). More...
 
static FontProgram  GetFont (String fontName)
 
static FontProgram  SaveFont (FontProgram font, String fontName)
 

Member Function Documentation

◆ ClearSavedFonts()

static void iText.IO.Font.FontCache.ClearSavedFonts ( )
inlinestatic

Clears the cache by removing fonts that were added via SaveFont(FontProgram, System.String).

Clears the cache by removing fonts that were added via SaveFont(FontProgram, System.String).

Be aware that in multithreading environment this method call will affect the result of GetFont(System.String). This in its turn affects creation of fonts via factories when cached argument is set to true (which is by default).

◆ GetCid2UniCmap()

static CMapCidUni iText.IO.Font.FontCache.GetCid2UniCmap ( String  uniMap )
inlinestatic

Parses CMap with a given name producing it in a form of cid to unicode mapping.

Parameters
uniMap a CMap name. It is expected that CMap identified by this name defines unicode to cid mapping.
Returns
an object for convenient mapping from cid to unicode. If no CMap was found for provided name an exception is thrown.

◆ GetCompatibleCidFont()

static String iText.IO.Font.FontCache.GetCompatibleCidFont ( String  cmap )
inlinestatic

Finds a CJK font family which is compatible to the given CMap.

Parameters
cmap a name of the CMap for which compatible font is searched.
Returns
a CJK font name if there's known compatible font for the given cmap name, or null otherwise.

◆ GetCompatibleCmaps()

static ICollection iText.IO.Font.FontCache.GetCompatibleCmaps ( String  fontName )
inlinestatic

Finds all CMap names that belong to the same registry to which a given font belongs.

Parameters
fontName a name of the font for which CMap's are searched.
Returns
a set of CMap names corresponding to the given font.