Image Text Fuser
Image Text Fuser
Try it in the Widget Center
Click this url to try this widget and copy the Pro Config template.
Usage
The widget configuration is specified in JSON format within the config
field:
Parameters
template_path: URL of the base image template.
font: Default font for text (e.g., "Oswald-Regular.ttf").
emoji_source: Source for emoji images. This attribute determines the source of emoji images used in the generated content. Each source provides a different style or set of emoji images. Can be one of the following (default to TwitterEmojiSource):
boxes: An array of text and image box configurations.
Text Box Configuration
Each text box in the boxes
array can have the following properties:
text: Content to be displayed.
position:
[x, y]
coordinates for the top-left corner of the text box.size:
[width, height]
of the text box.font_size: Size of the font in pixels.
font: Specific font for this text box (overrides the default font).
outline_color: Specific the outline color of the text.
color: Color of the text. Can be specified as a hex code (e.g., "
#FF0000
")underline: Whether to add underline for the text (
true/false
).text_align: Horizontal alignment of the text within the text box. Options include
"left", "center", or "right"
.vertical_align: Vertical alignment of the text within the text box. Options include
"top", "center", or "bottom"
.z_index: Determines the stacking order of elements. Higher values are drawn on top of elements with lower values.
emoji_position_offset: A float value used to adjust the vertical position of emojis. The actual offset is calculated by multiplying
emoji_position_offset
with the line height. Positive values move emojis down, while negative values move them up. For example, 0.2 will move emojis down by 20% of the line height, while -0.1 will move emojis up by 10% of the line height.
Image Box Configuration
Each image box in the boxes
array can have the following properties:
image: URL or path of the image to be added.
position: [x, y] coordinates for the top-left corner of the image.
size: [width, height] to which the image should be resized.
rotation: The rotation angle of the image.
Usage
The widget uses the specified template image as a base.
It then overlays text onto this image according to the
boxes
configuration.Text content can be dynamically populated using variables (e.g.,
{{random_text}}
,{{context.user_name}}
).
Input Parameters
config
string
The configuration of the image text fuser
Output Parameters
url
string
The url of the output image
Output Example
Notes
The supported fonts now:
Oswald-Bold.ttf, Oswald-Regular.ttf, KronaOne-Regular.ttf, Caveat-Regular.ttf
Ensure that all specified fonts are available in the system where the widget is running.
The
{{random_text}}
and{{context.user_name}}
placeholders should be replaced with actual values before processing.Adjust text and image box sizes and positions as needed.
When configuring this widget in a pro config, the entire
config
object needs to be written as a single line with proper escape characters. For example:
Last updated