[vlc-commits] Add a mono font name to the text_style_t
Jean-Baptiste Kempf
git at videolan.org
Mon Sep 9 17:09:50 CEST 2013
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Sep 9 11:32:47 2013 +0200| [d2e1ceb01546030ec2586a514ef49c1d50e47cdb] | committer: Jean-Baptiste Kempf
Add a mono font name to the text_style_t
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d2e1ceb01546030ec2586a514ef49c1d50e47cdb
---
include/vlc_text_style.h | 1 +
src/misc/text_style.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/include/vlc_text_style.h b/include/vlc_text_style.h
index 531411a..722387a 100644
--- a/include/vlc_text_style.h
+++ b/include/vlc_text_style.h
@@ -39,6 +39,7 @@ extern "C" {
typedef struct
{
char * psz_fontname; /**< The name of the font */
+ char * psz_monofontname; /**< The name of the mono font */
int i_font_size; /**< The font size in pixels */
int i_font_color; /**< The color of the text 0xRRGGBB
(native endianness) */
diff --git a/src/misc/text_style.c b/src/misc/text_style.c
index 26606f9..2763a25 100644
--- a/src/misc/text_style.c
+++ b/src/misc/text_style.c
@@ -37,6 +37,7 @@ text_style_t *text_style_New( void )
/* initialize to default text style */
p_style->psz_fontname = NULL;
+ p_style->psz_monofontname = NULL;
p_style->i_font_size = 22;
p_style->i_font_color = 0xffffff;
p_style->i_font_alpha = 0xff;
@@ -67,6 +68,9 @@ text_style_t *text_style_Copy( text_style_t *p_dst, const text_style_t *p_src )
if( p_src->psz_fontname )
p_dst->psz_fontname = strdup( p_src->psz_fontname );
+ if( p_src->psz_monofontname )
+ p_dst->psz_monofontname = strdup( p_src->psz_fontname );
+
return p_dst;
}
@@ -85,6 +89,8 @@ void text_style_Delete( text_style_t *p_style )
{
if( p_style )
free( p_style->psz_fontname );
+ if( p_style )
+ free( p_style->psz_monofontname );
free( p_style );
}
More information about the vlc-commits
mailing list