org.icepdf.core.pobjects.fonts
Interface CMap


public interface CMap

CMap inteface.

Since:
3.0

Method Summary
 boolean isOneByte(int cid)
          Determines if the cid should be interpreted as a one or two byte character.
 char toSelector(char ch)
          Maps the character id to an underlying unicode value if available.
 char toSelector(char ch, boolean isCFF)
           
 java.lang.String toUnicode(char ch)
          Maps the character id to an underlying to unicode table.
 

Method Detail

toSelector

char toSelector(char ch)
Maps the character id to an underlying unicode value if available.

Parameters:
ch - character code to find unicode value of.
Returns:
unicode value of ch if available otherwise original ch is returned unaltered.

toSelector

char toSelector(char ch,
                boolean isCFF)

toUnicode

java.lang.String toUnicode(char ch)
Maps the character id to an underlying to unicode table. This method should be called when looking for a unicode value for a CID. This method differs slightly from #toSelector in that it can return at String rather then a single character code.

Parameters:
ch - character id to look for corresponding unicode values.
Returns:
unicode value of specified character code.

isOneByte

boolean isOneByte(int cid)
Determines if the cid should be interpreted as a one or two byte character. Some CID fonts use the one byte notation but the two byte is the most common bar far.

Parameters:
cid - character code to check length off
Returns:
true if the cid should be considered as having a one byte length.