mirror of
https://github.com/Kozea/WeasyPrint.git
synced 2024-10-05 08:27:22 +03:00
check for font_config
check for font_config before attempting to add_font_face
This commit is contained in:
parent
be739e82d6
commit
0463f0d919
@ -687,10 +687,11 @@ def preprocess_stylesheet(device_media_type, base_url, stylesheet_rules,
|
||||
key.replace('_', '-'), rule.line, rule.column)
|
||||
break
|
||||
else:
|
||||
font_filename = font_config.add_font_face(
|
||||
rule_descriptors, url_fetcher)
|
||||
if font_filename:
|
||||
fonts.append(font_filename)
|
||||
if font_config is not None:
|
||||
font_filename = font_config.add_font_face(
|
||||
rule_descriptors, url_fetcher)
|
||||
if font_filename:
|
||||
fonts.append(font_filename)
|
||||
|
||||
|
||||
def get_all_computed_styles(html, user_stylesheets=None,
|
||||
|
Loading…
Reference in New Issue
Block a user