From a77c05ea22b097c390fc492cc9c55e02f892412a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 26 Nov 2009 02:33:53 +0000 Subject: [PATCH] Return face name from wxFont::GetNativeFontInfo() under MSW. Retrieve the face name from the system if we don't have it already before returning the native font info. This fixes the currently failing font unit tests. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/font.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/msw/font.cpp b/src/msw/font.cpp index ac1a4d3cce..f22d5aefdf 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -289,7 +289,14 @@ public: } const wxNativeFontInfo& GetNativeFontInfo() const - { return m_nativeFontInfo; } + { + // ensure that we have a valid face name in our font information: + // GetFaceName() will try to retrieve it from our HFONT and save it if + // it was successful + (void)GetFaceName(); + + return m_nativeFontInfo; + } void SetNativeFontInfo(const wxNativeFontInfo& nativeFontInfo) { -- 2.47.2