Geometric realization of conformal field theory on Riemann surfaces