// Name: wx/gtk1/font.h
// Purpose:
// Author: Robert Roebling
-// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ctors and such
wxFont() { }
- // wxGTK-specific
+ 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());
+ }
+
wxFont(const wxString& fontname)
{
Create(fontname);
{
Create(size, family, style, weight, underlined, face, encoding);
}
-
+
wxFont(const wxSize& pixelSize,
wxFontFamily family,
wxFontStyle style,
Create(10, family, style, weight, underlined, face, encoding);
SetPixelSize(pixelSize);
}
-
+
bool Create(int size,
wxFontFamily family,
wxFontStyle style,
// implement base class pure virtuals
virtual int GetPointSize() const;
- virtual wxFontFamily GetFamily() const;
virtual wxFontStyle GetStyle() const;
virtual wxFontWeight GetWeight() const;
virtual wxString GetFaceName() const;
wxDECLARE_COMMON_FONT_METHODS();
- virtual void SetNoAntiAliasing( bool no = true );
- virtual bool GetNoAntiAliasing() const ;
-
// implementation from now on
void Unshare();
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info );
+ virtual wxFontFamily DoGetFamily() const;
private:
DECLARE_DYNAMIC_CLASS(wxFont)