Class: Fontisan::Binary::BaseRecord
- Inherits:
-
BinData::Record
- Object
- BinData::Record
- Fontisan::Binary::BaseRecord
- Defined in:
- lib/fontisan/binary/base_record.rb
Overview
Base class for all BinData record definitions
Provides common configuration for OpenType binary structures:
-
Big-endian byte order (OpenType standard)
-
Common helper methods
All table parsers and binary structures should inherit from this class to ensure consistent behavior across the codebase.
Direct Known Subclasses
OffsetTable, TableDirectoryEntry, Tables::Cmap, Tables::Fvar, Tables::Gpos, Tables::Gsub, Tables::Head, Tables::InstanceRecord, Tables::LayoutCommon::Feature, Tables::LayoutCommon::FeatureList, Tables::LayoutCommon::FeatureRecord, Tables::LayoutCommon::LangSys, Tables::LayoutCommon::LangSysRecord, Tables::LayoutCommon::Script, Tables::LayoutCommon::ScriptList, Tables::LayoutCommon::ScriptRecord, Tables::Name, Tables::NameRecord, Tables::Os2, Tables::Post, Tables::VariationAxisRecord
Class Method Summary collapse
-
.read(io) ⇒ Object
Override read to handle nil data gracefully.
Instance Method Summary collapse
-
#valid? ⇒ Boolean
Check if the record is valid.
Class Method Details
.read(io) ⇒ Object
Override read to handle nil data gracefully
25 26 27 28 29 |
# File 'lib/fontisan/binary/base_record.rb', line 25 def self.read(io) return new if io.nil? || (io.respond_to?(:empty?) && io.empty?) super end |
Instance Method Details
#valid? ⇒ Boolean
Check if the record is valid
34 35 36 |
# File 'lib/fontisan/binary/base_record.rb', line 34 def valid? true end |