def GetFontProperties(font):
fontfile = r"C:\WINDOWS\Fonts\{0}".format(font['family'])
if not os.path.exists(fontfile):
fp = FontProperties(family=font['family'], weight=font['weight'], size=font['size'])
else:
fp = FontProperties(fname=fontfile, weight=font['weight'], size=font['size'])
return fp
评论列表
文章目录