diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.pre-1-10 | 5 | ||||
-rw-r--r-- | ChangeLog.pre-1-8 | 5 | ||||
-rw-r--r-- | pango/pangowin32.c | 19 |
4 files changed, 28 insertions, 6 deletions
@@ -1,3 +1,8 @@ +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) + Mon Dec 13 14:44:40 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.[ch] pango/pango.def docs/pango-sections.txt: diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index c4954f2b..9370ae8a 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,3 +1,8 @@ +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) + Mon Dec 13 14:44:40 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.[ch] pango/pango.def docs/pango-sections.txt: diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index c4954f2b..9370ae8a 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -1,3 +1,8 @@ +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) + Mon Dec 13 14:44:40 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.[ch] pango/pango.def docs/pango-sections.txt: 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); |