X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Ffps-gl.c;fp=hacks%2Fglx%2Ffps-gl.c;h=6020b257ea59e3ca3cec8c2e02264a27fdc6da75;hp=17b05656135daca1fa1f03263ba45c3e8b9aa989;hb=d1ae2829ff0fd2a96c16a0c8c5420efaa47d7b30;hpb=7edd66e6bd3209013ee059819747b10b5835635b diff --git a/hacks/glx/fps-gl.c b/hacks/glx/fps-gl.c index 17b05656..6020b257 100644 --- a/hacks/glx/fps-gl.c +++ b/hacks/glx/fps-gl.c @@ -1,4 +1,4 @@ -/* fps, Copyright (c) 2001-2014 Jamie Zawinski +/* fps, Copyright (c) 2001-2015 Jamie Zawinski * Draw a frames-per-second display (Xlib and OpenGL). * * Permission to use, copy, modify, distribute, and sell this software and its @@ -46,9 +46,11 @@ static void xlockmore_gl_fps_init (fps_state *st) { gl_fps_data *data = (gl_fps_data *) calloc (1, sizeof(*data)); + int ascent, descent; data->top_p = get_boolean_resource (st->dpy, "fpsTop", "FPSTop"); data->texfont = load_texture_font (st->dpy, "fpsFont"); - texture_string_width (data->texfont, "M", &data->line_height); + texture_string_metrics (data->texfont, "M", 0, &ascent, &descent); + data->line_height = ascent + descent; st->gl_fps_data = data; }