Class: Ucode::Glyphs::RealFonts::Block
- Inherits:
-
Struct
- Object
- Struct
- Ucode::Glyphs::RealFonts::Block
- Defined in:
- lib/ucode/glyphs/real_fonts/unicode_17_blocks.rb
Overview
The new blocks introduced by Unicode 17.0 that this audit cares about. Each block carries its explicit assigned-codepoint ranges.
Sources (in priority order):
1. Unicode 17.0 `Blocks.txt` — block name + first/last cp.
2. Per-block code-chart legend on unicode.org — published
assigned-codepoint count.
3. Direct inspection of a known-good font (fontisan audit)
— confirms at least the assigned count when a font has
100% coverage.
Where the chart legend publishes an assigned count but not the exact ranges, we approximate by extending from the block’s first codepoint up to the count. This may mis-attribute a few reserved slots in the middle of a block as “assigned”; the ‘missing_cps` list then over-reports by those slots. Refining to exact ranges is a follow-up once UCD 17.0 text files are integrated into the ucode dataset.
Block names match the verbatim UCD block name (‘Blocks.txt` field 2) — never slugified.
Instance Attribute Summary collapse
-
#assigned_ranges ⇒ Object
Returns the value of attribute assigned_ranges.
-
#first_cp ⇒ Object
Returns the value of attribute first_cp.
-
#last_cp ⇒ Object
Returns the value of attribute last_cp.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
Instance Attribute Details
#assigned_ranges ⇒ Object
Returns the value of attribute assigned_ranges
28 29 30 |
# File 'lib/ucode/glyphs/real_fonts/unicode_17_blocks.rb', line 28 def assigned_ranges @assigned_ranges end |
#first_cp ⇒ Object
Returns the value of attribute first_cp
28 29 30 |
# File 'lib/ucode/glyphs/real_fonts/unicode_17_blocks.rb', line 28 def first_cp @first_cp end |
#last_cp ⇒ Object
Returns the value of attribute last_cp
28 29 30 |
# File 'lib/ucode/glyphs/real_fonts/unicode_17_blocks.rb', line 28 def last_cp @last_cp end |
#name ⇒ Object
Returns the value of attribute name
28 29 30 |
# File 'lib/ucode/glyphs/real_fonts/unicode_17_blocks.rb', line 28 def name @name end |
Instance Method Details
#covers?(codepoint) ⇒ Boolean
30 31 32 |
# File 'lib/ucode/glyphs/real_fonts/unicode_17_blocks.rb', line 30 def covers?(codepoint) codepoint.between?(first_cp, last_cp) end |