SVG was my first thought as well, and I've used it for this before. But, as usual on this forum, we need more information to work out what the problem really is.
SVG will work if you have a well-defined block of text that you want to overlay on an image - that's quite easy. If you want text to reflow freely with an image in the background of part of the text then the problem is more complex, though it may still be possible if you're prepared to render all the text in SVG, which may sacrifice some quality.
|