From 5e42988fc5ae8dadf2d24ff4bb108a2876264b5d Mon Sep 17 00:00:00 2001 From: MasterInQuestion Date: Sun, 31 Dec 2023 08:30:55 +0800 Subject: [PATCH] Add basic font MIME types Namely: |*| ".ttf": "font/ttf" |*| ".otf", ".otc", ".ttc": "font/otf" |*| ".woff": "font/woff" |*| ".woff2": "font/woff2" References: https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face#font_mime_types https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src#font_formats https://en.wikipedia.org/wiki/OpenType https://en.wikipedia.org/wiki/TrueType --- Lib/mimetypes.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index 37228de4828de5..b392e25737a708 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -514,6 +514,12 @@ def _default_mime_types(): '.aiff' : 'audio/x-aiff', '.ra' : 'audio/x-pn-realaudio', '.wav' : 'audio/x-wav', + '.otc' : 'font/otf', + '.otf' : 'font/otf', + '.ttc' : 'font/otf', + '.ttf' : 'font/ttf', + '.woff' : 'font/woff', + '.woff2' : 'font/woff2', '.avif' : 'image/avif', '.bmp' : 'image/bmp', '.gif' : 'image/gif',