summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/font_example.md6
-rw-r--r--examples/images/font_example.pngbin14235 -> 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
index 34ffe3c1..021f895e 100644
--- a/examples/images/font_example.png
+++ b/examples/images/font_example.png
Binary files differ