Class: InvoicePrinter::Fonts
- Inherits:
-
Object
- Object
- InvoicePrinter::Fonts
- Defined in:
- lib/invoice_printer/fonts.rb
Overview
Only Regular and Bold versions are used in the template and therefore provided in the invoice_printer_fonts gem.
Constant Summary collapse
- ASSETS_PATH =
File.('../../../assets', __FILE__)
Class Method Summary collapse
Class Method Details
permalink .opensans ⇒ Object
[View source]
14 15 16 17 18 19 20 21 |
# File 'lib/invoice_printer/fonts.rb', line 14 def self.opensans { :normal => "#{ASSETS_PATH}/fonts/opensans/OpenSans-Regular.ttf", :italic => "#{ASSETS_PATH}/fonts/opensans/OpenSans-Regular.ttf", :bold => "#{ASSETS_PATH}/fonts/opensans/OpenSans-Bold.ttf", :bold_italic => "#{ASSETS_PATH}/fonts/opensans/OpenSans-Bold.ttf" } end |
permalink .overpass ⇒ Object
[View source]
23 24 25 26 27 28 29 30 |
# File 'lib/invoice_printer/fonts.rb', line 23 def self.overpass { :normal => "#{ASSETS_PATH}/fonts/overpass/Overpass-Regular.ttf", :italic => "#{ASSETS_PATH}/fonts/overpass/Overpass-Regular.ttf", :bold => "#{ASSETS_PATH}/fonts/overpass/Overpass-Bold.ttf", :bold_italic => "#{ASSETS_PATH}/fonts/overpass/Overpass-Bold.ttf" } end |
permalink .paths_for(font_name) ⇒ Object
[View source]
8 9 10 11 12 |
# File 'lib/invoice_printer/fonts.rb', line 8 def self.paths_for(font_name) send(font_name) rescue NoMethodError raise "Not supported font #{font_name}" end |
permalink .roboto ⇒ Object
[View source]
32 33 34 35 36 37 38 39 |
# File 'lib/invoice_printer/fonts.rb', line 32 def self.roboto { :normal => "#{ASSETS_PATH}/fonts/roboto/Roboto-Regular.ttf", :italic => "#{ASSETS_PATH}/fonts/roboto/Roboto-Regular.ttf", :bold => "#{ASSETS_PATH}/fonts/roboto/Roboto-Bold.ttf", :bold_italic => "#{ASSETS_PATH}/fonts/roboto/Roboto-Bold.ttf" } end |