Commit e32bee08 authored by Laurent Aimar's avatar Laurent Aimar

Try to parse unrecognized color names as hexadecimal value (freetype).

They should be prefixed by '#' but it is not always done...
parent 570c1946
......@@ -1212,6 +1212,11 @@ static int HandleFontAttributes( xml_reader_t *p_xml_reader,
}
else
{
char *end;
uint32_t i_value = strtol( value, &end, 16 );
if( *end == '\0' || *end == ' ' )
i_font_color = i_value & 0x00ffffff;
for( int i = 0; p_html_colors[i].psz_name != NULL; i++ )
{
if( !strncasecmp( value, p_html_colors[i].psz_name, strlen(p_html_colors[i].psz_name) ) )
......
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