linux手动安装字体
有时候apt/yum库无法自动安装字体, 需要手动安装
首先下载.ttf结尾的字体, 或者从windows上找到, 拷贝到Linux中
这里我是从google font下载的字体
1 | scp NotoSerifSC-VariableFont_wght.ttf root@your-host:/usr/share/fonts/NotoSerifSC-VariableFont_wght/ # 记得提前mkdir |
然后加载ttf字体
1 | fc-cache -fv |
然后就可以使用了, 比如py里. 可能识别不到, 需要先清除plt缓存rm -rf ~/.cache/matplotlib
1 | import matplotlib.pyplot as plt |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Juice's Blog!






