function safariPre15Workaround(atlas) {
  // Use createImageBitmap support as a proxy for Safari<15, all other mainstream browsers
  // have supported it for a long while so any false positives should be minimal.
  if (typeof createImageBitmap !== 'function') {
    console.info('Safari<15: applying SDF canvas workaround')
    const {sdfCanvas, sdfTexture} = atlas
    const {width, height} = sdfCanvas
    const gl = atlas.sdfCanvas.getContext('webgl')
    let pixels = sdfTexture.image.data
    if (!pixels || pixels.length !== width * height * 4) {
      pixels = new Uint8Array(width * height * 4)
      sdfTexture.image = {width, height, data: pixels}
      sdfTexture.flipY = false
      sdfTexture.isDataTexture = true
    }
    gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels)
  }
}
Safari < v15 seems unable to use the SDF webgl canvas as a texture. This applies a workaround
where it reads the pixels out of that canvas and uploads them as a data texture instead, at
a slight performance cost.