]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fontmap.cpp
added some utils (tex2rtf, helpgen, makegen) to make system
[wxWidgets.git] / src / common / fontmap.cpp
index 05b1edd2abc9fdcfccb57be33b6955fe4f1adb05..56f3461d2d9f3abd7486a617ddd584cda3072389 100644 (file)
@@ -498,10 +498,13 @@ bool wxFontMapper::TestAltEncoding(const wxString& configEntry,
 
 bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding,
                                      wxNativeEncodingInfo *info,
 
 bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding,
                                      wxNativeEncodingInfo *info,
+                                     const wxString& facename,
                                      bool interactive)
 {
     wxCHECK_MSG( info, FALSE, wxT("bad pointer in GetAltForEncoding") );
 
                                      bool interactive)
 {
     wxCHECK_MSG( info, FALSE, wxT("bad pointer in GetAltForEncoding") );
 
+    info->facename = facename;
+
     if ( encoding == wxFONTENCODING_DEFAULT )
     {
         encoding = wxFont::GetDefaultEncoding();
     if ( encoding == wxFONTENCODING_DEFAULT )
     {
         encoding = wxFont::GetDefaultEncoding();
@@ -609,3 +612,28 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding,
 
     return FALSE;
 }
 
     return FALSE;
 }
+
+
+
+bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding,
+                                     wxFontEncoding *alt_encoding,
+                                     const wxString& facename,
+                                     bool interactive)
+{
+    wxNativeEncodingInfo info;
+    bool r = GetAltForEncoding(encoding, &info, facename, interactive);
+    *alt_encoding = info.encoding;
+    return r;
+}
+
+
+
+bool wxFontMapper::IsEncodingAvailable(wxFontEncoding encoding,
+                                       const wxString& facename)
+{
+    wxNativeEncodingInfo info;
+    
+    wxGetNativeFontEncoding(encoding, &info);
+    info.facename = facename;
+    return wxTestFontEncoding(info);
+}