summaryrefslogtreecommitdiff
path: root/makeglyphs
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2005-02-20 18:19:29 +0000
committerJames Bursa <james@netsurf-browser.org>2005-02-20 18:19:29 +0000
commit7caf0192182233de4c7524a6c40d914229952dd8 (patch)
tree1c4829abfb738e8906d2dfcd40428afe28b655a8 /makeglyphs
parentba031d279ca169c0f1da245d35e40bc52e5abe31 (diff)
downloadlibrufl-7caf0192182233de4c7524a6c40d914229952dd8.tar.gz
librufl-7caf0192182233de4c7524a6c40d914229952dd8.tar.bz2
[project @ 2005-02-20 18:19:29 by bursa]
Fix glyph with multiple Unicodes issue on RO3-4. svn path=/import/rufl/; revision=2452
Diffstat (limited to 'makeglyphs')
-rwxr-xr-xmakeglyphs16
1 files changed, 12 insertions, 4 deletions
diff --git a/makeglyphs b/makeglyphs
index 4cca836..6acb350 100755
--- a/makeglyphs
+++ b/makeglyphs
@@ -1,21 +1,29 @@
#!/usr/bin/perl -W
-%glyph = ();
+%name = ();
print "#include <stdlib.h>\n";
print "#include \"rufl_internal.h\"\n";
print "const struct rufl_glyph_map_entry rufl_glyph_map[] = {\n";
+print "\t{\" \", 0}, /* sentinel */\n";
while (<>) {
if (/^([0-9A-F]{4});([a-zA-Z0-9]+);/) {
- $glyph{$2} = $1;
+ $name{"$1:$2"} = 1;
}
}
-foreach $z (sort keys %glyph) {
- print "\t{\"$z\", 0x$glyph{$z}},\n";
+@glyph = ();
+while (($un, ) = each %name) {
+ ($u, $n) = split ':', $un;
+ push @glyph, [$n, $u];
}
+foreach $z (sort {$$a[0] cmp $$b[0] or $$a[1] cmp $$b[1]} @glyph) {
+ print "\t{\"$$z[0]\", 0x$$z[1]},\n";
+}
+
+print "\t{\"~\", 0} /* sentinel */\n";
print "};\n";
print "const size_t rufl_glyph_map_size = sizeof rufl_glyph_map /\n";
print " sizeof rufl_glyph_map[0];\n";