Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > OpenKatana > OpenKatana · Shape text

ComfyUI Node: OpenKatana · Shape text

Class Name

OpenKatana_shape_text

Category
OpenKatana/Tools
Author
rk0neki (Account age: 235days)
Extension
OpenKatana
Latest Updated
2026-11-05
Github Stars
0.05K

How to Install OpenKatana

Install this extension via the ComfyUI Manager by searching for OpenKatana
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter OpenKatana 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

OpenKatana · Shape text Description

Shapes text into positioned vector glyph outlines with font controls and circular text paths.

OpenKatana · Shape text:

OpenKatana_shape_text turns text into carefully positioned vector letterforms for typography and graphic design work within an OpenKatana project. It uses HarfBuzz text shaping to select and arrange glyphs—the individual shapes used to draw letters and symbols—and extracts their outlines from the chosen font. This is particularly useful for connected writing systems such as Arabic, where a letter’s appearance and placement depend on its neighbors. The shaping engine supports language and writing-direction information, font features, and variable-font adjustments, allowing you to control typography while preserving the font’s actual design. It can also place horizontal text along a circular curve, rotating each glyph to follow the arc. The resulting artwork uses scalable outlines rather than raster pixels, making it suitable for designs that need clean edges at different sizes. Its scope is a single script and direction run, rather than full paragraph composition, automatic line wrapping, or mixed-direction page layout.

OpenKatana · Shape text Input Parameters:

project_id

A required STRING identifying the OpenKatana project in which the tool should operate. This connects the operation to an existing project rather than creating a project automatically. The supplied test confirms that a successful project-based operation places its exported SVG inside the project directory, while requesting a missing project raises a contract error. Choose the identifier of a project you have already created; an arbitrary label or a font path is not a substitute for that identifier. The supplied node interface does not specify a default value, length limits, or a fixed list of valid options.

arguments

A required STRING containing the tool arguments passed through OpenKatana’s argument-processing layer. Use this field to supply the shaping request rather than looking for separate font or text sockets: the authoritative node interface exposes no such sockets. The underlying shaping function accepts font and text, together with optional size, direction, language, script, features, variations, and radius settings. Its documented defaults in the supplied function signature are size=72, language='und' for an undetermined language, and None for direction, script, features, variations, and radius; these are underlying operation defaults, not defaults declared for the arguments socket. A JSON object containing font and text expresses the basic shaping request, with additional supported settings included as needed. The supplied excerpt does not show the complete argument parser or project-level tool signature, so additional wrapper requirements cannot be established from this context alone. The tests demonstrate that text must not be empty, contain a newline, or exceed 4,096 characters; they also reject a Boolean or non-finite size, a zero radius, invalid direction or script values, and unsupported variation settings. No socket-level default, string-length range, or selectable options are shown for arguments.

after

An optional STRING with a Python execution default of None. This field is accepted by the node wrapper, but the supplied execution code does not reference it when constructing the tool arguments or invoking the tool. Consequently, the provided source does not establish any effect on text shaping, export content, or tool-call sequencing; you should not rely on it to change the typography or enforce execution order based on this excerpt alone. Leave it unconnected unless another part of your workflow explicitly documents its use. No minimum, maximum, selectable options, or interface-level text default are provided.

OpenKatana · Shape text Output Parameters:

result_json

A STRING containing the response returned through the OpenKatana tool-response formatter. It is a text response rather than a directly usable image or SVG socket, so downstream steps need to interpret its contents before using the exported artwork. The exact response envelope is not shown, but the underlying shaping result includes the original text, size, resolved direction, language and script, font-feature and variation settings, font fingerprint, units per em, overall advance, overall bounds, and detailed glyph information. Each glyph record describes its identifier, font name, source-text cluster, advance, offset, positioned origin, rotation angle in radians, SVG path, and bounds when an outline exists. Advance describes how far the text placement moves, whereas bounds describe the actual outlined artwork; spaces, for example, may advance the text without contributing a visible outline. The result also contains missing_clusters, identifying source-text clusters shaped to glyph ID zero, which can indicate that the font lacks the required characters. The SVG contains black-filled glyph paths with a padded view box. The export helper writes text.svg and glyphs.json and adds an svg_file path; the project API test confirms that its successful result exposes an SVG file inside the selected project. Shaping-engine version information and a scope statement are also included for interpreting and reproducing the result.

