Skip to content

kerning seems generally wrong #14887

Closed
@anntzer

Description

@anntzer

Bug report

Bug summary

Matplotlib seems to fail to apply kerning correctly.

Code for reproduction

figtext(.5, .5, "AV", size=36); figtext(.5, .4, "Te", size=36)

Actual outcome

test
and similarly for pdf/ps/svg output.

Expected outcome

with mplcairo, one gets:
cairo

Note that it's not that matplotlib doesn't apply kerning at all -- there is definitely code a bit everywhere to apply it, but it looks like we're getting wrong values. See also https://matplotlib.org/gallery/misc/font_indexing.html which shows that get_kerning apparently returns 0 when it shouldn't.

Matplotlib version

  • Operating system: linux
  • Matplotlib version: master
  • Matplotlib backend (print(matplotlib.get_backend())): agg/mplcairo
  • Python version: 37
  • Jupyter version (if applicable):
  • Other libraries:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions