2 # Quick and dirty script for configuring wine font smoothing
4 # Author: Igor Tarasov <tarasov.igor@gmail.com>
7 WINEPREFIX
=${WINEPREFIX:-$HOME/.wine}
10 if [ ! -x "`which "$WINE"`" ]
12 echo "Wine was not found. Is it really installed? ($WINE)"
16 if [ ! -x "`which "$DIALOG"`" ]
21 TMPFILE
=`mktemp` ||
exit 1
24 "Please select font smoothing mode for wine programs:" 13 51\
26 1 "Smoothing disabled"\
27 2 "Grayscale smoothing"\
28 3 "Subpixel smoothing (ClearType) RGB"\
29 4 "Subpixel smoothing (ClearType) BGR" 2> $TMPFILE
40 MODE
=0 # 0 = disabled; 2 = enabled
41 TYPE
=0 # 1 = regular; 2 = subpixel
42 ORIENTATION
=1 # 0 = BGR; 1 = RGB
51 3) # enable cleartype rgb
55 4) # enable cleartype bgr
62 echo Unexpected option
: $ANSWER
69 [HKEY_CURRENT_USER\Control Panel\Desktop]
70 \"FontSmoothing\"=\"$MODE\"
71 \"FontSmoothingOrientation\"=dword:0000000$ORIENTATION
72 \"FontSmoothingType\"=dword:0000000$TYPE
73 \"FontSmoothingGamma\"=dword:00000578" > $TMPFILE
75 echo -n "Updating configuration... "
77 $WINE regedit
$TMPFILE 2> /dev
/null