1 /* texfonts, Copyright (c) 2005 Jamie Zawinski <jwz@jwz.org>
2 * Loads X11 fonts into textures for use with OpenGL.
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation. No representations are made about the suitability of this
9 * software for any purpose. It is provided "as is" without express or
13 #ifndef __TEXTURE_FONT_H__
14 #define __TEXTURE_FONT_H__
16 typedef struct texture_font_data texture_font_data;
18 /* Loads the font named by the X resource "res" and returns
19 a texture-font object.
21 extern texture_font_data *load_texture_font (Display *, char *res);
23 /* Width of the string in pixels.
25 extern int texture_string_width (texture_font_data *, const char *,
26 int *line_height_ret);
28 /* Draws the string in the scene at the origin.
29 Newlines and tab stops are honored.
31 extern void print_texture_string (texture_font_data *, const char *);
33 /* Releases the texture font.
35 extern void free_texture_font (texture_font_data *);
37 #endif /* __TEXTURE_FONT_H__ */