ComfyUI Node

Text Maker

Styled text that comes out as image, SVG, and mask at once

By orion4d·Created about a year ago·Updated about a year ago· 13
Text Maker
    • image
    • svg
    • mask
    ◄textHELLO DAO! TEST►
    ◄font_file►
    ◄font_size128►
    ◄canvas_width1024►
    ◄canvas_height512►
    ◄fill_hex#FFFFFF►
    ◄fill_alpha100.00►
    ◄stroke_width0►
    ◄stroke_hex#000000►
    ◄stroke_alpha100.00►
    ◄bg_transparenttrue►
    ◄bg_hex#000000►
    ◄aligncenter►
    ◄svg_vectorizetrue►
    ◄image_rgbatrue►
    ◄stroke_width_alpha0►

    ComfyUI's stock text handling stops at CLIP conditioning - if you want the word "HELLO" as an actual image, you're normally building it in another app. Text Maker renders text into three outputs at once: a rasterized image, a vector svg, and a mask. Title cards, logos, subtitles, watermark text, callout labels - it's the node that makes text a first-class citizen in your graph.

    It's from orion4d/ComfyUI_DAO_master, the French-authored vector-and-image pack. The SVG output is the differentiator: enable svg_vectorize and it converts the text into real vector paths (using matplotlib's TextPath), with holes handled correctly so letters like "o" and "e" don't come out filled blobs - something naive converters botch constantly.

    How it works

    text is a multiline string (default "HELLO DAO!\nTEST"), and font_file is a dropdown fed by the .ttf/.otf fonts in the pack's Fonts/ folder - drop a font in, hit the ↻ refresh, and it appears in the list. The pack ships with a full Roboto family, so you're not stuck with the default bitmap font.

    font_size, canvas_width, canvas_height set the layout. Fill and stroke are independently controlled: fill_hex + fill_alpha for the letter body, stroke_width + stroke_hex + stroke_alpha for an outline (great for legible captions over busy images). align is center/left/right, bg_transparent toggles a transparent background (or set bg_hex for a solid one).

    Outputs:

    • image - the rendered text image (RGBA if image_rgba is on).
    • svg - the SVG_TEXT vector version, wireable into Convert SVG → IMG, SVG Style, or a save node.
    • mask - the text shape as a mask, for compositing or feeding an inpainting step.

    The settings that matter

    • font_file - pick your font; the dropdown won't show new ones until you refresh.
    • fill_hex + stroke_width - the look of the text. Stroke 0 means no outline.
    • svg_vectorize - leave it on if you plan to use the SVG output; it's what makes the letters actual paths.

    Installing

    Via ComfyUI Manager (search ComfyUI_DAO_master) or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/orion4d/ComfyUI_DAO_master.git
    

    For the vector path you'll need matplotlib (the README calls it out):

    pip install matplotlib
    

    then restart. The pack's README also walks through installing custom fonts into Fonts/ - and reminds you to check licenses, since DaFont fonts in particular are often personal-use only.

    Where people get burned

    If the font_file dropdown is empty, you haven't put any fonts in Fonts/ (or didn't refresh). If svg_vectorize errors on import, matplotlib is missing. And stroke_width_alpha is a separate legacy-looking field - if the outline looks odd, check both stroke values, not just one.

    CategoryDAO_master/Text

    Inputs (16)

    NameTypeDefaultDescription
    textSTRINGHELLO DAO! TEST—
    font_fileSTRING—
    font_sizeINT1284–4096—
    canvas_widthINT102416–8192—
    canvas_heightINT51216–8192—
    fill_hexSTRING#FFFFFF—
    fill_alphaFLOAT100.000–100—
    stroke_widthINT00–256—
    stroke_hexSTRING#000000—
    stroke_alphaFLOAT100.000–100—
    bg_transparentBOOLEANtrue—
    bg_hexSTRING#000000—
    alignCOMBOcenter3 options: center, left, right
    svg_vectorizeBOOLEANtrue—
    image_rgbaBOOLEANtrue—
    stroke_width_alphaINT00–256—

    Outputs (3)

    NameTypeDescription
    imageIMAGE—
    svgSVG_TEXT—
    maskMASK—