commit dc35bce657ad0e3c0179e0a43430e268c5a1aa69 Author: The Stranjer <791672+TheStranjer@users.noreply.github.com> Date: Thu Jun 13 17:42:18 2019 -0400 Initial commit diff --git a/VTCGoblinHand.ttf b/VTCGoblinHand.ttf new file mode 100644 index 0000000..c125caf Binary files /dev/null and b/VTCGoblinHand.ttf differ diff --git a/VTCGoblinHandBold.ttf b/VTCGoblinHandBold.ttf new file mode 100644 index 0000000..207e1f9 Binary files /dev/null and b/VTCGoblinHandBold.ttf differ diff --git a/VTCGoblinHandItalic.ttf b/VTCGoblinHandItalic.ttf new file mode 100644 index 0000000..1e535e2 Binary files /dev/null and b/VTCGoblinHandItalic.ttf differ diff --git a/VTCGoblinHandSC.ttf b/VTCGoblinHandSC.ttf new file mode 100644 index 0000000..55c1bc8 Binary files /dev/null and b/VTCGoblinHandSC.ttf differ diff --git a/abess.ttf b/abess.ttf new file mode 100644 index 0000000..999eda1 Binary files /dev/null and b/abess.ttf differ diff --git a/compmalf.ttf b/compmalf.ttf new file mode 100644 index 0000000..bb182f4 Binary files /dev/null and b/compmalf.ttf differ diff --git a/cover.png b/cover.png new file mode 100644 index 0000000..86541d6 Binary files /dev/null and b/cover.png differ diff --git a/cover.xcf b/cover.xcf new file mode 100644 index 0000000..c9ca244 Binary files /dev/null and b/cover.xcf differ diff --git a/goudy-bold.ttf b/goudy-bold.ttf new file mode 100644 index 0000000..4cff355 Binary files /dev/null and b/goudy-bold.ttf differ diff --git a/goudy-italic.ttf b/goudy-italic.ttf new file mode 100644 index 0000000..bad9134 Binary files /dev/null and b/goudy-italic.ttf differ diff --git a/goudy.ttf b/goudy.ttf new file mode 100644 index 0000000..701b8b5 Binary files /dev/null and b/goudy.ttf differ diff --git a/lilith.ttf b/lilith.ttf new file mode 100644 index 0000000..99b6927 Binary files /dev/null and b/lilith.ttf differ diff --git a/ultramarines.ttf b/ultramarines.ttf new file mode 100644 index 0000000..c8295dd Binary files /dev/null and b/ultramarines.ttf differ diff --git a/unispace rg.ttf b/unispace rg.ttf new file mode 100644 index 0000000..66284c3 Binary files /dev/null and b/unispace rg.ttf differ diff --git a/writeup.pdf b/writeup.pdf new file mode 100644 index 0000000..fe11512 Binary files /dev/null and b/writeup.pdf differ diff --git a/writeup.rb b/writeup.rb new file mode 100644 index 0000000..e91ac77 --- /dev/null +++ b/writeup.rb @@ -0,0 +1,104 @@ +require "prawn" +require "prawn/table" +require "pry" + +class Prawn::Document + def background_color(color) + tmp_color = fill_color + canvas do + fill_color color + fill_rectangle [bounds.left, bounds.top], bounds.right, bounds.top + end + fill_color tmp_color + end +end + +class Awakened2069 + FONT_SIZE_CHAPTER = 48 + FONT_SIZE_BODY = 10 + + attr_accessor :pdf, :chapter_title + + def start_chapter(chapter_name) + @chapter_title = chapter_name + puts "Starting #{chapter_title}" + + pdf.start_new_page + + pdf.outline.update do + puts "\tAdding #{@awakened2069.chapter_title} on page #{page_number}" + section(@chapter_title, :destination => page_number) + end + + puts "\tSetting font size" + pdf.font_size Awakened2069::FONT_SIZE_CHAPTER + pdf.font "Abess" + puts "\tPrinting chapter to document" + pdf.text chapter_title, :align => :center + + puts "\tRestoring body text" + pdf.font "Goudy" + pdf.font_size FONT_SIZE_BODY + end + + + def generate + @pdf = Prawn::Document.new(:margin => 0) + pdf.font_families.update( + "Goudy" => { + :normal => "goudy.ttf", + :bold => "goudy-bold.ttf", + :italic => "goudy-italic.ttf" + }, + "Abess" => { + :normal => "abess.ttf" + }, + "Lilith" => { + :normal => "lilith.ttf" + }, + "Goblin Hand" => { + :normal => "VTCGoblinHand.ttf", + :bold => "VTCGoblinHandBold.ttf", + :italic => "VTCGoblinHandItalic.ttf" + }, + "Ultramarines" => { + :normal => "ultramarines.ttf" + }, + "Unispace" => { + :normal => "unispace rg.ttf" + } + ) + + pdf.outline.instance_variable_set(:@awakened2069, self) + + pdf.image("cover.png", :width => 612, :height => 792) + + pdf.start_new_page(:margin => 50) + + pdf.font "Ultramarines" + pdf.font_size 72 + pdf.text "Awakened 2069", :align => :center + + pdf.font "Goudy" + pdf.font_size 36 + pdf.text "\nGuide To The Mage: the Awakening, Second Edition Game On Discord. \n\nInvite Code:", :align => :center + + pdf.font "Unispace" + pdf.text "25MpfjP", :align => :center + + pdf.font "Goudy" + + pdf.font_size 24 + pdf.text "\n\nAll content in this manual is inspired by the Storyteller and the players", :align => :center + + start_chapter "Introduction" + + + + pdf.render_file("writeup.pdf") + end +end + + +awakened2069 = Awakened2069.new +awakened2069.generate \ No newline at end of file