unifont-6.3.20131020.tar.gz
[unifont.git] / src / hexbraille
1 #!/usr/bin/perl
2 #
3 # Copyright (C) 1998, 2013 Roman Czyborra
4 # http://czyborra.com/unifont/braille.pl
5 # 1998-10-30 all wrong from czyborra@cs.tu-berlin.de
6 # 2003-02-15 correction hint from dominique@unruh.de
7 # see http://www.egroups.com/group/gnu-unifont/
8 #
9 # LICENSE:
10 #
11 #    This program is free software: you can redistribute it and/or modify
12 #    it under the terms of the GNU General Public License as published by
13 #    the Free Software Foundation, either version 2 of the License, or
14 #    (at your option) any later version.
15 #  
16 #    This program is distributed in the hope that it will be useful,
17 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
18 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
19 #    GNU General Public License for more details.
20 #  
21 #    You should have received a copy of the GNU General Public License
22 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
23 #
24
25 for ($c = 0; $c < 256; ++ $c)
26 {
27
28
29     printf (
30
31              "28%02X:000000%d%d%d%d00%d%d%d%d00%d%d%d%d00%d%d%d%d0000\n", 
32              
33              $c, 
34
35              $c & 1 ? 3 : 2, $c & 8 ? 6 : 2,
36              $c & 1 ? 3 : 0, $c & 8 ? 6 : 0,
37
38              $c & 2 ? 3 : 2, $c & 16 ? 6 : 2,
39              $c & 2 ? 3 : 0, $c & 16 ? 6 : 0,
40
41              $c & 4 ? 3 : 2, $c & 32 ? 6 : 2,
42              $c & 4 ? 3 : 0, $c & 32 ? 6 : 0,
43
44              $c & 64 ? 3 : 2, $c & 128 ? 6 : 2,
45              $c & 64 ? 3 : 0, $c & 128 ? 6 : 0
46
47              );
48 }