|
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.font.DifferenceEncoding
public class DifferenceEncoding
An encoding defined as a delta to another base encoding.
the encoding difference is defined in the form ... num name name name num name.. ...
where num is the codepoint for the first glyph name in the list. The following names are mapped to the codepoint of the predecessor + 1. Multiple redefinition offsets can be defined.
| Field Summary | |
|---|---|
static COSName |
DK_BaseEncoding
|
static COSName |
DK_Differences
|
| Constructor Summary | |
|---|---|
DifferenceEncoding()
DictionaryEncoding constructor comment. |
|
| Method Summary | |
|---|---|
static Encoding |
create(COSDictionary dict,
PDFont font)
Create the difference encoding from the values defined in the dict. |
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 |
getDifferenceGlyphName(int codePoint)
|
int |
getDifferenceUnicode(int codePoint)
|
String |
getGlyphName(int codePoint)
Get the character name for a given encoded byte code point. |
String |
getName()
|
int |
getUnicode(int byteCode)
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. |
boolean |
isFontSpecificEncoding()
Answer true if this encoding is specific to and embedded into the font program itself so that we can not derive any mapping information from here. |
| Methods inherited from class de.intarsys.pdf.encoding.Encoding |
|---|
create, createReader, createWriter, decode, encode, encode, getStandard, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final COSName DK_Differences
public static final COSName DK_BaseEncoding
| Constructor Detail |
|---|
public DifferenceEncoding()
| Method Detail |
|---|
public static Encoding create(COSDictionary dict,
PDFont font)
dict.
todo 2 remove dependency to font and refactor
dict - The dictionary defining the difference.font - The font defining the base encoding.
dict.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 int getDifferenceUnicode(int codePoint)
getDifferenceUnicode in class Encodingpublic 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 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 getDifferenceGlyphName(int codePoint)
getDifferenceGlyphName in class Encodingpublic String getName()
getName in class Encodingpublic int getUnicode(int byteCode)
EncodingbyteCode or -1 if not available.
getUnicode in class EncodingbyteCode - The encoded code point
byteCode or -1.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 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 boolean isFontSpecificEncoding()
Encoding
isFontSpecificEncoding in class Encoding
|
intarsys PDF library API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||