current position:Home>Python Matplotlib Tibetan has a stacking error. Help me solve the problem. I've tried many fonts. It shouldn't be a font problem.

Python Matplotlib Tibetan has a stacking error. Help me solve the problem. I've tried many fonts. It shouldn't be a font problem.

2022-02-03 02:33:00 CSDN Q & A

import matplotlib.pyplot as plt
from matplotlib import font_manager

#font_manager.fontManager.addfont('C:\Windows\Fonts\a-himalaya.ttf')
plt.rcParams['font.sans-serif'] = 'a-himalaya'
plt.text(0.5,0.5,'བསྒྲིགས གྲོགས',ha = 'center',fontsize=50);
plt.show()

img




Refer to the answer 1:

Maybe it's a font problem . Try another font . It's longer than this font .
Or change the vertical direction
va= "bottom"

ha The value of is also changed ,




Refer to the answer 2:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/02/202202030232590587.html

Random recommended