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

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
sadi
Level 2
Level 2
Posts: 65
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 »

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 LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Linux Mint 19.3 Cinnamon
deepakdeshp
Level 20
Level 20
Posts: 12341
Joined: Sun Aug 09, 2015 10:00 am

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

Post by deepakdeshp »

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.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
User avatar
sadi
Level 2
Level 2
Posts: 65
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 »

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...
Linux Mint 19.3 Cinnamon
User avatar
Flemur
Level 20
Level 20
Posts: 10096
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 »

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?
User avatar
Flemur
Level 20
Level 20
Posts: 10096
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 »

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?
User avatar
sadi
Level 2
Level 2
Posts: 65
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 »

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...
Linux Mint 19.3 Cinnamon
User avatar
Flemur
Level 20
Level 20
Posts: 10096
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 »

sadi wrote: Thu Mar 22, 2018 12:08 pmThanks 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?
User avatar
sadi
Level 2
Level 2
Posts: 65
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 »

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.
Linux Mint 19.3 Cinnamon
User avatar
Flemur
Level 20
Level 20
Posts: 10096
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 »

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?
User avatar
sadi
Level 2
Level 2
Posts: 65
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 »

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.
Linux Mint 19.3 Cinnamon
zanlinkin

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

Post by zanlinkin »

Million Thanks to Flemur~
i just googling the solution for the same problem and find this post~
Bang! Problem solved ~ Awesome!
Locked

Return to “Software & Applications”