SVG文本元素无法呈现我的自定义字体?

时间:2018-04-26 13:49:28

标签: svg fonts true-type-fonts

我有一个自定义字体在浏览器中无法正常呈现,但其他ttf字体工作正常。

<svg width="175" height="106" viewBox="0 0 175 106" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <defs>
        <style>
            @font-face{
                font-family: 'aaaRoses';
                src: url("http://localhost/wordpress_update/xxxx/xxx/xxx/aaaRoses.ttf") format('truetype');}</style>
        </defs>
        <g id="0.5613727900199592">
        <text fill="#000000" stroke="none" stroke-width="0" stroke-linecap="round" 
        stroke-linejoin="round" x="65" y="79" text-anchor="middle" font-size="90.75" font-family="aaaRoeses" data-textcurve="0" data-itemzoom="1 1">
            <tspan dy="0" x="49%">Hello</tspan></text>
        </g>
</svg>

0 个答案:

没有答案
相关问题