chiark / gitweb /
notes: Some notes and scripts that I used to pick a font for new zealot
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 27 Apr 2016 00:02:19 +0000 (01:02 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 27 Apr 2016 00:02:19 +0000 (01:02 +0100)
notes/font-search/README [new file with mode: 0644]
notes/font-search/fontsearch [new file with mode: 0755]
notes/font-search/fontsearch2 [new file with mode: 0755]

diff --git a/notes/font-search/README b/notes/font-search/README
new file mode 100644 (file)
index 0000000..6f423f0
--- /dev/null
@@ -0,0 +1 @@
+xlsfonts -ll | ~/junk/fontsearch |~/junk/fontsearch2 >t
diff --git a/notes/font-search/fontsearch b/notes/font-search/fontsearch
new file mode 100755 (executable)
index 0000000..33d8387
--- /dev/null
@@ -0,0 +1,9 @@
+#!/usr/bin/perl -000
+
+while (<>) {
+    next unless m/font type:\s+Character Cell/;
+    next unless m/QUAD_WIDTH\s+10\b/;
+    next unless m/PIXEL_SIZE\s+20\b/;
+    print;
+}
+
diff --git a/notes/font-search/fontsearch2 b/notes/font-search/fontsearch2
new file mode 100755 (executable)
index 0000000..86ffff7
--- /dev/null
@@ -0,0 +1,33 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+our %done;
+
+while (<>) {
+    next unless s/^name:\s+//;
+    next if m/iso8859-(?!1\b)/;
+    next if m/\bkoi8\b/;
+    my $other = $_;
+    $other =~ s/\b(iso8859-1|microsoft-cp1251|paratype-\w+|muleipa-1|jisx0201\.1976-0)\b/iso10646-1/;
+    next if $done{$other};
+    $done{$_}++;
+}
+
+foreach my $bold (keys %done) {
+    my $medium = $bold;
+    next unless $medium =~ s/\bbold\b/medium/;
+    delete $done{$bold} if $done{$medium};
+}
+
+foreach my $bold (keys %done) {
+    my $medium = $bold;
+    next unless $medium =~ s/-bold-/-/;
+    delete $done{$bold} if $done{$medium};
+}
+
+foreach (sort keys %done) {
+#    print;
+    chomp;
+    print "xterm -fn '$_' -e '(echo $_; man ascii) |less' &\n";
+}