update gtk1 font routines to support nwe code in wxWidgets
This commit is contained in:
@@ -87,6 +87,7 @@ public:
|
||||
void SetFamily(wxFontFamily family);
|
||||
void SetStyle(wxFontStyle style);
|
||||
void SetWeight(wxFontWeight weight);
|
||||
void SetNumericWeight(int weight);
|
||||
void SetUnderlined(bool underlined);
|
||||
bool SetFaceName(const wxString& facename);
|
||||
void SetEncoding(wxFontEncoding encoding);
|
||||
@@ -401,6 +402,11 @@ void wxFontRefData::SetWeight(wxFontWeight weight)
|
||||
}
|
||||
}
|
||||
|
||||
void wxFontRefData::SetNumericWeight(int weight)
|
||||
{
|
||||
m_nativeFontInfo.SetNumericWeight(weight);
|
||||
}
|
||||
|
||||
void wxFontRefData::SetUnderlined(bool underlined)
|
||||
{
|
||||
m_underlined = underlined;
|
||||
@@ -518,11 +524,11 @@ wxGDIRefData *wxFont::CloneGDIRefData(const wxGDIRefData *data) const
|
||||
// accessors
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
int wxFont::GetPointSize() const
|
||||
float wxFont::GetFractionalPointSize() const
|
||||
{
|
||||
wxCHECK_MSG( IsOk(), 0, wxT("invalid font") );
|
||||
|
||||
return M_FONTDATA->m_pointSize;
|
||||
return M_FONTDATA->m_nativeFontInfo.GetFractionalPointSize();
|
||||
}
|
||||
|
||||
wxString wxFont::GetFaceName() const
|
||||
@@ -551,6 +557,13 @@ wxFontWeight wxFont::GetWeight() const
|
||||
return M_FONTDATA->m_weight;
|
||||
}
|
||||
|
||||
int wxFont::GetNumericWeight() const
|
||||
{
|
||||
wxCHECK_MSG( IsOk(), wxFONTWEIGHT_MAX, "invalid font" );
|
||||
|
||||
return M_FONTDATA->m_nativeFontInfo.GetNumericWeight();
|
||||
}
|
||||
|
||||
bool wxFont::GetUnderlined() const
|
||||
{
|
||||
wxCHECK_MSG( IsOk(), false, wxT("invalid font") );
|
||||
@@ -601,11 +614,11 @@ bool wxFont::IsFixedWidth() const
|
||||
// change font attributes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxFont::SetPointSize(int pointSize)
|
||||
void wxFont::SetPointSize(float pointSize)
|
||||
{
|
||||
Unshare();
|
||||
|
||||
M_FONTDATA->SetPointSize(pointSize);
|
||||
M_FONTDATA->SetPointSize( nintf(pointSize));
|
||||
}
|
||||
|
||||
void wxFont::SetFamily(wxFontFamily family)
|
||||
@@ -629,6 +642,13 @@ void wxFont::SetWeight(wxFontWeight weight)
|
||||
M_FONTDATA->SetWeight(weight);
|
||||
}
|
||||
|
||||
void wxFont::SetNumericWeight(int weight)
|
||||
{
|
||||
AllocExclusive();
|
||||
|
||||
M_FONTDATA->SetNumericWeight(weight);
|
||||
}
|
||||
|
||||
bool wxFont::SetFaceName(const wxString& faceName)
|
||||
{
|
||||
Unshare();
|
||||
|
Reference in New Issue
Block a user