2

I run Evernote under wine on two Linux computers. They show different font appearances:

Font rendering comparison

Left: LMDE 64-bit (already dist-upgrade to Debian testing but keep LMDE adjustments) + MATE; Right: Ubuntu 14.04 LTS 64-bit + Unity

  • Each wine is from the distro's default repository, with the same version 1.6.2.
  • Both wine configs are default, except replacing the font families under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes with "Droid Sans Fallback" in order to display Chinese.
  • I didn't change Ubuntu appearance or font settings; fonts in other apps look perfect.
  • I have tried to copy the entire $HOME/.wine directory from LMDE and run on Ubuntu, but it didn't improve. That means wine config should not be the problem source?

The fonts look much better on LMDE, and I like to know how to make those on Ubuntu look the same? What did LMDE do/adjust?

MadMike
  • 4,275
  • 8
  • 29
  • 50

2 Answers2

1

In those two samples it looks like the font rendering algorithm is the same, one is just much darker than the other (and the darker one looks, to me, better).

This would be font smoothing "gamma" - gamma controlling how light/dark the partially lit pixels are adjusted.

Both the two following articles recommending setting font smoothing in Wine using regedit (yes, Wine maintains a Windows-style registry and has its own regedit.exe).

Run regedit.exe and adjust the following keys in [HKEY_CURRENT_USER\Control Panel\Desktop] to these values:

"FontSmoothing"="2"
"FontSmoothingType"=dword:00000002
"FontSmoothingGamma"=dword:00000578
"FontSmoothingOrientation"=dword:00000001

Articles:

thomasrutter
  • 37,804
0

I had exactly the same problem as you and my test was Evernote too. After following the guide in Improve GUI appearance of Wine applications my problem is solved.

Basicaly:

wget http://files.polosatus.ru/winefontssmoothing_en.sh

bash winefontssmoothing_en.sh

Select third option in terminal - with the arrows, then use tab key to select ok and 'enter' (source: here)


This is the script linked to above:

#!/bin/sh
# Quick and dirty script for configuring wine font smoothing
#
# Author: Igor Tarasov <tarasov.igor@gmail.com>

WINE=${WINE:-wine}
WINEPREFIX=${WINEPREFIX:-$HOME/.wine}
DIALOG=whiptail

if [ ! -x "`which "$WINE"`" ]
then
    echo "Wine was not found. Is it really installed? ($WINE)"
    exit 1
fi

if [ ! -x "`which "$DIALOG"`" ]
then
    DIALOG=dialog
fi

TMPFILE=`mktemp` || exit 1

$DIALOG --menu \
    "Please select font smoothing mode for wine programs:" 13 51\
    4\
        1 "Smoothing disabled"\
        2 "Grayscale smoothing"\
        3 "Subpixel smoothing (ClearType) RGB"\
        4 "Subpixel smoothing (ClearType) BGR" 2> $TMPFILE

STATUS=$?
ANSWER=`cat $TMPFILE`

if [ $STATUS != 0 ]
then 
    rm -f $TMPFILE
    exit 1
fi

MODE=0 # 0 = disabled; 2 = enabled
TYPE=0 # 1 = regular;  2 = subpixel
ORIENTATION=1 # 0 = BGR; 1 = RGB

case $ANSWER in
    1) # disable
        ;;
    2) # enable
        MODE=2
        TYPE=1
        ;;
    3) # enable cleartype rgb
        MODE=2
        TYPE=2
        ;;
    4) # enable cleartype bgr
        MODE=2
        TYPE=2
        ORIENTATION=0
        ;;
    *)
        rm -f $TMPFILE
        echo Unexpected option: $ANSWER
        exit 1
        ;;
esac

echo "REGEDIT4

[HKEY_CURRENT_USER\Control Panel\Desktop]
\"FontSmoothing\"=\"$MODE\"
\"FontSmoothingOrientation\"=dword:0000000$ORIENTATION
\"FontSmoothingType\"=dword:0000000$TYPE
\"FontSmoothingGamma\"=dword:00000578" > $TMPFILE

echo -n "Updating configuration... "

$WINE regedit $TMPFILE 2> /dev/null

rm -f $TMPFILE

echo ok