API2/Resource/CIDFont.pm

filter: Statementstmt 25.0% 39 / 156 Branchbran 3.0% 2 / 66 Conditioncond 1.3% 1 / 73 MC/DCmcdc 0.0% 0 / 39 Subroutinesub 26.6% 8 / 30 Podpod 34.7% 8 / 23 totaltotal 14.9% 58 / 387 SCAR 78.8
CC
64
Cov
14%
cidsByStr
272.0
text_cid_kern
272.0
encodeByName
110.0
CRAP 2647.8
« API2/Content.pm ↑ Summary API2/UniWrap.pm »
1 package PDF::API2::Resource::CIDFont;
2  
3 2 ▶use base 'PDF::API2::Resource::BaseFont';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 our $VERSION = '2.044'; # VERSION
9  
10 2 ▶use Encode qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 2 ▶use PDF::API2::Basic::PDF::Utils;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 2 ▶use PDF::API2::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 =head1 NAME
16  
17 PDF::API2::Resource::CIDFont - Base class for CID fonts
18  
19 =head1 METHODS
20  
21 =over
22  
23 =item $font = PDF::API2::Resource::CIDFont->new $pdf, $name
24  
25 Returns a cid-font object. base class form all CID based fonts.
26  
27 =cut
28  
29 sub new {
30 1 ▶ my ($class, $pdf, $name, %opts) = @_;
Subroutine new: called CC=4 SCAR=14.0
Pod documented
31 1 ▶ $class = ref($class) if ref($class);
Branch: 1 branch
BranchTrueFalseTotal
if ref $class 0 1 1
32  
33 1 my $self = $class->SUPER::new($pdf, $name);
34  
35 1 ▶ $pdf->new_obj($self) if defined $pdf and not $self->is_obj($pdf);
Branch: 1 branch
BranchTrueFalseTotal
if defined $pdf and not $self->is_obj($pdf) 0 1 1
Condition33%1/3
defined $pdf and not $self->is_obj($pdf)
!ll&&!rl&&r
010
MC/DC0%0/2
defined $pdf and not $self->is_obj($pdf)
defined $pdf not $self->is_obj($pdf)
Truth table33%1/3
A and not(B)
A= defined $pdfB= not $self->is_obj($pdf)
ABresult
0X0
100
111
36  
37 1 $self->{'Type'} = PDFName('Font');
38 1 $self->{'Subtype'} = PDFName('Type0');
39 1 $self->{'Encoding'} = PDFName('Identity-H');
40  
41 1 my $de = PDFDict();
42 1 $pdf->new_obj($de);
43 1 $self->{'DescendantFonts'} = PDFArray($de);
44  
45 1 $de->{'Type'} = PDFName('Font');
46 1 $de->{'CIDSystemInfo'} = PDFDict();
47 1 $de->{'CIDSystemInfo'}->{'Registry'} = PDFStr('Adobe');
48 1 $de->{'CIDSystemInfo'}->{'Ordering'} = PDFStr('Identity');
49 1 $de->{'CIDSystemInfo'}->{'Supplement'} = PDFNum(0);
50 1 $de->{'CIDToGIDMap'} = PDFName('Identity');
51  
52 1 $self->{' de'} = $de;
53  
54 1 return $self;
55 }
56  
57 0 ▶sub glyphByCId { return $_[0]->data->{'g2n'}->[$_[1]] }
Subroutine glyphByCId: not called CC=1 SCAR=6.9
Pod undocumented
58  
59 0 ▶sub uniByCId { return $_[0]->data->{'g2u'}->[$_[1]] }
Subroutine uniByCId: not called CC=1 SCAR=6.9
Pod undocumented
60  
61 53 ▶sub cidByUni { return $_[0]->data->{'u2g'}->{$_[1]} }
Subroutine cidByUni: called CC=1 SCAR=0.0
Pod undocumented
62  
63 0 ▶sub cidByEnc { return $_[0]->data->{'e2g'}->[$_[1]] }
Subroutine cidByEnc: not called CC=1 SCAR=6.9
Pod undocumented
64  
65 sub wxByCId {
66 0 ▶ my ($self, $g) = @_;
Subroutine wxByCId: not called CC=5 SCAR=34.0
Pod undocumented
67  
68 0 my $widths = $self->data->{'wx'};
69 0 ▶ if (ref($widths) eq 'ARRAY') {
Branch: 2 branches
BranchTrueFalseTotal
if (ref $widths eq 'ARRAY') { } 0 0 0
elsif (ref $widths eq 'HASH') { } 0 0 0
70 0 ▶ return int($widths->[$g]) if defined $widths->[$g];
Branch: 1 branch
BranchTrueFalseTotal
if defined $widths->[$g] 0 0 0
71 }
72 elsif (ref($widths) eq 'HASH') {
73 0 ▶ return int($widths->{$g}) if defined $widths->{$g};
Branch: 1 branch
BranchTrueFalseTotal
if defined $widths->{$g} 0 0 0
74 }
75 0 return $self->missingwidth();
76 }
77  
78 0 ▶sub wxByUni { return $_[0]->wxByCId($_[0]->data->{'u2g'}->{$_[1]}) }
Subroutine wxByUni: not called CC=1 SCAR=6.9
Pod documented
79 0 ▶sub wxByEnc { return $_[0]->wxByCId($_[0]->data->{'e2g'}->[$_[1]]) }
Subroutine wxByEnc: not called CC=1 SCAR=6.9
Pod documented
80  
81 sub width {
82 0 ▶ my ($self, $text) = @_;
Subroutine width: not called CC=1 SCAR=6.9
Pod documented
83 0 return $self->width_cid($self->cidsByStr($text));
84 }
85  
86 sub width_cid {
87 0 ▶ my ($self, $text) = @_;
Subroutine width_cid: not called CC=5 SCAR=34.0
Pod undocumented
88 0 my $width = 0;
89 0 my $lastglyph = 0;
90 0 foreach my $n (unpack('n*', $text)) {
91 0 $width += $self->wxByCId($n);
92 0 ▶ if ($self->{'-dokern'} and $self->haveKernPairs()) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"-dokern"} and $self->haveKernPairs) 0 0 0
Condition0%0/3
$self->{"-dokern"} and $self->haveKernPairs
!ll&&!rl&&r
000
MC/DC0%0/2
$self->{"-dokern"} and $self->haveKernPairs
$self->{"-dokern"} $self->haveKernPairs
Truth table0%0/3
A and B
A= $self->{"-dokern"}B= $self->haveKernPairs
ABresult
0X0
100
111
93 0 ▶ if ($self->kernPairCid($lastglyph, $n)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->kernPairCid($lastglyph, $n)) 0 0 0
94 0 $width -= $self->kernPairCid($lastglyph, $n);
95 }
96 }
97 0 $lastglyph = $n;
98 }
99 0 $width /= 1000;
100 0 return $width;
101 }
102  
103 =item $cidstring = $font->cidsByStr $string
104  
105 Returns the cid-string from string based on the fonts encoding map.
106  
107 =cut
108  
109 sub _cidsByStr {
110 0 ▶ my ($self, $s) = @_;
Subroutine _cidsByStr: not called CC=1 SCAR=6.9
111 0 $s = pack('n*', map { $self->cidByEnc($_) } unpack('C*', $s));
112 0 return $s;
113 }
114  
115 sub cidsByStr {
116 0 ▶ my ($self, $text) = @_;
Subroutine cidsByStr: not called CC=16 SCAR=56.1
Pod documented
117 0 ▶ if (utf8::is_utf8($text)
Branch: 4 branches
BranchTrueFalseTotal
if (utf8::is_utf8($text) and defined $self->data->{'decode'} and $self->data->{'decode'} ne 'ident') { } 0 0 0
elsif (utf8::is_utf8($text) and defined $self->data->{'decode'} and $self->data->{'decode'} eq 'ident') { } 0 0 0
elsif (not utf8::is_utf8($text) and defined $self->data->{'encode'} and defined $self->data->{'decode'} and $self->data->{'decode'} eq 'ident') { } 0 0 0
elsif (not utf8::is_utf8($text) and $self->can('issymbol') and $self->issymbol and defined $self->data->{'decode'} and $self->data->{'decode'} eq 'ident') { } 0 0 0
Condition0%0/6
utf8::is_utf8($text) and defined $self->data->{"decode"} and $self->data->{"decode"} ne "ident"
!ll&&!rl&&r
000
utf8::is_utf8($text) and defined $self->data->{"decode"}
!ll&&!rl&&r
000
MC/DC0%0/3
utf8::is_utf8($text) and defined $self->data->{"decode"} and $self->data->{"decode"} ne "ident"
utf8::is_utf8($text) defined $self->data->{"decode"} $self->data->{"decode"} ne "ident"
Truth table0%0/4
A and B and C
A= utf8::is_utf8($text)B= defined $self->data->{"decode"}C= $self->data->{"decode"} ne "ident"
ABCresult
0XX0
10X0
1100
1111
118 and defined $self->data->{'decode'}
119 and $self->data->{'decode'} ne 'ident')
120 {
121 0 $text = encode($self->data->{'decode'}, $text);
122 }
123 ▶ elsif (utf8::is_utf8($text)
Condition0%0/6
utf8::is_utf8($text) and defined $self->data->{"decode"} and $self->data->{"decode"} eq "ident"
!ll&&!rl&&r
000
utf8::is_utf8($text) and defined $self->data->{"decode"}
!ll&&!rl&&r
000
MC/DC0%0/3
utf8::is_utf8($text) and defined $self->data->{"decode"} and $self->data->{"decode"} eq "ident"
utf8::is_utf8($text) defined $self->data->{"decode"} $self->data->{"decode"} eq "ident"
Truth table0%0/4
A and B and C
A= utf8::is_utf8($text)B= defined $self->data->{"decode"}C= $self->data->{"decode"} eq "ident"
ABCresult
0XX0
10X0
1100
1111
124 and defined $self->data->{'decode'}
125 and $self->data->{'decode'} eq 'ident')
126 {
127 0 $text = $self->cidsByUtf($text);
128 }
129 ▶ elsif (not utf8::is_utf8($text)
Condition0%0/9
not utf8::is_utf8($text) and defined $self->data->{"encode"} and defined $self->data->{"decode"} and $self->data->{"decode"} eq "ident"
!ll&&!rl&&r
000
not utf8::is_utf8($text) and defined $self->data->{"encode"} and defined $self->data->{"decode"}
!ll&&!rl&&r
000
not utf8::is_utf8($text) and defined $self->data->{"encode"}
!ll&&!rl&&r
000
MC/DC0%0/4
not utf8::is_utf8($text) and defined $self->data->{"encode"} and defined $self->data->{"decode"} and $self->data->{"decode"} eq "ident"
not utf8::is_utf8($text) defined $self->data->{"encode"} defined $self->data->{"decode"} $self->data->{"decode"} eq "ident"
Truth table0%0/5
not(A) and B and C and D
A= not utf8::is_utf8($text)B= defined $self->data->{"encode"}C= defined $self->data->{"decode"}D= $self->data->{"decode"} eq "ident"
ABCDresult
0XXX0
10XX0
110X0
11100
11111
130 and defined $self->data->{'encode'}
131 and defined $self->data->{'decode'}
132 and $self->data->{'decode'} eq 'ident')
133 {
134 0 $text = $self->cidsByUtf(decode($self->data->{'encode'}, $text));
135 }
136 ▶ elsif (not utf8::is_utf8($text)
Condition0%0/12
not utf8::is_utf8($text) and $self->can("issymbol") and $self->issymbol and defined $self->data->{"decode"} and $self->data->{"decode"} eq "ident"
!ll&&!rl&&r
000
not utf8::is_utf8($text) and $self->can("issymbol") and $self->issymbol and defined $self->data->{"decode"}
!ll&&!rl&&r
000
not utf8::is_utf8($text) and $self->can("issymbol") and $self->issymbol
!ll&&!rl&&r
000
not utf8::is_utf8($text) and $self->can("issymbol")
!ll&&!rl&&r
000
MC/DC0%0/5
not utf8::is_utf8($text) and $self->can("issymbol") and $self->issymbol and defined $self->data->{"decode"} and $self->data->{"decode"} eq "ident"
not utf8::is_utf8($text) $self->can("issymbol") $self->issymbol defined $self->data->{"decode"} $self->data->{"decode"} eq "ident"
Truth table0%0/6
not(A) and B and C and D and E
A= not utf8::is_utf8($text)B= $self->can("issymbol")C= $self->issymbolD= defined $self->data->{"decode"}E= $self->data->{"decode"} eq "ident"
ABCDEresult
0XXXX0
10XXX0
110XX0
1110X0
111100
111111
137 and $self->can('issymbol')
138 and $self->issymbol()
139 and defined $self->data->{'decode'}
140 and $self->data->{'decode'} eq 'ident')
141 {
142 0 $text = pack('U*', map { $_ + 0xf000 } unpack('C*', $text));
143 0 $text = $self->cidsByUtf($text);
144 }
145 else {
146 0 $text = $self->_cidsByStr($text);
147 }
148 0 return $text;
149 }
150  
151 =item $cidstring = $font->cidsByUtf $utf8string
152  
153 Returns the cid-encoded string from utf8-string.
154  
155 =cut
156  
157 sub cidsByUtf {
158 0 ▶ my ($self, $s) = @_;
Subroutine cidsByUtf: not called CC=5 SCAR=34.0
Pod documented
159 $s = pack('n*',
160 0 ▶ map { $self->cidByUni($_) // 0 }
Condition0%0/2
$self->cidByUni($_) // 0
l!l
00
MC/DC0%0/1
$self->cidByUni($_) // 0
$self->cidByUni($_)
Truth table0%0/2
A
A= $self->cidByUni($_)
Aresult
11
00
161 map {
162 0 ▶ ($_ and $_ > 0x7f and $_ < 0xa0) ? uniByName(nameByUni($_)) : $_
Branch: 1 branch
BranchTrueFalseTotal
$_ && $_ > 127 && $_ < 160 ? : 0 0 0
Condition0%0/6
$_ and $_ > 127 and $_ < 160
!ll&&!rl&&r
000
$_ and $_ > 127
!ll&&!rl&&r
000
MC/DC0%0/3
$_ and $_ > 127 and $_ < 160
$_ $_ > 127 $_ < 160
Truth table0%0/4
A and B and C
A= $_B= $_ > 127C= $_ < 160
ABCresult
0XX0
10X0
1100
1111
163 }
164 unpack('U*', $s));
165 0 utf8::downgrade($s);
166 0 return $s;
167 }
168  
169 sub textByStr {
170 0 ▶ my ($self, $text) = @_;
Subroutine textByStr: not called CC=1 SCAR=6.9
Pod documented
171 0 return $self->text_cid($self->cidsByStr($text));
172 }
173  
174 sub textByStrKern {
175 0 ▶ my ($self, $text, $size, $indent) = @_;
Subroutine textByStrKern: not called CC=1 SCAR=6.9
Pod undocumented
176 0 return $self->text_cid_kern($self->cidsByStr($text), $size, $indent);
177 }
178  
179 sub text {
180 0 ▶ my ($self, $text, $size, $indent) = @_;
Subroutine text: not called CC=6 SCAR=37.4
Pod undocumented
181 0 my $newtext = $self->textByStr($text);
182 0 ▶ if (defined $size and $self->{'-dokern'}) {
Branch: 2 branches
BranchTrueFalseTotal
if (defined $size and $self->{'-dokern'}) { } 0 0 0
elsif (defined $size) { } 0 0 0
Condition0%0/3
defined $size and $self->{"-dokern"}
!ll&&!rl&&r
000
MC/DC0%0/2
defined $size and $self->{"-dokern"}
defined $size $self->{"-dokern"}
Truth table0%0/3
A and B
A= defined $sizeB= $self->{"-dokern"}
ABresult
0X0
100
111
183 0 $newtext = $self->textByStrKern($text, $size, $indent);
184 0 return $newtext;
185 }
186 elsif (defined $size) {
187 0 ▶ if (defined($indent) and $indent != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $indent and $indent != 0) { } 0 0 0
Condition0%0/3
defined $indent and $indent != 0
!ll&&!rl&&r
000
MC/DC0%0/2
defined $indent and $indent != 0
defined $indent $indent != 0
Truth table0%0/3
A and B
A= defined $indentB= $indent != 0
ABresult
0X0
100
111
188 0 return "[ $indent $newtext ] TJ";
189 }
190 else {
191 0 return "$newtext Tj";
192 }
193 }
194 else {
195 0 return $newtext;
196 }
197 }
198  
199 sub text_cid {
200 0 ▶ my ($self, $text, $size) = @_;
Subroutine text_cid: not called CC=4 SCAR=30.0
Pod undocumented
201 0 ▶ if ($self->can('fontfile')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->can("fontfile")) 0 0 0
202 0 foreach my $g (unpack('n*', $text)) {
203 0 $self->fontfile->subsetByCId($g);
204 }
205 }
206 0 my $newtext = unpack('H*', $text);
207 0 ▶ if (defined $size) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $size) { } 0 0 0
208 0 return "<$newtext> Tj";
209 }
210 else {
211 0 return "<$newtext>";
212 }
213 }
214  
215 sub text_cid_kern {
216 0 ▶ my ($self, $text, $size, $indent) = @_;
Subroutine text_cid_kern: not called CC=16 SCAR=56.1
Pod undocumented
217 0 ▶ if ($self->can('fontfile')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->can("fontfile")) 0 0 0
218 0 foreach my $g (unpack('n*', $text)) {
219 0 $self->fontfile->subsetByCId($g);
220 }
221 }
222 0 ▶ if (defined $size and $self->{'-dokern'} and $self->haveKernPairs()) {
Branch: 2 branches
BranchTrueFalseTotal
if (defined $size and $self->{'-dokern'} and $self->haveKernPairs) { } 0 0 0
elsif (defined $size) { } 0 0 0
Condition0%0/6
defined $size and $self->{"-dokern"} and $self->haveKernPairs
!ll&&!rl&&r
000
defined $size and $self->{"-dokern"}
!ll&&!rl&&r
000
MC/DC0%0/3
defined $size and $self->{"-dokern"} and $self->haveKernPairs
defined $size $self->{"-dokern"} $self->haveKernPairs
Truth table0%0/4
A and B and C
A= defined $sizeB= $self->{"-dokern"}C= $self->haveKernPairs
ABCresult
0XX0
10X0
1100
1111
223 0 my $newtext = ' ';
224 0 my $lastglyph = 0;
225 0 my $tBefore = 0;
226 0 foreach my $n (unpack('n*', $text)) {
227 0 ▶ if ($self->kernPairCid($lastglyph, $n)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->kernPairCid($lastglyph, $n)) 0 0 0
228 0 ▶ $newtext .= '> ' if $tBefore;
Branch: 1 branch
BranchTrueFalseTotal
if $tBefore 0 0 0
229 0 $newtext .= sprintf('%i ', $self->kernPairCid($lastglyph, $n));
230 0 $tBefore = 0;
231 }
232 0 $lastglyph = $n;
233 0 my $t = sprintf('%04X', $n);
234 0 ▶ $newtext .= '<' unless $tBefore;
Branch: 1 branch
BranchTrueFalseTotal
unless $tBefore 0 0 0
235 0 $newtext .= $t;
236 0 $tBefore = 1;
237 }
238 0 ▶ $newtext .= '> ' if $tBefore;
Branch: 1 branch
BranchTrueFalseTotal
if $tBefore 0 0 0
239 0 ▶ if (defined $indent and $indent != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $indent and $indent != 0) { } 0 0 0
Condition0%0/3
defined $indent and $indent != 0
!ll&&!rl&&r
000
MC/DC0%0/2
defined $indent and $indent != 0
defined $indent $indent != 0
Truth table0%0/3
A and B
A= defined $indentB= $indent != 0
ABresult
0X0
100
111
240 0 return "[ $indent $newtext ] TJ";
241 }
242 else {
243 0 return "[ $newtext ] TJ";
244 }
245 }
246 elsif (defined $size) {
247 0 my $newtext = unpack('H*', $text);
248 0 ▶ if (defined($indent) and $indent != 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $indent and $indent != 0) { } 0 0 0
Condition0%0/3
defined $indent and $indent != 0
!ll&&!rl&&r
000
MC/DC0%0/2
defined $indent and $indent != 0
defined $indent $indent != 0
Truth table0%0/3
A and B
A= defined $indentB= $indent != 0
ABresult
0X0
100
111
249 0 return "[ $indent <$newtext> ] TJ";
250 }
251 else {
252 0 return "<$newtext> Tj";
253 }
254 }
255 else {
256 0 my $newtext = unpack('H*', $text);
257 0 return "<$newtext>";
258 }
259 }
260  
261 sub kernPairCid {
262 0 ▶ return 0;
Subroutine kernPairCid: not called CC=1 SCAR=6.9
Pod undocumented
263 }
264  
265 sub haveKernPairs {
266 0 ▶ return;
Subroutine haveKernPairs: not called CC=1 SCAR=6.9
Pod undocumented
267 }
268  
269 sub encodeByName {
270 0 ▶ my ($self, $enc) = @_;
Subroutine encodeByName: not called CC=10 SCAR=47.0
Pod undocumented
271 0 ▶ return if $self->issymbol();
Branch: 1 branch
BranchTrueFalseTotal
if $self->issymbol 0 0 0
272  
273 0 ▶ if (defined $enc) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $enc) 0 0 0
274 $self->data->{'e2u'} = [
275 0 ▶ map { ($_ > 0x7f and $_ < 0xA0) ? uniByName(nameByUni($_)) : $_ }
Branch: 1 branch
BranchTrueFalseTotal
$_ > 127 && $_ < 160 ? : 0 0 0
Condition0%0/3
$_ > 127 and $_ < 160
!ll&&!rl&&r
000
MC/DC0%0/2
$_ > 127 and $_ < 160
$_ > 127 $_ < 160
Truth table0%0/3
A and B
A= $_ > 127B= $_ < 160
ABresult
0X0
100
111
276 unpack('U*', decode($enc, pack('C*', 0 .. 255)))
277 ];
278 }
279 $self->data->{'e2n'} = [
280 0 ▶ map { $self->data->{'g2n'}->[$self->data->{'u2g'}->{$_} || 0] || '.notdef' }
Branch: 1 branch
BranchTrueFalseTotal
$self->data->{"g2n"}[$self->data->{"u2g"}{$_} or 0] or ".notdef" 0 0 0
Condition0%0/2
$self->data->{'u2g'}{$_} || 0
l!l
00
MC/DC0%0/1
$self->data->{'u2g'}{$_} || 0
$self->data->{'u2g'}{$_}
Truth table0%0/2
A
A= $self->data->{'u2g'}{$_}
Aresult
11
00
281 0 @{$self->data->{'e2u'}}
282 ];
283 $self->data->{'e2g'} = [
284 0 ▶ map { $self->data->{'u2g'}->{$_} || 0 }
Branch: 1 branch
BranchTrueFalseTotal
$self->data->{"u2g"}{$_} or 0 0 0 0
285 0 @{$self->data->{'e2u'}}
286 ];
287  
288 0 $self->data->{'u2e'} = {};
289 0 foreach my $n (reverse 0 .. 255) {
290 0 ▶ $self->data->{'u2e'}->{$self->data->{'e2u'}->[$n]} //= $n;
Condition0%0/3
$self->data->{"u2e"}{$self->data->{"e2u"}[$n]} //= $n
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->data->{"u2e"}{$self->data->{"e2u"}[$n]} //= $n
$self->data->{"u2e"}{$self->data->{"e2u"}[$n]} $n
Truth table0%0/3
A //= B
A= $self->data->{"u2e"}{$self->data->{"e2u"}[$n]}B= $n
ABresult
1X1
011
000
291 }
292  
293 0 return $self;
294 }
295  
296 sub subsetByCId {
297 0 ▶ return 1;
Subroutine subsetByCId: not called CC=1 SCAR=6.9
Pod undocumented
298 }
299  
300 sub subvec {
301 0 ▶ return 1;
Subroutine subvec: not called CC=1 SCAR=6.9
Pod undocumented
302 }
303  
304 sub glyphNum {
305 0 ▶ my $self = shift();
Subroutine glyphNum: not called CC=2 SCAR=17.9
Pod documented
306 0 ▶ if (defined $self->data->{'glyphs'}) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $self->data->{"glyphs"}) 0 0 0
307 0 return $self->data->{'glyphs'};
308 }
309 0 return scalar @{$self->data->{'wx'}};
310 }
311  
312 =back
313  
314 =cut
315  
316 2 1;
« API2/Content.pm ↑ Summary API2/UniWrap.pm »