|
fop 1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.fonts.AbstractCodePointMapping
Abstract base class for code point mapping classes (1-byte character encodings).
Field Summary |
Fields inherited from interface org.apache.fop.fonts.SingleByteEncoding |
NOT_FOUND_CODE_POINT |
Constructor Summary | |
AbstractCodePointMapping(java.lang.String name,
int[] table)
Main constructor. |
|
AbstractCodePointMapping(java.lang.String name,
int[] table,
java.lang.String[] charNameMap)
Extended constructor. |
Method Summary | |
protected void |
buildFromTable(int[] table)
Builds the internal lookup structures based on a given table. |
java.lang.String[] |
getCharNameMap()
Returns the array of character names for this encoding. |
short |
getCodePointForGlyph(java.lang.String charName)
Returns the index of a character/glyph with the given name. |
java.lang.String |
getName()
Returns the encoding's name. |
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. |
char |
getUnicodeForIndex(int idx)
Returns the main Unicode value that is associated with the given code point in the encoding. |
char |
mapChar(char c)
Maps a Unicode character to a code point in the encoding. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AbstractCodePointMapping(java.lang.String name, int[] table)
name
- the name of the encodingtable
- the table ([code point, unicode scalar value]+) with the mappingpublic AbstractCodePointMapping(java.lang.String name, int[] table, java.lang.String[] charNameMap)
name
- the name of the encodingtable
- the table ([code point, unicode scalar value]+) with the mappingcharNameMap
- all character names in the encoding (a value of null will be converted
to ".notdef")Method Detail |
protected void buildFromTable(int[] table)
table
- the table ([code point, unicode scalar value]+) with the mappingpublic java.lang.String getName()
getName
in interface SingleByteEncoding
public final char mapChar(char c)
mapChar
in interface SingleByteEncoding
c
- the Unicode character to map
public final char getUnicodeForIndex(int idx)
idx
- the code point in the encoding
public final char[] getUnicodeCharMap()
getUnicodeCharMap
in interface SingleByteEncoding
public short getCodePointForGlyph(java.lang.String charName)
charName
- the character name
public java.lang.String[] getCharNameMap()
getCharNameMap
in interface SingleByteEncoding
public java.lang.String toString()
|
fop 1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |