How to change font-family in prawn-label
Heng1984617 opened this issue · 1 comments
Heng1984617 commented
How to change font-family in prawn-label
larzknoke commented
labels = Prawn::Labels.render(@label.sheets.times, :type => "Sheet") do |pdf, s|
pdf.font_families.update("GillSans" => {
:normal => "#{Rails.root}/app/assets/fonts/gillsans_regular.ttf",
:bold => "#{Rails.root}/app/assets/fonts/gillsans_bold.ttf",
:italic => "#{Rails.root}/app/assets/fonts/gillsans_italic.ttf",
})
pdf.font "GillSans"
pdf.font_size 10
pdf.text "FOO"
end