line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#! perl |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
115011
|
use strict; |
|
2
|
|
|
|
|
15
|
|
|
2
|
|
|
|
|
50
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
38
|
|
5
|
2
|
|
|
2
|
|
1074
|
use utf8; |
|
2
|
|
|
|
|
24
|
|
|
2
|
|
|
|
|
9
|
|
6
|
2
|
|
|
2
|
|
52
|
use Carp; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
114
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package Text::Layout::Testing; |
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
702
|
use parent 'Text::Layout'; |
|
2
|
|
|
|
|
499
|
|
|
2
|
|
|
|
|
9
|
|
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
2
|
|
84
|
use Text::Layout::FontConfig; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
486
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my $fc = Text::Layout::FontConfig->new( corefonts => 1 ); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
#### API |
17
|
|
|
|
|
|
|
sub new { |
18
|
2
|
|
|
2
|
1
|
157
|
my ( $pkg, @data ) = @_; |
19
|
2
|
|
|
|
|
13
|
my $self = $pkg->SUPER::new; |
20
|
2
|
|
|
|
|
30
|
$self->set_font_description( $fc->from_string("Times 10") ); |
21
|
2
|
|
|
|
|
4
|
$self; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
#### API |
25
|
|
|
|
|
|
|
sub render { |
26
|
0
|
|
|
0
|
0
|
0
|
my ( $self ) = @_; |
27
|
0
|
|
|
|
|
0
|
my $res = "Testing 1 2 3"; |
28
|
0
|
|
|
|
|
0
|
$res; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
#### API |
32
|
|
|
|
|
|
|
sub bbox { |
33
|
0
|
|
|
0
|
0
|
0
|
my ( $self ) = @_; |
34
|
0
|
|
|
|
|
0
|
[ 0, -5, 10, 15 ]; # dummy |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
#### API |
38
|
|
|
|
|
|
|
sub load_font { |
39
|
0
|
|
|
0
|
0
|
0
|
my ( $self, $description ) = @_; |
40
|
0
|
|
|
|
|
0
|
return $description; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
# For testing. |
44
|
|
|
|
|
|
|
sub _debug_text { |
45
|
19
|
|
|
19
|
|
38
|
my $c = $_[0]->{_content}; |
46
|
19
|
|
|
|
|
35
|
for my $f ( @$c ) { |
47
|
|
|
|
|
|
|
$f->{font} = $f->{font}->{loader_data} . "(" . |
48
|
|
|
|
|
|
|
join(",", $f->{font}->{family}, |
49
|
|
|
|
|
|
|
$f->{font}->{style}, |
50
|
|
|
|
|
|
|
$f->{font}->{weight}, |
51
|
58
|
|
66
|
|
|
235
|
$f->{font}->{size} // $f->{size}) . ")"; |
52
|
58
|
|
|
|
|
220
|
for ( keys %$f ) { |
53
|
|
|
|
|
|
|
next if defined($f->{$_}) |
54
|
754
|
100
|
100
|
|
|
2107
|
&& ! ( !$f->{$_} || /col/ && $f->{$_} eq 'black' ); |
|
|
|
100
|
|
|
|
|
55
|
567
|
|
|
|
|
698
|
delete $f->{$_}; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
} |
58
|
19
|
|
|
|
|
80
|
return $c; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |