X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4e1d79d308a7c2eda0c02ed496f1b25dad39a2c8..ec2d6790e96921e031555eac66bb924b0eb6c1a0:/src/common/fontenumcmn.cpp?ds=sidebyside

diff --git a/src/common/fontenumcmn.cpp b/src/common/fontenumcmn.cpp
index c2ef4c8820..bc2b96ce9d 100644
--- a/src/common/fontenumcmn.cpp
+++ b/src/common/fontenumcmn.cpp
@@ -24,6 +24,8 @@
     #pragma hdrstop
 #endif
 
+#if wxUSE_FONTENUM
+
 #include "wx/fontenum.h"
 
 // ============================================================================
@@ -82,12 +84,12 @@ bool wxFontEnumerator::IsValidFacename(const wxString &facename)
 
 #ifdef __WXMSW__
     // Quoting the MSDN:
-    //     "MS Shell Dlg is a mapping mechanism that enables 
-    //     U.S. English Microsoft Windows NT, and Microsoft Windows 2000 to 
-    //     support locales that have characters that are not contained in code 
+    //     "MS Shell Dlg is a mapping mechanism that enables
+    //     U.S. English Microsoft Windows NT, and Microsoft Windows 2000 to
+    //     support locales that have characters that are not contained in code
     //     page 1252. It is not a font but a face name for a nonexistent font."
     // Thus we need to consider "Ms Shell Dlg" and "Ms Shell Dlg 2" as valid
-    // font face names even if they are enumerated by wxFontEnumerator
+    // font face names even if they are not enumerated by wxFontEnumerator
     if (facename.IsSameAs(wxT("Ms Shell Dlg"), false) ||
         facename.IsSameAs(wxT("Ms Shell Dlg 2"), false))
         return true;
@@ -105,7 +107,7 @@ bool wxFontEnumerator::EnumerateEncodingsUTF8(const wxString& facename)
 {
     // name of UTF-8 encoding: no need to use wxFontMapper for it as it's
     // unlikely to change
-    const wxString utf8(_T("UTF-8"));
+    const wxString utf8(wxT("UTF-8"));
 
     // all fonts are in UTF-8 only if this code is used
     if ( !facename.empty() )
@@ -129,3 +131,5 @@ bool wxFontEnumerator::EnumerateEncodingsUTF8(const wxString& facename)
     return true;
 }
 #endif // wxHAS_UTF8_FONTS
+
+#endif // wxUSE_FONTENUM