wxFontInstance *wxFontFaceBase::GetFontInstance(float ptSize, bool aa)
{
- wxASSERT_MSG( m_refCnt > 0, _T("font library not loaded!") );
+ wxASSERT_MSG( m_refCnt > 0, wxT("font library not loaded!") );
for ( wxFontInstanceList::const_iterator i = m_instances->begin();
i != m_instances->end(); ++i )
{
wxFontFace *f = m_faces[type];
- wxCHECK_MSG( f, NULL, _T("no such face in font bundle") );
+ wxCHECK_MSG( f, NULL, wxT("no such face in font bundle") );
f->Acquire();
{
wxASSERT_MSG( font.GetFaceName().empty() ||
GetName().CmpNoCase(font.GetFaceName()) == 0,
- _T("calling GetFaceForFont for incompatible font") );
+ wxT("calling GetFaceForFont for incompatible font") );
int type = FaceType_Regular;
return GetFace((FaceType)i);
}
- wxFAIL_MSG( _T("no face") );
+ wxFAIL_MSG( wxT("no face") );
return NULL;
}
// ----------------------------------------------------------------------------
wxFontMgrFontRefData::wxFontMgrFontRefData(int size,
- int family,
- int style,
- int weight,
+ wxFontFamily family,
+ wxFontStyle style,
+ wxFontWeight weight,
bool underlined,
const wxString& faceName,
wxFontEncoding encoding)
{
- if ( family == wxDEFAULT )
- family = wxSWISS;
- if ( style == wxDEFAULT )
- style = wxNORMAL;
- if ( weight == wxDEFAULT )
- weight = wxNORMAL;
+ if ( family == wxFONTFAMILY_DEFAULT )
+ family = wxFONTFAMILY_SWISS;
if ( size == wxDEFAULT )
size = 12;
m_fontValid = false;
}
-void wxFontMgrFontRefData::SetFamily(int family)
+void wxFontMgrFontRefData::SetFamily(wxFontFamily family)
{
- m_info.family = (wxFontFamily)family;
+ m_info.family = family;
m_fontValid = false;
}
-void wxFontMgrFontRefData::SetStyle(int style)
+void wxFontMgrFontRefData::SetStyle(wxFontStyle style)
{
- m_info.style = (wxFontStyle)style;
+ m_info.style = style;
m_fontValid = false;
}
-void wxFontMgrFontRefData::SetWeight(int weight)
+void wxFontMgrFontRefData::SetWeight(wxFontWeight weight)
{
- m_info.weight = (wxFontWeight)weight;
+ m_info.weight = weight;
m_fontValid = false;
}