[FIX] web: replace ttf fonts used to sign with better ones
Some ttf fonts used to sign are shipped does not come with a clear licensing. Also some of them does not have accented characters. With this commit, they are replaced with better ones and their accompanying Open Font License. Also, before this commit, any file in the font directory was read to be rendered by the sign widget. With this commit, only `ttf`, `otf` and 'woff[2]' files are read, this allows to store the license file alongside with the font. X-original-commit: f4a9aec57b871806fb225bf91a941edb0fde5cbe
This commit is contained in:
@@ -1685,7 +1685,7 @@ class Binary(http.Controller):
|
||||
else:
|
||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
fonts_directory = os.path.join(current_dir, '..', 'static', 'src', 'fonts', 'sign')
|
||||
font_filenames = sorted(os.listdir(fonts_directory))
|
||||
font_filenames = sorted([fn for fn in os.listdir(fonts_directory) if fn.endswith(('.ttf', '.otf', '.woff', '.woff2'))])
|
||||
|
||||
for filename in font_filenames:
|
||||
font_file = open(os.path.join(fonts_directory, filename), 'rb')
|
||||
|
||||
Reference in New Issue
Block a user