- DECLARE_DYNAMIC_CLASS(wxFont)
-
- public:
- wxFont();
- wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight,
- bool underlined = FALSE, const char *Face = ( const char *) NULL );
- wxFont( int PointSize, const char *Face, int Family,
- int Style, int Weight, bool underlined = FALSE );
- wxFont( const wxFont& font );
+public:
+ // ctors and such
+ wxFont() { Init(); }
+ wxFont(const wxFont& font) : wxFontBase() { Init(); Ref(font); }
+ wxFont(const wxString& fontname,
+ wxFontEncoding fontenc = wxFONTENCODING_DEFAULT)
+ {
+ Init();
+
+ Create(fontname, fontenc);
+ }
+
+ wxFont(const wxNativeFontInfo& info);
+
+ wxFont(int size,
+ int family,
+ int style,
+ int weight,
+ bool underlined = FALSE,
+ const wxString& face = wxEmptyString,
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
+ {
+ Init();
+
+ (void)Create(size, family, style, weight, underlined, face, encoding);
+ }
+
+ bool Create(int size,
+ int family,
+ int style,
+ int weight,
+ bool underlined = FALSE,
+ const wxString& face = wxEmptyString,
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
+
+ // wxGTK-specific
+ bool Create(const wxString& fontname,
+ wxFontEncoding fontenc = wxFONTENCODING_DEFAULT);
+ bool Create(const wxNativeFontInfo& fontinfo);
+