Bug 454098. Fix signs for baseline offsets for glyphs on Windows. r+sr=roc

This commit is contained in:
Jonathan Kew 2009-01-28 22:39:35 +13:00
Родитель a50998e4f0
Коммит c40845e262
4 изменённых файлов: 29 добавлений и 3 удалений

Просмотреть файл

@ -40,7 +40,9 @@ ft-done-face.patch: bug 467874; only destroy FT_Faces created by cairo
wince-fontconfig.patch: bug 462908; fixes required to compile for windows ce. Also allows for building without fontconfig
gfx/cairo/glyph-safety-margin.patch: Change the glyph dropping safety margin from 2em to 10em for bug 460023. Upstream commit: 28a72648ba7abe02ebd4df7234424e333b85dc9c.
glyph-safety-margin.patch: Change the glyph dropping safety margin from 2em to 10em for bug 460023. Upstream commit: 28a72648ba7abe02ebd4df7234424e333b85dc9c.
win32-vertically-offset-glyph.patch: bug 454098; vertical positioning errors when drawing glyph runs including delta-y offsets on screen via GDI
==== pixman patches ====

Просмотреть файл

@ -1747,7 +1747,8 @@ _cairo_win32_surface_show_glyphs (void *surface,
next_logical_y = _cairo_lround (next_user_y);
dxy_buf[j] = _cairo_lround (next_logical_x - logical_x);
dxy_buf[j+1] = _cairo_lround (next_logical_y - logical_y);
dxy_buf[j+1] = _cairo_lround (logical_y - next_logical_y);
/* note that GDI coordinate system is inverted */
logical_x = next_logical_x;
logical_y = next_logical_y;

Просмотреть файл

@ -0,0 +1,23 @@
diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
--- a/gfx/cairo/cairo/src/cairo-win32-surface.c
+++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
@@ -1742,17 +1742,18 @@ _cairo_win32_surface_show_glyphs (void
cairo_matrix_transform_point(&device_to_logical,
&next_user_x, &next_user_y);
next_logical_x = _cairo_lround (next_user_x);
next_logical_y = _cairo_lround (next_user_y);
dxy_buf[j] = _cairo_lround (next_logical_x - logical_x);
- dxy_buf[j+1] = _cairo_lround (next_logical_y - logical_y);
+ dxy_buf[j+1] = _cairo_lround (logical_y - next_logical_y);
+ /* note that GDI coordinate system is inverted */
logical_x = next_logical_x;
logical_y = next_logical_y;
}
}
/* Using glyph indices for a Type 1 font does not work on a
* printer DC. The win32 printing surface will convert the the

Просмотреть файл

@ -1932,7 +1932,7 @@ public:
details->mGlyphID = mGlyphs[k + i];
details->mAdvance = mAdvances[k + i]*appUnitsPerDevUnit;
details->mXOffset = float(mOffsets[k + i].du)*appUnitsPerDevUnit*aRun->GetDirection();
details->mYOffset = float(mOffsets[k + i].dv)*appUnitsPerDevUnit;
details->mYOffset = - float(mOffsets[k + i].dv)*appUnitsPerDevUnit;
}
aRun->SetGlyphs(runOffset,
g.SetComplex(PR_TRUE, PR_TRUE, glyphCount), detailedGlyphs.Elements());