28

Fonts in some Wine applications (Word 2007 for example) are heavily aliased. How do I turn on anti aliasing for Wine applications?

dv3500ea
  • 37,754
richzilla
  • 12,205

3 Answers3

33

The easiest way is through winetricks

mkdir ~/bin
cd ~/bin
wget http://winetricks.org/winetricks
chmod +x ./winetricks

winetricks fontsmooth-rgb

In newer version of winetricks the command to use is

winetricks settings fontsmooth=rgb

There are other LCD pixel orders available. You can read about them and the rest of the impressive winetricks feature list on its WineHQ site.

stephenmyall
  • 9,895
Oli
  • 299,936
  • 7
    winetricks is also available through apt – RolandiXor Mar 08 '11 at 18:28
  • @Roland it is but I can't attest to which version it is. Though the logic doesn't apply to something as simple as this, winetricks is one of those things you want to keep as recent as possible if you're following install guides that use it heavily. – Oli Mar 08 '11 at 18:38
  • 1
    The wine ppa has updated versions :D, so you can use that as an additional option ^^ – RolandiXor Mar 08 '11 at 18:40
  • This no longer does anything for me. Wine-9.0, winetricks 20240105-next. – kontextify Apr 14 '24 at 07:21
  • @kontextify Can you be a bit more explicit? It's been a while but the code is still in winetricks and Wine font rendering hasn't changed that much either. Are you sure you're applying it to the wine prefix you're running the application from? – Oli Apr 19 '24 at 10:25
  • @Oli 100% sure, and other "verbs" do work. This one runs without errors but text is still blocky in all my programs. I also tried the other fontsmooth options, no effect. I see a warning about 64 bit WINEPREFIX, could that be it? I had this working perfectly in a previous 64 bit setup before. – kontextify Apr 21 '24 at 05:49
8

Just adding details to Oli's answer for those who need it: what winetricks settings fontsmooth=rgb actually does is creating and importing a registry file with the following content:

REGEDIT4

[HKEY_CURRENT_USER\Control Panel\Desktop]
"FontSmoothing"="2"
"FontSmoothingGamma"=dword:00000578
"FontSmoothingOrientation"=dword:00000001
"FontSmoothingType"=dword:00000002

Once you saved it as fontsmoothing.reg you can import it with:

wine regedit fontsmoothing.reg
ccpizza
  • 1,568
  • 19
  • 20
  • 3
    why isn't it the default? – Jay _silly_evarlast_ Wren Nov 11 '17 at 22:30
  • 2
    As of today there are several options for fontsmooth, namely bgr, disable, gray and rgb . Default values are "FontSmoothing"=2 , "FontSmoothingGamma"=dword:0x0 , "FontSmoothingOrientation"=dword:0x1, "FontSmoothingType"=dword:0x1, so only "FontSmoothingGamma" and "FontSmoothingType" get updated in the option fontsmooth=rgb – Pau Coma Ramirez Feb 14 '21 at 11:20
3

An alternative method with no relation on a temp file:

$ 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

Verify that the changes are applied successfully:

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