Path: utzoo!attcan!uunet!husc6!think!ames!ncar!boulder!stan!garya From: garya@stan.com (Gary Aitken) Newsgroups: comp.windows.x Subject: Correction to window sizing for fonts Message-ID: <283@stan.com> Date: 19 Nov 88 02:45:59 GMT Organization: Solbourne Computer Inc., Longmont, Co. Lines: 16 Oops, the previously posted minimum window size was wrong. Corrected: XFontStruct *fp ; over_x_left = max(abs(min(fp->min_bounds.lbearing,0)),0) ; /* max # pixels to left of bounding box occupied by any character */ over_x_right = max(fp->max_bounds.rbearing-fp->max_bounds.width,0) ; /* max # pixels to right of bounding box occupied by any character */ over_y_top = max(fp->max_bounds.ascent-fp->ascent,0) ; /* max # pixels above bounding box occupied by any character */ over_y_bottom = max(fp->max_bounds.descent-fp->descent,0) ; /* max # pixels below bounding box occupied by any character */ | ascent = fp->ascent + over_y_top ; | descent = fp->descent + over_y_bottom ; height = ascent + descent ; width = over_x_left + n_char*fp->max_bounds.width + over_x_right ;