Class: HexaPDF::Font::Type1::CharacterMetrics
- Inherits:
-
Object
- Object
- HexaPDF::Font::Type1::CharacterMetrics
- Defined in:
- lib/hexapdf/font/type1/character_metrics.rb
Overview
Represents the character metrics for an individual character.
Instance Attribute Summary collapse
-
#bbox ⇒ Object
Character bounding box as array of four numbers, specifying the x- and y-coordinates of the lower-left corner and the x- and y-coordinates of the upper-right corner.
-
#code ⇒ Object
Decimal value of the default character code (-1 if not encoded).
-
#ligatures ⇒ Object
Mapping of possible ligatures.
-
#name ⇒ Object
PostScript language character name.
-
#width ⇒ Object
Character width in x-direction (y-direction is implicitly 0).
Instance Method Summary collapse
-
#initialize ⇒ CharacterMetrics
constructor
:nodoc:.
Constructor Details
#initialize ⇒ CharacterMetrics
:nodoc:
59 60 61 |
# File 'lib/hexapdf/font/type1/character_metrics.rb', line 59 def initialize #:nodoc: @ligatures = {} end |
Instance Attribute Details
#bbox ⇒ Object
Character bounding box as array of four numbers, specifying the x- and y-coordinates of the lower-left corner and the x- and y-coordinates of the upper-right corner.
52 53 54 |
# File 'lib/hexapdf/font/type1/character_metrics.rb', line 52 def bbox @bbox end |
#code ⇒ Object
Decimal value of the default character code (-1 if not encoded).
42 43 44 |
# File 'lib/hexapdf/font/type1/character_metrics.rb', line 42 def code @code end |
#ligatures ⇒ Object
Mapping of possible ligatures. This character combined with the character specified by a key forms the ligature character stored as value of that key. Both keys and values are character names.
57 58 59 |
# File 'lib/hexapdf/font/type1/character_metrics.rb', line 57 def ligatures @ligatures end |
#name ⇒ Object
PostScript language character name.
48 49 50 |
# File 'lib/hexapdf/font/type1/character_metrics.rb', line 48 def name @name end |
#width ⇒ Object
Character width in x-direction (y-direction is implicitly 0).
45 46 47 |
# File 'lib/hexapdf/font/type1/character_metrics.rb', line 45 def width @width end |