File Coverage

blib/lib/HiPi/Graphics/Font5x7.pm
Criterion Covered Total %
statement 9 10 90.0
branch n/a
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 12 15 80.0


line stmt bran cond sub pod time code
1             #########################################################################################
2             # Package HiPi::Graphics::Font5x7
3             # Copyright : Perl Port Copyright (c) 2018 Mark Dootson
4             # License : This is free software; you can redistribute it and/or modify it under
5             # the same terms as the Perl 5 programming language system itself.
6             #
7             #########################################################################################
8              
9             package HiPi::Graphics::Font5x7;
10              
11             #########################################################################################
12 1     1   7 use strict;
  1         4  
  1         31  
13 1     1   5 use warnings;
  1         1  
  1         28  
14 1     1   4 use parent qw( Exporter );
  1         2  
  1         5  
15              
16             our $VERSION ='0.81';
17              
18             our @EXPORT_OK = qw( font_5_x_7 );
19              
20             our %EXPORT_TAGS = ( font => \@EXPORT_OK );
21              
22             # 5x7 Font
23             my $font5x7 = {
24             '32' => [0x00, 0x00, 0x00, 0x00, 0x00], # (space)
25             '33' => [0x00, 0x00, 0x5f, 0x00, 0x00], # !
26             '34' => [0x00, 0x07, 0x00, 0x07, 0x00], # "
27             '35' => [0x14, 0x7f, 0x14, 0x7f, 0x14], # #
28             '36' => [0x24, 0x2a, 0x7f, 0x2a, 0x12], # $
29             '37' => [0x23, 0x13, 0x08, 0x64, 0x62], # %
30             '38' => [0x36, 0x49, 0x55, 0x22, 0x50], # &
31             '39' => [0x00, 0x05, 0x03, 0x00, 0x00], # '
32             '40' => [0x00, 0x1c, 0x22, 0x41, 0x00], # (
33             '41' => [0x00, 0x41, 0x22, 0x1c, 0x00], # )
34             '42' => [0x08, 0x2a, 0x1c, 0x2a, 0x08], # *
35             '43' => [0x08, 0x08, 0x3e, 0x08, 0x08], # +
36             '44' => [0x00, 0x50, 0x30, 0x00, 0x00], # ,
37             '45' => [0x08, 0x08, 0x08, 0x08, 0x08], # -
38             '46' => [0x00, 0x60, 0x60, 0x00, 0x00], # .
39             '47' => [0x20, 0x10, 0x08, 0x04, 0x02], # /
40             '48' => [0x3e, 0x51, 0x49, 0x45, 0x3e], # 0
41             '49' => [0x00, 0x42, 0x7f, 0x40, 0x00], # 1
42             '50' => [0x42, 0x61, 0x51, 0x49, 0x46], # 2
43             '51' => [0x21, 0x41, 0x45, 0x4b, 0x31], # 3
44             '52' => [0x18, 0x14, 0x12, 0x7f, 0x10], # 4
45             '53' => [0x27, 0x45, 0x45, 0x45, 0x39], # 5
46             '54' => [0x3c, 0x4a, 0x49, 0x49, 0x30], # 6
47             '55' => [0x01, 0x71, 0x09, 0x05, 0x03], # 7
48             '56' => [0x36, 0x49, 0x49, 0x49, 0x36], # 8
49             '57' => [0x06, 0x49, 0x49, 0x29, 0x1e], # 9
50             '58' => [0x00, 0x36, 0x36, 0x00, 0x00], # :
51             '59' => [0x00, 0x56, 0x36, 0x00, 0x00], # ;
52             '60' => [0x00, 0x08, 0x14, 0x22, 0x41], # <
53             '61' => [0x14, 0x14, 0x14, 0x14, 0x14], # =
54             '62' => [0x41, 0x22, 0x14, 0x08, 0x00], # >
55             '63' => [0x02, 0x01, 0x51, 0x09, 0x06], # ?
56             '64' => [0x32, 0x49, 0x79, 0x41, 0x3e], # @
57             '65' => [0x7e, 0x11, 0x11, 0x11, 0x7e], # A
58             '66' => [0x7f, 0x49, 0x49, 0x49, 0x36], # B
59             '67' => [0x3e, 0x41, 0x41, 0x41, 0x22], # C
60             '68' => [0x7f, 0x41, 0x41, 0x22, 0x1c], # D
61             '69' => [0x7f, 0x49, 0x49, 0x49, 0x41], # E
62             '70' => [0x7f, 0x09, 0x09, 0x01, 0x01], # F
63             '71' => [0x3e, 0x41, 0x41, 0x51, 0x32], # G
64             '72' => [0x7f, 0x08, 0x08, 0x08, 0x7f], # H
65             '73' => [0x00, 0x41, 0x7f, 0x41, 0x00], # I
66             '74' => [0x20, 0x40, 0x41, 0x3f, 0x01], # J
67             '75' => [0x7f, 0x08, 0x14, 0x22, 0x41], # K
68             '76' => [0x7f, 0x40, 0x40, 0x40, 0x40], # L
69             '77' => [0x7f, 0x02, 0x04, 0x02, 0x7f], # M
70             '78' => [0x7f, 0x04, 0x08, 0x10, 0x7f], # N
71             '79' => [0x3e, 0x41, 0x41, 0x41, 0x3e], # O
72             '80' => [0x7f, 0x09, 0x09, 0x09, 0x06], # P
73             '81' => [0x3e, 0x41, 0x51, 0x21, 0x5e], # Q
74             '82' => [0x7f, 0x09, 0x19, 0x29, 0x46], # R
75             '83' => [0x46, 0x49, 0x49, 0x49, 0x31], # S
76             '84' => [0x01, 0x01, 0x7f, 0x01, 0x01], # T
77             '85' => [0x3f, 0x40, 0x40, 0x40, 0x3f], # U
78             '86' => [0x1f, 0x20, 0x40, 0x20, 0x1f], # V
79             '87' => [0x7f, 0x20, 0x18, 0x20, 0x7f], # W
80             '88' => [0x63, 0x14, 0x08, 0x14, 0x63], # X
81             '89' => [0x03, 0x04, 0x78, 0x04, 0x03], # Y
82             '90' => [0x61, 0x51, 0x49, 0x45, 0x43], # Z
83             '91' => [0x00, 0x00, 0x7f, 0x41, 0x41], # [
84             '92' => [0x02, 0x04, 0x08, 0x10, 0x20], # \
85             '93' => [0x41, 0x41, 0x7f, 0x00, 0x00], # ]
86             '94' => [0x04, 0x02, 0x01, 0x02, 0x04], # ^
87             '95' => [0x40, 0x40, 0x40, 0x40, 0x40], # _
88             '96' => [0x00, 0x01, 0x02, 0x04, 0x00], # `
89             '97' => [0x20, 0x54, 0x54, 0x54, 0x78], # a
90             '98' => [0x7f, 0x48, 0x44, 0x44, 0x38], # b
91             '99' => [0x38, 0x44, 0x44, 0x44, 0x20], # c
92             '100' => [0x38, 0x44, 0x44, 0x48, 0x7f], # d
93             '101' => [0x38, 0x54, 0x54, 0x54, 0x18], # e
94             '102' => [0x08, 0x7e, 0x09, 0x01, 0x02], # f
95             '103' => [0x08, 0x14, 0x54, 0x54, 0x3c], # g
96             '104' => [0x7f, 0x08, 0x04, 0x04, 0x78], # h
97             '105' => [0x00, 0x44, 0x7d, 0x40, 0x00], # i
98             '106' => [0x20, 0x40, 0x44, 0x3d, 0x00], # j
99             '107' => [0x00, 0x7f, 0x10, 0x28, 0x44], # k
100             '108' => [0x00, 0x41, 0x7f, 0x40, 0x00], # l
101             '109' => [0x7c, 0x04, 0x18, 0x04, 0x78], # m
102             '110' => [0x7c, 0x08, 0x04, 0x04, 0x78], # n
103             '111' => [0x38, 0x44, 0x44, 0x44, 0x38], # o
104             '112' => [0x7c, 0x14, 0x14, 0x14, 0x08], # p
105             '113' => [0x08, 0x14, 0x14, 0x18, 0x7c], # q
106             '114' => [0x7c, 0x08, 0x04, 0x04, 0x08], # r
107             '115' => [0x48, 0x54, 0x54, 0x54, 0x20], # s
108             '116' => [0x04, 0x3f, 0x44, 0x40, 0x20], # t
109             '117' => [0x3c, 0x40, 0x40, 0x20, 0x7c], # u
110             '118' => [0x1c, 0x20, 0x40, 0x20, 0x1c], # v
111             '119' => [0x3c, 0x40, 0x30, 0x40, 0x3c], # w
112             '120' => [0x44, 0x28, 0x10, 0x28, 0x44], # x
113             '121' => [0x0c, 0x50, 0x50, 0x50, 0x3c], # y
114             '122' => [0x44, 0x64, 0x54, 0x4c, 0x44], # z
115             '123' => [0x00, 0x08, 0x36, 0x41, 0x00], # {
116             '124' => [0x00, 0x00, 0x7f, 0x00, 0x00], # |
117             '125' => [0x00, 0x41, 0x36, 0x08, 0x00], # }
118             '126' => [0x08, 0x08, 0x2a, 0x1c, 0x08], # ~
119             };
120              
121 0     0 0   sub font_5_x_7 { return $font5x7; }
122              
123              
124             1;
125              
126             __END__