Class: Fontisan::Tables::CblcBitmapSize
- Inherits:
-
Binary::BaseRecord
- Object
- BinData::Record
- Binary::BaseRecord
- Fontisan::Tables::CblcBitmapSize
- Defined in:
- lib/fontisan/tables/cblc_bitmap_size.rb
Overview
BitmapSize record embedded in a CBLC table (48 bytes).
Each BitmapSize describes one bitmap strike: a glyph range rendered
at a specific ppem with a specific bit depth. It points (via
index_subtable_array_offset) at a sequence of IndexSubTableArray
records that further describe how to find the bitmap data for each
glyph in CBDT.
Layout (48 bytes):
uint32 index_subtable_array_offset
uint32 index_tables_size
uint32 number_of_index_subtables
uint32 color_ref
CblcSbitLineMetrics hori (12 bytes)
CblcSbitLineMetrics vert (12 bytes)
uint16 start_glyph_index
uint16 end_glyph_index
uint8 ppem_x
uint8 ppem_y
uint8 bit_depth
int8 flags
Reference: OpenType CBLC spec, "BitmapSize" record.
Instance Method Summary collapse
-
#glyph_range ⇒ Range<Integer>
Glyph ID range covered by this strike.
-
#includes_glyph?(glyph_id) ⇒ Boolean
Whether the strike covers a specific glyph.
-
#ppem ⇒ Integer
Pixels per em, assuming square pixels (the common case).
Methods inherited from Binary::BaseRecord
Instance Method Details
#glyph_range ⇒ Range<Integer>
Glyph ID range covered by this strike.
54 55 56 |
# File 'lib/fontisan/tables/cblc_bitmap_size.rb', line 54 def glyph_range start_glyph_index..end_glyph_index end |
#includes_glyph?(glyph_id) ⇒ Boolean
Whether the strike covers a specific glyph.
62 63 64 |
# File 'lib/fontisan/tables/cblc_bitmap_size.rb', line 62 def includes_glyph?(glyph_id) glyph_range.include?(glyph_id) end |
#ppem ⇒ Integer
Pixels per em, assuming square pixels (the common case).
47 48 49 |
# File 'lib/fontisan/tables/cblc_bitmap_size.rb', line 47 def ppem ppem_x end |