Remove ATSU-related dead code from wxOSX

ATSU was deprecated for a long time and was finally removed from OS X
SDK in 10.11. wxOSX_USE_ATSU_TEXT was unconditionally disabled already,
so the code was never used and can be safely removed.
This commit is contained in:
Václav Slavík
2016-12-03 12:44:10 +01:00
parent 40a04218f4
commit c9b1ebf816
6 changed files with 0 additions and 334 deletions

View File

@@ -823,9 +823,6 @@ public:
wxMacCoreGraphicsFontData( wxGraphicsRenderer* renderer, const wxFont &font, const wxColour& col );
~wxMacCoreGraphicsFontData();
#if wxOSX_USE_ATSU_TEXT
virtual ATSUStyle GetATSUStyle() { return m_macATSUIStyle; }
#endif
CTFontRef OSXGetCTFont() const { return m_ctFont ; }
wxColour GetColour() const { return m_colour ; }
@@ -839,9 +836,6 @@ private :
wxColour m_colour;
bool m_underlined,
m_strikethrough;
#if wxOSX_USE_ATSU_TEXT
ATSUStyle m_macATSUIStyle;
#endif
wxCFRef< CTFontRef > m_ctFont;
#if wxOSX_USE_IPHONE
UIFont* m_uiFont;
@@ -859,52 +853,10 @@ wxMacCoreGraphicsFontData::wxMacCoreGraphicsFontData(wxGraphicsRenderer* rendere
m_uiFont = CreateUIFont(font);
wxMacCocoaRetain( m_uiFont );
#endif
#if wxOSX_USE_ATSU_TEXT
OSStatus status = noErr;
m_macATSUIStyle = NULL;
status = ATSUCreateAndCopyStyle( (ATSUStyle) font.MacGetATSUStyle() , &m_macATSUIStyle );
wxASSERT_MSG( status == noErr, wxT("couldn't create ATSU style") );
// we need the scale here ...
Fixed atsuSize = IntToFixed( int( 1 * font.GetPointSize()) );
RGBColor atsuColor ;
col.GetRGBColor( &atsuColor );
ATSUAttributeTag atsuTags[] =
{
kATSUSizeTag ,
kATSUColorTag ,
};
ByteCount atsuSizes[WXSIZEOF(atsuTags)] =
{
sizeof( Fixed ) ,
sizeof( RGBColor ) ,
};
ATSUAttributeValuePtr atsuValues[WXSIZEOF(atsuTags)] =
{
&atsuSize ,
&atsuColor ,
};
status = ::ATSUSetAttributes(
m_macATSUIStyle, WXSIZEOF(atsuTags),
atsuTags, atsuSizes, atsuValues);
wxASSERT_MSG( status == noErr , wxT("couldn't modify ATSU style") );
#endif
}
wxMacCoreGraphicsFontData::~wxMacCoreGraphicsFontData()
{
#if wxOSX_USE_ATSU_TEXT
if ( m_macATSUIStyle )
{
::ATSUDisposeStyle((ATSUStyle)m_macATSUIStyle);
m_macATSUIStyle = NULL;
}
#endif
#if wxOSX_USE_IPHONE
wxMacCocoaRelease( m_uiFont );
#endif