Text represents a string drawn onto the screen, as used by the `TextShader`.
| 332 | |
| 333 | // Text represents a string drawn onto the screen, as used by the `TextShader`. |
| 334 | type 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. |
| 351 | func (t Text) Texture() *gl.Texture { return nil } |
nothing calls this directly
no outgoing calls
no test coverage detected