Class: Fontisan::Stitcher::PartitionStrategy::Blueprint

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

Overview

The result of partitioning a codepoint set: an ordered list of Partitions. Applying a blueprint to a Stitcher declares one subfont per partition.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#partitionsObject

Returns the value of attribute partitions

Returns:

  • (Object)

    the current value of partitions



9
10
11
# File 'lib/fontisan/stitcher/partition_strategy/blueprint.rb', line 9

def partitions
  @partitions
end

Instance Method Details

#apply_to(stitcher) ⇒ Array<Symbol>

Returns names of subfonts declared.

Parameters:

Returns:

  • (Array<Symbol>)

    names of subfonts declared



12
13
14
15
# File 'lib/fontisan/stitcher/partition_strategy/blueprint.rb', line 12

def apply_to(stitcher)
  partitions.each { |p| p.apply_to(stitcher) }
  partitions.map(&:name)
end

#namesArray<Symbol>

Returns:

  • (Array<Symbol>)


18
19
20
# File 'lib/fontisan/stitcher/partition_strategy/blueprint.rb', line 18

def names
  partitions.map(&:name)
end