https://bugzilla.redhat.com/show_bug.cgi?id=1767499
Constantine Gavrilov <constantine.gavrilov(a)gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |constantine.gavrilov@gmail.
| |com
--- Comment #18 from Constantine Gavrilov <constantine.gavrilov(a)gmail.com> ---
I have finally found what is the reason. For me, the switch from Fedora 29 with
freetype-freeworld from RPMFUSION to Fedora-31 with freetype with supposedly
included sub-pixel rendering was really painful, especially on 4k screen, and
especially when screen scaling was done.
The reason is that the freetype build Fedora 31 enables subpixel rendering, but
disables LCD filter. This breaks the rendering. I believe this is an error,
since both are covered by the same patent, and both must be enabled for
subpixel rendering to work corretcly.
The following simple patch fixes it:
-- src/smooth/ftsmooth.c.orig 2020-01-26 19:29:22.287267057 +0200
+++ src/smooth/ftsmooth.c 2020-01-26 19:35:55.302516806 +0200
@@ -44,7 +44,7 @@
sub[2].x = 21;
sub[2].y = 0;
-#elif 0 /* or else, once ClearType patents expire */
+#else
FT_Library_SetLcdFilter( render->root.library, FT_LCD_FILTER_DEFAULT );
And the code block in question is:
/* initialize renderer -- init its raster */
static FT_Error
ft_smooth_init( FT_Renderer render )
{
#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
FT_Vector* sub = render->root.library->lcd_geometry;
/* set up default subpixel geometry for striped RGB panels. */
sub[0].x = -21;
sub[0].y = 0;
sub[1].x = 0;
sub[1].y = 0;
sub[2].x = 21;
sub[2].y = 0;
#elif 0 /* or else, once ClearType patents expire */ <<< BOOM ISSUE HERE
FT_Library_SetLcdFilter( render->root.library, FT_LCD_FILTER_DEFAULT );
#endif
Recompiling the freetype with the fix, brings back very crips fonts, as opposed
to stock ugly fat Fedora 31 fonts.
--
You are receiving this mail because:
You are on the CC list for the bug.