X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Ftexfont.c;h=6a593d03786a43060fe665f2b30065eb0524505c;hb=f0261d8acab611f3433160e4f07367b870439739;hp=845d0b6a7f9540a372304f0c1026d6231b0ec99a;hpb=c494fd2e6b3b25582375d62e40f4f5cc984ca424;p=xscreensaver diff --git a/hacks/glx/texfont.c b/hacks/glx/texfont.c index 845d0b6a..6a593d03 100644 --- a/hacks/glx/texfont.c +++ b/hacks/glx/texfont.c @@ -140,8 +140,8 @@ load_texture_font (Display *dpy, char *res) texture_font_data *data = 0; char *font = get_string_resource (dpy, res, "Font"); - const char *def1 = "-*-times-bold-r-normal-*-240-*"; - const char *def2 = "-*-times-bold-r-normal-*-180-*"; + const char *def1 = "-*-helvetica-medium-r-normal-*-240-*"; + const char *def2 = "-*-helvetica-medium-r-normal-*-180-*"; const char *def3 = "fixed"; XFontStruct *f; int which; @@ -257,13 +257,13 @@ load_texture_font (Display *dpy, char *res) /* See comment in print_texture_string for bit layout explanation. */ - int lbearing = (f->per_char + int lbearing = (f->per_char && ii >= f->min_char_or_byte2 ? f->per_char[ii - f->min_char_or_byte2].lbearing : f->min_bounds.lbearing); - int ascent = (f->per_char + int ascent = (f->per_char && ii >= f->min_char_or_byte2 ? f->per_char[ii - f->min_char_or_byte2].ascent : f->max_bounds.ascent); - int width = (f->per_char + int width = (f->per_char && ii >= f->min_char_or_byte2 ? f->per_char[ii - f->min_char_or_byte2].width : f->max_bounds.width); @@ -334,7 +334,7 @@ texture_string_width (texture_font_data *data, const char *c, while (*c) { int cc = *((unsigned char *) c); - w += (f->per_char + w += (f->per_char && cc >= f->min_char_or_byte2 ? f->per_char[cc-f->min_char_or_byte2].width : f->max_bounds.width); c++; @@ -430,19 +430,19 @@ print_texture_string (texture_font_data *data, const char *string) We want to make a quad from point A to point C. We want to position that quad so that point B lies at x,y. */ - int lbearing = (f->per_char + int lbearing = (f->per_char && c >= f->min_char_or_byte2 ? f->per_char[c - f->min_char_or_byte2].lbearing : f->min_bounds.lbearing); - int rbearing = (f->per_char + int rbearing = (f->per_char && c >= f->min_char_or_byte2 ? f->per_char[c - f->min_char_or_byte2].rbearing : f->max_bounds.rbearing); - int ascent = (f->per_char + int ascent = (f->per_char && c >= f->min_char_or_byte2 ? f->per_char[c - f->min_char_or_byte2].ascent : f->max_bounds.ascent); - int descent = (f->per_char + int descent = (f->per_char && c >= f->min_char_or_byte2 ? f->per_char[c - f->min_char_or_byte2].descent : f->max_bounds.descent); - int cwidth = (f->per_char + int cwidth = (f->per_char && c >= f->min_char_or_byte2 ? f->per_char[c - f->min_char_or_byte2].width : f->max_bounds.width);