Skip to content

Commit

Permalink
Adapts the code to the new master state
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
  • Loading branch information
weeman1337 committed Dec 9, 2018
1 parent 428993d commit c159e7d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/private/Avatar/Avatar.php
Original file line number Diff line number Diff line change
Expand Up @@ -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:279px;font-family:Nunito, sans-serif;text-anchor:middle;fill:#fff">{letter}</text>
</svg>';

/**
Expand Down Expand Up @@ -174,7 +174,7 @@ protected function generateAvatar($userDisplayName, $size) {
$white = imagecolorallocate($im, 255, 255, 255);
imagefilledrectangle($im, 0, 0, $size, $size, $background);

$font = __DIR__ . '/../../core/fonts/Nunito-Regular.ttf';
$font = __DIR__ . '/../../../core/fonts/Nunito-Regular.ttf';

$fontSize = $size * 0.4;
list($x, $y) = $this->imageTTFCenter(
Expand Down
2 changes: 1 addition & 1 deletion tests/data/guest_avatar_einstein_32.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/lib/Avatar/UserAvatarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public function testGenerateSvgAvatar() {
$svg = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="64" height="64" version="1.1" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg">
<rect width="100%" height="100%" fill="#0082c9"></rect>
<text x="50%" y="350" style="font-weight:normal;font-size:279px;font-family:\'Nunito\';text-anchor:middle;fill:#fff">A</text>
<text x="50%" y="350" style="font-weight:normal;font-size:279px;font-family:Nunito, sans-serif;text-anchor:middle;fill:#fff">A</text>
</svg>';
$this->assertEquals($avatar, $svg);
}
Expand Down

0 comments on commit c159e7d

Please sign in to comment.