diff options
author | John Ralls <jralls@ceridwen.us> | 2017-08-15 09:21:26 +0200 |
---|---|---|
committer | John Ralls <jralls@ceridwen.us> | 2017-08-15 09:26:36 +0200 |
commit | 8ab2cc198469b4a46b1536c4f5c5d3396a6444b4 (patch) | |
tree | e98ab683e7fb7afbf39fac6796bde905f14ca38a /pango/pangocoretext.c | |
parent | 599ffcf042bbca6f87edff0e241958523145294d (diff) | |
download | pango-8ab2cc198469b4a46b1536c4f5c5d3396a6444b4.tar.gz |
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
Diffstat (limited to 'pango/pangocoretext.c')
-rw-r--r-- | pango/pangocoretext.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |