]> git.eshelyaron.com Git - emacs.git/commitdiff
(w32font_text_extents): Don't count overhang as part of width.
authorJason Rumney <jasonr@gnu.org>
Tue, 1 Jul 2008 14:01:06 +0000 (14:01 +0000)
committerJason Rumney <jasonr@gnu.org>
Tue, 1 Jul 2008 14:01:06 +0000 (14:01 +0000)
src/ChangeLog
src/w32font.c

index 41fe6579690ea34c38d9465507eaf8ce753c3d49..fb3186d4d0014b29b381740c3097c75602e451e5 100644 (file)
@@ -1,3 +1,8 @@
+2008-07-01  Jason Rumney  <jasonr@gnu.org>
+
+        * w32font.c (w32font_text_extents): Don't count overhang as part
+        of width.
+
 2008-06-30  Miles Bader  <miles@gnu.org>
 
        * dispextern.h (struct glyph, struct it, struct iterator_stack_entry):
index e97d1c2c27897f9b68938fd69764054145447d23..b6381129739a44baee842465d321bfb7991f0471 100644 (file)
@@ -526,9 +526,9 @@ w32font_text_extents (font, code, nglyphs, metrics)
   /* Give our best estimate of the metrics, based on what we know.  */
   if (metrics)
     {
-      metrics->width = total_width;
+      metrics->width = total_width - w32_font->metrics.tmOverhang;
       metrics->lbearing = 0;
-      metrics->rbearing = total_width + w32_font->metrics.tmOverhang;
+      metrics->rbearing = total_width;
     }
 
   /* Restore state and release DC.  */