68

In many cases Windows programs run ok in Wine, but there is still the annoying problem of their appearance.

How to make things look better in Wine, especially fonts?

Adam
  • 21

7 Answers7

87

The solution below is to be considered in the context of the progress made by playonlinux - which now is very much able to provide out of the box, at least for the programs considered when this answer was first posted, like foobar2000, the needed tweaks for best GUI appearance of Wine applications.

If you don't like Playonlinux and only use Wine directly feel free to comment and/or edit this answer on Wine-only issues.

Considering GTK theming in Wine: see last part of this answer.


  • The most important improvement concerning fonts is to enable font smoothing - save script below as winefontssmoothing_en.sh and run in Terminal using command bash winefontssmoothing_en.sh:
#!/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

select third option in terminal - with the arrows, then use tab key to select ok and 'enter'

winefontssmoothing_en.sh dialog

(source here)

  • For a better system appearance install a windows msstyle file in winecfg (Wine/Configure Wine/Desktop Integration) like "Luna", or "Royale".

enter image description here

  • Increase the screen resolution in winecfg (Wine/Configure Wine/Graphics), which will make general details (including fonts) larger (if that's what you need: on my laptop appearance details of wine programs are too small by default)

enter image description here

But the images above are taken after enabling font smoothing. That is the most important action, as I was able to test. As I had to reinstall Wine at some point, I also had to restart all procedures here. Using all the other solutions (including installing all fonts as suggested in Shauna's answer - which is very advisable, and to be considered as a part of the solution to this question) -- with the exception of font smoothing, Foobar2000 looked like so:

enter image description here

After font smoothing:

enter image description here

Important: Changing settings in winecfg may reset font smoothing, so it is better to run that in the end, or re-enable it when fonts seem ugly.


Considering GTK theming in Wine

(mentioned by this more recent answer), the results may vary depending on the Linux desktop and the different applications. The GTK theming in Wine seems a matter of preference as it is debatable whether a GTK theme on a Windows program looks better than a Windows-theming.

Example for Foobar2000:

In Ubuntu:

enter image description here

In elementaryOS:

enter image description here

Not much improvement compared to msstyle Luna by default in Playonlinux:

enter image description here

In Playonlinux GTK theming seems absent even with the latest Wine-staging version available, as adding a Wine-staging version to a virtual drive in Playonlinux , the "Staging" tab appears in Wine configuration for that drive, but "Enable GTK Theming" is grayed-out.

That is because what is needed is not any staging version of wine, but the winehq-stagingpackage, which cannot be installed in Playonlinux.

UPDATE: I see that in later versions of Playonlinux, at the date of this edit (Nov.2018) the staging versions of wine in Playonlinux do not display at all the greyed-out gtk option mentioned above.

  • 1
    How do you select the Luna theme? – Sparhawk Oct 29 '13 at 01:38
  • 1
    @Sparhawk - After downloading the msstyle file and installing it, select it from under 'Theme' - look to the image –  Oct 29 '13 at 12:43
  • 1
    Sorry, I wasn't clear. I meant from where do you get the file. I wasn't sure if it was downloaded (I couldn't find it anyway) or from a Windows installation disk, etc. – Sparhawk Oct 29 '13 at 12:52
  • 1
    @Sparhawk - look for an xp theme and in the archive look for the msstyles file - to download go to softpedia or something - Royale theme here. you might also look into other xp themes –  Oct 29 '13 at 14:23
  • did anyone ever figure out how to enlarge the fonts on the GUI? I could make the dialog box fonts larger, but was never able to get the GUI DPI setting any higher./ – Kalamalka Kid Mar 28 '14 at 09:40
  • @KalamalkaKid - that varies between windows apps I guess. Increasing the DPI as indicated in this image provides changes in many but not all cases. –  Jun 20 '14 at 12:43
  • Wow. I just listened to the Beatles in foobar2000 with a similar color scheme. And I thought 'WTF, a fresh Arch install and got a virus already!' :D https://dropbox.com/s/pfu5l6j8xozcgox/snapshot1.png – Dmitry Fedorkov Dec 02 '14 at 19:44
  • 1
    tell me some more themes like LUNA to download – Pankaj Kumar Gautam Jan 05 '17 at 14:53
  • 1
    @PankajGautam - From my experience, of all the msstyles, Luna (used by default in Playonlinux) and its variations (Zune, Royal Noir) is the only one that improves the appearance, the rest are worst than nothing –  Jan 06 '17 at 10:40
  • @cipricus- I appreciate your knowledge, I will try all 3 of them – Pankaj Kumar Gautam Jan 06 '17 at 16:54
  • @PankajGautam ~ In fact the answer is a bit outdated in the sense that I have only used Playonlinux the last 2-3 years, therefore I have mentioned PoL at the beginning of my answer. If you don't like that and only use Wine directly feel free to comment and/or edit this answer on Wine-only issues. –  Jan 08 '17 at 15:26
  • I don't remember I needed to use Font Smoothing all those years (a decade or so!) and I still enjoyed the appearance as shown in the picture above (with font smoothing). But the other day I needed to do a fresh install of my whole system (Ubuntu 16.04 + wine 1.6) keeping the Home partition, and suddenly I came up with this problem - which doesn't go away even when I applied each and every font smoothing option, via this script and via Winetricks, under Wine or PlayOnLinux!!! I checked the user.reg file and the settings are there, so what the hell is going on I wonder - any ideas please??? :-( – Sadi Mar 13 '18 at 07:50
  • 2
    @Sadi - This seems a separate question - you should post it separately with all details, link here, Wine and Playonliniux versions etc. I have not used that script for a long time either, as in the few couple of years Playonlinux does it by default, maybe wine too. –  Mar 13 '18 at 13:42
  • @cipricus Thanks, I can confirm that Wine also does it by default, and it seems that this problem does not affect a 64-bit wine prefix, but only a 32-bit one which I normally use. So probably this is a recent bug :-( – Sadi Mar 14 '18 at 15:45
33

Make sure to install the fonts:

winetricks allfonts

Font issues are generally due to the program using TrueType fonts that don't come with Linux or Wine. Installing them via Winetricks (which comes with current versions of Wine), should solve your font problem.

Shauna
  • 3,024
  • Running palemoon portable in Wine 1.9.23 (Fedora). It needed the allfonts to show bolded text properly. It kept breaking on some Android font, but the ones that had been installed made everything look correct. – bgStack15 Dec 17 '16 at 19:31
8

First of all... This section helped me configure Wine to get the right appearance for Photoshop CS6.

Sometimes winetricks allfonts doesn't work very well. Occasionally you may receive errors on the SHA1 sum for some fonts if they are updated and not yet reflected in the winetricks script.

The current winetricks version in the repos for the Droid Font points to http://android.git.kernel.org which is currently down due to hackers so:

sudo gedit /usr/bin/winetricks

Look for something like this:

load_droid()
{
# See http://en.wikipedia.org/wiki/Droid_(font)

And change DROID_URL around line 6867 to:

DROID_URL='https://www.codeaurora.org/gitweb/quic/la/?p=platform/frameworks/base.git;a=blob_plain;f=data/fonts/'

I also had to change the SHA1 sum for font "Droid Sans Fallback" located around line 6059 to:

do_droid DroidSansFallback.ttf     "Droid Sans Fallback"     2f8a266389a8e22f68f402b775731eec6b760334

If you receive any other error find the offending "font-name" and calculate the new SHA1 and amend the value in winetricks:

cd ~/.cache/winetricks/font-folder
sha1sum font-name
sudo gedit /usr/bin/winetricks

And change the value with new calculation!

This tip works with Elementary OS too. But you need to change gedit and use scratch-text-editor.

8

For a better system appearance install a windows msstyle file in winecfg (Wine/Configure Wine/Desktop Integration) like "Luna", or "Royale".

I don't have the reputation to comment the accepted answer, so I will put my comment here.

Another official msstyle file from MS servers.

Zune Theme from Microsoft.com

Just installed the .msi file and I was able to select 'Zune Style' from Wine Configuration dialog.

plremis
  • 81
5

Wine-staging now has an option for GTK theming. To use it:

1. First, install winehq-staging:

From https://wiki.winehq.org/Ubuntu:

  1. If your system is 64 bit, enable 32 bit architecture (if you haven't already):

    sudo dpkg --add-architecture i386
    
  2. Add the repository:

    • For Ubuntu 18.10:

      wget -nc https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Ubuntu_18.10_standard/Release.key
      sudo apt-key add Release.key
      sudo apt-add-repository 'deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Ubuntu_18.10_standard ./'
      
    • For Ubuntu versions prior to 18.10:

      wget -nc https://dl.winehq.org/wine-builds/Release.key
      sudo apt-key add Release.key
      sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/
      
  3. Update the package list:

    sudo apt-get update
    
  4. Then install:

    sudo apt-get install --install-recommends winehq-staging
    

    If apt-get complains about missing dependencies, install them, then repeat the last two steps (update and install).

2. Enable GTK theming:

  1. Open winecfg
  2. Click the "Staging" tab
  3. Check "Enable GTK Theming"
  4. Click OK

3. Enable font smoothing:

Improve GUI appearance of Wine applications

QwertyChouskie
  • 2,344
  • 1
  • 16
  • 30
  • is GTK theming also useful in KDE or just in GTK-based desktops? –  Apr 20 '16 at 08:08
  • 1
    All themes should provide GTK versions, even if you are using a desktop environment that does not primarily use GTK. – QwertyChouskie Apr 21 '16 at 01:36
  • Do you know if that is available in Playonlinux too? Adding a Wine-staging version to a virtual drive in Playonlinux , the "Staging" tab appears in Wine configuration for that drive, but "Enable GTK Theming" is grayed-out. –  Apr 22 '16 at 14:41
  • I personally don't use POL, so I don't know. I recommend opening a new question. – QwertyChouskie Apr 22 '16 at 17:54
  • I have created a new question. I see that what is needed in your solution is both wine-staging and winehq-staging. What is the latter? - It needs and installs the former in order to work, but I don't think Playonlinux installs it and that may be the problem. –  Apr 22 '16 at 20:34
  • From the package description: This compatibility package allows to use wine-staging system-wide as the default Wine version. – QwertyChouskie Apr 22 '16 at 23:25
4

cipricus answer above is excellent and very thorough. However there is another factor that impacts font quality, rendering by FreeType.

As solved here and discussed here, changing the rendering version can revert to readable fonts.

Add this prefix on the line that starts your wine application

FREETYPE_PROPERTIES="truetype:interpreter-version=35"

eg

FREETYPE_PROPERTIES="truetype:interpreter-version=35" wine cmd

David McNeill
  • 356
  • 2
  • 7
  • 1
    I am glad my old answer may still prove useful, although I am not using it anymore, as for my present needs simply installing Windows programs in Playonlinux seems to provide out of the box what I was striving to achieve here. –  Apr 15 '18 at 10:03
  • only this answer solved issue to me! – Stefano Aug 13 '18 at 14:04
0

Script in the topmost post by user47206 (or, to be more precise, a solution derived from the script) didn't work for me, because regedit in a Wine prefix failed to find the file in the native filesystem. A more robust solution -- if you understand what you do (and don't need a GUI dialog) -- is to enable antialiasing by modifing the registry directly:

$ env WINEPREFIX=~/.wine/<prefix> wine reg add "HKCU\Control Panel\Desktop" /v FontSmoothing /t REG_SZ /d 2 /f

$ env WINEPREFIX=~/.wine/<prefix> wine reg add "HKCU\Control Panel\Desktop" /v FontSmoothingGamma /t REG_DWORD /d 0x578 /f

$ env WINEPREFIX=~/.wine/<prefix> wine reg add "HKCU\Control Panel\Desktop" /v FontSmoothingOrientation /t REG_DWORD /d 1 /f

$ env WINEPREFIX=~/.wine/<prefix> wine reg add "HKCU\Control Panel\Desktop" /v FontSmoothingType /t REG_DWORD /d 2 /f

One can also check the settings this way:

$ env WINEPREFIX=~/.wine/<prefix> wine reg query "HKCU\Control Panel\Desktop" | grep FontSmoothing
Trudy
  • 180
  • 1
  • 7