summaryrefslogtreecommitdiff
path: root/pango/pangocairo-atsuifont.c
diff options
context:
space:
mode:
authorRichard Hult <richard@imendio.com>2007-04-27 07:46:43 +0000
committerRichard Hult <rhult@src.gnome.org>2007-04-27 07:46:43 +0000
commitac2ec4c9064e99245de06e90590136b37737381d (patch)
treec0f95a21269520eaa99b4d71f3c7cb03eabf933e /pango/pangocairo-atsuifont.c
parent2db18bc10600f05b791eec6312a06d101b481509 (diff)
downloadpango-ac2ec4c9064e99245de06e90590136b37737381d.tar.gz
Use maxAdvanceWidth instead of avgAdvanceWidth, the latter is 0 for many
2007-04-27 Richard Hult <richard@imendio.com> * pango/pangocairo-atsuifont.c (pango_cairo_atsui_font_get_metrics): Use maxAdvanceWidth instead of avgAdvanceWidth, the latter is 0 for many fonts. This is a temporary solution, see bug #433805 for details. svn path=/trunk/; revision=2234
Diffstat (limited to 'pango/pangocairo-atsuifont.c')
-rw-r--r--pango/pangocairo-atsuifont.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pango/pangocairo-atsuifont.c b/pango/pangocairo-atsuifont.c
index ce00ca10..02d69691 100644
--- a/pango/pangocairo-atsuifont.c
+++ b/pango/pangocairo-atsuifont.c
@@ -219,8 +219,8 @@ pango_cairo_atsui_font_get_metrics (PangoFont *font,
metrics->ascent = ats_metrics.ascent * cafont->size * PANGO_SCALE;
metrics->descent = -ats_metrics.descent * cafont->size * PANGO_SCALE;
- metrics->approximate_char_width = ats_metrics.avgAdvanceWidth * cafont->size * PANGO_SCALE;
- metrics->approximate_digit_width = ats_metrics.avgAdvanceWidth * cafont->size * PANGO_SCALE;
+ metrics->approximate_char_width = ats_metrics.maxAdvanceWidth * cafont->size * PANGO_SCALE;
+ metrics->approximate_digit_width = ats_metrics.maxAdvanceWidth * cafont->size * PANGO_SCALE;
metrics->underline_position = ats_metrics.underlinePosition * cafont->size * PANGO_SCALE;
metrics->underline_thickness = ats_metrics.underlineThickness * cafont->size * PANGO_SCALE;