| 1 |
/* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. |
| 2 |
|
| 3 |
Copyright (C) 2002-2020 by Jin-Hwan Cho and Shunsaku Hirata, |
| 4 |
the dvipdfmx project team. |
| 5 |
|
| 6 |
Copyright (C) 1998, 1999 by Mark A. Wicks <[email protected]> |
| 7 |
|
| 8 |
This program is free software; you can redistribute it and/or modify |
| 9 |
it under the terms of the GNU General Public License as published by |
| 10 |
the Free Software Foundation; either version 2 of the License, or |
| 11 |
(at your option) any later version. |
| 12 |
|
| 13 |
This program is distributed in the hope that it will be useful, |
| 14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 |
GNU General Public License for more details. |
| 17 |
|
| 18 |
You should have received a copy of the GNU General Public License |
| 19 |
along with this program; if not, write to the Free Software |
| 20 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
| 21 |
*/ |
| 22 |
|
| 23 |
#ifndef _DVICODES_H_ |
| 24 |
#define _DVICODES_H_ |
| 25 |
|
| 26 |
/* DVI op codes */ |
| 27 |
#define SET_CHAR_0 0 |
| 28 |
#define SET_CHAR_1 1 |
| 29 |
/* etc. */ |
| 30 |
#define SET_CHAR_127 127 |
| 31 |
#define SET1 128 /* Typesets its single operand between 128 and 255 */ |
| 32 |
#define SET2 129 /* Typesets its single two byte unsigned operand */ |
| 33 |
#define SET3 130 /* Typesets its single three byte unsigned operand */ |
| 34 |
#define SET4 131 /* Typesets its single four byte signed operand */ |
| 35 |
#define SET_RULE 132 /* Sets a rule of height param1(four bytes) and width param2(four bytes) */ |
| 36 |
/* These are *signed*. Nothing typeset for nonpositive values */ |
| 37 |
/* However, negative value *do* change current point */ |
| 38 |
#define PUT1 133 /* Like SET1, but point doesn't change */ |
| 39 |
#define PUT2 134 /* Like SET2 */ |
| 40 |
#define PUT3 135 /* Like SET3 */ |
| 41 |
#define PUT4 136 /* Like SET4 */ |
| 42 |
#define PUT_RULE 137 /* Like SET_RULE */ |
| 43 |
#define NOP 138 |
| 44 |
#define BOP 139 /* Followed by 10 four byte count registers (signed?). Last parameter points to */ |
| 45 |
/* previous BOP (backward linked, first BOP has -1). BOP clears stack and resets current point. */ |
| 46 |
#define EOP 140 |
| 47 |
#define PUSH 141 /* Pushes h,v,w,x,y,z */ |
| 48 |
#define POP 142 /* Opposite of push*/ |
| 49 |
#define RIGHT1 143 /* Move right by one byte signed operand */ |
| 50 |
#define RIGHT2 144 /* Move right by two byte signed operand */ |
| 51 |
#define RIGHT3 145 /* Move right by three byte signed operand */ |
| 52 |
#define RIGHT4 146 /* Move right by four byte signed operand */ |
| 53 |
#define W0 147 /* Move right w */ |
| 54 |
#define W1 148 /* w <- single byte signed operand. Move right by same amount */ |
| 55 |
#define W2 149 /* Same as W1 with two byte signed operand */ |
| 56 |
#define W3 150 /* Three byte signed operand */ |
| 57 |
#define W4 151 /* Four byte signed operand */ |
| 58 |
#define X0 152 /* Move right x */ |
| 59 |
#define X1 153 /* Like W1 */ |
| 60 |
#define X2 154 /* Like W2 */ |
| 61 |
#define X3 155 /* Like W3 */ |
| 62 |
#define X4 156 /* Like W4 */ |
| 63 |
#define DOWN1 157 /* Move down by one byte signed operand */ |
| 64 |
#define DOWN2 158 /* Two byte signed operand */ |
| 65 |
#define DOWN3 159 /* Three byte signed operand */ |
| 66 |
#define DOWN4 160 /* Four byte signed operand */ |
| 67 |
#define Y0 161 /* Move down by y */ |
| 68 |
#define Y1 162 /* Move down by one byte signed operand, which replaces Y */ |
| 69 |
#define Y2 163 /* Two byte signed operand */ |
| 70 |
#define Y3 164 /* Three byte signed operand */ |
| 71 |
#define Y4 165 /* Four byte signed operand */ |
| 72 |
#define Z0 166 /* Like Y0, but use z */ |
| 73 |
#define Z1 167 /* Like Y1 */ |
| 74 |
#define Z2 168 /* Like Y2 */ |
| 75 |
#define Z3 169 /* Like Y3 */ |
| 76 |
#define Z4 170 /* Like Y4 */ |
| 77 |
#define FNT_NUM_0 171 /* Switch to font 0 */ |
| 78 |
#define FNT_NUM_1 172 /* Switch to font 1 */ |
| 79 |
/* etc. */ |
| 80 |
#define FNT_NUM_63 234 /* Switch to font 63 */ |
| 81 |
#define FNT1 235 /* Switch to font described by single byte unsigned operand */ |
| 82 |
#define FNT2 236 /* Switch to font described by two byte unsigned operand */ |
| 83 |
#define FNT3 237 /* Three byte font descriptor */ |
| 84 |
#define FNT4 238 /* Four byte operator (Knuth says signed, but what would be the point? */ |
| 85 |
#define XXX1 239 /* Special. Operand is one byte length. Special follows immediately */ |
| 86 |
#define XXX2 240 /* Two byte operand */ |
| 87 |
#define XXX3 241 /* Three byte operand */ |
| 88 |
#define XXX4 242 /* Four byte operand (Knuth says TeX uses only XXX1 and XXX4 */ |
| 89 |
#define FNT_DEF1 243 /* One byte font number, four byte checksum, four byte magnified size (DVI units), |
| 90 |
four byte designed size, single byte directory length, single byte name length, |
| 91 |
followed by complete name (area+name) */ |
| 92 |
#define FNT_DEF2 244 /* Same for two byte font number */ |
| 93 |
#define FNT_DEF3 245 /* Same for three byte font number */ |
| 94 |
#define FNT_DEF4 246 /* Four byte font number (Knuth says signed) */ |
| 95 |
#define PRE 247 /* Preamble: |
| 96 |
one byte DVI version (should be 2) |
| 97 |
four byte unsigned numerator |
| 98 |
four byte unsigned denominator -- one DVI unit = den/num*10^(-7) m |
| 99 |
four byte magnification (multiplied by 1000) |
| 100 |
one byte unsigned comment length followed by comment. */ |
| 101 |
#define DVI_ID 2 /* ID Byte for current DVI file */ |
| 102 |
#define DVIV_ID 3 /* with Ascii pTeX VW mode extension */ |
| 103 |
#define XDV_ID_OLD 6 /* older XeTeX ".xdv" output that does not have XDV_TEXT_AND_GLYPHS */ |
| 104 |
#define XDV_ID 7 /* XeTeX ".xdv" output that uses XDV opcodes below */ |
| 105 |
#define POST 248 /* Postamble- -- similar to preamble |
| 106 |
four byte pointer to final bop |
| 107 |
four byte numerator |
| 108 |
four byte denominator |
| 109 |
four byte mag |
| 110 |
four byte maximum height (signed?) |
| 111 |
four byte maximum width |
| 112 |
two byte max stack depth required to process file |
| 113 |
two byte number of pages */ |
| 114 |
#define POST_POST 249 /* End of postamble |
| 115 |
four byte pointer to POST command |
| 116 |
Version byte (same as preamble) |
| 117 |
Padded by four or more 223's to the end of the file. */ |
| 118 |
#define PADDING 223 |
| 119 |
|
| 120 |
#define BEGIN_REFLECT 250 /* TeX-XeT begin_reflect */ |
| 121 |
#define END_REFLECT 251 /* TeX-XeT end_reflect */ |
| 122 |
|
| 123 |
/* XeTeX ".xdv" codes */ |
| 124 |
#define XDV_NATIVE_FONT_DEF 252 /* fontdef for native platform font */ |
| 125 |
#define XDV_GLYPHS 253 /* string of glyph IDs with X and Y positions */ |
| 126 |
#define XDV_TEXT_AND_GLYPHS 254 /* like XDV_GLYPHS plus original Unicode text */ |
| 127 |
|
| 128 |
#define PTEXDIR 255 /* Ascii pTeX DIR command */ |
| 129 |
|
| 130 |
#endif /* _DVICODES_H_ */ |