Skip to content

Commit

Permalink
fix(avatar): adjust svg template for emoji avatar to center content i…
Browse files Browse the repository at this point in the history
…n the middle

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy committed Sep 11, 2024
1 parent 7c932c8 commit a91e251
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Service/AvatarService.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ private function getAvatarFolder(string $token): ISimpleFolder {
private string $svgTemplate = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="512" height="512" 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="330" style="font-size:240px;font-family:{font};text-anchor:middle;">{letter}</text>
<text x="50%" y="50%" style="font-size:240px;font-family:{font};text-anchor:middle;dominant-baseline:middle;">{letter}</text>
</svg>';

public function getAvatar(Room $room, ?IUser $user, bool $darkTheme = false): ISimpleFile {
Expand Down

0 comments on commit a91e251

Please sign in to comment.