]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/winpars.cpp
Applied patch [ 726350 ] wxGrid - MovePageDown()
[wxWidgets.git] / src / html / winpars.cpp
index 1d4af2c3fccb87a7fbb71bbc491fa51ad3b7c69e..4a5de2de4d6f7858ca8517dfd1b903b02c934e87 100644 (file)
@@ -69,14 +69,8 @@ wxHtmlWinParser::wxHtmlWinParser(wxHtmlWindow *wnd) : wxHtmlParser()
                             m_FontsEncTable[i][j][k][l][m] = wxFONTENCODING_DEFAULT;
 #endif
                         }
-#ifdef __WXMSW__
-        static int default_sizes[7] = {7, 8, 10, 12, 16, 22, 30};
-#elif defined(__WXMAC__)
-        static int default_sizes[7] = {9, 12, 14, 18, 24, 30, 36};
-#else
-        static int default_sizes[7] = {10, 12, 14, 16, 19, 24, 32};
-#endif
-        SetFonts(wxT(""), wxT(""), default_sizes);
+
+        SetFonts(wxEmptyString, wxEmptyString, NULL);
     }
 
     // fill in wxHtmlParser's tables:
@@ -118,8 +112,22 @@ void wxHtmlWinParser::RemoveModule(wxHtmlTagsModule *module)
     m_Modules.DeleteObject(module);
 }
 
-void wxHtmlWinParser::SetFonts(wxString normal_face, wxString fixed_face, const int *sizes)
+void wxHtmlWinParser::SetFonts(wxString normal_face, wxString fixed_face,
+                               const int *sizes)
 {
+    static int default_sizes[7] =
+        {
+            wxHTML_FONT_SIZE_1,
+                       wxHTML_FONT_SIZE_2,
+                       wxHTML_FONT_SIZE_3,
+                       wxHTML_FONT_SIZE_4,
+                       wxHTML_FONT_SIZE_5,
+                       wxHTML_FONT_SIZE_6,
+                       wxHTML_FONT_SIZE_7
+        };
+    
+    if (sizes == NULL) sizes = default_sizes;
+
     int i, j, k, l, m;
 
     for (i = 0; i < 7; i++) m_FontsSizes[i] = sizes[i];