-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdoc.go
24 lines (24 loc) · 872 Bytes
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// etxt is a package for text rendering designed to be used with
// [Ebitengine], a 2D game engine made by Hajime Hoshi for Golang.
//
// To get started, you should create a [Renderer] and set up
// a font and a cache:
//
// text := etxt.NewRenderer()
// text.SetFont(font) // e.g. lbrtsans.Font() from github.com/tinne26/fonts
// text.Utils().SetCache8MiB()
//
// Then, you can further adjust the renderer properties with functions
// like [Renderer.SetColor](), [Renderer.SetSize](), [Renderer.SetAlign](),
// [Renderer.SetScale]() and many others.
//
// Once you have everything configured to your liking, drawing is quite
// straightforward:
//
// text.Draw(canvas, "Hello world!", x, y)
//
// To learn more, make sure to check the [examples]!
//
// [examples]: https://github.com/tinne26/etxt/tree/v0.0.9/examples
// [Ebitengine]: https://ebitengine.org
package etxt