1 /*
2 * $Id: settextstyle.c,v 0.1 1993/12/10 00:39:08 king Exp king $
3 * Sets the current text characteristics for graphics output.
4 *
5 * $Log: settextstyle.c,v $
6 * Revision 0.1 1993/12/10 00:39:08 king
7 * Initial version.
8 *
9 */
10 #include "graphics.h"
11
settextstyle(int font,int direction,int charsize)12 void settextstyle(int font, int direction, int charsize)
13 {
14 XFontStruct *font_info;
15 char *txtfont;
16
17 txt_settings.font = font&3;
18 txt_settings.direction = direction;
19 txt_settings.charsize = charsize;
20
21 txtfont = Fonts[txt_settings.font];
22 if ((font_info = XLoadQueryFont(dpy, txtfont)) == NULL) {
23 fprintf(stderr, "Error opening font %s.\n", txtfont);
24 exit(-1);
25 }
26 XSetFont(dpy, gc, font_info->fid);
27 }
28