We show that an arbitrary matrix Reimann-Hilbert problem with quasi-permutationmonodromies can be solved in terms of the Szego kernel on appropriate branch coverings.Corresponding Jimbo-Miwa tau-function turns out to coincide with the determinantof the Cauchy-Riemann operator in certain spinor bundles, previously introducedin coformal field theory. Applications of these results to the Ernst equation and the stationary axially symmetric Einstein-Maxwell system are discussed.