blob: 4cca8368069ca6996f4b5e5e4cc80f005d9e4734 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/usr/bin/perl -W
%glyph = ();
print "#include <stdlib.h>\n";
print "#include \"rufl_internal.h\"\n";
print "const struct rufl_glyph_map_entry rufl_glyph_map[] = {\n";
while (<>) {
if (/^([0-9A-F]{4});([a-zA-Z0-9]+);/) {
$glyph{$2} = $1;
}
}
foreach $z (sort keys %glyph) {
print "\t{\"$z\", 0x$glyph{$z}},\n";
}
print "};\n";
print "const size_t rufl_glyph_map_size = sizeof rufl_glyph_map /\n";
print " sizeof rufl_glyph_map[0];\n";
|