diff options
Diffstat (limited to 'vcl/source/gdi/CommonSalLayout.cxx')
-rw-r--r-- | vcl/source/gdi/CommonSalLayout.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx index 220b3b107284..af79404ba979 100644 --- a/vcl/source/gdi/CommonSalLayout.cxx +++ b/vcl/source/gdi/CommonSalLayout.cxx @@ -38,11 +38,6 @@ T lround(T x) } #endif -#ifdef _WIN32 -# include <vcl/opengl/OpenGLHelper.hxx> -#endif - - static hb_blob_t* getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pUserData) { char pTagName[5]; @@ -189,7 +184,7 @@ CommonSalLayout::CommonSalLayout(HDC hDC, WinFontInstance& rWinFontInstance, con } // Calculate the mnAveWidthFactor, see the comment where it is used. - if (mrFontSelData.mnWidth && ! OpenGLHelper::isVCLOpenGLEnabled()) + if (mrFontSelData.mnWidth) { double nUPEM = hb_face_get_upem(hb_font_get_face(mpHbFont)); @@ -213,6 +208,13 @@ CommonSalLayout::CommonSalLayout(HDC hDC, WinFontInstance& rWinFontInstance, con } } +bool CommonSalLayout::hasHScale() const +{ + int nHeight(mrFontSelData.mnHeight); + int nWidth(mrFontSelData.mnWidth ? mrFontSelData.mnWidth * mnAveWidthFactor : nHeight); + return nWidth != nHeight; +} + #elif defined(MACOSX) || defined(IOS) CommonSalLayout::CommonSalLayout(const CoreTextStyle& rCoreTextStyle) : mrFontSelData(rCoreTextStyle.maFontSelData) |