Text this: Direct detection with an optimal transfer function: toward the electrical spectral efficiency of coherent homodyne detection