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.


Anonymous said...

Amazing post!! Surprisingly this fixed the potato quality fonts on wine. Great work, now where's that donate button? :)

Anonymous said...

Been looking for a solution to this for years, thank you posting this! Had no idea Wine 2.x had built-in Mac retina support.

Taras Chornyi said...

Thank you!

Anonymous said...

Amazing. Thanks a lot.

Andres Kütt said...

Awesome, I was missing the "string" part. For me, wineboot after each step was not necessary and on a 13" MBPro for Sparx EA 165 dpi worked best. Otherwise, most excellent advice!

straintown said...

Thank you so much. You rock.

Alex said...

Wow man, I was looking to a solution for this for a very long time.
Thanks a lot!!

Deni Herdiman said...

Love ya man! Thanks

David Leeming said...

Amazing, there is nothing in the docs (read google) about this. Brilliant!!! 11/10