From e1a3d21edfe6f3046abe5df62153143f35ac5f25 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 25 Apr 2019 14:49:23 +0200 Subject: [PATCH] Small improvement --- app/src/main/java/eu/faircode/email/Identicon.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Identicon.java b/app/src/main/java/eu/faircode/email/Identicon.java index 39c72a6620..723e7d8d2a 100644 --- a/app/src/main/java/eu/faircode/email/Identicon.java +++ b/app/src/main/java/eu/faircode/email/Identicon.java @@ -24,6 +24,7 @@ import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.RectF; +import android.graphics.Typeface; import androidx.core.graphics.ColorUtils; @@ -74,13 +75,12 @@ class Identicon { Paint paint = new Paint(); paint.setColor(y < 128 ? Color.WHITE : Color.BLACK); paint.setTextSize(size / 2f); - paint.setFakeBoldText(true); - + paint.setTypeface(Typeface.DEFAULT_BOLD); String text = email.substring(0, 1).toUpperCase(); canvas.drawText( text, size / 2f - paint.measureText(text) / 2, - size / 2f - ((paint.descent() + paint.ascent()) / 2), paint); + size / 2f - (paint.descent() + paint.ascent()) / 2, paint); return bitmap; }