26 #ifndef HB_CFF_INTERP_COMMON_HH
27 #define HB_CFF_INTERP_COMMON_HH
39 #define OpCode_version 0
40 #define OpCode_Notice 1
41 #define OpCode_FullName 2
42 #define OpCode_FamilyName 3
43 #define OpCode_Weight 4
44 #define OpCode_FontBBox 5
45 #define OpCode_BlueValues 6
46 #define OpCode_OtherBlues 7
47 #define OpCode_FamilyBlues 8
48 #define OpCode_FamilyOtherBlues 9
49 #define OpCode_StdHW 10
50 #define OpCode_StdVW 11
51 #define OpCode_escape 12
52 #define OpCode_UniqueID 13
53 #define OpCode_XUID 14
54 #define OpCode_charset 15
55 #define OpCode_Encoding 16
56 #define OpCode_CharStrings 17
57 #define OpCode_Private 18
58 #define OpCode_Subrs 19
59 #define OpCode_defaultWidthX 20
60 #define OpCode_nominalWidthX 21
61 #define OpCode_vsindexdict 22
62 #define OpCode_blenddict 23
63 #define OpCode_vstore 24
64 #define OpCode_reserved25 25
65 #define OpCode_reserved26 26
66 #define OpCode_reserved27 27
69 #define OpCode_shortint 28
70 #define OpCode_longintdict 29
72 #define OpCode_reserved31 31
75 #define OpCode_OneByteIntFirst 32
76 #define OpCode_OneByteIntLast 246
79 #define OpCode_TwoBytePosInt0 247
80 #define OpCode_TwoBytePosInt1 248
81 #define OpCode_TwoBytePosInt2 249
82 #define OpCode_TwoBytePosInt3 250
84 #define OpCode_TwoByteNegInt0 251
85 #define OpCode_TwoByteNegInt1 252
86 #define OpCode_TwoByteNegInt2 253
87 #define OpCode_TwoByteNegInt3 254
90 #define OpCode_ESC_Base 256
91 #define Make_OpCode_ESC(byte2) ((op_code_t)(OpCode_ESC_Base + (byte2)))
97 #define OpCode_Copyright Make_OpCode_ESC(0)
98 #define OpCode_isFixedPitch Make_OpCode_ESC(1)
99 #define OpCode_ItalicAngle Make_OpCode_ESC(2)
100 #define OpCode_UnderlinePosition Make_OpCode_ESC(3)
101 #define OpCode_UnderlineThickness Make_OpCode_ESC(4)
102 #define OpCode_PaintType Make_OpCode_ESC(5)
103 #define OpCode_CharstringType Make_OpCode_ESC(6)
104 #define OpCode_FontMatrix Make_OpCode_ESC(7)
105 #define OpCode_StrokeWidth Make_OpCode_ESC(8)
106 #define OpCode_BlueScale Make_OpCode_ESC(9)
107 #define OpCode_BlueShift Make_OpCode_ESC(10)
108 #define OpCode_BlueFuzz Make_OpCode_ESC(11)
109 #define OpCode_StemSnapH Make_OpCode_ESC(12)
110 #define OpCode_StemSnapV Make_OpCode_ESC(13)
111 #define OpCode_ForceBold Make_OpCode_ESC(14)
112 #define OpCode_reservedESC15 Make_OpCode_ESC(15)
113 #define OpCode_reservedESC16 Make_OpCode_ESC(16)
114 #define OpCode_LanguageGroup Make_OpCode_ESC(17)
115 #define OpCode_ExpansionFactor Make_OpCode_ESC(18)
116 #define OpCode_initialRandomSeed Make_OpCode_ESC(19)
117 #define OpCode_SyntheticBase Make_OpCode_ESC(20)
118 #define OpCode_PostScript Make_OpCode_ESC(21)
119 #define OpCode_BaseFontName Make_OpCode_ESC(22)
120 #define OpCode_BaseFontBlend Make_OpCode_ESC(23)
121 #define OpCode_reservedESC24 Make_OpCode_ESC(24)
122 #define OpCode_reservedESC25 Make_OpCode_ESC(25)
123 #define OpCode_reservedESC26 Make_OpCode_ESC(26)
124 #define OpCode_reservedESC27 Make_OpCode_ESC(27)
125 #define OpCode_reservedESC28 Make_OpCode_ESC(28)
126 #define OpCode_reservedESC29 Make_OpCode_ESC(29)
127 #define OpCode_ROS Make_OpCode_ESC(30)
128 #define OpCode_CIDFontVersion Make_OpCode_ESC(31)
129 #define OpCode_CIDFontRevision Make_OpCode_ESC(32)
130 #define OpCode_CIDFontType Make_OpCode_ESC(33)
131 #define OpCode_CIDCount Make_OpCode_ESC(34)
132 #define OpCode_UIDBase Make_OpCode_ESC(35)
133 #define OpCode_FDArray Make_OpCode_ESC(36)
134 #define OpCode_FDSelect Make_OpCode_ESC(37)
135 #define OpCode_FontName Make_OpCode_ESC(38)
140 #define OpCode_hstem 1
141 #define OpCode_Reserved2 2
142 #define OpCode_vstem 3
143 #define OpCode_vmoveto 4
144 #define OpCode_rlineto 5
145 #define OpCode_hlineto 6
146 #define OpCode_vlineto 7
147 #define OpCode_rrcurveto 8
148 #define OpCode_Reserved9 9
149 #define OpCode_callsubr 10
150 #define OpCode_return 11
152 #define OpCode_Reserved13 13
153 #define OpCode_endchar 14
154 #define OpCode_vsindexcs 15
155 #define OpCode_blendcs 16
156 #define OpCode_Reserved17 17
157 #define OpCode_hstemhm 18
158 #define OpCode_hintmask 19
159 #define OpCode_cntrmask 20
160 #define OpCode_rmoveto 21
161 #define OpCode_hmoveto 22
162 #define OpCode_vstemhm 23
163 #define OpCode_rcurveline 24
164 #define OpCode_rlinecurve 25
165 #define OpCode_vvcurveto 26
166 #define OpCode_hhcurveto 27
168 #define OpCode_callgsubr 29
169 #define OpCode_vhcurveto 30
170 #define OpCode_hvcurveto 31
172 #define OpCode_fixedcs 255
175 #define OpCode_dotsection Make_OpCode_ESC(0)
176 #define OpCode_ReservedESC1 Make_OpCode_ESC(1)
177 #define OpCode_ReservedESC2 Make_OpCode_ESC(2)
178 #define OpCode_and Make_OpCode_ESC(3)
179 #define OpCode_or Make_OpCode_ESC(4)
180 #define OpCode_not Make_OpCode_ESC(5)
181 #define OpCode_ReservedESC6 Make_OpCode_ESC(6)
182 #define OpCode_ReservedESC7 Make_OpCode_ESC(7)
183 #define OpCode_ReservedESC8 Make_OpCode_ESC(8)
184 #define OpCode_abs Make_OpCode_ESC(9)
185 #define OpCode_add Make_OpCode_ESC(10)
186 #define OpCode_sub Make_OpCode_ESC(11)
187 #define OpCode_div Make_OpCode_ESC(12)
188 #define OpCode_ReservedESC13 Make_OpCode_ESC(13)
189 #define OpCode_neg Make_OpCode_ESC(14)
190 #define OpCode_eq Make_OpCode_ESC(15)
191 #define OpCode_ReservedESC16 Make_OpCode_ESC(16)
192 #define OpCode_ReservedESC17 Make_OpCode_ESC(17)
193 #define OpCode_drop Make_OpCode_ESC(18)
194 #define OpCode_ReservedESC19 Make_OpCode_ESC(19)
195 #define OpCode_put Make_OpCode_ESC(20)
196 #define OpCode_get Make_OpCode_ESC(21)
197 #define OpCode_ifelse Make_OpCode_ESC(22)
198 #define OpCode_random Make_OpCode_ESC(23)
199 #define OpCode_mul Make_OpCode_ESC(24)
201 #define OpCode_sqrt Make_OpCode_ESC(26)
202 #define OpCode_dup Make_OpCode_ESC(27)
203 #define OpCode_exch Make_OpCode_ESC(28)
204 #define OpCode_index Make_OpCode_ESC(29)
205 #define OpCode_roll Make_OpCode_ESC(30)
206 #define OpCode_reservedESC31 Make_OpCode_ESC(31)
207 #define OpCode_reservedESC32 Make_OpCode_ESC(32)
208 #define OpCode_reservedESC33 Make_OpCode_ESC(33)
209 #define OpCode_hflex Make_OpCode_ESC(34)
210 #define OpCode_flex Make_OpCode_ESC(35)
211 #define OpCode_hflex1 Make_OpCode_ESC(36)
212 #define OpCode_flex1 Make_OpCode_ESC(37)
215 #define OpCode_Invalid 0xFFFFu
230 {
return ((
double) (int16_t)
to_int () ==
value); }
252 template <
typename T,
typename V>
261 T *ip =
c->allocate_size<
T> (T::static_size);
266 template <
typename V>
270 template <
typename V>
332 return Null (
unsigned char);
371 template <
typename ELEM,
int LIMIT>
460 template <
typename ARG=number_t>
498 push_int ((str_ref[0] << 24) | (str_ref[1] << 16) | (str_ref[2] << 8) | (str_ref[3]));
512 {
return S::elements.sub_array (
start); }
540 template <
typename VAL>
581 template <
typename ARG=number_t>
630 template <
typename ARG=number_t>
668 template <
typename ENV>
small capitals from c petite p scientific i
[1]
#define OpCode_TwoBytePosInt1
#define Make_OpCode_ESC(byte2)
#define OpCode_OneByteIntLast
#define OpCode_longintdict
#define OpCode_TwoBytePosInt3
#define OpCode_TwoBytePosInt2
#define OpCode_TwoBytePosInt0
#define OpCode_TwoByteNegInt1
#define OpCode_TwoByteNegInt2
#define OpCode_OneByteIntFirst
#define OpCode_TwoByteNegInt3
#define OpCode_TwoByteNegInt0
#define TRACE_SERIALIZE(this)
#define return_trace(RET)
auto it unsigned count const
@ HB_SERIALIZE_ERROR_INT_OVERFLOW
unsigned int OpCode_Size(op_code_t op)
interp_env_t num_interp_env_t
hb_vector_t< byte_str_t > byte_str_array_t
op_code_t Unmake_OpCode_ESC(op_code_t op)
bool Is_OpCode_ESC(op_code_t op)
set set set set set set set macro pixldst1 op
EGLOutputLayerEXT EGLint EGLAttrib value
GLenum GLuint GLenum GLsizei length
GLenum GLsizei GLsizei GLint * values
[16]
GLsizei const GLfloat * v
[13]
GLenum GLenum GLsizei count
GLenum GLuint GLintptr offset
static bool serialize_int2(hb_serialize_context_t *c, V value)
static bool serialize_int4(hb_serialize_context_t *c, V value)
static bool serialize_int(hb_serialize_context_t *c, op_code_t intOp, V value)
void push_fixed(int32_t v)
bool push_fixed_from_substr(byte_str_ref_t &str_ref)
hb_array_t< const ARG > get_subarray(unsigned int start) const
void push_longint_from_substr(byte_str_ref_t &str_ref)
const unsigned char & operator[](int i)
byte_str_ref_t(const byte_str_t &str_, unsigned int offset_=0)
byte_str_t sub_str(unsigned int offset_, unsigned int len_) const
void reset(const byte_str_t &str_, unsigned int offset_=0)
bool avail(unsigned int count=1) const
void inc(unsigned int count=1)
byte_str_t(const UnsizedByteStr &s, unsigned int l)
bool check_limit(unsigned int offset, unsigned int count) const
byte_str_t(const hb_ubytes_t &ub)
byte_str_t(const unsigned char *s, unsigned int l)
byte_str_t sub_str(unsigned int offset, unsigned int len_) const
static constexpr unsigned kSizeLimit
unsigned int get_count() const
ELEM & operator[](unsigned int i)
hb_vector_t< ELEM > elements
const ARG & eval_arg(unsigned int i)
void pop_n_args(unsigned int n)
void init(const byte_str_t &str_)
arg_stack_t< ARG > argStack
bool in_int_range() const
const number_t & operator+=(const number_t &n)
bool operator>(const number_t &n) const
bool operator<(const number_t &n) const
bool operator>=(const number_t &n) const
bool operator<=(const number_t &n) const
void set_fixed(int32_t v)
bool copy_opstr(hb_serialize_context_t *c, const op_str_t &opstr) const
static void process_op(op_code_t op, interp_env_t< ARG > &env)
void add_op(op_code_t op, const byte_str_ref_t &str_ref, const VAL &v)
bool has_op(op_code_t op) const
const VAL & get_value(unsigned int i) const
void add_op(op_code_t op, const byte_str_ref_t &str_ref=byte_str_ref_t())
const VAL & operator[](unsigned int i) const
unsigned get_count() const
hb_vector_t< VAL > values
hb_array_t sub_array(unsigned int start_offset=0, unsigned int *seg_count=nullptr) const