We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thank you for the great package. I try to study it and make some multi-line text, but it seems I cannot make it work. This is my code:
func main() { text := "Hello, World! \nHello, World! \nHello, World!" // const S = 1024 const W, H = 1024, 1024 dc := gg.NewContext(W, H) dc.SetRGB(1, 1, 1) dc.Clear() dc.SetRGB(0, 0, 0) if err := dc.LoadFontFace("/home/oem/Downloads/Verdana.ttf", 39); err != nil { panic(err) } dc.DrawStringAnchored(text, W/2, H/2, 0.5, 0.5) dc.SavePNG("out.png") }
And this is the result:
I also tried for example:
text := `Hello, World! Hello, World! Hello, World! `
but the result is the same. Is there any other way that I don't know of? Thank you!
The text was updated successfully, but these errors were encountered:
you can use dc.DrawStringWrapped
Sorry, something went wrong.
No branches or pull requests
Thank you for the great package. I try to study it and make some multi-line text, but it seems I cannot make it work. This is my code:
And this is the result:
I also tried for example:
but the result is the same. Is there any other way that I don't know of? Thank you!
The text was updated successfully, but these errors were encountered: