summaryrefslogtreecommitdiff
path: root/pango/pangocairo-win32font.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango/pangocairo-win32font.c')
-rw-r--r--pango/pangocairo-win32font.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pango/pangocairo-win32font.c b/pango/pangocairo-win32font.c
index af4e1d07..d01e6f0b 100644
--- a/pango/pangocairo-win32font.c
+++ b/pango/pangocairo-win32font.c
@@ -140,6 +140,9 @@ pango_cairo_win32_font_create_metrics_for_context (PangoCairoFont *font,
&metrics->underline_position);
pango_quantize_line_geometry (&metrics->strikethrough_thickness,
&metrics->strikethrough_position);
+ /* Quantizing may have pushed underline_position to 0. Not good */
+ if (metrics->underline_position == 0)
+ metrics->underline_position = - metrics->underline_thickness;
layout = pango_layout_new (context);
font_desc = pango_font_describe_with_absolute_size ((PangoFont *) font);