Another Font-Question

Questions about Wine on Linux
Locked
bernd_b
Level 1
Level 1
Posts: 8
Joined: Fri May 16, 2008 3:56 am

Another Font-Question

Post by bernd_b »

I managed to get the fonts mostly look satisfying - eg. see attached Screenshot_Office.png.

In certain cases, e.g. file selection box or the attached example regedit (Screenshot_regedit.png), the font look - well not well.

Anybody knowing which font could be used here and which switch I could have missed or is this just the way it is?
I made this screenshots using wine-2.12.1 from the repository of archlinux.
Attachments
Screenshot_regedit.png
Screenshot_Office.png
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Another Font-Question

Post by Bob Wya »

Most likely your issue are due to changes being to subpixel hinting the freetype 2.7.x(+) libraries - which Wine links against.
I'm mainly just using Gentoo - where I still use the older freetype 2.6.3 library+the infinality patchset.

But I have followed a number of guides, including the cryzed/fix-infinality.md Github gist, on setting up good font rendering (post-infinality) on my Arch partition...
I haven't checked recently if freetype 2.8.x breaks font rendering again...

Also I see infinality-patched freetype library may be living on - in an Arch-specific fork - in the AUR.

I like the infinality look a lot btw!

If you chose to use the stock font rendering on Arch - post freetype 2.6.5. Then you probably need to switch your WINEPREFIX(s) to use:

Code: Select all

[HKEY_CURRENT_USER\Control Panel\Desktop]
"FontSmoothing"="2"
"FontSmoothingType"=dword:00000002
To enable Wine's equivalent of Windows Cleartype font rendering (I used this combination with the Github Gist - linked to above).

Bob
bernd_b
Level 1
Level 1
Posts: 8
Joined: Fri May 16, 2008 3:56 am

Re: Another Font-Question

Post by bernd_b »

Code: Select all

[Control Panel\\Desktop] 1499779492 5298600
.
.
.
"FontSmoothing"="2"
"FontSmoothingGamma"=dword:00000578
"FontSmoothingOrientation"=dword:00000001
"FontSmoothingType"=dword:00000002
.
.
.
Sadly the values are already set. My current freetype version

Code: Select all

pacman -Qs freetype
local/freetype2 2.8-2
local/lib32-freetype2 2.8-2
Trying to downgrade, I get either

Code: Select all

Wine cannot find the FreeType font library.  To enable Wine to
use TrueType fonts please install a version of FreeType greater than
or equal to 2.0.5.
, e.g. using 2.6.4 or 2.6.5
or the package manager complains

Code: Select all

error: failed to prepare transaction (could not satisfy dependencies)
:: ffmpeg: installing freetype2 (2.6-1) breaks dependency 'libfreetype.so=6-64'
:: libbluray: installing freetype2 (2.6-1) breaks dependency 'libfreetype.so=6-64'
Most of my wineprefixes are win32 - so I guess the AUR-Package you linked too won't help unless I find a lib32-equivalent?
bernd_b
Level 1
Level 1
Posts: 8
Joined: Fri May 16, 2008 3:56 am

Re: Another Font-Question

Post by bernd_b »

I found an interesting hint in a shell script supplied by the AUR -Package linked to by Bob Wya:

Code: Select all

# Subpixel hinting mode can be chosen by setting the right TrueType interpreter
# version. The available settings are:
#
#     truetype:interpreter-version=35  # Classic mode (default in 2.6)
#     truetype:interpreter-version=38  # Infinality mode
#     truetype:interpreter-version=40  # Minimal mode (default in 2.7)
#
# There are more properties that can be set, separated by whitespace. Please
# refer to the FreeType documentation for details.

# Uncomment and configure below
#export FREETYPE_PROPERTIES="truetype:interpreter-version=40"

So I gave this a try with the Arch-freetype2-Package from the main repository (version 2.8-2)

With

Code: Select all

export FREETYPE_PROPERTIES="truetype:interpreter-version=40"; wine regedit
I get a look like this:
Screenshot_regedit-version_40.png
With

Code: Select all

export FREETYPE_PROPERTIES="truetype:interpreter-version=35"; wine regedit
I get a look like this:
Screenshot_regedit-version_35.png
If I believe my eyes, this makes quite a difference. So indeed, freetype2 2.7.x and 2.8.x seems to break something, but with the environment variable "FREETYPE_PROPERTIES" one can force the old behaviour?!?
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Another Font-Question

Post by Bob Wya »

@bernd_b

Sorry, I meant to link to the freetype website as well.

There's a pretty decent overview of the changes made in version 2.7.
Which was the first officially supported version of freetype with subpixel hinting support (well excluding version 2.6.4 - which was never packaged by most distributions).

Basically the freetype changes are speed over quality based - to provide subpixel hinting support.
Hence the argument behind the continued support of the infinality fonts patchset.

Bob
bernd_b
Level 1
Level 1
Posts: 8
Joined: Fri May 16, 2008 3:56 am

Re: Another Font-Question

Post by bernd_b »

--- sorry I mislead myself, therefore I deleted my just made posting ---
Locked