diff options
| author | Stefan Daschek <[email protected]> | 2022-07-09 13:54:28 +0200 |
|---|---|---|
| committer | Stefan Daschek <[email protected]> | 2022-07-09 13:56:28 +0200 |
| commit | 3703031ef2cc755fac8c7cb5b403170cda76fa67 (patch) | |
| tree | b8b792a42706fb82520bbd08cc20e766a61a8e07 /examples | |
| parent | c3e6ef1fd5c3e851d75beb755265429b41024a69 (diff) | |
| download | caxlsx-3703031ef2cc755fac8c7cb5b403170cda76fa67.tar.gz caxlsx-3703031ef2cc755fac8c7cb5b403170cda76fa67.zip | |
Improve font example
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/font_example.md | 6 | ||||
| -rw-r--r-- | examples/images/font_example.png | bin | 14235 -> 71920 bytes |
2 files changed, 3 insertions, 3 deletions
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' diff --git a/examples/images/font_example.png b/examples/images/font_example.png Binary files differindex 34ffe3c1..021f895e 100644 --- a/examples/images/font_example.png +++ b/examples/images/font_example.png |
