X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Ftexfont.c;h=2592626954058272a489aa44e20433d71287da2a;hp=0602344de7a779284a0d0381fcdae1a0663cdd7f;hb=7edd66e6bd3209013ee059819747b10b5835635b;hpb=d5186197bc394e10a4402f7f6d23fbb14103bc50 diff --git a/hacks/glx/texfont.c b/hacks/glx/texfont.c index 0602344d..25926269 100644 --- a/hacks/glx/texfont.c +++ b/hacks/glx/texfont.c @@ -713,6 +713,24 @@ print_texture_label (Display *dpy, lh = texture_string_width (data, "M", 0); w = texture_string_width (data, string, &h); +# ifdef USE_IPHONE + /* Size of the font is in points, so scale iOS pixels to points. */ + { + GLfloat scale = 1; + scale = window_width / 768.0; + if (scale < 1) scale = 1; + + /* jwxyz-XLoadFont has already doubled the font size, to compensate + for physically smaller screens. Undo that, since OpenGL hacks + use full-resolution framebuffers, unlike X11 hacks. */ + scale /= 2; + + window_width /= scale; + window_height /= scale; + glScalef (scale, scale, scale); + } +# endif /* USE_IPHONE */ + if (rot > 135 || rot < -135) /* 180 */ { glTranslatef (window_width, window_height, 0);