Class: Fontisan::Stitcher::PartitionStrategy::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/fontisan/stitcher/partition_strategy/base.rb

Overview

Abstract base. Concrete partitioners (ByPlane, ByBlock, …) implement #call and return a Blueprint.

Direct Known Subclasses

ByPlane

Constant Summary collapse

DEFAULT_CAP =

Default cap: 65,535 − .notdef − safety margin. Matches the Stitcher's own GlyphLimit cap for TTF.

65_484

Instance Method Summary collapse

Instance Method Details

#call(cp_map, cap: DEFAULT_CAP) ⇒ Blueprint

Parameters:

  • cp_map (Hash{Integer=>Object})

    codepoint → donor label

  • cap (Integer) (defaults to: DEFAULT_CAP)

    max codepoints per partition

Returns:

Raises:

  • (NotImplementedError)


16
17
18
19
# File 'lib/fontisan/stitcher/partition_strategy/base.rb', line 16

def call(cp_map, cap: DEFAULT_CAP)
  raise NotImplementedError,
        "#{self.class} must implement #call"
end