summaryrefslogtreecommitdiff
path: root/pango/pangowin32.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2006-05-23 08:10:24 +0000
committerTor Lillqvist <tml@src.gnome.org>2006-05-23 08:10:24 +0000
commitedbfd1b8a9611d2351d254b2717487e5089eae90 (patch)
tree6d5be273d1c73e24b920029a2caceb0cf42a09df /pango/pangowin32.c
parentd0ca71f5d17074f8ed87f3f2e5d7536ab207830d (diff)
downloadpango-edbfd1b8a9611d2351d254b2717487e5089eae90.tar.gz
Initialize the describe_absolute method pointer correctly.
2006-05-23 Tor Lillqvist <tml@novell.com> * pango/pangowin32.c (pango_win32_font_class_init): Initialize the describe_absolute method pointer correctly. (pango_win32_font_describe): Scale size to points which is what pango_font_description_set_size() wants. There has been several bugs opened around this issue, with more or less misleading guesses. See for instance #314114. Thanks to Behdad for finally noticing the real problem here.
Diffstat (limited to 'pango/pangowin32.c')
-rw-r--r--pango/pangowin32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pango/pangowin32.c b/pango/pangowin32.c
index 7e3a2c00..b0ce7151 100644
--- a/pango/pangowin32.c
+++ b/pango/pangowin32.c
@@ -201,7 +201,7 @@ pango_win32_font_class_init (PangoWin32FontClass *class)
object_class->dispose = pango_win32_font_dispose;
font_class->describe = pango_win32_font_describe;
- font_class->describe_absolute = pango_win32_font_describe;
+ font_class->describe_absolute = pango_win32_font_describe_absolute;
font_class->get_coverage = pango_win32_font_get_coverage;
font_class->find_shaper = pango_win32_font_find_shaper;
font_class->get_glyph_extents = pango_win32_font_get_glyph_extents;
@@ -806,7 +806,7 @@ pango_win32_font_describe (PangoFont *font)
PangoWin32Font *win32font = PANGO_WIN32_FONT (font);
desc = pango_font_description_copy (win32font->win32face->description);
- pango_font_description_set_size (desc, win32font->size /* TODO */);
+ pango_font_description_set_size (desc, win32font->size / (PANGO_SCALE / PANGO_WIN32_FONT_MAP (win32font->fontmap)->resolution));
return desc;
}