class InvoicePrinter::Fonts
Only Regular and Bold versions are used in the template and therefore provided in the invoice_printer_fonts gem.
Constants
- ASSETS_PATH
Public Class Methods
opensans()
click to toggle source
# 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
overpass()
click to toggle source
# 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
paths_for(font_name)
click to toggle source
# 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
roboto()
click to toggle source
# 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