fix bad font globbing

workspace
Brendan Howell 5 years ago
parent a285e7d25d
commit ab019f6377

@ -357,11 +357,11 @@ class Bureau(object):
fontconfig = FontConfiguration() fontconfig = FontConfiguration()
fontsdir = os.path.join(self.mdir, "fonts") fontsdir = os.path.join(self.mdir, "fonts")
self.log.debug(fontsdir) self.log.debug(fontsdir)
for font in glob.glob(fontsdir + "*.otf"): for font in glob.glob(fontsdir + "/*.otf"):
self.log.debug("adding font " + "file://" + font) self.log.debug("adding font " + "file://" + font)
fontconfig.add_font_face("file://" + font, fontconfig.add_font_face("file://" + font,
weasyprint.default_url_fetcher) 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) self.log.debug("adding font " + "file://" + font)
fontconfig.add_font_face("file://" + font, fontconfig.add_font_face("file://" + font,
weasyprint.default_url_fetcher) weasyprint.default_url_fetcher)

Loading…
Cancel
Save