Isn't possible; fprintf doesn't know anything about TeX or other text formatting mechanisms. All it does (and all it can do) is to echo the bytes from internal storage form to the disk file as presented and processed by the C language compatible formatting instructions.
You could store the string to have a text label be displayed using that string that would be interpreted by handle graphics for example, but the formatting itself would not be in the file; simply the instruction for how to generate the appearance later.
This basically is the way any presentation works; it's the display code for html or pdf or whatever format is used that takes care of the actual appearance but what is stored in the file is simply instructions, not the actual result.
