Changeset 1193
- Timestamp:
- 11/17/09 00:04:23 (4 months ago)
- Files:
-
- trunk/CommonUtils.c (modified) (4 diffs)
- trunk/CommonUtils.h (modified) (1 diff)
- trunk/MatroskaImportPrivate.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/CommonUtils.c
r1189 r1193 25 25 #import <pthread.h> 26 26 #import <dlfcn.h> 27 #import <fnmatch.h> 27 28 28 29 typedef struct LanguageTriplet { … … 411 412 } 412 413 414 static int GetSystemMinorVersion() 415 { 416 long minorVersion; 417 Gestalt(gestaltSystemVersionMinor, &minorVersion); 418 419 return minorVersion; 420 } 421 413 422 int IsTransparentSubtitleHackEnabled() 414 423 { … … 417 426 if(forced == -1) 418 427 { 419 long minorVersion; 420 Gestalt(gestaltSystemVersionMinor, &minorVersion); 428 int minorVersion = GetSystemMinorVersion(); 421 429 422 430 if (minorVersion == 5) … … 449 457 } 450 458 459 460 // this could be a defaults setting, but no real call for it yet 461 int ShouldImportFontFileName(const char *filename) 462 { 463 // match DynaFont Labs (1997) fonts, which are in many files 464 // and completely break ATSUI on different OS versions 465 // FIXME: This font works when in ~/Library/Fonts (!). Check it again with CoreText. 466 return !(GetSystemMinorVersion() >= 6 && fnmatch("DF*.ttc", filename, 0) == 0); 467 } 468 469 451 470 CFPropertyListRef CopyPreferencesValueTyped(CFStringRef key, CFTypeID type) 452 471 { trunk/CommonUtils.h
r1189 r1193 62 62 int IsAltivecSupported(); 63 63 64 // is this font name known to be incompatible with ATSUI? 65 int ShouldImportFontFileName(const char *filename); 66 64 67 // CFPreferencesCopyAppValue() wrapper which checks the type of the value returned 65 68 CFPropertyListRef CopyPreferencesValueTyped(CFStringRef key, CFTypeID type); trunk/MatroskaImportPrivate.cpp
r1181 r1193 762 762 /* The only attachments handled here are fonts, which currently can be truetype or opentype. 763 763 application/x-* is probably not a permanent MIME type, but it is current practice... */ 764 if (fileMimeType == "application/x-truetype-font" || fileMimeType == "application/x-font-otf") { 764 if ((fileMimeType == "application/x-truetype-font" || fileMimeType == "application/x-font-otf") && 765 ShouldImportFontFileName(fileName.c_str())) { 765 766 KaxFileData & fontData = GetChild<KaxFileData>(*attachedFile); 766 767
