]> git.sesse.net Git - vlc/commitdiff
Add a mono font name to the text_style_t
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 9 Sep 2013 09:32:47 +0000 (11:32 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 9 Sep 2013 15:09:34 +0000 (17:09 +0200)
include/vlc_text_style.h
src/misc/text_style.c

index 531411ae607308ad632cd90c63bd70756ebb51df..722387abc91567054ceb9d54224b8150754f5844 100644 (file)
@@ -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) */
index 26606f907f09b9e7c0b93e1ef3ed3d6a459bc1ef..2763a25118ddb74487f22bbff95a7178d5697810 100644 (file)
@@ -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 );
 }