# HG changeset patch # User Richard M. Stallman # Date 765873253 0 # Node ID 55237bfe01e5d7ea18fdc9010ef9b9f225b031a0 # Parent 0b61d2b74e640a250670bf522028fb59c8ebe8c3 (struct x_display): New field line_height. (VERTICAL_SCROLL_BAR_PIXEL_HEIGHT, PIXEL_TO_CHAR_ROW) (CHAR_TO_PIXEL_ROW): Use line_height field. diff -r 0b61d2b74e64 -r 55237bfe01e5 src/xterm.h --- a/src/xterm.h Sat Apr 09 06:33:49 1994 +0000 +++ b/src/xterm.h Sat Apr 09 06:34:13 1994 +0000 @@ -262,6 +262,9 @@ /* Size of the X window in pixels. */ int pixel_height, pixel_width; + /* Height of a line, in pixels. */ + int line_height; + #ifdef HAVE_X11 /* The tiled border used when the mouse is out of the frame. */ Pixmap border_tile; @@ -508,7 +511,7 @@ /* Return the outside pixel height for a vertical scroll bar HEIGHT rows high on frame F. */ #define VERTICAL_SCROLL_BAR_PIXEL_HEIGHT(f, height) \ - ((height) * FONT_HEIGHT ((f)->display.x->font)) + ((height) * (f)->display.x->line_height) /* Return the inside width of a vertical scroll bar, given the outside width. */ @@ -559,7 +562,7 @@ at ROW/COL. */ #define CHAR_TO_PIXEL_ROW(f, row) \ ((f)->display.x->internal_border_width \ - + (row) * FONT_HEIGHT ((f)->display.x->font)) + + (row) * (f)->display.x->line_height) #define CHAR_TO_PIXEL_COL(f, col) \ ((f)->display.x->internal_border_width \ + (col) * FONT_WIDTH ((f)->display.x->font)) @@ -579,7 +582,7 @@ the pixel on FRAME at ROW/COL. */ #define PIXEL_TO_CHAR_ROW(f, row) \ (((row) - (f)->display.x->internal_border_width) \ - / FONT_HEIGHT ((f)->display.x->font)) + / (f)->display.x->line_height) #define PIXEL_TO_CHAR_COL(f, col) \ (((col) - (f)->display.x->internal_border_width) \ / FONT_WIDTH ((f)->display.x->font))