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
23 24 25 |
# File 'lib/fontisan/variation/tuple_variation_header.rb', line 23 def (tuple_index & EMBEDDED_PEAK_TUPLE) != 0 end |
#intermediate_region? ⇒ Boolean
Check if tuple has intermediate region
30 31 32 |
# File 'lib/fontisan/variation/tuple_variation_header.rb', line 30 def intermediate_region? (tuple_index & INTERMEDIATE_REGION) != 0 end |
#private_point_numbers? ⇒ Boolean
Check if tuple has private point numbers
37 38 39 |
# File 'lib/fontisan/variation/tuple_variation_header.rb', line 37 def private_point_numbers? (tuple_index & PRIVATE_POINT_NUMBERS) != 0 end |
#shared_tuple_index ⇒ Integer
Get shared tuple index
44 45 46 |
# File 'lib/fontisan/variation/tuple_variation_header.rb', line 44 def shared_tuple_index tuple_index & TUPLE_INDEX_MASK end |