Your brain is doing the whole thing.
It can imagine you have already read something it never actually "simulated". It can imagine you going through the steps of reading without any written words in the dream being involved at all. It can imagine illegible text that you are conscious of being unable to read. It can imagine legible text that you can read. It can invent information, recall it, or fail to recall it for the contents of the text. The contents could stay consistent if you return to them later in the dream, they could change, or at that "later" point, your brain can invent the "memory" of having previously read that text.
And it isn't really a simulator, which is why lucid dreaming might only experience a subset of these, possibly leaning more towards illegible text, because a lucid dreamer is probably either trying to read to find information (that the brain might not have and might not bother trying to make up because it knows what the conscious mind is up to) or testing what is possible in dreams (which I'd imagine the unconscious mind might think something like "dude, I'm just making this up as I go in the first place, and while it's cool that this whole thing entertains and/or perplexes you, it's just a hallucination that happens during routine housekeeping that you're not even supposed to remember because it's all meaningless. Don't try to do science in it, just enjoy the show, laugh when you think about it when I'm fully online, and move on").