Class: Pdfrb::Font::TrueType::Maxp
- Inherits:
-
Object
- Object
- Pdfrb::Font::TrueType::Maxp
- Defined in:
- lib/pdfrb/font/true_type/maxp.rb
Instance Attribute Summary collapse
-
#max_component_depth ⇒ Object
readonly
Returns the value of attribute max_component_depth.
-
#max_component_elements ⇒ Object
readonly
Returns the value of attribute max_component_elements.
-
#max_composite_contours ⇒ Object
readonly
Returns the value of attribute max_composite_contours.
-
#max_composite_points ⇒ Object
readonly
Returns the value of attribute max_composite_points.
-
#max_contours ⇒ Object
readonly
Returns the value of attribute max_contours.
-
#max_function_defs ⇒ Object
readonly
Returns the value of attribute max_function_defs.
-
#max_instruction_defs ⇒ Object
readonly
Returns the value of attribute max_instruction_defs.
-
#max_points ⇒ Object
readonly
Returns the value of attribute max_points.
-
#max_size_of_instructions ⇒ Object
readonly
Returns the value of attribute max_size_of_instructions.
-
#max_stack_elements ⇒ Object
readonly
Returns the value of attribute max_stack_elements.
-
#max_storage ⇒ Object
readonly
Returns the value of attribute max_storage.
-
#max_twilight_points ⇒ Object
readonly
Returns the value of attribute max_twilight_points.
-
#max_zones ⇒ Object
readonly
Returns the value of attribute max_zones.
-
#num_glyphs ⇒ Object
readonly
Returns the value of attribute num_glyphs.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(data) ⇒ Maxp
constructor
A new instance of Maxp.
Constructor Details
#initialize(data) ⇒ Maxp
Returns a new instance of Maxp.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/pdfrb/font/true_type/maxp.rb', line 14 def initialize(data) return unless data && data.bytesize >= 6 @version = data.bytes[0, 4].pack("C*").unpack1("N") @num_glyphs = u16(data, 4) return unless @version == 0x00010000 && data.bytesize >= 32 @max_points = u16(data, 6) @max_contours = u16(data, 8) @max_composite_points = u16(data, 10) @max_composite_contours = u16(data, 12) @max_zones = u16(data, 14) @max_twilight_points = u16(data, 16) @max_storage = u16(data, 18) @max_function_defs = u16(data, 20) @max_instruction_defs = u16(data, 22) @max_stack_elements = u16(data, 24) @max_size_of_instructions = u16(data, 26) @max_component_elements = u16(data, 28) @max_component_depth = u16(data, 30) end |
Instance Attribute Details
#max_component_depth ⇒ Object (readonly)
Returns the value of attribute max_component_depth.
7 8 9 |
# File 'lib/pdfrb/font/true_type/maxp.rb', line 7 def max_component_depth @max_component_depth end |
#max_component_elements ⇒ Object (readonly)
Returns the value of attribute max_component_elements.
7 8 9 |
# File 'lib/pdfrb/font/true_type/maxp.rb', line 7 def max_component_elements @max_component_elements end |
#max_composite_contours ⇒ Object (readonly)
Returns the value of attribute max_composite_contours.
7 8 9 |
# File 'lib/pdfrb/font/true_type/maxp.rb', line 7 def max_composite_contours @max_composite_contours end |
#max_composite_points ⇒ Object (readonly)
Returns the value of attribute max_composite_points.
7 8 9 |
# File 'lib/pdfrb/font/true_type/maxp.rb', line 7 def max_composite_points @max_composite_points end |
#max_contours ⇒ Object (readonly)
Returns the value of attribute max_contours.
7 8 9 |
# File 'lib/pdfrb/font/true_type/maxp.rb', line 7 def max_contours @max_contours end |
#max_function_defs ⇒ Object (readonly)
Returns the value of attribute max_function_defs.
7 8 9 |
# File 'lib/pdfrb/font/true_type/maxp.rb', line 7 def max_function_defs @max_function_defs end |
#max_instruction_defs ⇒ Object (readonly)
Returns the value of attribute max_instruction_defs.
7 8 9 |
# File 'lib/pdfrb/font/true_type/maxp.rb', line 7 def max_instruction_defs @max_instruction_defs end |
#max_points ⇒ Object (readonly)
Returns the value of attribute max_points.
7 8 9 |
# File 'lib/pdfrb/font/true_type/maxp.rb', line 7 def max_points @max_points end |
#max_size_of_instructions ⇒ Object (readonly)
Returns the value of attribute max_size_of_instructions.
7 8 9 |
# File 'lib/pdfrb/font/true_type/maxp.rb', line 7 def max_size_of_instructions @max_size_of_instructions end |
#max_stack_elements ⇒ Object (readonly)
Returns the value of attribute max_stack_elements.
7 8 9 |
# File 'lib/pdfrb/font/true_type/maxp.rb', line 7 def max_stack_elements @max_stack_elements end |
#max_storage ⇒ Object (readonly)
Returns the value of attribute max_storage.
7 8 9 |
# File 'lib/pdfrb/font/true_type/maxp.rb', line 7 def max_storage @max_storage end |
#max_twilight_points ⇒ Object (readonly)
Returns the value of attribute max_twilight_points.
7 8 9 |
# File 'lib/pdfrb/font/true_type/maxp.rb', line 7 def max_twilight_points @max_twilight_points end |
#max_zones ⇒ Object (readonly)
Returns the value of attribute max_zones.
7 8 9 |
# File 'lib/pdfrb/font/true_type/maxp.rb', line 7 def max_zones @max_zones end |
#num_glyphs ⇒ Object (readonly)
Returns the value of attribute num_glyphs.
7 8 9 |
# File 'lib/pdfrb/font/true_type/maxp.rb', line 7 def num_glyphs @num_glyphs end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
7 8 9 |
# File 'lib/pdfrb/font/true_type/maxp.rb', line 7 def version @version end |