Skip to content

Deprecate svgfont support, possibly replacing with woff? #10063

Closed

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.

Activity

  1. added this to the milestone on Jan 2, 2018
  2. tacaswell commented on Jan 2, 2018

    @tacaswell
    Member

    removed from the svg standard

    That is indeed a compelling argument.

  3. github-actions commented on Apr 28, 2023

    @github-actions

    This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

  4. ksunden commented on Apr 28, 2023

    @ksunden
    Member

    Closed by #10086, just never was properly linked, it was fully removed later (didn't track down exactly when)

  5. QuLogic commented on Apr 28, 2023

    @QuLogic
    Member

    It was fully removed in #12245.

  6. anntzer commented on Apr 28, 2023

    @anntzer
    ContributorAuthor

    I think we can keep this open to track the possibility of implementing woff(2) support? Feel free to reclose if you disagree.

  7. timhoffm commented on Apr 28, 2023

    @timhoffm
    Member

    Then, change the title or rather make a new ticket so that one can see the state immediately?

  8. anntzer commented on Apr 29, 2023

    @anntzer
    ContributorAuthor

    Sure, see #25791.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions