[vlc-devel] commit: freetype: LucidaGrande is stored in a different format in Snow Leopard and therefore at another location ( Felix Paul Kühne )

git version control git at videolan.org
Fri Sep 4 12:39:51 CEST 2009


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Sep  4 12:39:47 2009 +0200| [76cce191d049338b8cde34c1f9d4f5cf64163d60] | committer: Felix Paul Kühne 

freetype: LucidaGrande is stored in a different format in Snow Leopard and therefore at another location

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=76cce191d049338b8cde34c1f9d4f5cf64163d60
---

 modules/misc/freetype.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/modules/misc/freetype.c b/modules/misc/freetype.c
index 8adaf11..d583afa 100644
--- a/modules/misc/freetype.c
+++ b/modules/misc/freetype.c
@@ -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




More information about the vlc-devel mailing list