From 79ca7db176e428bd6a60c5baf65a0676863324c2 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 1 Jul 2008 14:01:06 +0000 Subject: [PATCH] (w32font_text_extents): Don't count overhang as part of width. --- src/ChangeLog | 5 +++++ src/w32font.c | 4 ++-- 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 @@ +2008-07-01 Jason Rumney + + * w32font.c (w32font_text_extents): Don't count overhang as part + of width. + 2008-06-30 Miles Bader * 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) /* 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. */ -- 2.39.2