1
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="overflow: hidden; position: relative;" width="100%" version="1.1" height="100%"><defs><style> @import url(http://fonts.googleapis.com/css?family=Faster+One);</style></defs><text transform="matrix(1,0,0,1,0,0)" style="text-anchor: middle; ; font-size: 100px;" x="10%" y="32.36134453781513%" text-anchor="middle" font="" stroke="none" fill="#000000" font-family="   Faster One   , cursive" font-size="78%" id="text2"><tspan dy="NaN">hii</tspan></text></svg>

PHP を使用してこのsvgpngimagickに変換しようとすると、テキストはデフォルトのフォント (arial) でのみレンダリングされます。

png に変換するときに、同じ Google フォントを使用してテキストをレンダリングする方法はありますか?

どんな助けでも大歓迎です。前もって感謝します。

4

1 に答える 1

0

PhantomJS は、少しの作業で Google フォントを含む SVG をレンダリングできます。https://github.com/ariya/phantomjs/issues/10592

于 2013-04-22T23:58:46.497 に答える