diff options
| author | Christophe Monniez <moc@odoo.com> | 2020-11-02 15:48:21 +0000 |
|---|---|---|
| committer | Christophe Monniez <moc@odoo.com> | 2020-12-09 09:56:57 +0000 |
| commit | f4a9aec57b871806fb225bf91a941edb0fde5cbe (patch) | |
| tree | 4eb468e57447424539e7f516cde2721ff6ccfcf5 /addons/web/controllers/main.py | |
| parent | c455627fe0bf473c437e43831e88e907fc462845 (diff) | |
[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.
Diffstat (limited to 'addons/web/controllers/main.py')
| -rw-r--r-- | addons/web/controllers/main.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 1a57bf87b24..13f0124e3d9 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -1686,7 +1686,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') |
