X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/67a9999283b942053259fa418fe994eab8dd0b3b..40bab631d2020265f7d0e5e872a2925757bc92aa:/src/html/htmlwin.cpp diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp index eb97f6d3d9..0068fec835 100644 --- a/src/html/htmlwin.cpp +++ b/src/html/htmlwin.cpp @@ -36,12 +36,12 @@ #include "wx/dataobj.h" #include "wx/timer.h" #include "wx/dcmemory.h" +#include "wx/settings.h" #include "wx/arrimpl.cpp" #include "wx/listimpl.cpp" - #if wxUSE_CLIPBOARD // ---------------------------------------------------------------------------- // wxHtmlWinAutoScrollTimer: the timer used to generate a stream of scroll @@ -249,6 +249,22 @@ void wxHtmlWindow::SetFonts(wxString normal_face, wxString fixed_face, const int if (!op.IsEmpty()) LoadPage(op); } +void wxHtmlWindow::NormalizeFontSizes(int size) +{ + int f_sizes[7]; + if (size == -1) + size = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetPointSize(); + + f_sizes[0] = int(size * 0.6); + f_sizes[1] = int(size * 0.8); + f_sizes[2] = size; + f_sizes[3] = int(size * 1.2); + f_sizes[4] = int(size * 1.4); + f_sizes[5] = int(size * 1.6); + f_sizes[6] = int(size * 1.8); + + SetFonts(wxEmptyString, wxEmptyString, f_sizes); +} bool wxHtmlWindow::SetPage(const wxString& source)