class Elegant::Typography

Public Class Methods

new(document, options = {}) click to toggle source
# File lib/elegant/typography.rb, line 5
def initialize(document, options = {})
  @document = document
end

Public Instance Methods

set_fonts() click to toggle source

Set the fonts for the document. Fonts are provided via configuration and a 'Fallback' font must be set to be used for special characters. A 'Sans Serif' font is also required for titles and headers.

# File lib/elegant/typography.rb, line 12
def set_fonts
  font_families.update Elegant.configuration.fonts
  fallback_fonts ['Fallback']
end