[SOLVED] A very recent font-smoothing issue with Win32 apps under wine

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
sadi
Level 1
Level 1
Posts: 42
Joined: Sat Aug 21, 2010 3:16 pm
Location: Istanbul

[SOLVED] A very recent font-smoothing issue with Win32 apps under wine

Post by sadi » Thu Mar 22, 2018 6:38 am

Long long time ago users needed to do a little fine-tuning to achieve font-smoothing in Windows apps running under Wine (either by executing a script or using a similar tool in Winetricks), which was later taken care of in deault Wine configuration.

However, under Linux Mint 18.3 Cinnamon edition, recently I began to see a similar font-smoothing problem in Windows apps I sometimes use under Wine (e.g. ABBY FineReader OCR software). I tried a lot to diagnose and fix this problem, and I discovered that it has nothing to do with the old font-smoothing settings issue which still come pre-configured properly in default Wine configuration (as can be seen under [Control Panel\\Desktop] in user.reg file). I also discovered that when you create a new 64-bit Wine environment (e.g. "env WINEARCH=win64 WINEPREFIX=~/.wine64 winecfg") and install a 64-bit Windows app, you don't get such a font-smoothing problem - unless and until you also install a 32-bit Windows app in that new 64-bit Wine environment...

So my guess is that, since there has been no update to Wine1.6 package(s), a recent update to one of the packages (probably libraries) used by Wine as a dependency has a bug that affects Win32 apps ony!

But how can I be more certain about this, how can I find out exactly which updated package is resbonsible for this, and then is there anything I can temporarily fix it?

Any ideas or suggestions pleases???
Last edited by sadi on Thu Mar 22, 2018 5:41 pm, edited 1 time in total.
OS: Linux Mint 19 Cinnamon 64-bit

deepakdeshp
Level 10
Level 10
Posts: 3427
Joined: Sun Aug 09, 2015 10:00 am

Re: A very recent font-smoothing issue with Win32 apps under wine

Post by deepakdeshp » Thu Mar 22, 2018 7:44 am

You can check in the dBASE for the compatibility of the app
https://appdb.winehq.org
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 19 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

sadi
Level 1
Level 1
Posts: 42
Joined: Sat Aug 21, 2010 3:16 pm
Location: Istanbul

Re: A very recent font-smoothing issue with Win32 apps under wine

Post by sadi » Thu Mar 22, 2018 9:04 am

Thanks... But no, I'm sure it's not such a compatibility issue.
It affects all the apps I use under Wine none of which had any such problem until a couple of weeks ago.
At the moment I'm working on finding out when exactly it happened, using Clonezilla backup images, and restoring my oldest system backup showed that this problem occurred after January 18th...
OS: Linux Mint 19 Cinnamon 64-bit

User avatar
Flemur
Level 15
Level 15
Posts: 5824
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: A very recent font-smoothing issue with Win32 apps under wine

Post by Flemur » Thu Mar 22, 2018 10:58 am

I thought my wine fonts looked uglier than usual after installing wine v3. - but now they look better. It might be my imagination or got used to it or ....

You might try this, though I'm not sure if it works:
winetricks -> default -> change settings -> fontsmooth=whatever

Term output said
"Executing winetricks_early_wine regedit C:\windows\Temp\_fontsmooth=rgb\fontsmooth.reg"

but I actually have
~/.wine/drive_c/windows/temp/_fontsmooth=gray

Also you can run "regedit" and look for "fontsmooth" and set it to "2".

Edit: my wine fonts are not anti-aliased.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

User avatar
Flemur
Level 15
Level 15
Posts: 5824
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: A very recent font-smoothing issue with Win32 apps under wine

Post by Flemur » Thu Mar 22, 2018 11:37 am

Now my wine fonts are anti-aliased! (wine-3.0)

Solution, but NOT recommended:

Code: Select all

