Lines Matching refs:table

16   Buffer table(data, length);  in Parse()  local
18 if (!table.ReadU16(&this->table.version) || in Parse()
19 !table.ReadS16(&this->table.avg_char_width) || in Parse()
20 !table.ReadU16(&this->table.weight_class) || in Parse()
21 !table.ReadU16(&this->table.width_class) || in Parse()
22 !table.ReadU16(&this->table.type) || in Parse()
23 !table.ReadS16(&this->table.subscript_x_size) || in Parse()
24 !table.ReadS16(&this->table.subscript_y_size) || in Parse()
25 !table.ReadS16(&this->table.subscript_x_offset) || in Parse()
26 !table.ReadS16(&this->table.subscript_y_offset) || in Parse()
27 !table.ReadS16(&this->table.superscript_x_size) || in Parse()
28 !table.ReadS16(&this->table.superscript_y_size) || in Parse()
29 !table.ReadS16(&this->table.superscript_x_offset) || in Parse()
30 !table.ReadS16(&this->table.superscript_y_offset) || in Parse()
31 !table.ReadS16(&this->table.strikeout_size) || in Parse()
32 !table.ReadS16(&this->table.strikeout_position) || in Parse()
33 !table.ReadS16(&this->table.family_class)) { in Parse()
37 if (this->table.version > 5) { in Parse()
38 return Error("Unsupported table version: %u", this->table.version); in Parse()
41 if (this->table.weight_class < 1) { in Parse()
43 this->table.weight_class, 1); in Parse()
44 this->table.weight_class = 1; in Parse()
45 } else if (this->table.weight_class > 1000) { in Parse()
47 this->table.weight_class, 1000); in Parse()
48 this->table.weight_class = 1000; in Parse()
51 if (this->table.width_class < 1) { in Parse()
53 this->table.width_class, 1); in Parse()
54 this->table.width_class = 1; in Parse()
55 } else if (this->table.width_class > 9) { in Parse()
57 this->table.width_class, 9); in Parse()
58 this->table.width_class = 9; in Parse()
62 if (this->table.type & 0x2) { in Parse()
64 this->table.type &= 0xfff3u; in Parse()
65 } else if (this->table.type & 0x4) { in Parse()
67 this->table.type &= 0xfff4u; in Parse()
68 } else if (this->table.type & 0x8) { in Parse()
70 this->table.type &= 0xfff9u; in Parse()
74 this->table.type &= 0x30f; in Parse()
77 if (this->table.b < 0) { \ in Parse()
78 Warning("Bad " a ": %d, setting it to zero", this->table.b); \ in Parse()
79 this->table.b = 0; \ in Parse()
102 if (!table.ReadU8(&this->table.panose[i])) { in Parse()
107 if (!table.ReadU32(&this->table.unicode_range_1) || in Parse()
108 !table.ReadU32(&this->table.unicode_range_2) || in Parse()
109 !table.ReadU32(&this->table.unicode_range_3) || in Parse()
110 !table.ReadU32(&this->table.unicode_range_4) || in Parse()
111 !table.ReadU32(&this->table.vendor_id) || in Parse()
112 !table.ReadU16(&this->table.selection) || in Parse()
113 !table.ReadU16(&this->table.first_char_index) || in Parse()
114 !table.ReadU16(&this->table.last_char_index) || in Parse()
115 !table.ReadS16(&this->table.typo_ascender) || in Parse()
116 !table.ReadS16(&this->table.typo_descender) || in Parse()
117 !table.ReadS16(&this->table.typo_linegap) || in Parse()
118 !table.ReadU16(&this->table.win_ascent) || in Parse()
119 !table.ReadU16(&this->table.win_descent)) { in Parse()
124 if (this->table.selection & 0x40) { in Parse()
125 this->table.selection &= 0xffdeu; in Parse()
133 if ((this->table.selection & 0x1) && in Parse()
138 if ((this->table.selection & 0x2) && in Parse()
146 if ((this->table.selection & 0x40) && in Parse()
152 if ((this->table.version < 4) && in Parse()
153 (this->table.selection & 0x300)) { in Parse()
156 this->table.version); in Parse()
160 this->table.selection &= 0x3ff; in Parse()
162 if (this->table.first_char_index > this->table.last_char_index) { in Parse()
164 this->table.first_char_index, this->table.last_char_index); in Parse()
165 this->table.first_char_index = this->table.last_char_index; in Parse()
167 if (this->table.typo_linegap < 0) { in Parse()
168 Warning("Bad sTypoLineGap, setting it to 0: %d", this->table.typo_linegap); in Parse()
169 this->table.typo_linegap = 0; in Parse()
172 if (this->table.version < 1) { in Parse()
178 Warning("Bad version number, setting it to 0: %u", this->table.version); in Parse()
181 this->table.version = 0; in Parse()
185 if (!table.ReadU32(&this->table.code_page_range_1) || in Parse()
186 !table.ReadU32(&this->table.code_page_range_2)) { in Parse()
190 if (this->table.version < 2) { in Parse()
196 Warning("Bad version number, setting it to 1: %u", this->table.version); in Parse()
199 this->table.version = 1; in Parse()
203 if (!table.ReadS16(&this->table.x_height) || in Parse()
204 !table.ReadS16(&this->table.cap_height) || in Parse()
205 !table.ReadU16(&this->table.default_char) || in Parse()
206 !table.ReadU16(&this->table.break_char) || in Parse()
207 !table.ReadU16(&this->table.max_context)) { in Parse()
211 if (this->table.x_height < 0) { in Parse()
212 Warning("Bad sxHeight settig it to 0: %d", this->table.x_height); in Parse()
213 this->table.x_height = 0; in Parse()
215 if (this->table.cap_height < 0) { in Parse()
216 Warning("Bad sCapHeight setting it to 0: %d", this->table.cap_height); in Parse()
217 this->table.cap_height = 0; in Parse()
220 if (this->table.version < 5) { in Parse()
225 if (!table.ReadU16(&this->table.lower_optical_pointsize) || in Parse()
226 !table.ReadU16(&this->table.upper_optical_pointsize)) { in Parse()
230 if (this->table.lower_optical_pointsize > 0xFFFE) { in Parse()
232 this->table.lower_optical_pointsize); in Parse()
233 this->table.lower_optical_pointsize = 0xFFFE; in Parse()
236 if (this->table.upper_optical_pointsize < 2) { in Parse()
238 this->table.upper_optical_pointsize); in Parse()
239 this->table.upper_optical_pointsize = 2; in Parse()
246 if (!out->WriteU16(this->table.version) || in Serialize()
247 !out->WriteS16(this->table.avg_char_width) || in Serialize()
248 !out->WriteU16(this->table.weight_class) || in Serialize()
249 !out->WriteU16(this->table.width_class) || in Serialize()
250 !out->WriteU16(this->table.type) || in Serialize()
251 !out->WriteS16(this->table.subscript_x_size) || in Serialize()
252 !out->WriteS16(this->table.subscript_y_size) || in Serialize()
253 !out->WriteS16(this->table.subscript_x_offset) || in Serialize()
254 !out->WriteS16(this->table.subscript_y_offset) || in Serialize()
255 !out->WriteS16(this->table.superscript_x_size) || in Serialize()
256 !out->WriteS16(this->table.superscript_y_size) || in Serialize()
257 !out->WriteS16(this->table.superscript_x_offset) || in Serialize()
258 !out->WriteS16(this->table.superscript_y_offset) || in Serialize()
259 !out->WriteS16(this->table.strikeout_size) || in Serialize()
260 !out->WriteS16(this->table.strikeout_position) || in Serialize()
261 !out->WriteS16(this->table.family_class)) { in Serialize()
266 if (!out->Write(&this->table.panose[i], 1)) { in Serialize()
271 if (!out->WriteU32(this->table.unicode_range_1) || in Serialize()
272 !out->WriteU32(this->table.unicode_range_2) || in Serialize()
273 !out->WriteU32(this->table.unicode_range_3) || in Serialize()
274 !out->WriteU32(this->table.unicode_range_4) || in Serialize()
275 !out->WriteU32(this->table.vendor_id) || in Serialize()
276 !out->WriteU16(this->table.selection) || in Serialize()
277 !out->WriteU16(this->table.first_char_index) || in Serialize()
278 !out->WriteU16(this->table.last_char_index) || in Serialize()
279 !out->WriteS16(this->table.typo_ascender) || in Serialize()
280 !out->WriteS16(this->table.typo_descender) || in Serialize()
281 !out->WriteS16(this->table.typo_linegap) || in Serialize()
282 !out->WriteU16(this->table.win_ascent) || in Serialize()
283 !out->WriteU16(this->table.win_descent)) { in Serialize()
287 if (this->table.version < 1) { in Serialize()
291 if (!out->WriteU32(this->table.code_page_range_1) || in Serialize()
292 !out->WriteU32(this->table.code_page_range_2)) { in Serialize()
296 if (this->table.version < 2) { in Serialize()
300 if (!out->WriteS16(this->table.x_height) || in Serialize()
301 !out->WriteS16(this->table.cap_height) || in Serialize()
302 !out->WriteU16(this->table.default_char) || in Serialize()
303 !out->WriteU16(this->table.break_char) || in Serialize()
304 !out->WriteU16(this->table.max_context)) { in Serialize()
308 if (this->table.version < 5) { in Serialize()
312 if (!out->WriteU16(this->table.lower_optical_pointsize) || in Serialize()
313 !out->WriteU16(this->table.upper_optical_pointsize)) { in Serialize()