8000 Deprecate svgfont support, possibly replacing with woff? · Issue #10063 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Deprecate svgfont support, possibly replacing with woff? #10063
Closed
@anntzer

Description

@anntzer

Bug report

Bug summary

The svg backend currently exposes the svg.fonttype = svgfont option, which embeds fonts into the svg file using the "svg fonts" feature which appears to be essentially unsupported anywhere and removed from the svg standard (https://caniuse.com/#feat=svg-fonts https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/SVG_fonts). The code path was also not working at all on Py3 (#10046).

I would thus suggest deprecating support for svg fonts.

A possibility to still allow embedding the font file into the svg file would be to use the apparently more popular WOFF(2) format, see https://developer.mozilla.org/en-US/docs/Web/Guide/WOFF https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face for the format, http://www.sameratiani.com/2011/10/16/embed-inline-webfonts-in-css.html for embedding the font into the svg file itself, and https://caniuse.com/#search=woff for support. A quick test suggests that this is supported but chrome/firefox, but not by inkscape, but at least inkscape emits a warning and replaces the embedded font by another one, whereas it appears to freeze with the current implementation of svg fonts.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0