+}
+
+#if wxMAC_USE_CORE_TEXT
+
+/* from Core Text Manual Common Operations */
+
+static CTFontDescriptorRef wxMacCreateCTFontDescriptor(CFStringRef iFamilyName, CTFontSymbolicTraits iTraits )
+{
+ CTFontDescriptorRef descriptor = NULL;
+ CFMutableDictionaryRef attributes;
+
+ assert(iFamilyName != NULL);
+ // Create a mutable dictionary to hold our attributes.
+ attributes = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
+ &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
+ check(attributes != NULL);
+
+ if (attributes != NULL) {
+ // Add a family name to our attributes.
+ CFDictionaryAddValue(attributes, kCTFontFamilyNameAttribute, iFamilyName);
+
+
+ if ( iTraits ) {
+ CFMutableDictionaryRef traits;
+ CFNumberRef symTraits;
+
+ // Create the traits dictionary.
+ symTraits = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type,
+ &iTraits);
+ check(symTraits != NULL);
+
+ if (symTraits != NULL) {
+ // Create a dictionary to hold our traits values.
+ traits = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
+ &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
+ check(traits != NULL);
+
+ if (traits != NULL) {
+ // Add the symbolic traits value to the traits dictionary.
+ CFDictionaryAddValue(traits, kCTFontSymbolicTrait, symTraits);
+
+ // Add the traits attribute to our attributes.
+ CFDictionaryAddValue(attributes, kCTFontTraitsAttribute, traits);
+ CFRelease(traits);
+ }
+ CFRelease(symTraits);
+ }
+ }
+ // Create the font descriptor with our attributes
+ descriptor = CTFontDescriptorCreateWithAttributes(attributes);
+ check(descriptor != NULL);
+
+ CFRelease(attributes);