- // check that it's a fixed pitch font:
- // there is *no* error here: the flag name is misleading!
- if ( tm->tmPitchAndFamily & TMPF_FIXED_PITCH )
- // not a fixed pitch font
- return true;
+ #ifndef __LP64__
+ // TODO CS : Find replacement
+ // added CS : avoid showing fonts that won't be displayable
+ FMFontStyle intrinsicStyle = 0 ;
+ FMFont fontInstance ;
+ FMFontFamily fmFamily = FMGetFontFamilyFromATSFontFamilyRef( theATSFontFamilyRef );
+ status = FMGetFontFromFontFamilyInstance( fmFamily , 0 , &fontInstance , &intrinsicStyle);
+ if ( status != noErr )
+ {
+ status = noErr;
+ continue ;
+ }
+#endif
+ if ( encoding != wxFONTENCODING_SYSTEM )
+ {
+ TextEncoding fontFamiliyEncoding = ATSFontFamilyGetEncoding(theATSFontFamilyRef) ;
+ if ( fontFamiliyEncoding != macEncoding )
+ continue ;
+ }
+
+ // TODO: determine fixed widths ...
+
+ CFStringRef theName = NULL;
+ ATSFontFamilyGetName(theATSFontFamilyRef, kATSOptionFlagsDefault, &theName);
+ wxCFStringRef cfName(theName) ;
+ fontFamilies.Add(cfName.AsString(wxLocale::GetSystemEncoding()));