renderCharacterSpace ::
     TextRenderer -> Int -> Int -> Int -> Font -> IO (Int, Int)
renderCharacterSpace renderer adv x y font =
  let x1 = fromIntegral x
      x2 = fromIntegral $ x + adv
      y1 = fromIntegral y
      y2 = fromIntegral $ y - fontHeight font
      charVerts = [x1, y1, x1, y2, x2, y1, x1, y2, x2, y2, x2, y1] :: [GLfloat]
      charDrawFunc = do
        textBGColourU <-
          GL.get $ GL.uniformLocation (bgprogram renderer) "textBGColor"
        GL.uniform textBGColourU $= colToGLCol (textBGColour renderer)
   in do renderCharacterQuad
           (bgprogram renderer)
           (pMatrix renderer)
           (characterBGQuad renderer)
           charDrawFunc
           charVerts
         return (x + adv, y)
renderCharacterSpace ::
     TextRenderer -> Int -> Int -> Int -> Font -> IO (Int, Int)
renderCharacterSpace renderer adv x y font =
  let x1 = fromIntegral x
      x2 = fromIntegral $ x + adv
      y1 = fromIntegral y
      y2 = fromIntegral $ y - fontHeight font
      charVerts = [x1, y1, x1, y2, x2, y1, x1, y2, x2, y2, x2, y1] :: [GLfloat]
      charDrawFunc = do
        textBGColourU <-
          GL.get $ GL.uniformLocation (bgprogram renderer) "textBGColor"
        GL.uniform textBGColourU $= colToGLCol (textBGColour renderer)
   in do renderCharacterQuad
           (bgprogram renderer)
           (pMatrix renderer)
           (characterBGQuad renderer)
           charDrawFunc
           charVerts
         return (x + adv, y)
renderCharacterSpace renderer adv x y font =
  let x1 = fromIntegral x
      x2 = fromIntegral $ x + adv
      y1 = fromIntegral y
      y2 = fromIntegral $ y - fontHeight font
      charVerts = [x1, y1, x1, y2, x2, y1, x1, y2, x2, y2, x2, y1] :: [GLfloat]
      charDrawFunc = do
        textBGColourU <-
          GL.get $ GL.uniformLocation (bgprogram renderer) "textBGColor"
        GL.uniform textBGColourU $= colToGLCol (textBGColour renderer)
   in do renderCharacterQuad
           (bgprogram renderer)
           (pMatrix renderer)
           (characterBGQuad renderer)
           charDrawFunc
           charVerts
         return (x + adv, y)