From 4432cfd445d2dea2792c0cc2550445506ba8a18a Mon Sep 17 00:00:00 2001 From: "John Molakvoæ (skjnldsv)" Date: Sat, 19 May 2018 08:47:29 +0200 Subject: Embedded font MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- lib/private/Avatar.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'lib/private/Avatar.php') diff --git a/lib/private/Avatar.php b/lib/private/Avatar.php index 0ea2b82f5ea..0164d73a2e3 100644 --- a/lib/private/Avatar.php +++ b/lib/private/Avatar.php @@ -68,6 +68,14 @@ class Avatar implements IAvatar { */ private $svgTemplate = ' + + + {letter} '; @@ -287,9 +295,10 @@ class Avatar implements IAvatar { $bgRGB = $this->avatarBackgroundColor($userDisplayName); $bgHEX = sprintf("%02x%02x%02x", $bgRGB->r, $bgRGB->g, $bgRGB->b); $letter = mb_strtoupper(mb_substr($userDisplayName, 0, 1), 'UTF-8'); + $font = \OC::$WEBROOT.'/core/fonts/OpenSans-Semibold.ttf'; - $toReplace = ['{size}', '{fill}', '{letter}']; - return str_replace($toReplace, [$size, $bgHEX, $letter], $this->svgTemplate); + $toReplace = ['{size}', '{fill}', '{letter}', '{font}']; + return str_replace($toReplace, [$size, $bgHEX, $letter, $font], $this->svgTemplate); } /** -- cgit v1.2.3