gfx/cairo/win32-vertically-offset-glyph.patch

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
michael@0 2 --- a/gfx/cairo/cairo/src/cairo-win32-surface.c
michael@0 3 +++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
michael@0 4 @@ -1742,17 +1742,18 @@ _cairo_win32_surface_show_glyphs (void
michael@0 5
michael@0 6 cairo_matrix_transform_point(&device_to_logical,
michael@0 7 &next_user_x, &next_user_y);
michael@0 8
michael@0 9 next_logical_x = _cairo_lround (next_user_x);
michael@0 10 next_logical_y = _cairo_lround (next_user_y);
michael@0 11
michael@0 12 dxy_buf[j] = _cairo_lround (next_logical_x - logical_x);
michael@0 13 - dxy_buf[j+1] = _cairo_lround (next_logical_y - logical_y);
michael@0 14 + dxy_buf[j+1] = _cairo_lround (logical_y - next_logical_y);
michael@0 15 + /* note that GDI coordinate system is inverted */
michael@0 16
michael@0 17 logical_x = next_logical_x;
michael@0 18 logical_y = next_logical_y;
michael@0 19 }
michael@0 20 }
michael@0 21
michael@0 22 /* Using glyph indices for a Type 1 font does not work on a
michael@0 23 * printer DC. The win32 printing surface will convert the the

mercurial