Text Horizontal To Vertical
Tategaki for CJK-Inspired Workflows
- STRING
The niche tool for when your text needs to read top-to-bottom
Most of the time your prompt text is horizontal and that's fine. But if you're generating anything book-cover or manga-adjacent - a Japanese-style poster, a light-novel title, CJK calligraphy-style layouts - vertical text is the difference between "AI art" and "AI art that knows its culture." Text Horizontal To Vertical is a tiny utility from Moon-NE's MoonNe_Nodes pack that converts horizontal lines into proper vertical tategaki text: columns running top to bottom, read right to left, just like printed Japanese.
It's a one-trick node and it knows it. Nothing fancy about the install, nothing fancy about the dependencies (there are none - the whole pack is pure Python). If you don't need vertical text, this node will never cross your mind, and that's fine. If you do, it's the only node in the pack that does something you can't trivially fake by hand, because the column ordering is the part people get wrong.
How it works
Give it multi-line text like:
吾輩は猫である
名前はまだ無い
and it splits on newlines, finds the longest line, pads every line to that width with full-width spaces (U+3000, so the alignment holds for CJK glyphs), then reads the result column by column, bottom row first. That reversed row order is the key detail: in Japanese vertical layout the leftmost column is the last line of the original text. Get that backwards and your text reads in the wrong order entirely. The node's source comments spell this out explicitly - the bottom line goes on the left, and it reverses the rows to get there. Output is the vertical text, newline-separated, ready to feed into a text-to-image pipeline.
Inputs and output
Just two, and you'll only fiddle with one:
- text (STRING, multiline) - your horizontal lines. Default sample is
123\n456. - enable_convert (BOOLEAN, default on) - a passthrough switch. Off, and the node returns your text untouched. Handy for A/B-ing a workflow or keeping the node in the graph without it doing anything.
Output is a single STRING - the vertical version. Wire it wherever your prompt text goes, typically into a CLIP Text Encode. Nothing else to set, which is the right amount of settings for a transform this narrow.
The honest caveats
Two things to know before you build a workflow on this:
- It's designed for CJK. Japanese vertical typesetting assumes full-width glyphs that stack cleanly. Feed it Latin text and you get each letter on its own line in a vertical column - which is occasionally a deliberate aesthetic, but more often looks like a broken keyboard. Keep the mode's target audience in mind.
- It converts text; it doesn't render it. The node gives you a string. Whether your checkpoint actually typesets it vertically is another matter - SDXL-lineage models handle vertical CJK better than the modern LLM-encoded ones, and even then you'll probably want a ControlNet or inpainting pass to place it cleanly on your image. This node is the prompt-side helper, not the whole solution.
Install
Standard for this pack, which is to say almost too easy:
cd ComfyUI/custom_nodes
git clone https://github.com/Moon-NE/MoonNe_Nodes
Or search for MoonNe_Nodes in ComfyUI Manager and install there. Restart ComfyUI and the node shows up under Text/Transform. It's the pack's most specialized tool - but when vertical Japanese text is what your workflow needs, it's the difference between fumbling with line order and just feeding it lines.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | 123 456 | — |
| enable_convert | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |