changeset 52279:02e4b0ab0f97

8212071: Need to set the FreeType LCD Filter to reduce fringing. Reviewed-by: prr, lbourges Contributed-by: John Neffenger <john@status6.com>
author prr
date Tue, 16 Oct 2018 10:54:50 -0700
parents 30d5f10ace94
children 22517c8020d3
files src/java.desktop/share/native/libfontmanager/freetypeScaler.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/share/native/libfontmanager/freetypeScaler.c	Tue Oct 16 14:26:22 2018 +0530
+++ b/src/java.desktop/share/native/libfontmanager/freetypeScaler.c	Tue Oct 16 10:54:50 2018 -0700
@@ -38,6 +38,7 @@
 #include FT_SIZES_H
 #include FT_OUTLINE_H
 #include FT_SYNTHESIS_H
+#include FT_LCD_FILTER_H
 
 #include "fontscaler.h"
 
@@ -397,6 +398,8 @@
         if (errCode == 0) {
             errCode = FT_Activate_Size(scalerInfo->face->size);
         }
+
+        FT_Library_SetLcdFilter(scalerInfo->library, FT_LCD_FILTER_DEFAULT);
     }
 
     return errCode;