-
-
Notifications
You must be signed in to change notification settings - Fork 42
Description
zimcreatorfs.cpp has some hard coded mime type checks that otherwise don't exist in the mime type map in zimwriterfs/tools.cpp. I stumbled upon this when working on #444.
Code in question:
zim-tools/src/zimwriterfs/zimcreatorfs.cpp
Lines 376 to 380 in 3ad99a1
if (mimeType == "application/font-ttf" | |
|| mimeType == "application/font-woff" | |
|| mimeType == "application/font-woff2" | |
|| mimeType == "application/vnd.ms-opentype" | |
|| mimeType == "application/vnd.ms-fontobject") { |
These mime types used in zimcreatorfs don't exist in the zimwriterfs/tools.cpp:extMimeTypes map:
"application/font-ttf"
"application/font-woff"
"application/font-woff2"
"application/vnd.ms-opentype"
These are the closest mimetypes in tools:
zim-tools/src/zimwriterfs/tools.cpp
Line 34 in 3ad99a1
static std::map<std::string, std::string> _create_extMimeTypes() |
extMimeTypes["ttf"] = "font/ttf";
extMimeTypes["woff"] = "font/woff";
extMimeTypes["woff2"] = "font/woff2";
How should this inconsistency be addressed, if at all? Just some cursory searches yielded:
https://stackoverflow.com/a/5130985
font/ttf and application/x-font-ttf
For "application/font-ttf" I found this:
jsdelivr/jsdelivr#1673
As for "application/vnd.ms-opentype", I found these:
w3c/epub-specs#443
jgm/pandoc#1761