Package org.apache.fop.fonts
Interface SingleByteEncoding
- All Known Implementing Classes:
AbstractCodePointMapping
,CodePointMapping
,SimpleSingleByteEncoding
public interface SingleByteEncoding
The interface defines a 1-byte character encoding (with 256 characters).
-
Field Summary
Modifier and TypeFieldDescriptionstatic final char
Code point that is used if no code point for a specific character has been found. -
Method Summary
Modifier and TypeMethodDescriptionString[]
Returns the array of character names for this encoding.getName()
Returns the encoding's name.char[]
Returns a character array with Unicode scalar values which can be used to map encoding code points to Unicode values.char
mapChar
(char c) Maps a Unicode character to a code point in the encoding.
-
Field Details
-
NOT_FOUND_CODE_POINT
static final char NOT_FOUND_CODE_POINTCode point that is used if no code point for a specific character has been found.- See Also:
-
-
Method Details
-
getName
String getName()Returns the encoding's name.- Returns:
- the name of the encoding
-
mapChar
char mapChar(char c) Maps a Unicode character to a code point in the encoding.- Parameters:
c
- the Unicode character to map- Returns:
- the code point in the encoding or 0 (=.notdef) if not found
-
getCharNameMap
String[] getCharNameMap()Returns the array of character names for this encoding.- Returns:
- the array of character names (unmapped code points are represented by a ".notdef" value)
-
getUnicodeCharMap
char[] getUnicodeCharMap()Returns a character array with Unicode scalar values which can be used to map encoding code points to Unicode values. Note that this does not return all possible Unicode values that the encoding maps.- Returns:
- a character array with Unicode scalar values
-