setFont(font, size = 10) {
		// font name and type
		const font_names = font.split(",").map((value) => {
			value = value.trim();
			return !/(^".*"$)|(^'.*'$)/.test(value) ? '"' + value + '"' : value;
		});

		// font size
		if (typeof size === "number") {
			this.fontSize = size;
			size += "px";
		} /* string */ else {
			// extract the units and convert if necessary
			const CSSval = size.match(/([-+]?[\d.]*)(.*)/);
			this.fontSize = parseFloat(CSSval[1]);
			if (CSSval[2]) {
				this.fontSize *= toPX[runits.indexOf(CSSval[2])];
			} else {
				// no unit define, assume px
				size += "px";
			}
		}
		this.height = this.fontSize;
		this.font = size + " " + font_names.join(",");

		this.isDirty = true;

		return this;
	}
set the font family and size
@param {string} font - a CSS font name
@param {number|string} [size=10] - size in px, or size + suffix (px, em, pt)
@returns {Text} this object for chaining
@example
font.setFont("Arial", 20);
font.setFont("Arial", "1.5em");