mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-24 15:12:32 +01:00
new wsetfont stuff
This commit is contained in:
@@ -266,7 +266,7 @@ test -f ~$GSDIR/Library/WindowMaker/exitscript || \
|
||||
cp $GLOBALDIR/exitscript.sh $GSDIR/Library/WindowMaker/exitscript
|
||||
chmod +rx $GSDIR/Library/WindowMaker/exitscript
|
||||
|
||||
#wsetfont --auto
|
||||
wsetfont --auto
|
||||
|
||||
# xx herbert
|
||||
if test -n "$BATCH" ; then
|
||||
|
||||
475
util/wsetfont
475
util/wsetfont
@@ -25,38 +25,31 @@
|
||||
# Luke Kendall <luke@research.canon.com.au>
|
||||
# Bug fix info for Korean font section from:
|
||||
# CHOI Junho <junker@jazz.snu.ac.kr>
|
||||
# LargeDisplayFont and Belarusian, Bulgarian, Macedonian, Serbian and
|
||||
# Ukrainian fontset info from:
|
||||
# Anton Zinoviev <zinoviev@debian.org>
|
||||
|
||||
VERSION="Version 0.6 2000/11/14"
|
||||
VERSION="Version 0.5 1998/12/07"
|
||||
|
||||
WDWRITE="wdwrite"
|
||||
WDREAD="wdread"
|
||||
PROGRAM=`basename $0`
|
||||
|
||||
if test $# != 1; then
|
||||
echo
|
||||
echo "$PROGRAM - font/language setting utility for Window Maker"
|
||||
echo
|
||||
echo "Usage: $VERSION"
|
||||
echo " $PROGRAM <option> "
|
||||
cat <<EOF
|
||||
help_msg() {
|
||||
echo -e "\n"\
|
||||
"$PROGRAM - font/language setting utility for Window Maker\n"\
|
||||
"\n"\
|
||||
"Usage: $VERSION\n"\
|
||||
" $PROGRAM [--nodef] [--auto] <font_family>" >/dev/stderr
|
||||
cat >/dev/stderr <<EOF
|
||||
-----------------------------------------------------------------------
|
||||
[Option] [Fontset] [Font Information]
|
||||
default helvetica
|
||||
latin1 helvetica(iso8859-1)
|
||||
latin2 helvetica(iso8859-2) See *Note1.
|
||||
belarusian helvetica(cp1251) See *Note1
|
||||
bulgarian helvetica(cp1251) See *Note1
|
||||
greek helvetica(iso8859-7) See *Note1.
|
||||
japanese helvetica/-*-fixed(jisx02XX) Included in X11R6/XFree86("fnon" pkg)
|
||||
korean helvetica/-*-kodig(ksc5601) See *Note1.
|
||||
korean2 helvetica/daewoo(ksc5601) Included in X11R6/XFree86("fnon" pkg)
|
||||
macedonian helvetica(iso8859-5) See *Note1
|
||||
russian helvetica(koi8-r) Included in X11R6/XFree86("fcyr" pkg)
|
||||
serbian helvetica(iso8859-5) See *Note1
|
||||
ukrainian helvetica(koi8-u) See *Note1
|
||||
turkish unknown See *Note2.
|
||||
[font_fam] [Fontset] [Font Information]
|
||||
default helvetica
|
||||
latin1 helvetica(iso8859-1)
|
||||
latin2 helvetica(iso8859-2) See *Note1.
|
||||
greek helvetica(iso8859-7) See *Note1.
|
||||
japanese helvetica/-*-fixed(jisx02XX) Included in X11R6/XFree86("fnon" pkg)
|
||||
korean helvetica/-*-kodig(ksc5601) See *Note1.
|
||||
korean2 helvetica/daewoo(ksc5601) Included in X11R6/XFree86("fnon" pkg)
|
||||
russian helvetica(koi8-r) Included in X11R6/XFree86("fcyr" pkg)
|
||||
turkish unknown See *Note2.
|
||||
-----------------------------------------------------------------------
|
||||
Latin1 Languages: Danish/Dutch/English/Finnish/French/Galician/German/
|
||||
Italian/Norwegian/Portuguese/Spanish/Swedish/...
|
||||
@@ -68,181 +61,281 @@ Latin2 Languages: Croatian/Czech/Polish/Romanian/Slovenian/...
|
||||
ftp://ftp.ntua.gr/pub/fonts/X11/
|
||||
Korean X fonts packages: ftp://linux.sarang.net (Linux RPM)
|
||||
ftp://ftp.kaist.ac.kr/pub/hangul/fonts
|
||||
Cyrillic X fonts packages for all encodings:
|
||||
ftp://ftp.inp.nsk.su/pub/BINP/X11/fonts/cyr-rfx/
|
||||
*Note2: please let me know appropriate font setting for WMGLOBAL/WindowMaker,
|
||||
and the fonts' URL to download. mail-to: manome@itlb.te.noda.sut.ac.jp
|
||||
EOF
|
||||
exit
|
||||
}
|
||||
|
||||
nodef=""
|
||||
auto=""
|
||||
family=""
|
||||
for i in $*; do
|
||||
case $i in
|
||||
"--nodef")
|
||||
nodef="YES";;
|
||||
"--auto")
|
||||
auto="YES";;
|
||||
*)
|
||||
if echo $i |grep "^--locale=" &>/dev/null; then
|
||||
new_locale=$(echo $i |sed -e "s|--locale=||" -)
|
||||
elif [ -z $family ]; then
|
||||
family=$i
|
||||
else
|
||||
help_msg
|
||||
fi;;
|
||||
esac
|
||||
done
|
||||
if [ -z "$family" ] && [ -z "$new_locale" ] && [ -z "$auto" ]; then
|
||||
help_msg
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
default)
|
||||
SystemFont=\"-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-*-*\"
|
||||
BoldSystemFont=\"-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*\"
|
||||
WindowTitleFont=\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*\"
|
||||
MenuTitleFont=\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*\"
|
||||
MenuTextFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*\"
|
||||
IconTitleFont=\"-*-helvetica-medium-r-normal-*-8-*-*-*-*-*-*-*\"
|
||||
ClipTitleFont=\"-*-helvetica-bold-r-normal-*-10-*-*-*-*-*-*-*\"
|
||||
DisplayFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*\"
|
||||
LargeDisplayFont=\"-*-lucida-bold-r-*-*-24-*-*-*-*-*-*-*\"
|
||||
;;
|
||||
latin1)
|
||||
SystemFont=\"-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-iso8859-1\"
|
||||
BoldSystemFont=\"-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-iso8859-1\"
|
||||
WindowTitleFont=\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso8859-1\"
|
||||
MenuTitleFont=\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso8859-1\"
|
||||
MenuTextFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso8859-1\"
|
||||
IconTitleFont=\"-*-helvetica-medium-r-normal-*-8-*-*-*-*-*-iso8859-1\"
|
||||
ClipTitleFont=\"-*-helvetica-bold-r-normal-*-10-*-*-*-*-*-iso8859-1\"
|
||||
DisplayFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso8859-1\"
|
||||
LargeDisplayFont=\"-*-lucida-bold-r-*-*-24-*-*-*-*-*-iso8859-1\"
|
||||
;;
|
||||
latin2)
|
||||
SystemFont=\"-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-iso8859-2\"
|
||||
BoldSystemFont=\"-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-iso8859-2\"
|
||||
WindowTitleFont=\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso8859-2\"
|
||||
MenuTitleFont=\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso8859-2\"
|
||||
MenuTextFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso8859-2\"
|
||||
IconTitleFont=\"-*-helvetica-medium-r-normal-*-8-*-*-*-*-*-iso8859-2\"
|
||||
ClipTitleFont=\"-*-helvetica-bold-r-normal-*-10-*-*-*-*-*-iso8859-2\"
|
||||
DisplayFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso8859-2\"
|
||||
LargeDisplayFont=\"-*-lucida-bold-r-*-*-24-*-*-*-*-*-iso8859-2\"
|
||||
;;
|
||||
greek)
|
||||
SystemFont=\"-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-iso8859-7\"
|
||||
BoldSystemFont=\"-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-iso8859-7\"
|
||||
WindowTitleFont=\"-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso8859-7\"
|
||||
MenuTitleFont=\"-*-helvetica-medium-r-normal-*-14-*-*-*-*-*-iso8859-7\"
|
||||
MenuTextFont=\"-*-helvetica-medium-r-normal-*-14-*-*-*-*-*-iso8859-7\"
|
||||
IconTitleFont=\"-*-helvetica-bold-r-normal-*-10-*-*-*-*-*-iso8859-7\"
|
||||
ClipTitleFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso8859-7\"
|
||||
DisplayFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso8859-7\"
|
||||
LargeDisplayFont=\"-*-*-bold-r-*-*-24-*-*-*-*-*-iso8859-7\"
|
||||
;;
|
||||
russian)
|
||||
SystemFont=\"-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-koi8-r\"
|
||||
BoldSystemFont=\"-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-koi8-r\"
|
||||
WindowTitleFont=\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-koi8-r\"
|
||||
MenuTitleFont=\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-koi8-r\"
|
||||
MenuTextFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-koi8-r\"
|
||||
IconTitleFont=\"-*-helvetica-medium-r-normal-*-8-*-*-*-*-*-koi8-r\"
|
||||
ClipTitleFont=\"-*-helvetica-bold-r-normal-*-10-*-*-*-*-*-koi8-r\"
|
||||
DisplayFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-koi8-r\"
|
||||
LargeDisplayFont=\"-*-serene-bold-r-*-*-24-*-*-*-*-*-koi8-r\"
|
||||
;;
|
||||
ukrainian)
|
||||
SystemFont=\"-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-koi8-u\"
|
||||
BoldSystemFont=\"-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-koi8-u\"
|
||||
WindowTitleFont=\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-koi8-u\"
|
||||
MenuTitleFont=\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-koi8-u\"
|
||||
MenuTextFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-koi8-u\"
|
||||
IconTitleFont=\"-*-helvetica-medium-r-normal-*-8-*-*-*-*-*-koi8-u\"
|
||||
ClipTitleFont=\"-*-helvetica-bold-r-normal-*-10-*-*-*-*-*-koi8-u\"
|
||||
DisplayFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-koi8-u\"
|
||||
LargeDisplayFont=\"-*-serene-bold-r-*-*-24-*-*-*-*-*-koi8-u\"
|
||||
;;
|
||||
bulgarian|belarusian)
|
||||
SystemFont=\"-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-microsoft-cp1251\"
|
||||
BoldSystemFont=\"-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-microsoft-cp1251\"
|
||||
WindowTitleFont=\"-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-microsoft-cp1251\"
|
||||
MenuTitleFont=\"-*-helvetica-medium-r-normal-*-14-*-*-*-*-*-microsoft-cp1251\"
|
||||
MenuTextFont=\"-*-helvetica-medium-r-normal-*-14-*-*-*-*-*-microsoft-cp1251\"
|
||||
IconTitleFont=\"-*-helvetica-bold-r-normal-*-10-*-*-*-*-*-microsoft-cp1251\"
|
||||
ClipTitleFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-microsoft-cp1251\"
|
||||
DisplayFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-microsoft-cp1251\"
|
||||
LargeDisplayFont=\"-*-serene-bold-r-*-*-24-*-*-*-*-*-microsoft-cp1251\"
|
||||
;;
|
||||
serbian|macedonian)
|
||||
SystemFont=\"-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-iso8859-5\"
|
||||
BoldSystemFont=\"-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-iso8859-5\"
|
||||
WindowTitleFont=\"-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso8859-5\"
|
||||
MenuTitleFont=\"-*-helvetica-medium-r-normal-*-14-*-*-*-*-*-iso8859-5\"
|
||||
MenuTextFont=\"-*-helvetica-medium-r-normal-*-14-*-*-*-*-*-iso8859-5\"
|
||||
IconTitleFont=\"-*-helvetica-bold-r-normal-*-10-*-*-*-*-*-iso8859-5\"
|
||||
ClipTitleFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso8859-5\"
|
||||
DisplayFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso8859-5\"
|
||||
LargeDisplayFont=\"-*-serene-bold-r-*-*-24-*-*-*-*-*-iso8859-5\"
|
||||
;;
|
||||
japanese)
|
||||
SystemFont=\"-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-%d-*,-*-*-medium-r-normal-*-*-*\"
|
||||
BoldSystemFont=\"-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-%d-*,-*-*-medium-r-normal-*-*-*\"
|
||||
WindowTitleFont=\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-14-*,-*-*-medium-r-normal-*-*-*\"
|
||||
MenuTitleFont=\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-14-*,-*-*-medium-r-normal-*-*-*\"
|
||||
MenuTextFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-14-*,-*-*-medium-r-normal-*-*-*\"
|
||||
IconTitleFont=\"-*-helvetica-medium-r-normal-*-8-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-12-*,-*-*-medium-r-normal-*-*-*\"
|
||||
ClipTitleFont=\"-*-helvetica-bold-r-normal-*-10-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-12-*,-*-*-medium-r-normal-*-*-*\"
|
||||
DisplayFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-14-*,-*-*-medium-r-normal-*-*-*\"
|
||||
LargeDisplayFont=\"-*-helvetica-bold-r-normal-*-24-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-24-*,-*-*-medium-r-normal-*-*-*\"
|
||||
;;
|
||||
korean)
|
||||
SystemFont=\"-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-kodig-medium-r-normal--%d-*-*-*-*-*-*-*,*-*-medium-r-normal-*-%d-*-*-*-*-*-*-*,*-*-*-*-*--%d-*-*-*-*-*-*-*,*\"
|
||||
BoldSystemFont=\"-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-kodig-bold-r-normal--%d-*-*-*-*-*-*-*,-*-kodig-medium-r-normal--%d-*-*-*-*-*-*-*,*-*-bold-r-normal-*-%d-*-*-*-*-*-*-*,*-*-*-*-*--%d-*-*-*-*-*-*-*,*\"
|
||||
WindowTitleFont=\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*,-*-kodig-medium-r-normal--12-*-*-*-*-*-*-*,-*-*-medium-r-normal--12-*-*-*-*-*-*-*,-*-*-medium-r-normal--*-*-*-*-*-*-*-*,-*-*-*-r-normal--*-*-*-*-*-*-*-*,-*-*-*-*-*--*-*-*-*-*-*-*-*,*\"
|
||||
MenuTitleFont=\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*,-*-kodig-medium-r-normal--14-*-*-*-*-*-*-*,-*-*-medium-r-normal--12-*-*-*-*-*-*-*,*-*-medium-r-normal--*-*-*-*-*-*-*-*,*-*-*-r-normal--*-*-*-*-*-*-*-*,*\"
|
||||
MenuTextFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*,-*-kodig-medium-r-normal--14-*-*-*-*-*-*-*,*-*-medium-r-normal--12-*-*-*-*-*-*-*,*-*-medium-r-normal--*-*-*-*-*-*-*-*,*-*-*-r-normal--*-*-*-*-*-*-*-*,*\"
|
||||
IconTitleFont=\"-*-helvetica-medium-r-normal-*-8-*-*-*-*-*-*-*,-*-kodig-medium-r-normal--10-*-*-*-*-*-*-*,*-*-medium-r-normal--10-*-*-*-*-*-*-*,*-*-medium-r-normal--*-*-*-*-*-*-*-*,*-*-*-r-normal--*-*-*-*-*-*-*-*,*\"
|
||||
ClipTitleFont=\"-*-helvetica-bold-r-normal-*-10-*-*-*-*-*-*-*,-*-kodig-medium-r-normal--10-*-*-*-*-*-*-*,*-*-medium-r-normal--10-*-*-*-*-*-*-*,*-*-medium-r-normal--*-*-*-*-*-*-*-*,*-*-*-r-normal--*-*-*-*-*-*-*-*,*\"
|
||||
DisplayFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*,-*-kodig-medium-r-normal--12-*-*-*-*-*-*-*,*-*-medium-r-normal--12-*-*-*-*-*-*-*,*-*-medium-r-normal--*-*-*-*-*-*-*-*,*-*-*-r-normal--*-*-*-*-*-*-*-*,*\"
|
||||
LargeDisplayFont=\"-*-helvetica-bold-r-normal-*-24-*-*-*-*-*-*-*,-*-kodig-bold-r-normal--24-*-*-*-*-*-*-*,-*-*-medium-r-normal--24-*-*-*-*-*-*-*,*-*-bold-r-normal-*-24-*-*-*-*-*-*-*,*-*-*-*-*--24-*-*-*-*-*-*-*,*\"
|
||||
;;
|
||||
korean2)
|
||||
SystemFont=\"-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-medium-r-normal-*-%d-*,-*-medium-r-normal-*\"
|
||||
BoldSystemFont=\"-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-medium-r-normal-*-%d-*,-*-medium-r-normal-*\"
|
||||
WindowTitleFont=\"7x14,-*-gothic-medium-r-normal-*-16-*-*-*-*-*-ksc5601.1987-*\"
|
||||
MenuTitleFont=\"7x14,-*-gothic-medium-r-normal-*-16-*-*-*-*-*-ksc5601.1987-*\"
|
||||
MenuTextFont=\"7x14,-*-gothic-medium-r-normal-*-16-*-*-*-*-*-ksc5601.1987-*\"
|
||||
IconTitleFont=\"-*-helvetica-medium-r-normal-*-10-*-*-*-*-*-*-*,-*-gothic-medium-r-normal-*-12-*-*-*-*-*-ksc5601.1987-*\"
|
||||
ClipTitleFont=\"-*-helvetica-bold-r-normal-*-10-*-*-*-*-*-*-*,-*-gothic-medium-r-normal-*-12-*-*-*-*-*-ksc5601.1987-*\"
|
||||
DisplayFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*,-*-gothic-medium-r-normal-*-16-*-*-*-*-*-ksc5601.1987-*\"
|
||||
LargeDisplayFont=\"-*-helvetica-bold-r-normal-*-24-*-*-*-*-*-*-*,-*-medium-r-normal-*-24-*,-*-medium-r-normal-*\"
|
||||
;;
|
||||
*)
|
||||
echo "NOTICE:"
|
||||
echo "Sorry I don't know appropriate font configuration for \"$1\""
|
||||
echo "please let me know your settings for SystemFont,BoldSystemFont,"
|
||||
echo "WindowTitleFont,MenuTitleFont,IconTitleFont,ClipTitleFont,and"
|
||||
echo "DisplayFont thanks"
|
||||
echo "and please let me know also the URL of the fonts to download"
|
||||
echo "if your language need some special fonts not included in "
|
||||
echo "X11R6/XFree."
|
||||
echo "mail-to: manome@itlb.te.noda.sut.ac.jp"
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
#
|
||||
# setting fonts
|
||||
################################################################################
|
||||
# You should make changes only in this area
|
||||
# (or it is not what I wanted it to be...)
|
||||
#
|
||||
|
||||
echo "Setting up ~/GNUstep/Defaults/WMGLOBAL..."
|
||||
#
|
||||
# For --auto and --locale= switch...
|
||||
#
|
||||
all_codings="latin1 latin2 greek japanese korean2 russian"
|
||||
latin1="ca da de gl nl fi fr de is it no pt es sv se"
|
||||
latin2="hr cz cs hu pl ro sk sl"
|
||||
greek="el"
|
||||
japanese="ja"
|
||||
korean2="ko"
|
||||
russian="ru bg"
|
||||
|
||||
$WDWRITE WMGLOBAL SystemFont "$SystemFont"
|
||||
$WDWRITE WMGLOBAL BoldSystemFont "$BoldSystemFont"
|
||||
#
|
||||
# These are lists of all domains and keys we're gonna change...
|
||||
#
|
||||
DomainNames="WMGLOBAL WindowMaker"
|
||||
DomainWMGLOBAL="SystemFont BoldSystemFont MultiByteText"
|
||||
DomainWindowMaker="WindowTitleFont MenuTitleFont MenuTextFont IconTitleFont ClipTitleFont DisplayFont"
|
||||
|
||||
echo
|
||||
echo " SystemFont=$SystemFont"
|
||||
echo " BoldSystemFont=$BoldSystemFont"
|
||||
echo
|
||||
echo "Setting up ~/GNUstep/Defaults/WindowMaker..."
|
||||
for i in $DomainNames; do
|
||||
tmp="Domain$i"
|
||||
AllKeys="$AllKeys ${!tmp}"
|
||||
done
|
||||
|
||||
$WDWRITE WindowMaker WindowTitleFont "$WindowTitleFont"
|
||||
$WDWRITE WindowMaker MenuTitleFont "$MenuTitleFont"
|
||||
$WDWRITE WindowMaker MenuTextFont "$MenuTextFont"
|
||||
$WDWRITE WindowMaker IconTitleFont "$IconTitleFont"
|
||||
$WDWRITE WindowMaker ClipTitleFont "$ClipTitleFont"
|
||||
$WDWRITE WindowMaker DisplayFont "$DisplayFont"
|
||||
$WDWRITE WindowMaker LargeDisplayFont "$LargeDisplayFont"
|
||||
#
|
||||
# Items that don't need to have coding string appended ( = not fonts).
|
||||
#
|
||||
NotFont="MultiByteText"
|
||||
|
||||
#
|
||||
# Elements of $NodefUnable will always have fonts set to defaults, while those
|
||||
# of $NonedefAble will have changed only coding part of font name (if --nodef
|
||||
# command line argument is used).
|
||||
#
|
||||
NodefAble="default latin1 latin2 greek russian"
|
||||
NodefUnable="japanese korean korean2"
|
||||
Supported="$NodefAble $NodefUnable"
|
||||
|
||||
defaultCoding="*-*"
|
||||
latin1Coding="iso8859-1"
|
||||
latin2Coding="iso8859-2"
|
||||
greekCoding="iso8859-7"
|
||||
russianCoding="koi8-r"
|
||||
|
||||
defaultMultiByteText="AUTO"
|
||||
latin1MultiByteText="NO"
|
||||
latin2MultiByteText="YES"
|
||||
greekMultiByteText="YES"
|
||||
russianMultiByteText="YES"
|
||||
|
||||
#
|
||||
# Default WindowMaker fonts for NodefAble font families (part telling us
|
||||
# the font coding will be added automaticly from *Coding).
|
||||
#
|
||||
DefaultSystemFont="-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-"
|
||||
DefaultBoldSystemFont="-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-"
|
||||
DefaultWindowTitleFont="-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-"
|
||||
DefaultMenuTitleFont="-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-"
|
||||
DefaultMenuTextFont="-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-"
|
||||
DefaultIconTitleFont="-*-helvetica-medium-r-normal-*-8-*-*-*-*-*-"
|
||||
DefaultClipTitleFont="-*-helvetica-bold-r-normal-*-10-*-*-*-*-*-"
|
||||
DefaultDisplayFont="-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-"
|
||||
DefaultMultiByteText="AUTO"
|
||||
|
||||
#
|
||||
# NodefUnable have to give full font descriptions...
|
||||
#
|
||||
japaneseSystemFont=\"-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-%d-*,-*-*-medium-r-normal-*-*-*\"
|
||||
japaneseBoldSystemFont=\"-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-%d-*,-*-*-medium-r-normal-*-*-*\"
|
||||
japaneseWindowTitleFont=\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-14-*,-*-*-medium-r-normal-*-*-*\"
|
||||
japaneseMenuTitleFont=\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-14-*,-*-*-medium-r-normal-*-*-*\"
|
||||
japaneseMenuTextFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-14-*,-*-*-medium-r-normal-*-*-*\"
|
||||
japaneseIconTitleFont=\"-*-helvetica-medium-r-normal-*-8-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-12-*,-*-*-medium-r-normal-*-*-*\"
|
||||
japaneseClipTitleFont=\"-*-helvetica-bold-r-normal-*-10-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-12-*,-*-*-medium-r-normal-*-*-*\"
|
||||
japaneseDisplayFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-14-*,-*-*-medium-r-normal-*-*-*\"
|
||||
japaneseMultiByteText="YES"
|
||||
|
||||
koreanSystemFont=\"-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-kodig-medium-r-normal--%d-*-*-*-*-*-*-*,*-*-medium-r-normal-*-%d-*-*-*-*-*-*-*,*-*-*-*-*--%d-*-*-*-*-*-*-*,*\"
|
||||
koreanBoldSystemFont=\"-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-kodig-bold-r-normal--%d-*-*-*-*-*-*-*,-*-kodig-medium-r-normal--%d-*-*-*-*-*-*-*,*-*-bold-r-normal-*-%d-*-*-*-*-*-*-*,*-*-*-*-*--%d-*-*-*-*-*-*-*,*\"
|
||||
koreanWindowTitleFont=\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*,-*-kodig-medium-r-normal--12-*-*-*-*-*-*-*,-*-*-medium-r-normal--12-*-*-*-*-*-*-*,-*-*-medium-r-normal--*-*-*-*-*-*-*-*,-*-*-*-r-normal--*-*-*-*-*-*-*-*,-*-*-*-*-*--*-*-*-*-*-*-*-*,*\"
|
||||
koreanMenuTitleFont=\"-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*,-*-kodig-medium-r-normal--14-*-*-*-*-*-*-*,-*-*-medium-r-normal--12-*-*-*-*-*-*-*,*-*-medium-r-normal--*-*-*-*-*-*-*-*,*-*-*-r-normal--*-*-*-*-*-*-*-*,*\"
|
||||
koreanMenuTextFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*,-*-kodig-medium-r-normal--14-*-*-*-*-*-*-*,*-*-medium-r-normal--12-*-*-*-*-*-*-*,*-*-medium-r-normal--*-*-*-*-*-*-*-*,*-*-*-r-normal--*-*-*-*-*-*-*-*,*\"
|
||||
koreanIconTitleFont=\"-*-helvetica-medium-r-normal-*-8-*-*-*-*-*-*-*,-*-kodig-medium-r-normal--10-*-*-*-*-*-*-*,*-*-medium-r-normal--10-*-*-*-*-*-*-*,*-*-medium-r-normal--*-*-*-*-*-*-*-*,*-*-*-r-normal--*-*-*-*-*-*-*-*,*\"
|
||||
koreanClipTitleFont=\"-*-helvetica-bold-r-normal-*-10-*-*-*-*-*-*-*,-*-kodig-medium-r-normal--10-*-*-*-*-*-*-*,*-*-medium-r-normal--10-*-*-*-*-*-*-*,*-*-medium-r-normal--*-*-*-*-*-*-*-*,*-*-*-r-normal--*-*-*-*-*-*-*-*,*\"
|
||||
koreanDisplayFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*,-*-kodig-medium-r-normal--12-*-*-*-*-*-*-*,*-*-medium-r-normal--12-*-*-*-*-*-*-*,*-*-medium-r-normal--*-*-*-*-*-*-*-*,*-*-*-r-normal--*-*-*-*-*-*-*-*,*\"
|
||||
koreanMultiByteText="YES"
|
||||
|
||||
korean2SystemFont=\"-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-medium-r-normal-*-%d-*,-*-medium-r-normal-*\"
|
||||
korean2BoldSystemFont=\"-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-medium-r-normal-*-%d-*,-*-medium-r-normal-*\"
|
||||
korean2WindowTitleFont=\"7x14,-*-gothic-medium-r-normal-*-16-*-*-*-*-*-ksc5601.1987-*\"
|
||||
korean2MenuTitleFont=\"7x14,-*-gothic-medium-r-normal-*-16-*-*-*-*-*-ksc5601.1987-*\"
|
||||
korean2MenuTextFont=\"7x14,-*-gothic-medium-r-normal-*-16-*-*-*-*-*-ksc5601.1987-*\"
|
||||
korean2IconTitleFont=\"-*-helvetica-medium-r-normal-*-10-*-*-*-*-*-*-*,-*-gothic-medium-r-normal-*-12-*-*-*-*-*-ksc5601.1987-*\"
|
||||
korean2ClipTitleFont=\"-*-helvetica-bold-r-normal-*-10-*-*-*-*-*-*-*,-*-gothic-medium-r-normal-*-12-*-*-*-*-*-ksc5601.1987-*\"
|
||||
korean2DisplayFont=\"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*,-*-gothic-medium-r-normal-*-16-*-*-*-*-*-ksc5601.1987-*\"
|
||||
korean2MultiByteText="YES"
|
||||
|
||||
#
|
||||
# End of area meant to hold everything you could need to modify...
|
||||
################################################################################
|
||||
|
||||
#
|
||||
# Get current locale automaticaly (--auto).
|
||||
#
|
||||
if [ -z "$family" ]; then
|
||||
if [ -n "$new_locale" ]; then
|
||||
locale="$new_locale"
|
||||
else
|
||||
locale=$LANG
|
||||
if [ -z "$locale" ]; then
|
||||
locale=$LC_ALL
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$locale" ]; then
|
||||
family="default"
|
||||
else
|
||||
for i in $all_codings; do
|
||||
for j in ${!i}; do
|
||||
if [ "$j" == "${locale%_*}" ]; then
|
||||
family="$i"
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Do we recognize passed coding?
|
||||
#
|
||||
is_supported=""
|
||||
for i in $Supported; do
|
||||
if test "$family" == "$i"; then
|
||||
is_supported="YES"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$is_supported"; then # unknown coding
|
||||
echo -e "\n"\
|
||||
"Sorry, font coding $family or locale $locale not recognized.\n"\
|
||||
"Type $PROGRAM with no arguments for list of supported font codings...\n"\
|
||||
"" >/dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Nodef is supported only for elements of $NodefAble.
|
||||
#
|
||||
is_nodef_unable=""
|
||||
for i in $NodefUnable; do
|
||||
if test "$family" == "$i"; then
|
||||
if test -n "$nodef"; then # --nodef with one from $NodefUnable
|
||||
echo -e "\n"\
|
||||
"Sorry, --nodef argument is not allowed for these font codings:\n"\
|
||||
" $NodefUnable\n"\
|
||||
"Run $PROGRAM without --nodef argument to set default fonts for your\n"\
|
||||
"font coding.\n"\
|
||||
"" >/dev/stderr
|
||||
exit 1
|
||||
else
|
||||
is_nodef_unable="YES"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
#
|
||||
# The real work...
|
||||
#
|
||||
if test -z "$nodef"; then
|
||||
for i in $AllKeys; do
|
||||
if test -n "$is_nodef_unable"; then # japanese,... defaults
|
||||
tmp="$family$i"
|
||||
eval $i=${!tmp}
|
||||
else # rest, load defaults
|
||||
not_font=""
|
||||
for j in $NotFont; do
|
||||
if test "$i" == "$j"; then
|
||||
not_font="YES"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -n "$not_font"; then # don't append coding (not default!)
|
||||
tmp="${family}$i"
|
||||
eval $i="${!tmp}"
|
||||
else # append coding
|
||||
tmp="Default$i"
|
||||
tmp1="${family}Coding"
|
||||
eval $i="${!tmp}${!tmp1}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo -e "\n"\
|
||||
"You used --nodef command line argument. You should note, that this\n"\
|
||||
"works with these font codings only:\n"\
|
||||
" $NodefAble\n"\
|
||||
"You should not use it to change fonts from other font codings than\n"\
|
||||
"those listed above. If your WindowMaker does not appear to find fonts,\n"\
|
||||
"you should run $PROGRAM once again without --nodef argument." >/dev/stderr
|
||||
fi
|
||||
|
||||
#
|
||||
# Ok, in the following, `i' will be the domain file name,
|
||||
# `j' is the actual key in that file we try to change...
|
||||
#
|
||||
for i in $DomainNames; do
|
||||
echo
|
||||
echo "Setting up $i domain file..."
|
||||
tmp="Domain$i"
|
||||
for j in ${!tmp}; do
|
||||
if test -n "$nodef"; then # --nodef, change coding only
|
||||
not_font=""
|
||||
for k in $NotFont; do
|
||||
if test "$k" == "$j"; then
|
||||
not_font="YES"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if test -n "$not_font"; then # don't append coding
|
||||
tmp1="${family}$j"
|
||||
eval $j=${!tmp1}
|
||||
else # append coding
|
||||
#TODO:make this funny sed script a lot smarter to let us make changes in font
|
||||
# lists, etc... (then we can enable --nodef for NodefUnable codings)
|
||||
#TODO:better (or at least any) check, whether wmaker is installed...
|
||||
tmp1="${family}Coding"
|
||||
eval $j=$($WDREAD $i $j | sed -e "s/\(^-.*-\).*-.*$/\1${!tmp1}/g")
|
||||
if test -z "${!j}"; then # failed, load default
|
||||
tmp2="Default$j"
|
||||
eval $j=${!tmp2}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
tmp1="$j=\"${!j}\"" # cosmetic length workaround
|
||||
if (( ${#tmp1} > 80 )); then
|
||||
tmp1=$(echo "${tmp1:0:76}...\"")
|
||||
fi
|
||||
echo "$tmp1"
|
||||
$WDWRITE $i $j \"${!j}\"
|
||||
done
|
||||
done
|
||||
echo
|
||||
echo "WindowTitleFont=$WindowTitleFont"
|
||||
echo "MenuTitleFont=$MenuTitleFont"
|
||||
echo "MenuTextFont=$MenuTextFont"
|
||||
echo "IconTitleFont=$IconTitleFont"
|
||||
echo "ClipTitleFont=$ClipTitleFont"
|
||||
echo "DisplayFont=$DisplayFont"
|
||||
echo "LargeDisplayFont=$LargeDisplayFont"
|
||||
echo
|
||||
echo "Done."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user