From b4e4abb51c35065b48ce5abe6b727aac498101dd Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 12 Jul 2003 12:39:33 +0000 Subject: [PATCH] font is only non default if it has non default field values git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/unix/fontutil.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/unix/fontutil.cpp b/src/unix/fontutil.cpp index b1e8be165a..e1521328fc 100644 --- a/src/unix/fontutil.cpp +++ b/src/unix/fontutil.cpp @@ -391,16 +391,20 @@ bool wxNativeFontInfo::FromXFontName(const wxString& fontname) return FALSE; } - fontElements[n] = tokenizer.GetNextToken(); + wxString field = tokenizer.GetNextToken(); + if ( !field.empty() && field != _T('*') ) + { + // we're really initialized now + m_isDefault = FALSE; + } + + fontElements[n] = field; } // this should be all if ( tokenizer.HasMoreTokens() ) return FALSE; - // we're initialized now - m_isDefault = FALSE; - return TRUE; } -- 2.45.2