A decent text layout engine is probably bigger than Doom. Rendering the Béziers in the font is pretty easy, though antialiasing adds a bit of complexity, but then throw in hinting, proper kerning, line breaking, hyphenation, Unicode handling, bidirectional text flow, and so on and you’ve got a big chunk of intrinsic complexity. TeX didn’t do all of them, and it also handed off the rendering to an external program.
So I initially thought this comparison was unfair because Doom didn’t do any of those things. But then I remembered that web pages get all of those things for free from the browser.