1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxFont class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 class WXDLLEXPORT wxFont
: public wxFontBase
29 bool underlined
= FALSE
,
30 const wxString
& face
= wxEmptyString
,
31 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
33 (void)Create(size
, family
, style
, weight
, underlined
, face
, encoding
);
36 wxFont(const wxNativeFontInfo
& info
)
41 wxFont(const wxString
& fontDesc
);
47 bool underlined
= FALSE
,
48 const wxString
& face
= wxEmptyString
,
49 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
51 bool Create(const wxNativeFontInfo
& info
);
53 bool MacCreateThemeFont( wxUint16 themeFontID
) ;
55 bool MacCreateUIFont( wxUint32 coreTextFontType
);
60 // implement base class pure virtuals
61 virtual int GetPointSize() const;
62 virtual wxSize
GetPixelSize() const;
63 virtual int GetFamily() const;
64 virtual int GetStyle() const;
65 virtual int GetWeight() const;
66 virtual bool GetUnderlined() const;
67 virtual wxString
GetFaceName() const;
68 virtual wxFontEncoding
GetEncoding() const;
69 virtual const wxNativeFontInfo
*GetNativeFontInfo() const;
71 virtual void SetPointSize(int pointSize
);
72 virtual void SetFamily(int family
);
73 virtual void SetStyle(int style
);
74 virtual void SetWeight(int weight
);
75 virtual bool SetFaceName(const wxString
& faceName
);
76 virtual void SetUnderlined(bool underlined
);
77 virtual void SetEncoding(wxFontEncoding encoding
);
79 // implementation only from now on
80 // -------------------------------
82 virtual bool RealizeResource();
84 // Unofficial API, don't use
85 virtual void SetNoAntiAliasing( bool noAA
= TRUE
) ;
86 virtual bool GetNoAntiAliasing() const ;
88 // Mac-specific, risks to change, don't use in portable code
91 // 'old' Quickdraw accessors
92 short MacGetFontNum() const;
93 short MacGetFontSize() const;
94 wxByte
MacGetFontStyle() const;
96 // 'new' ATSUI accessors
97 wxUint32
MacGetATSUFontID() const;
98 wxUint32
MacGetATSUAdditionalQDStyles() const;
99 wxUint16
MacGetThemeFontID() const ;
101 // Returns an ATSUStyle not ATSUStyle*
102 void* MacGetATSUStyle() const ;
104 const void * MacGetCTFont() const;
105 // soon to be removed for 64bit, Returns an ATSUStyle not ATSUStyle*
106 void* MacGetATSUStyle() const ;
112 DECLARE_DYNAMIC_CLASS(wxFont
)