X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fspv%2Fspv-css-parser.c;h=4eaef8d612ae2e7f185bd7e2341401e76ecff908;hb=e552b78ccafd962fc00c1092bd7e22ed6676d527;hp=c3a7118ccc9c84a393254f94696092a957970145;hpb=50f6ea7d66d03895020891215fb4f55bbf061003;p=pspp diff --git a/src/output/spv/spv-css-parser.c b/src/output/spv/spv-css-parser.c index c3a7118ccc..4eaef8d612 100644 --- a/src/output/spv/spv-css-parser.c +++ b/src/output/spv/spv-css-parser.c @@ -22,6 +22,7 @@ #include #include "libpspp/str.h" +#include "output/options.h" #include "output/pivot-table.h" #include "spv.h" @@ -114,7 +115,13 @@ static void css_decode_key_value (const char *key, const char *value, struct font_style *font) { - if (!strcmp (key, "font-weight")) + if (!strcmp (key, "color")) + { + struct cell_color color; + if (parse_color__ (value, &color)) + font->fg[0] = font->bg[0] = color; + } + else if (!strcmp (key, "font-weight")) font->bold = !strcmp (value, "bold"); else if (!strcmp (key, "font-style")) font->italic = !strcmp (value, "italic"); @@ -126,9 +133,9 @@ css_decode_key_value (const char *key, const char *value, font->typeface = xstrdup (value); } else if (!strcmp (key, "font-size")) - font->size = atoi (value); + font->size = atoi (value) * 3 / 4; - /* fg_color, bg_color */ + /* bg_color */ }