Linux Matplotlib 安装 Times New Roman 字体

1
2
3
4
5
6
7
8
9
10
cd
curl https://dl.freefontsfamily.com/download/Times-New-Roman-Font/ -o Times-New-roman.zip

unzip Times-New-roman.zip

python -c "import matplotlib; print(f'path to mpl-data: {matplotlib.matplotlib_fname()[:-12]}')"

cp 'Times New Roman'/* /path/to/mpl-data/fonts/ttf/

rm -rf ~/.cache/matplotlib
0%