#include #include #include #include #include "font.C" static Display *dpy; static int scr; static Window win; static GC gc; #define WIDTH 1000 #define HEIGHT 720 #define OFFX 64 #define OFFY 70 // #define TST_FNT "-adobe-times-medium-r-normal--34-240-100-100-p-170-iso8859-1" #define TST_FNT "-adobe-courier-bold-r-normal--24-240-75-75-m-150-iso8859-1" #define TST_STR "_Helmut_\rHoenig\r_" #include "smiletab.H" static int cmp(const void *a,const void *b) { return strcmp(*(char**)a,*(char**)b); } void main(int argc,char **argv) { int i; int width=WIDTH; char *dispname=""; int sync_flag=0; XEvent event; ScalableFont *sf; for (i=1;iTurnLeft(); break; case 2: sf->Flip(); break; case 3: sf->TurnRight(); break; } XClearWindow(dpy,win); case Expose: { int x,y; sf->DrawCentered(win,gc,150,150,TST_STR); sf->DrawCentered(win,gc,200,200,TST_STR); XDrawImageString(dpy,win,gc,250,250,TST_STR,strlen(TST_STR)); #if (0) x = OFFX; y = 400; for (i=0;iDrawCentered(win,gc,x,y,smiletab[i]); x+=OFFX; if (x>width-OFFX) { y+=OFFY; x =OFFX; } } #endif break; } case ConfigureNotify: width = event.xconfigure.width; /* Size: event.xconfigure.width,event.xconfigure.height */ break; } } }