diff --git a/_service b/_service index 7769592..247e39f 100644 --- a/_service +++ b/_service @@ -1,3 +1,4 @@ + psf2bdf.pl diff --git a/psf2bdf.pl b/psf2bdf.pl index e838bef..edc71b6 100644 --- a/psf2bdf.pl +++ b/psf2bdf.pl @@ -23,6 +23,7 @@ for (@ARGV) { my ($length, $width, $height); my (@glyphs, @unicode); + my $unilen = 0; open my $fh, $_ or die $!; binmode $fh; @@ -49,6 +50,7 @@ for (@ARGV) { warn 'Unicode sequence ignored' if $u == 0xFFFE; } $unicode[$i] = [@u]; + $unilen += (scalar @u) - 1 if (scalar @u); } } } @@ -67,6 +69,7 @@ for (@ARGV) { $buf =~ m/\G([^\xfe\xff]*+)(?:\xfe[^\xfe\xff]++)*\xff/sg; utf8::decode(my $str = $1); $unicode[$i] = [map ord, split //, $str]; + $unilen += (scalar @{$unicode[$i]}) - 1 if (scalar @{$unicode[$i]}); } } } @@ -93,22 +96,32 @@ for (@ARGV) { } print "ENDPROPERTIES\n"; - printf "CHARS %u\n", $length; + printf "CHARS %u\n", $length + $unilen; for my $i (0 .. $length - 1) { - printf "STARTCHAR psf%03x\n", $i; - if (@unicode && @{$unicode[$i]}) { - printf "ENCODING %u\n", $unicode[$i][0]; + my @encodings = ($i); + my $is_unicode = 0; + + if(@unicode && @{$unicode[$i]}) { + @encodings = @{$unicode[$i]}; + $is_unicode = 1; } - else { - printf "ENCODING -1 %u\n", $i; + + foreach my $e (@encodings) { + printf "STARTCHAR psf%03x-%04x\n", $i, $e; + if ($is_unicode) { + printf "ENCODING %u\n", $e; + } + else { + printf "ENCODING -1 %u\n", $e; + } + printf "SWIDTH %u 0\n", $width * 1000 / $height; + printf "DWIDTH %u 0\n", $width; + printf "BBX %u %u 0 0\n", $width, $height; + my $bw = (($width + 7) & ~7) >> 3; + printf "BITMAP\n%s\n", join "\n", map unpack('H*', $_), unpack "(a$bw)*", $glyphs[$i]; + printf "ENDCHAR\n"; } - printf "SWIDTH %u 0\n", $width * 1000 / $height; - printf "DWIDTH %u 0\n", $width; - printf "BBX %u %u 0 0\n", $width, $height; - my $bw = (($width + 7) & ~7) >> 3; - printf "BITMAP\n%s\n", join "\n", map unpack('H*', $_), unpack "(a$bw)*", $glyphs[$i]; - printf "ENDCHAR\n"; } print "ENDFONT\n"; diff --git a/xterm-console b/xterm-console index f9a5f20..18240da 100644 --- a/xterm-console +++ b/xterm-console @@ -53,7 +53,7 @@ import os xx = [ "xterm", # console font - "-fn", "lat9w-16", + "-fn", "eurlatgr", "-fullscreen", # no scrollbar "+sb", diff --git a/xterm-console.changes b/xterm-console.changes index 2986e1d..8b70d63 100644 --- a/xterm-console.changes +++ b/xterm-console.changes @@ -1,7 +1,17 @@ ------------------------------------------------------------------- -Thu Jun 10 13:51:54 UTC 2021 - Marius Kittler +Thu Jun 10 17:58:04 UTC 2021 - okurz@suse.com -- Disable services again to allow submission to Factory +- Update to version 1.1: + * Bump version number in spec + * Handle glyphs without unicode mapping gracefully + * Fix generating psf2 fonts with multiple codepoints per glyph + * psf2bdf.pl: Support mapping multiple codepoints to a glyph + * Use eurlatgr as font + * Further cleanup of spec-file + * Cleanup spec-file (delete unused symbol; simplify) + * Delete old pre-SLE11 cruft + * Mark as noarch as there are only scripts + * Cleanup spec-file ------------------------------------------------------------------- Tue Jan 28 12:26:32 UTC 2020 - okurz@suse.com diff --git a/xterm-console.spec b/xterm-console.spec index e7e1e2f..788c5e4 100644 --- a/xterm-console.spec +++ b/xterm-console.spec @@ -17,7 +17,7 @@ Name: xterm-console -Version: 1.0 +Version: 1.1 Release: 0 Summary: A Linux vt console look-alike xterm wrapper License: MIT diff --git a/xterm_console-1.1.obscpio b/xterm_console-1.1.obscpio new file mode 100644 index 0000000..442b2e7 --- /dev/null +++ b/xterm_console-1.1.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:754be3cb16a7256bcbbcb658296c3db44d2bd8fce52c28ee7d44540ecf10b0fe +size 10762 diff --git a/xterm_console.obsinfo b/xterm_console.obsinfo index 4e57d37..c8291af 100644 --- a/xterm_console.obsinfo +++ b/xterm_console.obsinfo @@ -1,5 +1,5 @@ name: xterm_console -version: 1.0 -mtime: 1580219585 -commit: 580eaafe2972e1e642254c7fc64603a67637c388 +version: 1.1 +mtime: 1623347434 +commit: 2532f1418ee6df6f091c4c0e036a0852f7f4e0b4