Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'

This commit is contained in:
Bjørn Erik Pedersen
2025-04-10 13:04:51 +02:00
987 changed files with 12379 additions and 14083 deletions

View File

@@ -3,14 +3,11 @@ title: images.Text
description: Returns an image filter that adds text to an image.
categories: []
keywords: []
action:
aliases: []
related:
- functions/images/Filter
- methods/resource/Filter
returnType: images.filter
signatures: ['images.Text TEXT [OPTIONS]']
toc: true
params:
functions_and_methods:
aliases: []
returnType: images.filter
signatures: ['images.Text TEXT [OPTIONS]']
---
## Options
@@ -18,7 +15,7 @@ toc: true
Although none of the options are required, at a minimum you will want to set the `size` to be some reasonable percentage of the image height.
alignx
{{< new-in 0.141.0 />}}
: {{< new-in 0.141.0 />}}
: (`string`) The horizontal alignment of the text relative to the horizontal offset, one of `left`, `center`, or `right`. Default is `left`.
color
@@ -27,8 +24,6 @@ color
font
: (`resource.Resource`) The font can be a [global resource](g), a [page resource](g), or a [remote resource](g). Default is [Go Regular], a proportional sans-serif TrueType font.
[Go Regular]: https://go.dev/blog/go-fonts#sans-serif
linespacing
: (`int`) The number of pixels between each line. For a line height of 1.4, set the `linespacing` to 0.4 multiplied by the `size`. Default is `2`.
@@ -41,6 +36,8 @@ x
y
: (`int`) The vertical offset, in pixels, relative to the top of the image. Default is `10`.
[Go Regular]: https://go.dev/blog/go-fonts#sans-serif
## Usage
Set the text and paths: