diff --git a/apps/server/src/services/icon_packs.spec.ts b/apps/server/src/services/icon_packs.spec.ts index 3e2bd8688..c4d0ad6ea 100644 --- a/apps/server/src/services/icon_packs.spec.ts +++ b/apps/server/src/services/icon_packs.spec.ts @@ -45,4 +45,19 @@ describe("Mapping attachments", () => { const attachment = determineBestFontAttachment(iconPackNote); expect(attachment?.mime).toStrictEqual("font/woff2"); }); + + it("handles woff", () => { + const iconPackNote = buildNote({ + type: "text", + attachments: [ + { + role: "file", + title: "Font", + mime: "font/woff" + } + ] + }); + const attachment = determineBestFontAttachment(iconPackNote); + expect(attachment?.mime).toStrictEqual("font/woff"); + }); }); diff --git a/apps/server/src/services/icon_packs.ts b/apps/server/src/services/icon_packs.ts index c313c0259..dd448ed7a 100644 --- a/apps/server/src/services/icon_packs.ts +++ b/apps/server/src/services/icon_packs.ts @@ -3,7 +3,8 @@ import type BNote from "../becca/entities/bnote"; import log from "./log"; const PREFERRED_MIME_TYPE = [ - "font/woff2" + "font/woff2", + "font/woff" ]; export interface IconPackManifest {