Class: Preflight::Rules::NoFontSubsets
- Inherits:
-
Object
- Object
- Preflight::Rules::NoFontSubsets
- Defined in:
- lib/preflight/rules/no_font_subsets.rb
Overview
check a file has no font subsets. Subsets are handy and valid in standards like PDFX/1a, but they make it hard to edit a file
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.rule_type ⇒ Object
12 13 14 |
# File 'lib/preflight/rules/no_font_subsets.rb', line 12 def self.rule_type :hash end |
Instance Method Details
#messages(ohash) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/preflight/rules/no_font_subsets.rb', line 16 def (ohash) array = [] ohash.each do |key, obj| next unless obj.is_a?(::Hash) && obj[:Type] == :Font if subset?(obj) array << "Font #{obj[:BaseFont]} is a partial subset" end end array end |