Safari rejects OT-SVG if contains more than 2000 documents
See original GitHub issueWhen 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.
@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:
- Created 2 years ago
- Reactions:1
- Comments:14 (9 by maintainers)
Top GitHub Comments
Safari Version 15.4 (17613.1.17.1.13) on macOS Monterey 12.3.1 renders it fine.
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.