X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a349dc1085c34b54deaaab3022b01dfd8aeb3cbd..dc2513650dce762388f5469360cbb0ac84dcc2d0:/src/gtk/font.cpp diff --git a/src/gtk/font.cpp b/src/gtk/font.cpp index f2e48c3ca8..734b7221c0 100644 --- a/src/gtk/font.cpp +++ b/src/gtk/font.cpp @@ -2,7 +2,6 @@ // Name: src/gtk/font.cpp // Purpose: wxFont for wxGTK // Author: Robert Roebling -// Id: $Id$ // Copyright: (c) 1998 Robert Roebling and Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -278,18 +277,20 @@ wxFont::wxFont(const wxNativeFontInfo& info) SetStrikethrough(true); } -wxFont::wxFont(int pointSize, - wxFontFamily family, - int flags, - const wxString& face, - wxFontEncoding encoding) +wxFont::wxFont(const wxFontInfo& info) { - m_refData = new wxFontRefData(pointSize, family, - GetStyleFromFlags(flags), - GetWeightFromFlags(flags), - GetUnderlinedFromFlags(flags), - GetStrikethroughFromFlags(flags), - face, encoding); + m_refData = new wxFontRefData(info.GetPointSize(), + info.GetFamily(), + info.GetStyle(), + info.GetWeight(), + info.IsUnderlined(), + info.IsStrikethrough(), + info.GetFaceName(), + info.GetEncoding()); + + wxSize pixelSize = info.GetPixelSize(); + if ( pixelSize != wxDefaultSize ) + SetPixelSize(pixelSize); } bool wxFont::Create( int pointSize,