Fix font size when using wxGraphicsContext with wxPrinterDC in wxMSW.
Use pixel size which is scaled correctly by GDI+ itself instead of the size in points which is currently not scaled correctly by wx. Closes #3566. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e9ccd6d5b1
commit
a2d22f8b93
@ -946,7 +946,9 @@ wxGDIPlusFontData::wxGDIPlusFontData( wxGraphicsRenderer* renderer,
|
||||
if ( font.GetWeight() == wxFONTWEIGHT_BOLD )
|
||||
style |= FontStyleBold;
|
||||
|
||||
Init(font.GetFaceName(), font.GetPointSize(), style, col, UnitPoint);
|
||||
// Create font which size is measured in logical units
|
||||
// and let the system rescale it according to the target resolution.
|
||||
Init(font.GetFaceName(), font.GetPixelSize().GetHeight(), style, col, UnitPixel);
|
||||
}
|
||||
|
||||
wxGDIPlusFontData::wxGDIPlusFontData(wxGraphicsRenderer* renderer,
|
||||
|
Loading…
Reference in New Issue
Block a user