X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a349dc1085c34b54deaaab3022b01dfd8aeb3cbd..ad653fa23069c5d9378247084f03c9a718c3ad62:/src/gtk/font.cpp diff --git a/src/gtk/font.cpp b/src/gtk/font.cpp index f2e48c3ca8..e078010efa 100644 --- a/src/gtk/font.cpp +++ b/src/gtk/font.cpp @@ -278,18 +278,20 @@ wxFont::wxFont(const wxNativeFontInfo& info) SetStrikethrough(true); } -wxFont::wxFont(int pointSize, - wxFontFamily family, - int flags, - const wxString& face, - wxFontEncoding encoding) -{ - m_refData = new wxFontRefData(pointSize, family, - GetStyleFromFlags(flags), - GetWeightFromFlags(flags), - GetUnderlinedFromFlags(flags), - GetStrikethroughFromFlags(flags), - face, encoding); +wxFont::wxFont(const wxFontInfo& info) +{ + 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,