From eb2e5cb414716a9f659da7821b71703ceccd844d Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 29 Dec 2020 10:48:07 -0800 Subject: [PATCH] spv-css-parser: Parse text color also. --- src/output/spv/spv-css-parser.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/output/spv/spv-css-parser.c b/src/output/spv/spv-css-parser.c index 19b0b4715f..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"); @@ -128,7 +135,7 @@ css_decode_key_value (const char *key, const char *value, else if (!strcmp (key, "font-size")) font->size = atoi (value) * 3 / 4; - /* fg_color, bg_color */ + /* bg_color */ } -- 2.30.2