added GetEncodingFromName(); documented it and rearranged the methods in alphaabetical order
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -706,5 +706,26 @@ wxString wxFontMapperBase::GetEncodingName(wxFontEncoding encoding)
|
||||
return str;
|
||||
}
|
||||
|
||||
/* static */
|
||||
wxFontEncoding wxFontMapperBase::GetEncodingFromName(const wxString& name)
|
||||
{
|
||||
const size_t count = WXSIZEOF(gs_encodingNames);
|
||||
|
||||
for ( size_t i = 0; i < count; i++ )
|
||||
{
|
||||
if ( gs_encodingNames[i] == name )
|
||||
{
|
||||
return gs_encodings[i];
|
||||
}
|
||||
}
|
||||
|
||||
if ( name == _("default") )
|
||||
{
|
||||
return wxFONTENCODING_DEFAULT;
|
||||
}
|
||||
|
||||
return wxFONTENCODING_MAX;
|
||||
}
|
||||
|
||||
#endif // wxUSE_FONTMAP
|
||||
|
||||
|
Reference in New Issue
Block a user