comparison src/w32term.c @ 59332:15087a4cee39

(x_new_font): Set FRAME_COLUMN_WIDTH to fontp->average_width, not FONT_WIDTH. Set FRAME_SPACE_WIDTH to fontp->space_width.
author Jason Rumney <jasonr@gnu.org>
date Mon, 03 Jan 2005 22:52:51 +0000
parents c21a6318ec07
children 369714ad80ed cb67264d6096
comparison
equal deleted inserted replaced
59331:35ab85a2d8f2 59332:15087a4cee39
817 Display Iterator 817 Display Iterator
818 ***********************************************************************/ 818 ***********************************************************************/
819 819
820 /* Function prototypes of this page. */ 820 /* Function prototypes of this page. */
821 821
822 static XCharStruct *w32_per_char_metric P_ ((XFontStruct *, 822 XCharStruct *w32_per_char_metric P_ ((XFontStruct *, wchar_t *, int));
823 wchar_t *, int));
824 static int w32_encode_char P_ ((int, wchar_t *, struct font_info *, int *)); 823 static int w32_encode_char P_ ((int, wchar_t *, struct font_info *, int *));
825 824
826 825
827 /* Get metrics of character CHAR2B in FONT. Value is always non-null. 826 /* Get metrics of character CHAR2B in FONT. Value is always non-null.
828 If CHAR2B is not contained in FONT, the font's default character 827 If CHAR2B is not contained in FONT, the font's default character
955 954
956 return retval; 955 return retval;
957 } 956 }
958 957
959 958
960 static XCharStruct * 959 XCharStruct *
961 w32_per_char_metric (font, char2b, font_type) 960 w32_per_char_metric (font, char2b, font_type)
962 XFontStruct *font; 961 XFontStruct *font;
963 wchar_t *char2b; 962 wchar_t *char2b;
964 int /* enum w32_char_font_type */ font_type; 963 int /* enum w32_char_font_type */ font_type;
965 { 964 {
5288 5287
5289 FRAME_FONT (f) = (XFontStruct *) (fontp->font); 5288 FRAME_FONT (f) = (XFontStruct *) (fontp->font);
5290 FRAME_BASELINE_OFFSET (f) = fontp->baseline_offset; 5289 FRAME_BASELINE_OFFSET (f) = fontp->baseline_offset;
5291 FRAME_FONTSET (f) = -1; 5290 FRAME_FONTSET (f) = -1;
5292 5291
5293 FRAME_COLUMN_WIDTH (f) = FONT_WIDTH (FRAME_FONT (f)); 5292 FRAME_COLUMN_WIDTH (f) = fontp->average_width;
5293 FRAME_SPACE_WIDTH (f) = fontp->space_width;
5294 FRAME_LINE_HEIGHT (f) = FONT_HEIGHT (FRAME_FONT (f)); 5294 FRAME_LINE_HEIGHT (f) = FONT_HEIGHT (FRAME_FONT (f));
5295 5295
5296 compute_fringe_widths (f, 1); 5296 compute_fringe_widths (f, 1);
5297 5297
5298 /* Compute the scroll bar width in character columns. */ 5298 /* Compute the scroll bar width in character columns. */