Exception: Fontisan::PartitionCapExceededError

Inherits:
Error
  • Object
show all
Defined in:
lib/fontisan/error.rb

Overview

Partition strategy could not satisfy the requested cap.

Raised by Stitcher::PartitionStrategy when a single Unicode block contains more codepoints than the configured cap, so the partitioner cannot sub-split it further. This is a partitioning-time detection distinct from GlyphLimitExceededError, which fires at compile time after the Stitcher has produced more glyphs than the output format supports. Both surface the same underlying constraint (65,535-glyph cap) but at different stages.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(block_label:, actual:, cap:) ⇒ PartitionCapExceededError

Returns a new instance of PartitionCapExceededError.

Parameters:

  • block_label (String)

    e.g. "CJK_Ext_B", or "plane_N" if the overflow is not attributable to a known block

  • actual (Integer)

    number of codepoints in the block

  • cap (Integer)

    the cap that was exceeded



256
257
258
259
260
261
262
# File 'lib/fontisan/error.rb', line 256

def initialize(block_label:, actual:, cap:)
  @block_label = block_label
  @actual = actual
  @cap = cap
  super("single Unicode block #{block_label} (#{actual} cps) exceeds " \
        "cap #{cap}; cannot sub-split further")
end

Instance Attribute Details

#actualObject (readonly)

Returns the value of attribute actual.



250
251
252
# File 'lib/fontisan/error.rb', line 250

def actual
  @actual
end

#block_labelObject (readonly)

Returns the value of attribute block_label.



250
251
252
# File 'lib/fontisan/error.rb', line 250

def block_label
  @block_label
end

#capObject (readonly)

Returns the value of attribute cap.



250
251
252
# File 'lib/fontisan/error.rb', line 250

def cap
  @cap
end