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) {