JBR-1174 Font Difference

Restored LCD shader font rendering (can be enabled by
"Use font smoothing when available" setting)
Removed java2d.forceLCDText property

(cherry picked from commit 83db43192a1e0eef3d37c0f61a3de853d9fa2671)
(cherry picked from commit 4be7d7e7b9f8e9f3976c9e2e47020ac107991bf9)
(cherry picked from commit 4858667eebf620a8a9df032558a04332f1652699)
diff --git a/src/macosx/native/sun/java2d/opengl/CGLGraphicsConfig.m b/src/macosx/native/sun/java2d/opengl/CGLGraphicsConfig.m
index b39650a..77a8ed0 100644
--- a/src/macosx/native/sun/java2d/opengl/CGLGraphicsConfig.m
+++ b/src/macosx/native/sun/java2d/opengl/CGLGraphicsConfig.m
@@ -337,20 +337,33 @@
 
     Boolean status = false;
     Boolean fontSmoothingDisabled =
-        CFPreferencesGetAppBooleanValue(
+            CFPreferencesGetAppBooleanValue(
             CFSTR("CGFontRenderingFontSmoothingDisabled"),
             kCFPreferencesCurrentApplication, &status);
 
     if (status) {
         if (fontSmoothingDisabled) {
             J2dRlsTraceLn(J2D_TRACE_INFO,
-                          "LCD_SHADER: disabled via macOS settings");
+                    "LCD_SHADER: disabled via macOS settings");
             caps &= ~CAPS_EXT_LCD_SHADER;
         }
     } else if (IS_OSX_GT10_13) {
-        J2dRlsTraceLn(J2D_TRACE_INFO,
-                      "LCD_SHADER: disabled on macOS 10.14+ by default");
-        caps &= ~CAPS_EXT_LCD_SHADER;
+        // Adding support for "Use font smoothing when available" setting
+        Boolean status = false;
+        Boolean smoothFonts = CFPreferencesGetAppBooleanValue(
+                CFSTR("AppleFontSmoothing"),
+                kCFPreferencesCurrentApplication,
+                &status);
+
+        if (!status) {
+            smoothFonts = YES;
+        }
+
+        if (!smoothFonts) {
+            J2dRlsTraceLn(J2D_TRACE_INFO,
+                    "LCD_SHADER: disabled on macOS 10.14+ by default");
+            caps &= ~CAPS_EXT_LCD_SHADER;
+        }
     }
 
     GLint value = 0;