]> git.sesse.net Git - vlc/commitdiff
freetype: LucidaGrande is stored in a different format in Snow Leopard and therefore...
authorFelix Paul Kühne <fkuehne@videolan.org>
Fri, 4 Sep 2009 10:39:47 +0000 (12:39 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Fri, 4 Sep 2009 10:39:47 +0000 (12:39 +0200)
modules/misc/freetype.c

index 8adaf118211310f19b020502ec0650e2e840649d..d583afa0ed2da14dc43729a303a75b7548cb2dc5 100644 (file)
@@ -54,6 +54,7 @@
 #endif
 
 #ifdef __APPLE__
+#import <Carbon/Carbon.h>
 #define DEFAULT_FONT "/System/Library/Fonts/LucidaGrande.dfont"
 #define FC_DEFAULT_FONT "Lucida Grande"
 #elif defined( SYS_BEOS )
@@ -334,6 +335,19 @@ static int Create( vlc_object_t *p_this )
 # ifdef WIN32
         GetWindowsDirectory( psz_fontfamily , PATH_MAX + 1 );
         strcat( psz_fontfamily, "\\fonts\\arial.ttf" );
+# elif __APPLE__
+        SInt32 MacVersion;
+        if (Gestalt(gestaltSystemVersion, &MacVersion) == noErr)
+        {
+            if (MacVersion >= 0x1060)
+            {
+                strcpy( psz_fontfile, "/System/Library/Fonts/LucidaGrande.ttc" );
+            }
+            else
+            {
+                strcpy( psz_fontfile, DEFAULT_FONT );
+            }
+        }
 # else
         strcpy( psz_fontfamily, DEFAULT_FONT );
 # endif