How to add a simple text label to an image in Go?
The golang.org/x/image/font package just defines interfaces for font faces and drawing text on images. You may use the Go implementation of Freetype font rasterizer: github.com/golang/freetype. The key type is freetype.Context, it has all the methods you need. For a complete example, check out this file: example/freetype/main.go. This example loads a font file, creates and configures … Read more