iText 8.0.5 API
iText.IO.Font.CjkResourceLoader Class Reference

This class is responsible for loading and handling CJK fonts and CMaps from font-asian package. More...

Static Public Member Functions

static bool  IsPredefinedCidFont (String fontName)
  Checks if the font with the given name and encoding is one of the predefined CID fonts. More...
 
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 ()
  Get all loaded predefined CID fonts. More...
 
static IDictionary< String, ICollection< String > >  GetRegistryNames ()
  Get all loaded CJK registry names mapped to a set of compatible cmaps. More...
 
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)
  Parses CMap with a given name producing it in a form of unicode to cid mapping. More...
 
static CMapByteCid  GetByte2CidCmap (String cmap)
  Parses CMap with a given name producing it in a form of byte to cid mapping. More...
 
static CMapCidToCodepoint  GetCidToCodepointCmap (String cmap)
  Parses CMap with a given name producing it in a form of cid to code point mapping. More...
 
static CMapCodepointToCid  GetCodepointToCidCmap (String uniMap)
  Parses CMap with a given name producing it in a form of code point to cid mapping. More...
 

Detailed Description

This class is responsible for loading and handling CJK fonts and CMaps from font-asian package.

Member Function Documentation

◆ GetAllPredefinedCidFonts()

static IDictionary > iText.IO.Font.CjkResourceLoader.GetAllPredefinedCidFonts ( )
inlinestatic

Get all loaded predefined CID fonts.

Returns
predefined CID fonts.

◆ GetByte2CidCmap()

static CMapByteCid iText.IO.Font.CjkResourceLoader.GetByte2CidCmap ( String  cmap )
inlinestatic

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

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

◆ GetCid2UniCmap()

static CMapCidUni iText.IO.Font.CjkResourceLoader.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.

◆ GetCidToCodepointCmap()

static CMapCidToCodepoint iText.IO.Font.CjkResourceLoader.GetCidToCodepointCmap ( String  cmap )
inlinestatic

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

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

◆ GetCodepointToCidCmap()

static CMapCodepointToCid iText.IO.Font.CjkResourceLoader.GetCodepointToCidCmap ( String  uniMap )
inlinestatic

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

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

◆ GetCompatibleCidFont()

static String iText.IO.Font.CjkResourceLoader.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.CjkResourceLoader.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.

◆ GetRegistryNames()

static IDictionary > iText.IO.Font.CjkResourceLoader.GetRegistryNames ( )
inlinestatic

Get all loaded CJK registry names mapped to a set of compatible cmaps.

Returns
CJK registry names mapped to a set of compatible cmaps.

◆ GetUni2CidCmap()

static CMapUniCid iText.IO.Font.CjkResourceLoader.GetUni2CidCmap ( String  uniMap )
inlinestatic

Parses CMap with a given name producing it in a form of unicode to cid 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 unicode to cid. If no CMap was found for provided name an exception is thrown.

◆ IsPredefinedCidFont()

static bool iText.IO.Font.CjkResourceLoader.IsPredefinedCidFont ( String  fontName )
inlinestatic

Checks if the font with the given name and encoding is one of the predefined CID fonts.

Parameters
fontName the font name.
Returns

true if it is CJKFont.