From 09c4b4c2844f31163afb1f02c135153c977e909c Mon Sep 17 00:00:00 2001 From: HF Date: Wed, 27 Dec 2023 15:43:48 +0100 Subject: [PATCH] support otf fonts in captcha --- src/workers/captchaloader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workers/captchaloader.js b/src/workers/captchaloader.js index 2c6016a3..d24916c2 100644 --- a/src/workers/captchaloader.js +++ b/src/workers/captchaloader.js @@ -20,7 +20,7 @@ if (isMainThread) { } const font = fs.readdirSync(path.resolve(__dirname, '..', FONT_FOLDER)) - .filter((e) => e.endsWith('.ttf')) + .filter((e) => e.endsWith('.ttf') || e.endsWith('.otf')) .map((e) => ppfunCaptcha.loadFont( path.resolve(__dirname, '..', FONT_FOLDER, e), ));