From: Stefan Csomor <csomor@advancedconcepts.ch>
Date: Fri, 27 Jun 2008 09:50:08 +0000 (+0000)
Subject: was incorrectly forcing the font to 12 in most cases, fixes #4745
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/cde80c9284b64d611e8cf4a7565de40aa0acce81

was incorrectly forcing the font to 12 in most cases, fixes #4745

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/src/osx/carbon/font.cpp b/src/osx/carbon/font.cpp
index da34391d86..d37f02f402 100644
--- a/src/osx/carbon/font.cpp
+++ b/src/osx/carbon/font.cpp
@@ -316,7 +316,7 @@ static CTFontDescriptorRef wxMacCreateCTFontDescriptor(CFStringRef iFamilyName,
 wxFontRefData::wxFontRefData( wxUint32 coreTextFontType )
 {
     CTFontRef font = CTFontCreateUIFontForLanguage( coreTextFontType, 0.0, NULL ) ;
-    if ( CTFontGetSize(m_ctFont) == 0 )
+    if ( CTFontGetSize(font) == 0 )
     {
         CFRelease(font);
         font = CTFontCreateUIFontForLanguage( coreTextFontType, 12.0, NULL );
@@ -446,7 +446,7 @@ void wxFontRefData::MacFindFont()
             m_ctFont.reset( CTFontCreateWithFontDescriptor( m_ctFontDescriptor, m_pointSize, NULL ) );
 #endif
         }
-#if wxMAC_USE_ATSU_TEXT == 0
+#if wxMAC_USE_ATSU_TEXT
         OSStatus status = noErr;
         CTFontDescriptorRef desc = m_ctFontDescriptor ;
         ATSFontRef atsfont = CTFontGetPlatformFont( m_ctFont, &desc );