Bug 29128

Summary: Multiple fonts issues from the box
Product: Mageia Reporter: Alexey Ivanov <krab4t>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: Normal CC: lewyssmith, ouaurelien
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: fontconfig-2.13.93-4.mga8.src.rpm CVE:
Status comment:

Description Alexey Ivanov 2021-06-14 05:25:30 CEST
Hi there. Fonts rendering by default on fresh installation are really bad. Ubuntu and OpenSUSE (even fedora) doing it better. 

First issue: is missing its lcdfilter and rgba sections in fontconfig conf files.

In opensuse its: 10-*-.conf 11-*-.conf 12-*-.conf 13-*-.conf files.

Second issue: is missing /etc/profile.d/freetype2.sh with content:

#export FREETYPE_PROPERTIES="truetype:interpreter-version=38

or 35, but not 40, 40 is also part of bad rendering (imho).

opensuse has extra patch "enable-infinality-subpixel-hinting.patch" in src.rpm not sure how its important. 

https://www.freetype.org/freetype2/docs/reference/ft2-properties.html#tt_interpreter_version_xxx

And misc change: i think this "perl -pi -e" block in freetyp2.spec is unneeded as subpixel enables define via patch0
Comment 1 Alexey Ivanov 2021-06-14 06:14:16 CEST
export without #comment :D
Comment 2 Alexey Ivanov 2021-06-14 06:57:52 CEST
FREETYPE_PROPERTIES optional but still nice if it was enabled by default. What needed is conf files, but its for fontconfig package not freetype, my bad.

Source RPM: freetype2 => fontconfig

Comment 3 Lewis Smith 2021-06-14 21:57:07 CEST
Thank you for this report.
> Fonts rendering by default on fresh installation are really bad
This is a large statement, and you are the first to make it. The 2 suggestions you make would seem to be essential - but are clearly not.

/etc/profile.d/freetype2.sh does not exist in our systems.
/etc/profile.d/* has nothing for either fontconfig or freetype. Are you saying it could or should have? What file exactly - presumably to contain:
 export FREETYPE_PROPERTIES="truetype:interpreter-version=38

It would help if you could post screenshots of something 'really bad' out of the box; and the same sample after your suggested improvement(s).

Status: NEW => NEEDINFO
Source RPM: fontconfig => fontconfig-2.13.93-4.mga8.src.rpm
CC: (none) => lewyssmith

Comment 4 Alexey Ivanov 2021-06-15 01:07:25 CEST
Some images to compare, everything in vmware player, IPS monitor 1080p.

1. fresh claudron plasma installation:
https://i.imgur.com/9j5X4cP.png

2. with lcddefault and rgb blocks to ~/.config/fontconfig/fonts.conf:
https://i.imgur.com/HasnjgK.png

Issue is that on image 1 some letters are thin same are bold (at bottom left madb page look at License line) no consistency. It can be improved with at least default lcdfilter(lcddefault) and hintstyle(hintslight) (plus maybe rgb) settings in /etc/fonts/conf.d (image 2).

Another huge issue i see is yellow/blue glow in default font rendering and hintslight fixes it only a bit. So the only way to fix yellow/blue glow is to use hintfull https://i.imgur.com/WgmDwma.png but its for users to decide what hintstyle method they prefer.

FREETYPE_PROPERTIES="truetype:interpreter-version=35" i noticed that it works only with hintfull https://i.imgur.com/vPT2XkP.png makes fonts thinner windows XP style, and 38 doesn't work so default 40 used. FREETYPE_PROPERTIES is optional and don't needed.

And 3rd issue is if ~/.config/fontconfig/fonts.conf doesn't have lcdfilter hintstyle or rgba sections then KDE systemsettings font configuration tool doesn't apply/save them at all. Well thats needs to be fixed in default rpm package with ~/.config/fontconfig/fonts.conf file content.
Comment 5 Alexey Ivanov 2021-06-15 01:35:49 CEST
--- and hintslight fixes it only a bit.
+++ and hintslight/lcddefault/rgb fixes it only a bit.

basically you have LCD sub-pixel smoothing "patch/define" enabled but you don't have them enabled in conf.d files.
Comment 6 Aurelien Oudelet 2021-06-15 11:07:57 CEST
This is relevant to per LCD display device.
Some devices are more LCD density than other.

You at least should use under Plasma:
systemsettings5 => Appareance => Fonts panel to set RVB subpexilisation and Hinting.

We can ship a default preset for all LCD panel in the market. We let user decide.

Remark under Mageia 8, this is panel is broken on NVIDIA nonfree driver system.
This is fixed in later Plasma release we currently have in Cauldron.

CC: (none) => ouaurelien
Status: NEEDINFO => RESOLVED
Resolution: (none) => WONTFIX

Comment 7 Alexey Ivanov 2021-06-15 11:25:57 CEST
well i guess im going to use conf files from altlinux fontconfig rpm package as it makes 9,10,11,12px+ fonts better from the box.
Comment 8 Lewis Smith 2021-06-17 21:26:54 CEST
PS for future use:
The way you presented the images in comment 4 was scarcely legible. Better (& surely simpler) to attach them directly to the bug "Add an attachment" at top; you can add a full comment at the same time.
Thanks anyway.