Class: Fontisan::Ufo::Component

Inherits:
Object
  • Object
show all
Defined in:
lib/fontisan/ufo/component.rb

Overview

A composite-glyph reference: this glyph draws by transforming another glyph. Used in UFO 3 composites; often the same shape as the OpenType composite-glyph flag set.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(base_glyph:, transformation: nil, identifier: nil) ⇒ Component

Returns a new instance of Component.



11
12
13
14
15
# File 'lib/fontisan/ufo/component.rb', line 11

def initialize(base_glyph:, transformation: nil, identifier: nil)
  @base_glyph = base_glyph.to_s
  @transformation = transformation # Fontisan::Ufo::Transformation or nil
  @identifier = identifier
end

Instance Attribute Details

#base_glyphObject (readonly)

Returns the value of attribute base_glyph.



9
10
11
# File 'lib/fontisan/ufo/component.rb', line 9

def base_glyph
  @base_glyph
end

#identifierObject (readonly)

Returns the value of attribute identifier.



9
10
11
# File 'lib/fontisan/ufo/component.rb', line 9

def identifier
  @identifier
end

#transformationObject (readonly)

Returns the value of attribute transformation.



9
10
11
# File 'lib/fontisan/ufo/component.rb', line 9

def transformation
  @transformation
end