summaryrefslogtreecommitdiff
path: root/pango/pangowin32.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2004-12-14 01:06:55 +0000
committerTor Lillqvist <tml@src.gnome.org>2004-12-14 01:06:55 +0000
commit3c3fa7f42661c7f26493ae1a05f819d2cdf64d33 (patch)
treec0e4f8cee18204f3d84e1a824c5fe25eda056e81 /pango/pangowin32.c
parent2fc2d85e7adc829d890cdd98caeb868f419f0cca (diff)
downloadpango-3c3fa7f42661c7f26493ae1a05f819d2cdf64d33.tar.gz
Set also underline and strikethrough position and thickness. (#161205)
2004-12-14 Tor Lillqvist <tml@iki.fi> * pango/pangowin32.c (pango_win32_font_get_metrics): Set also underline and strikethrough position and thickness. (#161205)
Diffstat (limited to 'pango/pangowin32.c')
-rw-r--r--pango/pangowin32.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/pango/pangowin32.c b/pango/pangowin32.c
index b63767e2..0a02dbc2 100644
--- a/pango/pangowin32.c
+++ b/pango/pangowin32.c
@@ -397,12 +397,12 @@ pango_win32_render (HDC hdc,
}
void
-pango_win32_render_transformed (HDC hdc,
- const PangoMatrix *matrix,
- PangoFont *font,
- PangoGlyphString *glyphs,
- int x,
- int y)
+pango_win32_render_transformed (HDC hdc,
+ const PangoMatrix *matrix,
+ PangoFont *font,
+ PangoGlyphString *glyphs,
+ int x,
+ int y)
{
XFORM xForm;
XFORM xFormPrev = {1.0, 0.0, 0.0, 1.0, 0.0, 0.0};
@@ -575,6 +575,13 @@ pango_win32_font_get_metrics (PangoFont *font,
pango_layout_set_text (layout, "0123456789", -1);
metrics->approximate_digit_width = max_glyph_width (layout);
+ /* FIXME: Should get the real values from the TrueType font file */
+ metrics->underline_position = -2 * PANGO_SCALE;
+ metrics->underline_thickness = 1 * PANGO_SCALE;
+ metrics->strikethrough_thickness = metrics->underline_thickness;
+ /* Really really wild guess */
+ metrics->strikethrough_position = metrics->ascent / 3;
+
pango_font_description_free (font_desc);
g_object_unref (layout);
g_object_unref (context);