Skip to content

[Bug]: Font rendering bug for Devanagari text #23082

Open
@kach

Description

@kach

Bug summary

When rendered as part of a graph's axis label or title, Devanagari text renders incorrectly: the "matras" get affixed to the wrong letters (see the attached image, and note the difference between the string literal in the code and the rendered text in the title of the graph).

Code for reproduction

from matplotlib import pyplot as plt
import matplotlib
matplotlib.rc('font', family='Devanagari Sangam MN')
matplotlib.rc('font', size=18)

plt.title('किसान')

Actual outcome

image

Expected outcome

The rendered word should look the same as in the string literal in the code.

Additional information

No response

Operating system

macOS

Matplotlib Version

3.4.1

Matplotlib Backend

module://ipykernel.pylab.backend_inline

Python version

Python 3.9.12

Jupyter version

6.3.0

Installation

pip

Metadata

Metadata

Assignees

Type

No type

Projects

Status

In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions