Skip to content

[Doc]: Add guidance how to deal with unstable text rendering in downstream tests (such as the changes in 3.11.0rc1) #31575

@flying-sheep

Description

@flying-sheep

Bug summary

Hi, using matplotlib.testing.setup() on 3.11.0rc1, I get changes in the font rendering compared to 3.10.9, breaking our plotting tests.

How can I get the same rendering on both versions? I’m happy to change the reference images, but I need to unify the rendering somehow.

Code for reproduction

import matplotlib.pyplot as plt
from matplotlib.testing import setup

setup()

plt.figure(figsize=(4, 1))
plt.plot(range(3))
plt.yticks(range(3), ["Fib", "Flib", "Flob"])
plt.gcf()

Actual outcome

Actually good kerning that I’m excited about seeing in the future!

Image

Expected outcome

Bad kerning like in 3.10.9

Image

Additional information

See debug-data-hatch-test.pre.zip for failed test images

Operating system

macOS (images above come from there) and Ubuntu (test failures observed there)

Matplotlib Version

3.11.0rc1

Matplotlib Backend

Agg

Python version

3.14.0

Jupyter version

No response

Installation

uv

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions