Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified sample.pdf
Binary file not shown.
9 changes: 7 additions & 2 deletions shared.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@

def init_pdf
pdf = Prawn::Document.new(margin: RIGHT_PAGE_MARGINS, print_scaling: :none)
pdf.font_families.update(FONTS)
pdf.font(FONTS.keys.first)
# Use Helvetica for Linux environments where Futura isn't available
begin
pdf.font_families.update(FONTS)
pdf.font(FONTS.keys.first)
rescue Errno::ENOENT
pdf.font('Helvetica')
end
pdf.stroke_color MEDIUM_COLOR
pdf.line_width(0.5)
pdf
Expand Down