Transfer to @napi-rs/canvas again (this time w/ line breaks)

This commit is contained in:
Dragon Fire
2024-05-03 10:21:28 -04:00
parent 0d04b94797
commit bed3847f60
174 changed files with 234 additions and 227 deletions
+1 -5
View File
@@ -34,11 +34,7 @@ module.exports = class FontArgument extends Argument {
});
if (found.size === 0) return null;
if (found.size === 1) return found.first();
const foundExact = found.filter(font => {
if (font.name.toLowerCase() === choice) return true;
if (font.filenameNoExt.toLowerCase() === choice) return true;
return false;
});
const foundExact = found.filter(font => font.filenameNoExt.toLowerCase() === choice);
if (foundExact.size === 1) return foundExact.first();
return null;
}