From 56e63286ac78b9089525820aa0b3c5f74474fb2f Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 15 Apr 2004 18:31:18 +0000 Subject: [PATCH] Added new encoding, new methods git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/_font.i | 12 ++++++++++-- wxPython/src/_gdi_rename.i | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/wxPython/src/_font.i b/wxPython/src/_font.i index c342e425e4..bd059a236e 100644 --- a/wxPython/src/_font.i +++ b/wxPython/src/_font.i @@ -118,7 +118,8 @@ enum wxFontEncoding wxFONTENCODING_ISO8859_MAX, // Cyrillic charset soup (see http://czyborra.com/charsets/cyrillic.html) - wxFONTENCODING_KOI8, // we don't support any of KOI8 variants + wxFONTENCODING_KOI8, // KOI8 Russian + wxFONTENCODING_KOI8_U, // KOI8 Ukrainian wxFONTENCODING_ALTERNATIVE, // same as MS-DOS CP866 wxFONTENCODING_BULGARIAN, // used under Linux in Bulgaria @@ -373,6 +374,12 @@ public: // NB: hard-coded now, but might change later (read it from config?) static wxString GetEncodingDescription(wxFontEncoding encoding); + // find the encoding corresponding to the given name, inverse of + // GetEncodingName() and less general than CharsetToEncoding() + // + // returns wxFONTENCODING_MAX if the name is not a supported encoding + static wxFontEncoding GetEncodingFromName(const wxString& name); + // set the config object to use (may be NULL to use default) void SetConfig(wxConfigBase *config); @@ -404,7 +411,8 @@ public: // checks whether given encoding is available in given face or not. - // If no facename is given, + // If no facename is given (default), return true if it's available in any + // facename at all. bool IsEncodingAvailable(wxFontEncoding encoding, const wxString& facename = wxPyEmptyString); diff --git a/wxPython/src/_gdi_rename.i b/wxPython/src/_gdi_rename.i index ce81ce4210..3ad3bab3ba 100644 --- a/wxPython/src/_gdi_rename.i +++ b/wxPython/src/_gdi_rename.i @@ -66,6 +66,7 @@ %rename(FONTENCODING_ISO8859_15) wxFONTENCODING_ISO8859_15; %rename(FONTENCODING_ISO8859_MAX) wxFONTENCODING_ISO8859_MAX; %rename(FONTENCODING_KOI8) wxFONTENCODING_KOI8; +%rename(FONTENCODING_KOI8_U) wxFONTENCODING_KOI8_U; %rename(FONTENCODING_ALTERNATIVE) wxFONTENCODING_ALTERNATIVE; %rename(FONTENCODING_BULGARIAN) wxFONTENCODING_BULGARIAN; %rename(FONTENCODING_CP437) wxFONTENCODING_CP437; -- 2.47.2