diff options
| author | Jens Schweikhardt <schweikh@schweikhardt.net> | 2025-08-31 11:19:44 +0200 |
|---|---|---|
| committer | Jens Schweikhardt <schweikh@schweikhardt.net> | 2025-08-31 11:19:44 +0200 |
| commit | 1ba7b3a044045ea2aa91dd46acc3a1b4531a8bc1 (patch) | |
| tree | f09f7fbc3f8d1c600ca03e7350aeea445c51b3e4 /renumber.pl | |
| parent | 1abec752a5f4d50ff1e77c870a63a2a194ab8374 (diff) | |
Replace renumber.pl with hextosrc.c. Improved TTF.
* Introduce VERSION and HASH for utility programs.
* Fontlint complained about the + in BDF U+1234 character names, so
I changed them to U1234.
Diffstat (limited to 'renumber.pl')
| -rwxr-xr-x | renumber.pl | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/renumber.pl b/renumber.pl deleted file mode 100755 index bc2b6ab..0000000 --- a/renumber.pl +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env perl - -use v5.36; -use warnings; -use diagnostics; -use strict; -use utf8; -use open qw(:std :encoding(UTF-8)); -use charnames ':full'; - -my $width = 12; -my $height = 22; -my $dblwidth = 2 * $width; - -my $lnr = 0; -my $n = $height; -while (<>) { - chop; - ++$lnr; - if (/^STARTCHAR\s+[Uu]\+([[:xdigit:]]+)/) { - my $cp = hex $1; - my $name = charnames::viacode ($cp) // '<no name>'; - $_ = sprintf "STARTCHAR U+%04x %s", $cp, $name; - } - elsif (/^[[:digit:]]+ \|(.{$width})\|/) { - $_ = sprintf "%02d |%s|", $n--, $1; - } - elsif (/^[[:digit:]]+ \|(.{$dblwidth})\|/) { - $_ = sprintf "%02d |%s|", $n--, $1; - } - elsif (/^ENDCHAR$/) { - if ($n != 0) { - my $N = 22 - $n; - print STDERR - "line $lnr: ENDCHAR after $N bitmap rows, expected $height\n"; - exit 1; - } - $n = $height; - } - else { - print STDERR "line $lnr: unrecognized input: '$_'\n"; - exit 1; - } - print "$_\n"; -} - -# vi: set tabstop=2 shiftwidth=2 expandtab fileformat=unix: |