sudo rm -r /etc/fonts/*
Why did that work?
Because there are .conf files with settings which say "if it's this font and this size, don't anti-alias" - but looking thru and grepping, I couldn't find any appropriate settings....but they're in there somewhere.

Why was that a problem?
Because the linux font software comes from "freedesktop.org", and they make everything complicated, buggy and kludgey.

Edit: after a reboot some fonts look slightly different (firefox web pages and the GUI), but nothing is terrible.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

sadi
Level 1
Level 1
Posts: 42
Joined: Sat Aug 21, 2010 3:16 pm
Location: Istanbul

Re: A very recent font-smoothing issue with Win32 apps under wine

Post by sadi » Thu Mar 22, 2018 12:08 pm

Oh my God!!! ;-)
You've spotted the root of the problem so quickly!
The settings under "/etc/fonts" directory.
Now the next step would be which file and which settings exactly cause this problem in Wine.
As you said this solved the problem in Wine but system-wide the only apparent adverse side-effect I cıuld see so far is with Firefox.
For example this forum website's font has suddenly turned into Courier New :-(
Although linuxmint.com is not so much affect, there are also some other websites that look less pretty.
I should better look into the recent changes in those font configuration files.
Thanks for narrowing it down so drastically...
OS: Linux Mint 19 Cinnamon 64-bit

User avatar
Flemur
Level 15
Level 15
Posts: 5824
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: A very recent font-smoothing issue with Win32 apps under wine

Post by Flemur » Thu Mar 22, 2018 12:14 pm

sadi wrote:
Thu Mar 22, 2018 12:08 pm
Thanks for narrowing it down so drastically...
Hey, if you find out which file(s) is/are the problem, post it here! Which file might depend on which fonts you're using in wine... I wouldn't have deleted all those files if I didn't have backups.

I use "Arial" or "Liberation Sans" for almost everything in both linux and wine, so I dunno why they'd show up OK in straight linux but not under wine, with the same sizes and all.

Edit: the main effect of deleting /etc/fonts/* (other than letting wine display fonts properly) seems to be that "font family" got reassigned, so that "sans" (etc) is now something other than it was.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

sadi
Level 1
Level 1
Posts: 42
Joined: Sat Aug 21, 2010 3:16 pm
Location: Istanbul

Re: A very recent font-smoothing issue with Win32 apps under wine

Post by sadi » Thu Mar 22, 2018 1:45 pm

Bad news; I'm afraid this not the right way leading to the solution of this problem.
For I just compared these directories, and they haven't changed at all since January.
Although this seems to solve the problem in Wine, it creates font family and size problems here and there all over the system :-(
I wish we could tell Wine exclusively to ignore that directory at least as a temporary solution ;-)
Also I found that the last good state of my system was saved on 6 March.
OS: Linux Mint 19 Cinnamon 64-bit

User avatar
Flemur
Level 15
Level 15
Posts: 5824
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: A very recent font-smoothing issue with Win32 apps under wine

Post by Flemur » Thu Mar 22, 2018 4:18 pm

sadi wrote:
Thu Mar 22, 2018 1:45 pm
Bad news; I'm afraid this not the right way leading to the solution of this problem.
For I just compared these directories, and they haven't changed at all since January.
Although this seems to solve the problem in Wine it creates font family and size problems here and there all over the system :-(
I wish we could tell Wine exclusively to ignore that directory at least as a temporary solution ;-)
I copied all the original /etc/fonts files back, then made a ~/.fonts.conf file and I think it's working....(!)
cat ~/.fonts.conf

Code: Select all

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">

<fontconfig>

  <!-- 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>
    </match>
  
</fontconfig>
Edit - I guess it should be in
$HOME/.config/fontconfig/fonts.conf
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

sadi
Level 1
Level 1
Posts: 42
Joined: Sat Aug 21, 2010 3:16 pm
Location: Istanbul

[SOLVED] A very recent font-smoothing issue with Win32 apps under wine

Post by sadi » Thu Mar 22, 2018 5:38 pm

Wow! That's it! Thanks a million :-)
(I used it as "$HOME/.config/fontconfig/fonts.conf")

BTW this problem did not occur because such a configuration file was deleted or overwritten in recent weeks. I can see no such configuration file in my home partition before this happened when I restore backup images I saved with Clonezilla. So I think probably a Wine dependency package/library used to take care of this (using antialiasing by default) without such a file, but stopped doin it after a recent update. It's beyond me to find which one out of more than a dozen such Wine dependencies is responsible. But I'm very happy to know that such a configuration file solves the problem.
OS: Linux Mint 19 Cinnamon 64-bit

Post Reply

Return to “Software & Applications”