Class: Prawn::Emoji::Substitution
- Inherits:
-
Object
- Object
- Prawn::Emoji::Substitution
- Extended by:
- Forwardable
- Defined in:
- lib/prawn/emoji/substitution.rb
Constant Summary collapse
- FULL_SIZE_SPACE =
' '.freeze
- HALF_SIZE_SPACE =
Prawn::Text::NBSP
Instance Method Summary collapse
-
#initialize(document) ⇒ Substitution
constructor
A new instance of Substitution.
- #to_s ⇒ Object
Constructor Details
#initialize(document) ⇒ Substitution
Returns a new instance of Substitution.
13 14 15 16 17 |
# File 'lib/prawn/emoji/substitution.rb', line 13 def initialize(document) @document = document @font = document.font @font_size = document.font_size end |
Instance Method Details
#to_s ⇒ Object
19 20 21 |
# File 'lib/prawn/emoji/substitution.rb', line 19 def to_s emoji_width == full_size_space_width ? FULL_SIZE_SPACE : half_size_spaces end |