We present a fully ab initio model and calculations of the spectral shapes of absorption lines in a pure molecular gas under conditions where the influences of collisions and of the Doppler effect are significant. Predictions of the time dependence of dipole autocorrelation functions (DACFs) are made for pure CO at room temperature using requantized classical molecular dynamics simulations. These are carried, free of any adjusted parameter, on the basis of an accurate anisotropic intermolecular potential. The Fourier-Laplace transforms of these DACFs then yield calculated spectra which are analyzed, as some measured ones, through fits using Voigt line profiles. Comparisons between theory and various experiments not only show that the main line-shape parameters (Lorentz pressure-broadening coefficients) are accurately predicted, but that subtle observed non-Voigt features are also quantitatively reproduced by the model. These successes open renewed perspectives for the understanding of the mechanisms involved (translational-velocity and rotational-state changes and their dependences on the molecular speed) and the quantification of their respective contributions. The proposed model should also be of great help for the test of widely used empirical line-shape models and, if needed, the construction of more physically based ones.