|
||||||||||
| 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.T2TDOCharset
public class T2TDOCharset
Charset.
Charset data is located via the offset operand to the charset operator in the Top DICT. Each charset is described by a format-type identifier byte followed by format-specific data.
Format 0
| Type | Name | Description |
| Card8 | format | =0 |
| SID | glyph [nGlyphs-1] |
Glyph name array |
Each element of the glyph array represents the name of the corresponding glyph. This format should be used when the SIDs are in a fairly random order. The number of glyphs (nGlyphs) is the value of the count field in the CharStrings INDEX. (There is one less element in the glyph name array than nGlyphs because the .notdef glyph name is omitted.)
Format 1
| Type | Name | Description |
| Card8 | format | =1 |
| struct | Range1 [varies] |
Range1 array |
Range1 Format (Charset)
| Type | Name | Description |
| SID | first | First glyph in range |
| Card8 | nLeft | Glyphs left in range (excluding first) |
Each Range1 describes a group of sequential SIDs. The number of ranges is not explicitly specified in the font. Instead, software utilizing this data simply processes ranges until all glyphs in the font are covered. This format is particularly suited to charsets that are well ordered.
Format 2
| Type | Name | Description |
| Card8 | format | =2 |
| struct | Range2 [varies] |
Range2 array |
Range2 Format
| Type | Name | Description |
| SID | first | First glyph in range |
| Card16 | nLeft | Glyphs left in range (excluding first) |
Format 2 differs from format 1 only in the size of the nLeft field in each range. This format is most suitable for fonts with a large well-ordered charset - for example, for Asian CIDFonts.
Careful attention to the allocation order of SIDs typically yields very small font charsets. Still more optimization is possible by observing that many fonts adopt one of 3 common charsets. In these cases the operand to the charset operator in the Top DICT specifies a predefined charset id, in place of an offset, as shown in Table Charset ID.
Charset ID
| Id | Name |
| 0 | ISOAdobe |
| 1 | Expert |
| 2 | ExpertSubset |
If the font has an ISOAdobe charset, the charset operator can be omitted from
the Top DICT since its default value is 0. Details of predefined charsets can
be found in Appendix�C. A font may use a predefined charset if it exactly
matches in the first nGlyphs. CID fonts must not use predefined charsets.
Two or more fonts may share the same charset by setting the offset operand of
the charset operator to the same value in each font.
| Field Summary | |
|---|---|
static int |
EXPERT
Expert |
static int |
EXPERT_SUBSET
ExpertSubset |
static int |
FONT_DEFINE
FontDefine |
static int |
ISO_ADOPE
ISOAdobe |
| 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 | |
|---|---|
T2TDOCharset(java.util.List<T2CharString> stack)
Create a new object. |
|
| Method Summary | |
|---|---|
int |
getID()
Returns the id of the operator. |
java.lang.String |
getName()
Return the name of the operator. |
java.lang.String |
getNameForPos(int pos)
Returns the name for a position. |
int |
getSid(int pos)
Returns the sid. |
int |
getSidForStringIndex(int stringIndexpos)
Returns the sid for a value. |
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 |
|---|
getInitPrio, isArray, isBoolean, isEscape, readNumber, readNumber, readSID, readTopDICTOperator |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int ISO_ADOPE
public static final int EXPERT
public static final int EXPERT_SUBSET
public static final int FONT_DEFINE
| Constructor Detail |
|---|
public T2TDOCharset(java.util.List<T2CharString> stack)
throws java.io.IOException
stack - the stack
java.io.IOException - if an IO.error occurs.| Method Detail |
|---|
public int getID()
getID in class T2OperatorT2Operator.getID()public java.lang.String getName()
getName in class T2OperatorT2Operator.getName()public java.lang.String getNameForPos(int pos)
pos - The position.
public int getSid(int pos)
If the pos out of range, 0 (.notdef) is returned.
pos - nThe position in the array.
public int getSidForStringIndex(int stringIndexpos)
stringIndexpos - TODO
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.XMLWriterConvertible.writeXML(
org.extex.util.xml.XMLStreamWriter)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||