Branch Coverage

src/pdfmake_font.c
Criterion Covered Total %
branch 16 54 29.6


line true false branch
23 93 0 if (!arena || !base_font) return NULL;
0 93 if (!arena || !base_font) return NULL;
27 1 92 if (id < 0) return NULL;
30 0 92 if (!data) return NULL;
33 0 92 if (!font) return NULL;
62 0 879821 if (!font) return 0;
73 0 0 if (font->ttf) {
90 15506 0 if (!font || !utf8) return 0;
0 15506 if (!font || !utf8) return 0;
95 879802 15506 while (p < end) {
99 879801 1 if ((*p & 0x80) == 0) {
101 1 0 } else if ((*p & 0xE0) == 0xC0) {
102 0 1 if (p + 1 >= end) break;
105 0 0 } else if ((*p & 0xF0) == 0xE0) {
106 0 0 if (p + 2 >= end) break;
110 0 0 } else if ((*p & 0xF8) == 0xF0) {
111 0 0 if (p + 3 >= end) break;
129 0 8 if (!font) return NULL;
144 0 0 if (!arena || !ttf_bytes || len == 0) return NULL;
0 0 if (!arena || !ttf_bytes || len == 0) return NULL;
0 0 if (!arena || !ttf_bytes || len == 0) return NULL;
147 0 0 if (!ttf) return NULL;
150 0 0 if (!font) return NULL;
159 0 0 upm = ttf->units_per_em > 0 ? ttf->units_per_em : 1000;
165 0 0 if (ttf->has_os2) {
166 0 0 m->cap_height = ttf->s_cap_height > 0 ? (ttf->s_cap_height * 1000) / upm : m->ascent;
167 0 0 m->x_height = ttf->s_x_height > 0 ? (ttf->s_x_height * 1000) / upm : m->cap_height * 7 / 10;