summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-01-23 12:15:44 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-01-23 12:16:32 +0000
commit8f23e9813daae808aa2a81250b5e414dc57a3394 (patch)
treea9a01e43e7969792dfcbb10d5d179e08c3218ed8 /vcl
parent1921a96c323f5a0dcd846f5d17a6bbb3de208797 (diff)
Resolves: fdo#44856 skew artificial fonts before glyph or layout rotation
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/generic/gdi/salgdi3.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx
index e27cb43bf998..a44416187e9b 100644
--- a/vcl/unx/generic/gdi/salgdi3.cxx
+++ b/vcl/unx/generic/gdi/salgdi3.cxx
@@ -414,9 +414,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()));
@@ -463,6 +460,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);