corrections to XFontName accessors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -194,7 +194,7 @@ wxFont::wxFont(const wxNativeFontInfo& info)
|
|||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
(void)Create(info.xFontName);
|
(void)Create(info.GetXFontName());
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFont::Init()
|
void wxFont::Init()
|
||||||
@@ -228,7 +228,7 @@ bool wxFont::Create(const wxString& fontname, wxFontEncoding enc)
|
|||||||
|
|
||||||
m_refData = new wxFontRefData();
|
m_refData = new wxFontRefData();
|
||||||
|
|
||||||
M_FONTDATA->m_nativeFontInfo.xFontName = fontname; // X font name
|
M_FONTDATA->m_nativeFontInfo.SetXFontName(fontname); // X font name
|
||||||
|
|
||||||
wxString tmp;
|
wxString tmp;
|
||||||
|
|
||||||
@@ -349,7 +349,7 @@ void wxFont::SetPointSize(int pointSize)
|
|||||||
Unshare();
|
Unshare();
|
||||||
|
|
||||||
M_FONTDATA->m_pointSize = pointSize;
|
M_FONTDATA->m_pointSize = pointSize;
|
||||||
M_FONTDATA->m_nativeFontInfo.xFontName.Clear(); // invalid now
|
M_FONTDATA->m_nativeFontInfo.GetXFontName().Clear(); // invalid now
|
||||||
|
|
||||||
RealizeResource();
|
RealizeResource();
|
||||||
}
|
}
|
||||||
@@ -359,7 +359,7 @@ void wxFont::SetFamily(int family)
|
|||||||
Unshare();
|
Unshare();
|
||||||
|
|
||||||
M_FONTDATA->m_family = family;
|
M_FONTDATA->m_family = family;
|
||||||
M_FONTDATA->m_nativeFontInfo.xFontName.Clear(); // invalid now
|
M_FONTDATA->m_nativeFontInfo.GetXFontName().Clear(); // invalid now
|
||||||
|
|
||||||
RealizeResource();
|
RealizeResource();
|
||||||
}
|
}
|
||||||
@@ -369,7 +369,7 @@ void wxFont::SetStyle(int style)
|
|||||||
Unshare();
|
Unshare();
|
||||||
|
|
||||||
M_FONTDATA->m_style = style;
|
M_FONTDATA->m_style = style;
|
||||||
M_FONTDATA->m_nativeFontInfo.xFontName.Clear(); // invalid now
|
M_FONTDATA->m_nativeFontInfo.GetXFontName().Clear(); // invalid now
|
||||||
|
|
||||||
RealizeResource();
|
RealizeResource();
|
||||||
}
|
}
|
||||||
@@ -379,7 +379,7 @@ void wxFont::SetWeight(int weight)
|
|||||||
Unshare();
|
Unshare();
|
||||||
|
|
||||||
M_FONTDATA->m_weight = weight;
|
M_FONTDATA->m_weight = weight;
|
||||||
M_FONTDATA->m_nativeFontInfo.xFontName.Clear(); // invalid now
|
M_FONTDATA->m_nativeFontInfo.GetXFontName().Clear(); // invalid now
|
||||||
|
|
||||||
RealizeResource();
|
RealizeResource();
|
||||||
}
|
}
|
||||||
@@ -389,7 +389,7 @@ void wxFont::SetFaceName(const wxString& faceName)
|
|||||||
Unshare();
|
Unshare();
|
||||||
|
|
||||||
M_FONTDATA->m_faceName = faceName;
|
M_FONTDATA->m_faceName = faceName;
|
||||||
M_FONTDATA->m_nativeFontInfo.xFontName.Clear(); // invalid now
|
M_FONTDATA->m_nativeFontInfo.GetXFontName().Clear(); // invalid now
|
||||||
|
|
||||||
RealizeResource();
|
RealizeResource();
|
||||||
}
|
}
|
||||||
@@ -408,7 +408,7 @@ void wxFont::SetEncoding(wxFontEncoding encoding)
|
|||||||
Unshare();
|
Unshare();
|
||||||
|
|
||||||
M_FONTDATA->m_encoding = encoding;
|
M_FONTDATA->m_encoding = encoding;
|
||||||
M_FONTDATA->m_nativeFontInfo.xFontName.Clear(); // invalid now
|
M_FONTDATA->m_nativeFontInfo.GetXFontName().Clear(); // invalid now
|
||||||
|
|
||||||
RealizeResource();
|
RealizeResource();
|
||||||
}
|
}
|
||||||
@@ -477,7 +477,7 @@ wxNativeFontInfo *wxFont::GetNativeFontInfo() const
|
|||||||
{
|
{
|
||||||
wxCHECK_MSG( Ok(), (wxNativeFontInfo *)NULL, wxT("invalid font") );
|
wxCHECK_MSG( Ok(), (wxNativeFontInfo *)NULL, wxT("invalid font") );
|
||||||
|
|
||||||
if(M_FONTDATA->m_nativeFontInfo.xFontName.IsEmpty())
|
if(M_FONTDATA->m_nativeFontInfo.GetXFontName().IsEmpty())
|
||||||
GetInternalFont();
|
GetInternalFont();
|
||||||
|
|
||||||
return new wxNativeFontInfo(M_FONTDATA->m_nativeFontInfo);
|
return new wxNativeFontInfo(M_FONTDATA->m_nativeFontInfo);
|
||||||
|
Reference in New Issue
Block a user