- // deal with font encoding
- M_FONTDATA->m_encoding = fontdata.GetEncoding();
- if ( M_FONTDATA->m_encoding == wxFONTENCODING_SYSTEM )
- {
- wxString registry = tn.GetNextToken().MakeUpper(),
- encoding = tn.GetNextToken().MakeUpper();
-
- if ( registry == _T("ISO8859") )
- {
- int cp;
- if ( wxSscanf(encoding, wxT("%d"), &cp) == 1 )
- {
- M_FONTDATA->m_encoding =
- (wxFontEncoding)(wxFONTENCODING_ISO8859_1 + cp - 1);
- }
- }
- else if ( registry == _T("MICROSOFT") )
- {
- int cp;
- if ( wxSscanf(encoding, wxT("cp125%d"), &cp) == 1 )
- {
- M_FONTDATA->m_encoding =
- (wxFontEncoding)(wxFONTENCODING_CP1250 + cp);
- }
- }
- else if ( registry == _T("KOI8") )
- {
- M_FONTDATA->m_encoding = wxFONTENCODING_KOI8;
- }
- //else: unknown encoding - may be give a warning here?
- }
+wxFont::wxFont(const wxNativeFontInfo& info)
+{
+ Create( info.GetPointSize(),
+ info.GetFamily(),
+ info.GetStyle(),
+ info.GetWeight(),
+ info.GetUnderlined(),
+ info.GetFaceName(),
+ info.GetEncoding() );