X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6185050104d7782a51b9e9a7cac427764dcea130..71bfb735084722f1d3564b93ba35104e5379a2a9:/src/unix/fontutil.cpp diff --git a/src/unix/fontutil.cpp b/src/unix/fontutil.cpp index beac3babe4..e1521328fc 100644 --- a/src/unix/fontutil.cpp +++ b/src/unix/fontutil.cpp @@ -6,7 +6,7 @@ // Created: 05.11.99 // RCS-ID: $Id$ // Copyright: (c) Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -235,7 +235,10 @@ static wxHashTable *g_fontHash = (wxHashTable*) NULL; #elif defined(__WXGTK__) wxNativeFont wxLoadFont(const wxString& fontSpec) { - return gdk_font_load( wxConvertWX2MB(fontSpec) ); + // use gdk_fontset_load() instead of gdk_font_load() because otherwise + // we have problems with Japanese (not terribly precise, I know, but + // this is all the patch said) + return gdk_fontset_load( wxConvertWX2MB(fontSpec) ); } inline void wxFreeFont(wxNativeFont font) @@ -388,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; }