summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pango/pangocairo-coretextfont.c2
-rw-r--r--pango/pangocairo-win32font.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/pango/pangocairo-coretextfont.c b/pango/pangocairo-coretextfont.c
index 290a5ccf..0f2a9ef1 100644
--- a/pango/pangocairo-coretextfont.c
+++ b/pango/pangocairo-coretextfont.c
@@ -220,6 +220,8 @@ _pango_cairo_core_text_font_new (PangoCairoCoreTextFontMap *cafontmap,
abs_size = pango_core_text_font_key_get_absolute_size (key);
size = pango_units_to_double (abs_size);
+ size /= pango_matrix_get_font_scale_factor (pango_core_text_font_key_get_matrix (key));
+
ctdescriptor = pango_core_text_font_key_get_ctfontdescriptor (key);
font_ref = CTFontCreateWithFontDescriptor (ctdescriptor, size, NULL);
diff --git a/pango/pangocairo-win32font.c b/pango/pangocairo-win32font.c
index 59f7c0f6..61d7d608 100644
--- a/pango/pangocairo-win32font.c
+++ b/pango/pangocairo-win32font.c
@@ -252,6 +252,9 @@ _pango_cairo_win32_font_new (PangoCairoWin32FontMap *cwfontmap,
if (!pango_font_description_get_size_is_absolute (desc))
size *= dpi / 72.;
+ if (context)
+ size /= pango_matrix_get_font_scale_factor (pango_context_get_matrix (context));
+
#ifdef USE_FACE_CACHED_FONTS
win32fontmap = PANGO_WIN32_FONT_MAP (cwfontmap);