Mercurial > emacs
comparison src/w32term.c @ 90902:8bc489730b6f
(x_font_min_bounds): Use FONT_AVG_WIDTH.
(w32_cache_char_metrics): Use FONT_WIDTH.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Sat, 02 Jun 2007 22:11:44 +0000 |
parents | 129b35b0274f |
children | 3537ea81cf6d |
comparison
equal
deleted
inserted
replaced
90901:bca4afff760c | 90902:8bc489730b6f |
---|---|
1060 /* TODO: determine whether font is fixed-pitch. */ | 1060 /* TODO: determine whether font is fixed-pitch. */ |
1061 if (!w32_bdf_per_char_metric (font, &char2b, 1, &font->max_bounds)) | 1061 if (!w32_bdf_per_char_metric (font, &char2b, 1, &font->max_bounds)) |
1062 { | 1062 { |
1063 /* Use the font width and height as max bounds, as not all BDF | 1063 /* Use the font width and height as max bounds, as not all BDF |
1064 fonts contain the letter 'x'. */ | 1064 fonts contain the letter 'x'. */ |
1065 font->max_bounds.width = FONT_MAX_WIDTH (font); | 1065 font->max_bounds.width = FONT_WIDTH (font); |
1066 font->max_bounds.lbearing = -font->bdf->llx; | 1066 font->max_bounds.lbearing = -font->bdf->llx; |
1067 font->max_bounds.rbearing = FONT_MAX_WIDTH (font) - font->bdf->urx; | 1067 font->max_bounds.rbearing = FONT_WIDTH (font) - font->bdf->urx; |
1068 font->max_bounds.ascent = FONT_BASE (font); | 1068 font->max_bounds.ascent = FONT_BASE (font); |
1069 font->max_bounds.descent = FONT_DESCENT (font); | 1069 font->max_bounds.descent = FONT_DESCENT (font); |
1070 } | 1070 } |
1071 } | 1071 } |
1072 else | 1072 else |
6542 /* | 6542 /* |
6543 * TODO: Windows does not appear to offer min bound, only | 6543 * TODO: Windows does not appear to offer min bound, only |
6544 * average and maximum width, and maximum height. | 6544 * average and maximum width, and maximum height. |
6545 */ | 6545 */ |
6546 *h = FONT_HEIGHT (font); | 6546 *h = FONT_HEIGHT (font); |
6547 *w = FONT_WIDTH (font); | 6547 *w = FONT_AVG_WIDTH (font); |
6548 } | 6548 } |
6549 | 6549 |
6550 | 6550 |
6551 /* Compute the smallest character width and smallest font height over | 6551 /* Compute the smallest character width and smallest font height over |
6552 all fonts available on frame F. Set the members smallest_char_width | 6552 all fonts available on frame F. Set the members smallest_char_width |