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
15 16 17 18 19 |
# File 'lib/prawn/emoji/substitution.rb', line 15 def initialize(document) @document = document @font = document.font @font_size = document.font_size end |
Instance Method Details
#to_s ⇒ Object
21 22 23 |
# File 'lib/prawn/emoji/substitution.rb', line 21 def to_s emoji_width == full_size_space_width ? FULL_SIZE_SPACE : half_size_spaces end |