summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-03-05 23:10:03 -0800
committerMichael Forney <mforney@mforney.org>2019-03-06 01:38:57 -0800
commit858cfd217f4db2613550379898561a41bc34e741 (patch)
tree6c892c6d18529ecd6d4fb3552e3871cf6cedf5ed /pkg
parentc51f2d5f6296b99641332f81d40a347d724f533c (diff)
terminus-font: Simplify ucstoany.awk slightly
Diffstat (limited to 'pkg')
-rw-r--r--pkg/terminus-font/ucstoany.awk23
1 files changed, 9 insertions, 14 deletions
diff --git a/pkg/terminus-font/ucstoany.awk b/pkg/terminus-font/ucstoany.awk
index 24145a2e..d4ce0af4 100644
--- a/pkg/terminus-font/ucstoany.awk
+++ b/pkg/terminus-font/ucstoany.awk
@@ -33,23 +33,18 @@ END {
while (getline < font) {
if ($1 == "STARTCHAR") {
readchar()
- break
+ continue
}
- if ($1 == "CHARS")
+ if ($1 == "CHARS") {
$2 = unimap_len
- else if ($1 == "FONT")
+ } else if ($1 == "FONT") {
sub(/-[^-]*-[^-]*$/, "-" charset, $2)
+ } else if ($1 == "ENDFONT") {
+ for (i = 0; i < unimap_len; ++i) {
+ encoding = unimap[i]
+ printchar(i >= 32 ? encoding : i, encoding)
+ }
+ }
print
}
- while (getline < font) {
- if ($1 == "STARTCHAR")
- readchar()
- else
- tail = tail $0 "\n"
- }
- for (i = 0; i < unimap_len; ++i) {
- encoding = unimap[i]
- printchar(i >= 32 ? encoding : i, encoding)
- }
- printf "%s", tail
}