title-card-image

Render centered title and subtitle text onto solid-color PNG cards with Pillow.

6.8k|540|Updated May 6, 2026
One-click install
npx skills add https://github.com/opensquilla/opensquilla --skill title-card-image
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: title-card-image
Source: https://github.com/opensquilla/opensquilla/tree/main/src/opensquilla/skills/bundled/title-card-image
Command: npx skills add https://github.com/opensquilla/opensquilla --skill title-card-image

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Pillow, and includes scripts (resource) components.

What problem does it solve?

Creating opening and ending title cards for short videos usually requires a design tool or an image-generation API. This Skill renders deterministic, CJK-safe title card PNGs locally with Pillow, with no network calls and no risk of tofu (missing-glyph boxes) in Chinese, Japanese, or Korean text.

Core Features & Use Cases

  • Centered Text Rendering: Draws a headline and optional subtitle centered on a solid-color background, with automatic line wrapping for CJK and ASCII text and auto-shrink to fit the canvas width.
  • Verified CJK Font Fallback: Searches managed font directories, user font folders, and platform defaults (Windows, macOS, Linux), verifying glyph coverage before drawing and failing with an actionable error instead of rendering tofu.
  • Use Case: In a short-drama pipeline, generate a 720x1280 opening card with the episode title in Chinese, then feed the PNG to a video animation step to produce the intro clip.

Quick Start

Render a title card PNG with the text "咖啡店偶遇" and subtitle "短剧" on a dark background at 720x1280 resolution.

Frequently Asked Questions about title-card-image

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I render a title card PNG with Pillow in Python?

Run the render script with --text for the headline and --output for the PNG path, optionally adding --subtitle, --background, and --font-size. The script centers the text, wraps lines automatically, and prints the absolute output path.

How to render Chinese text in Pillow without tofu boxes?

The renderer verifies each non-ASCII glyph against the font's missing-glyph signature before drawing and skips fonts that would produce tofu. It searches managed font directories, user font folders, and platform CJK fonts like Noto Sans CJK, PingFang, and Microsoft YaHei.

Does Pillow support TTC font collection files?

Yes, Pillow's ImageFont.truetype loads .ttc and .otc collection files, and this renderer includes them in its candidate scan. Collections like PingFang.ttc and NotoSansCJK-Regular.ttc are checked in the priority font list.

Why does text rendering fail with a no compatible font error?

The error occurs when no installed scalable font contains the requested non-ASCII glyphs. Set the OPENSQUILLA_MEDIA_FONTS_DIR environment variable to a font directory or pass --font with a compatible .ttf, .otf, or .ttc file.

What are the limitations of Pillow-based title card rendering?

Output is RGB PNG with no alpha transparency, and there is no rich text styling such as italics, drop shadows, or gradients. For visually richer cards, generate a full image with an image-generation model instead.