]> git.saurik.com Git - wxWidgets.git/commitdiff
Added new encoding, new methods
authorRobin Dunn <robin@alldunn.com>
Thu, 15 Apr 2004 18:31:18 +0000 (18:31 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 15 Apr 2004 18:31:18 +0000 (18:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/_font.i
wxPython/src/_gdi_rename.i

index c342e425e4340a523f35fccf401708a23fb0bf7c..bd059a236e3e7cbd14e8bc7091c1bece9288f81d 100644 (file)
@@ -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);
 
index ce81ce421086475bb516c7c99241bdaf594720f8..3ad3bab3ba6efb555100acabe65a2fc24f5be948 100644 (file)
@@ -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;