replaced LiberationSerif regular and bold by Marianne, italic by Spectral-Italic
This commit is contained in:
parent
1b767b8250
commit
c3a6f671c8
3 changed files with 17 additions and 17 deletions
|
@ -28,8 +28,8 @@ logo = @attestation[:logo]
|
|||
signature = @attestation[:signature]
|
||||
|
||||
prawn_document(margin: [top_margin, right_margin, bottom_margin, left_margin], page_size: page_size) do |pdf|
|
||||
pdf.font_families.update( 'liberation serif' => { normal: Rails.root.join('lib/prawn/fonts/liberation_serif/LiberationSerif-Regular.ttf' )})
|
||||
pdf.font 'liberation serif'
|
||||
pdf.font_families.update( 'marianne' => { normal: Rails.root.join('lib/prawn/fonts/marianne/marianne-regular.ttf' )})
|
||||
pdf.font 'marianne'
|
||||
|
||||
grey = '555555'
|
||||
black = '333333'
|
||||
|
|
|
@ -27,7 +27,7 @@ def format_in_2_columns(pdf, label)
|
|||
end
|
||||
|
||||
def format_with_checkbox(pdf, label, offset = 0)
|
||||
pdf.font 'liberation serif', size: 12 do
|
||||
pdf.font 'marianne', size: 12 do
|
||||
pdf.stroke_rectangle [0 + offset, pdf.cursor], 10, 10
|
||||
pdf.text_box label, at: [15 + offset, pdf.cursor]
|
||||
end
|
||||
|
@ -71,7 +71,7 @@ def add_identite_etablissement(pdf, libelle)
|
|||
end
|
||||
|
||||
def add_single_line(pdf, libelle, size, style)
|
||||
pdf.font 'liberation serif', style: style, size: size do
|
||||
pdf.font 'marianne', style: style, size: size do
|
||||
pdf.text libelle
|
||||
end
|
||||
end
|
||||
|
@ -175,12 +175,12 @@ def add_champs(pdf, champs)
|
|||
end
|
||||
|
||||
prawn_document(page_size: "A4") do |pdf|
|
||||
pdf.font_families.update( 'liberation serif' => {
|
||||
normal: Rails.root.join('lib/prawn/fonts/liberation_serif/LiberationSerif-Regular.ttf' ),
|
||||
bold: Rails.root.join('lib/prawn/fonts/liberation_serif/LiberationSerif-Bold.ttf' ),
|
||||
italic: Rails.root.join('lib/prawn/fonts/liberation_serif/LiberationSerif-Italic.ttf' ),
|
||||
pdf.font_families.update( 'marianne' => {
|
||||
normal: Rails.root.join('lib/prawn/fonts/marianne/marianne-regular.ttf' ),
|
||||
bold: Rails.root.join('lib/prawn/fonts/marianne/marianne-bold.ttf' ),
|
||||
italic: Rails.root.join('lib/prawn/fonts/spectral/Spectral-Italic.ttf' ),
|
||||
})
|
||||
pdf.font 'liberation serif'
|
||||
pdf.font 'marianne'
|
||||
pdf.svg IO.read("app/assets/images/header/logo-ds-wide.svg"), width: 300, position: :center
|
||||
pdf.move_down(40)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'prawn/measurement_extensions'
|
||||
|
||||
def format_in_2_lines(pdf, label, text)
|
||||
pdf.font 'liberation serif', style: :bold, size: 12 do
|
||||
pdf.font 'marianne', style: :bold, size: 12 do
|
||||
pdf.text label
|
||||
end
|
||||
pdf.text text
|
||||
|
@ -17,7 +17,7 @@ end
|
|||
|
||||
def add_title(pdf, title)
|
||||
title_style = {style: :bold, size: 24}
|
||||
pdf.font 'liberation serif', title_style do
|
||||
pdf.font 'marianne', title_style do
|
||||
pdf.text title
|
||||
end
|
||||
pdf.text "\n"
|
||||
|
@ -83,7 +83,7 @@ def render_single_champ(pdf, champ)
|
|||
when 'Champs::PieceJustificativeChamp'
|
||||
return
|
||||
when 'Champs::HeaderSectionChamp'
|
||||
pdf.font 'liberation serif', style: :bold, size: 18 do
|
||||
pdf.font 'marianne', style: :bold, size: 18 do
|
||||
pdf.text champ.libelle
|
||||
end
|
||||
pdf.text "\n"
|
||||
|
@ -92,7 +92,7 @@ def render_single_champ(pdf, champ)
|
|||
when 'Champs::CarteChamp'
|
||||
format_in_2_lines(pdf, champ.libelle, champ.to_feature_collection.to_json)
|
||||
when 'Champs::SiretChamp'
|
||||
pdf.font 'liberation serif', style: :bold, size: 12 do
|
||||
pdf.font 'marianne', style: :bold, size: 12 do
|
||||
pdf.text champ.libelle
|
||||
end
|
||||
pdf.text " - SIRET: #{champ.to_s}"
|
||||
|
@ -159,11 +159,11 @@ def add_etats_dossier(pdf, dossier)
|
|||
end
|
||||
|
||||
prawn_document(page_size: "A4") do |pdf|
|
||||
pdf.font_families.update( 'liberation serif' => {
|
||||
normal: Rails.root.join('lib/prawn/fonts/liberation_serif/LiberationSerif-Regular.ttf' ),
|
||||
bold: Rails.root.join('lib/prawn/fonts/liberation_serif/LiberationSerif-Bold.ttf' ),
|
||||
pdf.font_families.update( 'marianne' => {
|
||||
normal: Rails.root.join('lib/prawn/fonts/marianne/marianne-regular.ttf' ),
|
||||
bold: Rails.root.join('lib/prawn/fonts/marianne/marianne-bold.ttf' ),
|
||||
})
|
||||
pdf.font 'liberation serif'
|
||||
pdf.font 'marianne'
|
||||
|
||||
pdf.svg IO.read("app/assets/images/header/logo-ds-wide.svg"), width: 300, position: :center
|
||||
pdf.move_down(40)
|
||||
|
|
Loading…
Reference in a new issue