8212071: Need to set the FreeType LCD Filter to reduce fringing.
Reviewed-by: prr, lbourges
Contributed-by: John Neffenger <john@status6.com>
--- 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;