summaryrefslogtreecommitdiffhomepage
path: root/examples/font_example.md
diff options
context:
space:
mode:
authorStefan Daschek <[email protected]>2022-07-09 13:54:28 +0200
committerStefan Daschek <[email protected]>2022-07-09 13:56:28 +0200
commit3703031ef2cc755fac8c7cb5b403170cda76fa67 (patch)
treeb8b792a42706fb82520bbd08cc20e766a61a8e07 /examples/font_example.md
parentc3e6ef1fd5c3e851d75beb755265429b41024a69 (diff)
downloadcaxlsx-3703031ef2cc755fac8c7cb5b403170cda76fa67.tar.gz
caxlsx-3703031ef2cc755fac8c7cb5b403170cda76fa67.zip
Improve font example
Diffstat (limited to 'examples/font_example.md')
-rw-r--r--examples/font_example.md6
1 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'