Fix wxDFB build after the font changes
Implement the new wxFont pure virtual methods in this port version of this class. Neither arbitrary weights nor fractional point sizes are actually supported in this port however.
This commit is contained in:
@@ -40,8 +40,14 @@ typedef wxFontMgrFontRefData wxFontRefData;
|
||||
|
||||
bool wxFont::Create(const wxNativeFontInfo& info)
|
||||
{
|
||||
return Create(info.pointSize, info.family, info.style, info.weight,
|
||||
info.underlined, info.faceName, info.encoding);
|
||||
m_refData = new wxFontRefData(info.pointSize,
|
||||
info.family,
|
||||
info.style,
|
||||
info.weight,
|
||||
info.underlined,
|
||||
info.faceName,
|
||||
info.encoding);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxFont::Create(int pointSize,
|
||||
@@ -81,11 +87,11 @@ wxIDirectFBFontPtr wxFont::GetDirectFBFont(bool antialiased) const
|
||||
return i ? i->GetDirectFBFont() : wxIDirectFBFontPtr();
|
||||
}
|
||||
|
||||
int wxFont::GetPointSize() const
|
||||
float wxFont::GetFractionalPointSize() const
|
||||
{
|
||||
wxCHECK_MSG( IsOk(), 0, wxT("invalid font") );
|
||||
|
||||
return M_FONTDATA->GetPointSize();
|
||||
return M_FONTDATA->GetFractionalPointSize();
|
||||
}
|
||||
|
||||
wxString wxFont::GetFaceName() const
|
||||
@@ -107,11 +113,11 @@ wxFontStyle wxFont::GetStyle() const
|
||||
return M_FONTDATA->GetStyle();
|
||||
}
|
||||
|
||||
wxFontWeight wxFont::GetWeight() const
|
||||
int wxFont::GetNumericWeight() const
|
||||
{
|
||||
wxCHECK_MSG( IsOk(), wxFONTWEIGHT_MAX, wxT("invalid font") );
|
||||
|
||||
return M_FONTDATA->GetWeight();
|
||||
return M_FONTDATA->GetNumericWeight();
|
||||
}
|
||||
|
||||
bool wxFont::GetUnderlined() const
|
||||
@@ -147,10 +153,10 @@ const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
|
||||
// change font attributes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxFont::SetPointSize(int pointSize)
|
||||
void wxFont::SetFractionalPointSize(float pointSize)
|
||||
{
|
||||
AllocExclusive();
|
||||
M_FONTDATA->SetPointSize(pointSize);
|
||||
M_FONTDATA->SetFractionalPointSize(pointSize);
|
||||
}
|
||||
|
||||
void wxFont::SetFamily(wxFontFamily family)
|
||||
@@ -165,10 +171,10 @@ void wxFont::SetStyle(wxFontStyle style)
|
||||
M_FONTDATA->SetStyle(style);
|
||||
}
|
||||
|
||||
void wxFont::SetWeight(wxFontWeight weight)
|
||||
void wxFont::SetNumericWeight(int weight)
|
||||
{
|
||||
AllocExclusive();
|
||||
M_FONTDATA->SetWeight(weight);
|
||||
M_FONTDATA->SetNumericWeight(weight);
|
||||
}
|
||||
|
||||
bool wxFont::SetFaceName(const wxString& faceName)
|
||||
|
Reference in New Issue
Block a user