Merge pull request #3325 from betagouv/fix-3324

[Fix #3324] Change font and justify text in attestation
This commit is contained in:
Mathieu Magnin 2019-01-24 16:52:15 +01:00 committed by GitHub
commit 715bb96b86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,8 +1,7 @@
require 'prawn/measurement_extensions' require 'prawn/measurement_extensions'
prawn_document(margin: [50, 100, 20, 100]) do |pdf| prawn_document(margin: [50, 100, 20, 100]) do |pdf|
pdf.font_families.update( 'open sans' => { normal: './lib/prawn/fonts/OpenSans-Regular.ttf' }) pdf.font 'Times-Roman'
pdf.font 'open sans'
grey = '555555' grey = '555555'
black = '333333' black = '333333'
@ -21,7 +20,7 @@ prawn_document(margin: [50, 100, 20, 100]) do |pdf|
pdf.pad_top(40) { pdf.text @title, size: 18, character_spacing: -0.2 } pdf.pad_top(40) { pdf.text @title, size: 18, character_spacing: -0.2 }
pdf.fill_color grey pdf.fill_color grey
pdf.pad_top(30) { pdf.text @body, size: 10, character_spacing: -0.2 } pdf.pad_top(30) { pdf.text @body, size: 10, character_spacing: -0.2, align: :justify }
if @signature.present? if @signature.present?
pdf.pad_top(40) do pdf.pad_top(40) do