XImage *T1_XImageFromGlyph( GLYPH *glyph)
XpmWriteFileFromImage()
. The following code
fragment shows how easy this really is. It assumes that the program containing
that code is additionally linked with the XPM library.
. . . ximage=T1_XImageFromGlyph( glyph); /* generate ximage containg the glyph */ /* write pixmap file */ XpmWriteFileFromImage( display, "glyphtest.xpm", ximage, NULL, NULL); ximage->data=NULL; XDestroyImage( ximage); . . .As already shown in this example code, the user has to take care for that
XDestroyImage()
does not free the glyph's bitmap. This achieved by
setting ximage->data
to NULL
.
Having an XPM file from a t1lib-glyph it should easily be possible to
create graphic files of arbitrary formats, e.g., by using xv
.