gst/subparse/samiparse.c: Special-case some more colour names that pango doesn't handle by default. Fixes .

Original commit message from CVS:
Patch by: Young-Ho Cha <ganadist at chollian net>
* gst/subparse/samiparse.c: (handle_start_font):
Special-case some more colour names that pango doesn't handle by
default. Fixes .
This commit is contained in:
Young-Ho Cha 2007-03-21 10:23:11 +00:00 committed by Tim-Philipp Müller
parent 45b6d734ec
commit 77cf4f207c
2 changed files with 24 additions and 2 deletions

View file

@ -1,3 +1,11 @@
2007-03-21 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):
Special-case some more colour names that pango doesn't handle by
default. Fixes #420578.
2007-03-20 Michael Smith <msmith@fluendo.com>
* ext/vorbis/vorbisenc.c: (gst_vorbis_enc_chain):

View file

@ -175,10 +175,24 @@ handle_start_font (GstSamiContext * sctx, const xmlChar ** atts)
sharp = "#";
}
}
/* silver colour can be found in many sami files, but X RGB database
/* some colours can be found in many sami files, but X RGB database
* doesn't contain a colour by this name, so map explicitly */
if (!xmlStrncasecmp ((const xmlChar *) "silver", value, 6)) {
if (!xmlStrncasecmp (value, (const xmlChar *) "aqua", len)) {
value = (const xmlChar *) "#00ffff";
} else if (!xmlStrncasecmp (value, (const xmlChar *) "crimson", len)) {
value = (const xmlChar *) "#dc143c";
} else if (!xmlStrncasecmp (value, (const xmlChar *) "fuchsia", len)) {
value = (const xmlChar *) "#ff00ff";
} else if (!xmlStrncasecmp (value, (const xmlChar *) "indigo", len)) {
value = (const xmlChar *) "#4b0082";
} else if (!xmlStrncasecmp (value, (const xmlChar *) "lime", len)) {
value = (const xmlChar *) "#00ff00";
} else if (!xmlStrncasecmp (value, (const xmlChar *) "olive", len)) {
value = (const xmlChar *) "#808000";
} else if (!xmlStrncasecmp (value, (const xmlChar *) "silver", len)) {
value = (const xmlChar *) "#c0c0c0";
} else if (!xmlStrncasecmp (value, (const xmlChar *) "teal", len)) {
value = (const xmlChar *) "#008080";
}
g_string_append_printf (sctx->buf, " foreground=\"%s%s\"", sharp,
value);