Formatting updates

This commit is contained in:
The Stranjer 2019-05-27 15:20:48 -04:00
parent 6c7bb2ff2e
commit e1ce011557
2 changed files with 16 additions and 16 deletions

View File

@ -10,7 +10,7 @@ class BookOfFaces
FONT_SIZE_CHAPTER = 48
FONT_SIZE_SECTION = 24
FONT_SIZE_SUBSECTION = 18
FONT_SIZE_BODY = 12
FONT_SIZE_BODY = 10
attr_accessor :pdf, :number_name, :chapter_name, :chapter_title, :section_name, :spells
@ -91,7 +91,7 @@ class BookOfFaces
puts "Creating PDF object..."
@pdf = Prawn::Document.new(:margin => 0)
pdf.default_leading 10
pdf.default_leading 5
pdf.font_families.update(
"Goudy" => {
@ -167,21 +167,21 @@ class BookOfFaces
@pdf.outline.section rating_title, :destination => @pdf.page_number
end
pdf.font_size FONT_SIZE_SUBSECTION
pdf.font_size FONT_SIZE_SECTION
pdf.text rating_title
rating_spells.sort_by { |spell| spell.name }.each do |spell|
puts "\t\tCompiling #{spell.full_title} by #{spell.authors.join(', ')}"
spell_ary = [{:text => "#{spell.name} (", :font => "Lilith", :color => "004E6D", :size => FONT_SIZE_SECTION}]
spell_ary = [{:text => "#{spell.name} (", :font => "Lilith", :color => "004E6D", :size => FONT_SIZE_SUBSECTION}]
pdf.font_size FONT_SIZE_BODY
spell.arcana.each do |arcanum|
spell_ary << {:text => arcanum.to_s.titleize, :font => "Lilith", :color => "004E6D", :size => FONT_SIZE_SECTION}
spell_ary << {:text => spell.send(arcanum).to_dots, :font => "Goudy", :color => "004E6D", :size => FONT_SIZE_SECTION}
spell_ary << {:text => arcanum.to_s.titleize, :font => "Lilith", :color => "004E6D", :size => FONT_SIZE_SUBSECTION}
spell_ary << {:text => spell.send(arcanum).to_dots, :font => "Goudy", :color => "004E6D", :size => FONT_SIZE_SUBSECTION}
end
spell_ary << {:text => ")", :font => "Lilith", :color => "004E6D", :size => FONT_SIZE_SECTION}
spell_ary << {:text => ")", :font => "Lilith", :color => "004E6D", :size => FONT_SIZE_SUBSECTION}
pdf.formatted_text spell_ary
@ -213,7 +213,6 @@ class BookOfFaces
pdf.text spell.rules_text
spell.reaches.each do |reach|
puts reach.inspect
pdf.formatted_text [
{:text => "+#{reach[0]} Reach: ", :styles => [:bold], :font => "Goudy"},
{:text => reach[1], :font => "Goudy"},
@ -221,6 +220,8 @@ class BookOfFaces
end
end
end
pdf.start_new_page
end
pdf.render_file("book_of_faces.pdf")

View File

@ -15,7 +15,6 @@ class Spell
[1, "Marionette can hijack living supernatural creatures."],
[2, "The shaman takes over direct control over the muscles and nerves of a life form, forcing it to perform whatever physical tasks the Shaman desires for the Duration. If conscious, the subject is fully aware of the fact that their body is acting outside of their control. This may cause Dissonance if the subject is a Sleeper. The willworker cannot have the target perform Social or Mental tasks."]
]
)
spells << Spell.new(