Hello, I am new here so please forgive me if I do something wrong here.
I am trying to select a style for a system font to be set in rcParams, for example, “Bold” style of “Noto Sans CJK SC”. Here is the information of the installed font:
$ fc-list | grep "Noto Sans CJK SC"
/usr/share/fonts/noto-cjk/NotoSansCJK.otf: Noto Sans CJK SC:style=Thin,Regular
/usr/share/fonts/noto-cjk/NotoSansCJK.otf: Noto Sans CJK SC:style=Black
/usr/share/fonts/noto-cjk/NotoSansCJK.otf: Noto Sans CJK SC:style=Regular
/usr/share/fonts/noto-cjk/NotoSansCJK.otf: Noto Sans CJK SC
/usr/share/fonts/noto-cjk/NotoSansCJK.otf: Noto Sans CJK SC:style=DemiLight
/usr/share/fonts/noto-cjk/NotoSansCJK.otf: Noto Sans CJK SC:style=Light
/usr/share/fonts/noto-cjk/NotoSansCJK.otf: Noto Sans CJK SC:style=Medium
/usr/share/fonts/noto-cjk/NotoSansCJK.otf: Noto Sans CJK SC:style=Bold
And the output figure of the code below:
import matplotlib.pyplot as plt
plt.rcParams['font.family'] = 'sans-serif'
plt.rcParams['font.sans-serif'] = ['Noto Sans CJK SC']
plt.rcParams['font.weight'] = 'bold'
plt.title('测试标题')
plt.show()
is like:
It seems that matplotlib chooses a thin style of this font, even if I have set font.weight to bold. So how to set a different style for the font? Thanks for all your replies.
