aboutsummaryrefslogtreecommitdiff
path: root/fonts
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-07-24 03:34:33 -0400
committerB. Watson <urchlay@slackware.uk>2024-07-24 03:34:33 -0400
commitfd7a9382504720f77ecf3f40e9fb982da1e913a5 (patch)
treec175222803471c02c6f56aeb2f61e9b2d95ae800 /fonts
parentf75bd24a3a8ec0b6630a9478d2b484b8dd6933d1 (diff)
downloadbw-atari8-tools-fd7a9382504720f77ecf3f40e9fb982da1e913a5.tar.gz
fonts: WIP.
Diffstat (limited to 'fonts')
-rw-r--r--fonts/fauxtari-16.psfbin17954 -> 17966 bytes
-rw-r--r--fonts/fauxtari-16.txt18
-rw-r--r--fonts/fauxtari-24.psfbin38434 -> 38446 bytes
-rw-r--r--fonts/fauxtari-24.txt24
-rw-r--r--fonts/fauxtari-8.psfbin5666 -> 5678 bytes
-rw-r--r--fonts/fauxtari-8.txt12
-rw-r--r--fonts/mkpsf.pl58
7 files changed, 59 insertions, 53 deletions
diff --git a/fonts/fauxtari-16.psf b/fonts/fauxtari-16.psf
index 6235056..9a9d06d 100644
--- a/fonts/fauxtari-16.psf
+++ b/fonts/fauxtari-16.psf
Binary files differ
diff --git a/fonts/fauxtari-16.txt b/fonts/fauxtari-16.txt
index 791857f..48d0e8e 100644
--- a/fonts/fauxtari-16.txt
+++ b/fonts/fauxtari-16.txt
@@ -357,7 +357,7 @@ Bitmap: \
-------------------------------- \
--------------------------------
%
-Unicode: [0020];
+Unicode: [0020];[00a0];
Bitmap: \
-------------------------------- \
-------------------------------- \
@@ -500,7 +500,7 @@ Bitmap: \
------####------------####------ \
----####------------####--------
%
-Unicode: [002d];
+Unicode: [002d];[00ad];[2013];[2014];
Bitmap: \
-------------------------------- \
-------------------------------- \
@@ -3089,16 +3089,16 @@ Bitmap: \
----------------
%
// degrees
-Unicode: [00b0];
+Unicode: [00b0];[00ba];
Bitmap: \
---------------- \
---------------- \
- ------XX------ \
- ------XX------ \
- ----x----x---- \
- ----x----x---- \
- ------xx------ \
- ------xx------ \
+ ------####------ \
+ ------####------ \
+ ----##----##---- \
+ ----##----##---- \
+ ------####------ \
+ ------####------ \
---------------- \
---------------- \
---------------- \
diff --git a/fonts/fauxtari-24.psf b/fonts/fauxtari-24.psf
index 82cfc3c..75caa2f 100644
--- a/fonts/fauxtari-24.psf
+++ b/fonts/fauxtari-24.psf
Binary files differ
diff --git a/fonts/fauxtari-24.txt b/fonts/fauxtari-24.txt
index d74357b..6114e67 100644
--- a/fonts/fauxtari-24.txt
+++ b/fonts/fauxtari-24.txt
@@ -357,7 +357,7 @@ Bitmap: \
------------------------------------------------------------------------ \
------------------------------------------------------------------------
%
-Unicode: [0020];
+Unicode: [0020];[00a0];
Bitmap: \
------------------------------------------------------------------------ \
------------------------------------------------------------------------ \
@@ -500,7 +500,7 @@ Bitmap: \
---------######------------------######------------------######--------- \
------######------------------######------------------######------------
%
-Unicode: [002d];
+Unicode: [002d];[00ad];[2013];[2014];
Bitmap: \
------------------------------------------------------------------------ \
------------------------------------------------------------------------ \
@@ -3161,20 +3161,20 @@ Bitmap: \
------------------------
%
// degrees
-Unicode: [00b0];
+Unicode: [00b0];[00ba];
Bitmap: \
------------------------ \
------------------------ \
------------------------ \
- ---------XX--------- \
- ---------XX--------- \
- ---------XX--------- \
- ------x------x------ \
- ------x------x------ \
- ------x------x------ \
- ---------xx--------- \
- ---------xx--------- \
- ---------xx--------- \
+ ---------######--------- \
+ ---------######--------- \
+ ---------######--------- \
+ ------###------###------ \
+ ------###------###------ \
+ ------###------###------ \
+ ---------######--------- \
+ ---------######--------- \
+ ---------######--------- \
------------------------ \
------------------------ \
------------------------ \
diff --git a/fonts/fauxtari-8.psf b/fonts/fauxtari-8.psf
index d115faf..822efa2 100644
--- a/fonts/fauxtari-8.psf
+++ b/fonts/fauxtari-8.psf
Binary files differ
diff --git a/fonts/fauxtari-8.txt b/fonts/fauxtari-8.txt
index f2434a7..5722a31 100644
--- a/fonts/fauxtari-8.txt
+++ b/fonts/fauxtari-8.txt
@@ -357,7 +357,7 @@ Bitmap: \
-------- \
--------
%
-Unicode: [0020];
+Unicode: [0020];[00a0];
Bitmap: \
-------- \
-------- \
@@ -500,7 +500,7 @@ Bitmap: \
---##--- \
--##----
%
-Unicode: [002d];
+Unicode: [002d];[00ad];[2013];[2014];
Bitmap: \
-------- \
-------- \
@@ -3017,12 +3017,12 @@ Bitmap: \
--------
%
// degrees
-Unicode: [00b0];
+Unicode: [00b0];[00ba];
Bitmap: \
-------- \
- ---XX--- \
- --x--x-- \
- ---xx--- \
+ ---##--- \
+ --#--#-- \
+ ---##--- \
-------- \
-------- \
-------- \
diff --git a/fonts/mkpsf.pl b/fonts/mkpsf.pl
index 1ff5816..e3e9295 100644
--- a/fonts/mkpsf.pl
+++ b/fonts/mkpsf.pl
@@ -158,7 +158,7 @@ sub setup_map {
0x002A, # 0x2A
0x002B, # 0x2B
0x002C, # 0x2C
- [ 0x002D, 0x00ad, 0x2013, 0x2014 ] # 0x2D (plus soft hyphen, en, em)
+ [ 0x002D, 0x00ad, 0x2013, 0x2014 ], # 0x2D (plus soft hyphen, en, em)
0x002E, # 0x2E
0x002F, # 0x2F
0x0030, # 0x30
@@ -466,7 +466,7 @@ while($raw =~ /(.{8})/gc) {
my @bytes;
my $got = $1;
my $chr = $map[$cnt++];
- die "incomplete map" unless defined $chr;
+ die "$0: incomplete map" unless defined $chr;
#warn $got;
push @bytes, ord(substr($got, $_, 1)) for(0..7);
#warn $_ for @bytes;
@@ -487,9 +487,14 @@ while(<DATA>) {
}
}
-warn "$cnt characters\n";
+#warn "$cnt characters\n";
#warn "(padding to 256 characters)\n" unless $cnt >= 256;
-warn "(padding to 512 characters)\n" unless $cnt >= 512;
+#warn "(padding to 512 characters)\n" unless $cnt >= 512;
+
+if($cnt > 512) {
+ die "$0: too many characters ($cnt > 512)";
+}
+
while($cnt < 512) {
my $fake = "%\nUnicode: [0000];\nBitmap: ";
push @scale1, $fake . (("-" x 8) x 8) . "\n";
@@ -497,25 +502,26 @@ while($cnt < 512) {
push @scale3, $fake . (("-" x 24) x 24) . "\n";
$cnt++;
}
-warn "$cnt characters with padding\n";
-
-open $fh, '>', "$fontname-8.txt" or die $!;
-print $fh psf2txt_header($cnt, 1);
-print $fh $_ for(@scale1);
-close $fh;
-system("txt2psf $fontname-8.txt $fontname-8.psf");
-
-open $fh, '>', "$fontname-16.txt" or die $!;
-print $fh psf2txt_header($cnt, 2);
-print $fh $_ for(@scale2);
-close $fh;
-system("txt2psf $fontname-16.txt $fontname-16.psf");
-
-open $fh, '>', "$fontname-24.txt" or die $!;
-print $fh psf2txt_header($cnt, 3);
-print $fh $_ for(@scale3);
-close $fh;
-system("txt2psf $fontname-24.txt $fontname-24.psf");
+
+#warn "$cnt characters with padding\n";
+sub mkfonts {
+ my $px = shift;
+ my $scaled_data = shift;
+ my $scale = shift;
+
+ open $fh, '>', "$fontname-$px.txt" or die $!;
+ print $fh psf2txt_header($cnt, $scale);
+ print $fh $_ for(@$scaled_data);
+ close $fh;
+ system("txt2psf $fontname-$px.txt $fontname-$px.psf");
+ system("psf2bdf --iso10646 --fontname=$fontname-$px $fontname-$px.psf $fontname-$px.bdf");
+}
+
+mkfonts(8, \@scale1, 1);
+mkfonts(16, \@scale2, 2);
+mkfonts(24, \@scale3, 3);
+
+exit 0;
__DATA__
%
@@ -630,9 +636,9 @@ Bitmap: \
Unicode: [00b0];[00ba];
Bitmap: \
-------- \
- ---XX--- \
- --x--x-- \
- ---xx--- \
+ ---##--- \
+ --#--#-- \
+ ---##--- \
-------- \
-------- \
-------- \