#endif
m_cgFont.reset();
#if wxOSX_USE_ATSU_TEXT
+#if wxOSX_USE_CARBON
+ m_macThemeFontID = kThemeCurrentPortFont ;
+#endif
if ( m_macATSUStyle )
{
::ATSUDisposeStyle((ATSUStyle)m_macATSUStyle);
kATSUQDCondensedTag ,
kATSUQDExtendedTag ,
};
- ByteCount atsuSizes[sizeof(atsuTags) / sizeof(ATSUAttributeTag)] =
+ ByteCount atsuSizes[WXSIZEOF(atsuTags)] =
{
sizeof( ATSUFontID ) ,
sizeof( Fixed ) ,
Fixed atsuSize = IntToFixed( m_info.m_pointSize );
ATSUVerticalCharacterType kHorizontal = kATSUStronglyHorizontal;
FMFontStyle addQDStyle = m_info.m_atsuAdditionalQDStyles;
- ATSUAttributeValuePtr atsuValues[sizeof(atsuTags) / sizeof(ATSUAttributeTag)] =
+ ATSUAttributeValuePtr atsuValues[WXSIZEOF(atsuTags)] =
{
&m_info.m_atsuFontID ,
&atsuSize ,
status = ::ATSUSetAttributes(
(ATSUStyle)m_macATSUStyle,
- sizeof(atsuTags) / sizeof(ATSUAttributeTag) ,
+ WXSIZEOF(atsuTags),
atsuTags, atsuSizes, atsuValues);
wxASSERT_MSG( status == noErr , wxT("couldn't modify ATSU style") );
// ATSUFontID and FMFont are equivalent
FMFontStyle intrinsicStyle = 0 ;
OSStatus status = FMGetFontFromFontFamilyInstance( m_qdFontFamily , m_qdFontStyle , (FMFont*)&m_atsuFontID , &intrinsicStyle);
- wxASSERT_MSG( status == noErr , wxT("couldn't get an ATSUFont from font family") );
+ if ( status != noErr )
+ {
+ wxFAIL_MSG( wxT("couldn't get an ATSUFont from font family") );
+ }
m_atsuAdditionalQDStyles = m_qdFontStyle & (~intrinsicStyle );
m_atsuFontValid = true;
}
{
long l;
- wxStringTokenizer tokenizer(s, _T(";"));
+ wxStringTokenizer tokenizer(s, wxT(";"));
wxString token = tokenizer.GetNextToken();
//
{
wxString s;
- s.Printf(_T("%d;%d;%d;%d;%d;%d;%s;%d"),
+ s.Printf(wxT("%d;%d;%d;%d;%d;%d;%s;%d"),
0, // version
m_pointSize,
m_family,