[vlc-devel] commit: freetype: use a sane default font on OS X, so we don' t have to add ugly hacks to keep it working ( Felix Paul Kühne )

git version control git at videolan.org
Wed Sep 16 00:14:51 CEST 2009


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Sep 16 00:14:48 2009 +0200| [3d1adc71ac644ae1d35af0163a9a48334afb0025] | committer: Felix Paul Kühne 

freetype: use a sane default font on OS X, so we don't have to add ugly hacks to keep it working

Arial Black is available on all Mac OS X installations current VLC releases can run on and is the default for the 'Quartztext' renderer anyway.

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

 modules/misc/freetype.c |   20 ++------------------
 1 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/modules/misc/freetype.c b/modules/misc/freetype.c
index 82d9887..9ec0e90 100644
--- a/modules/misc/freetype.c
+++ b/modules/misc/freetype.c
@@ -54,10 +54,8 @@
 #endif
 
 #ifdef __APPLE__
-#import <Carbon/Carbon.h>
-#define DEFAULT_FONT "/System/Library/Fonts/LucidaGrande.dfont"
-#define DEFAULT_FONT_SNOWLEOPARD "/System/Library/Fonts/LucidaGrande.ttc"
-#define FC_DEFAULT_FONT "Lucida Grande"
+#define DEFAULT_FONT "/Library/Fonts/Arial Black.ttf"
+#define FC_DEFAULT_FONT "Arial Black"
 #elif defined( SYS_BEOS )
 #define DEFAULT_FONT "/boot/beos/etc/fonts/ttfonts/Swiss721.ttf"
 #define FC_DEFAULT_FONT "Swiss"
@@ -326,14 +324,6 @@ static int Create( vlc_object_t *p_this )
     if( !psz_fontfamily || !*psz_fontfamily )
     {
 #ifdef HAVE_FONTCONFIG
-#ifdef __APPLE__
-        SInt32 MacVersion;
-        free( psz_fontfamily);
-        if (Gestalt(gestaltSystemVersion, &MacVersion) == noErr && MacVersion >= 0x1060)
-            psz_fontfamily=strdup( DEFAULT_FONT_SNOWLEOPARD );
-        else
-            psz_fontfamily=strdup( DEFAULT_FONT );
-#else
         free( psz_fontfamily);
         psz_fontfamily=strdup( DEFAULT_FONT );
 #endif
@@ -345,12 +335,6 @@ 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 && MacVersion >= 0x1060)
-            strcpy( psz_fontfile, DEFAULT_FONT_SNOWLEOPARD );
-        else
-            strcpy( psz_fontfile, DEFAULT_FONT );
 # else
         strcpy( psz_fontfamily, DEFAULT_FONT );
 # endif




More information about the vlc-devel mailing list