import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontManager
matplotlib.rc("font",family=‘YouYuan‘)
mpl_fonts = set(f.name for f in FontManager().ttflist)
原文:https://www.cnblogs.com/lpdeboke/p/15100490.html