More general

main
Bob Mottram 2020-07-12 20:49:09 +00:00
parent fe5e21ee7d
commit 3ebf0a3b03
1 changed files with 2 additions and 2 deletions

View File

@ -2245,9 +2245,9 @@ def htmlNewPost(mediaInstance: bool, translate: {},
def getFontFromCss(css: str) -> (str, str):
"""Returns the font name and format
"""
if 'src: url(' not in css:
if ' url(' not in css:
return None, None
fontName = css.split("src: url('")[1].split("')")[0]
fontName = css.split(" url('")[1].split("')")[0]
fontFormat = css.split(" format('")[1].split("')")[0]
return fontName, fontFormat