public interface PsEncoding extends Encoding
EncodingVector implementations represent what PostScript and PDF call an Encoding, that is a mapping from character to glyph index that is based on the character's location in an array (vector).
Encoding instances provide some standard encoding resources for PostScript. When a PostScript file is parsed, the characters in a string are really indices into an array of glyph names, which are in turn the keys to entries in a glyph dictionary. Input to a PostScript interpreter is not really characters, but rather character indexes. (The two might be the same, especially for ASCII characters).
So the PostScript interpreter uses a two-step process, as follows: 1. It conceptually maps character codes (integer values) to name objects like /A or /Uacute. This map is known as an "encoding". There are several standard encoding schemes defined in the PostScript standard that each interpreter must know how to handle. Those are provided as Encoding subclasses. 2. The name objects created in step 1 are then used as the key into a dictionary (contained in the Font dictionary) whose values contain the PostScript instructions needed to actually paint the glyph.
Modifier and Type | Interface and Description |
---|---|
static class |
PsEncoding.Predefined
An enumeration of the standard encodings supported by PostScript and/or PDF.
|
INVALID_UNICODE_CHAR
Modifier and Type | Method and Description |
---|---|
PsEncoding |
bestBaseEncodingPdf()
Method useful for determining what, if any, EncodingVector should be
used as the base encoding when writing this EncodingVector in PDF.
|
java.lang.String[] |
getGlyphNames()
Returns the array of glyph names that represents this encoding.
|
PsEncoding.Predefined |
getPredefinedType()
Returns the predefined type, if any, of this encoding vector.
|
boolean |
isSubsetOf(PsEncoding otherVector)
Determines whether all items encoded in this EncodingVector are also encoded the same way in another
EncodingVector.
|
java.lang.String |
mapCodePointToGlyphName(int codePoint)
Finds the glyph name that corresponds to a given Unicode code point.
|
asPostScript, canEncode, decodeCharacter, encodeCharacter, getFirstIndex, getLastIndex, getName, isPredefinedPdf, isPredefinedPs
PsEncoding bestBaseEncodingPdf()
java.lang.String mapCodePointToGlyphName(int codePoint)
codePoint
- The Unicode code point for which the glyph name is
desired.boolean isSubsetOf(PsEncoding otherVector)
otherVector
- The EncodingVector instance to which this
should be compared.otherVector
encodes all items that this
does, and encodes them the
same way.PsEncoding.Predefined getPredefinedType()
java.lang.String[] getGlyphNames()
This documentation was created 2017-01-24 at 21:26 GMT by The aXSL Group and may be freely copied. See license for details.