Exception: Prawn::Fonts::TTF::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/prawn/fonts/ttf.rb

Overview

TrueType font error.

Direct Known Subclasses

NoPostscriptName, NoUnicodeCMap

Instance Method Summary collapse

Constructor Details

#initialize(message = DEFAULT_MESSAGE, font: nil) ⇒ Error

Returns a new instance of Error.



28
29
30
31
32
33
34
# File 'lib/prawn/fonts/ttf.rb', line 28

def initialize(message = DEFAULT_MESSAGE, font: nil)
  if font && message == DEFAULT_MESSAGE
    super(format(MESSAGE_WITH_FONT, font: font))
  else
    super(message)
  end
end