Unified approach to nuclear densities from exotic atoms