summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-01-23 12:15:44 +0000
committerEike Rathke <erack@redhat.com>2012-01-23 15:06:41 +0100
commit95372ec15484a74c8956cda869c55138dc318daf (patch)
treeea858adbbdf36d78671da7542699e1b6924a48ad
parentbe423cf84071881c7edf02e713bb769993c48663 (diff)
Resolves: fdo#44856 skew artificial fonts before glyph or layout rotation
(cherry picked from commit 8f23e9813daae808aa2a81250b5e414dc57a3394) Signed-off-by: Eike Rathke <erack@redhat.com>
-rw-r--r--qadevOOo/testdocs/vertical-testcase.odtbin18060 -> 19594 bytes
-rw-r--r--vcl/unx/generic/gdi/salgdi3.cxx11
2 files changed, 8 insertions, 3 deletions
diff --git a/qadevOOo/testdocs/vertical-testcase.odt b/qadevOOo/testdocs/vertical-testcase.odt
index cd279c8115ad..de564f82887d 100644
--- a/qadevOOo/testdocs/vertical-testcase.odt
+++ b/qadevOOo/testdocs/vertical-testcase.odt
Binary files differ
diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx
index 2e40bb9b7f36..c8418ba82ffc 100644
--- a/vcl/unx/generic/gdi/salgdi3.cxx
+++ b/vcl/unx/generic/gdi/salgdi3.cxx
@@ -415,9 +415,6 @@ void X11SalGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout )
cairo_matrix_init_identity(&m);
- if (rFont.NeedsArtificialItalic())
- m.xy = -m.xx * 0x6000L / 0x10000L;
-
if (rLayout.GetOrientation())
cairo_matrix_rotate(&m, toRadian(rLayout.GetOrientation()));
@@ -464,6 +461,14 @@ void X11SalGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout )
cairo_matrix_translate(&m, xdiff, ydiff);
}
+ if (rFont.NeedsArtificialItalic())
+ {
+ cairo_matrix_t shear;
+ cairo_matrix_init_identity(&shear);
+ shear.xy = -shear.xx * 0x6000L / 0x10000L;
+ cairo_matrix_multiply(&m, &shear, &m);
+ }
+
cairo_set_font_matrix(cr, &m);
cairo_show_glyphs(cr, &cairo_glyphs[nStartIndex], nLen);