ComfyUI > Nodes > KJNodes for ComfyUI > Create Text On Path

ComfyUI Node: Create Text On Path

Class Name

CreateTextOnPath

Category
KJNodes/masking/generate
Author
kijai (Account age: 2192days)
Extension
KJNodes for ComfyUI
Latest Updated
2024-06-25
Github Stars
0.35K

How to Install KJNodes for ComfyUI

Install this extension via the ComfyUI Manager by searching for KJNodes for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter KJNodes for ComfyUI 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Create Text On Path Description

Generate text along specified paths for dynamic, visually appealing designs.

Create Text On Path:

The CreateTextOnPath node is designed to allow you to create text that follows a specified path within your artwork. This node is particularly useful for adding dynamic and visually appealing text elements that conform to curves or shapes, enhancing the overall aesthetic of your design. By leveraging this node, you can easily integrate text into complex compositions, ensuring that it aligns perfectly with other graphical elements. This capability is especially beneficial for creating intricate designs, logos, or any artwork where text needs to follow a non-linear trajectory.

Create Text On Path Input Parameters:

coordinates

This parameter specifies the path coordinates that the text will follow. It is a required input and should be provided as a string. The coordinates define the shape and direction of the path, ensuring that the text aligns correctly along it.

text

This parameter allows you to input the text that will be displayed along the path. It is a required input and accepts a string value. The default value is 'text', and it supports multiline text, enabling you to create more complex text arrangements.

frame_width

This parameter defines the width of the frame in which the text will be rendered. It is an integer value with a default of 512, a minimum of 16, and a maximum of 4096. Adjusting this value will impact the overall size and layout of the text within the frame.

frame_height

This parameter sets the height of the frame for the text rendering. Similar to frame_width, it is an integer value with a default of 512, a minimum of 16, and a maximum of 4096. This parameter helps in defining the vertical space available for the text.

font

This parameter specifies the font to be used for the text. It is a required input and should be selected from the list of available fonts in the kjnodes_fonts directory. The choice of font can significantly affect the visual style and readability of the text.

font_size

This parameter determines the size of the font used for the text. It is an integer value with a default of 42. Adjusting the font size can help in achieving the desired emphasis and clarity for the text along the path.

alignment

This parameter controls the alignment of the text along the path. It offers three options: 'left', 'center', and 'right', with the default being 'center'. The alignment setting affects how the text is positioned relative to the path coordinates.

text_color

This parameter sets the color of the text. It is a string value with a default of 'white'. You can specify any valid color name or hexadecimal color code to match the text color with your design requirements.

size_multiplier

This optional parameter allows you to scale the size of the text. It is a float value with a default of [1.0]. By adjusting the size multiplier, you can proportionally increase or decrease the size of the text along the path.

Create Text On Path Output Parameters:

image

This output parameter provides the rendered image with the text following the specified path. The image can be used directly in your artwork or further processed as needed.

mask

This output parameter generates a mask of the text along the path. The mask can be used for various purposes, such as creating cutouts or applying effects to specific areas of the image.

mask_inverted

This output parameter provides an inverted version of the text mask. It can be useful for creating complementary effects or for use in masking operations where the inverse of the text area is required.

Create Text On Path Usage Tips:

  • Ensure that the path coordinates are accurately defined to achieve the desired text alignment and flow.
  • Experiment with different fonts and font sizes to find the best combination for your design.
  • Use the size_multiplier parameter to fine-tune the text size without altering the font size directly.
  • Adjust the frame_width and frame_height parameters to provide adequate space for the text, especially for longer or multiline text.

Create Text On Path Common Errors and Solutions:

"Invalid coordinates format"

  • Explanation: The coordinates provided are not in the correct format.
  • Solution: Ensure that the coordinates are specified as a valid string representing the path.

"Font not found"

  • Explanation: The specified font is not available in the kjnodes_fonts directory.
  • Solution: Verify that the font file exists in the kjnodes_fonts directory and that the font name is correctly specified.

"Text exceeds frame boundaries"

  • Explanation: The text is too large to fit within the specified frame dimensions.
  • Solution: Increase the frame_width and frame_height parameters or reduce the font_size or size_multiplier to fit the text within the frame.

"Invalid color format"

  • Explanation: The text_color parameter is not specified in a valid color format.
  • Solution: Ensure that the text_color is a valid color name or hexadecimal color code.

Create Text On Path Related Nodes

Go back to the extension to check out more related nodes.
KJNodes for ComfyUI
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.