We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ab66e3 commit f501925Copy full SHA for f501925
src/Avatar.php
@@ -228,14 +228,13 @@ public function toSvg()
228
.'" fill="'.$this->background.'" />';
229
}
230
231
- $svg .= '<text x="'.$center.'" y="'.$center;
232
- $svg .= '" font-size="'.$this->fontSize;
+ $svg .= '<text font-size="'.$this->fontSize;
233
234
if ($this->fontFamily) {
235
$svg .= '" font-family="'.$this->fontFamily;
236
237
238
- $svg .= '" fill="'.$this->foreground.'" alignment-baseline="middle" text-anchor="middle" dominant-baseline="central">';
+ $svg .= '" fill="'.$this->foreground.'" x="50%" y="50%" dy=".1em" style="line-height:1" alignment-baseline="middle" text-anchor="middle" dominant-baseline="central">';
239
$svg .= $this->getInitial();
240
$svg .= '</text>';
241
0 commit comments