Output the current time in ascii art Challenge

Your task is to output the time (in 12 hour time) in ascii art.

All characters that will be used are as follows:

  ___    __   ___    ____    _  _     _____     __    ______ 
 / _ \  /_ | |__ \  |___ \  | || |   | ____|   / /   |____  |
| | | |  | |    ) |   __) | | || |_  | |__    / /_       / / 
| | | |  | |   / /   |__ &lt;  |__   _| |___ \  | '_ \     / /  
| |_| |  | |  / /_   ___) |    | |    ___) | | (_) |   / /   
 \___/   |_| |____| |____/     |_|   |____/   \___/   /_/    

   ___     ___  
  / _ \   / _ \                                _
 | (_) | | (_) |   __ _ _ __    _ __ _ __     (_)
  &gt; _ &lt;   \__, |  / _` | '  \  | '_ \ '  \     _ 
 | (_) |    / /   \__,_|_|_|_| | .__/_|_|_|   (_)
  \___/    /_/                 |_|          


(For each number/symbol individually, consult this gist).

You will receive input in an array of the form: 


[hours, minutes, 'am/pm']. For example, [4, 57, 'am'], with single quotes only used for am/pm
or "hours-minutes-am/pm". For example, "4-56-am"
or [hours, 'minutes', 'am/pm'] for languages that cannot handle leading zeroes on numbers. For example, [4, '07', 'am']


You may use either input method.

Output will be in the form 1  2 : 5  9 am, where there is one initial space, two spaces between each number (in the gist, each number already has one space on each side), one space between : (colon) and the neighbouring numbers, and one space between the last number and am/pm, with an optional leading and/or trailing newline. All spaces are between the right-most point of the symbol on the left and the left-most point of the symbol on the right.

Implicit output is allowed.

Lowest byte size wins.

The am/pm are to be aligned such that the bottom of the p in pm is aligned with the bottom of the rest of the output, that is, the undercore denoting the top of am/pm starts on the third line down (not counting a leading newline).

The colon is to be aligned such that it's first character (an underscore) starts on the second line down (not counting a leading newline).

For minutes &lt; 10, output the minutes with a leading 0 (you should receive this in the input). For example, [8, 04, 'pm'] -> 8 : 0  4 pm.

You must not fetch the data for the numbers from a library or external resource. All data must be contained within the program.

For example, for the input [12, 47, 'am'], the output would be as follows:

  __    ___          _  _      ______  
 /_ |  |__ \    _   | || |    |____  | 
  | |     ) |  (_)  | || |_       / /   __ _ _ __ 
  | |    / /    _   |__   _|     / /   / _` | '  \
  | |   / /_   (_)     | |      / /    \__,_|_|_|_|
  |_|  |____|          |_|     /_/     


(If you see any edge cases that you can't decide what to do with, please post in comments and I will add them to examples).
Perl, 592 579 540 522 510 bytes

Under a sector!

($L,$C,$b)=unpack"W/aW/aB*",q!12346677889999 _|/\)(
'&lt;,&gt;.` PP¨ 
¨@T @ôäð˜SÀ§€fÌU`à¨Àäð'€GÖf`3 X½`fÍ5 s Î|½`gËÖ— $¡))õ™˜À8Sô BÁªx~O àÔýåËþÏÃÆ~O‡ŸY¬Àf s 
½`À*õŸ/X8|½`p&gt;^€&lt;¯å­kgúºÖ·ÓÊ¸°ªÀj® kª¸•p¸å\×   ­ô!;@c=map{$i&lt;&lt;=$_-$P if$_&gt;$P;$P=$_;sprintf"%${l}b",$i++}$L=~/./g;while($b){$b=~s/^$c[$_]// and$g.=($C=~/./sg)[$_]for 0..$#c}$_=pop;s/-/:/;y/apm-/;&lt;/d;for$a(0..5){map{$o.=substr((split$/,$g)[$a],($x=-48+ord)*12,('6356766766099'=~/./g)[$x]+3)}/./g;$o.=$/}print$o


This program expects the time in the 2nd format ("12-34-am") as a commandline argument.

Commented:

($L,$C,$b) = unpack "W/aW/aB*",             # extract code lengths, chars, and bitstream
    q!12346677889999 _|/\)(
'&lt;,&gt;.` PP¨ 
¨@T @ôäð˜SÀ§€fÌU`à¨Àäð'€GÖf`3 X½`fÍ5 s Î|½`gËÖ— $¡))õ™˜À8Sô BÁªx~O àÔýåËþÏÃÆ~O‡ŸY¬Àf s 
½`À*õŸ/X8|½`p&gt;^€&lt;¯å­kgúºÖ·ÓÊ¸°ªÀj® kª¸•p¸å\×   ­ô!;
@c = map {                                  # reconstruct huffman prefix codes
    $i &lt;&lt;= $_-$P if $_ &gt; $P;                # increase code size
    $P = $_;                                # keep track of previous code
    sprintf "%${l}b", $i++                  # append code as bitstring
}
$L=~/./g;                                   # canonical huffman prefix lengths
while ( $b ) {                              # decompress font
        $b =~ s/^$c[$_]//                   # match and strip prefix code
        and $g .= ($C=~/./sg)[$_]           # append char for prefix code
    for 0..$#c                              # iterate prefix codes in order
}                                           # luckily we can omit checking trailing bytes    

