// NOTE: this algorithm for adjusting the font size is used by all
// implementations of wxFont except under wxMSW and wxGTK where
// native support to font creation using pixel-size is provided.
-
+
int largestGood = 0;
int smallestBad = 0;
wxString wxFontBase::GetNativeFontInfoDesc() const
{
+ wxCHECK_MSG( IsOk(), wxEmptyString, wxT("invalid font") );
+
wxString fontDesc;
const wxNativeFontInfo *fontInfo = GetNativeFontInfo();
if ( fontInfo )
wxString wxFontBase::GetNativeFontInfoUserDesc() const
{
+ wxCHECK_MSG( IsOk(), wxEmptyString, wxT("invalid font") );
+
wxString fontDesc;
const wxNativeFontInfo *fontInfo = GetNativeFontInfo();
if ( fontInfo )
token.Trim(true).Trim(false).MakeLower();
if (insideQuotes)
{
- if (token.StartsWith("'") ||
+ if (token.StartsWith("'") ||
token.EndsWith("'"))
{
insideQuotes = false;
family = wxFONTFAMILY_TELETYPE;
else
return false;
-
+
SetFamily(family);
}
// NB: the check on the facename is implemented in wxFontBase::SetFaceName