Nodes/ComfyUI S4Tool Text/💀Text Font Base64
ComfyUI Node

💀Text Font Base64

A whole font, pasted into one node, for when the workflow must travel

By S4MUEL-404·Created about a year ago·Updated about a year ago· 4
💀Text Font Base64
    • font
    â—„font_base64â–º

    You've built a poster workflow with a specific font, and now you want to hand the whole thing to someone else - or move it to another machine. Font files have a way of not coming along for the ride. S4Tools Text Font Base64 solves that in the most direct way possible: you paste the entire font, encoded as Base64 text, directly into a node input, and the workflow becomes self-contained. The font lives in the graph now.

    That's the use case, and it's a genuinely good one. A .json workflow that carries its own font works on any machine with the pack installed - no font folder, no "did you remember to copy Caveat-Bold into font/" emails. It's the same instinct that makes people embed thumbnails in emails.

    How it works

    The node takes your Base64 string, strips off a data:*;base64, prefix if you pasted one (handy if you copied it from a web tool or data URI), and runs base64.b64decode. Whatever comes out is wrapped up as FONT_DATA and passed to S4Tools Text Basic. On garbage input it raises "Invalid base64 font data."

    Inputs and outputs

    • font_base64 - the multiline string of Base64. This is the whole node.
    • font - the decoded FONT_DATA output, wired into Basic's font input.

    Install

    Same as the rest of the pack: ComfyUI Manager → search "ComfyUI S4Tool Text" → install, or git clone https://github.com/S4MUEL-404/ComfyUI-S4Tool-Text into ComfyUI/custom_nodes/ and restart. Needs nothing beyond the standard pillow/numpy/requests - base64 is in the Python standard library.

    Gotchas

    • This will bloat your workflow file. A .ttf is typically 100–300 KB, which Base64 inflates by ~33%. A workflow with an embedded font is noticeably slower to save and load, and you'll feel it if you save on every run. It's the price of portability - fine for sharing, annoying for daily driver workflows.
    • Decoding "success" is not validation. base64.b64decode accepts plenty of junk, so this node will happily hand you garbage bytes that aren't a font. The failure surfaces one node later, when Text Basic's ImageFont.truetype throws on the decoded blob. If you get an error there and the Base64 looks right, double-check you pasted the whole string.
    • Pasted strings with stray line breaks are generally fine (it trims whitespace), but a truncated string is not - the error just won't be very helpful about why.

    When to reach for it: sharing a workflow, moving across machines, or when you only have the font as a string and no filesystem access. When not: anything you run repeatedly - use Text Font file for that and keep the graph light. It's a utility node, and it does exactly one thing well.

    Category💀S4Tool

    Inputs (1)

    NameTypeDefaultDescription
    font_base64STRING—

    Outputs (1)

    NameTypeDescription
    fontFONT_DATA—