mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix fetching of liberation fonts
Also add them to .gitignore
This commit is contained in:
parent
ebffa0a506
commit
5f67dd54b5
1
.gitignore
vendored
1
.gitignore
vendored
@ -30,6 +30,7 @@ resources/viewer.html
|
|||||||
resources/content-server/index-generated.html
|
resources/content-server/index-generated.html
|
||||||
resources/content-server/locales.zip
|
resources/content-server/locales.zip
|
||||||
resources/mathjax
|
resources/mathjax
|
||||||
|
resources/fonts/liberation
|
||||||
resources/mozilla-ca-certs.pem
|
resources/mozilla-ca-certs.pem
|
||||||
resources/user-agent-data.json
|
resources/user-agent-data.json
|
||||||
icons/icns/*.iconset
|
icons/icns/*.iconset
|
||||||
|
@ -24,9 +24,10 @@ class LiberationFonts(ReVendor):
|
|||||||
def run(self, opts):
|
def run(self, opts):
|
||||||
self.clean()
|
self.clean()
|
||||||
os.makedirs(self.vendored_dir)
|
os.makedirs(self.vendored_dir)
|
||||||
|
self.use_symlinks = opts.system_liberation_fonts
|
||||||
with self.temp_dir() as dl_src:
|
with self.temp_dir() as dl_src:
|
||||||
src = opts.path_to_hyphenation or self.download_vendor_release(dl_src, opts.hyphenation_url)
|
src = opts.path_to_liberation_fonts or self.download_vendor_release(dl_src, opts.liberation_fonts_url)
|
||||||
font_files = glob.glob(os.path.join(src, '*/Liberation*.ttf'))
|
font_files = glob.glob(os.path.join(src, 'Liberation*.ttf'))
|
||||||
if not font_files:
|
if not font_files:
|
||||||
raise SystemExit(f'No font files found in {src}')
|
raise SystemExit(f'No font files found in {src}')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user