Module: Prawn::Emoji::Drawable

Defined in:
lib/prawn/emoji/drawable.rb

Instance Method Summary collapse

Instance Method Details

#draw_text!(text, options) ⇒ Object

Additional Options

:emoji

boolean. Whether or not to draw an emoji [true]


10
11
12
13
14
15
16
17
18
# File 'lib/prawn/emoji/drawable.rb', line 10

def draw_text!(text, options)
  draw_emoji = options.delete(:emoji) { true }

  if draw_emoji && Emoji::Drawer.drawable?(text)
    emoji_drawer.draw(text.to_s, options)
  else
    super
  end
end