Chinese Font Renderer for Python Images for Openclaw

A professional solution for fixing garbled Chinese characters and emoji display issues in Python-generated images and charts.

bo170814
v1.0.0
Mar 2, 2026
0
0
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install html-cn-render-fix

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install html-cn-render-fix using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Chinese Font Renderer for Python Images?

This skill provides a robust framework for resolving common font rendering issues when converting HTML or data visualizations into images using Python libraries like Matplotlib and Pyppeteer. It specifically addresses the tofu or box character problem by implementing direct font loading techniques, ensuring your automated reports and charts maintain professional typography in Chinese environments. Integrating these Openclaw Skills into your automation pipeline ensures that your AI agents can produce visually accurate and readable assets without manual font configuration overhead.

Chinese Font Renderer for Python Images Use Cases

  • Generating financial charts with Chinese labels using Matplotlib.
  • Converting HTML templates to images for automated social media sharing.
  • Producing automated PDF or image-based reports in CI/CD pipelines.
  • Fixing emoji rendering errors in automated data visualizations.

How Chinese Font Renderer for Python Images Works

  1. The skill identifies missing Chinese glyphs and the specific rendering engine in use.
  2. It implements a direct loading mechanism for font files like Noto Sans CJK to bypass unreliable system-level font registries.
  3. The FontProperties object is mapped to every text element in the chart, including titles, axes, and legends.
  4. It clears the Matplotlib cache to ensure new font configurations are applied immediately.
  5. The final output is rendered as a high-resolution PNG or Base64 string for easy integration.

Chinese Font Renderer for Python Images Setup

To get started with these Openclaw Skills, first install the necessary fonts on your system:

# For Ubuntu/Debian
apt-get install fonts-noto-cjk -y

# For CentOS/RHEL
yum install google-noto-sans-cjk-fonts -y

# For macOS
brew install --cask font-noto-sans-cjk

Then, use the FontProperties method in your Python script to point directly to the installed font path (e.g., /usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc).

Chinese Font Renderer for Python Images Data Schema & Taxonomy

The skill organizes its rendering metadata using the following structure:

Parameter Description
font_path The absolute file path to the CJK-compatible font file.
font_prop The FontProperties instance applied to text rendering elements.
img_base64 The resulting image encoded as a Base64 string for web transport.
rcParams Fallback configuration for global font settings if FontProperties is not used.

Chinese Font Renderer for Python Images Advanced Features

  • Direct Font Injection: Bypass system font registries by loading specific font files directly into the execution context.
  • Multi-Weight Support: Handle different font weights (Bold, Regular) for complex UI rendering within images.
  • Emoji Fallback Logic: Identify and replace complex emojis with compatible variants to prevent rendering crashes.
  • Automatic Cache Management: Programmatically clear font caches using Openclaw Skills to prevent stale configuration issues.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*