1
0
Fork 0

mimetypes for fonts

This commit is contained in:
Jan Steemann 2013-08-20 10:03:38 +02:00
parent 5c1d17daea
commit 5056512a37
5 changed files with 33 additions and 4 deletions

View File

@ -25,16 +25,26 @@ exports.mimeTypes = {
"pdf": [ "application/pdf", false ],
"txt": [ "text/plain", true ],
"text": [ "text/plain", true ],
"xml": [ "application/xml", true ]
"xml": [ "application/xml", true ],
"svg": [ "image/svg+xml", true ],
"ttf": [ "application/x-font-ttf", false ],
"otf": [ "application/x-font-opentype", false ],
"woff": [ "application/font-woff", false ],
"eot": [ "application/vnd.ms-fontobject", false ]
};
exports.extensions = {
"application/vnd.ms-fontobject": [ "eot" ],
"text/html": [ "html", "htm" ],
"text/javascript": [ "js" ],
"image/svg+xml": [ "svg" ],
"application/x-font-ttf": [ "ttf" ],
"image/png": [ "png" ],
"image/x-icon": [ "ico" ],
"application/x-font-opentype": [ "otf" ],
"image/gif": [ "gif" ],
"image/jpg": [ "jpg" ],
"application/font-woff": [ "woff" ],
"text/plain": [ "txt", "text" ],
"application/xml": [ "xml" ],
"application/json": [ "json" ],

View File

@ -24,16 +24,26 @@ exports.mimeTypes = {
"pdf": [ "application/pdf", false ],
"txt": [ "text/plain", true ],
"text": [ "text/plain", true ],
"xml": [ "application/xml", true ]
"xml": [ "application/xml", true ],
"svg": [ "image/svg+xml", true ],
"ttf": [ "application/x-font-ttf", false ],
"otf": [ "application/x-font-opentype", false ],
"woff": [ "application/font-woff", false ],
"eot": [ "application/vnd.ms-fontobject", false ]
};
exports.extensions = {
"application/vnd.ms-fontobject": [ "eot" ],
"text/html": [ "html", "htm" ],
"text/javascript": [ "js" ],
"image/svg+xml": [ "svg" ],
"application/x-font-ttf": [ "ttf" ],
"image/png": [ "png" ],
"image/x-icon": [ "ico" ],
"application/x-font-opentype": [ "otf" ],
"image/gif": [ "gif" ],
"image/jpg": [ "jpg" ],
"application/font-woff": [ "woff" ],
"text/plain": [ "txt", "text" ],
"application/xml": [ "xml" ],
"application/json": [ "json" ],

BIN
lib/BasicsC/.errors.dat.swp Normal file

Binary file not shown.

View File

@ -15,4 +15,8 @@
"txt","text/plain",true
"text","text/plain",true
"xml","application/xml",true
"svg","image/svg+xml",true
"ttf","application/x-font-ttf",false
"otf","application/x-font-opentype",false
"woff","application/font-woff",false
"eot","application/vnd.ms-fontobject",false

7
lib/BasicsC/voc-mimetypes.c Executable file → Normal file
View File

@ -3,7 +3,7 @@
////////////////////////////////////////////////////////////////////////////////
#include <BasicsC/common.h>
#include <BasicsC/voc-mimetypes.h>
#include "./lib/BasicsC/voc-mimetypes.h"
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup Mimetypes
@ -28,6 +28,11 @@ void TRI_InitialiseEntriesMimetypes (void) {
TRI_RegisterMimetype("txt", "text/plain", true);
TRI_RegisterMimetype("text", "text/plain", true);
TRI_RegisterMimetype("xml", "application/xml", true);
TRI_RegisterMimetype("svg", "image/svg+xml", true);
TRI_RegisterMimetype("ttf", "application/x-font-ttf", false);
TRI_RegisterMimetype("otf", "application/x-font-opentype", false);
TRI_RegisterMimetype("woff", "application/font-woff", false);
TRI_RegisterMimetype("eot", "application/vnd.ms-fontobject", false);
}
////////////////////////////////////////////////////////////////////////////////