Class: Dvi::TypesetCharacter
- Inherits:
-
Object
- Object
- Dvi::TypesetCharacter
- Defined in:
- lib/dvi.rb
Overview
TypesetCharacter is a class of typeset characters.
Instance Attribute Summary collapse
-
#font ⇒ Object
readonly
Returns the value of attribute font.
-
#h ⇒ Object
readonly
Returns the value of attribute h.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#v ⇒ Object
readonly
Returns the value of attribute v.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(index, h, v, font) ⇒ TypesetCharacter
constructor
A new instance of TypesetCharacter.
- #metric ⇒ Object
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
#font ⇒ Object (readonly)
Returns the value of attribute font.
42 43 44 |
# File 'lib/dvi.rb', line 42 def font @font end |
#h ⇒ Object (readonly)
Returns the value of attribute h.
42 43 44 |
# File 'lib/dvi.rb', line 42 def h @h end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
42 43 44 |
# File 'lib/dvi.rb', line 42 def index @index end |
#v ⇒ Object (readonly)
Returns the value of attribute v.
42 43 44 |
# File 'lib/dvi.rb', line 42 def v @v end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
42 43 44 |
# File 'lib/dvi.rb', line 42 def width @width end |
Instance Method Details
#metric ⇒ Object
50 51 52 |
# File 'lib/dvi.rb', line 50 def metric @font.tfm.char[@index] end |