From 7a4fe1a80ffd5a7f37a492f4ad3ef37f97234d1c Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Sat, 15 Jun 2024 21:43:15 +0500 Subject: [PATCH] =?UTF-8?q?fuck=20up=20=E2=84=962?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- helpers/functions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helpers/functions.js b/helpers/functions.js index bb16b735..eed315ec 100644 --- a/helpers/functions.js +++ b/helpers/functions.js @@ -1,9 +1,9 @@ const moment = require("moment"), - Canvas = require("@napi-rs/canvas"), + { GlobalFonts } = require("@napi-rs/canvas"), { resolve } = require("path"); -Canvas.registerFont(resolve("./assets/fonts/RubikMonoOne-Regular.ttf"), { family: "RubikMonoOne" }); -Canvas.registerFont(resolve("./assets/fonts/KeepCalm-Medium.ttf"), { family: "KeepCalm" }); +GlobalFonts.registerFromPath(resolve("./assets/fonts/RubikMonoOne-Regular.ttf"), "RubikMonoOne"); +GlobalFonts.registerFromPath(resolve("./assets/fonts/KeepCalm-Medium.ttf"), "KeepCalm"); module.exports = { /**