[vlc-commits] libass: add android default font
Sébastien Toque
git at videolan.org
Thu May 31 01:22:00 CEST 2012
vlc | branch: master | Sébastien Toque <xilasz at gmail.com> | Wed May 30 21:07:30 2012 +0200| [047af27e19d18ce2a1fa2212301d67fb21d5a23f] | committer: Jean-Baptiste Kempf
libass: add android default font
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=047af27e19d18ce2a1fa2212301d67fb21d5a23f
---
modules/codec/libass.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/codec/libass.c b/modules/codec/libass.c
index 97fd6ea..d5444ca 100644
--- a/modules/codec/libass.c
+++ b/modules/codec/libass.c
@@ -210,8 +210,13 @@ static int Create( vlc_object_t *p_this )
ass_set_font_scale( p_renderer, 1.0 );
ass_set_line_spacing( p_renderer, 0.0 );
+#if defined( __ANDROID__ )
+ const char *psz_font = "/system/fonts/DroidSans-Bold.ttf";
+ const char *psz_family = "Droid Sans Bold";
+#else
const char *psz_font = NULL; /* We don't ship a default font with VLC */
const char *psz_family = "Arial"; /* Use Arial if we can't find anything more suitable */
+#endif
#ifdef HAVE_FONTCONFIG
#if defined(WIN32)
More information about the vlc-commits
mailing list