]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/fontutil.cpp
Just like dependency tracking don't disable precompiled headers if there is only...
[wxWidgets.git] / src / unix / fontutil.cpp
index 8ed33684fd1e58fae80467ab4183c14a043e3d40..8751cd3c39294a63ee4f268e9ba7c3f7679ab342 100644 (file)
@@ -159,15 +159,12 @@ wxFontFamily wxNativeFontInfo::GetFamily() const
 
     // Check for some common fonts, to salvage what we can from the current
     // win32 centric wxFont API:
-    if (strncasecmp( family_text, "monospace", 9 ) == 0)
+    if (wxStrnicmp( family_text, "monospace", 9 ) == 0)
         ret = wxFONTFAMILY_TELETYPE;    // begins with "Monospace"
-    else if (strncasecmp( family_text, "courier", 7 ) == 0)
+    else if (wxStrnicmp( family_text, "courier", 7 ) == 0)
         ret = wxFONTFAMILY_TELETYPE;    // begins with "Courier"
 #if defined(__WXGTK20__) || defined(HAVE_PANGO_FONT_FAMILY_IS_MONOSPACE)
     else
-#ifdef __WXGTK20__
-    if (!gtk_check_version(2,4,0))
-#endif
     {
         PangoFontFamily **families;
         PangoFontFamily  *family = NULL;
@@ -209,9 +206,9 @@ wxFontFamily wxNativeFontInfo::GetFamily() const
             ret = wxFONTFAMILY_SWISS;       // contains "Sans"
         else if (strstr( family_text, "serif" ) != NULL || strstr( family_text, "Serif" ) != NULL)
             ret = wxFONTFAMILY_ROMAN;       // contains "Serif"
-        else if (strncasecmp( family_text, "times", 5 ) == 0)
+        else if (wxStrnicmp( family_text, "times", 5 ) == 0)
             ret = wxFONTFAMILY_ROMAN;       // begins with "Times"
-        else if (strncasecmp( family_text, "old", 3 ) == 0)
+        else if (wxStrnicmp( family_text, "old", 3 ) == 0)
             ret = wxFONTFAMILY_DECORATIVE;  // begins with "Old" - "Old English", "Old Town"
     }
 
@@ -309,25 +306,34 @@ void wxNativeFontInfo::SetFamily(wxFontFamily family)
 
         case wxFONTFAMILY_ROMAN:
             // corresponds to the serif font family in the page linked above
-            facename.Add(wxS("Century Schoolbook L"));
-            facename.Add(wxS("URW Bookman L"));
-            facename.Add(wxS("URW Palladio L"));
+            facename.Add(wxS("Serif"));
             facename.Add(wxS("DejaVu Serif"));
+            facename.Add(wxS("DejaVu LGC Serif"));
+            facename.Add(wxS("Bitstream Vera Serif"));
+            facename.Add(wxS("Liberation Serif"));
             facename.Add(wxS("FreeSerif"));
+            facename.Add(wxS("Luxi Serif"));
             facename.Add(wxS("Times New Roman"));
+            facename.Add(wxS("Century Schoolbook L"));
+            facename.Add(wxS("URW Bookman L"));
+            facename.Add(wxS("URW Palladio L"));
             facename.Add(wxS("Times"));
             break;
 
         case wxFONTFAMILY_TELETYPE:
         case wxFONTFAMILY_MODERN:
             // corresponds to the monospace font family in the page linked above
+            facename.Add(wxS("Monospace"));
             facename.Add(wxS("DejaVu Sans Mono"));
-            facename.Add(wxS("Nimbus Mono L"));
+            facename.Add(wxS("DejaVu LGC Sans Mono"));
             facename.Add(wxS("Bitstream Vera Sans Mono"));
-            facename.Add(wxS("Andale Mono"));
-            facename.Add(wxS("Lucida Sans Typewriter"));
+            facename.Add(wxS("Liberation Mono"));
             facename.Add(wxS("FreeMono"));
+            facename.Add(wxS("Luxi Mono"));
             facename.Add(wxS("Courier New"));
+            facename.Add(wxS("Lucida Sans Typewriter"));
+            facename.Add(wxS("Nimbus Mono L"));
+            facename.Add(wxS("Andale Mono"));
             facename.Add(wxS("Courier"));
             break;
 
@@ -335,13 +341,17 @@ void wxNativeFontInfo::SetFamily(wxFontFamily family)
         case wxFONTFAMILY_DEFAULT:
         default:
             // corresponds to the sans-serif font family in the page linked above
+            facename.Add(wxS("Sans"));
             facename.Add(wxS("DejaVu Sans"));
-            facename.Add(wxS("URW Gothic L"));
-            facename.Add(wxS("Nimbus Sans L"));
+            facename.Add(wxS("DejaVu LGC Sans"));
             facename.Add(wxS("Bitstream Vera Sans"));
-            facename.Add(wxS("Lucida Sans"));
-            facename.Add(wxS("Arial"));
+            facename.Add(wxS("Liberation Sans"));
             facename.Add(wxS("FreeSans"));
+            facename.Add(wxS("Luxi Sans"));
+            facename.Add(wxS("Arial"));
+            facename.Add(wxS("Lucida Sans"));
+            facename.Add(wxS("Nimbus Sans L"));
+            facename.Add(wxS("URW Gothic L"));
             break;
     }