I programmatically generate templates to be compiled with pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) to PDF files. At a certain point, I want to replace some text characters with their image equivalent: I have converted a font file to a bunch of .png files. One png file contains one char of the font.
Now I want to insert those png files into the LaTeX template in a way that a human reader will never notice any difference to the "real" text (unless they try to copy&paste, but that's a different story).
The problem is: I need a solution which works for every font size (and other layout settings).
So, how can I make sure that the images always scale exactly to the size of the text surrounding them?
Currently, I'm using includegraphics, but if there is another (free) package capable of my requirement I'm fine with that.

