Wednesday, February 1, 2017

Blurry font issue with Wine 2.0 on macOS 10.12.2

After installing the latest Wine release, which currently is 2.0 (I chose the development branch) on XQuartz 2.7.11, I was having problems with blurry text in both winecfg, regedit and other programs launched through Wine.
After trying to enable font smoothing and font replacements (source) with only slight changes I found someone trying to solve the same issues (source), albeit compiling everything from scratch which I don't want to do.
It turns out that the Retina display on my MacBook Pro was causing the issues with blurry fonts because Wine was not using the "real" resolution, only the reported "lower resolution".

To enable Retina support in Wine open the registry editor via a terminal, preferably through Wine installed with Wine:
$ wine regedit

Then find the folder/key:

I then had to create the folder/key called "Mac Driver" and inside the new folder/key create a new string value called RetinaMode. Now edit the value of the RetinaMode to be "y".
Picture showing the location of the new value to enable Retina support for Wine on macOS.
Path is: HKEY_CURRENT_USER\Software\Wine\Mac Driver\
Close the registry editor and restart wine:
$ wineboot
Then open Wine configuration dialog:
$ winecfg
The window will now be very small due to Retina support being enabled. Navigate to Graphics and select a screen resolution scaling of 220 dpi.
Close the Wine configuration dialog and restart wine again:
$ wineboot

That's it, next time you open a program (e.g. Wine configuration dialog) it will be the correct size and with smooth fonts.
The windows terminal that is launched by:
$ wineconsole
Uses other font/scaling settings so it is necessary to choose another font size by right clicking the program and navigating to properties. Then select Font and choose a font size larger than 28, remember to select "retain the for later sessions" to save the settings for new windows.