Commit d2e1ceb0 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Add a mono font name to the text_style_t

parent e7eb86a6
......@@ -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) */
......
......@@ -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 );
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment