]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/winpars.cpp
Refactor wxDocParentFrame and wxDocMDIParentFrame to share common base class.
[wxWidgets.git] / src / html / winpars.cpp
index ac32fb27bf03a7f0da2c153154624adaeee0d010..7f3fc64e50cba22ea69c2658441be164a85c459c 100644 (file)
@@ -202,7 +202,7 @@ void wxHtmlWinParser::InitParser(const wxString& source)
     m_FontBold = m_FontItalic = m_FontUnderlined = m_FontFixed = FALSE;
     m_FontSize = 3; //default one
     CreateCurrentFont();           // we're selecting default font into
-    
+
     // we're not using GetCharWidth/Height() because of
     // differences under X and win
     wxCoord w,h;
@@ -552,6 +552,13 @@ void wxHtmlWinParser::SetFontSize(int s)
 }
 
 
+void wxHtmlWinParser::SetDC(wxDC *dc, double pixel_scale, double font_scale)
+{
+    m_DC = dc;
+    m_PixelScale = pixel_scale;
+    m_FontScale = font_scale;
+}
+
 
 wxFont* wxHtmlWinParser::CreateCurrentFont()
 {
@@ -582,7 +589,7 @@ wxFont* wxHtmlWinParser::CreateCurrentFont()
     {
         *faceptr = face;
         *fontptr = new wxFont(
-                       (int) (m_FontsSizes[fs] * m_PixelScale),
+                       (int) (m_FontsSizes[fs] * m_FontScale),
                        ff ? wxMODERN : wxSWISS,
                        fi ? wxITALIC : wxNORMAL,
                        fb ? wxBOLD : wxNORMAL,