make wine UI fonts look good



Reaction score: 12
Messages: 81

For some strange reason, the last few versions of wine have horrible looking UI fonts: menus and dialog boxes have no smoothing, but the text within a window does. I've tested on FreeBSD wine 3.03
and Linux wine 3.20 and the problem is present on both.

If you search, you will probably find suggested fixes that involve messing with the windows registry or installing heaps of fonts through the winetricks script.
However before you dive into the clunky mess of regedit or fire off cryptic winetricks() , try this:

Put this in ~/.config/fontconfig/fonts.conf:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">


  <!-- antialias all fonts -->
  <match target="font">
    <edit name="antialias" mode="assign"><bool>true</bool></edit>
    <edit name="hinting"   mode="assign"><bool>true</bool></edit>
    <edit name="hintstyle" mode="assign"><const>hintslight</const></edit>
    <edit name="rgba"      mode="assign"><const>rgb</const> </edit>

This obviously could affect other program's fonts outside of wine, but I have noticed no side-effects on both FreeBSD 11 and Linux; any desktop environment already has antialiasing and hinting enabled. In any case, it is easy enough to delete the file if it does cause a problem.

You might also want to use winecfg() increase the DPI from the default of 96 to something around 120-140 to make all fonts larger in wine. Use the "Screen resolution" slider, located in the Graphics tab.