mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-07 14:55:40 +02:00
Fix
This commit is contained in:
+1
-5
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user