I'm trying to use ruby to generate a PDF using Prawn on OS X. I have the following:
font 'Arial'
Arial is installed on my Mac. But when I try to generate the PDF, I get the following error:
Prawn::Errors::UnknownFont in ProjectsController#show
Arial is not a known font.
How can I get this common font to work in Prawn? In fact, almost anything other than Helvetica or Times New Roman throws this same error. This is part of a Rails 3.2 app.
If I try to load the font ttf file directly, per Ashish's suggestion below, I get a Bad font family
message:
RuntimeError (Bad font family):
app/pdfs/quote_sheet_pdf.rb:29:in `page_top'
app/pdfs/quote_sheet_pdf.rb:12:in `initialize'
app/controllers/projects_controller.rb:9:in `new'
app/controllers/projects_controller.rb:9:in `block (2 levels) in show'
app/controllers/projects_controller.rb:7:in `show'
config/initializers/quiet_assets.rb:7:in `call_with_quiet_assets'