Class: Fontisan::Collection::Reader::Stats
- Inherits:
-
Struct
- Object
- Struct
- Fontisan::Collection::Reader::Stats
- Defined in:
- lib/fontisan/collection/reader/stats.rb
Overview
Snapshot of one face's headline metrics. Pure value object — no methods beyond accessors. Separate file from Fontisan::Collection::Reader so the Stats struct can be referenced without pulling in the full Reader (and its FontLoader dependency).
Instance Attribute Summary collapse
-
#codepoint_count ⇒ Integer
readonly
Count of keys in face's cmap unicode_mappings.
-
#glyph_count ⇒ Integer
readonly
Face's maxp.numGlyphs.
-
#index ⇒ Integer
readonly
0-based face index inside the collection.
-
#sfnt_version ⇒ Integer
readonly
Face sfnt version (0x00010000 for TTF, 0x4F54544F for OTF).
Instance Attribute Details
#codepoint_count ⇒ Integer (readonly)
Returns count of keys in face's cmap unicode_mappings.
19 20 |
# File 'lib/fontisan/collection/reader/stats.rb', line 19 Stats = Struct.new(:index, :glyph_count, :codepoint_count, :sfnt_version, keyword_init: true) |
#glyph_count ⇒ Integer (readonly)
Returns face's maxp.numGlyphs.
19 20 |
# File 'lib/fontisan/collection/reader/stats.rb', line 19 Stats = Struct.new(:index, :glyph_count, :codepoint_count, :sfnt_version, keyword_init: true) |
#index ⇒ Integer (readonly)
Returns 0-based face index inside the collection.
19 20 |
# File 'lib/fontisan/collection/reader/stats.rb', line 19 Stats = Struct.new(:index, :glyph_count, :codepoint_count, :sfnt_version, keyword_init: true) |
#sfnt_version ⇒ Integer (readonly)
Returns face sfnt version (0x00010000 for TTF, 0x4F54544F for OTF).
19 20 |
# File 'lib/fontisan/collection/reader/stats.rb', line 19 Stats = Struct.new(:index, :glyph_count, :codepoint_count, :sfnt_version, keyword_init: true) |