X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f76c075805027058f08ffba0e8c1b32372f5fd44..9869c26285dc51d13607cddaa04f65ce983653a5:/include/wx/os2/font.h?ds=sidebyside diff --git a/include/wx/os2/font.h b/include/wx/os2/font.h index ef692625d2..2d5f39f54f 100644 --- a/include/wx/os2/font.h +++ b/include/wx/os2/font.h @@ -4,7 +4,6 @@ // Author: David Webster // Modified by: // Created: 10/06/99 -// RCS-ID: $Id$ // Copyright: (c) David Webster // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -27,6 +26,20 @@ public: // ctors and such wxFont() { } + wxFont(const wxFontInfo& info) + { + Create(info.GetPointSize(), + info.GetFamily(), + info.GetStyle(), + info.GetWeight(), + info.IsUnderlined(), + info.GetFaceName(), + info.GetEncoding()); + + if ( info.IsUsingSizeInPixels() ) + SetPixelSize(info.GetPixelSize()); + } + #if FUTURE_WXWIN_COMPATIBILITY_3_0 wxFont(int size, int family, @@ -50,7 +63,7 @@ public: { Create(size, family, style, weight, underlined, face, encoding); } - + wxFont(const wxSize& pixelSize, wxFontFamily family, wxFontStyle style, @@ -62,7 +75,7 @@ public: Create(10, family, style, weight, underlined, face, encoding); SetPixelSize(pixelSize); } - + bool Create(int size, wxFontFamily family, wxFontStyle style, @@ -93,7 +106,6 @@ public: // Implement base class pure virtuals // virtual int GetPointSize(void) const; - virtual wxFontFamily GetFamily() const; virtual wxFontStyle GetStyle() const; virtual wxFontWeight GetWeight() const; virtual bool GetUnderlined(void) const; @@ -131,6 +143,7 @@ public: protected: virtual void DoSetNativeFontInfo(const wxNativeFontInfo& rInfo); + virtual wxFontFamily DoGetFamily() const; // implement wxObject virtuals which are used by AllocExclusive() virtual wxGDIRefData *CreateGDIRefData() const;