gst/subparse/samiparse.c: Need to map "silver" colour explicitly (#169936).

Original commit message from CVS:
Patch by: Young-Ho Cha <ganadist at chollian net>
* gst/subparse/samiparse.c: (handle_start_font):
Need to map "silver" colour explicitly (#169936).
This commit is contained in:
Young-Ho Cha 2006-05-15 09:41:03 +00:00 committed by Tim-Philipp Müller
parent e0cbb1036c
commit 5fcd152dac
2 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2006-05-15 Tim-Philipp Müller <tim at centricular dot net>
Patch by: Young-Ho Cha <ganadist at chollian net>
* gst/subparse/samiparse.c: (handle_start_font):
Need to map "silver" colour explicitly (#169936).
2006-05-15 Tim-Philipp Müller <tim at centricular dot net>
Patch by: Young-Ho Cha <ganadist at chollian net>

View file

@ -173,6 +173,11 @@ handle_start_font (GstSamiContext * sctx, const xmlChar ** atts)
sharp = "#";
}
}
/* silver colour can be found in many sami files, but X RGB database
* doesn't contain a colour by this name, so map explicitly */
if (!xmlStrncmp ((const xmlChar *) "silver", value, 6)) {
value = (const xmlChar *) "#c0c0c0";
}
g_string_append_printf (sctx->buf, "<span foreground=\"%s%s\">", sharp,
value);
sami_context_push_state (sctx, COLOR_TAG);