[Libreoffice-commits] core.git: vcl/win

Khaled Hosny khaledhosny at eglug.org
Mon May 21 13:13:41 UTC 2018


 vcl/win/gdi/winlayout.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 6a54247c7dfc31aa53e6db7122e31e5498715184
Author: Khaled Hosny <khaledhosny at eglug.org>
Date:   Sat May 19 18:31:41 2018 +0200

    Partially revert "Fixup 23c5125148a8110d88385b29570bf0b7d4400458"
    
    This reverts most of commit e8d48dd75a1bb31b5bc500bc79fb80384a09bcc6.
    
    Hopefully it will make the Win at 42 tinderbox happy again.
    
    Change-Id: Ie5ef2c16a62e774dcd1f6005df3d86e1973dea2d
    Reviewed-on: https://gerrit.libreoffice.org/54567
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index 656681a46a8a..95034c97372b 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -342,7 +342,7 @@ static hb_blob_t* getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pU
 hb_font_t* WinFontInstance::ImplInitHbFont()
 {
     assert(m_hDC);
-    assert(m_hFont);
+    m_hFont = static_cast<HFONT>(GetCurrentObject(m_hDC, OBJ_FONT));
     hb_font_t* pHbFont = InitHbFont(hb_face_create_for_tables(getFontTable, m_hFont, nullptr));
 
     // Calculate the AverageWidthFactor, see LogicalFontInstance::GetScale().
@@ -378,7 +378,6 @@ void WinFontInstance::SetHDC(const HDC hDC)
         return;
     ReleaseHbFont();
     m_hDC = hDC;
-    m_hFont = static_cast<HFONT>(GetCurrentObject(m_hDC, OBJ_FONT));
 }
 
 bool WinSalGraphics::CacheGlyphs(const GenericSalLayout& rLayout)


More information about the Libreoffice-commits mailing list