Text this: Optical characterization of thin semiconductor layers on arbitrary substrates