home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Club Elmshorn Atari PD
/
CCE_PD.iso
/
pc
/
0400
/
CCE_0417.ZIP
/
CCE_0417.PD
/
ASCREEN.ZOO
/
fontstuf
/
lsfli
< prev
Wrap
Text File
|
1992-03-19
|
1KB
|
28 lines
#!/usr/local/bin/perl
# lsfli --- zeige Inhalt einer FLI-Datei
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Copyright (C) 1992 by Anselm Lingnau. Alle Rechte vorbehalten.
#
# Sie d"urfen dieses Skript frei benutzen und weitergeben, solange Sie dadurch
# kein Geld verdienen oder behaupten, Sie h"atten es geschrieben.
#
die "usage: $0 flib res\n" unless @ARGV == 2;
$res = $ARGV[1] * 65536;
open(FLI, $ARGV[0]) || die "couldn't open $ARGV[0]\n";
binmode(FLI);
read(FLI, $head, 14) || die "couldn't read header\n";
die "bad header\n" if substr($head, 0, 6) ne "FLIB\002\000";
($dirlen, $nsizes, $nfonts, $comlen) = unpack("S4", substr($head, 6, 8));
read(FLI, $comment, $comlen) if $comlen > 0;
for (1 .. $nsizes) {
read(FLI, $size, 8) || die "couldn't read size header\n";
($ssize, $sfonts, $sdpi) = unpack("S2I", $size);
$scaled = $sdpi != $res ? sprintf(" scaled %5.3f", $sdpi/$res) : '';
for (1 .. $sfonts) {
read(FLI, $font, 9) || die "couldn't read font entry\n";
($flen, $foff, $fnl) = unpack("I2C", $font);
read(FLI, $fname, $fnl) || die "couldn't read font name\n";
printf "%8u %8u $fname$scaled ($sdpi)\n", $foff, $flen;
}
}