#include <vlc_input.h>
#include <vlc_strings.h>
#include <vlc_dialog.h>
+#include <vlc_memory.h>
#include <math.h>
#include <errno.h>
#elif defined( WIN32 )
#define DEFAULT_FONT "" /* Default font found at run-time */
#define FC_DEFAULT_FONT "Arial"
+#elif defined( HAVE_MAEMO )
+#define DEFAULT_FONT "/usr/share/fonts/nokia/nosnb.ttf"
+#define FC_DEFAULT_FONT "Nokia Sans Bold"
#else
#define DEFAULT_FONT "/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf"
#define FC_DEFAULT_FONT "Serif Bold"
_("Building font cache"),
_("Please wait while your font cache is rebuilt.\n"
"This should take less than few minutes."), NULL );
- char *path;
- path = (char *)malloc( PATH_MAX + 1 );
+ char *path = xmalloc( PATH_MAX + 1 );
/* Fontconfig doesnt seem to know where windows fonts are with
* current contribs. So just tell default windows font directory
* is the place to search fonts
{
(*pi_runs)++;
+ /* XXX this logic looks somewhat broken */
+
if( *ppp_styles )
{
- *ppp_styles = (ft_style_t **)
- realloc( *ppp_styles, *pi_runs * sizeof( ft_style_t * ) );
+ *ppp_styles = realloc_or_free( *ppp_styles,
+ *pi_runs * sizeof( ft_style_t * ) );
}
else if( *pi_runs == 1 )
{
- *ppp_styles = (ft_style_t **)
- malloc( *pi_runs * sizeof( ft_style_t * ) );
+ *ppp_styles = malloc( *pi_runs * sizeof( ft_style_t * ) );
}
/* We have just malloc'ed this memory successfully -
p_style = NULL;
}
+ /* XXX more iffy logic */
+
if( *ppi_run_lengths )
{
- *ppi_run_lengths = (uint32_t *)
- realloc( *ppi_run_lengths, *pi_runs * sizeof( uint32_t ) );
+ *ppi_run_lengths = realloc_or_free( *ppi_run_lengths,
+ *pi_runs * sizeof( uint32_t ) );
}
else if( *pi_runs == 1 )
{
FcPatternDestroy( p_pat );
return strdup( (const char*)val_s );
}
+#else
+
+static void SetupLine( filter_t *p_filter, const char *psz_text_in,
+ uint32_t **psz_text_out, uint32_t *pi_runs,
+ uint32_t **ppi_run_lengths, ft_style_t ***ppp_styles,
+ ft_style_t *p_style )
+{
+ VLC_UNUSED(p_filter);
+ VLC_UNUSED(psz_text_in);
+ VLC_UNUSED(psz_text_out);
+ VLC_UNUSED(pi_runs);
+ VLC_UNUSED(ppi_run_lengths);
+ VLC_UNUSED(ppp_styles);
+ VLC_UNUSED(p_style);
+}
+
+static ft_style_t *GetStyleFromFontStack( filter_sys_t *p_sys,
+ font_stack_t **p_fonts, bool b_bold, bool b_italic,
+ bool b_uline )
+{
+ VLC_UNUSED(p_sys);
+ VLC_UNUSED(p_fonts);
+ VLC_UNUSED(b_bold);
+ VLC_UNUSED(b_italic);
+ VLC_UNUSED(b_uline);
+ return NULL;
+}
#endif
static void FreeLine( line_desc_t *p_line )