diff options
author | Seiichirou Hiraoka <flathill@FreeBSD.org> | 1999-03-14 02:48:05 +0000 |
---|---|---|
committer | Seiichirou Hiraoka <flathill@FreeBSD.org> | 1999-03-14 02:48:05 +0000 |
commit | 7bf6ecab81ccd85cc2384786b777ee7e7908d334 (patch) | |
tree | 9963e7cbaa63dceb0cb351164a327ae2d78927e5 /graphics/gimp | |
parent | c42cc3ec22322aaa93eb3a2da135260a7ba20a8d (diff) | |
download | ports-7bf6ecab81ccd85cc2384786b777ee7e7908d334.tar.gz ports-7bf6ecab81ccd85cc2384786b777ee7e7908d334.zip |
Notes
Diffstat (limited to 'graphics/gimp')
-rw-r--r-- | graphics/gimp/files/gimp.setfont | 236 |
1 files changed, 236 insertions, 0 deletions
diff --git a/graphics/gimp/files/gimp.setfont b/graphics/gimp/files/gimp.setfont new file mode 100644 index 000000000000..1d50e8ea9b8f --- /dev/null +++ b/graphics/gimp/files/gimp.setfont @@ -0,0 +1,236 @@ +#!/usr/bin/perl + +# Font setting Perl script for GIMP +# +# by MANTANI Nobutaka <nobutaka@nobutaka.com> + +$progname = "gimp.setfont"; +$version = "Version 0.1 Mar 1 1999"; + +# Show usage +sub usage() { + print <<EOF; +Usage: gimp.setfont <language> + +---------------------------------------------------------------- +[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 <<EOF; +\# style <name> [= <name>] +\# { +\# <option> +\# } +\# +\# widget <widget_set> style <style_name> +\# widget_class <widget_class_set> style <style_name> + +style "default" +{ + fontset = "$fontset" +} + +widget_class "*" style "default" +EOF + close(FILE); + print "Done.\n\n"; + } else { + print <<EOF; +Directory $path is not found. +Please execute "gimp" and install files into $path +directory first. + +EOF + exit; + } +} + + +$lang = $ARGV[0]; +$fontset = ""; + +print <<EOF; + +$progname - Font setting utility for GIMP ($version) + +EOF + +if (@ARGV != 1) { + usage(); + exit; +} + +if ($lang eq "dutch") { + $fontset = "-*-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-1"; + + print "Setting for Dutch language...\n\n"; + + write_gtkrc($fontset); + + print <<EOF; +Please set "LANG" environment variable to "nl_NL.ISO_8859-1" and execute "gimp". + +EOF + exit; +} + +if ($lang eq "english") { + $fontset = "-*-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-1"; + print "Setting for English language...\n\n"; + + write_gtkrc($fontset); + + print <<EOF; +Please set "LANG" environment variable to "C" and execute "gimp". + +EOF + exit; +} + +if ($lang eq "finnish") { + $fontset = "-*-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-1"; + print "Setting for Finnish language...\n\n"; + + write_gtkrc($fontset); + + print <<EOF; +Please set "LANG" environment variable to "fi_FI.ISO_8859-1" and execute "gimp". + +EOF + exit; +} + +if ($lang eq "french") { + $fontset = "-*-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-1"; + print "Setting for French language...\n\n"; + + write_gtkrc($fontset); + + print <<EOF; +Please set "LANG" environment variable to "fr_FR.ISO_8859-1" and execute "gimp". + +EOF + exit; +} + +if ($lang eq "german") { + $fontset = "-*-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-1"; + print "Setting for German language...\n\n"; + + write_gtkrc($fontset); + + print <<EOF; +Please set "LANG" environment variable to "de_DE.ISO_8859-1" and execute "gimp". + +EOF + exit; +} + +if ($lang eq "hungarian") { + $fontset = "-*-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-2"; + print "Setting for Hungarian language...\n\n"; + + write_gtkrc($fontset); + + print <<EOF; +Please set "LANG" environment variable to "hu_HU.ISO_8859-2" and execute "gimp". + +EOF + exit; +} + +if ($lang eq "italian") { + $fontset = "-*-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-1"; + print "Setting for Italian language...\n\n"; + + write_gtkrc($fontset); + + print <<EOF; +Please set "LANG" environment variable to "it_IT.ISO_8859-1" and execute "gimp". + +EOF + exit; +} + +if ($lang eq "japanese") { + $fontset = "-*-fixed-medium-r-normal--14-*-*-*-*-*-iso8859-1,-*-fixed-medium-r-normal--14-*-*-*-*-*-jisx0201.1978-0,-*-fixed-medium-r-normal--14-*-*-*-*-*-jisx0208.1983-0"; + print "Setting for Japanese language...\n\n"; + + write_gtkrc($fontset); + + print <<EOF; +Please set "LANG" environment variable to "ja_JP.EUC" and execute "gimp". + +EOF + exit; +} + +if ($lang eq "korean") { + $fontset = "-*-fixed-medium-r-normal--16-*-*-*-*-*-iso8859-1,-daewoo-gothic-medium-r-normal--16-*-*-*-*-*-ksc5601.1987-0"; + print "Setting for Korean language...\n\n"; + + write_gtkrc($fontset); + + print <<EOF; +Please set "LANG" environment variable to "ko_KR.EUC" and execute "gimp". + +EOF + exit; +} + +if ($lang eq "polish") { + $fontset = "-*-fixed-medium-r-normal--14-*-*-*-*-*-iso8859-2"; + print "Setting for Polish language...\n\n"; + + write_gtkrc($fontset); + + print <<EOF; +Please set "LANG" environment variable to "pl_PL.ISO_8859-2" and execute "gimp". + +EOF + exit; +} + +if ($lang eq "swedish") { + $fontset = "-*-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-1"; + print "Setting for Swedish language...\n\n"; + + write_gtkrc($fontset); + + print <<EOF; +Please set "LANG" environment variable to "sv_SE.ISO_8859-1" and execute "gimp". + +EOF + exit; +} + +usage(); +exit; |