Demonstrates the fix for https://github.com/p-ranav/tabulate/issues/30: font_style can now be applied to borders and corners, not just cell text.
| 5 | // Demonstrates the fix for https://github.com/p-ranav/tabulate/issues/30: |
| 6 | // font_style can now be applied to borders and corners, not just cell text. |
| 7 | int main() { |
| 8 | Table table; |
| 9 | table.add_row(Row_t{"Bold border", "Bold corners"}); |
| 10 | |
| 11 | table.format() |
| 12 | .border_style({FontStyle::bold}) |
| 13 | .corner_style({FontStyle::bold}) |
| 14 | .border_color(Color::cyan) |
| 15 | .corner_color(Color::cyan); |
| 16 | |
| 17 | // A single side can still be styled independently. |
| 18 | table[0][0].format().border_top_style({FontStyle::bold, FontStyle::underline}); |
| 19 | |
| 20 | std::cout << table << std::endl; |
| 21 | } |