After upgrading to media-libs/freetype-2.6.5[+infinality] from 2.6.3-r1 my fonts started looking way worse (as if infinality isn't working). I'm also using infinality-ultimate-meta, but I tried without it as well and got the same results.
Looking online I see that arch folks patched up freetype to be configured via environment variables:
It looks like the gentoo ebuild retains:
#define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 )
in ftoption.h which causes the v40 interpreter to be selected by the driver in ttobj.c
driver->interpreter_version = TT_INTERPRETER_VERSION_40;
I think the gentoo ebuild should patch this out so the VERSION_38 interpreter is selected for USE +infinality and the VERSION_40 interpreter is selected for USE +cleartype_hinting. Unfortunately I tried this way of patching, and while it helped (fonts looked better) it still didn't achieve the same quality as freetype 2.6.3 did.
There's also a related looking funtoo bug:
Created attachment 442202 [details, diff]
freetype-2.6.5 hinting 0..3
Yes, +infinality & +cleartype_hinting must be cumulative, but TT_CONFIG_OPTION_SUBPIXEL_HINTING=0 (or just defined) is looks option too. This is too subjective, so you can try attached ebuild patch and 4 combinations:
USE="hinting -infinality -cleartype_hinting"
USE="hinting infinality -cleartype_hinting"
USE="hinting -infinality cleartype_hinting"
USE="hinting infinality cleartype_hinting"
The bug has been referenced in the following commit(s):
Author: Andreas Sturmlechner <email@example.com>
AuthorDate: 2021-03-27 13:27:42 +0000
Commit: Lars Wendler <firstname.lastname@example.org>
CommitDate: 2021-03-29 08:06:15 +0000
profiles: Mask media-libs/fontconfig-infinality +friends for removal
Signed-off-by: Andreas Sturmlechner <email@example.com>
Signed-off-by: Lars Wendler <firstname.lastname@example.org>
profiles/package.mask | 9 +++++++++
1 file changed, 9 insertions(+)