$_ = pop;                                   # get cmdline arg "12-34-am"    
s/-/:/;                                     # ord(':')-ord('0')=10
y/apm-/;&lt;/d;                                # 'a'-&gt; chr(11), 'p' -&gt; chr(12), strip -,m
for $a (0..5) {                             # iterate 6 output lines
    map {                                   # iterate each char in input
        $o .= substr(
            ( split $/, $g )[$a],           # grab line $a
            ( $x=-48+ord ) * 12,            # $x=glyph index, 12=glyph width
            ('6356766766099'=~/./g)[$x]+3   # glyph display width
        )
    } /./g;
    $o .= $/                                # append newline
}
print $o                                    # output


Note that due to character encoding issues, when you paste the above code in a file, the output may be somewhat malformed. So here's the golfed version, base-64 encoded. Copy it, and paste it into base64 -d &gt; 510.pl:

KCRMLCRDLCRiKT11bnBhY2siVy9hVy9hQioiLHEhDjEyMzQ2Njc3ODg5OTk5DiBffC9cKSgKJzws
Pi5gFQBQAVACqAIgCqgBQBVUAqAFQAH05PAOmANTwBqngGbMBlVgHOAaqMDk8AcngEfWZmAzAA9Y
Ar1gZs0DNQBzoAHOBny9YGfL1g+XoAUkoSkp9ZmYDMAHOANT9A1Cwap4Bn5PABzgH9T9AeV/GBAB
y/7Pw8Z+Tx+Hn1mswGYAc6AKvWAMwCr1gZ8vWAc4Bny9YA5wPl6APK/lrWtn+rrWt9PKuAawBqrA
aq4AawGquAeVcA64AeVcAdcAAAABrfQhO0BjPW1hcHskaTw8PSRfLSRQIGlmJF8+JFA7JFA9JF87
c3ByaW50ZiIlJHtsfWIiLCRpKyt9JEw9fi8uL2c7d2hpbGUoJGIpeyRiPX5zL14kY1skX10vLyBh
bmQkZy49KCRDPX4vLi9zZylbJF9dZm9yIDAuLiQjY30kXz1wb3A7cy8tLzovO3kvYXBtLS87PC9k
O2ZvciRhKDAuLjUpe21hcHskby49c3Vic3RyKChzcGxpdCQvLCRnKVskYV0sKCR4PS00OCtvcmQp
KjEyLCgnNjM1Njc2Njc2NjA5OSc9fi8uL2cpWyR4XSszKX0vLi9nOyRvLj0kL31wcmludCRv


Here's the font I'm using. I've spaced the glyphs 12 characters apart
(the size of the am/pm) for easy indexing.

   ___        __          ___         ____        _  _        _____         __        ______       ___         ___            
  / _ \      /_ |        |__ \       |___ \      | || |      | ____|       / /       |____  |     / _ \       / _ \      _  
 | | | |      | |           ) |        __) |     | || |_     | |__        / /_           / /     | (_) |     | (_) |    (_)          __ _ _ __   _ __ _ __ 
 | | | |      | |          / /        |__ &lt;      |__   _|    |___ \      | '_ \         / /       &gt; _ &lt;       \__, |     _          / _` | '  \ | '_ \ '  \
 | |_| |      | |         / /_        ___) |        | |       ___) |     | (_) |       / /       | (_) |        / /     (_)         \__,_|_|_|_|| .__/_|_|_|
  \___/       |_|        |____|      |____/         |_|      |____/       \___/       /_/         \___/        /_/                              |_|


This font is 592 bytes.
The previous approach used a few variations on RLE compression to reduce this to 353 bytes, at the cost of 78 bytes decompression code.
The Huffman coding compresses the font to 221 bytes at the cost of 154 bytes for the decompression algorithm.