What Fonts are available in Prawn PDF for Rails?

I use prawn (both the prawn gem and prawn_rails gem by Whoops– note it’s an underscore, not a dash) to create pdf’s in my rails app.  You can customize the font to some extent, but here is a list of the available fonts by default that you can use in your prawn pdf:


Courier Helvetica Times-Roman Symbol ZapfDingbats
Courier-Bold Courier-Oblique Courier-BoldOblique
Times-Bold Times-Italic Times-BoldItalic
Helvetica-Bold Helvetica-Oblique Helvetica-BoldOblique

It appears that this is because these are the standard fonts that all pdf readers should be able to read.  I think it’s possible to use other fonts with prawn, but I haven’t yet figured out how to install them. If you know how, let me know in the comments!

Credit here.

Advertisements

One Response to What Fonts are available in Prawn PDF for Rails?

  1. Pingback: Create a PDF with Prawn | How I Learned Ruby on Rails

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: