package main import "github.com/fogleman/gg" func main() { const S = 1024 dc := gg.NewContext(S, S) dc.SetRGB(1, 1, 1) dc.Clear() dc.SetRGB(0, 0, 0) dc.LoadFontFace("/Library/Fonts/Arial.ttf", 96) dc.DrawStringAnchored("Hello, world!", S/2, S/2, 0.5, 0.5) dc.SavePNG("out.png") }