X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fglxfonts.h;h=5c793fe33114422edfc75751d60afbe6680215df;hb=6afd6db0ae9396cd7ff897ade597cd5483f49b0e;hp=1bffc54837cfb758e7af1dda5561dc9f2dd462b1;hpb=f0261d8acab611f3433160e4f07367b870439739;p=xscreensaver diff --git a/hacks/glx/glxfonts.h b/hacks/glx/glxfonts.h index 1bffc548..5c793fe3 100644 --- a/hacks/glx/glxfonts.h +++ b/hacks/glx/glxfonts.h @@ -1,4 +1,4 @@ -/* glxfonts, Copyright (c) 2001-2009 Jamie Zawinski +/* glxfonts, Copyright (c) 2001-2014 Jamie Zawinski * Loads X11 fonts for use with OpenGL. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -15,31 +15,19 @@ #ifndef __GLXFONTS_H__ #define __GLXFONTS_H__ -/* This is basically the same as glXUseXFont(). - We have our own version of it for portability. - */ -extern void xscreensaver_glXUseXFont (Display *dpy, Font font, - int first, int count, int listbase); - -/* Loads the font named by the X resource "res". - Returns an XFontStruct. - Also converts the font to a set of GL lists and returns the first list. -*/ -extern void load_font (Display *, char *resource, - XFontStruct **font_ret, - GLuint *dlist_ret); - -/* Bounding box of the string in pixels. - */ -extern int string_width (XFontStruct *f, const char *c, int *height_ret); +#include "texfont.h" /* Draws the string on the window at the given pixel position. Newlines and tab stops are honored. - Any text inside [] will be rendered as a subscript. - Assumes the font has been loaded as with load_font(). */ + Any numbers inside [] will be rendered as a subscript. + Assumes the font has been loaded as with load_texture_font(). + + If width and height are 0, then instead the text is placed + into the 3D scene at the origin, billboarded to face the + viewer. + */ void print_gl_string (Display *dpy, - XFontStruct *font, - GLuint font_dlist, + texture_font_data *font, int window_width, int window_height, GLfloat x, GLfloat y, const char *string,