From 8ab2cc198469b4a46b1536c4f5c5d3396a6444b4 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Tue, 15 Aug 2017 09:21:26 +0200 Subject: CoreText: Remove absolute size and scaling to screen resolution. Cairo's CGFont backend already handles scaling fonts to the display resolution, so scaling to the screen screen resolution in Pango's CoreText backend generates double-sized text on a Retina display. The layout test depended on providing a (bogus) resolution of 96DPI and scaling the font to it in order to obtain the "expected" layout results. This is replaced by adjusting the font size in test-layout.c if Pango is compiled for CoreText. https://bugzilla.gnome.org/show_bug.cgi?id=782393 --- pango/pangocoretext.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pango/pangocoretext.c') diff --git a/pango/pangocoretext.c b/pango/pangocoretext.c index a8c0b5d2..8cba1aae 100644 --- a/pango/pangocoretext.c +++ b/pango/pangocoretext.c @@ -225,6 +225,10 @@ pango_core_text_font_class_init (PangoCoreTextFontClass *class) object_class->finalize = pango_core_text_font_finalize; font_class->describe = pango_core_text_font_describe; + /* In CoreText the device unit is points so describe_absoulute and + * describe are the same. + */ + font_class->describe_absolute = pango_core_text_font_describe; font_class->get_coverage = pango_core_text_font_get_coverage; font_class->find_shaper = pango_core_text_font_find_shaper; font_class->get_font_map = pango_core_text_font_get_font_map; -- cgit v1.2.1