]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dcbase.cpp
added a test to check if wxHtmlWindow::SelectionToText() inserts \n characters correctly
[wxWidgets.git] / src / common / dcbase.cpp
index 33586d4629d9e7854e83a43f029aa29112052f6f..206c1662dd45854e93365d1023774efd783034ec 100644 (file)
@@ -1648,3 +1648,15 @@ void wxDCImpl::CalculateEllipticPoints( wxPointList* points,
 } // CalculateEllipticPoints
 
 #endif // __WXWINCE__
+
+float wxDCImpl::GetFontPointSizeAdjustment(float dpi)
+{
+    // wxMSW has long-standing bug where wxFont point size is interpreted as
+    // "pixel size corresponding to given point size *on screen*". In other
+    // words, on a typical 600dpi printer and a typical 96dpi screen, fonts
+    // are ~6 times smaller when printing. Unfortunately, this bug is so severe
+    // that *all* printing code has to account for it and consequently, other
+    // ports need to emulate this bug too:
+    const wxSize screenPPI = wxGetDisplayPPI();
+    return float(screenPPI.y) / dpi;
+}