indexAndCursorForXValue(fontSize, pixelValue, chars) {
    let minFontSize = this.config.minFontSize
    fontSize = fontSize > minFontSize ? fontSize : minFontSize
    let currentWidthPx = 0
    let index = 0
    for(let i = 0; i < chars.length; i++) {
      let glyphAdvancePx = this.replicaCharAdvance(chars[i], fontSize)
      if(pixelValue < currentWidthPx + glyphAdvancePx / 2) {
        return {
          cursorX: currentWidthPx,
          index: index
        }
      } else {
        currentWidthPx += glyphAdvancePx
        if(glyphAdvancePx > 0) index++
      }
    }
    return {
      cursorX: currentWidthPx,
      index: index
    }
  }
Obtain an Object with the char id and cursor position for a given pixel value. This is used to
set the current character and position the cursor correctly on a mouse click. If the target position
is past the last character, the index of the last character is returned.
@param {number} fontSize
@param {number} pixelValue
@param {Array} chars The characters used to compare against the given pixel value.
@return {Object} The cursor x position (cursorX) between characters, and the 0-based character index
  (index) for the given x value.