Class: Preflight::Rules::NoProprietaryFonts

Inherits:
Object
  • Object
show all
Defined in:
lib/preflight/rules/no_proprietary_fonts.rb

Overview

check a file has no proprietary fonts. They look nice, but we can’t print the damn things.

Instance Method Summary collapse

Instance Method Details

#messages(ohash) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/preflight/rules/no_proprietary_fonts.rb', line 13

def messages(ohash)
  array = []
  ohash.each do |key, obj|
    next unless obj.is_a?(::Hash) && obj[:Type] == :Font
    if proprietary?(ohash, obj[:FontDescriptor])
      array << "Font #{obj[:BaseFont]} is proprietary"
    end
  end
  array
end