4
我使用的是自定義字體從谷歌svg,但我自己託管它。下面是the SVG file用下面的代碼:在iOS中使用SVG顯示自定義字體Chrome和Safari
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="430" height="590">
<defs>
<style type="text/css"><![CDATA[
@font-face {
font-family: 'Fjalla';
src: url('http://build-podcast.com/fonts/fjalla.eot');
src: url('http://build-podcast.com/fonts/fjalla.eot?#iefix') format('embedded-opentype'),
url('http://build-podcast.com/fonts/fjalla.woff') format('woff'),
url('http://build-podcast.com/fonts/fjalla.ttf') format('truetype'),
url('http://build-podcast.com/fonts/fjalla.svg#fjalla') format('svg');
font-weight: normal;
font-style: normal;
}
text { font-family: Fjalla, sans-serif; font-weight: bold; fill: #4b5568; }
]]>
</style>
</defs>
<g id="logo">
<text x="135" y="60" font-size="210" transform="rotate(45)">/</text>
<text x="115" y="363" font-size="210" transform="rotate(-45)">\</text>
<text x="15" y="341" font-size="200">build</text>
<text x="15" y="475" font-size="127">podcast</text>
<text x="21" y="540" font-size="36">screencasts on tech tools</text>
</g>
</svg>
我使用img
標記來顯示它的main website
<img src="logo.svg">
它顯示在桌面瀏覽器,甚至在像Android這樣的Chrome移動瀏覽器的罰款。但它在iOS 7 Chrome或Android中完全不顯示。任何關於如何修改自定義字體部分的SVG文件代碼的線索?謝謝!
爲了簡單起見,我已將其轉換爲路徑,它適用於所有桌面和移動瀏覽器。這是一個工作,雖然。 – Sayanee