question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Safari rejects OT-SVG if contains more than 2000 documents

See original GitHub issue

When an OT-SVG table contains more than 2000 unique svg documents, Safari won’t display the color glyphs any more…

I made two test fonts, one with 2000 svgs, the other with 2001. The former works, the latter does not.

safari-max-2000-svgs-bug.zip

@miguelsousa already noted this bug in https://github.com/adobe-fonts/noto-emoji-svg#warning-note-2-warning

Grouping more than one svg into the same document (covering a range of glyph indexes) seems to work around this issue.

We already do that for --color_format=picosvg where we group glyphs by shape reuse. We might have to do that also for untouchedsvg format, where we currently add one svg document in OT-SVG table for each input SVG. Otherwise if the count > 2000 (which is often the case for emoji fonts), they will stop working in Safari.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
twardochcommented, Apr 12, 2022

Safari Version 15.4 (17613.1.17.1.13) on macOS Monterey 12.3.1 renders it fine.

scr- 2022-04-12 at 15 22 38
1reaction
yisiblcommented, Apr 19, 2021

Thanks to @anthrotype for such in-depth research, your spirit is admirable.

If this problem cannot be reproduced stably, I suggest to shelve it for now. You can add some instructions in the readme to tell the user (designer) that you need to reduce the number of elements in the glyph when designing the icon to avoid the problem that Safari may not be able to display it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cosimo Lupo on Twitter: "Question for color font experts. Safari ...
Safari supposedly supports SVG-in-OpenType fonts, however it rejects them when ... Safari rejects OT-SVG if contains more than 2000 documents · Issue #276 ......
Read more >
Svg does not work in Safari and Firerox - Stack Overflow
Then I tried to reproduce the error and I create a new svg document with Inkscape and I draw anything, like a "p"...
Read more >
Safari Technology Preview Release Notes - Apple Developer
Preview the new type of phishing-resistant credential that makes signing in to websites safer and easier. Available through Safari's WebAuthn platform ...
Read more >
<use> - SVG: Scalable Vector Graphics - MDN Web Docs
The effect is the same as if the nodes were deeply cloned into a non-exposed DOM, then pasted where the use element is,...
Read more >
A Complete Guide to SVG Fallbacks - CSS-Tricks
If you're using SVG and are worried about unsupported environments, this is the guide for you. There is no single solution, since how...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found