fix bad font globbing

workspace
Brendan Howell 5 years ago
parent f0c1835d82
commit a285e7d25d

@ -356,11 +356,12 @@ class Bureau(object):
self.log.debug("rendering to: " + pdfpath)
fontconfig = FontConfiguration()
fontsdir = os.path.join(self.mdir, "fonts")
for font in glob.glob(fontsdir + ".otf"):
self.log.debug(fontsdir)
for font in glob.glob(fontsdir + "*.otf"):
self.log.debug("adding font " + "file://" + font)
fontconfig.add_font_face("file://" + font,
weasyprint.default_url_fetcher)
for font in glob.glob(fontsdir + ".ttf"):
for font in glob.glob(fontsdir + "*.ttf"):
self.log.debug("adding font " + "file://" + font)
fontconfig.add_font_face("file://" + font,
weasyprint.default_url_fetcher)

Loading…
Cancel
Save