ComfyUI > Nodes > ComfyUI_Anytext > AnyText FontImg

ComfyUI Node: AnyText FontImg

Class Name

UL_AnyTextFontImg

Category
UL Group/Image Generation
Author
zmwv823 (Account age: 3592days)
Extension
ComfyUI_Anytext
Latest Updated
2025-04-07
Github Stars
0.08K

How to Install ComfyUI_Anytext

Install this extension via the ComfyUI Manager by searching for ComfyUI_Anytext
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_Anytext in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

AnyText FontImg Description

Generate customizable text images with various fonts and colors for AI artists to create visually appealing graphics.

AnyText FontImg:

The UL_AnyTextFontImg node is designed to generate images with text rendered in various fonts and colors, providing a versatile tool for AI artists to create visually appealing text-based graphics. This node allows you to input a string of text and customize its appearance by selecting different fonts, colors, and background settings. It is particularly useful for creating artistic text images that can be used in digital art projects, social media graphics, or any creative endeavor that requires text visualization. By leveraging this node, you can easily experiment with different text styles and layouts, enhancing the aesthetic quality of your work without needing extensive technical knowledge.

AnyText FontImg Input Parameters:

font_name

This parameter allows you to select the font for the text. You can choose from a list of available fonts, including an option for automatic download. The default font is "AnyText-Arial-Unicode.ttf". The choice of font significantly impacts the visual style of the text, making it crucial for achieving the desired artistic effect.

pos_mask

The position mask determines where the text will be placed within the image. It is essential for aligning the text correctly and ensuring it fits well within the designated space. Proper use of the position mask can enhance the overall composition of the image.

prompt

The prompt is the text string that you want to render into an image. It supports multiline input, allowing for complex text arrangements. This parameter is the core content of the image, and its clarity and relevance are vital for effective communication through the artwork.

width

This parameter specifies the width of the generated image. It is a required input, ensuring that the text fits within the desired dimensions. The width, along with the height, defines the aspect ratio of the image, which can affect its visual impact.

height

Similar to the width, the height parameter sets the vertical dimension of the image. It is also a required input, and together with the width, it determines the overall size and shape of the image, influencing how the text is perceived.

sort_radio

This boolean parameter controls the order in which text is drawn based on mask position orders. When set to true, text is drawn horizontally; when false, vertically. This setting can be used to create different text flow effects, adding variety to the design.

font_color_name

This parameter allows you to select a color for the text using predefined color names. It provides an intuitive way to choose colors without needing to know specific color codes, making it accessible for users who prefer a more visual approach to color selection.

font_color_code

For those who prefer precise color control, this parameter accepts a string representing the color code. It allows for exact color matching, which is useful for maintaining brand consistency or achieving specific visual effects.

font_color_mode

This boolean parameter lets you choose between using color names or color codes for the text color. It provides flexibility in how colors are specified, catering to both casual users and those with more technical expertise.

bg_color_name

Similar to font_color_name, this parameter allows you to select a background color using predefined names. The default is "transparent", which can be useful for overlaying text on various backgrounds without a solid color block.

bg_color_code

This parameter accepts a string for the background color code, offering precise control over the background color. It is particularly useful when a specific background color is required to match other design elements.

bg_color_mode

This boolean parameter determines whether the background color is specified by name or code. It provides flexibility in how background colors are chosen, accommodating different user preferences and requirements.

font_color_codeR

This integer parameter sets the red component of the text color when using color codes. It ranges from 0 to 255, with a default of 0, allowing for fine-tuning of the text color's red intensity.

font_color_codeG

This integer parameter sets the green component of the text color when using color codes. It ranges from 0 to 255, with a default of 0, enabling precise adjustment of the text color's green intensity.

font_color_codeB

This integer parameter sets the blue component of the text color when using color codes. It ranges from 0 to 255, with a default of 0, allowing for detailed control over the text color's blue intensity.

font_color_codeA

This integer parameter sets the alpha (transparency) component of the text color when using color codes. It ranges from 0 to 255, with a default of 0, providing control over the text's opacity.

seperate_by

This string parameter defines the delimiter used to split the prompt into multiple lines of text. The default is "---", which allows for easy separation of text segments, facilitating complex text layouts.

AnyText FontImg Output Parameters:

font_img

The output of this node is an image with the rendered text, referred to as font_img. This image can be used directly in digital art projects or further processed in other nodes. The quality and style of the output image depend on the input parameters, making it essential to configure them according to the desired outcome.

AnyText FontImg Usage Tips:

  • Experiment with different font and color combinations to find the most visually appealing style for your text.
  • Use the position mask to carefully align text within the image, ensuring it complements other design elements.
  • Adjust the width and height parameters to create images that fit specific aspect ratios or design requirements.

AnyText FontImg Common Errors and Solutions:

Font file not found

  • Explanation: This error occurs when the specified font file cannot be located in the fonts directory.
  • Solution: Ensure that the font file exists in the correct directory and that the font name is spelled correctly.

Invalid color code

  • Explanation: This error arises when an incorrect color code is provided for the text or background.
  • Solution: Double-check the color code format and ensure it is a valid hexadecimal string.

Image dimensions not specified

  • Explanation: This error happens when the width or height parameters are not provided.
  • Solution: Make sure to specify both the width and height to define the image size properly.

AnyText FontImg Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_Anytext
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.