|
intarsys PDF library API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.intarsys.pdf.encoding.Encoding
de.intarsys.pdf.encoding.MappedEncoding
public class MappedEncoding
A MappedEncoding is an explicit map from a codepoint to a name (and vice versa).
A MappedEncoding can be constructed individually (as in a DifferenceEncoding) or be one of the predefined well known encodings that are implemented using unique instances.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
MappedEncoding()
Create a MappedEncoding |
|
| Method Summary | |
|---|---|
void |
addEncoding(int codePoint,
String name)
When constructing manually, one can define a map from codePoint to name with this method. |
void |
addEncoding(int codePoint,
String name,
int unicode)
Add a known complete tuple. |
int |
getByteCode(int unicode)
Get the byte code point where the character referenced by the Unicode code point unicode is mapped in this font encoding or -1
if invalid. |
int |
getByteCode(String name)
Get the code point where the character referenced by the Adobe glyph name name is mapped in this font encoding or -1 if not valid. |
COSObject |
getCosObject()
Get an object that can be used as a representation of the receiver encoding within doc. |
String |
getGlyphName(int codePoint)
Get the character name for a given encoded byte code point. |
String |
getName()
|
int |
getUnicode(int byteValue)
Get the Unicode code point for the encoded code Point byteCode or -1 if not available. |
int |
getValidByteCode(int unicode)
Get the byte code point where the character referenced by the Unicode code point unicode is mapped in this font encoding or a
valid replacement code point if invalid. |
int |
getValidByteCode(String name)
Get the code point where the character referenced by the Adobe glyph name name is mapped in this font encoding or a valid
replacement. |
| Methods inherited from class de.intarsys.pdf.encoding.Encoding |
|---|
create, createReader, createWriter, decode, encode, encode, getDifferenceGlyphName, getDifferenceUnicode, getStandard, isFontSpecificEncoding, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MappedEncoding()
| Method Detail |
|---|
public int getByteCode(int unicode)
Encodingunicode is mapped in this font encoding or -1
if invalid.
unicode must be a valid Unicode code point. The returned
code point is a value from 0...255. If the Unicode code point is not
valid or not mapped, -1 is returned.
getByteCode in class Encodingunicode - The Unicode code point to look up.
public int getByteCode(String name)
Encodingname is mapped in this font encoding or -1 if not valid.
name must be a valid Adobe glyph name. The code point is a
value from 0...255. If the glyph is not found, -1 is returned.
getByteCode in class Encodingname - The glyph name.
public COSObject getCosObject()
Encodingdoc.
getCosObject in class Encodingdoc.public String getGlyphName(int codePoint)
Encoding
getGlyphName in class EncodingcodePoint - The encoded byte code point.
codePoint or ".notdef".public String getName()
getName in class Encodingpublic int getUnicode(int byteValue)
EncodingbyteCode or -1 if not available.
getUnicode in class EncodingbyteValue - The encoded code point
byteCode or -1.public int getValidByteCode(int unicode)
Encodingunicode is mapped in this font encoding or a
valid replacement code point if invalid.
unicode must be a valid Unicode code point. The returned
code point is a value from 0...255. If the Unicode code point is not
valid or not mapped, a valid code point is returned is returned (for
example the space character).
getValidByteCode in class Encodingunicode - The Unicode code point to look up.
public int getValidByteCode(String name)
Encodingname is mapped in this font encoding or a valid
replacement.
name must be a valid Adobe glyph name. The code point is a
value from 0...255. If the glyph is not found, a valif replacement code
point is returned instead (for example the space character).
getValidByteCode in class Encodingname - The glyph name.
public void addEncoding(int codePoint,
String name)
codePoint to name with this method.
codePoint - The codePoint from 0..255 where the character should be
mapped.name - The name of the character to be mapped.
public void addEncoding(int codePoint,
String name,
int unicode)
codePoint - The codePoint from 0..255 where the character should be
mapped.name - The name of the character to be mapped.unicode - The unicode value
|
intarsys PDF library API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||