This commit is contained in:
Dragon Fire
2021-02-21 16:02:38 -05:00
parent 5418fea945
commit 91a18c802b
+2 -2
View File
@@ -31,8 +31,8 @@ module.exports = class Font {
return registerFont(this.path, { family: this.filenameNoExt, style: this.style, weight: this.weight });
}
toCanvasString(size, fallbacks = true) {
const shouldFall = fallbacks ? `, ${this.fallbacks.join(', ')}` : '';
toCanvasString(size, shouldDoFallbacks = true) {
const shouldFall = shouldDoFallbacks ? `, ${this.fallbacks.join(', ')}` : '';
return `${this.style} ${this.weight} ${size}px ${this.filenameNoExt}${shouldFall}`;
}