Branch Coverage

blib/lib/Text/Layout/PDFAPI2.pm
Criterion Covered Total %
branch 34 132 25.7


line true false branch
19 0 2 unless (@data == 1 and ref($data[0]) =~ /^PDF::(API2|Builder)\b/)
24 2 0 if (not $fc or $fc->{'__PDF__'} ne $data[0])
34 0 0 if defined $hb
46 3 1 if defined $f->{'_hb_checked'}
48 0 1 if ($f->get_shaping) { }
50 0 0 if ($f->{'font'}->can('fontfilename')) { }
51 0 0 if (_hb_init())
77 0 1 if ($self->{'_width'})
79 0 0 if ($w < $self->{'_width'})
80 0 0 if ($align eq 'right') { }
0 0 elsif ($align eq 'center') { }
94 0 1 unless length $fragment->{'text'}
99 0 1 unless ($font)
108 0 1 if (_hb_font_check($f)) { }
112 0 0 if $f->{'direction'}
113 0 0 if $f->{'language'}
120 0 0 if ($fragment->{'bgcolor'})
159 1 0 if ($t ne "")
164 0 1 if ($fragment->{'bgcolor'})
188 0 1 unless $x > $x0
194 0 1 if ($fragment->{'underline'} and $fragment->{'underline'} ne "none")
201 0 0 if ($fragment->{'underline'} eq 'double') { }
210 0 1 if ($fragment->{'strikethrough'})
214 0 0 $f->{'strikeline_position'} ? :
222 0 1 if ($fragment->{'overline'} and $fragment->{'overline'} ne "none")
228 0 0 $f->{'overline_position'} ? :
231 0 0 if ($fragment->{'overline'} eq 'double') { }
252 0 1 if ($fragment->{'href'})
276 0 3 unless ($font)
287 0 3 if (_hb_font_check($f)) { }
0 3 elsif ($all and $font->can('extents')) { }
290 0 0 if $f->{'language'}
291 0 0 if $f->{'direction'}
297 0 0 if ($all) { }
310 0 0 if $e->{'width'}
312 0 0 if not defined $yMin or $e->{'yMin'} < $yMin
314 0 0 if not defined $yMax or $e->{'yMax'} > $yMax
327 0 0 if $all and 0
329 0 0 if $all
332 0 0 if ($all)
337 0 0 if not defined $yMin or $e->{'yMin'} < $yMin
339 0 0 if not defined $yMax or $e->{'yMax'} > $yMax
350 3 0 if (not $f->get_interline) { }
365 3 0 if $d0 < $d
366 3 0 if $a0 > $a
370 0 3 unless $dir eq $mydir
377 0 0 if ($self->{'_width'} and $dir and $w < $self->{'_width'})
378 0 0 if ($dir eq "rtl" and !$align || $align eq 'left')
383 0 0 if ($self->{'_width'} and $align and $w < $self->{'_width'})
385 0 0 if ($align eq 'right') { }
0 0 elsif ($align eq 'center') { }
388 0 0 if defined $xMin
389 0 0 if defined $xMax
394 0 0 if defined $xMin
395 0 0 if defined $xMax
399 0 3 defined $xMin ? :
407 0 2 if ($fc->{$font})
412 0 2 if ($font =~ /\.[ot]tf$/) { }
417 0 0 $fd->{'nosubset'} ? :
428 0 2 unless $ff
480 0 19 if ($self->{'-dokern'} and $self->haveKernPairs)
481 0 0 if ($self->kernPairCid($lastglyph, $n))
487 0 19 unless (defined $ex and %$ex)
502 4 15 if not defined $yMin or $e->{'yMin'} < $yMin
503 1 18 if not defined $yMax or $e->{'yMax'} > $yMax
507 1 0 if (defined $lastwidth) { }