diff options
author | Paul van Brouwershaven <vanbroup@users.noreply.github.com> | 2021-12-07 11:29:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-07 11:29:55 +0100 |
commit | 283394a4fde14476db576a15b7bcc472d693d76f (patch) | |
tree | 6d3ed28edfaecb0ec70fedad4eba397a309a4c0b /resources/image_test.go | |
parent | 5538507e9053a00faa358b92ad0bb004e8d28daf (diff) | |
download | hugo-283394a4fde14476db576a15b7bcc472d693d76f.tar.gz hugo-283394a4fde14476db576a15b7bcc472d693d76f.zip |
images: Text filter that draws text with the given options (#9239)
Fixes #9238
Diffstat (limited to 'resources/image_test.go')
-rw-r--r-- | resources/image_test.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/resources/image_test.go b/resources/image_test.go index 911e50f6f..c2a5ee902 100644 --- a/resources/image_test.go +++ b/resources/image_test.go @@ -674,6 +674,9 @@ func TestImageOperationsGolden(t *testing.T) { f.Hue(22), f.Contrast(32.5), f.Overlay(gopher.(images.ImageSource), 20, 30), + f.Text("No options"), + f.Text("This long text is to test line breaks. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."), + f.Text("Hugo rocks!", map[string]interface{}{"x": 30, "y": 30, "size": 15, "color": "#ff0000"}), } resized, err := orig.Fill("400x200 center") |