写小论文的时候英文要求用new times roman, 然而在colab中总是提示:
findfont: Font family ['serif'] not found. Falling back to DejaVu Sans.
后期用ps改太累,不如一劳永逸解决无法用new times roman的问题。
思路来自:
我的方法:
import matplotlib as mpl
import matplotlib.font_manager as fm
import matplotlib.pyplot as plt
import numpy as np
调包不能少,先都import一下吧。
!wget -O /usr/local/share/fonts/Times.ttf https://drive.google.com/file/d/