Opacity ratios for Doppler-broadened lines from common upper levels