constructor({
        font,
        text,
        width = Infinity,
        align = 'left',
        size = 1,
        letterSpacing = 0,
        lineHeight = 1.4,
        wordSpacing = 0,
        wordBreak = false
    } = {}) {
        this.font = font;
        this.text = text;
        this.width = width;
        this.align = align;
        this.size = size;
        this.letterSpacing = letterSpacing;
        this.lineHeight = lineHeight;
        this.wordSpacing = wordSpacing;
        this.wordBreak = wordBreak;

        this.newline = /\n/;
        this.whitespace = /\s/;

        this.parseFont();
        this.createGeometry();
    }
@author pschroen / https://ufo.ai/

Based on https://oframe.github.io/ogl/examples/?src=msdf-text.html by gordonnl