Branch Coverage

src/pdfmake_font_glyph.c
Criterion Covered Total %
branch 0 162 0.0


line true false branch
27 0 0 if (!font || !arena) return NULL;
0 0 if (!font || !arena) return NULL;
31 0 0 if (!cache) return NULL;
35 0 0 if (font->type == PDFMAKE_FONT_TRUETYPE ||
36 0 0 font->type == PDFMAKE_FONT_CID_TRUETYPE) {
37 0 0 if (font->ttf) {
45 0 0 if (glyph_count == 0) {
56 0 0 if (!cache->glyphs) return NULL;
69 0 0 if (!cache) return;
71 0 0 if (cache->glyphs && !cache->arena) {
0 0 if (cache->glyphs && !cache->arena) {
72 0 0 for (i = 0; i < cache->glyph_count; i++) {
73 0 0 if (cache->glyphs[i].path) {
88 0 0 if (!cache || !font) return NULL;
0 0 if (!cache || !font) return NULL;
89 0 0 if (glyph_id >= cache->glyph_count) return NULL;
94 0 0 if (!outline->loaded) {
96 0 0 if (err != PDFMAKE_TEXT_OK) {
114 0 0 if (!cache || !font) return PDFMAKE_TEXT_ERR_NULL;
0 0 if (!cache || !font) return PDFMAKE_TEXT_ERR_NULL;
115 0 0 if (glyph_id >= cache->glyph_count) return PDFMAKE_TEXT_ERR_GLYPH_NOT_FOUND;
120 0 0 if (outline->loaded) return PDFMAKE_TEXT_OK;
145 0 0 if (err == PDFMAKE_TEXT_OK) {
186 0 0 if (!ttf || glyph_id >= ttf->num_glyphs) return 0;
0 0 if (!ttf || glyph_id >= ttf->num_glyphs) return 0;
190 0 0 if (ttf->index_to_loc_format == 0) {
200 0 0 if (out_len) {
271 0 0 if (!outline || !font || !font->ttf || !arena) {
0 0 if (!outline || !font || !font->ttf || !arena) {
0 0 if (!outline || !font || !font->ttf || !arena) {
0 0 if (!outline || !font || !font->ttf || !arena) {
283 0 0 if (glyph_len == 0) {
294 0 0 if (glyph_len < 10) return PDFMAKE_TEXT_ERR_PARSE_ERROR;
304 0 0 if (num_contours < 0) {
312 0 0 if (num_contours == 0) {
320 0 0 if (!path) return PDFMAKE_TEXT_ERR_MEMORY;
323 0 0 if (p + num_contours * 2 > end) return PDFMAKE_TEXT_ERR_PARSE_ERROR;
326 0 0 if (!end_pts) return PDFMAKE_TEXT_ERR_MEMORY;
328 0 0 for (i = 0; i < num_contours; i++) {
336 0 0 if (p + 2 > end) return PDFMAKE_TEXT_ERR_PARSE_ERROR;
340 0 0 if (p > end) return PDFMAKE_TEXT_ERR_PARSE_ERROR;
344 0 0 if (!flags) return PDFMAKE_TEXT_ERR_MEMORY;
346 0 0 for (i = 0; i < num_points; ) {
347 0 0 if (p >= end) return PDFMAKE_TEXT_ERR_PARSE_ERROR;
351 0 0 if (flag & TTF_REPEAT) {
352 0 0 if (p >= end) return PDFMAKE_TEXT_ERR_PARSE_ERROR;
354 0 0 for (j = 0; j < repeat && i < num_points; j++) {
0 0 for (j = 0; j < repeat && i < num_points; j++) {
362 0 0 if (!x_coords) return PDFMAKE_TEXT_ERR_MEMORY;
365 0 0 for (i = 0; i < num_points; i++) {
367 0 0 if (flag & TTF_X_SHORT) {
368 0 0 if (p >= end) return PDFMAKE_TEXT_ERR_PARSE_ERROR;
370 0 0 x += (flag & TTF_X_SAME) ? dx : -dx;
371 0 0 } else if (!(flag & TTF_X_SAME)) {
372 0 0 if (p + 2 > end) return PDFMAKE_TEXT_ERR_PARSE_ERROR;
382 0 0 if (!y_coords) return PDFMAKE_TEXT_ERR_MEMORY;
385 0 0 for (i = 0; i < num_points; i++) {
387 0 0 if (flag & TTF_Y_SHORT) {
388 0 0 if (p >= end) return PDFMAKE_TEXT_ERR_PARSE_ERROR;
390 0 0 y += (flag & TTF_Y_SAME) ? dy : -dy;
391 0 0 } else if (!(flag & TTF_Y_SAME)) {
392 0 0 if (p + 2 > end) return PDFMAKE_TEXT_ERR_PARSE_ERROR;
401 0 0 for (c = 0; c < num_contours; c++) {
406 0 0 if (contour_len < 2) {
413 0 0 for (i = 0; i < contour_len; i++) {
414 0 0 if (flags[contour_start + i] & TTF_ON_CURVE) {
420 0 0 if (first_on < 0) {
432 0 0 for (i = 0; i < contour_len; i++) {
440 0 0 if (on_curve) {
448 0 0 if (next_on) {
505 0 0 if (!path || !m) return;
0 0 if (!path || !m) return;
507 0 0 for (i = 0; i < path->seg_count; i++) {
524 0 0 for (p = 0; p < num_pts; p++) {
533 0 0 if (path->has_current) {
541 0 0 if (path->has_subpath) {
557 0 0 if (!src || !m || !arena) return NULL;
0 0 if (!src || !m || !arena) return NULL;
0 0 if (!src || !m || !arena) return NULL;
561 0 0 if (!dst) return NULL;
564 0 0 for (i = 0; i < src->seg_count; i++) {