Class Encoding
java.lang.Object
org.apache.fontbox.encoding.Encoding
- Direct Known Subclasses:
BuiltInEncoding, CFFEncoding, MacRomanEncoding, StandardEncoding
-
Field Summary
FieldsModifier and TypeFieldDescriptionThis is a mapping from a character code to a character name.This is a mapping from a character name to a character code. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCharacterEncoding(int code, String name) This will add a character encoding.This will get the character code for the name.Returns an unmodifiable view of the code to name mapping.getName(int code) This will take a character code and get the name from the code.
-
Field Details
-
codeToName
-
nameToCode
-
-
Constructor Details
-
Encoding
public Encoding()
-
-
Method Details
-
addCharacterEncoding
This will add a character encoding.- Parameters:
code- The character code that matches the character.name- The name of the character.
-
getCode
-
getName
This will take a character code and get the name from the code. This method will never return null.- Parameters:
code- The character code.- Returns:
- The name of the character, or ".notdef" if the bame doesn't exist.
-
getCodeToNameMap
-