diff options
author | Andre Fischer <af@openoffice.org> | 2010-07-14 15:54:26 +0200 |
---|---|---|
committer | Andre Fischer <af@openoffice.org> | 2010-07-14 15:54:26 +0200 |
commit | a7b3942c0f04f24455ab85ec0c0a8c2a0014da0f (patch) | |
tree | 2c95d3537d96d0c56dad2efbaea0cab37f852bc1 /canvas/source/directx | |
parent | be588658ea127a6a05390435126f1d739a477b58 (diff) |
impress195: #i64671# Fixed font pitch processing.
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 56ec00e9a648..0cb20a096c18 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) ? TRUE : 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) ? TRUE : 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)) |