ComfyUI Node

DrawTextConfig

The style sheet for the pack's text-on-image rendering

By robertvoy·Created 2 years ago·Updated 9 months ago· 239
DrawTextConfig
    • TEXT_STYLE
    font
    size56
    color#FFFFFF
    background_color#00000000
    padding20
    shadow_distance0
    shadow_blur0
    shadow_color#000000
    horizontal_align
    vertical_align
    offset_x0
    offset_y0
    direction

    DrawTextConfig is the "format this text" node in the Flux Continuum pack's two-node text overlay system. It doesn't draw anything itself - it bundles every rendering decision (font, size, color, alignment, shadow, padding) into a single TEXT_STYLE object, which you then hand to ConfigurableDrawText along with an image and the actual text. Style once, reuse everywhere; that's the whole design.

    How it works

    The node is a pure configurator: fourteen inputs go in, one TEXT_STYLE dict comes out. No image processing happens here. The values are baked into a Python dict that ConfigurableDrawText reads at draw time - think of it as a CSS class for your captions, defined separately from the HTML.

    The choices it exposes: font is a dropdown of exactly the fonts bundled with the pack (Inter_24pt-Medium.ttf and ShareTechMono-Regular.ttf) - you can't load arbitrary system fonts through this node without editing the pack. Colors are hex strings (#RRGGBB or 8-digit #RRGGBBAA). The default background_color of #00000000 is fully transparent, which is why text overlays look clean by default.

    Inputs and outputs that matter

    • font - dropdown: Inter_24pt-Medium.ttf or ShareTechMono-Regular.ttf. Inter for clean captions, ShareTechMono for that terminal/tech look.
    • size - INT, default 56.
    • color - hex string, default #FFFFFF. Text color.
    • background_color - hex string, default #00000000 (transparent).
    • padding - INT, default 20. Padding inside the text box.
    • shadow_distance / shadow_blur / shadow_color - defaults 0, 0, #000000. Distance and blur of 0 = no shadow; raise both to get one.
    • horizontal_align / vertical_align - left|center|right and top|center|bottom.
    • offset_x / offset_y - INT, -2048 to 2048, default 0. Fine-position the text box.
    • direction - ltr or rtl, for right-to-left scripts (reverses each line).

    Output is one TEXT_STYLE, which wires straight into ConfigurableDrawText's TEXT_STYLE input.

    Installing it

    Ships in robertvoy/ComfyUI-Flux-Continuum:

    cd ComfyUI/custom_nodes
    git clone https://github.com/robertvoy/ComfyUI-Flux-Continuum
    

    or ComfyUI Manager ("Flux Continuum"), restart. Fonts are bundled in the repo's fonts/ folder, so no downloads.

    The catch

    You're limited to the two bundled fonts - if you want a specific typeface you'll have to add a .ttf to the pack's fonts/ directory and restart. And there's no preview; you set values, run, and look at the output image. Wire a preview node after ConfigurableDrawText so you can iterate without saving a file each time. For anything fancier than captions and labels, a dedicated image-text tool or a separate graphics pass is the better route.

    Categorytext

    Inputs (13)

    NameTypeDefaultDescription
    fontCOMBO2 options: Inter_24pt-Medium.ttf, ShareTechMono-Regular.ttf
    sizeINT561–9999
    colorSTRING#FFFFFF
    background_colorSTRING#00000000
    paddingINT200–500
    shadow_distanceINT00–100
    shadow_blurINT00–100
    shadow_colorSTRING#000000
    horizontal_alignCOMBO3 options: left, center, right
    vertical_alignCOMBO3 options: top, center, bottom
    offset_xINT0-2048–2048
    offset_yINT0-2048–2048
    directionCOMBO2 options: ltr, rtl

    Outputs (1)

    NameTypeDescription
    TEXT_STYLETEXT_STYLE