- .fg = { 0, 0, 0 },
- .bg = { 255, 255, 255 },
- .margin = { [TABLE_HORZ][0] = 8, [TABLE_HORZ][1] = 11,
- [TABLE_VERT][0] = 1, [TABLE_VERT][1] = 1 },
- };
- cell->style = &default_style;
-
- table->klass->get_cell (table, x, y, cell);
+ printf (" alt=");
+ cell_color_dump (&f->fg[1]);
+ putchar ('/');
+ cell_color_dump (&f->bg[1]);
+ }
+ if (f->bold)
+ fputs (" bold", stdout);
+ if (f->italic)
+ fputs (" italic", stdout);
+ if (f->underline)
+ fputs (" underline", stdout);
+}
+
+bool
+font_style_equal (const struct font_style *a, const struct font_style *b)
+{
+ return (a->bold == b->bold
+ && a->italic == b->italic
+ && a->underline == b->underline
+ && a->markup == b->markup
+ && cell_color_equal (&a->fg[0], &b->fg[0])
+ && cell_color_equal (&a->fg[1], &b->fg[1])
+ && cell_color_equal (&a->bg[0], &b->bg[0])
+ && cell_color_equal (&a->bg[1], &b->bg[1])
+ && !strcmp (a->typeface ? a->typeface : "",
+ b->typeface ? b->typeface : "")
+ && a->size == b->size);