  Understanding the escape of Lyman continuum (LyC) and Lyman alpha (Lya)
photons from molecular clouds is one of the keys to constraining the
reionization history of the Universe and the evolution of galaxies at high
redshift. Using a set of radiation-hydrodynamic simulations with adaptive mesh
refinement, we investigate how photons propagate and escape from turbulent
clouds with different masses, star formation efficiencies (SFEs), and
metallicities, as well as with different models of stellar spectra and
supernova feedback. We find that the escape fractions in both LyC and Lya are
generally increasing with time if the cloud is efficiently dispersed by
radiation and supernova feedback. When the total SFE is low (1% of the cloud
mass), 0.1-5% of LyC photons leave the metal-poor cloud, whereas the fractions
increase to 20-70% in clouds with a 10% SFE. LyC photons escape more
efficiently if gas metallicity is lower, if the upper mass limit in the stellar
initial mass function is higher, if binary interactions are allowed in the
evolution of stars, or if additional strong radiation pressure, such as Lya
pressure, is present. As a result, the number of escaping LyC photons can
easily vary by a factor of $\sim4$ on cloud scales. The escape fractions of Lya
photons are systemically higher (60-80%) than those of LyC photons despite
large optical depths at line centre ($\tau_0\sim10^6-10^9$). Scattering of Lya
photons is already significant on cloud scales, leading to double-peaked
profiles with peak separations of $v_{\rm sep}\sim400\,{\rm km\,s^{-1}}$ during
the initial stage of the cloud evolution, while it becomes narrower than
$v_{\rm sep} \le 150 \, {\rm km\,s^{-1}}$ in the LyC bright phase. Comparisons
with observations of low-redshift galaxies suggest that Lya photons require
further interactions with neutral hydrogen to reproduce their velocity offset
for a given LyC escape fraction.
