[vlc-devel] commit: freetype: simply snowleopard-hack for default font ( Felix Paul Kühne )
git version control
git at videolan.org
Mon Sep 14 20:06:31 CEST 2009
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Sep 14 19:47:10 2009 +0200| [4f197fd7cccfd5d193209aa065ac5d526e29f458] | committer: Felix Paul Kühne
freetype: simply snowleopard-hack for default font
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4f197fd7cccfd5d193209aa065ac5d526e29f458
---
modules/misc/freetype.c | 25 ++++++++++++++-----------
1 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/modules/misc/freetype.c b/modules/misc/freetype.c
index d583afa..82d9887 100644
--- a/modules/misc/freetype.c
+++ b/modules/misc/freetype.c
@@ -56,6 +56,7 @@
#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"
#elif defined( SYS_BEOS )
#define DEFAULT_FONT "/boot/beos/etc/fonts/ttfonts/Swiss721.ttf"
@@ -325,8 +326,17 @@ 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
#else
free( psz_fontfamily );
psz_fontfamily = (char *)malloc( PATH_MAX + 1 );
@@ -337,17 +347,10 @@ static int Create( vlc_object_t *p_this )
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 );
- }
- }
+ 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