The letter should be in the middle of the image, vertically and horizontally.
This is my svg
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve">
<style type="text/css">
.st0{fill:red;}
.st1{font-family:'Tahoma';}
.st2{font-size:14px;}
.problem{alignment-baseline:central;text-anchor:middle;}
</style>
<g id="Ebene_1">
<rect x="0" y="0" class="st0" width="16" height="16"/>
<text x="8" y="8" class="st1 st2 problem">P</text>
</g>
</svg>
Code: Select all
inkscape -z -e test.png -w 1024 -h 1024 test.svg
Code: Select all
magick mogrify -size 100x100 -format jpg *.svg
What can I do to make magick or inkscape understand alignment-baseline:central, or how can I do it without this attribute?
Result is this:
Thanks for you time reading all of this. <3