MCPcopy
hub / github.com/EngoEngine/engo / Text

Struct Text

common/font.go:334–348  ·  view source on GitHub ↗

Text represents a string drawn onto the screen, as used by the `TextShader`.

Source from the content-addressed store, hash-verified

332
333// Text represents a string drawn onto the screen, as used by the `TextShader`.
334type Text struct {
335 // Font is the reference to the font you're using to render this. This includes the color, as well as the font size.
336 Font *Font
337 // Text is the actual text you want to draw. This may include newlines (\n).
338 Text string
339 // LineSpacing is the amount of additional spacing there is between the lines (when `Text` consists of multiple lines),
340 // relative to the `Size` of the `Font`.
341 LineSpacing float32
342 // LetterSpacing is the amount of additional spacing there is between the characters, relative to the `Size` of
343 // the `Font`.
344 LetterSpacing float32
345 // RightToLeft is an experimental variable used to indicate that subsequent characters come to the left of the
346 // previous character.
347 RightToLeft bool
348}
349
350// Texture returns nil because the Text is generated from a FontAtlas. This implements the common.Drawable interface.
351func (t Text) Texture() *gl.Texture { return nil }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected