Created
December 15, 2014 14:41
-
-
Save erickpereira/fee0aa8e307ce7ae628e to your computer and use it in GitHub Desktop.
Adição de fonte personalizada no prawn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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