Thanks to visit codestin.com
Credit goes to github.com

Skip to content

font-stretch property missing in svg export #16479

Closed
@mhabets

Description

@mhabets

Bug report

Bug summary

Code for reproduction

# plt.rcParams['svg.fonttype'] = 'none'
# ...
# text.set_fontname('Arial')
# text.set_fontstretch('condensed')
# plt.savefig('file.svg')

Actual outcome

SVG file excerpt:

<text style="fill:#333333;font-family:Arial;font-size:6px;font-style:normal;font-weight:normal;text-anchor:end;" transform="rotate(-0, 37.553438, 29.131358)" x="37.553438" y="29.131358">PHY</text>

font-property is missing

Expected outcome

<text style="fill:#333333;font-family:Arial;font-size:6px;font-style:normal;font-weight:normal;font-stretch:condensed;text-anchor:end;" transform="rotate(-0, 37.553438, 29.131358)" x="37.553438" y="29.131358">PHY</text>

font-property is included

Matplotlib version

  • Operating system: Windows 10
  • Matplotlib version: 3.1 (conda)
  • Python version: 3.7

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions