#!/usr/bin/perl -w use strict; use Getopt::Std; $| = 1; my $FONTDIR = "/usr/home/mats/share/groff_font/devps"; my $pw = 595; my $ph = 842; my $font = "TR"; my $size = 48; my $tracking = 0; my $wspacing = 0; my $color = "0 0 0"; my $bg = "1 1 1"; my $kerning = 1; my $adjust = "L"; sub usage { print STDERR "usage: grtext [-f font] [-s size] [-t tracking] [-w word_spacing] [-c color] [-b background] [-k] [-m] [-l] text\n"; exit 1; } my %opts; getopts("f:s:t:w:c:b:kml", \%opts); defined $opts{"f"} and $font = $opts{"f"}; defined $opts{"s"} and $size = $opts{"s"}; defined $opts{"t"} and $tracking = $opts{"t"}; defined $opts{"w"} and $wspacing = $opts{"w"}; defined $opts{"c"} and $color = $opts{"c"}; defined $opts{"b"} and $bg = $opts{"b"};; defined $opts{"k"} and $kerning = 0; defined $opts{"m"} and $adjust = "C"; defined $opts{"l"} and do {$pw = 842; $ph = 595}; if ($wspacing == 0 and $tracking != 0) { $wspacing = $tracking; $wspacing =~ /[a-zA-Z]$/ or $wspacing .= "p"; } (scalar @ARGV) or usage; $pw == 842 and system("ln -sf $FONTDIR/DESC.landscape $FONTDIR/DESC"); print <