diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/win/salgdi.h | 2 | ||||
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 10 | ||||
-rw-r--r-- | vcl/win/window/salframe.cxx | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index 19edee0f4440..f8107a4a2a00 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -372,7 +372,7 @@ public: void ImplUpdateSysColorEntries(); int ImplIsSysColorEntry( Color nColor ); void ImplGetLogFontFromFontSelect( const vcl::font::FontSelectPattern&, - const vcl::font::PhysicalFontFace*, LOGFONTW& ); + const vcl::font::PhysicalFontFace*, LOGFONTW&, bool bAntiAliased); #define MAX_64KSALPOINTS ((((sal_uInt16)0xFFFF)-8)/sizeof(POINTS)) diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index fb9e004b708d..63effb158ee8 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -675,7 +675,7 @@ static int CALLBACK SalEnumQueryFontProcExW( const LOGFONTW*, const TEXTMETRICW* void ImplGetLogFontFromFontSelect( const vcl::font::FontSelectPattern& rFont, const vcl::font::PhysicalFontFace* pFontFace, - LOGFONTW& rLogFont ) + LOGFONTW& rLogFont, bool bAntiAliased) { OUString aName; if (pFontFace) @@ -711,7 +711,6 @@ void ImplGetLogFontFromFontSelect( const vcl::font::FontSelectPattern& rFont, rLogFont.lfEscapement = rFont.mnOrientation.get(); rLogFont.lfOrientation = rLogFont.lfEscapement; rLogFont.lfClipPrecision = CLIP_DEFAULT_PRECIS; - rLogFont.lfQuality = DEFAULT_QUALITY; rLogFont.lfOutPrecision = OUT_TT_PRECIS; if ( rFont.mnOrientation ) rLogFont.lfClipPrecision |= CLIP_LH_ANGLES; @@ -719,7 +718,10 @@ void ImplGetLogFontFromFontSelect( const vcl::font::FontSelectPattern& rFont, // disable antialiasing if requested if ( rFont.mbNonAntialiased ) rLogFont.lfQuality = NONANTIALIASED_QUALITY; - + else if (bAntiAliased || Application::GetSettings().GetStyleSettings().GetUseFontAAFromSystem()) + rLogFont.lfQuality = DEFAULT_QUALITY; + else + rLogFont.lfQuality = NONANTIALIASED_QUALITY; } std::tuple<HFONT,bool,sal_Int32> WinSalGraphics::ImplDoSetFont(HDC hDC, vcl::font::FontSelectPattern const & i_rFont, @@ -729,7 +731,7 @@ std::tuple<HFONT,bool,sal_Int32> WinSalGraphics::ImplDoSetFont(HDC hDC, vcl::fon HFONT hNewFont = nullptr; LOGFONTW aLogFont; - ImplGetLogFontFromFontSelect( i_rFont, i_pFontFace, aLogFont ); + ImplGetLogFontFromFontSelect( i_rFont, i_pFontFace, aLogFont, getAntiAlias()); bool bIsCJKVerticalFont = false; // select vertical mode for printing if requested and available diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index 1661d3408fa8..783ca27192c6 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -2258,7 +2258,7 @@ static void ImplSalFrameSetInputContext( HWND hWnd, const SalInputContext* pCont { LOGFONTW aLogFont; ImplGetLogFontFromFontSelect(pContext->mpFont->GetFontSelectPattern(), - nullptr, aLogFont); + nullptr, aLogFont, true); ImmSetCompositionFontW( hIMC, &aLogFont ); ImmReleaseContext( pFrame->mhWnd, hIMC ); } |