Skip to content

Instantly share code, notes, and snippets.

@erickpereira
Created December 15, 2014 14:41
Show Gist options
  • Save erickpereira/fee0aa8e307ce7ae628e to your computer and use it in GitHub Desktop.
Save erickpereira/fee0aa8e307ce7ae628e to your computer and use it in GitHub Desktop.
Adição de fonte personalizada no prawn
pdf.font_families.update("trebuchet" => {
:normal => "#{Rails.root}/public/trebuc.ttf",
:bold => "#{Rails.root}/public/trebuc_bold.ttf",
:italic => "#{Rails.root}/public/trebuc_italic.ttf"
})
pdf.font_families.update("arial" => {
:normal => "#{Rails.root}/public/arial.ttf",
:bold => "#{Rails.root}/public/arial_negrito.ttf",
:italic => "#{Rails.root}/public/arial_italico.ttf"
})
pdf.font("trebuchet")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment