From 619d05280a2b929908565d87a6edbba5a04dc21b Mon Sep 17 00:00:00 2001
From: Robin Dunn <robin@alldunn.com>
Date: Thu, 22 Jul 1999 07:34:57 +0000
Subject: [PATCH] fixed font-matching bug in wxFontList::FindOrCreateFont for
 wxGTK when font family is wxDEFAULT.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 src/common/gdicmn.cpp | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp
index 53a1a34117..b2554b00fd 100644
--- a/src/common/gdicmn.cpp
+++ b/src/common/gdicmn.cpp
@@ -90,13 +90,13 @@ bool wxRect::operator==(const wxRect& rect) const
 }
 
 const wxRect& wxRect::operator += (const wxRect& rect)
-{ 
-	*this = (*this + rect); 
+{
+	*this = (*this + rect);
 	return ( *this ) ;
 }
 
 wxRect wxRect::operator + (const wxRect& rect) const
-{ 
+{
 	int x1 = wxMin(this->x, rect.x);
 	int y1 = wxMin(this->y, rect.y);
 	int y2 = wxMax(y+height, rect.height+rect.y);
@@ -595,7 +595,12 @@ wxFont *wxFontList::
           //#if defined(__X__)
           //          each_font->GetFontId () == FamilyOrFontId) /* New font system */
           //#else
-          each_font->GetFamily () == FamilyOrFontId &&
+#if defined(__WXGTK__)
+          (each_font->GetFamily() == FamilyOrFontId ||
+           (each_font->GetFamily() == wxSWISS && FamilyOrFontId == wxDEFAULT)) &&
+#else
+          each_font->GetFamily() == FamilyOrFontId &&
+#endif
           ((each_font->GetFaceName() == _T("")) || each_font->GetFaceName() == Face))
         //#endif
         return each_font;
-- 
2.47.2