[Book Tools] Download Font
Fetch a real font so your text nodes stop falling back to ugly
- STRING
BTDownloadFont is a tiny utility that downloads a font from Google Fonts, caches it inside the pack's fonts folder, and returns the file path as a string. You feed that path into the font input of the other Book Tools text nodes - BTTextToImage, BTImageTextOverlay, BTRandomTextOverlay, BTTextGrowth - and suddenly they use a real typeface instead of PIL's default bitmap font.
Why does that matter? Because every Book Tools text node defaults to the Linux path /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf. On Windows that path doesn't exist, and the nodes silently fall back to a tiny built-in font - the "text renders as a squinty little strip" failure that's the pack's most common first-run complaint. This node is the fix.
How it works
You pick one of six fonts from the font_name dropdown: Delius, DejaVuSans-Bold, FreeMono, Roboto, Baloo 2, or LuckiestGuy. On first use it hits the Google Fonts CSS endpoint, extracts the .ttf URL, downloads it, and saves it to the pack's local fonts/ directory. Next run it finds the cached file and returns immediately. If the cached copy is corrupt (PIL can't open it) it deletes and re-downloads; if the whole download fails it prints an error and falls back to the system DejaVu path, so you still get a usable font path.
The output is a single STRING - the absolute path to the font file - which is exactly what the text nodes' font fields expect.
The gotcha: the default will crash it
The dropdown's default value is "Open Sans" - but Open Sans is not one of the six supported fonts. The code does a direct SUPPORTED_FONTS[font_name] lookup, so leaving the default untouched throws a KeyError and the node fails. It's a genuine bug in the pack, and it's the kind of thing that makes people uninstall in frustration. The fix is one click: open the dropdown and pick any of the six listed fonts. Just don't run it with the default.
Requirements
You need an internet connection and the requests library on the first download of any given font (it's imported inside the function, and it's not part of the pack's install). pip install requests if your environment doesn't have it. The pack itself installs with zero extra dependencies - no models, no weights.
cd ComfyUI/custom_nodes
git clone https://github.com/Big-Idea-Technology/ComfyUI-Book-Tools
# restart ComfyUI
Or search "ComfyUI-Book-Tools" in ComfyUI Manager.
Where it fits
Because fonts are cached, you can run it once at the top of a workflow and its output stays valid - no network calls on every run after the first. A sensible book workflow keeps one BTDownloadFont feeding font into all the overlay nodes. And if you'd rather not depend on Google Fonts at all, the repo ships a few fonts already (DejaVuSans-Bold, FreeMono, and others in fonts/), so you can point the font input straight at those files and skip the network entirely.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| font_name | COMBO | Open Sans | 6 options: Delius, DejaVuSans-Bold, FreeMono, Roboto, Baloo 2, LuckiestGuy |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |