Поправки багов

This commit is contained in:
Book Pauk
2021-02-10 15:40:44 +07:00
parent dda9943dbe
commit d81a50e696
4 changed files with 33 additions and 29 deletions

View File

@@ -2,11 +2,11 @@ import {sleep} from '../../../share/utils';
export default class DrawHelper {
fontBySize(size) {
return `${size}px ${this.fontName}`;
return `${size}px '${this.fontName}'`;
}
fontByStyle(style) {
return `${style.italic ? 'italic' : this.fontStyle} ${style.bold ? 'bold' : this.fontWeight} ${this.fontSize}px ${this.fontName}`;
return `${style.italic ? 'italic' : this.fontStyle} ${style.bold ? 'bold' : this.fontWeight} ${this.fontSize}px '${this.fontName}'`;
}
measureText(text, style) {// eslint-disable-line no-unused-vars