Created
December 4, 2015 20:16
-
-
Save bratsche/0b33d49a317c604fe261 to your computer and use it in GitHub Desktop.
Cairo Win32 font changes for device scale
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/src/win32/cairo-win32-font.c | |
+++ b/src/win32/cairo-win32-font.c | |
@@ -379,6 +379,8 @@ _win32_scaled_font_create (LOGFONTW *logfont, | |
/* don't delete the hfont if we're using the one passed in to us */ | |
f->delete_scaled_hfont = !f->scaled_hfont; | |
+ cairo_matrix_scale (font_matrix, 1.0 / device_scale, 1.0 / device_scale); | |
+ cairo_matrix_scale (ctm, device_scale, device_scale); | |
cairo_matrix_multiply (&scale, font_matrix, ctm); | |
status = _compute_transform (f, &scale); | |
if (status) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment