The text has to appear in the raw page source and the pages need structured data markup. If the text arrives only inside an image or only through a script running in the browser, the page cannot be used as a source.