Class: Fontisan::Audit::Checks::PostCheck
- Inherits:
-
Fontisan::Audit::Check
- Object
- Fontisan::Audit::Check
- Fontisan::Audit::Checks::PostCheck
- Defined in:
- lib/fontisan/audit/checks/post_check.rb
Overview
Validates the 'post' table per the OpenType spec.
Constant Summary collapse
- VALID_VERSIONS =
[1.0, 2.0, 2.5, 3.0, 4.0].freeze
Class Method Summary collapse
Methods inherited from Fontisan::Audit::Check
Class Method Details
.call(font) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/fontisan/audit/checks/post_check.rb', line 12 def self.call(font) return [] unless font.has_table?("post") post = font.table("post") head = font.has_table?("head") ? font.table("head") : nil issues = [] issues.concat(validate_version(post)) issues.concat(validate_italic_angle(post, head)) issues.concat(validate_is_fixed_pitch(post)) issues end |
.code ⇒ Object
24 25 26 |
# File 'lib/fontisan/audit/checks/post_check.rb', line 24 def self.code :ot_post end |