_drawText(ctx, x, y, baseline = "middle", viewFontSize) {
    [x, y] = this._setAlignment(ctx, x, y, baseline);

    ctx.textAlign = "left";
    x = x - this.size.width / 2; // Shift label 1/2-distance to the left
    if (this.fontOptions.valign && this.size.height > this.size.labelHeight) {
      if (this.fontOptions.valign === "top") {
        y -= (this.size.height - this.size.labelHeight) / 2;
      }
      if (this.fontOptions.valign === "bottom") {
        y += (this.size.height - this.size.labelHeight) / 2;
      }
    }

    // draw the text
    for (let i = 0; i < this.lineCount; i++) {
      const line = this.lines[i];
      if (line && line.blocks) {
        let width = 0;
        if (this.isEdgeLabel || this.fontOptions.align === "center") {
          width += (this.size.width - line.width) / 2;
        } else if (this.fontOptions.align === "right") {
          width += this.size.width - line.width;
        }
        for (let j = 0; j < line.blocks.length; j++) {
          const block = line.blocks[j];
          ctx.font = block.font;
          const [fontColor, strokeColor] = this._getColor(
            block.color,
            viewFontSize,
            block.strokeColor
          );
          if (block.strokeWidth > 0) {
            ctx.lineWidth = block.strokeWidth;
            ctx.strokeStyle = strokeColor;
            ctx.lineJoin = "round";
          }
          ctx.fillStyle = fontColor;

          if (block.strokeWidth > 0) {
            ctx.strokeText(block.text, x + width, y + block.vadjust);
          }
          ctx.fillText(block.text, x + width, y + block.vadjust);
          width += block.width;
        }
        y += line.height;
      }
    }
  }
@param {CanvasRenderingContext2D} ctx
@param {number} x
@param {number} y
@param {string} [baseline]
@param {number} viewFontSize
@private