struct

SF::Glyph

Inherits Struct / Value / Object

Structure describing a glyph

A glyph is the visual representation of a character.

The SF::Glyph structure provides the information needed to handle the glyph:

  • its coordinates in the font's texture
  • its bounding rectangle
  • the offset to apply to get the starting position of the next glyph

See also: SF::Font

Constructors

new

Default constructor

Source

Instance methods

advance

Offset to move horizontally to the next character

Source
advance=(advance : Number)
Source
bounds

Bounding rectangle of the glyph, in coordinates relative to the baseline

Source
bounds=(bounds : FloatRect)
Source
dup

Returns a shallow copy of this object.

Because Value is a value type, this method returns self, which already involves a shallow copy of this object because value types are passed by value.

Source
texture_rect

Texture coordinates of the glyph inside the font's texture

Source
texture_rect=(texture_rect : IntRect)
Source