another approach to fixing the avatar generation

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-03-23 23:37:46 +01:00
parent 553b5a51f6
commit 6a91d105b9

View File

@ -129,6 +129,11 @@ abstract class Avatar implements IAvatar {
if (!extension_loaded('imagick')) {
return null;
}
$formats = Imagick::queryFormats();
// Avatar generation breaks if RSVG format is enabled. Fall back to gd in that case
if (in_array("RSVG", $formats, true)) {
return null;
}
try {
$font = __DIR__ . '/../../../core/fonts/NotoSans-Regular.ttf';
$svg = $this->getAvatarVector($size, $darkTheme);