Text
Last updated
Last updated
Write text to the image.
label
string
Text content.
x
int
X-Coordinate of the top-left corner of the text.
y
int
Y-Coordinate of the top-left corner of the text.
fontPath
string
Filepath of the font.
fontColor
color.Color
Color of the text.
fontSize
float64
Size of the text.
dpi
float64
DPI of the text.
The instance of *imgo.Image
.
package main
import (
"github.com/fishtailstudio/imgo"
"golang.org/x/image/colornames"
"image/color"
)
func main() {
fontPath := "/System/Library/Fonts/Supplemental/Arial.ttf"
imgo.