1 /*
2    text.h
3 
4    Mike Hufnagel & Bill Kendrick
5    Last modified: 11/18/95 (clean up)
6 
7    Font functions, text messages, etc.  */
8 
9 #ifndef TEXT_H
10 #define TEXT_H
11 
12 #include <X11/Xlib.h>
13 
14 int FontHeight(XFontStruct *font_struct);
15 /*
16    Returns height of text in a given font.
17 */
18 
19 XFontStruct *LoadFont(Display *display, char* font_name,
20 		      char* fallback_font_name);
21 /*
22    Loads an X font into an XFontStruct and returns a pointer to the
23    struct.  If "font_name" can't be loaded, it tries to load
24    "fallback_font_name".  If THAT fails too, it will return NULL.
25 */
26 
27 void drawtext(Display *display, Window window, GC gc, int x, int y, char *s);
28 
29 /*
30    Draws string 's' into 'window' on a 'display' at an 'x,y' location using
31    the graphic context 'gc'
32 */
33 
34 void drawcenteredtext(Display *display, Window window, GC gc, int x1, int x2,
35 		      int y, char *s, XFontStruct *font);
36 /*
37   Draws text centered
38   */
39 
40 
41 #endif /* TEXT_H */
42