aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Avatar
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <hey@jancborchardt.net>2019-06-21 22:35:30 +0200
committerJan-Christoph Borchardt <hey@jancborchardt.net>2019-06-22 11:23:44 +0200
commitd14c0f2ed7ab02fb470941752d0a027631a6a19a (patch)
tree8d4e1579518244244dd12ffa4c55c09fd774e2fe /lib/private/Avatar
parent9d121985dc2980ca9c3b4a69d807926d2424757d (diff)
downloadnextcloud-server-d14c0f2ed7ab02fb470941752d0a027631a6a19a.tar.gz
nextcloud-server-d14c0f2ed7ab02fb470941752d0a027631a6a19a.zip
Move font from Nunito to Noto Sans
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
Diffstat (limited to 'lib/private/Avatar')
-rw-r--r--lib/private/Avatar/Avatar.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/Avatar/Avatar.php b/lib/private/Avatar/Avatar.php
index 4468af82053..172f47d12a8 100644
--- a/lib/private/Avatar/Avatar.php
+++ b/lib/private/Avatar/Avatar.php
@@ -50,8 +50,8 @@ abstract class Avatar implements IAvatar {
/**
* https://github.com/sebdesign/cap-height -- for 500px height
* Automated check: https://codepen.io/skjnldsv/pen/PydLBK/
- * Nunito cap-height is 0.716 and we want a 200px caps height size
- * (0.4 letter-to-total-height ratio, 500*0.4=200), so: 200/0.716 = 279px.
+ * Noto Sans cap-height is 0.715 and we want a 200px caps height size
+ * (0.4 letter-to-total-height ratio, 500*0.4=200), so: 200/0.715 = 280px.
* Since we start from the baseline (text-anchor) we need to
* shift the y axis by 100px (half the caps height): 500/2+100=350
*
@@ -60,7 +60,7 @@ abstract class Avatar implements IAvatar {
private $svgTemplate = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="{size}" height="{size}" version="1.1" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg">
<rect width="100%" height="100%" fill="#{fill}"></rect>
- <text x="50%" y="350" style="font-weight:normal;font-size:279px;font-family:\'Nunito\';text-anchor:middle;fill:#fff">{letter}</text>
+ <text x="50%" y="350" style="font-weight:normal;font-size:280px;font-family:\'Noto Sans\';text-anchor:middle;fill:#fff">{letter}</text>
</svg>';
/**
@@ -141,7 +141,7 @@ abstract class Avatar implements IAvatar {
return false;
}
try {
- $font = __DIR__ . '/../../core/fonts/Nunito-Regular.ttf';
+ $font = __DIR__ . '/../../core/fonts/NotoSans-Regular.ttf';
$svg = $this->getAvatarVector($size);
$avatar = new Imagick();
$avatar->setFont($font);
@@ -176,7 +176,7 @@ abstract class Avatar implements IAvatar {
$white = imagecolorallocate($im, 255, 255, 255);
imagefilledrectangle($im, 0, 0, $size, $size, $background);
- $font = __DIR__ . '/../../../core/fonts/Nunito-Regular.ttf';
+ $font = __DIR__ . '/../../../core/fonts/NotoSans-Regular.ttf';
$fontSize = $size * 0.4;
list($x, $y) = $this->imageTTFCenter(