Removed wxFont::Set/GetNoAntiAliasing() implementations.
Most of them were dummy and didn't do anything and this API was never meant to be used anyhow. Keep just the declarations in wxFontBase but mark them as deprecated. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -345,6 +345,9 @@ Deprecated methods and their replacements
|
|||||||
the static box itself.
|
the static box itself.
|
||||||
- wxMouseState::{Left,Middle,Right}Down() were renamed to XXXIsDown() for
|
- wxMouseState::{Left,Middle,Right}Down() were renamed to XXXIsDown() for
|
||||||
consistency with wxMouseEvent and the old names were deprecated.
|
consistency with wxMouseEvent and the old names were deprecated.
|
||||||
|
- wxFont::SetNoAntiAliasing() was deprecated, it never really worked in most
|
||||||
|
ports and was always marked as "experimental" API. It will be replaced with
|
||||||
|
wxDC-level anti-aliasing control in the future.
|
||||||
|
|
||||||
|
|
||||||
Major new features in this release
|
Major new features in this release
|
||||||
|
@@ -90,10 +90,6 @@ public:
|
|||||||
|
|
||||||
wxDECLARE_COMMON_FONT_METHODS();
|
wxDECLARE_COMMON_FONT_METHODS();
|
||||||
|
|
||||||
// Unofficial API, don't use
|
|
||||||
virtual void SetNoAntiAliasing(bool no = true);
|
|
||||||
virtual bool GetNoAntiAliasing() const;
|
|
||||||
|
|
||||||
// implementation from now on:
|
// implementation from now on:
|
||||||
wxIDirectFBFontPtr GetDirectFBFont(bool antialiased) const;
|
wxIDirectFBFontPtr GetDirectFBFont(bool antialiased) const;
|
||||||
|
|
||||||
|
@@ -249,15 +249,17 @@ public:
|
|||||||
wxString GetStyleString() const;
|
wxString GetStyleString() const;
|
||||||
wxString GetWeightString() const;
|
wxString GetWeightString() const;
|
||||||
|
|
||||||
// Unofficial API, don't use
|
|
||||||
virtual void SetNoAntiAliasing( bool WXUNUSED(no) = true ) { }
|
|
||||||
virtual bool GetNoAntiAliasing() const { return false; }
|
|
||||||
|
|
||||||
// the default encoding is used for creating all fonts with default
|
// the default encoding is used for creating all fonts with default
|
||||||
// encoding parameter
|
// encoding parameter
|
||||||
static wxFontEncoding GetDefaultEncoding() { return ms_encodingDefault; }
|
static wxFontEncoding GetDefaultEncoding() { return ms_encodingDefault; }
|
||||||
static void SetDefaultEncoding(wxFontEncoding encoding);
|
static void SetDefaultEncoding(wxFontEncoding encoding);
|
||||||
|
|
||||||
|
// this doesn't do anything and is kept for compatibility only
|
||||||
|
#ifdef WXWIN_COMPATIBILITY_2_8
|
||||||
|
wxDEPRECATED_INLINE(void SetNoAntiAliasing(bool no = true), wxUnusedVar(no););
|
||||||
|
wxDEPRECATED_INLINE(bool GetNoAntiAliasing() const, return false;)
|
||||||
|
#endif // WXWIN_COMPATIBILITY_2_8
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// the function called by both overloads of SetNativeFontInfo()
|
// the function called by both overloads of SetNativeFontInfo()
|
||||||
virtual void DoSetNativeFontInfo(const wxNativeFontInfo& info);
|
virtual void DoSetNativeFontInfo(const wxNativeFontInfo& info);
|
||||||
|
@@ -97,9 +97,6 @@ public:
|
|||||||
|
|
||||||
wxDECLARE_COMMON_FONT_METHODS();
|
wxDECLARE_COMMON_FONT_METHODS();
|
||||||
|
|
||||||
virtual void SetNoAntiAliasing( bool no = true );
|
|
||||||
virtual bool GetNoAntiAliasing() const ;
|
|
||||||
|
|
||||||
// implementation from now on
|
// implementation from now on
|
||||||
void Unshare();
|
void Unshare();
|
||||||
|
|
||||||
|
@@ -111,9 +111,6 @@ public:
|
|||||||
|
|
||||||
wxDECLARE_COMMON_FONT_METHODS();
|
wxDECLARE_COMMON_FONT_METHODS();
|
||||||
|
|
||||||
virtual void SetNoAntiAliasing( bool no = true );
|
|
||||||
virtual bool GetNoAntiAliasing() const ;
|
|
||||||
|
|
||||||
// implementation from now on
|
// implementation from now on
|
||||||
void Unshare();
|
void Unshare();
|
||||||
|
|
||||||
|
@@ -106,10 +106,6 @@ public:
|
|||||||
|
|
||||||
wxDECLARE_COMMON_FONT_METHODS();
|
wxDECLARE_COMMON_FONT_METHODS();
|
||||||
|
|
||||||
// Unofficial API, don't use
|
|
||||||
virtual void SetNoAntiAliasing(bool no = true);
|
|
||||||
virtual bool GetNoAntiAliasing() const;
|
|
||||||
|
|
||||||
struct font_t *GetMGLfont_t(float scale, bool antialiased);
|
struct font_t *GetMGLfont_t(float scale, bool antialiased);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -120,10 +120,6 @@ public:
|
|||||||
|
|
||||||
virtual bool RealizeResource();
|
virtual bool RealizeResource();
|
||||||
|
|
||||||
// Unofficial API, don't use
|
|
||||||
virtual void SetNoAntiAliasing( bool noAA = TRUE ) ;
|
|
||||||
virtual bool GetNoAntiAliasing() const ;
|
|
||||||
|
|
||||||
// Mac-specific, risks to change, don't use in portable code
|
// Mac-specific, risks to change, don't use in portable code
|
||||||
|
|
||||||
#if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT
|
#if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT
|
||||||
|
@@ -237,15 +237,10 @@ public:
|
|||||||
void SetUnderlined(bool underlined);
|
void SetUnderlined(bool underlined);
|
||||||
void SetEncoding(wxFontEncoding encoding);
|
void SetEncoding(wxFontEncoding encoding);
|
||||||
|
|
||||||
// Unofficial API, don't use
|
|
||||||
void SetNoAntiAliasing(bool no);
|
|
||||||
bool GetNoAntiAliasing() const { return m_noAA; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void EnsureValidFont();
|
void EnsureValidFont();
|
||||||
|
|
||||||
wxNativeFontInfo m_info;
|
wxNativeFontInfo m_info;
|
||||||
bool m_noAA;
|
|
||||||
|
|
||||||
wxFontFace *m_fontFace;
|
wxFontFace *m_fontFace;
|
||||||
wxFontBundle *m_fontBundle;
|
wxFontBundle *m_fontBundle;
|
||||||
|
@@ -100,9 +100,6 @@ public:
|
|||||||
|
|
||||||
wxDECLARE_COMMON_FONT_METHODS();
|
wxDECLARE_COMMON_FONT_METHODS();
|
||||||
|
|
||||||
virtual void SetNoAntiAliasing( bool no = TRUE );
|
|
||||||
virtual bool GetNoAntiAliasing() const ;
|
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
|
|
||||||
#if wxUSE_PANGO
|
#if wxUSE_PANGO
|
||||||
|
@@ -450,12 +450,6 @@ void wxGCDCImpl::SetFont( const wxFont &font )
|
|||||||
if ( f.IsOk() )
|
if ( f.IsOk() )
|
||||||
f.SetPointSize( /*LogicalToDeviceYRel*/(font.GetPointSize()));
|
f.SetPointSize( /*LogicalToDeviceYRel*/(font.GetPointSize()));
|
||||||
m_graphicContext->SetFont( f, m_textForegroundColour );
|
m_graphicContext->SetFont( f, m_textForegroundColour );
|
||||||
#if defined(__WXGTK__) || defined(__WXOSX__)
|
|
||||||
if ( m_font.IsOk() && m_font.GetNoAntiAliasing() )
|
|
||||||
{
|
|
||||||
m_graphicContext->SetAntialiasMode(wxANTIALIAS_NONE);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -245,8 +245,6 @@ wxFontMgrFontRefData::wxFontMgrFontRefData(int size,
|
|||||||
m_info.underlined = underlined;
|
m_info.underlined = underlined;
|
||||||
m_info.encoding = encoding;
|
m_info.encoding = encoding;
|
||||||
|
|
||||||
m_noAA = false;
|
|
||||||
|
|
||||||
m_fontFace = NULL;
|
m_fontFace = NULL;
|
||||||
m_fontBundle = NULL;
|
m_fontBundle = NULL;
|
||||||
m_fontValid = false;
|
m_fontValid = false;
|
||||||
@@ -255,7 +253,6 @@ wxFontMgrFontRefData::wxFontMgrFontRefData(int size,
|
|||||||
wxFontMgrFontRefData::wxFontMgrFontRefData(const wxFontMgrFontRefData& data)
|
wxFontMgrFontRefData::wxFontMgrFontRefData(const wxFontMgrFontRefData& data)
|
||||||
{
|
{
|
||||||
m_info = data.m_info;
|
m_info = data.m_info;
|
||||||
m_noAA = data.m_noAA;
|
|
||||||
|
|
||||||
m_fontFace = data.m_fontFace;
|
m_fontFace = data.m_fontFace;
|
||||||
m_fontBundle = data.m_fontBundle;
|
m_fontBundle = data.m_fontBundle;
|
||||||
@@ -281,7 +278,7 @@ wxFontMgrFontRefData::GetFontInstance(float scale, bool antialiased) const
|
|||||||
{
|
{
|
||||||
wxConstCast(this, wxFontMgrFontRefData)->EnsureValidFont();
|
wxConstCast(this, wxFontMgrFontRefData)->EnsureValidFont();
|
||||||
return m_fontFace->GetFontInstance(m_info.pointSize * scale,
|
return m_fontFace->GetFontInstance(m_info.pointSize * scale,
|
||||||
antialiased && !m_noAA);
|
antialiased);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFontMgrFontRefData::SetPointSize(int pointSize)
|
void wxFontMgrFontRefData::SetPointSize(int pointSize)
|
||||||
@@ -326,12 +323,6 @@ void wxFontMgrFontRefData::SetEncoding(wxFontEncoding encoding)
|
|||||||
m_fontValid = false;
|
m_fontValid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFontMgrFontRefData::SetNoAntiAliasing(bool no)
|
|
||||||
{
|
|
||||||
m_noAA = no;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void wxFontMgrFontRefData::EnsureValidFont()
|
void wxFontMgrFontRefData::EnsureValidFont()
|
||||||
{
|
{
|
||||||
if ( !m_fontValid )
|
if ( !m_fontValid )
|
||||||
|
@@ -148,13 +148,6 @@ const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
|
|||||||
return M_FONTDATA->GetNativeFontInfo();
|
return M_FONTDATA->GetNativeFontInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFont::GetNoAntiAliasing() const
|
|
||||||
{
|
|
||||||
wxCHECK_MSG( Ok(), false, wxT("invalid font") );
|
|
||||||
|
|
||||||
return M_FONTDATA->GetNoAntiAliasing();
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// change font attributes
|
// change font attributes
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -202,8 +195,3 @@ void wxFont::SetEncoding(wxFontEncoding encoding)
|
|||||||
M_FONTDATA->SetEncoding(encoding);
|
M_FONTDATA->SetEncoding(encoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFont::SetNoAntiAliasing(bool no)
|
|
||||||
{
|
|
||||||
AllocExclusive();
|
|
||||||
M_FONTDATA->SetNoAntiAliasing(no);
|
|
||||||
}
|
|
||||||
|
@@ -73,9 +73,6 @@ public:
|
|||||||
bool SetFaceName(const wxString& facename);
|
bool SetFaceName(const wxString& facename);
|
||||||
void SetEncoding(wxFontEncoding encoding);
|
void SetEncoding(wxFontEncoding encoding);
|
||||||
|
|
||||||
void SetNoAntiAliasing( bool no = true ) { m_noAA = no; }
|
|
||||||
bool GetNoAntiAliasing() const { return m_noAA; }
|
|
||||||
|
|
||||||
// and this one also modifies all the other font data fields
|
// and this one also modifies all the other font data fields
|
||||||
void SetNativeFontInfo(const wxNativeFontInfo& info);
|
void SetNativeFontInfo(const wxNativeFontInfo& info);
|
||||||
|
|
||||||
@@ -94,7 +91,6 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_underlined;
|
bool m_underlined;
|
||||||
bool m_noAA; // No anti-aliasing
|
|
||||||
|
|
||||||
// The native font info: basically a PangoFontDescription
|
// The native font info: basically a PangoFontDescription
|
||||||
wxNativeFontInfo m_nativeFontInfo;
|
wxNativeFontInfo m_nativeFontInfo;
|
||||||
@@ -120,7 +116,6 @@ void wxFontRefData::Init(int pointSize,
|
|||||||
family = wxFONTFAMILY_SWISS;
|
family = wxFONTFAMILY_SWISS;
|
||||||
|
|
||||||
m_underlined = underlined;
|
m_underlined = underlined;
|
||||||
m_noAA = false;
|
|
||||||
|
|
||||||
// Create native font info
|
// Create native font info
|
||||||
m_nativeFontInfo.description = pango_font_description_new();
|
m_nativeFontInfo.description = pango_font_description_new();
|
||||||
@@ -145,8 +140,6 @@ void wxFontRefData::Init(int pointSize,
|
|||||||
|
|
||||||
void wxFontRefData::InitFromNative()
|
void wxFontRefData::InitFromNative()
|
||||||
{
|
{
|
||||||
m_noAA = false;
|
|
||||||
|
|
||||||
// Get native info
|
// Get native info
|
||||||
PangoFontDescription *desc = m_nativeFontInfo.description;
|
PangoFontDescription *desc = m_nativeFontInfo.description;
|
||||||
|
|
||||||
@@ -163,7 +156,6 @@ wxFontRefData::wxFontRefData( const wxFontRefData& data )
|
|||||||
: wxGDIRefData()
|
: wxGDIRefData()
|
||||||
{
|
{
|
||||||
m_underlined = data.m_underlined;
|
m_underlined = data.m_underlined;
|
||||||
m_noAA = data.m_noAA;
|
|
||||||
|
|
||||||
// Forces a copy of the internal data. wxNativeFontInfo should probably
|
// Forces a copy of the internal data. wxNativeFontInfo should probably
|
||||||
// have a copy ctor and assignment operator to fix this properly but that
|
// have a copy ctor and assignment operator to fix this properly but that
|
||||||
@@ -377,13 +369,6 @@ wxFontEncoding wxFont::GetEncoding() const
|
|||||||
// Pango always uses UTF8... see also SetEncoding()
|
// Pango always uses UTF8... see also SetEncoding()
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFont::GetNoAntiAliasing() const
|
|
||||||
{
|
|
||||||
wxCHECK_MSG( IsOk(), false, wxT("invalid font") );
|
|
||||||
|
|
||||||
return M_FONTDATA->m_noAA;
|
|
||||||
}
|
|
||||||
|
|
||||||
const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
|
const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( IsOk(), NULL, wxT("invalid font") );
|
wxCHECK_MSG( IsOk(), NULL, wxT("invalid font") );
|
||||||
@@ -459,13 +444,6 @@ void wxFont::DoSetNativeFontInfo( const wxNativeFontInfo& info )
|
|||||||
M_FONTDATA->SetNativeFontInfo( info );
|
M_FONTDATA->SetNativeFontInfo( info );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFont::SetNoAntiAliasing( bool no )
|
|
||||||
{
|
|
||||||
AllocExclusive();
|
|
||||||
|
|
||||||
M_FONTDATA->SetNoAntiAliasing( no );
|
|
||||||
}
|
|
||||||
|
|
||||||
wxGDIRefData* wxFont::CreateGDIRefData() const
|
wxGDIRefData* wxFont::CreateGDIRefData() const
|
||||||
{
|
{
|
||||||
return new wxFontRefData;
|
return new wxFontRefData;
|
||||||
|
@@ -91,9 +91,6 @@ public:
|
|||||||
bool SetFaceName(const wxString& facename);
|
bool SetFaceName(const wxString& facename);
|
||||||
void SetEncoding(wxFontEncoding encoding);
|
void SetEncoding(wxFontEncoding encoding);
|
||||||
|
|
||||||
void SetNoAntiAliasing( bool no = true ) { m_noAA = no; }
|
|
||||||
bool GetNoAntiAliasing() const { return m_noAA; }
|
|
||||||
|
|
||||||
// and this one also modifies all the other font data fields
|
// and this one also modifies all the other font data fields
|
||||||
void SetNativeFontInfo(const wxNativeFontInfo& info);
|
void SetNativeFontInfo(const wxNativeFontInfo& info);
|
||||||
|
|
||||||
@@ -124,7 +121,6 @@ private:
|
|||||||
bool m_underlined;
|
bool m_underlined;
|
||||||
wxString m_faceName;
|
wxString m_faceName;
|
||||||
wxFontEncoding m_encoding; // Unused under GTK 2.0
|
wxFontEncoding m_encoding; // Unused under GTK 2.0
|
||||||
bool m_noAA; // No anti-aliasing
|
|
||||||
|
|
||||||
// The native font info, basicly an XFLD under GTK 1.2 and
|
// The native font info, basicly an XFLD under GTK 1.2 and
|
||||||
// the pango font description under GTK 2.0.
|
// the pango font description under GTK 2.0.
|
||||||
@@ -163,14 +159,10 @@ void wxFontRefData::Init(int pointSize,
|
|||||||
|
|
||||||
m_underlined = underlined;
|
m_underlined = underlined;
|
||||||
m_encoding = encoding;
|
m_encoding = encoding;
|
||||||
|
|
||||||
m_noAA = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFontRefData::InitFromNative()
|
void wxFontRefData::InitFromNative()
|
||||||
{
|
{
|
||||||
m_noAA = false;
|
|
||||||
|
|
||||||
// get the font parameters from the XLFD
|
// get the font parameters from the XLFD
|
||||||
// -------------------------------------
|
// -------------------------------------
|
||||||
|
|
||||||
@@ -283,8 +275,6 @@ wxFontRefData::wxFontRefData( const wxFontRefData& data )
|
|||||||
m_faceName = data.m_faceName;
|
m_faceName = data.m_faceName;
|
||||||
m_encoding = data.m_encoding;
|
m_encoding = data.m_encoding;
|
||||||
|
|
||||||
m_noAA = data.m_noAA;
|
|
||||||
|
|
||||||
// Forces a copy of the internal data. wxNativeFontInfo should probably
|
// Forces a copy of the internal data. wxNativeFontInfo should probably
|
||||||
// have a copy ctor and assignment operator to fix this properly but that
|
// have a copy ctor and assignment operator to fix this properly but that
|
||||||
// would break binary compatibility...
|
// would break binary compatibility...
|
||||||
@@ -580,13 +570,6 @@ wxFontEncoding wxFont::GetEncoding() const
|
|||||||
return M_FONTDATA->m_encoding;
|
return M_FONTDATA->m_encoding;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFont::GetNoAntiAliasing() const
|
|
||||||
{
|
|
||||||
wxCHECK_MSG( Ok(), wxFONTENCODING_DEFAULT, wxT("invalid font") );
|
|
||||||
|
|
||||||
return M_FONTDATA->m_noAA;
|
|
||||||
}
|
|
||||||
|
|
||||||
const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
|
const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( Ok(), NULL, wxT("invalid font") );
|
wxCHECK_MSG( Ok(), NULL, wxT("invalid font") );
|
||||||
@@ -679,13 +662,6 @@ void wxFont::DoSetNativeFontInfo( const wxNativeFontInfo& info )
|
|||||||
M_FONTDATA->SetNativeFontInfo( info );
|
M_FONTDATA->SetNativeFontInfo( info );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFont::SetNoAntiAliasing( bool no )
|
|
||||||
{
|
|
||||||
Unshare();
|
|
||||||
|
|
||||||
M_FONTDATA->SetNoAntiAliasing( no );
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// get internal representation of font
|
// get internal representation of font
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -145,13 +145,6 @@ const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
|
|||||||
return M_FONTDATA->GetNativeFontInfo();
|
return M_FONTDATA->GetNativeFontInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFont::GetNoAntiAliasing() const
|
|
||||||
{
|
|
||||||
wxCHECK_MSG( Ok(), false, wxT("invalid font") );
|
|
||||||
|
|
||||||
return M_FONTDATA->GetNoAntiAliasing();
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// change font attributes
|
// change font attributes
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -199,8 +192,3 @@ void wxFont::SetEncoding(wxFontEncoding encoding)
|
|||||||
M_FONTDATA->SetEncoding(encoding);
|
M_FONTDATA->SetEncoding(encoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFont::SetNoAntiAliasing(bool no)
|
|
||||||
{
|
|
||||||
AllocExclusive();
|
|
||||||
M_FONTDATA->SetNoAntiAliasing(no);
|
|
||||||
}
|
|
||||||
|
@@ -61,10 +61,6 @@ public:
|
|||||||
|
|
||||||
virtual ~wxFontRefData();
|
virtual ~wxFontRefData();
|
||||||
|
|
||||||
void SetNoAntiAliasing( bool no = true ) { m_noAA = no; }
|
|
||||||
|
|
||||||
bool GetNoAntiAliasing() const { return m_noAA; }
|
|
||||||
|
|
||||||
void SetPointSize( int size )
|
void SetPointSize( int size )
|
||||||
{
|
{
|
||||||
if( GetPointSize() != size )
|
if( GetPointSize() != size )
|
||||||
@@ -154,7 +150,6 @@ protected:
|
|||||||
#if wxOSX_USE_CORE_TEXT
|
#if wxOSX_USE_CORE_TEXT
|
||||||
// void Init( CTFontRef font );
|
// void Init( CTFontRef font );
|
||||||
#endif
|
#endif
|
||||||
bool m_noAA; // No anti-aliasing
|
|
||||||
public:
|
public:
|
||||||
bool m_fontValid;
|
bool m_fontValid;
|
||||||
#if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT
|
#if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT
|
||||||
@@ -184,7 +179,6 @@ wxFontRefData::wxFontRefData(const wxFontRefData& data)
|
|||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
m_info = data.m_info;
|
m_info = data.m_info;
|
||||||
m_noAA = data.m_noAA;
|
|
||||||
m_fontValid = data.m_fontValid;
|
m_fontValid = data.m_fontValid;
|
||||||
#if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT
|
#if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT
|
||||||
m_macThemeFontID = data.m_macThemeFontID;
|
m_macThemeFontID = data.m_macThemeFontID;
|
||||||
@@ -219,7 +213,6 @@ wxFontRefData::wxFontRefData(const wxFontRefData& data)
|
|||||||
|
|
||||||
void wxFontRefData::Init()
|
void wxFontRefData::Init()
|
||||||
{
|
{
|
||||||
m_noAA = false;
|
|
||||||
#if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT
|
#if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT
|
||||||
m_macThemeFontID = kThemeCurrentPortFont ;
|
m_macThemeFontID = kThemeCurrentPortFont ;
|
||||||
#endif
|
#endif
|
||||||
@@ -656,13 +649,6 @@ void wxFont::SetUnderlined(bool underlined)
|
|||||||
M_FONTDATA->SetUnderlined( underlined );
|
M_FONTDATA->SetUnderlined( underlined );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFont::SetNoAntiAliasing( bool no )
|
|
||||||
{
|
|
||||||
AllocExclusive();
|
|
||||||
|
|
||||||
M_FONTDATA->SetNoAntiAliasing( no );
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// accessors
|
// accessors
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -733,13 +719,6 @@ wxFontEncoding wxFont::GetEncoding() const
|
|||||||
return M_FONTDATA->GetEncoding() ;
|
return M_FONTDATA->GetEncoding() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFont::GetNoAntiAliasing() const
|
|
||||||
{
|
|
||||||
wxCHECK_MSG( M_FONTDATA != NULL , false, wxT("invalid font") );
|
|
||||||
|
|
||||||
return M_FONTDATA->GetNoAntiAliasing();
|
|
||||||
}
|
|
||||||
|
|
||||||
#if wxOSX_USE_ATSU_TEXT && wxOSX_USE_CARBON
|
#if wxOSX_USE_ATSU_TEXT && wxOSX_USE_CARBON
|
||||||
|
|
||||||
short wxFont::MacGetFontNum() const
|
short wxFont::MacGetFontNum() const
|
||||||
|
@@ -140,7 +140,7 @@ Font::~Font() {
|
|||||||
|
|
||||||
void Font::Create(const char *faceName, int characterSet,
|
void Font::Create(const char *faceName, int characterSet,
|
||||||
int size, bool bold, bool italic,
|
int size, bool bold, bool italic,
|
||||||
bool extraFontFlag) {
|
bool WXUNUSED(extraFontFlag)) {
|
||||||
Release();
|
Release();
|
||||||
|
|
||||||
// The minus one is done because since Scintilla uses SC_SHARSET_DEFAULT
|
// The minus one is done because since Scintilla uses SC_SHARSET_DEFAULT
|
||||||
@@ -160,7 +160,6 @@ void Font::Create(const char *faceName, int characterSet,
|
|||||||
false,
|
false,
|
||||||
stc2wx(faceName),
|
stc2wx(faceName),
|
||||||
encoding);
|
encoding);
|
||||||
font->SetNoAntiAliasing(!extraFontFlag);
|
|
||||||
id = font;
|
id = font;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -125,9 +125,6 @@ public:
|
|||||||
bool SetFaceName(const wxString& facename);
|
bool SetFaceName(const wxString& facename);
|
||||||
void SetEncoding(wxFontEncoding encoding);
|
void SetEncoding(wxFontEncoding encoding);
|
||||||
|
|
||||||
void SetNoAntiAliasing( bool no = true ) { m_noAA = no; }
|
|
||||||
bool GetNoAntiAliasing() const { return m_noAA; }
|
|
||||||
|
|
||||||
// and this one also modifies all the other font data fields
|
// and this one also modifies all the other font data fields
|
||||||
void SetNativeFontInfo(const wxNativeFontInfo& info);
|
void SetNativeFontInfo(const wxNativeFontInfo& info);
|
||||||
|
|
||||||
@@ -152,7 +149,6 @@ protected:
|
|||||||
bool m_underlined;
|
bool m_underlined;
|
||||||
wxString m_faceName;
|
wxString m_faceName;
|
||||||
wxFontEncoding m_encoding; // Unused in Unicode mode
|
wxFontEncoding m_encoding; // Unused in Unicode mode
|
||||||
bool m_noAA; // No anti-aliasing
|
|
||||||
|
|
||||||
wxNativeFontInfo m_nativeFontInfo;
|
wxNativeFontInfo m_nativeFontInfo;
|
||||||
|
|
||||||
@@ -232,8 +228,6 @@ void wxFontRefData::Init(int pointSize,
|
|||||||
|
|
||||||
void wxFontRefData::InitFromNative()
|
void wxFontRefData::InitFromNative()
|
||||||
{
|
{
|
||||||
m_noAA = false;
|
|
||||||
|
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
// Get native info
|
// Get native info
|
||||||
PangoFontDescription *desc = m_nativeFontInfo.description;
|
PangoFontDescription *desc = m_nativeFontInfo.description;
|
||||||
@@ -414,8 +408,6 @@ wxFontRefData::wxFontRefData( const wxFontRefData& data )
|
|||||||
m_faceName = data.m_faceName;
|
m_faceName = data.m_faceName;
|
||||||
m_encoding = data.m_encoding;
|
m_encoding = data.m_encoding;
|
||||||
|
|
||||||
m_noAA = data.m_noAA;
|
|
||||||
|
|
||||||
m_nativeFontInfo = data.m_nativeFontInfo;
|
m_nativeFontInfo = data.m_nativeFontInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -768,13 +760,6 @@ wxFontEncoding wxFont::GetEncoding() const
|
|||||||
return M_FONTDATA->m_encoding;
|
return M_FONTDATA->m_encoding;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFont::GetNoAntiAliasing() const
|
|
||||||
{
|
|
||||||
wxCHECK_MSG( Ok(), wxFONTENCODING_DEFAULT, wxT("invalid font") );
|
|
||||||
|
|
||||||
return M_FONTDATA->m_noAA;
|
|
||||||
}
|
|
||||||
|
|
||||||
const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
|
const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( Ok(), NULL, wxT("invalid font") );
|
wxCHECK_MSG( Ok(), NULL, wxT("invalid font") );
|
||||||
@@ -872,15 +857,7 @@ void wxFont::DoSetNativeFontInfo( const wxNativeFontInfo& info )
|
|||||||
M_FONTDATA->SetNativeFontInfo( info );
|
M_FONTDATA->SetNativeFontInfo( info );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFont::SetNoAntiAliasing( bool no )
|
#if !wxUSE_UNICODE
|
||||||
{
|
|
||||||
Unshare();
|
|
||||||
|
|
||||||
M_FONTDATA->SetNoAntiAliasing( no );
|
|
||||||
}
|
|
||||||
|
|
||||||
#if wxUSE_UNICODE
|
|
||||||
#else
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// X11 implementation
|
// X11 implementation
|
||||||
@@ -946,4 +923,4 @@ WXFontStructPtr wxFont::GetFontStruct(double scale, WXDisplay* display) const
|
|||||||
return (f ? f->m_fontStruct : (WXFontStructPtr) 0);
|
return (f ? f->m_fontStruct : (WXFontStructPtr) 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif // !wxUSE_UNICODE
|
||||||
|
Reference in New Issue
Block a user