Text addon

You can do this with Geometry nodes. There’s not currently a shader node implementation, and since nodes are hardcoded, they’re not really accessible with the Python API.

That being said, there’s this:

This add-on claims to add a Text node to shader nodes: