Is this code designed to be added to Emacs, and then it would simply work
with no need for the user to know other commands?
Yes. The only requirement is to use Truetype fonts. Since OS, Emacs and ghostscript treat Truetype fonts uniformly, no other configuration is required.

What is the input file format?
The input file format is irrelevant.