From b04af8bf7ae04dc371d9c29d4c69bea2b23a9557 Mon Sep 17 00:00:00 2001 From: Galen Huntington Date: Thu, 23 Jan 2025 10:18:02 -0800 Subject: [PATCH] Bug fix: TTF extension was wrong. update font types, add OTF type. (#8898) * Bug fix: TTF extension was wrong. * Update font MIME types throughout; add font/otf. --- boot/boot.js | 7 ++++--- plugins/tiddlywiki/katex/files/tiddlywiki.files | 4 ++-- themes/tiddlywiki/starlight/arvo.woff.meta | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index ab403aa5a..7570dade5 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -2467,9 +2467,10 @@ $tw.boot.initStartup = function(options) { $tw.utils.registerFileType("image/vnd.microsoft.icon","base64",".ico",{flags:["image"]}); $tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]}); $tw.utils.registerFileType("application/wasm","base64",".wasm"); - $tw.utils.registerFileType("application/font-woff","base64",".woff"); - $tw.utils.registerFileType("application/x-font-ttf","base64",".woff"); - $tw.utils.registerFileType("application/font-woff2","base64",".woff2"); + $tw.utils.registerFileType("font/woff","base64",".woff"); + $tw.utils.registerFileType("font/woff2","base64",".woff2"); + $tw.utils.registerFileType("font/ttf","base64",".ttf"); + $tw.utils.registerFileType("font/otf","base64",".otf"); $tw.utils.registerFileType("audio/ogg","base64",".ogg"); $tw.utils.registerFileType("audio/mp4","base64",[".mp4",".m4a"]); $tw.utils.registerFileType("video/ogg","base64",[".ogm",".ogv",".ogg"]); diff --git a/plugins/tiddlywiki/katex/files/tiddlywiki.files b/plugins/tiddlywiki/katex/files/tiddlywiki.files index 6dd868a10..506a0f448 100644 --- a/plugins/tiddlywiki/katex/files/tiddlywiki.files +++ b/plugins/tiddlywiki/katex/files/tiddlywiki.files @@ -6,7 +6,7 @@ "isTiddlerFile": false, "fields": { "title": {"source": "filename", "prefix": "$:/plugins/tiddlywiki/katex/fonts/"}, - "type": "application/font-woff" + "type": "font/woff" } } ], @@ -37,4 +37,4 @@ "suffix": "})(require);\n" } ] -} \ No newline at end of file +} diff --git a/themes/tiddlywiki/starlight/arvo.woff.meta b/themes/tiddlywiki/starlight/arvo.woff.meta index 19b089408..97732f909 100644 --- a/themes/tiddlywiki/starlight/arvo.woff.meta +++ b/themes/tiddlywiki/starlight/arvo.woff.meta @@ -1,2 +1,2 @@ title: $:/themes/tiddlywiki/starlight/arvo.woff -type: application/font-woff +type: font/woff