- ATSUStyle style = (ATSUStyle)font.MacGetATSUStyle();
- err = SetFontInfoForSelection (kFontSelectionATSUIType,1, &style , NULL);
+ bool setup = false;
+#if wxMAC_USE_CORE_TEXT
+ if ( UMAGetSystemVersion() >= 0x1050 )
+ {
+ CTFontDescriptorRef descr = (CTFontDescriptorRef)font.MacGetCTFontDescriptor();
+ err = SetFontInfoForSelection (kFontSelectionCoreTextType,1, &descr , NULL);
+ setup = true;
+ }
+#endif
+#if wxMAC_USE_ATSU_TEXT
+ if ( !setup )
+ {
+ ATSUStyle style = (ATSUStyle)font.MacGetATSUStyle();
+ err = SetFontInfoForSelection (kFontSelectionATSUIType,1, &style , NULL);
+ setup = true;
+ }
+#endif