diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2011-02-28 17:12:48 +0100 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2011-02-28 17:12:48 +0100 |
commit | 6c4a630826520dff28c0ba0616c976e6d995e2c5 (patch) | |
tree | a3ae994f495d4e78e0f8f483c3b0abe61b0f03d4 /canvas/source/directx | |
parent | 6ca901341d6971ff1d2d390aa26f95fcdc757dd0 (diff) | |
parent | d3b03514dde317473db0d247f21405b5db6a727e (diff) |
CWS-TOOLING: integrate CWS impress195
Diffstat (limited to 'canvas/source/directx')
-rwxr-xr-x | canvas/source/directx/dx_textlayout_drawhelper.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx index b246cf5bedeb..7fd29805e2f7 100755 --- a/canvas/source/directx/dx_textlayout_drawhelper.cxx +++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx @@ -39,6 +39,7 @@ #include <boost/scoped_array.hpp> #include <boost/bind.hpp> #include <com/sun/star/rendering/FontRequest.hpp> +#include <com/sun/star/rendering/PanoseProportion.hpp> #include <com/sun/star/rendering/XCanvasFont.hpp> #include <comphelper/sequence.hxx> #include <comphelper/scopeguard.hxx> @@ -132,6 +133,9 @@ namespace dxcanvas aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False ); aFont.SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) ); aFont.SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL ); + aFont.SetPitch( + rFontRequest.FontDescription.FontDescription.Proportion == rendering::PanoseProportion::MONO_SPACED + ? PITCH_FIXED : PITCH_VARIABLE); aFont.SetLanguage(MsLangId::convertLocaleToLanguage(rFontRequest.Locale)); @@ -264,6 +268,9 @@ namespace dxcanvas aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False ); aFont.SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) ); aFont.SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL ); + aFont.SetPitch( + rFontRequest.FontDescription.FontDescription.Proportion == rendering::PanoseProportion::MONO_SPACED + ? PITCH_FIXED : PITCH_VARIABLE); // adjust to stretched font if(!::rtl::math::approxEqual(rFontMatrix.m00, rFontMatrix.m11)) |