That problem again : anti-alaising

Questions about Wine on Linux
Locked
cliffhanger
Level 2
Level 2
Posts: 10
Joined: Thu Feb 02, 2017 11:34 am

That problem again : anti-alaising

Post by cliffhanger »

Hi

I have been running Wine now on Linux for maybe 12 years and have been reasonably successful with anti-aliasing. This time it's a no go. Running Wine 1.9.23 and a couple of Windoze programs I can't antialiasing working no matter what. It is not functioning in Winecfg, Notepad or Regedit just for starters.

I have tried all the advice(or it seems that way)from Google lookups. They include the Winetricks advice i.e. fontsmooth=rgb etc and the addition to Regedit under X11 of :

[HKEY_CURRENT_USER\Software\Wine\X11 Driver]

"ClientSideWithRender"="Y"

No go. Still have the same video card a Nvidia M425.

I am getting this error when running Winecfg: (winecfg.exe:8980): Gtk-CRITICAL **: gtk_widget_get_style_context: assertion 'GTK_IS_WIDGET (widget)' failed, but only under this. Any help appreciated

Cliff
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: That problem again : anti-alaising

Post by Bob Wya »

@Cliff,
  • Are you using Wine Staging with the Gtk3 UX Theming support? Because that's known to be pretty broken ATM...
  • What Linux distribution are you using?
  • What version of the freetype and fontconfig system libraries have you got installed on your system?
Ta
Bob
cliffhanger
Level 2
Level 2
Posts: 10
Joined: Thu Feb 02, 2017 11:34 am

Re: That problem again : anti-alaising

Post by cliffhanger »

Thanks Bob

1. Yes, I think I am running the Wine Staging ver for 1.9.., but this was to try and get over the already anti-alaising problem.

2. LFS, always have - latest ver.

3. Freetype-2.6.5 and fontconfig-2.12.1

Cliff
cliffhanger
Level 2
Level 2
Posts: 10
Joined: Thu Feb 02, 2017 11:34 am

Re: That problem again : anti-alaising

Post by cliffhanger »

Yes definitely running staging but nothing enabled under Winecfg

Cliff
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: That problem again : anti-alaising

Post by Bob Wya »

cliffhanger wrote:Thanks Bob

1. Yes, I think I am running the Wine Staging ver for 1.9.., but this was to try and get over the already anti-alaising problem.

2. LFS, always have - latest ver.

3. Freetype-2.6.5 and fontconfig-2.12.1

Cliff
@Cliff,

Have you updated your freetype package recently? If so then checkout the Freetype Project changelog for freetype 2.6.5+...
The project has recently introduced a piss-poor implementation of subpixel hinting (instead of integrating the pre-existing and excellent infinality patchset).
Well they describe it as being "faster"... :roll:

Personally I'm sticking with freetype 2.6.3 - the final release which the infinality patchset supports.
Infinality still provides the best font rendering (reputed to beat both the MacOS and MS Windows font renderers).

if you want to stick with the stock freetype implementation - then you'd probably want to update your package to version 2.7.1.
Since the "new" subpixel hinting feature is still be tweaked heavily.

I've got some package build scripts in my Gentoo Overlay that you could probably work with - to enable infinality font rendering support - on your LFS install??
At least you've got a choice.

If you were running Arch Linux, say, then they've moved to freetype 2.7.1. They're actaully working with a fork of infinality - to get it to work with newer versions of freetype - but how long will that hold together??!!

I was chatting with a guy on the #gentoo-wine channel - who had a similar complaint (poor font rendering of applications running under Wine).
He was pretty blown away by the difference - after he setup infinality fonts for his Gentoo install.

Bob
cliffhanger
Level 2
Level 2
Posts: 10
Joined: Thu Feb 02, 2017 11:34 am

Re: That problem again : anti-alaising

Post by cliffhanger »

Many thanks Bob

This sounds promising. An earlier version of LFS, which I have on another partition, ran font rendering in Wine fine. An earlier version of Freetype me thinks.

Could you please dig out those scripts for building and I will rerun Freetype-2.6.5.

LFS has moved to 2.7.1 now and is using:

sed -ri "s:.*(AUX_MODULES.*valid):\1:" modules.cfg

sed -r "s:.*(#.*SUBPIXEL_RENDERING) .*:\1:" \
-i include/freetype/config/ftoption.h

First command enables GX/AAT and OpenType table validation and second command enables Subpixel Rendering

I'd rather stick with 2.6.5 or go back to 2.6.3, but let's try these scripts.

many thanks again

Cliff
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: That problem again : anti-alaising

Post by Bob Wya »

cliffhanger wrote:Many thanks Bob

This sounds promising. An earlier version of LFS, which I have on another partition, ran font rendering in Wine fine. An earlier version of Freetype me thinks.

Could you please dig out those scripts for building and I will rerun Freetype-2.6.5.

...

I'd rather stick with 2.6.5 or go back to 2.6.3, but let's try these scripts.

many thanks again

Cliff
I haven't checked out this Arch Linux fork of the Github: bohoomil/fontconfig-ultimate package: Github: julroy67/fontconfig-ultimate ... That will patch against the freetype 2.7.1 library. So that might also be worth considering as well.

The Arch Linux package build scripts are pretty simple - so they should be adaptable to LFS. See the Arch AUR: Package Details: freetype2-infinality 2.7.1-1 package.

I wouldn't bother looking at the Gentoo packaging - because that uses a lot of Gentoo -specific build wrappers and is therefore more abstract...

Bob
cliffhanger
Level 2
Level 2
Posts: 10
Joined: Thu Feb 02, 2017 11:34 am

