8212071: Need to set the FreeType LCD Filter to reduce fringing.
authorprr
Tue, 16 Oct 2018 10:54:50 -0700
changeset 52258 02e4b0ab0f97
parent 52257 30d5f10ace94
child 52259 22517c8020d3
8212071: Need to set the FreeType LCD Filter to reduce fringing. Reviewed-by: prr, lbourges Contributed-by: John Neffenger <john@status6.com>
src/java.desktop/share/native/libfontmanager/freetypeScaler.c
--- 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;