class HexaPDF::Font::InvalidGlyph

Represents an invalid glyph, i.e. a Unicode character that has no representation in the used font.

Attributes

str[R]

The string that could not be represented as a glyph.

Public Class Methods

new(font, str) click to toggle source

Creates a new Glyph object.

# File lib/hexapdf/font/invalid_glyph.rb, line 47
def initialize(font, str)
  @font = font
  @str = str
end

Public Instance Methods

apply_word_spacing?() click to toggle source

Word spacing is never applied for the invalid glyph, so false is returned.

# File lib/hexapdf/font/invalid_glyph.rb, line 68
def apply_word_spacing?
  false
end
id() click to toggle source

Returns the appropriate missing glyph id based on the used font.

# File lib/hexapdf/font/invalid_glyph.rb, line 53
def id
  @font.missing_glyph_id
end
Also aliased as: name
name()
Alias for: id
width()
Alias for: x_min
x_max()
Alias for: x_min
x_min() click to toggle source

Returns 0.

# File lib/hexapdf/font/invalid_glyph.rb, line 59
def x_min
  0
end
Also aliased as: x_max, y_min, y_max, width
y_max()
Alias for: x_min
y_min()
Alias for: x_min