[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:
Christophe Monniez
2020-12-14 09:05:09 +00:00
parent e9c16a0119
commit bc1a017bb8
16 changed files with 467 additions and 1 deletions
+1 -1
View File
@@ -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')