Text this: An Epistemic Foundation for Scientific Realism