1
我有使用龙虾测试SVG浏览: 如何为SVG转换设置ImageMagick字体路径?
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="2400" height="3200" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<style>
@import url('http://fonts.googleapis.com/css?family=Lobster');
</style>
</defs>
<text id="SvgjsText1046" font-family="Lobster" fill="#000000" font-size="30px" stroke-width="0" font-style="" font-weight="" text-decoration=" " x="859.9871134019216" y="476.38530927854697" transform="rotate(0 1214.8671520099174 1164.5108891121047) translate(-9360.999092988961 -5185.475896759851) scale(11.885045772324295 11.885045772324297) ">
<tspan id="SvgjsTspan1072" dy="29">TEST</tspan>
<tspan id="SvgjsTspan1073" dy="29">TEST</tspan>
<tspan id="SvgjsTspan1074" dy="29">TEST</tspan>
</text>
</svg>
这使得精细的浏览器,但ImageMagick的转换成PNG时(使用PHP),字体不渲染。
我知道你可以使用setFont命令设置单个字体,但SVG可能包含多个字体。
在这种情况下,有没有什么方法可以为ImageMagick设置字体目录?
感谢您的信息。这似乎是一个问题,因为我必须采用N个字体的SVG并与其他图像构建复合。 GD能做到这一点一样简单吗? –