问题描述
我想在Inkscape文本对象中的同一字符上同时添加上标和下标。目前,我有这个:
但是我希望撇号(')和0垂直对齐,以便x具有(')作为上标和0作为下标。
解决方法
您可以对零索引使用负水平字距调整。查看右上方的红色框框。
文本元素的SVG如下所示:
$client = new \GuzzleHttp\Client();
$response = $client->request('GET',$request_url,[
'headers' => ['Accept' => 'application/xml'],'timeout' => 120
])->getBody()->getContents();
$responseXml = simplexml_load_string($response);
if ($responseXml instanceof \SimpleXMLElement)
{
$key_value = (string)$responseXml->key_name;
}
请注意<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.584px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.2646"
x="29.4"
y="29.48"
id="text3715"><tspan
sodipodi:role="line"
id="tspan3713"
x="29.4"
y="29.48"
style="stroke-width:0.2646"
dx="0 0 0 0 5 0 0 0 3.5">(x'<tspan
style="font-size:65%;baseline-shift:sub"
id="tspan3717"
dx="-3.5">0</tspan>,y'<tspan
style="font-size:65%;baseline-shift:sub"
id="tspan3719"
dx="-3.5">0</tspan>)</tspan></text>
属性。