Disable subpixel text antialiasing for ServoSurface

This commit is contained in:
Paul Rouget 2018-10-05 12:44:58 +02:00
parent e0ce73abb2
commit 5ddb8d577f
8 changed files with 22 additions and 2 deletions

View file

@ -60,6 +60,7 @@ public class JNIServo {
public int width = 0;
public int height = 0;
public float density = 1;
public boolean enableSubpixelTextAntialiasing = true;
public String logStr;
public boolean enableLogs = false;
}

View file

@ -213,6 +213,7 @@ public class ServoSurface {
options.url = mInitialUri == null ? null : mInitialUri;
options.logStr = mServoLog;
options.enableLogs = true;
options.enableSubpixelTextAntialiasing = false;
mServo = new Servo(options, this, surface, mClient, mActivity);
});

View file

@ -141,6 +141,7 @@ public class ServoView extends GLSurfaceView
options.width = getWidth();
options.height = getHeight();
options.enableLogs = true;
options.enableSubpixelTextAntialiasing = true;
DisplayMetrics metrics = new DisplayMetrics();
mActivity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
options.density = metrics.density;