From: Mischa POSLAWSKY Date: Sat, 22 Aug 2015 04:20:17 +0000 (+0200) Subject: aztec scan code in block drawing characters X-Git-Tag: v2.0~35 X-Git-Url: http://git.shiar.net/unicode-sampler.git/commitdiff_plain/378bf4526ac991fbbcc8b84f97677aa0ed614da4?hp=711b90decabd2f9f61e1532e006d1a83cb0d5b8d aztec scan code in block drawing characters Test proper rendering and alignment (which can be verified by external scanner) of an original 2D code creatable using Barcode Writer in Pure PostScript: cat <<-. | 0 0 moveto (Unicode code) (ecaddchars=2) /azteccode /uk.co.terryburton.bwipp findresource exec . cat /usr/share/libpostscriptbarcode/barcode.ps - Older 2014 version in Debian needs pre-encoded input to create 15x15 code: (10110111000111101010001001000000101001100000100100100000010100110)(raw) Then converted via PBM to 2x2 box characters: pstopnm -pbm -forceplain -stdout -portrait -xsize 15 \ -llx 0 -lly 0 -urx .42 -ury .42 -xborder 0 -yborder 0 | perl -CO -ln -e' use utf8; /^[01]+$/ or next; sub halfbits ($;$) { pack "C*", map { $_ << $_[1] } unpack "C*", # multiply values pack "(b2)*", split /..\K/, $_[0]; # value of every 2 bits } ($_) = halfbits($_) | halfbits(<>, 2); # 0..3 + 0,4,8,12 y/\0-\017/ ▘▝▀▖▌▞▛▗▚▐▜▄▙▟█/; print; ' Ironically, Aztec Codes do not really support Unicode (raw bytes are declared to be Latin1), but it's currently the only widely supported 2D code of this size. --- diff --git a/unicode.txt b/unicode.txt index 3624b6f..dd8693f 100644 --- a/unicode.txt +++ b/unicode.txt @@ -317,11 +317,11 @@ Box drawing alignment tests: ││╠╬╣║│ ├╢│ │╟┤ ┣┿╾╳╼┿┫ ┕┛┖┚ ╹╵ ┆▌▐ ▌▐┇ ▌ ││╚╩╝║│ │║╰─╯║│ ┃│╱╽╲│┃ ┏┯┓ ┌┰┐ ┆▌▝▀▘▐╏ ▋ ╞╪═══╬╡ │╙─┬─╜│ ┃└─╂─┘┃ ┠┼┨ ┝╋┥ ┊▙▄▄▄▟╏ ▊ - └┴───╨┘ ╘══╧══╛ ┗━━┻━━┛ ┗┷┛ └┸┘ ┕┉┅┅╍╍┛ ▉ - █ - ▄█▄ █▄ ▄ - ▄█▀█▓ ▄▓▀▀█▀ ▀▀▀█▓▀▀ ▀▀ ▄█▀█▓▀▀▀▀▀▓▄▀██▀▀ (\__/) - ██ ██ ▀██▄▄ ▄█ ▀ ░▒ ░▒ ██ ██ ▄█▄ █▀ ██ (=’.’=) - █▓▄▀██ ▄ ▀█▌▓█ ▒▓ ▒▓ █▓▄▀██ ▓█ ▀▄ █▓ ☆(”)_(”)☆ - █▒ █▓ ██▄▓▀ ▀█▄▄█▄▓█ ▓█ █▒ █▓ ▒█ ▓█▄ ▒ - ▀▒ ▀ ▀ █▀ ▀▒ █ █▀ ░ ヽ༼。◕ ∀ ◕。༽ノ + └┴───╨┘ ╘══╧══╛ ┗━━┻━━┛ ┗┷┛ └┸┘ ┕┉┅┅╍╍┛ ▉ ▗▄▖▄▖ + █ ▐▄▞▀▐▚▗▘ + ▄█▄ █▄ ▄ ▗▛▛▀▀▀▛▙ + ▄█▀█▓ ▄▓▀▀█▀ ▀▀▀█▓▀▀ ▀▀ ▄█▀█▓▀▀▀▀▀▓▄▀██▀▀ (\__/) ▞▌▛▀▌▌▜ + ██ ██ ▀██▄▄ ▄█ ▀ ░▒ ░▒ ██ ██ ▄█▄ █▀ ██ (=’.’=) ▐▜▌▌▘▌▛▙ + █▓▄▀██ ▄ ▀█▌▓█ ▒▓ ▒▓ █▓▄▀██ ▓█ ▀▄ █▓ ☆(”)_(”)☆ ▐▐▌▀▀▘█▖ + █▒ █▓ ██▄▓▀ ▀█▄▄█▄▓█ ▓█ █▒ █▓ ▒█ ▓█▄ ▒ ▗ ▀▛▜▜▀▘ + ▀▒ ▀ ▀ █▀ ▀▒ █ █▀ ░ ヽ༼。◕ ∀ ◕。༽ノ ▝ ▗▞▖▗▘▗