From 405ff5f2c539c6b4cee231124f1a3fb4b9c079c4 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 21 Feb 2021 15:55:55 -0500 Subject: [PATCH] Fix --- structures/Font.js | 6 +----- types/font.js | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/structures/Font.js b/structures/Font.js index 09a250a1..f089122f 100644 --- a/structures/Font.js +++ b/structures/Font.js @@ -16,7 +16,7 @@ const fallbacks = ['Symbola', 'Noto-CJK']; module.exports = class Font { constructor(path, filename, metadata) { this.path = path; - this.name = variants[filename] || metadata.name || filename; + this.name = metadata.name || filename; this.filename = filename; this.style = metadata.style === 'regular' ? 'normal' : metadata.style || 'normal'; this.weight = weights[metadata.weight] || metadata.weight || 'normal'; @@ -40,10 +40,6 @@ module.exports = class Font { return this.filename.replace(/(\.(otf|ttf))$/, ''); } - get isVariant() { - return variants[this.filename]; - } - get isFallback() { return fallbacks.includes(this.filenameNoExt); } diff --git a/types/font.js b/types/font.js index 5cfbac6e..beb6f4b4 100644 --- a/types/font.js +++ b/types/font.js @@ -10,7 +10,6 @@ module.exports = class FontArgumentType extends ArgumentType { const choice = value.toLowerCase(); let found = this.client.fonts.filter(font => { if (font.isFallback) return false; - if (font.isVariant) return false; if (font.name.toLowerCase().includes(choice)) return true; if (font.filenameNoExt.toLowerCase().includes(choice)) return true; return false; @@ -33,7 +32,6 @@ module.exports = class FontArgumentType extends ArgumentType { const choice = value.toLowerCase(); const found = this.client.fonts.filter(font => { if (font.isFallback) return false; - if (font.isVariant) return false; if (font.name.toLowerCase().includes(choice)) return true; if (font.filenameNoExt.toLowerCase().includes(choice)) return true; return false;