- Style atsuStyle = normal ;
- verify_noerr(::ATSUFONDtoFontID(m_macFontNum, atsuStyle , (UInt32*)&m_macATSUFontID) );
- if ( m_macFontStyle & bold )
- {
- ATSUFontID test ;
- if ( ::ATSUFONDtoFontID(m_macFontNum, atsuStyle | bold , &test) == noErr )
- {
- atsuStyle |= bold ;
- m_macATSUFontID = test ;
- }
- }
- if ( m_macFontStyle & italic )
- {
- ATSUFontID test ;
- if ( ::ATSUFONDtoFontID(m_macFontNum, atsuStyle | italic , &test) == noErr )
- {
- atsuStyle |= italic ;
- m_macATSUFontID = test ;
- }
- }
- if ( m_macFontStyle & underline )
- {
- ATSUFontID test ;
- if ( ::ATSUFONDtoFontID(m_macFontNum, atsuStyle | underline , &test) == noErr )
- {
- atsuStyle |= underline ;
- m_macATSUFontID = test ;
- }
- }
-
- m_macATSUAdditionalQDStyles = m_macFontStyle & (~atsuStyle ) ;
+ // ATSUFontID and FMFont are equivalent
+ FMFontStyle intrinsicStyle = 0 ;
+#ifndef __LP64__
+ status = FMGetFontFromFontFamilyInstance( m_macFontFamily , m_macFontStyle , &m_macATSUFontID , &intrinsicStyle);
+ wxASSERT_MSG( status == noErr , wxT("couldn't get an ATSUFont from font family") );
+#endif
+ m_macATSUAdditionalQDStyles = m_macFontStyle & (~intrinsicStyle );