Re: That problem again : anti-alaising

Post by cliffhanger »

Thanks Bob

One last thing. Will I still need to enable GX/AAT and OpenType table validation and Subpixel Rendering, before patching? Or are these patches all emcompassing?

Cliff
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: That problem again : anti-alaising

Post by Bob Wya »

cliffhanger wrote:Thanks Bob

One last thing. Will I still need to enable GX/AAT and OpenType table validation and Subpixel Rendering, before patching? Or are these patches all emcompassing?

Cliff
Well why not checkout the stock Arch Linux freetype2 2.7.1-1 package first.
That has an infinality patch (I was little surprised to see). All the website tools you need, to inspect the bundled patches and build script, are over on the RHS in the Package Actions box.

Don't apply any of the LFS sed hacks - the patches in the stock Arch Linux freetype2 package set those variables differently.

The problem about messing with your freetype2 package is the amount of re-compiling that will result... So I'd try using the build script, from the stock Arch Linux package, first!
People would soon complain if that wasn't working, building or doing what they wanted (given how popular Arch Linux is)!

Bob
cliffhanger
Level 2
Level 2
Posts: 10
Joined: Thu Feb 02, 2017 11:34 am

Re: That problem again : anti-alaising

Post by cliffhanger »

Thanks again Bob

I must say that if I ever went for a distro it would be Arch Linux. For one thing I've always been impressed by their Wiki pages - really useful.

Cliff 8)
cliffhanger
Level 2
Level 2
Posts: 10
Joined: Thu Feb 02, 2017 11:34 am

Re: That problem again : anti-alaising

Post by cliffhanger »

Wow, what a result!

Patched 2.6.3 and recompiled along with Cairo, Fontconfig and Harfuzz.

The definition is so good.

Still can't get Wine to look different, I'm missing something. Brought in the wine config script that's included, but it's a no go.

Cliff
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: That problem again : anti-alaising

Post by Bob Wya »

cliffhanger wrote:Wow, what a result!

Patched 2.6.3 and recompiled along with Cairo, Fontconfig and Harfuzz.

The definition is so good.

Still can't get Wine to look different, I'm missing something. Brought in the wine config script that's included, but it's a no go.

Cliff
Obvious step - but I presume you have rebuilt your wine package?

Bob
cliffhanger
Level 2
Level 2
Posts: 10
Joined: Thu Feb 02, 2017 11:34 am

Re: That problem again : anti-alaising

Post by cliffhanger »

Huh, no. You're right should have been obvious.

Cliff
cliffhanger
Level 2
Level 2
Posts: 10
Joined: Thu Feb 02, 2017 11:34 am

Re: That problem again : anti-alaising

Post by cliffhanger »

Right. The Windows apps in Wine are the best they've ever been. I've got font smoothing in Active title texts etc and good definition. But I still can't get anti-alaising in Winecfg, Regedit, notebook etc which is effecting the overall result. I've had to introduce a scheme via Winecfg to get this far.

Many thanks though Bob

Cliff
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: That problem again : anti-alaising

Post by Bob Wya »

cliffhanger wrote:Right. The Windows apps in Wine are the best they've ever been. I've got font smoothing in Active title texts etc and good definition. But I still can't get anti-alaising in Winecfg, Regedit, notebook etc which is effecting the overall result. I've had to introduce a scheme via Winecfg to get this far.

Many thanks though Bob

Cliff
Well sure that's good. But, but, but...
You should be able to get excellent font rendering - for the wine builtins as well. 8)

Do you have TTF tahoma and TTF MS corefonts (either system wide or per Wineprefix)? You check that wine is picking these up by using:

Code: Select all

wine regedit
and browsing to the key:

Code: Select all

HKCU\Software\Wine\Fonts\External Fonts
and checking the links are valid.

Btw winecfg only uses the tahoma font - so I'd concentrate on testing with that first.

Check your Wine subpixel hinting is correct - see WineHQ FAQ: 6.6.6 How can I make Wine fonts anti-aliased?

Then what's the output from:

Code: Select all

'ls' -hl /etc/fonts/conf.d/
'ls' -hl /etc/fonts/infinality/
cat /etc/fonts/infinality/infinality.conf
Just post the whole dump inline (with Code tags) here...

It's very frustrating that font rendering doesn't work like this - OTB. :cry:

Ta
Bob


Btw I'm currently testing out these blog posts (on Arch) - How To Fix The Harfbuzz And Infinality Issue In Arch Linux / Github Gist: cryzed/fix-infinality.md ...
Which basically attempt to fix font rendering - using the newer freetype 2.7.1 engine. I'll report back - as I'm only pottering through them!
On my Arch install, winecfg looks like ass - currently - with the stock freetype 2.7.1 package...
cliffhanger
Level 2
Level 2
Posts: 10
Joined: Thu Feb 02, 2017 11:34 am

Re: That problem again : anti-alaising

Post by cliffhanger »

Ok. Got it all now.

This was simply a case of broken link which brought in more fonts(in HKCU\Software\Wine\Fonts\External Fonts as well) and editing manually the 'system.ini' file in the gtk-3.0 home folder.

Don't know why this should have worked, it seems Quicken, one of the packages I'm running, depends on this file. The file wasn't being changed properly from within kde-gtk-config.

I haven't got the following directories:

/etc/fonts/conf.d/
/etc/fonts/infinality/
/etc/fonts/infinality/infinality.conf

they were never created, I assume I could do this and give greater control. But anyway many thanks again Bob

regards

Cliff
Locked