Svg font does not support <use> in Safari
See original GitHub issuenanoemoji --color_format=picosvg
The svg file:
<svg width="200" height="200" viewBox="0 0 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg">
<circle fill="#F49924" cx="100" cy="100" r="100" />
<ellipse fill="#7E4418" cx="59.545" cy="71.818" rx="15" ry="21.818" />
<ellipse fill="#7E4418" cx="140.455" cy="71.818" rx="15" ry="21.818" />
</svg>
TTX file:
<SVG>
<svgDoc endGlyphID="2" startGlyphID="2">
<![CDATA[<svg xmlns="http://www.w3.org/2000/svg" version="1.1"><defs/><g id="glyph2" transform="matrix(6 0 0 6 0 -950)"><path d="M200,100 A100 100 0 1 1 0,100 A100 100 0 1 1 200,100 Z" fill="#F49924"/><path d="M74.545,71.818 A15 21.818 0 1 1 44.545,71.818 A15 21.818 0 1 1 74.545,71.818 Z" fill="#7E4418" id="glyph2::1"/><use href="#glyph2::1" x="80.91"/></g></svg>]]>
</svgDoc>
</SVG>
I think Safari does not support <use href="#glyph2::1" x="80.91"/>
, so the ellipse on the right is missing.
Expect:
Keynote
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Displaying custom fonts in SVG for iOS Chrome and Safari
- Then, go to menu option Type and select Create Outlines. This way we do not have to rely on calling fonts because...
Read more >Browser Compatibility of SVG fonts on Safari 11 - LambdaTest
SVG fonts is Fully Supported on Safari 11, which means that any user who'd be accessing your page through Safari 11 can see...
Read more >Using Fonts in SVG - Vecta.io
Cons: SVG fonts are only supported in certain browsers such as Safari and Android. It is not supported in Chrome and Firefox. This...
Read more >SVG fonts | Can I use... Support tables for HTML5, CSS3, etc
Method of using fonts defined as SVG shapes. Removed from SVG 2.0 and considered as a deprecated feature with support being removed from...
Read more >Svg font does not support gradientTransform in Safari #268
From the Twitter conversation, as far as I understand, there's a problem in Safari's OT-SVG implementation whereby it assumes that a matrix is ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I haven’t debugged this, so I don’t know if there are multiple problems with this content, but I can say right off the bat that you need to add the
xlink
namespace, and qualify thehref
attribute, as per the SVG 1.1 spec. Try this:You can see an example of this working correctly in the SVG 1.1 spec: https://www.w3.org/TR/SVG11/images/struct/Use01.svg
We do support
<use>
elements in OT-SVG.Well, that’s ok, but the position is wrong. I think we still need to use picosvg to adjust the position.(Safari)