From 3703031ef2cc755fac8c7cb5b403170cda76fa67 Mon Sep 17 00:00:00 2001 From: Stefan Daschek Date: Sat, 9 Jul 2022 13:54:28 +0200 Subject: Improve font example --- examples/font_example.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/font_example.md') diff --git a/examples/font_example.md b/examples/font_example.md index de986ed8..97b905fd 100644 --- a/examples/font_example.md +++ b/examples/font_example.md @@ -1,7 +1,6 @@ ## Description -You could set the font - +This example shows how to use different fonts. (See [custom_styles_example.md](custom_styles_example.md) for more advanced styling.) ## Code @@ -13,9 +12,10 @@ wb = p.workbook s = wb.styles courier = s.add_style font_name: 'Courier' +times = s.add_style font_name: 'Times New Roman' wb.add_worksheet(name: 'Custom Styles') do |sheet| - sheet.add_row ['First', 'Second', 'Third'], style: [nil, courier, nil] + sheet.add_row ['Default Font', 'Courier', 'Times New Roman'], style: [nil, courier, times] end p.serialize 'font_example.xlsx' -- cgit v1.2.3