OpenKatana · Shape text Usage Tips:

  • Start with an existing project and a minimal request containing a readable font-file path and a short piece of text. Confirm that shaping and export succeed before adding font features, variable-font settings, or curved placement.
  • Use the underlying size setting to scale the vector outlines; its default is 72. This is a font scaling value, not a fixed canvas width or height: the SVG dimensions are calculated from the resulting outlines with additional padding.
  • Choose a font that supports your writing system. For Arabic lettering, for example, the tests demonstrate shaping with Noto Sans Arabic, while the supplied Anton font produces missing-glyph information for Arabic text.
  • Leave direction and script unspecified when you want HarfBuzz to infer them from the text. For controlled typography, supply appropriate values deliberately; the source explicitly recognizes ttb and btt as vertical directions, but curved placement cannot be combined with either.
  • For variable fonts, use only axes that actually exist in the selected font and stay within that font’s axis limits. The tests show that adjusting wdth and wght in the supplied Noto Sans Arabic variable font changes both the outlines and the overall advance.
  • Add radius only when you need curved horizontal lettering. For positive radii, a larger radius produces a gentler arc and a smaller radius produces stronger curvature; zero is rejected. Adjust size and radius together, since increasing the text size also increases the length of the text being fitted along the curve.
  • Inspect missing_clusters before approving the artwork. A nonempty list is a reason to check font coverage, even if the operation successfully generates an SVG.
  • Keep each request to a single script and direction run. Split multiline artwork or more complex mixed-direction compositions into separate shaping operations and arrange them in a later composition step.
  • Treat an export location as a new destination rather than an overwrite target. The provided export helper deliberately refuses to reuse an existing output directory, protecting earlier results from replacement.

OpenKatana · Shape text Common Errors and Solutions:

Variation {tag} is absent or outside its font bounds

  • Explanation: This explicit ContractError occurs when a requested variable-font axis is missing from the font or its value lies outside the font’s allowed range. A static font generally does not provide variable axes.
  • Solution: Remove the variation setting, choose a variable font that supports that axis, or set the value within the selected font’s actual minimum and maximum. Do not assume that every font supports wght or wdth.

Curved placement currently supports horizontal runs only

  • Explanation: This explicit ContractError occurs when a radius is supplied for a run whose resolved direction is ttb or btt. The implementation does not support placing vertical runs on a curve.
  • Solution: Omit the radius for vertical lettering, or use a genuinely horizontal text run when creating curved typography.

ContractError: invalid text request

  • Explanation: This is a descriptive label rather than a quoted exception message. The tests confirm that empty text, text containing a newline, and a string of 4,097 characters are rejected.
  • Solution: Supply nonempty text without line breaks and keep each request within the demonstrated 4,096-character limit. Shape separate lines independently and combine them during composition.

ContractError: invalid size or radius

  • Explanation: This is a descriptive label; the precise validation message is not included in the excerpts. The tests explicitly reject size=True, a non-finite size such as NaN, and radius=0.
  • Solution: Use a finite numeric size, such as the default 72, rather than a Boolean or invalid numeric value. Omit radius for straight text, or use a valid nonzero radius for supported horizontal curved placement.

ContractError: invalid direction or script

  • Explanation: The exact error wording is not shown, but the tests confirm rejection of direction='invalid' and script='wrong'. These settings describe writing-system properties and cannot be arbitrary descriptive words.
  • Solution: Remove the explicit settings to allow inference, or provide valid HarfBuzz-compatible direction and script identifiers appropriate to the text.

ContractError: invalid font-feature value

  • Explanation: The tests confirm that a feature setting such as features={'liga':'yes'} is rejected, although the exact exception message is not supplied. The feature value is not accepted as the descriptive string 'yes'.
  • Solution: Use the supported feature representation for the tool, with numeric enable or disable values where appropriate, rather than natural-language strings. Omit feature overrides while troubleshooting so the engine can use its normal shaping behavior.

ContractError: project does not exist

  • Explanation: This is a descriptive label rather than an exact quoted message. The project API test confirms that requesting shaping for a missing project raises ContractError.
  • Solution: Create the project first and use its actual identifier in project_id. Check for spelling differences and confirm that the project belongs to the active OpenKatana environment.

FileExistsError

  • Explanation: The export helper creates its destination directory with replacement disabled. Reusing the same directory raises FileExistsError rather than overwriting the existing export.
  • Solution: Use a fresh destination wherever the export destination is configured. If you intend to replace an older export, first back it up and remove or relocate the existing destination.

Font file cannot be read or parsed

  • Explanation: This is a descriptive failure category, not a quoted error message. Shaping requires readable font data that the font-loading and shaping libraries can process; an incorrect path, inaccessible file, or damaged font can prevent that.
  • Solution: Verify the font path from the machine running ComfyUI, check file permissions, and test with a known working font. Remember that a path on your personal computer may not exist on a remote ComfyUI server.

Missing glyphs or unexpected placeholder shapes

  • Explanation: This may occur without an exception. The result records source-text clusters associated with glyph ID zero in missing_clusters, and the tests confirm this behavior when the selected font lacks Arabic characters.
  • Solution: Switch to a font with coverage for the required script and regenerate the artwork. Check the missing-cluster information as well as the visual result instead of assuming that a successful export contains every requested character.

unexpected inputs: ...

  • Explanation: The node wrapper explicitly raises this TypeError if additional fields are passed that are not part of its declared typed inputs. The authoritative interface here exposes only project_id, arguments, and optional after.
  • Solution: Do not add extra node sockets or execution keyword arguments for settings such as font, size, or radius. Supply tool settings through arguments using the format accepted by OpenKatana.

OpenKatana · Shape text Related Nodes

Go back to the extension to check out more related nodes.
OpenKatana
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 Models, enabling artists to harness the latest AI tools to create incredible art.

OpenKatana · Shape text