fixing native font info support bugs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -166,6 +166,8 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual void DoSetNativeFontInfo(const wxNativeFontInfo& info);
|
||||||
|
|
||||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
||||||
|
|
||||||
|
@@ -576,6 +576,14 @@ wxFont::~wxFont()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxFont::DoSetNativeFontInfo(const wxNativeFontInfo& info)
|
||||||
|
{
|
||||||
|
UnRef();
|
||||||
|
|
||||||
|
m_refData = new wxFontRefData( info);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool wxFont::RealizeResource()
|
bool wxFont::RealizeResource()
|
||||||
{
|
{
|
||||||
M_FONTDATA->MacFindFont();
|
M_FONTDATA->MacFindFont();
|
||||||
@@ -938,7 +946,7 @@ void wxNativeFontInfo::Init()
|
|||||||
m_weight = wxFONTWEIGHT_NORMAL;
|
m_weight = wxFONTWEIGHT_NORMAL;
|
||||||
m_underlined = false;
|
m_underlined = false;
|
||||||
m_faceName.clear();
|
m_faceName.clear();
|
||||||
m_encoding = wxFONTENCODING_DEFAULT;
|
m_encoding = wxFont::GetDefaultEncoding();
|
||||||
m_descriptorValid = false;
|
m_descriptorValid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1105,6 +1113,8 @@ void wxNativeFontInfo::Init(int size,
|
|||||||
m_weight = weight;
|
m_weight = weight;
|
||||||
m_underlined = underlined;
|
m_underlined = underlined;
|
||||||
m_faceName = faceName;
|
m_faceName = faceName;
|
||||||
|
if ( encoding == wxFONTENCODING_DEFAULT )
|
||||||
|
encoding = wxFont::GetDefaultEncoding();
|
||||||
m_encoding = encoding;
|
m_encoding = encoding;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1289,6 +1299,8 @@ void wxNativeFontInfo::SetFamily(wxFontFamily family_)
|
|||||||
|
|
||||||
void wxNativeFontInfo::SetEncoding(wxFontEncoding encoding_)
|
void wxNativeFontInfo::SetEncoding(wxFontEncoding encoding_)
|
||||||
{
|
{
|
||||||
|
if ( encoding_ == wxFONTENCODING_DEFAULT )
|
||||||
|
encoding_ = wxFont::GetDefaultEncoding();
|
||||||
m_encoding = encoding_;
|
m_encoding = encoding_;
|
||||||
// not reflected in native descriptors
|
// not reflected in native descriptors
|
||||||
}
|
}
|
Reference in New Issue
Block a user