Branch Coverage

src/pdfmake_ttf.c
Criterion Covered Total %
branch 0 124 0.0


line true false branch
48 0 0 for (i = 0; i < num_tables; i++) {
50 0 0 if (t == tag) {
71 0 0 if (!arena || !data || len < 12) return NULL;
0 0 if (!arena || !data || len < 12) return NULL;
0 0 if (!arena || !data || len < 12) return NULL;
76 0 0 if (sfnt_version != 0x00010000 && sfnt_version != TAG('t','r','u','e') &&
0 0 if (sfnt_version != 0x00010000 && sfnt_version != TAG('t','r','u','e') &&
0 0 if (sfnt_version != 0x00010000 && sfnt_version != TAG('t','r','u','e') &&
82 0 0 if (len < 12 + num_tables * 16) return NULL;
85 0 0 if (!ttf) return NULL;
112 0 0 if (ttf->head.length >= 54) {
124 0 0 if (ttf->maxp.length >= 6) {
129 0 0 if (ttf->hhea.length >= 36) {
138 0 0 if (ttf->os2.length >= 78) {
145 0 0 if (ttf->os2.length >= 72) {
150 0 0 if (ttf->os2.length >= 90) {
157 0 0 if (ttf->cmap.length >= 4) {
163 0 0 for (i = 0; i < num_subtables && ttf->cmap.offset + 4 + i*8 + 8 <= len; i++) {
0 0 for (i = 0; i < num_subtables && ttf->cmap.offset + 4 + i*8 + 8 <= len; i++) {
168 0 0 if (ttf->cmap.offset + subtable_offset + 2 <= len) {
172 0 0 if (format == 12 && ((platform == 3 && encoding == 10) ||
0 0 if (format == 12 && ((platform == 3 && encoding == 10) ||
0 0 if (format == 12 && ((platform == 3 && encoding == 10) ||
0 0 if (format == 12 && ((platform == 3 && encoding == 10) ||
173 0 0 (platform == 0 && encoding >= 3))) {
176 0 0 } else if (format == 4 && ttf->cmap_format != 12 &&
0 0 } else if (format == 4 && ttf->cmap_format != 12 &&
0 0 } else if (format == 4 && ttf->cmap_format != 12 &&
177 0 0 ((platform == 3 && encoding == 1) ||
0 0 ((platform == 3 && encoding == 1) ||
178 0 0 (platform == 0 && encoding <= 3))) {
190 0 0 if (ttf->used_glyphs) {
211 0 0 if (codepoint > 0xFFFF) return 0; /* Format 4 only handles BMP */
219 0 0 if (ttf->cmap_offset + length > ttf->data_len) return 0;
228 0 0 while (lo < hi) {
231 0 0 if (mid_end < codepoint) {
238 0 0 if (lo >= seg_count) return 0;
243 0 0 if (codepoint < start_code || codepoint > end_code) return 0;
0 0 if (codepoint < start_code || codepoint > end_code) return 0;
248 0 0 if (id_range_offset == 0) {
253 0 0 if (glyph_addr >= ttf->data + ttf->data_len - 1) return 0;
255 0 0 if (glyph_id != 0) {
277 0 0 if (ttf->cmap_offset + length > ttf->data_len) return 0;
278 0 0 if (length < 16 + num_groups * 12) return 0;
284 0 0 while (lo < hi) {
287 0 0 if (mid_end < codepoint) {
294 0 0 if (lo >= num_groups) return 0;
300 0 0 if (codepoint < start_code || codepoint > end_code) return 0;
0 0 if (codepoint < start_code || codepoint > end_code) return 0;
310 0 0 if (!ttf || ttf->cmap_offset == 0) return 0;
0 0 if (!ttf || ttf->cmap_offset == 0) return 0;
312 0 0 if (ttf->cmap_format == 12) {
314 0 0 } else if (ttf->cmap_format == 4) {
328 0 0 if (!ttf || glyph_id >= ttf->num_glyphs) return 0;
0 0 if (!ttf || glyph_id >= ttf->num_glyphs) return 0;
329 0 0 if (ttf->hmtx.offset == 0) return 0;
333 0 0 if (glyph_id < ttf->num_h_metrics) {
340 0 0 if (ttf->units_per_em == 0) return advance;
351 0 0 if (!ttf || !ttf->used_glyphs) return;
0 0 if (!ttf || !ttf->used_glyphs) return;
352 0 0 if (glyph_id >= ttf->num_glyphs) return;
357 0 0 if (!(ttf->used_glyphs[byte] & bit)) {