fix: get_fonts() returns incorrect paths (if folder= supplied)

This commit is contained in:
Philipp Klaus 2018-01-24 11:59:32 +01:00
parent 5f1447dee0
commit b1af3e8810

View File

@ -11,7 +11,7 @@ def get_fonts(folder=None):
"""
fonts = {}
if folder:
cmd = ['fc-scan', '--format', '"%{file}:%{family}:style=%{style}\n"', folder]
cmd = ['fc-scan', '--format', '%{file}:%{family}:style=%{style}\n', folder]
else:
cmd = ['fc-list', ':', 'file', 'family', 'style']
for line in subprocess.check_output(cmd).decode('utf-8').split("\n"):