Text this: A regularization method for Fourier series of discontinuous functions