Class: FontMetrics::Metrics

Inherits:
Struct
  • Object
show all
Defined in:
lib/rsyntaxtree/utils.rb

Overview

height is the vertical rhythm (see LINE_HEIGHT_FACTOR), which is what the layout advances by. ink_height and ink_above describe where the glyphs actually are: how tall the marks are, and how far the tallest reaches above the baseline. A box or circle drawn around text needs the latter — sized by the rhythm it would stand a head taller than the letters it encloses.

Instance Attribute Summary collapse

Instance Attribute Details

#heightObject

Returns the value of attribute height

Returns:

  • (Object)

    the current value of height



118
119
120
# File 'lib/rsyntaxtree/utils.rb', line 118

def height
  @height
end

#ink_aboveObject

Returns the value of attribute ink_above

Returns:

  • (Object)

    the current value of ink_above



118
119
120
# File 'lib/rsyntaxtree/utils.rb', line 118

def ink_above
  @ink_above
end

#ink_heightObject

Returns the value of attribute ink_height

Returns:

  • (Object)

    the current value of ink_height



118
119
120
# File 'lib/rsyntaxtree/utils.rb', line 118

def ink_height
  @ink_height
end

#widthObject

Returns the value of attribute width

Returns:

  • (Object)

    the current value of width



118
119
120
# File 'lib/rsyntaxtree/utils.rb', line 118

def width
  @width
end