|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.font.format.xtf.tables.cff.T2CharString
org.extex.font.format.xtf.tables.cff.T2Operator
org.extex.font.format.xtf.tables.cff.T2TopDICTOperator
org.extex.font.format.xtf.tables.cff.T2TDONumber
org.extex.font.format.xtf.tables.cff.T2TDOCharStrings
public class T2TDOCharStrings
CharStrings.
CharStrings INDEX
This contains the charstrings of all the glyphs in a font stored in an INDEX structure. Charstring objects contained within this INDEX are accessed by GID. The first charstring (GID 0) must be the .notdef glyph. The number of glyphs available in a font may be determined from the count field in the INDEX. The format of the charstring data, and therefore the method of interpretation, is specified by the CharstringType operator in the Top DICT. The CharstringType operator has a default value of 2 indicating the Type 2 charstring format which was designed in conjunction with CFF. Type 1 charstrings are documented in the "Adobe Type 1 Font Format". Type 2 charstrings are described in Adobe Technical Note #5177: "Type 2 Charstring Format." Other charstring types may also be supported by this method.
Type 2
A Type 2 charstring program is a sequence of unsigned 8-bit bytes that encode numbers and operators. The byte value specifies a operator, a number, or subsequent bytes that are to be interpreted in a specific manner. The bytes are decoded into numbers and operators. One reason * the format is more economical than Type 1 is because the Type 2 charstring interpreter is required to count the number of arguments on the argument stack. It can thus detect additional sets of arguments for a single operator. The stack depth implementation limit is specified in Appendix B. A number, decoded from a charstring, is pushed onto the Type 2 argument stack. An operator expects its arguments in order from this argument stack with all arguments generally taken from the bottom of the stack (first argument bottom-most); however, some operators, particularly the subroutine operators, normally work from the top of the stack. If an operator returns results, they are pushed onto the Type 2 argument stack (last result topmost). In the following discussion, all numeric constants are decimal numbers, except where indicated.
| Field Summary |
|---|
| Fields inherited from class org.extex.font.format.xtf.tables.cff.T2CharString |
|---|
ESCAPE, ESCAPE_BYTE, T2CALLGSUBR, T2CALLSUBR, T2CNTRMASK, T2ENDCHAR, T2FLEX, T2FLEX1, T2HFLEX, T2HFLEX1, T2HHCURVETO, T2HINTMASK, T2HLINETO, T2HMOVETO, T2HSTEM, T2HSTEMHM, T2HVCURVETO, T2RCURVELINE, T2RETURN, T2RLINECURVE, T2RLINETO, T2RMOVETO, T2RRCURVETO, T2VHCURVETO, T2VLINETO, T2VMOVETO, T2VSTEM, T2VSTEMHM, T2VVCURVETO, TYPE_CALLGSUBR, TYPE_CALLSUBR, TYPE_CNTRMASK, TYPE_ENDCHAR, TYPE_FLEX, TYPE_FLEX1, TYPE_HFLEX, TYPE_HFLEX1, TYPE_HHCURVETO, TYPE_HINTMASK, TYPE_HLINETO, TYPE_HMOVETO, TYPE_HSTEM, TYPE_HSTEMHM, TYPE_HVCURVETO, TYPE_RCURVELINE, TYPE_RETURN, TYPE_RLINECURVE, TYPE_RLINETO, TYPE_RMOVETO, TYPE_RRCURVETO, TYPE_VHCURVETO, TYPE_VLINETO, TYPE_VMOVETO, TYPE_VSTEM, TYPE_VSTEMHM, TYPE_VVCURVETO |
| Constructor Summary | |
|---|---|
T2TDOCharStrings(java.util.List<T2CharString> stack)
Create a new object. |
|
| Method Summary | |
|---|---|
CharString |
getCharString(int idx)
Returns the charstring or null, if not found. |
CharString |
getCharString(java.lang.String name)
Returns the charstring or null, if not found. |
int |
getID()
Returns the id of the operator. |
int |
getInitPrio()
Returns the priority for the init process. |
java.lang.String |
getName()
Return the name of the operator. |
void |
init(RandomAccessR rar,
OtfTableCFF cff,
int baseoffset,
CffFont cffFont)
Initialize. |
void |
writeXML(XMLStreamWriter writer)
Write the data to a XMLStreamWriter. |
| Methods inherited from class org.extex.font.format.xtf.tables.cff.T2TDONumber |
|---|
getBytes, getDouble, getInteger, getValue, isDouble, isInteger, toString |
| Methods inherited from class org.extex.font.format.xtf.tables.cff.T2TopDICTOperator |
|---|
isTopDICTOperator, newInstance |
| Methods inherited from class org.extex.font.format.xtf.tables.cff.T2Operator |
|---|
checkWidth, convertStackaddID, isOperator, newInstance, toText |
| Methods inherited from class org.extex.font.format.xtf.tables.cff.T2CharString |
|---|
isArray, isBoolean, isEscape, readNumber, readNumber, readSID, readTopDICTOperator |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public T2TDOCharStrings(java.util.List<T2CharString> stack)
throws java.io.IOException
stack - the stack
java.io.IOException - if an IO.error occurs.| Method Detail |
|---|
public CharString getCharString(int idx)
null, if not found.
idx - the index.
public CharString getCharString(java.lang.String name)
null, if not found.
name - The name of the charstring.
public int getID()
getID in class T2OperatorT2Operator.getID()public int getInitPrio()
getInitPrio in class T2CharStringT2CharString.getInitPrio()public java.lang.String getName()
getName in class T2OperatorT2Operator.getName()
public void init(RandomAccessR rar,
OtfTableCFF cff,
int baseoffset,
CffFont cffFont)
throws java.io.IOException
init in class T2Operatorrar - The inputcff - The cff tablebaseoffset - The base offset from cff.cffFont - The cff font.
java.io.IOException - if an IO-error occurred.T2Operator.init(org.extex.util.file.random.RandomAccessR,
org.extex.font.format.xtf.tables.OtfTableCFF, int,
org.extex.font.format.xtf.tables.cff.CffFont)
public void writeXML(XMLStreamWriter writer)
throws java.io.IOException
writeXML in interface XMLWriterConvertiblewriteXML in class T2TDONumberwriter - the XML-Writer
java.io.IOException - if an IO-error occurs.T2TDONumber.writeXML(org.extex.util.xml.XMLStreamWriter)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||