#!/usr/local/bin/perl
#
# hack a XFLD info - alias all fonts, declared as koi8*, to iso8859-1
#
# usage:
# cd fontdir; ../ISO2koi < fonts.dir >> fonts.alias
#
# 1996/08/29 - vsv
#
while (<>) {
	chop;
	($z, $koi8) = split /[ \t]+/;
	$iso = $koi8;
	$iso =~ s/-koi8r-1/-iso8859-1/g;
	$iso =~ s/-koi8-1/-iso8859-1/g;
	$iso =~ s/-koi8-r/-iso8859-1/g;
	$iso =~ s/-cronyx-/-adobe-/g;
	$iso =~ s/-cronix-/-adobe-/g;
	## $iso =~ s/-cronix-/-hack-/g;
	## $iso =~ s/-cronyx-/-hack-/g;
	# Elvis+ fonts...
	## $iso =~ s/-adobe-/-hack-/g;
	## $iso =~ s/-dec-/-hack-/g;
	next if ("$iso" !~ /-iso8859-/);
	@z = split (/-/, $iso);
	# no matter, 10 or 12, must be more then 3-4 ;)
	printf ("\"%s\"\t\"%s\"\n", $iso, $koi8) if (@z > 10);
}
