summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-12-08 16:24:31 +0100
committerMorris Jobke <hey@morrisjobke.de>2017-12-08 16:24:31 +0100
commit66f523e13ff98aef8cdca9f449df7353dcf60da7 (patch)
treefca85b07b3e9f8b4933e1f6927c7deba2fb555c0
parent8e8fe6b8ebc4b3ad32a72e1262aed82c96a52b36 (diff)
downloadnextcloud-server-66f523e13ff98aef8cdca9f449df7353dcf60da7.tar.gz
nextcloud-server-66f523e13ff98aef8cdca9f449df7353dcf60da7.zip
Better center the letter and use semibold font type
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
-rw-r--r--lib/private/Avatar.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Avatar.php b/lib/private/Avatar.php
index 583a83f5166..5893daa1804 100644
--- a/lib/private/Avatar.php
+++ b/lib/private/Avatar.php
@@ -246,13 +246,14 @@ class Avatar implements IAvatar {
$white = imagecolorallocate($im, 255, 255, 255);
imagefilledrectangle($im, 0, 0, $size, $size, $background);
- $font = __DIR__ . '/../../core/fonts/OpenSans-Light.woff';
+ $font = __DIR__ . '/../../core/fonts/OpenSans-Semibold.woff';
$fontSize = $size * 0.4;
$box = imagettfbbox($fontSize, 0, $font, $text);
$x = ($size - ($box[2] - $box[0])) / 2;
$y = ($size - ($box[1] - $box[7])) / 2;
+ $x += 1;
$y -= $box[7];
imagettftext($im, $fontSize, 0, $x, $y, $white, $font, $text);