Class: Dvi::TypesetCharacter

Inherits:
Object
  • Object
show all
Defined in:
lib/dvi.rb

Overview

TypesetCharacter is a class of typeset characters.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(index, h, v, font) ⇒ TypesetCharacter

Returns a new instance of TypesetCharacter.



43
44
45
46
47
48
# File 'lib/dvi.rb', line 43

def initialize(index, h, v, font)
  @font = font
  @h = h
  @v = v
  @index = index
end

Instance Attribute Details

#fontObject (readonly)

Returns the value of attribute font.



42
43
44
# File 'lib/dvi.rb', line 42

def font
  @font
end

#hObject (readonly)

Returns the value of attribute h.



42
43
44
# File 'lib/dvi.rb', line 42

def h
  @h
end

#indexObject (readonly)

Returns the value of attribute index.



42
43
44
# File 'lib/dvi.rb', line 42

def index
  @index
end

#vObject (readonly)

Returns the value of attribute v.



42
43
44
# File 'lib/dvi.rb', line 42

def v
  @v
end

#widthObject (readonly)

Returns the value of attribute width.



42
43
44
# File 'lib/dvi.rb', line 42

def width
  @width
end

Instance Method Details

#metricObject



50
51
52
# File 'lib/dvi.rb', line 50

def metric
  @font.tfm.char[@index]
end