aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rumney2008-07-01 14:01:06 +0000
committerJason Rumney2008-07-01 14:01:06 +0000
commit79ca7db176e428bd6a60c5baf65a0676863324c2 (patch)
treed53be3631017d5df6aaf09fe10046692c4e26cd2
parentc2786a3dd5dc7ccf8c5975d26c045e006f13545d (diff)
downloademacs-79ca7db176e428bd6a60c5baf65a0676863324c2.tar.gz
emacs-79ca7db176e428bd6a60c5baf65a0676863324c2.zip
(w32font_text_extents): Don't count overhang as part of width.
-rw-r--r--src/ChangeLog5
-rw-r--r--src/w32font.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 41fe6579690..fb3186d4d00 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12008-07-01 Jason Rumney <jasonr@gnu.org>
2
3 * w32font.c (w32font_text_extents): Don't count overhang as part
4 of width.
5
12008-06-30 Miles Bader <miles@gnu.org> 62008-06-30 Miles Bader <miles@gnu.org>
2 7
3 * dispextern.h (struct glyph, struct it, struct iterator_stack_entry): 8 * dispextern.h (struct glyph, struct it, struct iterator_stack_entry):
diff --git a/src/w32font.c b/src/w32font.c
index e97d1c2c278..b6381129739 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -526,9 +526,9 @@ w32font_text_extents (font, code, nglyphs, metrics)
526 /* Give our best estimate of the metrics, based on what we know. */ 526 /* Give our best estimate of the metrics, based on what we know. */
527 if (metrics) 527 if (metrics)
528 { 528 {
529 metrics->width = total_width; 529 metrics->width = total_width - w32_font->metrics.tmOverhang;
530 metrics->lbearing = 0; 530 metrics->lbearing = 0;
531 metrics->rbearing = total_width + w32_font->metrics.tmOverhang; 531 metrics->rbearing = total_width;
532 } 532 }
533 533
534 /* Restore state and release DC. */ 534 /* Restore state and release DC. */