Class: Fontisan::Variation::TupleVariationHeader
- Inherits:
-
Binary::BaseRecord
- Object
- BinData::Record
- Binary::BaseRecord
- Fontisan::Variation::TupleVariationHeader
- Defined in:
- lib/fontisan/variation/tuple_variation_header.rb
Overview
Tuple variation header structure
Used by both gvar and cvar tables to describe variation tuples. Each tuple header contains metadata about peak coordinates, intermediate regions, and point number handling.
Constant Summary collapse
- EMBEDDED_PEAK_TUPLE =
Tuple index flags
0x8000- INTERMEDIATE_REGION =
0x4000- PRIVATE_POINT_NUMBERS =
0x2000- TUPLE_INDEX_MASK =
0x0FFF
Instance Method Summary collapse
-
#embedded_peak_tuple? ⇒ Boolean
Check if tuple has embedded peak coordinates.
-
#intermediate_region? ⇒ Boolean
Check if tuple has intermediate region.
-
#private_point_numbers? ⇒ Boolean
Check if tuple has private point numbers.
-
#shared_tuple_index ⇒ Integer
Get shared tuple index.
Methods inherited from Binary::BaseRecord
Instance Method Details
#embedded_peak_tuple? ⇒ Boolean
Check if tuple has embedded peak coordinates
25 26 27 |
# File 'lib/fontisan/variation/tuple_variation_header.rb', line 25 def (tuple_index & EMBEDDED_PEAK_TUPLE) != 0 end |
#intermediate_region? ⇒ Boolean
Check if tuple has intermediate region
32 33 34 |
# File 'lib/fontisan/variation/tuple_variation_header.rb', line 32 def intermediate_region? (tuple_index & INTERMEDIATE_REGION) != 0 end |
#private_point_numbers? ⇒ Boolean
Check if tuple has private point numbers
39 40 41 |
# File 'lib/fontisan/variation/tuple_variation_header.rb', line 39 def private_point_numbers? (tuple_index & PRIVATE_POINT_NUMBERS) != 0 end |
#shared_tuple_index ⇒ Integer
Get shared tuple index
46 47 48 |
# File 'lib/fontisan/variation/tuple_variation_header.rb', line 46 def shared_tuple_index tuple_index & TUPLE_INDEX_MASK end |