renoyuan / easyofd

use python parse OFD file: finished ofd2img ofd2pdf pdf2ofd img2ofd ;(纯 python的ofd解析与pdf转换)
Apache License 2.0
194 stars 27 forks source link

m1中无找到找楷体及宋体! #5

Open xuanyimin opened 8 months ago

xuanyimin commented 8 months ago

在Macm1中demo无法找到楷体及宋体! gpt给了个办法: from reportlab.pdfbase import pdfmetrics from reportlab.pdfbase.ttfonts import TTFont

pdfmetrics.registerFont(TTFont('楷体', '楷体.ttf')) pdfmetrics.registerFont(TTFont('宋体', '宋体.ttc'))