diff options
17 files changed, 29 insertions, 1 deletions
diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx index 452280728151..a083d2d4a82f 100644 --- a/canvas/source/cairo/cairo_canvasfont.cxx +++ b/canvas/source/cairo/cairo_canvasfont.cxx @@ -30,6 +30,8 @@ #include <canvas/debug.hxx> +#include <com/sun/star/rendering/PanoseProportion.hpp> + #include <rtl/math.hxx> #include <basegfx/numeric/ftools.hxx> @@ -83,6 +85,9 @@ namespace cairocanvas // TODO(F2): improve panose->vclenum conversion maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) ); maFont->SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL ); + maFont->SetPitch( + rFontRequest.FontDescription.FontDescription.Proportion == rendering::PanoseProportion::MONO_SPACED + ? PITCH_FIXED : PITCH_VARIABLE); maFont->SetLanguage(MsLangId::convertLocaleToLanguage(rFontRequest.Locale)); 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)) diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx index e95a3f79f2b5..302254acdcab 100644 --- a/canvas/source/vcl/canvasfont.cxx +++ b/canvas/source/vcl/canvasfont.cxx @@ -35,6 +35,8 @@ #include <i18npool/mslangid.hxx> #include <vcl/metric.hxx> +#include <com/sun/star/rendering/PanoseProportion.hpp> + #include "canvasfont.hxx" #include "textlayout.hxx" @@ -63,6 +65,9 @@ namespace vclcanvas // TODO(F2): improve panose->vclenum conversion maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) ); maFont->SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL ); + maFont->SetPitch( + rFontRequest.FontDescription.FontDescription.Proportion == rendering::PanoseProportion::MONO_SPACED + ? PITCH_FIXED : PITCH_VARIABLE); maFont->SetLanguage(MsLangId::convertLocaleToLanguage(rFontRequest.Locale)); diff --git a/comphelper/inc/comphelper/docpasswordrequest.hxx b/comphelper/inc/comphelper/docpasswordrequest.hxx index effc47392078..effc47392078 100755..100644 --- a/comphelper/inc/comphelper/docpasswordrequest.hxx +++ b/comphelper/inc/comphelper/docpasswordrequest.hxx diff --git a/comphelper/source/misc/docpasswordrequest.cxx b/comphelper/source/misc/docpasswordrequest.cxx index 15c2e09ba0f3..15c2e09ba0f3 100755..100644 --- a/comphelper/source/misc/docpasswordrequest.cxx +++ b/comphelper/source/misc/docpasswordrequest.cxx diff --git a/cppcanvas/inc/cppcanvas/renderer.hxx b/cppcanvas/inc/cppcanvas/renderer.hxx index 780a27f31503..12d97e075317 100644 --- a/cppcanvas/inc/cppcanvas/renderer.hxx +++ b/cppcanvas/inc/cppcanvas/renderer.hxx @@ -136,6 +136,9 @@ namespace cppcanvas /// Optionally forces the given font letter form (italics etc.) for all text actions ::comphelper::OptionalValue< sal_Int8 > maFontLetterForm; + /// Optionally forces the given font proportion (condensed, monospaced etc.) for all text actions + ::comphelper::OptionalValue< sal_Int8 > maFontProportion; + /// Optionally forces underlining for all text actions ::comphelper::OptionalValue< bool > maFontUnderline; }; diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 1423cd42ed93..7ac049e43660 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -43,6 +43,7 @@ #include <com/sun/star/rendering/TexturingMode.hpp> #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/geometry/RealPoint2D.hpp> +#include <com/sun/star/rendering/PanoseProportion.hpp> #include <com/sun/star/rendering/ViewState.hpp> #include <com/sun/star/rendering/RenderState.hpp> #include <com/sun/star/rendering/XCanvasFont.hpp> @@ -850,6 +851,12 @@ namespace cppcanvas rParms.mrParms.maFontLetterForm.isValid() ? rParms.mrParms.maFontLetterForm.getValue() : (rFont.GetItalic() == ITALIC_NONE) ? 0 : 9; + aFontRequest.FontDescription.FontDescription.Proportion = + rParms.mrParms.maFontProportion.isValid() ? + rParms.mrParms.maFontProportion.getValue() : + (rFont.GetPitch() == PITCH_FIXED) + ? rendering::PanoseProportion::MONO_SPACED + : rendering::PanoseProportion::ANYTHING; LanguageType aLang = rFont.GetLanguage(); aFontRequest.Locale = MsLangId::convertLanguageToLocale(aLang, false); @@ -2967,7 +2974,8 @@ namespace cppcanvas if( rParams.maFontName.isValid() || rParams.maFontWeight.isValid() || rParams.maFontLetterForm.isValid() || - rParams.maFontUnderline.isValid() ) + rParams.maFontUnderline.isValid() || + rParams.maFontProportion.isValid() ) { ::cppcanvas::internal::OutDevState& rState = getState( aStateStack ); diff --git a/i18npool/source/localedata/data/makefile.mk b/i18npool/source/localedata/data/makefile.mk index 1034de7f11bf..1034de7f11bf 100755..100644 --- a/i18npool/source/localedata/data/makefile.mk +++ b/i18npool/source/localedata/data/makefile.mk diff --git a/svl/inc/lngmisc.hxx b/svl/inc/lngmisc.hxx index 5143d147227d..5143d147227d 100755..100644 --- a/svl/inc/lngmisc.hxx +++ b/svl/inc/lngmisc.hxx diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx index 488e317c6f58..488e317c6f58 100755..100644 --- a/svl/source/misc/lngmisc.cxx +++ b/svl/source/misc/lngmisc.cxx diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index 7b1f2ad87108..7b1f2ad87108 100644..100755 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index 6781efc070fe..6781efc070fe 100644..100755 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx diff --git a/svtools/source/control/taskstat.cxx b/svtools/source/control/taskstat.cxx index ba5e8d53b8b2..ba5e8d53b8b2 100644..100755 --- a/svtools/source/control/taskstat.cxx +++ b/svtools/source/control/taskstat.cxx diff --git a/svtools/source/filter.vcl/filter/exportdialog.hrc b/svtools/source/filter.vcl/filter/exportdialog.hrc index e230bcd2c5c3..e230bcd2c5c3 100755..100644 --- a/svtools/source/filter.vcl/filter/exportdialog.hrc +++ b/svtools/source/filter.vcl/filter/exportdialog.hrc diff --git a/svtools/source/filter.vcl/filter/exportdialog.hxx b/svtools/source/filter.vcl/filter/exportdialog.hxx index 20a9ac3ea832..20a9ac3ea832 100755..100644 --- a/svtools/source/filter.vcl/filter/exportdialog.hxx +++ b/svtools/source/filter.vcl/filter/exportdialog.hxx diff --git a/unotools/inc/unotools/lingucfg.hxx b/unotools/inc/unotools/lingucfg.hxx index 9a26bdd73021..9a26bdd73021 100644..100755 --- a/unotools/inc/unotools/lingucfg.hxx +++ b/unotools/inc/unotools/lingucfg.hxx diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index 39233f022534..39233f022534 100644..100755 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx |