[vlc-commits] Freetype: use add_loadfile when fontconfig|win32 is disabled

Jean-Baptiste Kempf git at videolan.org
Mon May 9 15:50:48 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon May  9 15:49:13 2011 +0200| [8f41963490a46596605cefc33ed8e62f758ad67f] | committer: Jean-Baptiste Kempf

Freetype: use add_loadfile when fontconfig|win32 is disabled

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

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

diff --git a/modules/misc/text_renderer/freetype.c b/modules/misc/text_renderer/freetype.c
index ae450c0..fcfe9a8 100644
--- a/modules/misc/text_renderer/freetype.c
+++ b/modules/misc/text_renderer/freetype.c
@@ -43,16 +43,16 @@
 
 /* Default fonts */
 #ifdef __APPLE__
-# define DEFAULT_FONT "/Library/Fonts/Arial Black.ttf"
+# define DEFAULT_FONT_FILE "/Library/Fonts/Arial Black.ttf"
 # define DEFAULT_FAMILY "Arial Black"
 #elif defined( WIN32 )
-# define DEFAULT_FONT "arial.ttf" /* Default path font found at run-time */
+# define DEFAULT_FONT_FILE "arial.ttf" /* Default path font found at run-time */
 # define DEFAULT_FAMILY "Arial"
 #elif defined( HAVE_MAEMO )
-# define DEFAULT_FONT "/usr/share/fonts/nokia/nosnb.ttf"
+# define DEFAULT_FONT_FILE "/usr/share/fonts/nokia/nosnb.ttf"
 # define DEFAULT_FAMILY "Nokia Sans Bold"
 #else
-# define DEFAULT_FONT "/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf"
+# define DEFAULT_FONT_FILE "/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf"
 # define DEFAULT_FAMILY "Serif Bold"
 #endif
 
@@ -155,7 +155,7 @@ vlc_module_begin ()
 #ifdef HAVE_STYLES
     add_font( "freetype-font", DEFAULT_FAMILY, FONT_TEXT, FAMILY_LONGTEXT, false )
 #else
-    add_font( "freetype-font", DEFAULT_FONT, FONT_TEXT, FONT_LONGTEXT, false )
+    add_loadfile( "freetype-font", DEFAULT_FONT_FILE, FONT_TEXT, FONT_LONGTEXT, false )
 #endif
 
     add_integer( "freetype-fontsize", 0, FONTSIZE_TEXT,
@@ -357,10 +357,10 @@ static int Create( vlc_object_t *p_this )
         psz_fontfamily = strdup( DEFAULT_FAMILY );
 #else
 # ifdef WIN32
-        if( asprintf( &psz_fontfamily, "%s%s", p_sys->psz_win_fonts_path, DEFAULT_FONT ) == -1 )
+        if( asprintf( &psz_fontfamily, "%s%s", p_sys->psz_win_fonts_path, DEFAULT_FONT_FILE ) == -1 )
             goto error;
 # else
-        psz_fontfamily = strdup( DEFAULT_FONT );
+        psz_fontfamily = strdup( DEFAULT_FONT_FILE );
 # endif
         msg_Err( p_filter,"User specified an empty fontfile, using %s", psz_fontfamily );
 #endif



More information about the vlc-commits mailing list