mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 01:03:26 +02:00
EPUB viewer:Support quotes in the path to embedded font files
This commit is contained in:
parent
6175dca686
commit
1a98b0c266
1 changed files with 1 additions and 1 deletions
|
|
@ -95,7 +95,7 @@ def find_embedded_fonts(self):
|
|||
for match in re.compile(r'@font-face\s*{([^}]+)}').finditer(css):
|
||||
block = match.group(1)
|
||||
family = re.compile(r'font-family\s*:\s*([^;]+)').search(block)
|
||||
url = re.compile(r'url\s*\((.+?)\)', re.DOTALL).search(block)
|
||||
url = re.compile(r'url\s*\([\'"]*(.+?)[\'"]*\)', re.DOTALL).search(block)
|
||||
if url:
|
||||
path = url.group(1).split('/')
|
||||
path = os.path.join(os.path.dirname(item.path), *path)
|
||||
|
|
|
|||
Loading…
Reference in a new issue