Exception: HexaPDF::MissingGlyphError

Inherits:
Error
  • Object
show all
Defined in:
lib/hexapdf/error.rb

Overview

Raised when a font wrapper implementation should encode a missing glyph.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(glyph) ⇒ MissingGlyphError

Creates a new MissingGlyphError for the given glyph.



92
93
94
# File 'lib/hexapdf/error.rb', line 92

def initialize(glyph)
  @glyph = glyph
end

Instance Attribute Details

#glyphObject (readonly)

Returns the glyph object that contains the information about the missing glyph.



89
90
91
# File 'lib/hexapdf/error.rb', line 89

def glyph
  @glyph
end

Instance Method Details

#messageObject

:nodoc:



96
97
98
99
100
# File 'lib/hexapdf/error.rb', line 96

def message # :nodoc:
  "No glyph for #{glyph.str.inspect} in font '#{glyph.font_wrapper.wrapped_font.full_name}' " \
    "found. \n\n" \
    "Use the configuration option 'font.on_missing_glyph' to customize missing glyph handling."
end