]> git.saurik.com Git - wxWidgets.git/commitdiff
wxGTK now chooses better font when no matching
authorRobert Roebling <robert@roebling.de>
Sat, 23 Jan 1999 10:14:38 +0000 (10:14 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 23 Jan 1999 10:14:38 +0000 (10:14 +0000)
    font family is found (and doesn't crash then)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/font.cpp
src/gtk1/font.cpp

index a327b75fd019cee664d27b1c617213adff1db81b..14435124ee6b5422f1f008fc2e9ec0faaa020d08 100644 (file)
@@ -510,7 +510,11 @@ static char *font_defaults[] = {
     "ScreenItalic", "i",
     "ScreenSlant", "o",
 
+/*
     "ScreenDefaultBase", "misc-fixed",
+*/
+    "ScreenDefaultBase", "*-times",
+    
     "ScreenRomanBase", "*-times",
     "ScreenDecorativeBase", "*-helvetica",
     "ScreenModernBase", "*-courier",
@@ -628,7 +632,8 @@ static void SearchResource(const char *prefix, const char **names, int count, ch
     
     if (internal)
     {
-        if (strcmp(internal,"-${ScreenDefaultBase}${ScreenStdSuffix}") == 0)
+        if ((strcmp(internal,"-${ScreenDefaultBase}${ScreenStdSuffix}") == 0) &&
+           (strcmp(names[0], "Default") != 0))
        {
            /* we did not find any font name in the standard list.
               this can (hopefully does) mean that someone supplied
index a327b75fd019cee664d27b1c617213adff1db81b..14435124ee6b5422f1f008fc2e9ec0faaa020d08 100644 (file)
@@ -510,7 +510,11 @@ static char *font_defaults[] = {
     "ScreenItalic", "i",
     "ScreenSlant", "o",
 
+/*
     "ScreenDefaultBase", "misc-fixed",
+*/
+    "ScreenDefaultBase", "*-times",
+    
     "ScreenRomanBase", "*-times",
     "ScreenDecorativeBase", "*-helvetica",
     "ScreenModernBase", "*-courier",
@@ -628,7 +632,8 @@ static void SearchResource(const char *prefix, const char **names, int count, ch
     
     if (internal)
     {
-        if (strcmp(internal,"-${ScreenDefaultBase}${ScreenStdSuffix}") == 0)
+        if ((strcmp(internal,"-${ScreenDefaultBase}${ScreenStdSuffix}") == 0) &&
+           (strcmp(names[0], "Default") != 0))
        {
            /* we did not find any font name in the standard list.
               this can (hopefully does) mean that someone supplied