summaryrefslogtreecommitdiff
path: root/canvas/source/directx/dx_textlayout_drawhelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'canvas/source/directx/dx_textlayout_drawhelper.cxx')
-rwxr-xr-xcanvas/source/directx/dx_textlayout_drawhelper.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx
index 56ec00e9a648..d81a47d14384 100755
--- a/canvas/source/directx/dx_textlayout_drawhelper.cxx
+++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx
@@ -132,6 +132,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 +267,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))