Java Doc for Encoding.java in » PDF » jPod » de » intarsys » pdf » encoding » Java Source Code / Java DocumentationJava Source Code and Java Documentation
An Encoding defines the mapping from a one byte codepoint to a glyph name in
the font.
Every font has a built in encoding that can be changed by adding an explicit
encoding to a PDFont. This explicit change may be in the form of a
"differences" encoding in an explicit dictionary or by means of a named
encoding, one of "MacRomanEncoding" or "WinAnsiEncoding".
todo 2 "MacExpertEncoding" is not supported.
If no encoding is found in the font implementation or the font dictionary,
"StandardEncoding" is used.
createReader(InputStream is) Create a reader on the InputStream is that uses the
encoding defined in the receiver.
Parameters: is - The input stream to read.
createWriter(OutputStream os) Create a writer on the OutputStream os that uses the
encoding defined in the receiver.
Parameters: os - The output stream to be written.
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.
unicode must be a valid Unicode code point.
abstractpublic 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.
getStandard() Return the standard encoding for the PDF specification.
abstractpublic int
getUnicode(int byteCode) Get the Unicode code point for the encoded code Point
byteCode or -1 if not available.
abstractpublic 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.
unicode must be a valid Unicode code point.
abstractpublic 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.
name must be a valid Adobe glyph name.
public 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.
"Create" one of the well known encodings.
Parameters: name - The name of the encoding to create. The encoding implementation. throws: IllegalArgumentException - When the encoding is not supported.
Create a reader on the InputStream is that uses the
encoding defined in the receiver.
Parameters: is - The input stream to read. Create a reader on the InputStream is that usesthe encoding defined in the receiver.
Create a writer on the OutputStream os that uses the
encoding defined in the receiver.
Parameters: os - The output stream to be written. Create a writer on the OutputStream os that usesthe encoding defined in the receiver.
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.
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.
Parameters: unicode - The Unicode code point to look up. The index from 0..255 where this character is mapped or -1.
Get an object that can be used as a representation of the receiver
encoding within doc.
Get an object that can be used as a representation of thereceiver encoding within doc.
Get the character name for a given encoded byte code point. If no mapping
is defined, return ".notdef".
Parameters: codePoint - The encoded byte code point. The glyph name of the character referenced bycodePoint or ".notdef".
Get the Unicode code point for the encoded code Point
byteCode or -1 if not available.
Parameters: byteCode - The encoded code point The Unicode code point for the encoded code PointbyteCode or -1.
getValidByteCode
abstractpublic int getValidByteCode(int unicode)(Code)
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.
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).
Parameters: unicode - The Unicode code point to look up. The index from 0..255 where this character is mapped or validreplacement.
getValidByteCode
abstractpublic int getValidByteCode(String name)(Code)
Get the code point where the character referenced by the Adobe glyph name
name 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).
Parameters: name - The glyph name. The index from 0..255 where this character is mapped or a validreplacement.
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.
Answer true if this encoding is specific to and embedded into thefont program itself