line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#! perl |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
120151
|
use strict; |
|
2
|
|
|
|
|
32
|
|
|
2
|
|
|
|
|
56
|
|
4
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
59
|
|
5
|
2
|
|
|
2
|
|
1026
|
use utf8; |
|
2
|
|
|
|
|
27
|
|
|
2
|
|
|
|
|
8
|
|
6
|
2
|
|
|
2
|
|
52
|
use Carp; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
144
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package Text::Layout::Testing; |
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
715
|
use parent 'Text::Layout'; |
|
2
|
|
|
|
|
590
|
|
|
2
|
|
|
|
|
9
|
|
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
2
|
|
122
|
use Text::Layout::FontConfig; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
526
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my $fc = Text::Layout::FontConfig->new( corefonts => 1 ); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
#### API |
17
|
|
|
|
|
|
|
sub new { |
18
|
2
|
|
|
2
|
1
|
156
|
my ( $pkg, @data ) = @_; |
19
|
2
|
|
|
|
|
20
|
my $self = $pkg->SUPER::new; |
20
|
2
|
|
|
|
|
43
|
$self->set_font_description( $fc->from_string("Times 10") ); |
21
|
2
|
|
|
|
|
6
|
$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
|
|
44
|
my $c = $_[0]->{_content}; |
46
|
19
|
|
|
|
|
39
|
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
|
|
|
250
|
$f->{font}->{size} // $f->{size}) . ")"; |
52
|
58
|
|
|
|
|
189
|
for ( keys %$f ) { |
53
|
|
|
|
|
|
|
next if defined($f->{$_}) |
54
|
754
|
100
|
100
|
|
|
2154
|
&& ! ( !$f->{$_} || /col/ && $f->{$_} eq 'black' ); |
|
|
|
100
|
|
|
|
|
55
|
567
|
|
|
|
|
746
|
delete $f->{$_}; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
} |
58
|
19
|
|
|
|
|
88
|
return $c; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |