Font smoothing in Wine

10

6

I've recently switched from Windows to Linux (elementary OS), and installed Notepad++ with Wine.

It works fine, but looks like Windows 95.

Screenshot

I tried setting registry settings to make the fonts look better, and everything from this thread.

I also tried compiling Wine with this patch applied.

Nothing makes a difference to the font rendering.

How can I enable font hinting or anti-aliasing in Wine?

uınbɐɥs

Posted 2012-10-23T00:23:25.860

Reputation: 303

What version of wine? – Michael Hampton – 2012-10-23T02:20:51.120

@MichaelHampton I'm using Wine version 1.5.15. – uınbɐɥs – 2012-10-23T02:23:48.090

Try using a stable (1.4.x) version instead? – Michael Hampton – 2012-10-23T02:24:08.183

@MichaelHampton From what I've heard, font smoothing stopped working in v1.1.x, but I will try 1.4. – uınbɐɥs – 2012-10-23T02:28:39.240

@MichaelHampton I looked at the screenshot in the Software Center (v1.4), and the font is aliased / not smoothed. – uınbɐɥs – 2012-10-23T02:37:40.663

I'm out of ideas. I only play games with Wine. :) – Michael Hampton – 2012-10-23T02:38:19.647

Have you considered switching to a native editor? Notepad++ isn't bad, but it's not anything special. Look into something like Geany. – ssmy – 2012-10-23T04:09:57.093

@ssmy I need FTP integration, and I don't think that Geany has that. Notepad++ does, and it automatically uploads modified files. – uınbɐɥs – 2012-10-23T04:25:42.427

@MichaelHampton: I solved my own problem :-) – uınbɐɥs – 2012-10-24T07:31:42.923

@ssmy I don't need to switch editors now, because I managed to get the fonts to look okay in Wine :-) – uınbɐɥs – 2012-10-24T07:32:50.580

Answers

10

It turned out to be easier than I thought: font substitution.

Smooth fonts in Notepad++/Wine


Here's how to make the fonts look better:

  1. Navigate to HKEY_CURRENT_USER\Software\Wine\Fonts\Replacements in the Wine registry editor (wine regedit).
  2. Create a new string value called Segoe UI, and set its value to Droid Sans (or any other sans-serif font name).
  3. Naviagte to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes.
  4. Create a new string called MS Shell Dlg and set its value to a sans-serif font (I used Droid Sans again). Create another string called MS Shell Dlg 2 and do the same. [source]
  5. Close the registry editor and run wineboot to restart Wine.

Great! Smooth fonts!

But: the monospace font in Notepad++ is still jagged.

The fix for that is quite easy, too:

  1. Open the Style Configurator (Settings -> Style Configurator).
  2. Choose the font and font size that you want, then check 'Enable global font' and 'Enable global font size' to activate the settings. I chose Droid Sans Mono as the font.

I hope that this will help someone else too.

uınbɐɥs

Posted 2012-10-23T00:23:25.860

Reputation: 303

1I've been haunted by font smoothing not working in Wine for some time (all scripts and patches seems to not work anymore)... but editing these registry entries did the trick! Thank you very much for you finding. – BloodShura – 2017-03-11T17:19:09.903