No, you cannot. libpng
is a library for encoding (decoding) a raw raster image to (from) a PNG format file. It has nothing to do with high level image processing tasks. You can't expect a low level encoding/decoding library a libpng
to, for example, rotate an image, detect borders, etc... even less to convert a string into a digital image (pixels), which is a very high level task that involves fonts rastering. That kind of tasks are performed in the realm of the raw image (in memory), independently of the format you chose to archive it.
To accomplish your goal you should try with some image rendering/processing library or tool; this depends on your plaform: for example, libgd. ImageMagick is a valid alternative.