]> git.sesse.net Git - vlc/commitdiff
Including font-eutopiabold36.rle for DivX and ogg subtitles.
authorChristophe Massiot <massiot@videolan.org>
Sat, 18 Jan 2003 13:24:44 +0000 (13:24 +0000)
committerChristophe Massiot <massiot@videolan.org>
Sat, 18 Jan 2003 13:24:44 +0000 (13:24 +0000)
Makefile.am
include/darwin_specific.h
modules/codec/spudec/spudec.c

index 11b89d6214d65cb46305018a6d022c95459d7b4e..6fffb5a0f860cd601eea8507ca6ab2ac37ee9bca 100644 (file)
@@ -471,7 +471,7 @@ vlc.app: vlc $(PLUGIN_FILES)
                $(INSTALL) $$i vlc.app/Contents/MacOS/modules/ ; \
        fi ; done
        $(INSTALL) -d vlc.app/Contents/MacOS/share
-       $(INSTALL) -m 644 share/*.psf vlc.app/Contents/MacOS/share
+       $(INSTALL) -m 644 share/*.psf share/*.rle vlc.app/Contents/MacOS/share
        $(INSTALL) -d vlc.app/Contents/MacOS/locale
        for i in $(CATALOGS); do \
                mkdir -p vlc.app/Contents/MacOS/locale/$${i%.gmo}/LC_MESSAGES ; \
index 2f6bef3d74fef1abbe1799a5433151f4aef1edb0..eb75a9c2e6d29c4402c2e824e0de4c1f3ed016e3 100644 (file)
@@ -2,7 +2,7 @@
  * darwin_specific.h: Darwin specific features 
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: darwin_specific.h,v 1.5 2002/07/05 11:18:56 sam Exp $
+ * $Id: darwin_specific.h,v 1.6 2003/01/18 13:24:44 massiot Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -24,4 +24,4 @@
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
-char  * system_GetProgramPath( void );
+VLC_EXPORT( char  *, system_GetProgramPath, ( void ) );
index 2670506ceff229ffc24e1ba5cf57f09d40b17674..c8d94e33c68125dc3aa4fed02769890f6fc0a2f7 100644 (file)
@@ -2,7 +2,7 @@
  * spudec.c : SPU decoder thread
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: spudec.c,v 1.9 2002/12/02 21:13:25 jlj Exp $
+ * $Id: spudec.c,v 1.10 2003/01/18 13:24:44 massiot Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -49,10 +49,17 @@ static void EndThread     ( spudec_thread_t * );
     "When the subtitles are coded in text form then, you can choose " \
     "which font will be used to display them.")
 
+#define DEFAULT_FONT "font-eutopiabold36.rle"
+
 vlc_module_begin();
     add_category_hint( N_("subtitles"), NULL );
-    add_file( "spudec-font", "./share/font-eutopiabold36.rle", NULL,
+#ifndef SYS_DARWIN
+    add_file( "spudec-font", "./share/" DEFAULT_FONT, NULL,
+              FONT_TEXT, FONT_LONGTEXT );
+#else
+    add_file( "spudec-font", NULL, NULL,
               FONT_TEXT, FONT_LONGTEXT );
+#endif
     set_description( _("subtitles decoder module") );
     set_capability( "decoder", 50 );
     set_callbacks( OpenDecoder, NULL );
@@ -118,6 +125,15 @@ static int RunDecoder( decoder_fifo_t * p_fifo )
     {
         /* Here we are dealing with text subtitles */
 
+#ifdef SYS_DARWIN
+        if ( (psz_font = config_GetPsz( p_fifo, "spudec-font" )) == NULL )
+        {
+            char * psz_vlcpath = system_GetProgramPath();
+            psz_font = malloc( strlen(psz_vlcpath) + strlen("/share/")
+                                + strlen(DEFAULT_FONT) + 1 );
+            sprintf(psz_font, "%s/share/" DEFAULT_FONT, psz_vlcpath);
+        }
+#else
         if( (psz_font = config_GetPsz( p_fifo, "spudec-font" )) == NULL )
         {
             msg_Err( p_fifo, "no default font selected" );
@@ -125,6 +141,7 @@ static int RunDecoder( decoder_fifo_t * p_fifo )
             p_spudec->p_fifo->b_error;
         }
         else
+#endif
         {
             p_font = E_(subtitler_LoadFont)( p_spudec->p_vout, psz_font );
             if ( p_font == NULL )