#!/usr/bin/perl # Font setting Perl script for GIMP # # by MANTANI Nobutaka $progname = "gimp.setfont"; $version = "Version 0.1 Mar 1 1999"; # Show usage sub usage() { print < ---------------------------------------------------------------- [language] [fontset] dutch -*-helvetica-(iso8859-1) english -*-helvetica-(iso8859-1) finnish -*-helvetica-(iso8859-1) french -*-helvetica-(iso8859-1) german -*-helvetica-(iso8859-1) hungarian -*-helvetica-(iso8859-2) italian -*-helvetica-(iso8859-1) japanese -*-fixed-(iso8859-1,jisx0201,jisx0208) korean -*-fixed-(iso8859-1)/-daewoo-gothic-(ksc5601) polish -*-helvetica-(iso8859-2) swedish -*-helvetica-(iso8859-1) ---------------------------------------------------------------- EOF } # Write gtkrc of user's .gimp-1.1 directory sub write_gtkrc($) { $fontset = shift; $path = "$ENV{'HOME'}/.gimp-1.1"; if (-d $path) { if (-e "$path/gtkrc") { chmod(0644, "$path/gtkrc"); print "renaming $path/gtkrc to ${path}/gtkrc.old...\n"; rename($path, "${path}/gtkrc.old"); } print "writing $path/gtkrc...\n"; open(FILE, ">$path/gtkrc"); print FILE < [= ] \# { \#