From 5fcd152dac53c83cc17cd24c8f60e03c694e14c9 Mon Sep 17 00:00:00 2001 From: Young-Ho Cha Date: Mon, 15 May 2006 09:41:03 +0000 Subject: [PATCH] gst/subparse/samiparse.c: Need to map "silver" colour explicitly (#169936). Original commit message from CVS: Patch by: Young-Ho Cha * gst/subparse/samiparse.c: (handle_start_font): Need to map "silver" colour explicitly (#169936). --- ChangeLog | 7 +++++++ gst/subparse/samiparse.c | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index c8b3ee515b..de81550548 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-05-15 Tim-Philipp Müller + + Patch by: Young-Ho Cha + + * gst/subparse/samiparse.c: (handle_start_font): + Need to map "silver" colour explicitly (#169936). + 2006-05-15 Tim-Philipp Müller Patch by: Young-Ho Cha diff --git a/gst/subparse/samiparse.c b/gst/subparse/samiparse.c index 4068a2713f..f805df9f4a 100644 --- a/gst/subparse/samiparse.c +++ b/gst/subparse/samiparse.c @@ -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, "", sharp, value); sami_context_push_state (sctx, COLOR_TAG);