1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 16:37:47 +03:00

check for font_config

check for font_config before attempting to add_font_face
This commit is contained in:
Keith Callenberg 2016-11-17 15:29:39 -05:00 committed by GitHub
parent be739e82d6
commit 0463f0d919

View File

@ -687,6 +687,7 @@ def preprocess_stylesheet(device_media_type, base_url, stylesheet_rules,
key.replace('_', '-'), rule.line, rule.column) key.replace('_', '-'), rule.line, rule.column)
break break
else: else:
if font_config is not None:
font_filename = font_config.add_font_face( font_filename = font_config.add_font_face(
rule_descriptors, url_fetcher) rule_descriptors, url_fetcher)
if font_filename: if font_filename: