opendatalab / PDF-Extract-Kit

A Comprehensive Toolkit for High-Quality PDF Content Extraction
GNU Affero General Public License v3.0
4.72k stars 319 forks source link

Font path fix #115

Open jorgeolothar opened 1 week ago

jorgeolothar commented 1 week ago

In latex2png.py -> zhtext2pil(), the font directory should be included:

fontText = ImageFont.truetype("simhei.ttf", 15, encoding="utf-8")

should be

fontText = ImageFont.truetype("assets/fonts/simhei.ttf", 15, encoding="utf-8")