import matplotlib.font_manager as fm
from matplotlib import ft2font
from matplotlib.font_manager import ttfFontProperty
font = ft2font.FT2Font(fpath)
fprop = fm.FontProperties(fname=fpath)
ttfFontProp = ttfFontProperty(font)
fontsize=15
fontprop = fm.FontProperties(family='serif',
#name=ap.fontprop.name,
fname=ttfFontProp.fname,
size=fontsize,
stretch=ttfFontProp.stretch,
style=ttfFontProp.style,
variant=ttfFontProp.variant,
weight=ttfFontProp.weight)
matplotlib.rcParams.update({'font.size': fontsize,
'font.family': 'serif'})
0 件のコメント:
コメントを投稿